Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 17 Dec 2007 21:36:17 +0000 (13:36 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 17 Dec 2007 21:36:17 +0000 (13:36 -0800)
* git://git.linux-nfs.org/pub/linux/nfs-2.6:
  MAINTAINERS: update the NFS CLIENT entry
  NFS: Fix an Oops in NFS unmount
  Revert "NFS: Ensure we return zero if applications attempt to write zero bytes"
  SUNRPC xprtrdma: fix XDR tail buf marshalling for all ops
  NFSv2/v3: Fix a memory leak when using -onolock
  NFS: Fix NFS mountpoint crossing...

163 files changed:
Documentation/ABI/testing/sysfs-kernel-uids [new file with mode: 0644]
Documentation/i2c/summary
Documentation/ja_JP/HOWTO
Documentation/ko_KR/HOWTO
Documentation/ko_KR/stable_api_nonsense.txt [new file with mode: 0644]
Documentation/nfsroot.txt
Documentation/tipar.txt [deleted file]
MAINTAINERS
arch/arm/Kconfig
arch/arm/boot/compressed/head.S
arch/arm/common/it8152.c
arch/arm/mach-ixp4xx/common.c
arch/arm/mach-pxa/cm-x270-pci.c
arch/mips/au1000/Kconfig
arch/mips/au1000/common/pci.c
arch/mips/au1000/common/setup.c
arch/mips/cobalt/time.c
arch/mips/kernel/process.c
arch/mips/kernel/time.c
arch/mips/kernel/traps.c
arch/mips/mips-boards/generic/memory.c
arch/mips/pci/pci.c
arch/powerpc/configs/mpc8272_ads_defconfig
arch/powerpc/configs/pq2fads_defconfig
arch/powerpc/configs/ps3_defconfig
arch/powerpc/kernel/ppc_ksyms.c
arch/powerpc/math-emu/op-2.h
arch/powerpc/platforms/iseries/lpevents.c
arch/powerpc/platforms/ps3/Kconfig
arch/powerpc/sysdev/cpm2_common.c
arch/sparc64/kernel/entry.S
arch/sparc64/kernel/smp.c
arch/sparc64/mm/init.c
drivers/acpi/battery.c
drivers/acpi/numa.c
drivers/acpi/pci_bind.c
drivers/acpi/sbs.c
drivers/acpi/sbshc.c
drivers/acpi/sbshc.h
drivers/acpi/video.c
drivers/atm/fore200e.c
drivers/char/Kconfig
drivers/char/ipmi/ipmi_watchdog.c
drivers/char/tipar.c [deleted file]
drivers/i2c/busses/i2c-davinci.c
drivers/i2c/busses/i2c-gpio.c
drivers/i2c/busses/i2c-omap.c
drivers/i2c/chips/isp1301_omap.c
drivers/ide/Kconfig
drivers/ide/ide-cd.c
drivers/ide/ide-disk.c
drivers/ide/ide-dma.c
drivers/ide/ide-io.c
drivers/ide/ide-iops.c
drivers/ide/ide-lib.c
drivers/ide/ide-probe.c
drivers/ide/ide.c
drivers/ide/pci/hpt366.c
drivers/ide/pci/pdc202xx_new.c
drivers/ide/setup-pci.c
drivers/infiniband/hw/ehca/ehca_classes.h
drivers/infiniband/hw/ehca/ehca_main.c
drivers/infiniband/hw/ehca/ehca_qp.c
drivers/infiniband/hw/ehca/hcp_if.c
drivers/infiniband/hw/ehca/hipz_hw.h
drivers/media/Makefile
drivers/media/common/saa7146_video.c
drivers/media/dvb/dvb-usb/Makefile
drivers/media/dvb/dvb-usb/dibusb-common.c
drivers/media/dvb/frontends/s5h1409.c
drivers/media/dvb/frontends/tda10086.c
drivers/media/dvb/frontends/zl10353.c
drivers/media/dvb/frontends/zl10353.h
drivers/media/video/bt866.c
drivers/media/video/bt8xx/bttv-cards.c
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/cx88/cx88-blackbird.c
drivers/media/video/cx88/cx88-video.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/ivtv/ivtv-i2c.c
drivers/media/video/ivtv/ivtv-i2c.h
drivers/media/video/ivtv/ivtv-streams.c
drivers/media/video/saa5246a.c
drivers/media/video/saa5249.c
drivers/media/video/saa7134/saa7134-alsa.c
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134-dvb.c
drivers/media/video/saa7134/saa7134-empress.c
drivers/media/video/saa7134/saa7134-video.c
drivers/media/video/tvp5150.c
drivers/media/video/videobuf-core.c
drivers/media/video/videobuf-vmalloc.c
drivers/media/video/vivi.c
drivers/misc/thinkpad_acpi.c
drivers/net/Kconfig
drivers/net/fs_enet/mac-scc.c
drivers/net/irda/irda-usb.c
drivers/net/irda/mcs7780.c
drivers/net/irda/stir4200.c
drivers/net/wan/syncppp.c
drivers/pci/probe.c
drivers/sbus/char/cpwatchdog.c
drivers/scsi/ide-scsi.c
drivers/serial/suncore.c
drivers/serial/suncore.h
drivers/serial/sunhv.c
drivers/serial/sunsab.c
drivers/serial/sunsu.c
drivers/serial/sunzilog.c
drivers/usb/core/hcd-pci.c
drivers/usb/core/hub.c
drivers/usb/gadget/at91_udc.c
drivers/usb/host/ehci-fsl.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-ppc-of.c
drivers/usb/host/ohci-ssb.c
drivers/usb/host/r8a66597-hcd.c
drivers/usb/host/uhci-hcd.c
drivers/usb/serial/cp2101.c
drivers/usb/serial/option.c
drivers/usb/serial/sierra.c
drivers/usb/storage/scsiglue.c
drivers/usb/storage/unusual_devs.h
drivers/watchdog/Kconfig
drivers/watchdog/Makefile
drivers/watchdog/at32ap700x_wdt.c
drivers/watchdog/bfin_wdt.c
drivers/watchdog/it8712f_wdt.c [new file with mode: 0644]
drivers/watchdog/sbc7240_wdt.c [new file with mode: 0644]
drivers/watchdog/w83697hf_wdt.c
fs/ocfs2/alloc.c
fs/ocfs2/journal.c
include/asm-arm/arch-pxa/pxa-regs.h
include/asm-mips/mach-au1x00/au1000.h
include/asm-powerpc/commproc.h
include/asm-s390/pgtable.h
include/asm-sparc/unistd.h
include/asm-sparc64/hypervisor.h
include/linux/ide.h
include/linux/netfilter_bridge.h
include/linux/ticable.h [deleted file]
include/linux/usb.h
include/linux/usb_usual.h
include/media/videobuf-core.h
lib/kobject.c
net/ax25/ax25_subr.c
net/bridge/br_device.c
net/ipv4/ipconfig.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/tcp_input.c
net/ipv6/ipv6_sockglue.c
net/irda/irlmp.c
net/irda/parameters.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/x_tables.c
net/netfilter/xt_hashlimit.c
net/sctp/ulpqueue.c
net/tipc/socket.c
net/xfrm/xfrm_state.c
scripts/mkmakefile
sound/arm/pxa2xx-ac97.c
sound/soc/pxa/pxa2xx-ac97.c

diff --git a/Documentation/ABI/testing/sysfs-kernel-uids b/Documentation/ABI/testing/sysfs-kernel-uids
new file mode 100644 (file)
index 0000000..648d65d
--- /dev/null
@@ -0,0 +1,14 @@
+What:          /sys/kernel/uids/<uid>/cpu_shares
+Date:          December 2007
+Contact:       Dhaval Giani <dhaval@linux.vnet.ibm.com>
+               Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
+Description:
+               The /sys/kernel/uids/<uid>/cpu_shares tunable is used
+               to set the cpu bandwidth a user is allowed. This is a
+               propotional value. What that means is that if there
+               are two users logged in, each with an equal number of
+               shares, then they will get equal CPU bandwidth. Another
+               example would be, if User A has shares = 1024 and user
+               B has shares = 2048, User B will get twice the CPU
+               bandwidth user A will. For more details refer
+               Documentation/sched-design-CFS.txt
index 003c7319b8c7a6dbae0881ae513474eea86f727b..13ab076dcd92484149eec9ef9e8bc1fc33031397 100644 (file)
@@ -1,5 +1,3 @@
-This is an explanation of what i2c is, and what is supported in this package.
-
 I2C and SMBus
 =============
 
@@ -33,52 +31,17 @@ When we talk about I2C, we use the following terms:
             Client
 
 An Algorithm driver contains general code that can be used for a whole class
-of I2C adapters. Each specific adapter driver depends on one algorithm
-driver.
+of I2C adapters. Each specific adapter driver either depends on one algorithm
+driver, or includes its own implementation.
 
 A Driver driver (yes, this sounds ridiculous, sorry) contains the general
 code to access some type of device. Each detected device gets its own
 data in the Client structure. Usually, Driver and Client are more closely
 integrated than Algorithm and Adapter.
 
-For a given configuration, you will need a driver for your I2C bus (usually
-a separate Adapter and Algorithm driver), and drivers for your I2C devices
-(usually one driver for each device). There are no I2C device drivers
-in this package. See the lm_sensors project http://www.lm-sensors.nu
-for device drivers.
+For a given configuration, you will need a driver for your I2C bus, and
+drivers for your I2C devices (usually one driver for each device).
 
 At this time, Linux only operates I2C (or SMBus) in master mode; you can't
 use these APIs to make a Linux system behave as a slave/device, either to
 speak a custom protocol or to emulate some other device.
-
-
-Included Bus Drivers
-====================
-Note that only stable drivers are patched into the kernel by 'mkpatch'.
-
-
-Base modules
-------------
-
-i2c-core: The basic I2C code, including the /proc/bus/i2c* interface
-i2c-dev:  The /dev/i2c-* interface
-i2c-proc: The /proc/sys/dev/sensors interface for device (client) drivers
-
-Algorithm drivers
------------------
-
-i2c-algo-bit:    A bit-banging algorithm
-i2c-algo-pcf:    A PCF 8584 style algorithm
-i2c-algo-ibm_ocp: An algorithm for the I2C device in IBM 4xx processors (NOT BUILT BY DEFAULT)
-
-Adapter drivers
----------------
-
-i2c-elektor:     Elektor ISA card (uses i2c-algo-pcf)
-i2c-elv:         ELV parallel port adapter (uses i2c-algo-bit)
-i2c-pcf-epp:     PCF8584 on a EPP parallel port (uses i2c-algo-pcf) (NOT mkpatched)
-i2c-philips-par: Philips style parallel port adapter (uses i2c-algo-bit)
-i2c-adap-ibm_ocp: IBM 4xx processor I2C device (uses i2c-algo-ibm_ocp) (NOT BUILT BY DEFAULT)
-i2c-pport:       Primitive parallel port adapter (uses i2c-algo-bit)
-i2c-velleman:    Velleman K8000 parallel port adapter (uses i2c-algo-bit)
-
index d9d832c010ef4fb21ce5a768bb4ed87df40f816b..488c77fa3aae138c41168408d983791819f5a7fb 100644 (file)
@@ -11,14 +11,14 @@ for non English (read: Japanese) speakers and is not intended as a
 fork. So if you have any comments or updates for this file, please try
 to update the original English file first.
 
-Last Updated: 2007/09/23
+Last Updated: 2007/11/16
 ==================================
 これは、
-linux-2.6.23/Documentation/HOWTO
+linux-2.6.24/Documentation/HOWTO
 の和訳です。
 
 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >
-翻訳日: 2007/09/19
+翻訳日: 2007/11/10
 翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com>
 校正者: 松倉さん <nbh--mats at nifty dot com>
          小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp>
@@ -110,7 +110,7 @@ Linux カーネルソースツリーは幅広い範囲のドキュメントを
 新しいドキュメントファイルも追加することを勧めます。
 カーネルの変更が、カーネルがユーザ空間に公開しているインターフェイスの
 変更を引き起こす場合、その変更を説明するマニュアルページのパッチや情報
-をマニュアルページのメンテナ mtk-manpages@gmx.net に送ることを勧めま
+をマニュアルページのメンテナ mtk.manpages@gmail.com に送ることを勧めま
 す。
 
 以下はカーネルソースツリーに含まれている読んでおくべきファイルの一覧で
index b51d7ca842ba7c21bd76be21fd0e5ca4dd2253a9..029fca914c05dba0d8640c0fccf79982599faac9 100644 (file)
@@ -1,6 +1,6 @@
 NOTE:
 This is a version of Documentation/HOWTO translated into korean
-This document is maintained by minchan Kim < minchan.kim@gmail.com>
+This document is maintained by minchan Kim <minchan.kim@gmail.com>
 If you find any difference between this document and the original file or
 a problem with the translation, please contact the maintainer of this file.
 
@@ -14,7 +14,7 @@ try to update the original English file first.
 Documentation/HOWTO
 의 한글 번역입니다.
 
-역자: 김민찬 <minchan.kim@gmail.com >
+역자: 김민찬 <minchan.kim@gmail.com>
 감수: 이제이미 <jamee.lee@samsung.com>
 ==================================
 
@@ -23,11 +23,11 @@ Documentation/HOWTO
 
 이 문서는 커널 개발에 있어 가장 중요한 문서이다. 이 문서는
 리눅스 커널 개발자가 되는 법과 리눅스 커널 개발 커뮤니티와 일하는
-법을 담고있다. 커널 프로그래밍의기술적인 측면과 관련된 내용들은
-포함하지 않으려고 하였지만 올바으로 여러분을 안내하는 데 도움이
+법을 담고있다. 커널 프로그래밍의 기술적인 측면과 관련된 내용들은
+포함하지 않으려고 하였지만 올바른 길로 여러분을 안내하는 데는 도움이
 될 것이다.
 
\9d´ ë¬¸ì\84\9cì\97\90ì\84\9c ì\98¤ë\9e\98ë\90\9c ê²\83ì\9d\84 ë°\9c견í\95\98ë©´ ë¬¸ì\84\9cì\9d\98 ì\95\84ë\9e\98쪽ì\97\90 ë\82\98ì\97´ë\90\9c ë©\94ì\9d¸í\8a¸너에게
\9d´ ë¬¸ì\84\9cì\97\90ì\84\9c ì\98¤ë\9e\98ë\90\9c ê²\83ì\9d\84 ë°\9c견í\95\98ë©´ ë¬¸ì\84\9cì\9d\98 ì\95\84ë\9e\98쪽ì\97\90 ë\82\98ì\97´ë\90\9c ë©\94ì\9d¸í\85\8cì\9d´너에게
 패치를 보내달라.
 
 
@@ -36,12 +36,12 @@ Documentation/HOWTO
 
 자, 여러분은 리눅스 커널 개발자가 되는 법을 배우고 싶은가? 아니면
 상사로부터"이 장치를 위한 리눅스 드라이버를 작성하시오"라는 말을
-들었는가? 이 문서는 여러분이 겪게 될 과정과 커뮤니티와 일하는 법을
-조언하여 여러분의 목적을 달성하기 위해 필요한 것 모두를 알려주는
-이다.
+들었는가? 이 문서의 목적은 여러분이 겪게 될 과정과 커뮤니티와 협력하는
+법을 조언하여 여러분의 목적을 달성하기 위해 필요한 것 모두를 알려주기
+위함이다.
 
-커ë\84\90ì\9d\80 ë\8c\80ë¶\80ë¶\84ì\9d\80 Cë¡\9c ì\9e\91ì\84±ë\90\98ì\97\88ì\96´고 몇몇 아키텍쳐의 의존적인 부분은
\96´ì\85\88ë¸\94리ë¡\9c ì\9e\91ì\84±ë\90\98ì\97\88ë\8b¤. ì»¤ë\84\90 ê°\9cë°\9cì\9d\84 ì\9c\84í\95´ C를 ì\9e\98 ì\9d´í\95´í\95\98ê³  ì\9e\88ì\96´ì\95¼ í\95\9cë\8b¤.
+커ë\84\90ì\9d\80 ë\8c\80ë¶\80ë¶\84ì\9d\80 Cë¡\9c ì\9e\91ì\84±ë\90\98ì\96´ ì\9e\88고 몇몇 아키텍쳐의 의존적인 부분은
\96´ì\85\88ë¸\94리ë¡\9c ì\9e\91ì\84±ë\90\98ì\96´ ì\9e\88ë\8b¤. ì»¤ë\84\90 ê°\9cë°\9cì\9d\84 ì\9c\84í\95´ C를 ì\9e\98 ì\9d´í\95´í\95\98ê³  ì\9e\88ì\96´ì\95¼ í\95\9cë\8b¤.
 여러분이 특정 아키텍쳐의 low-level 개발을 할 것이 아니라면
 어셈블리(특정 아키텍쳐)는 잘 알아야 할 필요는 없다.
 다음의 참고서적들은 기본에 충실한 C 교육이나 수년간의 경험에 견주지는
@@ -59,11 +59,11 @@ Documentation/HOWTO
 어떤 참고문서도 있지 않다. 정보를 얻기 위해서는 gcc info (`info gcc`)페이지를
 살펴보라.
 
-여러분은 기존의 개발 커뮤니티와 하는 법을 배우려고 하고 있다는 것을
-기억하라. 코딩, 스타일, 절차에 관한 훌륭한 표준을 가진 사람들이 모인
+여러분은 기존의 개발 커뮤니티와 협력하는 법을 배우려고 하고 있다는 것을
+기억하라. 코딩, 스타일, 함수에 관한 훌륭한 표준을 가진 사람들이 모인
 다양한 그룹이 있다. 이 표준들은 오랜동안 크고 지역적으로 분산된 팀들에
-의해 가장 좋은 방법으로 일하기위하여 찾은 것을 기초로 만들어져왔다.
-그 표준들은 문서화가 잘 되어 있기 때문에 가능한한 미리 많은 표준들에
+의해 가장 좋은 방법으로 일하기 위하여 찾은 것을 기초로 만들어져 왔다.
+그 표준들은 문서화가 잘 되어있기 때문에 가능한한 미리 많은 표준들에
 관하여 배우려고 시도하라. 다른 사람들은 여러분이나 여러분의 회사가
 일하는 방식에 적응하는 것을 원하지는 않는다.
 
@@ -73,7 +73,7 @@ Documentation/HOWTO
 
 리눅스 커널 소스 코드는 GPL로 배포(release)되었다. 소스트리의 메인
 디렉토리에 있는 라이센스에 관하여 상세하게 쓰여 있는 COPYING이라는
-파일을 봐라.여러분이 라이센스에 관한 더 깊은 문제를 가지고 있다면
+파일을 봐라. 여러분이 라이센스에 관한 더 깊은 문제를 가지고 있다면
 리눅스 커널 메일링 리스트에 묻지말고 변호사와 연락하라. 메일링
 리스트들에 있는 사람들은 변호사가 아니기 때문에 법적 문제에 관하여
 그들의 말에 의지해서는 안된다.
@@ -85,12 +85,12 @@ GPL에 관한 잦은 질문들과 답변들은 다음을 참조하라.
 문서
 ----
 
-리눅스 커널 소스 트리는 커널 커뮤니티와 일하는 법을 배우기 위한 많은
-ê·\80ì¤\91í\95\9c ë¬¸ì\84\9cë\93¤ì\9d\84 ê°\80ì§\80ê³  ì\9e\88ë\8b¤. ì\83\88ë¡\9cì\9a´ ê¸°ë\8a¥ë\93¤ì\9d´ ì»¤ë\84\90ì\97\90 ë\93¤ì\96´ê°\80ê²\8c ë\90  ë\95\8c,
+리눅스 커널 소스 트리는 커널 커뮤니티와 협력하는 법을 배우기위해 훌륭한
+ë\8b¤ì\96\91í\95\9c ë¬¸ì\84\9cë\93¤ì\9d\84 ê°\80ì§\80ê³  ì\9e\88ë\8b¤. ì\83\88ë¡\9cì\9a´ ê¸°ë\8a¥ë\93¤ì\9d´ ì»¤ë\84\90ì\97\90 ë\93¤ì\96´ê°\80ê²\8c ë\90  ë\95\8c,
 그 기능을 어떻게 사용하는지에 관한 설명을 위하여 새로운 문서 파일을
 추가하는 것을 권장한다. 커널이 유저스페이스로 노출하는 인터페이스를
 변경하게 되면 변경을 설명하는 메뉴얼 페이지들에 대한 패치나 정보를
-mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다.
+mtk.manpages@gmail.com의 메인테이너에게 보낼 것을 권장한다.
 
 다음은 커널 소스 트리에 있는 읽어야 할 파일들의 리스트이다.
   README
@@ -105,7 +105,7 @@ mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다.
   Documentation/CodingStyle
     이 문서는 리눅스 커널 코딩 스타일과 그렇게 한 몇몇 이유를 설명한다.
     모든 새로운 코드는 이 문서에 가이드라인들을 따라야 한다. 대부분의
-    ë©\94ì\9d¸í\8a¸너들은 이 규칙을 따르는 패치들만을 받아들일 것이고 많은 사람들이
+    ë©\94ì\9d¸í\85\8cì\9d´너들은 이 규칙을 따르는 패치들만을 받아들일 것이고 많은 사람들이
     그 패치가 올바른 스타일일 경우만 코드를 검토할 것이다.
 
   Documentation/SubmittingPatches
@@ -115,9 +115,10 @@ mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다.
        - Email 내용들
        - Email 양식
        - 그것을 누구에게 보낼지
-    이러한 규칙들을 따르는 것이 성공을 보장하진 않는다(왜냐하면 모든
-    패치들은 내용과 스타일에 관하여 면밀히 검토되기 때문이다).
-    그러나 규칙을 따르지 않는다면 거의 성공하지도 못할 것이다.
+    이러한 규칙들을 따르는 것이 성공(역자주: 패치가 받아들여 지는 것)을
+    보장하진 않는다(왜냐하면 모든 패치들은 내용과 스타일에 관하여
+    면밀히 검토되기 때문이다). 그러나 규칙을 따르지 않는다면 거의
+    성공하지도 못할 것이다.
 
     올바른 패치들을 만드는 법에 관한 훌륭한 다른 문서들이 있다.
     "The Perfect Patch"
@@ -126,13 +127,13 @@ mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다.
         http://linux.yyz.us/patch-format.html
 
    Documentation/stable_api_nonsense.txt
-    ì\9d´ ë¬¸ì\84\9cë\8a\94 ì\9d\98ë\8f\84ì \81ì\9c¼ë¡\9c ì»¤ë\84\90ì\9d´ ë³\80í\95\98ì§\80 ì\95\8a는 API를 갖지 않도록 결정한
+    ì\9d´ ë¬¸ì\84\9cë\8a\94 ì\9d\98ë\8f\84ì \81ì\9c¼ë¡\9c ì»¤ë\84\90ì\9d´ ë\88ë³\80í\95\98는 API를 갖지 않도록 결정한
     이유를 설명하며 다음과 같은 것들을 포함한다.
        - 서브시스템 shim-layer(호환성을 위해?)
-       - 운영 체제들 간의 드라이버 이식성
+       - 운영체제들간의 드라이버 이식성
        - 커널 소스 트리내에 빠른 변화를 늦추는 것(또는 빠른 변화를 막는 것)
     이 문서는 리눅스 개발 철학을 이해하는데 필수적이며 다른 운영체제에서
-    ë¦¬ë\88\85ì\8a¤ë¡\9c ì\98®ê²¨ì\98¤는 사람들에게는 매우 중요하다.
+    ë¦¬ë\88\85ì\8a¤ë¡\9c ì \84í\96¥í\95\98는 사람들에게는 매우 중요하다.
 
 
   Documentation/SecurityBugs
@@ -141,10 +142,10 @@ mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다.
     도와 달라.
 
   Documentation/ManagementStyle
-    ì\9d´ ë¬¸ì\84\9cë\8a\94 ë¦¬ë\88\85ì\8a¤ ì»¤ë\84\90 ë©\94ì\9d¸í\8a¸ë\84\88ë\93¤ì\9d´ ì\96´ë\96»ê²\8c ê·¸ë\93¤ì\9d\98 ë°©ë²\95ë¡ ì\9d\98 ì \95ì\8b ì\9d\84
-    어떻게 공유하고 운영하는지를 설명한다. 이것은 커널 개발에 입문하는
+    ì\9d´ ë¬¸ì\84\9cë\8a\94 ë¦¬ë\88\85ì\8a¤ ì»¤ë\84\90 ë©\94ì\9d¸í\85\8cì\9d´ë\84\88ë\93¤ì\9d´ ê·¸ë\93¤ì\9d\98 ë°©ë²\95ë¡ ì\97\90 ë\85¹ì\95\84 ì\9e\88ë\8a\94
+    ì \95ì\8b ì\9d\84 ì\96´ë\96»ê²\8c ê³µì\9c í\95\98ê³  ì\9a´ì\98\81í\95\98ë\8a\94ì§\80를 ì\84¤ëª\85í\95\9cë\8b¤. ì\9d´ê²\83ì\9d\80 ì»¤ë\84\90 ê°\9cë°\9cì\97\90 ì\9e\85문í\95\98ë\8a\94
     모든 사람들(또는 커널 개발에 작은 호기심이라도 있는 사람들)이
-    ì\9d½ì\96´ì\95¼ í\95  ì¤\91ì\9a\94í\95\9c ë¬¸ì\84\9cì\9d´ë\8b¤. ì\99\9cë\83\90í\95\98ë©´ ì\9d´ ë¬¸ì\84\9cë\8a\94 ì»¤ë\84\90 ë©\94ì\9d¸í\8a¸너들의
+    ì\9d½ì\96´ì\95¼ í\95  ì¤\91ì\9a\94í\95\9c ë¬¸ì\84\9cì\9d´ë\8b¤. ì\99\9cë\83\90í\95\98ë©´ ì\9d´ ë¬¸ì\84\9cë\8a\94 ì»¤ë\84\90 ë©\94ì\9d¸í\85\8cì\9d´너들의
     독특한 행동에 관하여 흔히 있는 오해들과 혼란들을 해소하고 있기
     때문이다.
 
@@ -160,7 +161,7 @@ mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다.
 
   Documentation/applying-patches.txt
     패치가 무엇이며 그것을 커널의 다른 개발 브랜치들에 어떻게
-    적용하는지에 관하여 자세히 설명 하고 있는 좋은 입문서이다.
+    적용하는지에 관하여 자세히 설명하고 있는 좋은 입문서이다.
 
 커널은 소스 코드 그 자체에서 자동적으로 만들어질 수 있는 많은 문서들을
 가지고 있다. 이것은 커널 내의 API에 대한 모든 설명, 그리고 락킹을
@@ -192,7 +193,7 @@ Documentation/DocBook/ 디렉토리 내에서 만들어지며 PDF, Postscript, H
 여러분이 어디서 시작해야 할진 모르지만 커널 개발 커뮤니티에 참여할 수
 있는 일들을 찾길 원한다면 리눅스 커널 Janitor 프로젝트를 살펴봐라.
          http://janitor.kernelnewbies.org/
-그곳은 시작하기에 아주 딱 좋은 곳이다. 그곳은 리눅스 커널 소스 트리내에
+그곳은 시작하기에 훌륭한 장소이다. 그곳은 리눅스 커널 소스 트리내에
 간단히 정리되고 수정될 수 있는 문제들에 관하여 설명한다. 여러분은 이
 프로젝트를 대표하는 개발자들과 일하면서 자신의 패치를 리눅스 커널 트리에
 반영하기 위한 기본적인 것들을 배우게 될것이며 여러분이 아직 아이디어를
@@ -212,7 +213,7 @@ Documentation/DocBook/ 디렉토리 내에서 만들어지며 PDF, Postscript, H
 것은 Linux Cross-Reference project이며 그것은 자기 참조 방식이며
 소스코드를 인덱스된 웹 페이지들의 형태로 보여준다. 최신의 멋진 커널
 코드 저장소는 다음을 통하여 참조할 수 있다.
-      http://sosdg.org/~coywolf/lxr/
+      http://users.sosdg.org/~qiyong/lxr/
 
 
 개발 프로세스
@@ -233,44 +234,45 @@ Documentation/DocBook/ 디렉토리 내에서 만들어지며 PDF, Postscript, H
 2.6.x 커널들은 Linux Torvalds가 관리하며 kernel.org의 pub/linux/kernel/v2.6/
 디렉토리에서 참조될 수 있다.개발 프로세스는 다음과 같다.
   - 새로운 커널이 배포되자마자 2주의 시간이 주어진다. 이 기간동은
-    ë©\94ì\9d¸í\8a¸너들은 큰 diff들을 Linus에게 제출할 수 있다. 대개 이 패치들은
+    ë©\94ì\9d¸í\85\8cì\9d´너들은 큰 diff들을 Linus에게 제출할 수 있다. 대개 이 패치들은
     몇 주 동안 -mm 커널내에 이미 있었던 것들이다. 큰 변경들을 제출하는 데
     선호되는 방법은  git(커널의 소스 관리 툴, 더 많은 정보들은 http://git.or.cz/
-    ì\97\90ì\84\9c ì°¸ì¡°í\95  ì\88\98 ì\9e\88ë\8b¤)를 ì\82¬ì\9a©í\95\98ë\8a\94 ê²\83ì\9d´ì§\80ë§\8c ì\88\9cì\88\98í\95\9c í\8c¨ì¹\98í\8c\8cì\9d¼ì\9d\98 í\98\95ì\8b\9dì\9c¼ë¡\9c ë³´ë\82´ë\8f\84
+    ì\97\90ì\84\9c ì°¸ì¡°í\95  ì\88\98 ì\9e\88ë\8b¤)를 ì\82¬ì\9a©í\95\98ë\8a\94 ê²\83ì\9d´ì§\80ë§\8c ì\88\9cì\88\98í\95\9c í\8c¨ì¹\98í\8c\8cì\9d¼ì\9d\98 í\98\95ì\8b\9dì\9c¼ë¡\9c ë³´ë\82´ë\8a\94
     것도 무관하다.
   - 2주 후에 -rc1 커널이 배포되며 지금부터는 전체 커널의 안정성에 영향을
-    ë¯¸ì¹ ì\88\98 ì\9e\88ë\8a\94 ì\83\88ë¡\9cì\9a´ ê¸°ë\8a¥ë\93¤ì\9d\84 í\8f¬í\95¨í\95\98ì§\80 ì\95\8aë\8a\94 í\8c¨ì¹\98ë\93¤ë§\8cì\9d\84 추가될 수 있다.
+    ë¯¸ì¹ ì\88\98 ì\9e\88ë\8a\94 ì\83\88ë¡\9cì\9a´ ê¸°ë\8a¥ë\93¤ì\9d\84 í\8f¬í\95¨í\95\98ì§\80 ì\95\8aë\8a\94 í\8c¨ì¹\98ë\93¤ë§\8cì\9d´ 추가될 수 있다.
     완전히 새로운 드라이버(혹은 파일시스템)는 -rc1 이후에만 받아들여진다는
     것을 기억해라. 왜냐하면 변경이 자체내에서만 발생하고 추가된 코드가
     드라이버 외부의 다른 부분에는 영향을 주지 않으므로 그런 변경은
-    퇴보(regression)를 일으킬 만한 위험을 가지고 있지 않기 때문이다. -rc1이
+    회귀(역자주: 이전에는 존재하지 않았지만 새로운 기능추가나 변경으로 인해
+               생겨난 버그)를 일으킬 만한 위험을 가지고 있지 않기 때문이다. -rc1이
     배포된 이후에 git를 사용하여 패치들을 Linus에게 보낼수 있지만 패치들은
     공식적인 메일링 리스트로 보내서 검토를 받을 필요가 있다.
-  - 새로운 -rc는 Linus 현재 git tree가 테스트 하기에 충분히 안정된 상태에
+  - 새로운 -rc는 Linus 현재 git tree가 테스트 하기에 충분히 안정된 상태에
     있다고 판단될 때마다 배포된다. 목표는 새로운 -rc 커널을 매주 배포하는
     것이다.
-  - 이러한 프로세스는 커널이 "준비"되었다고 여겨질때까지 계속된다.
+  - 이러한 프로세스는 커널이 "준비(ready)"되었다고 여겨질때까지 계속된다.
     프로세스는 대체로 6주간 지속된다.
-    - 각 -rc 배포에 있는 알려진 퇴보의 목록들은 다음 URI에 남겨진다.
+  - 각 -rc 배포에 있는 알려진 회귀의 목록들은 다음 URI에 남겨진다.
     http://kernelnewbies.org/known_regressions
 
 커널 배포에 있어서 언급할만한 가치가 있는 리눅스 커널 메일링 리스트의
 Andrew Morton의 글이 있다.
-        "커ë\84\90ì\9d´ ì\96¸ì \9c ë°°í\8f¬ë\90 ì§\80ë\8a\94 ì\95\84무ë¡\9c 모른다. 왜냐하면 배포는 알려진
+        "커ë\84\90ì\9d´ ì\96¸ì \9c ë°°í\8f¬ë\90 ì§\80ë\8a\94 ì\95\84무ë\8f\84 모른다. 왜냐하면 배포는 알려진
          버그의 상황에 따라 배포되는 것이지 미리정해 놓은 시간에 따라
-          배포되는 것은 아니기 때문이다."
+         배포되는 것은 아니기 때문이다."
 
 2.6.x.y - 안정 커널 트리
 ------------------------
 
 4 자리 숫자로 이루어진 버젼의 커널들은 -stable 커널들이다. 그것들은 2.6.x
-커ë\84\90ì\97\90ì\84\9c ë°\9c견ë\90\9c í\81° í\87´ë³´들이나 보안 문제들 중 비교적 작고 중요한 수정들을
+커ë\84\90ì\97\90ì\84\9c ë°\9c견ë\90\9c í\81° í\9a\8cê·\80들이나 보안 문제들 중 비교적 작고 중요한 수정들을
 포함한다.
 
 이것은 가장 최근의 안정적인 커널을 원하는 사용자에게 추천되는 브랜치이며,
-개발/실험적 버젼을 테스트하는 것을 돕는데는 별로 관심이 없다.
+개발/실험적 버젼을 테스트하는 것을 돕고자 하는 사용자들과는 별로 관련이 없다.
 
-어떤 2.6.x.y 커널도 사용가능하지 않다면 그때는 가장 높은 숫자의 2.6.x
+어떤 2.6.x.y 커널도 사용할 수 없다면 그때는 가장 높은 숫자의 2.6.x
 커널이 현재의 안정 커널이다.
 
 2.6.x.y는 "stable" 팀<stable@kernel.org>에 의해 관리되며 거의 매번 격주로
@@ -294,7 +296,7 @@ Andrew Morton에 의해 배포된 실험적인 커널 패치들이다. Andrew는
 서브시스템 커널 트리와 패치들을 가져와서 리눅스 커널 메일링 리스트로
 온 많은 패치들과 한데 묶는다. 이 트리는 새로운 기능들과 패치들을 위한
 장소를 제공하는 역할을 한다. 하나의 패치가 -mm에 한동안 있으면서 그 가치가
-ì¦\9dëª\85ë\90\98ê²\8c ë\90\98ë©´ Andrewë\82\98 ì\84\9cë¸\8cì\8b\9cì\8a¤í\85\9c ë©\94ì\9d¸í\8a¸너는 그것을 메인라인에 포함시키기
+ì¦\9dëª\85ë\90\98ê²\8c ë\90\98ë©´ Andrewë\82\98 ì\84\9cë¸\8cì\8b\9cì\8a¤í\85\9c ë©\94ì\9d¸í\85\8cì\9d´너는 그것을 메인라인에 포함시키기
 위하여 Linus에게 보낸다.
 
 커널 트리에 포함하고 싶은 모든 새로운 패치들은 Linus에게 보내지기 전에
@@ -327,7 +329,7 @@ Andrew Morton에 의해 배포된 실험적인 커널 패치들이다. Andrew는
     - ACPI development tree, Len Brown <len.brown@intel.com >
     git.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git
 
-    - Block development tree, Jens Axboe <axboe@suse.de>
+    - Block development tree, Jens Axboe <jens.axboe@oracle.com>
     git.kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git
 
     - DRM development tree, Dave Airlie <airlied@linux.ie>
@@ -367,8 +369,8 @@ bugzilla.kernel.org는 리눅스 커널 개발자들이 커널의 버그를 추
 kernel bugzilla를 사용하는 자세한 방법은 다음을 참조하라.
     http://test.kernel.org/bugzilla/faq.html
 
-메인 커널 소스 디렉토리에 있는 REPORTING-BUGS 파일은 커널 버그일 것 같은
-것을 보고하는는 법에 관한 좋은 템플릿이고 문제를 추적하기 위해서 커널
+메인 커널 소스 디렉토리에 있는 REPORTING-BUGS 파일은 커널 버그라고 생각되는
+것을 보고하는 방법에 관한 좋은 템플릿이며 문제를 추적하기 위해서 커널
 개발자들이 필요로 하는 정보가 무엇들인지를 상세히 설명하고 있다.
 
 
@@ -383,7 +385,7 @@ kernel bugzilla를 사용하는 자세한 방법은 다음을 참조하라.
 점수를 얻을 수 있는 가장 좋은 방법중의 하나이다. 왜냐하면 많은 사람들은
 다른 사람들의 버그들을 수정하기 위하여 시간을 낭비하지 않기 때문이다.
 
-이미 보고된 버그 리포트들을 가지고 작업하기 위해서 http://bugzilla.kernelorg를
+이미 보고된 버그 리포트들을 가지고 작업하기 위해서 http://bugzilla.kernel.org를
 참조하라. 여러분이 앞으로 생겨날 버그 리포트들의 조언자가 되길 원한다면
 bugme-new 메일링 리스트나(새로운 버그 리포트들만이 이곳에서 메일로 전해진다)
 bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메일로 전해진다)
@@ -404,8 +406,8 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메
 웹상의 많은 다른 곳에도 메일링 리스트의 아카이브들이 있다.
 이러한 아카이브들을 찾으려면 검색 엔진을 사용하라. 예를 들어:
       http://dir.gmane.org/gmane.linux.kernel
-여러분이 새로운 문제에 관해 리스트에 올리기 전에 말하고 싶은 주제에 ë\8c\80í\95\9c
-것을 아카이브에서 먼저 찾기를 강력히 권장한다. 이미 상세하게 토론된 많은
+여러분이 새로운 문제에 관해 리스트에 올리기 전에 말하고 싶은 주제에 ê´\80í\95\9c
+것을 아카이브에서 먼저 찾아보기를 강력히 권장한다. 이미 상세하게 토론된 많은
 것들이 메일링 리스트의 아카이브에 기록되어 있다.
 
 각각의 커널 서브시스템들의 대부분은 자신들의 개발에 관한 노력들로 이루어진
@@ -443,7 +445,7 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메
 무엇보다도 메일링 리스트의 다른 구독자들에게 보여주려 한다는 것을 기억하라.
 
 
-커뮤니티와 하는 법
+커뮤니티와 협력하는 법
 --------------------
 
 커널 커뮤니티의 목적은 가능한한 가장 좋은 커널을 제공하는 것이다. 여러분이
@@ -474,7 +476,7 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메
 올바른 방향의 해결책으로 이끌어갈 의지가 있다면 받아들여질 것이라는 점을
 기억하라.
 
-여러분의 첫 패치에  여러분이 수정해야하는 십여개 정도의 회신이 오는
+여러분의 첫 패치에 여러분이 수정해야하는 십여개 정도의 회신이 오는
 경우도 흔하다. 이것은 여러분의 패치가 받아들여지지 않을 것이라는 것을
 의미하는 것이 아니고 개인적으로 여러분에게 감정이 있어서 그러는 것도
 아니다. 간단히 여러분의 패치에 제기된 문제들을 수정하고 그것을 다시
@@ -486,12 +488,12 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메
 커널 커뮤니티는 가장 전통적인 회사의 개발 환경과는 다르다. 여기에 여러분들의
 문제를 피하기 위한 목록이 있다.
   여러분들이 제안한 변경들에 관하여 말할 때 좋은 것들 :
-    - " 이것은 여러 문제들을 해겹합니다."
+    - "이것은 여러 문제들을 해겹합니다."
     - "이것은 2000 라인의 코드를 제거합니다."
     - "이것은 내가 말하려는 것에 관해 설명하는 패치입니다."
     - "나는 5개의 다른 아키텍쳐에서 그것을 테스트했슴으로..."
-    - "ì\97¬ê¸°ì\97\90 ì\9d¼ë ¨ì\9d\98 ì\9e\91ì\9d\80 í\8c¨ì¹\98ë\93¤ì\9d´ ì\9e\88ì\8aµ음로..."
-    - "ì\9d´ê²\83ì\9d\80 ì\9d¼ë°\98ì \81ì\9d¸ ë¨¸ì\8b ì\97\90ì\84\9c ì\84±ë\8a¥ì\9d\84 í\96¥ì\83\81ì\8b\9cí\82¤ë¯\80로..."
+    - "ì\97¬ê¸°ì\97\90 ì\9d¼ë ¨ì\9d\98 ì\9e\91ì\9d\80 í\8c¨ì¹\98ë\93¤ì\9d´ ì\9e\88ì\8a´음로..."
+    - "ì\9d´ê²\83ì\9d\80 ì\9d¼ë°\98ì \81ì\9d¸ ë¨¸ì\8b ì\97\90ì\84\9c ì\84±ë\8a¥ì\9d\84 í\96¥ì\83\81ì\8b\9cí\82´ì\9c¼로..."
 
   여러분들이 말할 때 피해야 할 좋지 않은 것들 :
     - "우리를 그것을 AIT/ptx/Solaris에서 이러한 방법으로 했다. 그러므로 그것은 좋은 것임에 틀립없다..."
@@ -500,7 +502,7 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메
     - "이것은 우리의 엔터프라이즈 상품 라인을 위한 것이다."
     - "여기에 나의 생각을 말하고 있는 1000 페이지 설계 문서가 있다."
     - "나는 6달동안 이것을 했으니..."
-    - "ì\97¬ê¸°ì\84¸ 5000라인 짜리 패치가 있으니..."
+    - "ì\97¬ê¸°ì\97\90 5000라인 짜리 패치가 있으니..."
     - "나는 현재 뒤죽박죽인 것을 재작성했다. 그리고 여기에..."
     - "나는 마감시한을 가지고 있으므로 이 패치는 지금 적용될 필요가 있다."
 
@@ -510,13 +512,13 @@ bugme-janitor 메일링 리스트(bugzilla에 모든 변화들이 여기서 메
 없다는 것이다. 리눅스 커널의 작업 환경에서는 단지 이메일 주소만
 알수 있기 때문에 여성과 소수 민족들도 모두 받아들여진다. 국제적으로
 일하게 되는 측면은 사람의 이름에 근거하여 성별을 추측할 수 없게
-하기때문에  차별을 없애는 데 도움을 준다. Andrea라는 이름을 가진 남자와
+하기때문에 차별을 없애는 데 도움을 준다. Andrea라는 이름을 가진 남자와
 Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅스 커널에서
 작업하며 생각을 표현해왔던 대부분의 여성들은 긍정적인 경험을 가지고
 있다.
 
 언어 장벽은 영어에 익숙하지 않은 몇몇 사람들에게 문제가 될 수도 있다.
- 언어의 훌륭한 구사는 메일링 리스트에서 올바르게 자신의 생각을
+언어의 훌륭한 구사는 메일링 리스트에서 올바르게 자신의 생각을
 표현하기 위하여 필요하다. 그래서 여러분은 이메일을 보내기 전에
 영어를 올바르게 사용하고 있는지를 체크하는 것이 바람직하다.
 
@@ -524,13 +526,13 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅
 여러분의 변경을 나누어라
 ------------------------
 
-리눅스 커널 커뮤니티는 한꺼번에 굉장히 큰 코드의 묶음을 쉽게
+리눅스 커널 커뮤니티는 한꺼번에 굉장히 큰 코드의 묶음(chunk)을 쉽게
 받아들이지 않는다. 변경은 적절하게 소개되고, 검토되고, 각각의
 부분으로 작게 나누어져야 한다. 이것은 회사에서 하는 것과는 정확히
 반대되는 것이다. 여러분들의 제안은 개발 초기에 일찍이 소개되야 한다.
 그래서 여러분들은 자신이 하고 있는 것에 관하여 피드백을 받을 수 있게
 된다. 커뮤니티가 여러분들이 커뮤니티와 함께 일하고 있다는 것을
\8a\90ë\81¼ë\8f\84ë¡\9d ë§\8cë\93¤ê³  ì»¤ë®¤ë\8b\88í\8b°ê°\80 ì\97¬ë\9f¬ë¶\84ì\9d\98 ê¸°ë\8a¥ì\9d\84 ì\9c\84í\95\9c ì\93°ë \88기 ì\9e¥ì\9c¼ë¡\9cì\84\9c
\8a\90ë\81¼ë\8f\84ë¡\9d ë§\8cë\93¤ê³  ì»¤ë®¤ë\8b\88í\8b°ê°\80 ì\97¬ë\9f¬ë¶\84ì\9d\98 ê¸°ë\8a¥ì\9d\84 ì\9c\84í\95\9c ì\93°ë \88기 ì\9e¥ì\9c¼ë¡\9cì\8d¨
 사용되지 않고 있다는 것을 느끼게 하자. 그러나 메일링 리스트에 한번에
 50개의 이메일을 보내지는 말아라. 여러분들의 일련의 패치들은 항상
 더 작아야 한다.
@@ -539,7 +541,7 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅
 
 1) 작은 패치들은 여러분의 패치들이 적용될 수 있는 확률을 높여준다.
    왜냐하면 다른 사람들은 정확성을 검증하기 위하여 많은 시간과 노력을
-   ë\93¤ì\9d´ê¸°ë¥¼ ì\9b\90í\95\98ì§\80 ì\95\8aë\8a\94ë\8b¤. 5ì¤\84ì\9d\98 í\8c¨ì¹\98ë\8a\94 ë©\94ì\9d¸í\8a¸너가 거의 몇 초간 힐끗
+   ë\93¤ì\9d´ê¸°ë¥¼ ì\9b\90í\95\98ì§\80 ì\95\8aë\8a\94ë\8b¤. 5ì¤\84ì\9d\98 í\8c¨ì¹\98ë\8a\94 ë©\94ì\9d¸í\85\8cì\9d´너가 거의 몇 초간 힐끗
    보면 적용될 수 있다. 그러나 500 줄의 패치는 정확성을 검토하기 위하여
    몇시간이 걸릴 수도 있다(걸리는 시간은 패치의 크기 혹은 다른 것에
    비례하여 기하급수적으로 늘어난다).
@@ -558,18 +560,18 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅
     간결하고 가장 뛰어난 답을 보길 원한다. 훌륭한 학생은 이것을 알고
     마지막으로 답을 얻기 전 중간 과정들을 제출하진 않는다.
 
-    ì»¤ë\84\90 ê°\9cë°\9cë\8f\84 ë§\88ì°¬ê°\80ì§\80ì\9d´ë\8b¤. ë©\94ì\9d¸í\8a¸너들과 검토하는 사람들은 문제를
+    ì»¤ë\84\90 ê°\9cë°\9cë\8f\84 ë§\88ì°¬ê°\80ì§\80ì\9d´ë\8b¤. ë©\94ì\9d¸í\85\8cì\9d´너들과 검토하는 사람들은 문제를
     풀어나가는 과정속에 숨겨진 과정을 보길 원하진 않는다. 그들은
     간결하고 멋진 답을 보길 원한다."
 
-커뮤ë\8b\88í\8b°ì\99\80 í\95¨ê»\98 ì\9d¼í\95\98ë©° ë\9b°ì\96´ë\82\9c ë\8bµì\9d\84 ì°¾ê³  ì\97¬ë\9f¬ë¶\84ë\93¤ì\9d\98 ì\99\84ì\84±ë\90\98ì§\80 ì\95\8aì\9d\80 ì\9d¼
-사이에 균형을 유지해야 하는 어려움이 있을 수 있다. 그러므로 프로세스의
-ì´\88ë°\98ì\97\90 ì\97¬ë\9f¬ë¶\84ì\9d\98 ì\9d¼을 향상시키기위한 피드백을 얻는 것 뿐만 아니라
+커뮤ë\8b\88í\8b°ì\99\80 í\98\91ë ¥í\95\98ë©° ë\9b°ì\96´ë\82\9c ë\8bµì\9d\84 ì°¾ë\8a\94 ê²\83ê³¼ ì\97¬ë\9f¬ë¶\84ë\93¤ì\9d\98 ë\81\9dë§\88ì¹\98ì§\80 ëª»í\95\9c ì\9e\91ì\97\85
+사이에 균형을 유지해야 하는 것은 어려울지도 모른다. 그러므로 프로세스의
+ì´\88ë°\98ì\97\90 ì\97¬ë\9f¬ë¶\84ì\9d\98 ì\9e\91ì\97\85을 향상시키기위한 피드백을 얻는 것 뿐만 아니라
 여러분들의 변경들을 작은 묶음으로 유지해서 심지어는 여러분의 작업의
-모든 부분이 지금은 포함될 준비가 되어있지 않지만 작은 부분은 이미
+모든 부분이 지금은 포함될 준비가 되어있지 않지만 작은 부분은 벌써
 받아들여질 수 있도록 유지하는 것이 바람직하다.
 
\98\90í\95\9c ì\99\84ì\84±ë\90\98ì§\80 ì\95\8aì\95\98ê³  "ë\82\98ì¤\91ì\97\90 ì\88\98ì \95ë\90  ê²\83ì\9d´ë\8b¤." ì\99\80 ê°\99ì\9d\80 ê²\83ë\93¤ì\9d\80 포함하는
\98\90í\95\9c ì\99\84ì\84±ë\90\98ì§\80 ì\95\8aì\95\98ê³  "ë\82\98ì¤\91ì\97\90 ì\88\98ì \95ë\90  ê²\83ì\9d´ë\8b¤." ì\99\80 ê°\99ì\9d\80 ê²\83ë\93¤ì\9d\84 포함하는
 패치들은 받아들여지지 않을 것이라는 점을 유념하라.
 
 변경을 정당화해라
@@ -577,7 +579,7 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅
 
 여러분들의 나누어진 패치들을 리눅스 커뮤니티가 왜 반영해야 하는지를
 알도록 하는 것은 매우 중요하다. 새로운 기능들이 필요하고 유용하다는
-것은 반드시 그에 맞는 이유가 있어야 한다.
+것은 반드시 그에 합당한 이유가 있어야 한다.
 
 
 변경을 문서화해라
@@ -588,7 +590,7 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅
 것이다. 그리고 항상 그 내용을 보길 원하는 모든 사람들을 위해 보존될
 것이다. 패치는 완벽하게 다음과 같은 내용들을 포함하여 설명해야 한다.
   - 변경이 왜 필요한지
-  - í\8c¨ì¹\98ì\97\90 ê´\80í\95\9c ì \84ì²´ ì\84¤ê³\84 ì\96´í\94\84ë¡\9cì¹\98
+  - í\8c¨ì¹\98ì\97\90 ê´\80í\95\9c ì \84ì²´ ì\84¤ê³\84 ì \91ê·¼(approach)
   - 구현 상세들
   - 테스트 결과들
 
@@ -600,7 +602,7 @@ Pat이라는 이름을 가진 여자가 있을 수도 있는 것이다. 리눅
 
 
 이 모든 것을 하는 것은 매우 어려운 일이다. 완벽히 소화하는 데는 적어도 몇년이
-걸릴 ì\88\98ë\8f\84 ì\9e\88ë\8b¤. ë§\8eì\9d\80 ì\9d¸ë\82´ì\99\80 ê²°ì\9d\98ê°\80 필요한 계속되는 개선의 과정이다. 그러나
+걸릴 ì\88\98ë\8f\84 ì\9e\88ë\8b¤. ë§\8eì\9d\80 ì\9d¸ë\82´ì\99\80 ê²°ì\8b¬ì\9d´ 필요한 계속되는 개선의 과정이다. 그러나
 가능한한 포기하지 말라. 많은 사람들은 이전부터 해왔던 것이고 그 사람들도
 정확하게 여러분들이 지금 서 있는 그 곳부터  시작했었다.
 
@@ -620,4 +622,4 @@ David A. Wheeler, Junio Hamano, Michael Kerrisk, and Alex Shepard에게도 감
 
 
 
-ë©\94ì\9d¸í\8a¸너: Greg Kroah-Hartman <greg@kroah.com>
+ë©\94ì\9d¸í\85\8cì\9d´너: Greg Kroah-Hartman <greg@kroah.com>
diff --git a/Documentation/ko_KR/stable_api_nonsense.txt b/Documentation/ko_KR/stable_api_nonsense.txt
new file mode 100644 (file)
index 0000000..8f2b0e1
--- /dev/null
@@ -0,0 +1,195 @@
+NOTE:
+This is a version of Documentation/stable_api_nonsense.txt translated
+into korean
+This document is maintained by barrios <minchan.kim@gmail.com>
+If you find any difference between this document and the original file or
+a problem with the translation, please contact the maintainer of this file.
+
+Please also note that the purpose of this file is to be easier to
+read for non English (read: korean) speakers and is not intended as
+a fork. So if you have any comments or updates for this file please
+try to update the original English file first.
+
+==================================
+이 문서는
+Documentation/stable_api_nonsense.txt
+의 한글 번역입니다.
+
+역자: 김민찬 <minchan.kim@gmail.com>
+감수: 이제이미 <jamee.lee@samsung.com>
+==================================
+
+리눅스 커널 드라이버 인터페이스
+(여러분들의 모든 질문에 대한 답 그리고 다른 몇가지)
+
+Greg Kroah-Hartman <greg@kroah.com>
+
+이 문서는 리눅스가 왜 바이너리 커널 인터페이스를 갖지 않는지, 왜 변하지
+않는(stable) 커널 인터페이스를 갖지 않는지를 설명하기 위해 쓰여졌다.
+이 문서는 커널과 유저공간 사이의 인터페이스가 아니라 커널 내부의
+인터페이스들을 설명하고 있다는 것을 유념하라. 커널과 유저공간 사이의
+인터페이스는 응용프로그램이 사용하는 syscall 인터페이스이다. 그 인터페이스는
+오랫동안 거의 변하지 않았고 앞으로도 변하지 않을 것이다. 나는 pre 0.9에서
+만들어졌지만 최신의 2.6 커널 배포에서도 잘 동작하는 프로그램을 가지고
+있다. 이 인터페이스는 사용자와 응용프로그램 개발자들이 변하지 않을 것이라고
+여길수 있는 것이다.
+
+
+초록
+----
+여러분은 변하지 않는 커널 인터페이스를 원한다고 생각하지만 실제로는
+그렇지 않으며 심지어는 그것을 알아채지 못한다. 여러분이 원하는 것은
+안정되게 실행되는 드라이버이며 드라이버가 메인 커널 트리에 있을 때
+그런 안정적인 드라이버를 얻을 수 있게 된다. 또한 여러분의 드라이버가
+메인 커널 트리에 있다면 다른 많은 좋은 이점들을 얻게 된다. 그러한 것들이
+리눅스를 강건하고, 안정적이며, 성숙한 운영체제로 만들어 놓음으로써
+여러분들로 하여금 바로 리눅스를 사용하게 만드는 이유이다.
+
+
+소개
+----
+
+커널 내부의 인터페이스가 바뀌는 것을 걱정하며 커널 드라이버를 작성하고
+싶어하는 사람은 정말 이상한 사람이다. 세상의 대다수의 사람들은 이 인터페이스를
+보지못할 것이며 전혀 걱정하지도 않는다.
+
+먼저, 나는 closed 소스, hidden 소스, binary blobs, 소스 wrappers, 또는 GPL로
+배포되었지만 소스 코드를 갖고 있지 않은 커널 드라이버들을 설명하는 어떤 다른
+용어들에 관한 어떤 법적인 문제에 관해서는 언급하지 않을 것이다. 어떤 법적인
+질문들을 가지고 있다면 변호사와 연락하라. 나는 프로그래머이므로 여기서 기술적인
+문제들만을 설명하려고 한다. (법적인 문제를 경시하는 것은 아니다. 그런 문제들은
+엄연히 현실에 있고 여러분들은 항상 그 문제들을 인식하고 있을 필요는 있다.)
+
+자, 두가지의 주요 주제가 있다. 바이너리 커널 인터페이스들과 변하지 않는
+커널 소스 인터페이들. 그것들은 서로 의존성을 가지고 있지만 바이너리
+문제를 먼저 풀고 넘어갈 것이다.
+
+
+
+바이너리 커널 인터페이스
+------------------------
+우리가 변하지 않는 커널 소스 인터페이스를 가지고 있다고 가정하자. 그러면
+바이너리 인터페이스 또한 자연적으로 변하지 않을까? 틀렸다. 리눅스 커널에
+관한 다음 사실들을 생각해보라.
+   - 여러분들이 사용하는 C 컴파일러의 버젼에 따라 다른 커널 자료 구조들은
+     다른 alignmnet들을 갖게 될것이고 다른 방법으로(함수들을 inline으로
+     했느냐, 아니냐) 다른 함수들을 포함하는 것도 가능한다. 중요한 것은
+     개별적인 함수 구성이 아니라 자료 구조 패딩이 달라진다는 점이다.
+   - 여러분이 선택한 커널 빌드 옵션에 따라서 커널은 다양한 것들을 가정할
+     수 있다.
+      - 다른 구조체들은 다른 필드들을 포함할 수 있다.
+      - 몇몇 함수들은 전혀 구현되지 않을 수도 있다(즉, 몇몇 lock들은
+        non-SMP 빌드에서는 사라져 버릴수도 있다).
+      - 커널내에 메모리는 build optoin들에 따라 다른 방법으로 align될수
+        있다.
+      - 리눅스는 많은 다양한 프로세서 아키텍쳐에서 실행된다. 한 아키텍쳐의
+        바이너리 드라이버를 다른 아키텍쳐에서 정상적으로 실행시킬 방법은
+        없다.
+
+커널을 빌드했던 C 컴파일러와 정확하게 같은 것을 사용하고 정확하게 같은
+커널 구성(configuration)을 사용하여 여러분들의 모듈을 빌드하면 간단히
+많은 문제들을 해결할 수 있다. 이렇게 하는 것은 여러분들이 하나의 리눅스
+배포판의 하나의 배포 버젼을 위한 모듈만을 제공한다면 별일 아닐 것이다.
+그러나 각기 다른 리눅스 배포판마다 한번씩 빌드하는 수를 각 리눅스 배포판마다
+제공하는 다른 릴리즈의 수와 곱하게 되면 이번에는 각 릴리즈들의 다른 빌드
+옵션의 악몽과 마주하게  것이다. 또한 각 리눅스 배포판들은 다른 하드웨어
+종류에(다른 프로세서 타입과 다른 옵션들) 맞춰져 있는 많은 다른 커널들을
+배포한다. 그러므로 한번의 배포에서조차 여러분들의 모듈은 여러 버젼을
+만들 필요가 있다.
+
+나를 믿어라. 여러분들은 이러한 종류의 배포를 지원하려고 시도한다면 시간이
+지나면 미칠지경이 될 것이다. 난 이러한 것을 오래전에 아주 어렵게 배웠다...
+
+
+
+변하지않는 커널 소스 인터페이스들
+---------------------------------
+
+리눅스 커널 드라이버를 계속해서 메인 커널 트리에 반영하지 않고
+유지보수하려고 하는 사름들과 이 문제를 논의하게 되면 훨씬 더
+"논란의 여지가 많은" 주제가 될 것이다.
+
+리눅스 커널 개발은 끊임없이 빠른 속도로 이루어지고 있으며 결코
+느슨해진 적이 없다. 커널 개발자들이 현재 인터페이스들에서 버그를
+발견하거나 무엇인가 할수 있는 더 좋은 방법을 찾게 되었다고 하자.
+그들이 발견한 것을 실행한다면 아마도 더 잘 동작하도록 현재 인터페이스들을
+수정하게 될 것이다. 그들이 그런 일을 하게되면 함수 이름들은 변하게 되고,
+구조체들은 늘어나거나 줄어들게 되고, 함수 파라미터들은 재작업될 것이다.
+이러한 일이 발생되면 커널 내에 이 인터페이스를 사용했던 인스턴스들이 동시에
+수정될 것이며 이러한 과정은 모든 것이 계속해서 올바르게 동작할 것이라는
+것을 보장한다.
+
+이러한 것의 한 예로써, 커널 내부의 USB 인터페이스들은 이 서브시스템이
+생긴 이후로 적어도 3번의 다른 재작업을 겪었다. 이 재작업들은 많은 다른
+문제들을 풀었다.
+   - 데이터 스트림들의 동기적인 모델에서 비동기적인 모델로의 변화. 이것은
+     많은 드라이버들의 복잡성을 줄이고 처리량을 향상시켜 현재는 거의 모든
+     USB 장치들의 거의 최대 속도로 실행되고 있다.
+   - USB 드라이버가 USB 코어로부터 데이터 패킷들을 할당받로록 한 변경으로
+     인해서 지금의 모든 드라이버들은 많은 문서화된 데드락을 수정하기 위하여
+     USB 코어에게 더 많은 정보를 제공해야만 한다.
+
+이것은 오랫동안 자신의 오래된 USB 인터페이스들을 유지해야 하는 closed 운영체제들과는
+완전히 반대되는 것이다. closed된 운영체제들은 새로운 개발자들에게 우연히 낡은
+인터페이스를 사용하게 할 기회를 주게되며, 적절하지 못한 방법으로 처리하게 되어
+운영체제의 안정성을 해치는 문제를 야기하게 된다.
+
+이 두가지의 예들 모두, 모든 개발자들은 꼭 이루어져야 하는 중요한 변화들이라고
+동의를 하였고 비교적 적은 고통으로 변경되어졌다. 리눅스가 변하지 않는 소스
+인터페이스를 고집한다면, 새로운 인터페이스가 만들어지게 되며 반면 기존의 오래된
+것들, 그리고 깨진 것들은 계속해서 유지되어야 하며 이러한 일들은 USB 개발자들에게
+또 다른 일거리를 주게 된다. 모든 리눅스 USB 개발자들에게 자신의 그들의 업무를
+마친 후 시간을 투자하여 아무 득도 없는 무료 봉사를 해달라고 하는 것은 가능성이
+희박한 일이다.
+
+보안 문제 역시 리눅스에게는 매우 중요하다. 보안 문제가 발견되면 그것은
+매우 짧은 시간 안에 수정된다. 보안 문제는 그 문제를 해결하기 위하여
+여러번 내부 커널 인터페이스들을 재작업하게 만들었다. 이러한 문제가
+발생하였을 때 그 인터페이스들을 사용하는 모든 드라이버들도 동시에
+수정되어 보안 문제가 앞으로 갑작스럽게 생기지는 않을 것이라는 것을
+보장한다. 내부 인터페이스들의 변경이 허락되지 않으면 이러한 종류의 보안
+문제를 수정하고 그것이 다시 발생하지 않을 것이라고 보장하는 것은 가능하지
+않을 것이다.
+
+커널 인터페이스들은 계속해서 정리되고 있다. 현재 인터페이스를 사용하는
+사람이 한명도 없다면 그것은 삭제된다. 이것은 커널이 가능한한 가장 작게
+유지되며 존재하는 모든 가능성이 있는 인터페이스들이 테스트된다는 것을
+보장한다(사용되지 않는 인터페이스들은 유효성 검증을 하기가 거의 불가능하다).
+
+
+무엇을 해야 하나
+---------------
+자, 여러분이 메인 커널 트리에 있지 않은 리눅스 커널 드라이버를 가지고
+있다면 여러분은 즉, 개발자는 무엇을 해야 하나? 모든 배포판마다 다른
+커널 버젼을 위한 바이너리 드라이버를 배포하는 것은 악몽이며 계속해서
+변하고 있는 커널 인터페이스들의 맞처 유지보수하려고 시도하는 것은 힘든
+일이다.
+
+간단하다. 여러분의 커널 드라이버를 메인 커널 트리에 반영하라(우리는 여기서
+GPL을 따르는 배포 드라이버에 관해 얘기하고 있다는 것을 상기하라. 여러분의
+코드가 이러한 분류에 해당되지 않는다면 행운을 빈다. 여러분 스스로 어떻게든
+해야만 한다). 여러분의 드라이버가 트리에 있게되면 커널 인터페이스가
+변경되더라도 가장 먼저 커널에 변경을 가했던 사람에 의해서 수정될 것이다.
+이것은 여러분의 드라이버가 여러분의 별다른 노력없이 항상 빌드가 가능하며
+동작하는 것을 보장한다.
+
+메인 커널 트리에 여러분의 드라이버를 반영하면 얻게 되는 장점들은 다음과 같다.
+   - 관리의 드는 비용(원래 개발자의)은 줄어줄면서 드라이버의 질은 향상될 것이다.
+   - 다른 개발자들이 여러분의 드라이버에 기능들을 추가 할 것이다.
+   - 다른 사람들은 여러분의 드라이버에 버그를 발견하고 수정할 것이다.
+   - 다른 사람들은 여러분의 드라이버의 개선점을 찾을 줄 것이다.
+   - 외부 인터페이스 변경으로 인해 여러분의 드라이버의 수정이 필요하다면 다른
+     사람들이 드라이버를 업데이트할 것이다.
+   - 여러분의 드라이버는 별다른 노력 없이 모든 리눅스 배포판에  자동적으로
+     추가될 것이다.
+
+리눅스는 다른 운영 체제보다 "쉽게 쓸수 있는(out of the box)" 많은 다른 장치들을
+지원하고 어떤 다른 운영 체제보다 다양한 아키텍쳐위에서 이러한 장치들을 지원하기 때문에
+이러한 증명된 개발 모델은 틀림없이 바로 가고 있는 것이다.
+
+
+
+------
+
+이 문서의 초안을 검토해주고 코멘트 해준 Randy Dunlap, Andrew Morton, David Brownell,
+Hanna Linder, Robert Love, 그리고 Nishanth Aravamudan에게 감사한다.
index 16a7cae2721dada82c9e1d9267b48c9f90b9802d..9b956a96936204c19545a3871b42b949a48a842a 100644 (file)
@@ -92,8 +92,14 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
   autoconfiguration.
 
   The <autoconf> parameter can appear alone as the value to the `ip'
-  parameter (without all the ':' characters before) in which case auto-
-  configuration is used.
+  parameter (without all the ':' characters before).  If the value is
+  "ip=off" or "ip=none", no autoconfiguration will take place, otherwise
+  autoconfiguration will take place.  The most common way to use this
+  is "ip=dhcp".
+
+  Note that "ip=off" is not the same thing as "ip=::::::off", because in
+  the latter autoconfiguration will take place if any of DHCP, BOOTP or RARP
+  are compiled in the kernel.
 
   <client-ip>  IP address of the client.
 
@@ -142,7 +148,7 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
                into the kernel will be used, regardless of the value of
                this option.
 
-                  off or none: don't use autoconfiguration (default)
+                  off or none: don't use autoconfiguration
                  on or any:   use any protocol available in the kernel
                  dhcp:        use DHCP
                  bootp:       use BOOTP
diff --git a/Documentation/tipar.txt b/Documentation/tipar.txt
deleted file mode 100644 (file)
index 67133ba..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-
-               Parallel link cable for Texas Instruments handhelds
-               ===================================================
-
-
-Author: Romain Lievin
-Homepage: http://lpg.ticalc.org/prj_tidev/index.html
-
-
-INTRODUCTION:
-
-This is a driver for the very common home-made parallel link cable, a cable 
-designed for connecting TI8x/9x graphing calculators (handhelds) to a computer
-or workstation (Alpha, Sparc). Given that driver is built on parport, the 
-parallel port abstraction layer, this driver is architecture-independent.
-
-It can also be used with another device plugged on the same port (such as a
-ZIP drive). I have a 100MB ZIP and both of them work fine!
-
-If you need more information, please visit the 'TI drivers' homepage at the URL
-above.
-
-WHAT YOU NEED:
-
-A TI calculator and a program capable of communicating with your calculator.
-
-TiLP will work for sure (since I am its developer!). yal92 may be able to use
-it by changing tidev for tipar (may require some hacking...).
-
-HOW TO USE IT:
-
-You must have first compiled parport support (CONFIG_PARPORT_DEV): either 
-compiled in your kernel, either as a module. 
-
-Next, (as root):
-
-       modprobe parport
-       modprobe tipar
-
-If it is not already there (it usually is), create the device:
-
-       mknod /dev/tipar0 c 115 0
-       mknod /dev/tipar1 c 115 1
-       mknod /dev/tipar2 c 115 2
-
-You will have to set permissions on this device to allow you to read/write
-from it:
-
-       chmod 666 /dev/tipar[0..2]
-       
-Now you are ready to run a linking program such as TiLP. Be sure to configure 
-it properly (RTFM).
-       
-MODULE PARAMETERS:
-
-  You can set these with:  modprobe tipar NAME=VALUE
-  There is currently no way to set these on a per-cable basis.
-
-  NAME: timeout
-  TYPE: integer
-  DEFAULT: 15
-  DESC: Timeout value in tenth of seconds. If no data is available once this 
-       time has expired then the driver will return with a timeout error.
-
-  NAME: delay
-  TYPE: integer
-  DEFAULT: 10
-  DESC: Inter-bit delay in micro-seconds. A lower value gives an higher data
-       rate but makes transmission less reliable.
-
-These parameters can be changed at run time by any program via ioctl(2) calls 
-as listed in ./include/linux/ticable.h.
-
-Rather than write 50 pages describing the ioctl() and so on, it is
-perhaps more useful you look at ticables library (dev_link.c) that demonstrates
-how to use them, and demonstrates the features of the driver. This is
-probably a lot more useful to people interested in writing applications
-that will be using this driver.
-
-QUIRKS/BUGS:
-
-None.
-
-HOW TO CONTACT US:
-
-You can email me at roms@lpg.ticalc.org. Please prefix the subject line
-with "TIPAR: " so that I am certain to notice your message.
-You can also mail JB at jb@jblache.org. He packaged these drivers for Debian.
-
-CREDITS:
-
-The code is based on tidev.c & parport.c.
-The driver has been developed independently of Texas Instruments.
index 94143d727bab7b708f0aef3675181305c96980b9..cdc2198db754f4e65a35da6a338adfe658d7258f 100644 (file)
@@ -3701,11 +3701,6 @@ M:       nagar@watson.ibm.com
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
-TI PARALLEL LINK CABLE DRIVER
-P:     Romain Lievin
-M:     roms@lpg.ticalc.org
-S:     Maintained
-
 TIPC NETWORK LAYER
 P:     Per Liden
 M:     per.liden@ericsson.com
index a7e9fea978a65fbb89508f428d870471b0fb7a6b..c4de2d4664d7d504fd63715fb84ec7450ac53496 100644 (file)
@@ -537,7 +537,7 @@ config ISA_DMA_API
        bool
 
 config PCI
-       bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX || ARCH_KS8695
+       bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX || ARCH_KS8695 || MACH_ARMCORE
        help
          Find out whether you have a PCI motherboard. PCI is the name of a
          bus system, i.e. the way the CPU talks to the other stuff inside
@@ -558,6 +558,12 @@ config PCI_HOST_VIA82C505
        depends on PCI && ARCH_SHARK
        default y
 
+config PCI_HOST_ITE8152
+       bool
+       depends on PCI && MACH_ARMCORE
+       default y
+       select DMABOUNCE
+
 source "drivers/pci/Kconfig"
 
 source "drivers/pcmcia/Kconfig"
index b9b03eda70e5a370b02b3c276cd9db69405af3d7..5cac46a19bb781609b1940c7cde7d353641d246f 100644 (file)
@@ -31,7 +31,7 @@
                .macro  loadsp, rb
                .endm
                .macro  writeb, ch, rb
-               mcr     p14, 0, \ch, c0, c1, 0
+               mcr     p14, 0, \ch, c1, c0, 0
                .endm
 #endif
 
index c03de9bfd76b5c28b503ff6afbc5d51c8595ef10..97b7dc13d9aa9832e94995874293ed22332be748 100644 (file)
@@ -70,8 +70,6 @@ static inline void it8152_irq(int irq)
 {
        struct irq_desc *desc;
 
-       printk(KERN_DEBUG "===> %s: irq=%d\n", __FUNCTION__, irq);
-
        desc = irq_desc + irq;
        desc_handle_irq(irq, desc);
 }
@@ -106,8 +104,6 @@ void it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
        int bits_pd, bits_lp, bits_ld;
        int i;
 
-       printk(KERN_DEBUG "=> %s: irq = %d\n", __FUNCTION__, irq);
-
        while (1) {
               /* Read all */
               bits_pd = __raw_readl(IT8152_INTC_PDCNIRR);
@@ -293,8 +289,7 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
  */
 int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
 {
-       printk(KERN_DEBUG "%s: %s %llx\n",
-              __FUNCTION__, dev->dev.bus_id, mask);
+       dev_dbg(&dev->dev, "%s: %llx\n", __FUNCTION__, mask);
        if (mask >= PHYS_OFFSET + SZ_64M - 1)
                return 0;
 
@@ -304,8 +299,7 @@ int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
 int
 pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
 {
-       printk(KERN_DEBUG "%s: %s %llx\n",
-              __FUNCTION__, dev->dev.bus_id, mask);
+       dev_dbg(&dev->dev, "%s: %llx\n", __FUNCTION__, mask);
        if (mask >= PHYS_OFFSET + SZ_64M - 1)
                return 0;
 
index c1271c449246ecf743d6bdce0e77e052ad1e74a1..f6d66dce68523f736056aa8d14c76f167fc02049 100644 (file)
@@ -442,7 +442,8 @@ static int ixp4xx_set_next_event(unsigned long evt,
 static void ixp4xx_set_mode(enum clock_event_mode mode,
                            struct clock_event_device *evt)
 {
-       unsigned long opts, osrt = *IXP4XX_OSRT1 & ~IXP4XX_OST_RELOAD_MASK;
+       unsigned long opts = *IXP4XX_OSRT1 & IXP4XX_OST_RELOAD_MASK;
+       unsigned long osrt = *IXP4XX_OSRT1 & ~IXP4XX_OST_RELOAD_MASK;
 
        switch (mode) {
        case CLOCK_EVT_MODE_PERIODIC:
@@ -455,12 +456,15 @@ static void ixp4xx_set_mode(enum clock_event_mode mode,
                opts = IXP4XX_OST_ENABLE | IXP4XX_OST_ONE_SHOT;
                break;
        case CLOCK_EVT_MODE_SHUTDOWN:
+               opts &= ~IXP4XX_OST_ENABLE;
+               break;
+       case CLOCK_EVT_MODE_RESUME:
+               opts |= IXP4XX_OST_ENABLE;
+               break;
        case CLOCK_EVT_MODE_UNUSED:
        default:
                osrt = opts = 0;
                break;
-       case CLOCK_EVT_MODE_RESUME:
-               break;
        }
 
        *IXP4XX_OSRT1 = osrt | opts;
index 878d3b9b8633efe714abec033e52846b422adb20..15c4e0df3e10dcc375180b79b33247a1ea9fe4e2 100644 (file)
@@ -40,7 +40,7 @@ void __init cmx270_pci_adjust_zones(int node, unsigned long *zone_size,
 {
        unsigned int sz = SZ_64M >> PAGE_SHIFT;
 
-       printk(KERN_INFO "Adjusting zones for CM-x270\n");
+       pr_info("Adjusting zones for CM-x270\n");
 
        /*
         * Only adjust if > 64M on current system
@@ -104,8 +104,7 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
        int irq;
 
-       printk(KERN_DEBUG "===> %s: %s slot=%x, pin=%x\n", __FUNCTION__,
-              pci_name(dev), slot, pin);
+       dev_dbg(&dev->dev, "%s: slot=%x, pin=%x\n", __FUNCTION__, slot, pin);
 
        irq = it8152_pci_map_irq(dev, slot, pin);
        if (irq)
@@ -141,14 +140,13 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
        return(0);
 }
 
-static struct pci_bus * __init
-cmx270_pci_scan_bus(int nr, struct pci_sys_data *sys)
+static void cmx270_pci_preinit(void)
 {
-       printk(KERN_INFO "Initializing CM-X270 PCI subsystem\n");
+       pr_info("Initializing CM-X270 PCI subsystem\n");
 
        __raw_writel(0x800, IT8152_PCI_CFG_ADDR);
        if (__raw_readl(IT8152_PCI_CFG_DATA) == 0x81521283) {
-               printk(KERN_INFO "PCI Bridge found.\n");
+               pr_info("PCI Bridge found.\n");
 
                /* set PCI I/O base at 0 */
                writel(0x848, IT8152_PCI_CFG_ADDR);
@@ -163,7 +161,7 @@ cmx270_pci_scan_bus(int nr, struct pci_sys_data *sys)
                /* CardBus Controller on ATXbase baseboard */
                writel(0x4000, IT8152_PCI_CFG_ADDR);
                if (readl(IT8152_PCI_CFG_DATA) == 0xAC51104C) {
-                       printk(KERN_INFO "CardBus Bridge found.\n");
+                       pr_info("CardBus Bridge found.\n");
 
                        /* Configure socket 0 */
                        writel(0x408C, IT8152_PCI_CFG_ADDR);
@@ -196,7 +194,6 @@ cmx270_pci_scan_bus(int nr, struct pci_sys_data *sys)
                        writel(0xb0000000, IT8152_PCI_CFG_DATA);
                }
        }
-       return it8152_pci_scan_bus(nr, sys);
 }
 
 static struct hw_pci cmx270_pci __initdata = {
@@ -204,7 +201,8 @@ static struct hw_pci cmx270_pci __initdata = {
        .map_irq        = cmx270_pci_map_irq,
        .nr_controllers = 1,
        .setup          = it8152_pci_setup,
-       .scan           = cmx270_pci_scan_bus,
+       .scan           = it8152_pci_scan_bus,
+       .preinit        = cmx270_pci_preinit,
 };
 
 static int __init cmx270_init_pci(void)
index 05d1354aad3a5dca791a46bd017de81a42ff68d8..1fe97cccead1f7b4d633eba2d273b41204cecd4e 100644 (file)
@@ -7,7 +7,6 @@ config MIPS_MTX1
        bool "4G Systems MTX-1 board"
        select DMA_NONCOHERENT
        select HW_HAS_PCI
-       select RESOURCES_64BIT if PCI
        select SOC_AU1500
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
@@ -22,7 +21,6 @@ config MIPS_DB1000
        select SOC_AU1000
        select DMA_NONCOHERENT
        select HW_HAS_PCI
-       select RESOURCES_64BIT if PCI
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config MIPS_DB1100
@@ -44,7 +42,6 @@ config MIPS_DB1500
        select DMA_NONCOHERENT
        select HW_HAS_PCI
        select MIPS_DISABLE_OBSOLETE_IDE
-       select RESOURCES_64BIT if PCI
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
@@ -54,7 +51,6 @@ config MIPS_DB1550
        select HW_HAS_PCI
        select DMA_NONCOHERENT
        select MIPS_DISABLE_OBSOLETE_IDE
-       select RESOURCES_64BIT if PCI
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config MIPS_MIRAGE
@@ -68,7 +64,6 @@ config MIPS_PB1000
        select SOC_AU1000
        select DMA_NONCOHERENT
        select HW_HAS_PCI
-       select RESOURCES_64BIT if PCI
        select SWAP_IO_SPACE
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
@@ -77,7 +72,6 @@ config MIPS_PB1100
        select SOC_AU1100
        select DMA_NONCOHERENT
        select HW_HAS_PCI
-       select RESOURCES_64BIT if PCI
        select SWAP_IO_SPACE
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
@@ -86,7 +80,6 @@ config MIPS_PB1200
        select SOC_AU1200
        select DMA_NONCOHERENT
        select MIPS_DISABLE_OBSOLETE_IDE
-       select RESOURCES_64BIT if PCI
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config MIPS_PB1500
@@ -94,7 +87,6 @@ config MIPS_PB1500
        select SOC_AU1500
        select DMA_NONCOHERENT
        select HW_HAS_PCI
-       select RESOURCES_64BIT if PCI
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config MIPS_PB1550
@@ -103,7 +95,6 @@ config MIPS_PB1550
        select DMA_NONCOHERENT
        select HW_HAS_PCI
        select MIPS_DISABLE_OBSOLETE_IDE
-       select RESOURCES_64BIT if PCI
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config MIPS_XXS1500
index 9be99a68932aca8c83d7aba6b548a1b161b4a531..6fa70a36a250aaf4eb8ab3b8482244daefedca9d 100644 (file)
 
 /* TBD */
 static struct resource pci_io_resource = {
-       .start  = (resource_size_t)PCI_IO_START,
-       .end    = (resource_size_t)PCI_IO_END,
+       .start  = PCI_IO_START,
+       .end    = PCI_IO_END,
        .name   = "PCI IO space",
        .flags  = IORESOURCE_IO
 };
 
 static struct resource pci_mem_resource = {
-       .start  = (resource_size_t)PCI_MEM_START,
-       .end    = (resource_size_t)PCI_MEM_END,
+       .start  = PCI_MEM_START,
+       .end    = PCI_MEM_END,
        .name   = "PCI memory space",
        .flags  = IORESOURCE_MEM
 };
index a90d425d4651a66c0e805d47511ecb86d0b866db..d885e3848ec6c0842057341e2322cf53fcd29438 100644 (file)
@@ -137,12 +137,11 @@ phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)
 
 #ifdef CONFIG_PCI
        {
-               u32 start, end;
+               u32 start = (u32)Au1500_PCI_MEM_START;
+               u32 end   = (u32)Au1500_PCI_MEM_END;
 
-               start = (u32)Au1500_PCI_MEM_START;
-               end = (u32)Au1500_PCI_MEM_END;
-               /* check for pci memory window */
-               if ((phys_addr >= start) && ((phys_addr + size) < end))
+               /* Check for PCI memory window */
+               if (phys_addr >= start && (phys_addr + size - 1) <= end)
                        return (phys_t)
                               ((phys_addr - start) + Au1500_PCI_MEM_START);
        }
index fa819fccd5dbd30ec497afb896c55eac9fb83bad..4a570e7145fe65fc0d551f60600feb916541bc3c 100644 (file)
 
 void __init plat_time_init(void)
 {
+       u32 start, end;
+       int i = HZ / 10;
+
        setup_pit_timer();
 
        gt641xx_set_base_clock(GT641XX_BASE_CLOCK);
 
-       mips_timer_state = gt641xx_timer0_state;
+       /*
+        * MIPS counter frequency is measured during a 100msec interval
+        * using GT64111 timer0.
+        */
+       while (!gt641xx_timer0_state())
+               ;
+
+       start = read_c0_count();
+
+       while (i--)
+               while (!gt641xx_timer0_state())
+                       ;
+
+       end = read_c0_count();
+
+       mips_hpt_frequency = (end - start) * 10;
+       printk(KERN_INFO "MIPS counter frequency %dHz\n", mips_hpt_frequency);
 }
index 11cb264f59ce51b7e5e280524ead59e326c37c0a..2c09a442e5e5939160843570e60e829a5995fe32 100644 (file)
@@ -77,9 +77,8 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
        unsigned long status;
 
        /* New thread loses kernel privileges. */
-       status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|KU_MASK);
+       status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|ST0_FR|KU_MASK);
 #ifdef CONFIG_64BIT
-       status &= ~ST0_FR;
        status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR;
 #endif
        status |= KU_USER;
index 52075426c37338a46f7ab3f1990c41030d23ed45..1ecfbb7eba6cd25f0637137b6b6272a9ccdd0bc8 100644 (file)
@@ -109,10 +109,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
        cd->mult = (u32) temp;
 }
 
-void __init __weak plat_time_init(void)
-{
-}
-
 /*
  * This function exists in order to cause an error due to a duplicate
  * definition if platform code should have its own implementation.  The hook
index 23e73d0650a3bfd599a3c2dbab43dac23efa8004..fcae6675297273839812a4977c329ee6cb9e5899 100644 (file)
@@ -1317,12 +1317,12 @@ void __init per_cpu_trap_init(void)
 #endif
        if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV)
                status_set |= ST0_XX;
+       if (cpu_has_dsp)
+               status_set |= ST0_MX;
+
        change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
                         status_set);
 
-       if (cpu_has_dsp)
-               set_c0_status(ST0_MX);
-
 #ifdef CONFIG_CPU_MIPSR2
        if (cpu_has_mips_r2) {
                unsigned int enable = 0x0000000f;
index dc272c1882337167a0350d87afc978702b1c0f0a..2c5c27c8e86df597681f0afd216a0af26f64f1c4 100644 (file)
@@ -169,6 +169,7 @@ void __init prom_meminit(void)
 
 void __init prom_free_prom_memory(void)
 {
+#if 0 /* for now ...  */
        unsigned long addr;
        int i;
 
@@ -180,4 +181,5 @@ void __init prom_free_prom_memory(void)
                free_init_pages("prom memory",
                                addr, addr + boot_mem_map.map[i].size);
        }
+#endif
 }
index 589b745d822a31b47cc2c98b96e6a75bb29dfc19..6e6981fd79346f0979c9aaa66f1a15997861a7ee 100644 (file)
@@ -242,6 +242,8 @@ static void pcibios_fixup_device_resources(struct pci_dev *dev,
        for (i = 0; i < PCI_NUM_RESOURCES; i++) {
                if (!dev->resource[i].start)
                        continue;
+               if (dev->resource[i].flags & IORESOURCE_PCI_FIXED)
+                       continue;
                if (dev->resource[i].flags & IORESOURCE_IO)
                        offset = hose->io_offset;
                else if (dev->resource[i].flags & IORESOURCE_MEM)
index a31b7a030a6b87e48563f8bb2ebc7eeff76aeb4f..5eae305215dc7ffdf5e40596c87c19cf5ba8ca52 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc4
-# Thu Dec  6 16:48:30 2007
+# Linux kernel version: 2.6.24-rc5
+# Thu Dec 13 22:40:57 2007
 #
 # CONFIG_PPC64 is not set
 
@@ -491,7 +491,7 @@ CONFIG_MII=y
 CONFIG_FS_ENET=y
 # CONFIG_FS_ENET_HAS_SCC is not set
 CONFIG_FS_ENET_HAS_FCC=y
-# CONFIG_FS_ENET_MDIO_FCC is not set
+CONFIG_FS_ENET_MDIO_FCC=y
 CONFIG_NETDEV_1000=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
index 142d206d6870e4a7db3448f07bf5e3d7d43fddfa..a3bfbb65a933d3194f0da7d88926b1356d35d1ca 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24-rc4
-# Thu Dec  6 16:49:09 2007
+# Linux kernel version: 2.6.24-rc5
+# Thu Dec 13 22:39:18 2007
 #
 # CONFIG_PPC64 is not set
 
@@ -548,7 +548,7 @@ CONFIG_MII=y
 CONFIG_FS_ENET=y
 # CONFIG_FS_ENET_HAS_SCC is not set
 CONFIG_FS_ENET_HAS_FCC=y
-# CONFIG_FS_ENET_MDIO_FCC is not set
+CONFIG_FS_ENET_MDIO_FCC=y
 CONFIG_NETDEV_1000=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
index 5bd547ecd60af86eb1b584e3d47d797d08453333..0b5469fb6e0fa9b65f36ef44bab25c331f5eaa08 100644 (file)
@@ -157,7 +157,7 @@ CONFIG_PS3_HTAB_SIZE=20
 CONFIG_PS3_USE_LPAR_ADDR=y
 CONFIG_PS3_VUART=y
 CONFIG_PS3_PS3AV=y
-CONFIG_PS3_SYS_MANAGER=m
+CONFIG_PS3_SYS_MANAGER=y
 CONFIG_PS3_STORAGE=y
 CONFIG_PS3_DISK=y
 CONFIG_PS3_ROM=y
index c6b1aa3efbb9c7362902858ae31591135b3f50ec..13ebeb2d71e629c0b53afe86fd52ab275a88a28e 100644 (file)
 #include <asm/signal.h>
 #include <asm/dcr.h>
 
-#ifdef  CONFIG_8xx
-#include <asm/commproc.h>
-#endif
-
 #ifdef CONFIG_PPC64
 EXPORT_SYMBOL(local_irq_restore);
 #endif
@@ -172,14 +168,6 @@ EXPORT_SYMBOL(console_drivers);
 EXPORT_SYMBOL(cacheable_memcpy);
 #endif
 
-#ifdef  CONFIG_8xx
-EXPORT_SYMBOL(cpm_install_handler);
-EXPORT_SYMBOL(cpm_free_handler);
-#endif /* CONFIG_8xx */
-#if defined(CONFIG_8xx)
-EXPORT_SYMBOL(__res);
-#endif
-
 #ifdef CONFIG_PPC32
 EXPORT_SYMBOL(next_mmu_context);
 EXPORT_SYMBOL(set_context);
index b9b06b4c6ea16f144cd7fa0b814770f3b272e085..7d6f17cc29295450ce7b729b176f5267b9638bbe 100644 (file)
@@ -59,7 +59,8 @@
     else                                                               \
       {                                                                        \
        X##_f0 = (X##_f1 >> ((N) - _FP_W_TYPE_SIZE) |                   \
-                 (((X##_f1 << (sz - (N))) | X##_f0) != 0));            \
+                 (((X##_f1 << (2 * _FP_W_TYPE_SIZE - (N))) |           \
+                  X##_f0) != 0));                                      \
        X##_f1 = 0;                                                     \
       }                                                                        \
   } while (0)
index 34bdbbe3ce590a73a70d04e5d91732189f1b43cb..275f49449839e189ff2776a0047fd03813595544 100644 (file)
@@ -121,6 +121,7 @@ void process_hvlpevents(void)
 {
        struct HvLpEvent * event;
 
+ restart:
        /* If we have recursed, just return */
        if (!spin_trylock(&hvlpevent_queue.hq_lock))
                return;
@@ -146,8 +147,20 @@ void process_hvlpevents(void)
                        if (event->xType < HvLpEvent_Type_NumTypes &&
                                        lpEventHandler[event->xType])
                                lpEventHandler[event->xType](event);
-                       else
-                               printk(KERN_INFO "Unexpected Lp Event type=%d\n", event->xType );
+                       else {
+                               u8 type = event->xType;
+
+                               /*
+                                * Don't printk in the spinlock as printk
+                                * may require ack events form the HV to send
+                                * any characters there.
+                                */
+                               hvlpevent_clear_valid(event);
+                               spin_unlock(&hvlpevent_queue.hq_lock);
+                               printk(KERN_INFO
+                                       "Unexpected Lp Event type=%d\n", type);
+                               goto restart;
+                       }
 
                        hvlpevent_clear_valid(event);
                } else if (hvlpevent_queue.hq_overflow_pending)
index 67144d1d14056de4a88076830cc40a274ce5980d..298f1c9679fbd0b3b3e9d16b964c746230a0515c 100644 (file)
@@ -91,7 +91,7 @@ config PS3_SYS_MANAGER
        depends on PPC_PS3
        tristate "PS3 System Manager driver" if PS3_ADVANCED
        select PS3_VUART
-       default m
+       default y
        help
          Include support for the PS3 System Manager.
 
index 859362fecb7c659a6e546ef92dc5610b843109ea..c1d82403202084c5e39e7061f488b6113aafbf3e 100644 (file)
@@ -61,8 +61,7 @@ cpm2_map_t __iomem *cpm2_immr;
                                           of space for CPM as it is larger
                                           than on PQ2 */
 
-void
-cpm2_reset(void)
+void __init cpm2_reset(void)
 {
 #ifdef CONFIG_PPC_85xx
        cpm2_immr = ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE);
index c9b0d7af64ae217897c9fff0d5c94576619f7a69..ea257e8283644787d30d7f25f7f1a347828640a4 100644 (file)
@@ -2593,3 +2593,15 @@ sun4v_mmustat_info:
        retl
         nop
        .size   sun4v_mmustat_info, .-sun4v_mmustat_info
+
+       .globl  sun4v_mmu_demap_all
+       .type   sun4v_mmu_demap_all,#function
+sun4v_mmu_demap_all:
+       clr     %o0
+       clr     %o1
+       mov     HV_MMU_ALL, %o2
+       mov     HV_FAST_MMU_DEMAP_ALL, %o5
+       ta      HV_FAST_TRAP
+       retl
+        nop
+       .size   sun4v_mmu_demap_all, .-sun4v_mmu_demap_all
index 894b506f963673ec081b16845978719b3f3997ba..c39944927f1ac7f39f8ddb36671216ca6c2c0162 100644 (file)
@@ -476,7 +476,7 @@ static inline void spitfire_xcall_deliver(u64 data0, u64 data1, u64 data2, cpuma
  */
 static void cheetah_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t mask)
 {
-       u64 pstate, ver;
+       u64 pstate, ver, busy_mask;
        int nack_busy_id, is_jbus, need_more;
 
        if (cpus_empty(mask))
@@ -508,14 +508,20 @@ retry:
                               "i" (ASI_INTR_W));
 
        nack_busy_id = 0;
+       busy_mask = 0;
        {
                int i;
 
                for_each_cpu_mask(i, mask) {
                        u64 target = (i << 14) | 0x70;
 
-                       if (!is_jbus)
+                       if (is_jbus) {
+                               busy_mask |= (0x1UL << (i * 2));
+                       } else {
                                target |= (nack_busy_id << 24);
+                               busy_mask |= (0x1UL <<
+                                             (nack_busy_id * 2));
+                       }
                        __asm__ __volatile__(
                                "stxa   %%g0, [%0] %1\n\t"
                                "membar #Sync\n\t"
@@ -531,15 +537,16 @@ retry:
 
        /* Now, poll for completion. */
        {
-               u64 dispatch_stat;
+               u64 dispatch_stat, nack_mask;
                long stuck;
 
                stuck = 100000 * nack_busy_id;
+               nack_mask = busy_mask << 1;
                do {
                        __asm__ __volatile__("ldxa      [%%g0] %1, %0"
                                             : "=r" (dispatch_stat)
                                             : "i" (ASI_INTR_DISPATCH_STAT));
-                       if (dispatch_stat == 0UL) {
+                       if (!(dispatch_stat & (busy_mask | nack_mask))) {
                                __asm__ __volatile__("wrpr %0, 0x0, %%pstate"
                                                     : : "r" (pstate));
                                if (unlikely(need_more)) {
@@ -556,12 +563,12 @@ retry:
                        }
                        if (!--stuck)
                                break;
-               } while (dispatch_stat & 0x5555555555555555UL);
+               } while (dispatch_stat & busy_mask);
 
                __asm__ __volatile__("wrpr %0, 0x0, %%pstate"
                                     : : "r" (pstate));
 
-               if ((dispatch_stat & ~(0x5555555555555555UL)) == 0) {
+               if (dispatch_stat & busy_mask) {
                        /* Busy bits will not clear, continue instead
                         * of freezing up on this cpu.
                         */
index e18ccf85224f4fb4625660201b634c795454db8a..fbeb55d71e769a116f01a326b708144c3b1e0c54 100644 (file)
@@ -1133,14 +1133,9 @@ static void __init mark_kpte_bitmap(unsigned long start, unsigned long end)
        }
 }
 
-static void __init kernel_physical_mapping_init(void)
+static void __init init_kpte_bitmap(void)
 {
        unsigned long i;
-#ifdef CONFIG_DEBUG_PAGEALLOC
-       unsigned long mem_alloced = 0UL;
-#endif
-
-       read_obp_memory("reg", &pall[0], &pall_ents);
 
        for (i = 0; i < pall_ents; i++) {
                unsigned long phys_start, phys_end;
@@ -1149,14 +1144,24 @@ static void __init kernel_physical_mapping_init(void)
                phys_end = phys_start + pall[i].reg_size;
 
                mark_kpte_bitmap(phys_start, phys_end);
+       }
+}
 
+static void __init kernel_physical_mapping_init(void)
+{
 #ifdef CONFIG_DEBUG_PAGEALLOC
+       unsigned long i, mem_alloced = 0UL;
+
+       for (i = 0; i < pall_ents; i++) {
+               unsigned long phys_start, phys_end;
+
+               phys_start = pall[i].phys_addr;
+               phys_end = phys_start + pall[i].reg_size;
+
                mem_alloced += kernel_map_range(phys_start, phys_end,
                                                PAGE_KERNEL);
-#endif
        }
 
-#ifdef CONFIG_DEBUG_PAGEALLOC
        printk("Allocated %ld bytes for kernel page tables.\n",
               mem_alloced);
 
@@ -1398,6 +1403,10 @@ void __init paging_init(void)
        
        inherit_prom_mappings();
        
+       read_obp_memory("reg", &pall[0], &pall_ents);
+
+       init_kpte_bitmap();
+
        /* Ok, we can use our TLB miss and window trap handlers safely.  */
        setup_tba();
 
@@ -1904,7 +1913,9 @@ void __flush_tlb_all(void)
                             "wrpr      %0, %1, %%pstate"
                             : "=r" (pstate)
                             : "i" (PSTATE_IE));
-       if (tlb_type == spitfire) {
+       if (tlb_type == hypervisor) {
+               sun4v_mmu_demap_all();
+       } else if (tlb_type == spitfire) {
                for (i = 0; i < 64; i++) {
                        /* Spitfire Errata #32 workaround */
                        /* NOTE: Always runs on spitfire, so no
index 7d6be23eff89f49a81b5ce55c3f44596bd7e4d8c..8f7505d304b58790c077e4bc257380eccf523117 100644 (file)
@@ -125,7 +125,7 @@ static int acpi_battery_technology(struct acpi_battery *battery)
                return POWER_SUPPLY_TECHNOLOGY_NiMH;
        if (!strcasecmp("LION", battery->type))
                return POWER_SUPPLY_TECHNOLOGY_LION;
-       if (!strcasecmp("LI-ION", battery->type))
+       if (!strncasecmp("LI-ION", battery->type, 6))
                return POWER_SUPPLY_TECHNOLOGY_LION;
        if (!strcasecmp("LiP", battery->type))
                return POWER_SUPPLY_TECHNOLOGY_LIPO;
index ab04d848b19d9c2c42553e502e736119e4b6ff61..0822d9fc1cb4ef7d0ea2dbf69873505fef1cc41d 100644 (file)
@@ -38,9 +38,9 @@ ACPI_MODULE_NAME("numa");
 static nodemask_t nodes_found_map = NODE_MASK_NONE;
 
 /* maps to convert between proximity domain and logical node ID */
-static int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS]
+static int pxm_to_node_map[MAX_PXM_DOMAINS]
                                = { [0 ... MAX_PXM_DOMAINS - 1] = NID_INVAL };
-static int __cpuinitdata node_to_pxm_map[MAX_NUMNODES]
+static int node_to_pxm_map[MAX_NUMNODES]
                                = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL };
 
 int pxm_to_node(int pxm)
index 028969370bbf821d9c015353f5d0d69b0cebc2c9..388300de005d37df692f142649e0e1a1ab75d9c0 100644 (file)
@@ -294,9 +294,6 @@ int acpi_pci_unbind(struct acpi_device *device)
            acpi_get_data(device->handle, acpi_pci_data_handler,
                          (void **)&data);
        if (ACPI_FAILURE(status)) {
-               ACPI_EXCEPTION((AE_INFO, status,
-                               "Unable to get data from device %s",
-                               acpi_device_bid(device)));
                result = -ENODEV;
                goto end;
        }
index 6045cdbe176beafe7f250c65a0bf93b3fa428da7..22cb95b349e49835be4b28599b23864634b13221 100644 (file)
 #define ACPI_BATTERY_DIR_NAME          "BAT%i"
 #define ACPI_AC_DIR_NAME               "AC0"
 
-enum acpi_sbs_device_addr {
-       ACPI_SBS_CHARGER = 0x9,
-       ACPI_SBS_MANAGER = 0xa,
-       ACPI_SBS_BATTERY = 0xb,
-};
-
 #define ACPI_SBS_NOTIFY_STATUS         0x80
 #define ACPI_SBS_NOTIFY_INFO           0x81
 
@@ -539,7 +533,7 @@ static struct proc_dir_entry *acpi_battery_dir = NULL;
 
 static inline char *acpi_battery_units(struct acpi_battery *battery)
 {
-       return acpi_battery_mode(battery) ? " mWh" : " mAh";
+       return acpi_battery_mode(battery) ? " mW" : " mA";
 }
 
 
@@ -556,10 +550,10 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset)
        if (!battery->present)
                goto end;
 
-       seq_printf(seq, "design capacity:         %i%s\n",
+       seq_printf(seq, "design capacity:         %i%sh\n",
                   battery->design_capacity * acpi_battery_scale(battery),
                   acpi_battery_units(battery));
-       seq_printf(seq, "last full capacity:      %i%s\n",
+       seq_printf(seq, "last full capacity:      %i%sh\n",
                   battery->full_charge_capacity * acpi_battery_scale(battery),
                   acpi_battery_units(battery));
        seq_printf(seq, "battery technology:      rechargeable\n");
@@ -590,7 +584,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
 {
        struct acpi_battery *battery = seq->private;
        struct acpi_sbs *sbs = battery->sbs;
-       int result = 0;
+       int rate;
 
        mutex_lock(&sbs->lock);
        seq_printf(seq, "present:                 %s\n",
@@ -604,9 +598,12 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
        seq_printf(seq, "charging state:          %s\n",
                   (battery->current_now < 0) ? "discharging" :
                   ((battery->current_now > 0) ? "charging" : "charged"));
-       seq_printf(seq, "present rate:            %d mA\n",
-                  abs(battery->current_now) * acpi_battery_ipscale(battery));
-       seq_printf(seq, "remaining capacity:      %i%s\n",
+       rate = abs(battery->current_now) * acpi_battery_ipscale(battery);
+       rate *= (acpi_battery_mode(battery))?(battery->voltage_now *
+                       acpi_battery_vscale(battery)/1000):1;
+       seq_printf(seq, "present rate:            %d%s\n", rate,
+                  acpi_battery_units(battery));
+       seq_printf(seq, "remaining capacity:      %i%sh\n",
                   battery->capacity_now * acpi_battery_scale(battery),
                   acpi_battery_units(battery));
        seq_printf(seq, "present voltage:         %i mV\n",
@@ -614,7 +611,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
 
       end:
        mutex_unlock(&sbs->lock);
-       return result;
+       return 0;
 }
 
 static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
@@ -638,7 +635,7 @@ static int acpi_battery_read_alarm(struct seq_file *seq, void *offset)
        acpi_battery_get_alarm(battery);
        seq_printf(seq, "alarm:                   ");
        if (battery->alarm_capacity)
-               seq_printf(seq, "%i%s\n",
+               seq_printf(seq, "%i%sh\n",
                           battery->alarm_capacity *
                           acpi_battery_scale(battery),
                           acpi_battery_units(battery));
index 046d7c3ed3561d93e3eee36927abc3271ac6fd83..fd40b6a1d639693a9160080b736c4c8d86cb909e 100644 (file)
@@ -202,10 +202,9 @@ int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc)
 
 EXPORT_SYMBOL_GPL(acpi_smbus_unregister_callback);
 
-static void acpi_smbus_callback(void *context)
+static inline void acpi_smbus_callback(void *context)
 {
        struct acpi_smb_hc *hc = context;
-
        if (hc->callback)
                hc->callback(hc->context);
 }
@@ -214,6 +213,7 @@ static int smbus_alarm(void *context)
 {
        struct acpi_smb_hc *hc = context;
        union acpi_smb_status status;
+       u8 address;
        if (smb_hc_read(hc, ACPI_SMB_STATUS, &status.raw))
                return 0;
        /* Check if it is only a completion notify */
@@ -222,9 +222,18 @@ static int smbus_alarm(void *context)
        if (!status.fields.alarm)
                return 0;
        mutex_lock(&hc->lock);
+       smb_hc_read(hc, ACPI_SMB_ALARM_ADDRESS, &address);
+       status.fields.alarm = 0;
        smb_hc_write(hc, ACPI_SMB_STATUS, status.raw);
-       if (hc->callback)
-               acpi_os_execute(OSL_GPE_HANDLER, acpi_smbus_callback, hc);
+       /* We are only interested in events coming from known devices */
+       switch (address >> 1) {
+               case ACPI_SBS_CHARGER:
+               case ACPI_SBS_MANAGER:
+               case ACPI_SBS_BATTERY:
+                       acpi_os_execute(OSL_GPE_HANDLER,
+                                       acpi_smbus_callback, hc);
+               default:;
+       }
        mutex_unlock(&hc->lock);
        return 0;
 }
index 3bda3491a97bcdd9a1e42848822d6e86e59b0e7d..a57b0762dd7f4651e9adcc3a99b5e5d38dc5f71e 100644 (file)
@@ -16,6 +16,12 @@ enum acpi_smb_protocol {
 
 static const u8 SMBUS_PEC = 0x80;
 
+enum acpi_sbs_device_addr {
+       ACPI_SBS_CHARGER = 0x9,
+       ACPI_SBS_MANAGER = 0xa,
+       ACPI_SBS_BATTERY = 0xb,
+};
+
 typedef void (*smbus_alarm_callback)(void *context);
 
 extern int acpi_smbus_read(struct acpi_smb_hc *hc, u8 protocol, u8 address,
index 44a0d9ba9bd67268747d4ef9d6355981d0120f09..bd77e81e81c1ed00827db379766faae1485fe17d 100644 (file)
@@ -577,7 +577,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
        struct acpi_video_device_brightness *br = NULL;
 
 
-       memset(&device->cap, 0, 4);
+       memset(&device->cap, 0, sizeof(device->cap));
 
        if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_ADR", &h_dummy1))) {
                device->cap._ADR = 1;
@@ -697,7 +697,7 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video)
 {
        acpi_handle h_dummy1;
 
-       memset(&video->cap, 0, 4);
+       memset(&video->cap, 0, sizeof(video->cap));
        if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOS", &h_dummy1))) {
                video->cap._DOS = 1;
        }
index 8b12925fe7a41e7a54f846d1f64274c737a82009..f97e050338f04a0dd24431dafe194fb8600f3de9 100644 (file)
@@ -2689,7 +2689,7 @@ fore200e_init(struct fore200e* fore200e)
     return 0;
 }
 
-
+#ifdef CONFIG_ATM_FORE200E_PCA
 static int __devinit
 fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
 {
@@ -2756,7 +2756,6 @@ static void __devexit fore200e_pca_remove_one(struct pci_dev *pci_dev)
 }
 
 
-#ifdef CONFIG_ATM_FORE200E_PCA
 static struct pci_device_id fore200e_pca_tbl[] = {
     { PCI_VENDOR_ID_FORE, PCI_DEVICE_ID_FORE_PCA200E, PCI_ANY_ID, PCI_ANY_ID,
       0, 0, (unsigned long) &fore200e_bus[0] },
index a509b8d79781fe4c915a8444929348d758ad8c39..ef1ed5d701255e17037b9256ad3730a85cb95ef7 100644 (file)
@@ -543,28 +543,6 @@ config PPDEV
 
          If unsure, say N.
 
-config TIPAR
-       tristate "Texas Instruments parallel link cable support"
-       depends on PARPORT
-       ---help---
-         If you own a Texas Instruments graphing calculator and use a
-         parallel link cable, then you might be interested in this driver.
-
-         If you enable this driver, you will be able to communicate with
-         your calculator through a set of device nodes under /dev. The
-         main advantage of this driver is that you don't have to be root
-         to use this precise link cable (depending on the permissions on
-         the device nodes, though).
-
-         To compile this driver as a module, choose M here: the
-         module will be called tipar.
-
-         If you don't know what a parallel link cable is or what a Texas
-         Instruments graphing calculator is, then you probably don't need this
-         driver.
-
-         If unsure, say N.
-
 config HVC_DRIVER
        bool
        help
index e686fc925168a16614cb41ed3932554f3217d3df..8f45ca9235ad10fb41ece3d803d776843bb3ea53 100644 (file)
@@ -669,6 +669,7 @@ static int ipmi_ioctl(struct inode *inode, struct file *file,
                return 0;
 
        case WDIOC_SET_PRETIMEOUT:
+       case WDIOC_SETPRETIMEOUT:
                i = copy_from_user(&val, argp, sizeof(int));
                if (i)
                        return -EFAULT;
@@ -676,6 +677,7 @@ static int ipmi_ioctl(struct inode *inode, struct file *file,
                return ipmi_set_timeout(IPMI_SET_TIMEOUT_HB_IF_NECESSARY);
 
        case WDIOC_GET_PRETIMEOUT:
+       case WDIOC_GETPRETIMEOUT:
                i = copy_to_user(argp, &pretimeout, sizeof(pretimeout));
                if (i)
                        return -EFAULT;
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c
deleted file mode 100644 (file)
index cef55c4..0000000
+++ /dev/null
@@ -1,557 +0,0 @@
-/* Hey EMACS -*- linux-c -*-
- *
- * tipar - low level driver for handling a parallel link cable designed
- * for Texas Instruments graphing calculators (http://lpg.ticalc.org).
- * A part of the TiLP project.
- *
- * Copyright (C) 2000-2002, Romain Lievin <roms@lpg.ticalc.org>
- * under the terms of the GNU General Public License.
- *
- * Various fixes & clean-up from the Linux Kernel Mailing List
- * (Alan Cox, Richard B. Johnson, Christoph Hellwig).
- */
-
-/* This driver should, in theory, work with any parallel port that has an
- * appropriate low-level driver; all I/O is done through the parport
- * abstraction layer.
- *
- * If this driver is built into the kernel, you can configure it using the
- * kernel command-line.  For example:
- *
- *      tipar=timeout,delay       (set timeout and delay)
- *
- * If the driver is loaded as a module, similar functionality is available
- * using module parameters.  The equivalent of the above commands would be:
- *
- *      # insmod tipar timeout=15 delay=10
- */
-
-/* COMPATIBILITY WITH OLD KERNELS
- *
- * Usually, parallel cables were bound to ports at
- * particular I/O addresses, as follows:
- *
- *      tipar0             0x378
- *      tipar1             0x278
- *      tipar2             0x3bc
- *
- *
- * This driver, by default, binds tipar devices according to parport and
- * the minor number.
- *
- */
-#undef DEBUG                           /* change to #define to get debugging
-                                        * output - for pr_debug() */
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/errno.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/delay.h>
-#include <linux/fcntl.h>
-#include <linux/fs.h>
-#include <linux/init.h>
-#include <asm/uaccess.h>
-#include <linux/ioport.h>
-#include <asm/io.h>
-#include <linux/bitops.h>
-#include <linux/parport.h>             /* Our code depend on parport */
-#include <linux/device.h>
-
-/*
- * TI definitions
- */
-#include <linux/ticable.h>
-
-/*
- * Version Information
- */
-#define DRIVER_VERSION "1.19"
-#define DRIVER_AUTHOR  "Romain Lievin <roms@lpg.ticalc.org>"
-#define DRIVER_DESC    "Device driver for TI/PC parallel link cables"
-#define DRIVER_LICENSE "GPL"
-
-#define VERSION(ver,rel,seq) (((ver)<<16) | ((rel)<<8) | (seq))
-
-/* ----- global variables --------------------------------------------- */
-
-struct tipar_struct {
-       struct pardevice *dev;  /* Parport device entry */
-};
-
-#define PP_NO 3
-static struct tipar_struct table[PP_NO];
-
-static int delay = IO_DELAY;   /* inter-bit delay in microseconds */
-static int timeout = TIMAXTIME;        /* timeout in tenth of seconds     */
-
-static unsigned int tp_count;  /* tipar count */
-static unsigned long opened;   /* opened devices */
-
-static struct class *tipar_class;
-
-/* --- macros for parport access -------------------------------------- */
-
-#define r_dtr(x)        (parport_read_data(table[(x)].dev->port))
-#define r_str(x)        (parport_read_status(table[(x)].dev->port))
-#define w_ctr(x,y)      (parport_write_control(table[(x)].dev->port, (y)))
-#define w_dtr(x,y)      (parport_write_data(table[(x)].dev->port, (y)))
-
-/* --- setting states on the D-bus with the right timing: ------------- */
-
-static inline void
-outbyte(int value, int minor)
-{
-       w_dtr(minor, value);
-}
-
-static inline int
-inbyte(int minor)
-{
-       return (r_str(minor));
-}
-
-static inline void
-init_ti_parallel(int minor)
-{
-       outbyte(3, minor);
-}
-
-/* ----- global defines ----------------------------------------------- */
-
-#define START(x) { x = jiffies + (HZ * timeout) / 10; }
-#define WAIT(x)  { \
-  if (time_before((x), jiffies)) return -1; \
-  if (need_resched()) schedule(); }
-
-/* ----- D-bus bit-banging functions ---------------------------------- */
-
-/* D-bus protocol (45kbit/s max):
-                    1                 0                      0
-       _______        ______|______    __________|________    __________
-Red  :        ________      |      ____          |        ____
-       _        ____________|________      ______|__________       _____
-White:  ________            |        ______      |          _______
-*/
-
-/* Try to transmit a byte on the specified port (-1 if error). */
-static int
-put_ti_parallel(int minor, unsigned char data)
-{
-       unsigned int bit;
-       unsigned long max;
-
-       for (bit = 0; bit < 8; bit++) {
-               if (data & 1) {
-                       outbyte(2, minor);
-                       START(max);
-                       do {
-                               WAIT(max);
-                       } while (inbyte(minor) & 0x10);
-
-                       outbyte(3, minor);
-                       START(max);
-                       do {
-                               WAIT(max);
-                       } while (!(inbyte(minor) & 0x10));
-               } else {
-                       outbyte(1, minor);
-                       START(max);
-                       do {
-                               WAIT(max);
-                       } while (inbyte(minor) & 0x20);
-
-                       outbyte(3, minor);
-                       START(max);
-                       do {
-                               WAIT(max);
-                       } while (!(inbyte(minor) & 0x20));
-               }
-
-               data >>= 1;
-               udelay(delay);
-
-               if (need_resched())
-                       schedule();
-       }
-
-       return 0;
-}
-
-/* Receive a byte on the specified port or -1 if error. */
-static int
-get_ti_parallel(int minor)
-{
-       unsigned int bit;
-       unsigned char v, data = 0;
-       unsigned long max;
-
-       for (bit = 0; bit < 8; bit++) {
-               START(max);
-               do {
-                       WAIT(max);
-               } while ((v = inbyte(minor) & 0x30) == 0x30);
-
-               if (v == 0x10) {
-                       data = (data >> 1) | 0x80;
-                       outbyte(1, minor);
-                       START(max);
-                       do {
-                               WAIT(max);
-                       } while (!(inbyte(minor) & 0x20));
-                       outbyte(3, minor);
-               } else {
-                       data = data >> 1;
-                       outbyte(2, minor);
-                       START(max);
-                       do {
-                               WAIT(max);
-                       } while (!(inbyte(minor) & 0x10));
-                       outbyte(3, minor);
-               }
-
-               udelay(delay);
-               if (need_resched())
-                       schedule();
-       }
-
-       return (int) data;
-}
-
-/* Try to detect a parallel link cable on the specified port */
-static int
-probe_ti_parallel(int minor)
-{
-       int i;
-       int seq[] = { 0x00, 0x20, 0x10, 0x30 };
-       int data;
-
-       for (i = 3; i >= 0; i--) {
-               outbyte(3, minor);
-               outbyte(i, minor);
-               udelay(delay);
-               data = inbyte(minor) & 0x30;
-               pr_debug("tipar: Probing -> %i: 0x%02x 0x%02x\n", i,
-                       data, seq[i]);
-               if (data != seq[i]) {
-                       outbyte(3, minor);
-                       return -1;
-               }
-       }
-
-       outbyte(3, minor);
-       return 0;
-}
-
-/* ----- kernel module functions--------------------------------------- */
-
-static int
-tipar_open(struct inode *inode, struct file *file)
-{
-       unsigned int minor = iminor(inode) - TIPAR_MINOR;
-
-       if (tp_count == 0 || minor > tp_count - 1)
-               return -ENXIO;
-
-       if (test_and_set_bit(minor, &opened))
-               return -EBUSY;
-
-       if (!table[minor].dev) {
-               printk(KERN_ERR "%s: NULL device for minor %u\n",
-                               __FUNCTION__, minor);
-               return -ENXIO;
-       }
-       parport_claim_or_block(table[minor].dev);
-       init_ti_parallel(minor);
-       parport_release(table[minor].dev);
-
-       return nonseekable_open(inode, file);
-}
-
-static int
-tipar_close(struct inode *inode, struct file *file)
-{
-       unsigned int minor = iminor(inode) - TIPAR_MINOR;
-
-       if (minor > tp_count - 1)
-               return -ENXIO;
-
-       clear_bit(minor, &opened);
-
-       return 0;
-}
-
-static ssize_t
-tipar_write (struct file *file, const char __user *buf, size_t count,
-               loff_t * ppos)
-{
-       unsigned int minor = iminor(file->f_path.dentry->d_inode) - TIPAR_MINOR;
-       ssize_t n;
-
-       parport_claim_or_block(table[minor].dev);
-
-       for (n = 0; n < count; n++) {
-               unsigned char b;
-
-               if (get_user(b, buf + n)) {
-                       n = -EFAULT;
-                       goto out;
-               }
-
-               if (put_ti_parallel(minor, b) == -1) {
-                       init_ti_parallel(minor);
-                       n = -ETIMEDOUT;
-                       goto out;
-               }
-       }
-      out:
-       parport_release(table[minor].dev);
-       return n;
-}
-
-static ssize_t
-tipar_read(struct file *file, char __user *buf, size_t count, loff_t * ppos)
-{
-       int b = 0;
-       unsigned int minor = iminor(file->f_path.dentry->d_inode) - TIPAR_MINOR;
-       ssize_t retval = 0;
-       ssize_t n = 0;
-
-       if (count == 0)
-               return 0;
-
-       parport_claim_or_block(table[minor].dev);
-
-       while (n < count) {
-               b = get_ti_parallel(minor);
-               if (b == -1) {
-                       init_ti_parallel(minor);
-                       retval = -ETIMEDOUT;
-                       goto out;
-               } else {
-                       if (put_user(b, buf + n)) {
-                               retval = -EFAULT;
-                               break;
-                       } else
-                               retval = ++n;
-               }
-
-               /* Non-blocking mode : try again ! */
-               if (file->f_flags & O_NONBLOCK) {
-                       retval = -EAGAIN;
-                       goto out;
-               }
-
-               /* Signal pending, try again ! */
-               if (signal_pending(current)) {
-                       retval = -ERESTARTSYS;
-                       goto out;
-               }
-
-               if (need_resched())
-                       schedule();
-       }
-
-      out:
-       parport_release(table[minor].dev);
-       return retval;
-}
-
-static int
-tipar_ioctl(struct inode *inode, struct file *file,
-           unsigned int cmd, unsigned long arg)
-{
-       int retval = 0;
-
-       switch (cmd) {
-       case IOCTL_TIPAR_DELAY:
-               delay = (int)arg;    //get_user(delay, &arg);
-               break;
-       case IOCTL_TIPAR_TIMEOUT:
-               if (arg != 0)
-                        timeout = (int)arg;
-                else
-                        retval = -EINVAL;
-         break;
-       default:
-               retval = -ENOTTY;
-               break;
-       }
-
-       return retval;
-}
-
-/* ----- kernel module registering ------------------------------------ */
-
-static const struct file_operations tipar_fops = {
-       .owner = THIS_MODULE,
-       .llseek = no_llseek,
-       .read = tipar_read,
-       .write = tipar_write,
-       .ioctl = tipar_ioctl,
-       .open = tipar_open,
-       .release = tipar_close,
-};
-
-/* --- initialisation code ------------------------------------- */
-
-#ifndef MODULE
-/*      You must set these - there is no sane way to probe for this cable.
- *      You can use 'tipar=timeout,delay' to set these now. */
-static int __init
-tipar_setup(char *str)
-{
-       int ints[3];
-
-       str = get_options(str, ARRAY_SIZE(ints), ints);
-
-       if (ints[0] > 0) {
-               if (ints[1] != 0)
-                        timeout = ints[1];
-                else
-                        printk(KERN_WARNING "tipar: bad timeout value (0), "
-                               "using default value instead");
-               if (ints[0] > 1) {
-                       delay = ints[2];
-               }
-       }
-
-       return 1;
-}
-#endif
-
-/*
- * Register our module into parport.
- * Pass also 2 callbacks functions to parport: a pre-emptive function and an
- * interrupt handler function (unused).
- * Display a message such "tipar0: using parport0 (polling)".
- */
-static int
-tipar_register(int nr, struct parport *port)
-{
-       int err = 0;
-
-       /* Register our module into parport */
-       table[nr].dev = parport_register_device(port, "tipar",
-                                               NULL, NULL, NULL, 0,
-                                               (void *) &table[nr]);
-
-       if (table[nr].dev == NULL) {
-               err = 1;
-               goto out;
-       }
-
-       device_create(tipar_class, port->dev, MKDEV(TIPAR_MAJOR,
-                       TIPAR_MINOR + nr), "par%d", nr);
-
-       /* Display informations */
-       pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==
-               PARPORT_IRQ_NONE) ? "polling" : "interrupt-driven");
-
-       if (probe_ti_parallel(nr) != -1)
-               pr_info("tipar%d: link cable found\n", nr);
-       else
-               pr_info("tipar%d: link cable not found\n", nr);
-
-       err = 0;
-
-out:
-       return err;
-}
-
-static void
-tipar_attach(struct parport *port)
-{
-       if (tp_count == PP_NO) {
-               pr_info("tipar: ignoring parallel port (max. %d)\n", PP_NO);
-               return;
-       }
-
-       if (!tipar_register(tp_count, port))
-               tp_count++;
-}
-
-static void
-tipar_detach(struct parport *port)
-{
-       /* Nothing to do */
-}
-
-static struct parport_driver tipar_driver = {
-       .name = "tipar",
-       .attach = tipar_attach,
-       .detach = tipar_detach,
-};
-
-static int __init
-tipar_init_module(void)
-{
-       int err = 0;
-
-       pr_info("tipar: parallel link cable driver, version %s\n",
-               DRIVER_VERSION);
-
-       if (register_chrdev(TIPAR_MAJOR, "tipar", &tipar_fops)) {
-               printk(KERN_ERR "tipar: unable to get major %d\n", TIPAR_MAJOR);
-               err = -EIO;
-               goto out;
-       }
-
-       tipar_class = class_create(THIS_MODULE, "ticables");
-       if (IS_ERR(tipar_class)) {
-               err = PTR_ERR(tipar_class);
-               goto out_chrdev;
-       }
-       if (parport_register_driver(&tipar_driver)) {
-               printk(KERN_ERR "tipar: unable to register with parport\n");
-               err = -EIO;
-               goto out_class;
-       }
-
-       err = 0;
-       goto out;
-
-out_class:
-       class_destroy(tipar_class);
-
-out_chrdev:
-       unregister_chrdev(TIPAR_MAJOR, "tipar");
-out:
-       return err;     
-}
-
-static void __exit
-tipar_cleanup_module(void)
-{
-       unsigned int i;
-
-       /* Unregistering module */
-       parport_unregister_driver(&tipar_driver);
-
-       unregister_chrdev(TIPAR_MAJOR, "tipar");
-
-       for (i = 0; i < PP_NO; i++) {
-               if (table[i].dev == NULL)
-                       continue;
-               parport_unregister_device(table[i].dev);
-               device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i));
-       }
-       class_destroy(tipar_class);
-
-       pr_info("tipar: module unloaded\n");
-}
-
-/* --------------------------------------------------------------------- */
-
-__setup("tipar=", tipar_setup);
-module_init(tipar_init_module);
-module_exit(tipar_cleanup_module);
-
-MODULE_AUTHOR(DRIVER_AUTHOR);
-MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
-
-module_param(timeout, int, 0);
-MODULE_PARM_DESC(timeout, "Timeout (default=1.5 seconds)");
-module_param(delay, int, 0);
-MODULE_PARM_DESC(delay, "Inter-bit delay (default=10 microseconds)");
index bd7aaff35240c89bd48505b5543c8a56f9737c03..67679882ebef8f36d2722035c09b4f700c4105fd 100644 (file)
@@ -404,7 +404,7 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
                                                      DAVINCI_I2C_STR_REG,
                                                      w);
                        } else
-                               dev_err(dev->dev, "RDR IRQ while no"
+                               dev_err(dev->dev, "RDR IRQ while no "
                                        "data requested\n");
                        break;
 
@@ -423,7 +423,7 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
                                                      DAVINCI_I2C_IMR_REG,
                                                      w);
                        } else
-                               dev_err(dev->dev, "TDR IRQ while no data to"
+                               dev_err(dev->dev, "TDR IRQ while no data to "
                                        "send\n");
                        break;
 
index 44e1cd21bb0130ae1e4b0251893c451a630c4a6d..3ca19fc234fb45122be765f517288aa419b3d516 100644 (file)
@@ -140,6 +140,7 @@ static int __init i2c_gpio_probe(struct platform_device *pdev)
        adap->owner = THIS_MODULE;
        snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id);
        adap->algo_data = bit_data;
+       adap->class = I2C_CLASS_HWMON;
        adap->dev.parent = &pdev->dev;
 
        /*
index 89a30028ddb6e40d9cd00402936460e196a32f9b..cb55cf2ba1e91a4279f3406f34216b4a59f4094e 100644 (file)
@@ -203,7 +203,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
                while (!(omap_i2c_read_reg(dev, OMAP_I2C_SYSS_REG) &
                         OMAP_I2C_SYSS_RDONE)) {
                        if (time_after(jiffies, timeout)) {
-                               dev_warn(dev->dev, "timeout waiting"
+                               dev_warn(dev->dev, "timeout waiting "
                                                "for controller reset\n");
                                return -ETIMEDOUT;
                        }
@@ -483,7 +483,7 @@ omap_i2c_isr(int this_irq, void *dev_id)
                                        dev->buf_len--;
                                }
                        } else
-                               dev_err(dev->dev, "RRDY IRQ while no data"
+                               dev_err(dev->dev, "RRDY IRQ while no data "
                                                "requested\n");
                        omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RRDY);
                        continue;
@@ -498,7 +498,7 @@ omap_i2c_isr(int this_irq, void *dev_id)
                                        dev->buf_len--;
                                }
                        } else
-                               dev_err(dev->dev, "XRDY IRQ while no"
+                               dev_err(dev->dev, "XRDY IRQ while no "
                                        "data to send\n");
                        omap_i2c_write_reg(dev, OMAP_I2C_DATA_REG, w);
                        omap_i2c_ack_stat(dev, OMAP_I2C_STAT_XRDY);
index fe04e46991aa9911967c267166c4b11db944cc6f..b767603a07ba38d41c08269e727823c89b910c47 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/usb/ch9.h>
-#include <linux/usb_gadget.h>
+#include <linux/usb/gadget.h>
 #include <linux/usb.h>
 #include <linux/usb/otg.h>
 #include <linux/i2c.h>
index 45b22282f1498b071b6386225ca78afedd21433b..fb06555708a8d431734a99e0a1a85cf3f7178139 100644 (file)
@@ -390,7 +390,7 @@ config IDEPCI_PCIBUS_ORDER
 
 # TODO: split it on per host driver config options (or module parameters)
 config BLK_DEV_OFFBOARD
-       bool "Boot off-board chipsets first support"
+       bool "Boot off-board chipsets first support (DEPRECATED)"
        depends on BLK_DEV_IDEPCI && (BLK_DEV_AEC62XX || BLK_DEV_GENERIC || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_PDC202XX_NEW || BLK_DEV_PDC202XX_OLD || BLK_DEV_TC86C001)
        help
          Normally, IDE controllers built into the motherboard (on-board
@@ -410,6 +410,10 @@ config BLK_DEV_OFFBOARD
          Note that, if you do this, the order of the hd* devices will be
          rearranged which may require modification of fstab and other files.
 
+         Please also note that this method of assuring stable naming of
+         IDE devices is unreliable and use other means for achieving it
+         (i.e. udev).
+
          If in doubt, say N.
 
 config BLK_DEV_GENERIC
index 57a5f63d6ae3ed46be61de6660ddd4a96f9034d8..92ac658dac33458fba3b97f296df67556c7195e4 100644 (file)
@@ -1650,31 +1650,6 @@ static int cdrom_write_check_ireason(ide_drive_t *drive, int len, int ireason)
        return 1;
 }
 
-static void post_transform_command(struct request *req)
-{
-       u8 *c = req->cmd;
-       char *ibuf;
-
-       if (!blk_pc_request(req))
-               return;
-
-       if (req->bio)
-               ibuf = bio_data(req->bio);
-       else
-               ibuf = req->data;
-
-       if (!ibuf)
-               return;
-
-       /*
-        * set ansi-revision and response data as atapi
-        */
-       if (c[0] == GPCMD_INQUIRY) {
-               ibuf[2] |= 2;
-               ibuf[3] = (ibuf[3] & 0xf0) | 2;
-       }
-}
-
 typedef void (xfer_func_t)(ide_drive_t *, void *, u32);
 
 /*
@@ -1810,9 +1785,6 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
        return ide_started;
 
 end_request:
-       if (!rq->data_len)
-               post_transform_command(rq);
-
        spin_lock_irqsave(&ide_lock, flags);
        blkdev_dequeue_request(rq);
        end_that_request_last(rq, 1);
@@ -3049,12 +3021,7 @@ int ide_cdrom_probe_capabilities (ide_drive_t *drive)
         else   
                printk(" drive");
 
-       printk(", %dkB Cache", be16_to_cpu(cap.buffer_size));
-
-       if (drive->using_dma)
-               ide_dma_verbose(drive);
-
-       printk("\n");
+       printk(KERN_CONT ", %dkB Cache\n", be16_to_cpu(cap.buffer_size));
 
        return nslots;
 }
index 00123d99527ab72c28ce29fd5d2f08b558211e78..b1781908e1f2caffd4598a35c3037e1a60e59a85 100644 (file)
  *                and Andre Hedrick <andre@linux-ide.org>
  *
  * This is the IDE/ATA disk driver, as evolved from hd.c and ide.c.
- *
- * Version 1.00                move disk only code from ide.c to ide-disk.c
- *                     support optional byte-swapping of all data
- * Version 1.01                fix previous byte-swapping code
- * Version 1.02                remove ", LBA" from drive identification msgs
- * Version 1.03                fix display of id->buf_size for big-endian
- * Version 1.04                add /proc configurable settings and S.M.A.R.T support
- * Version 1.05                add capacity support for ATA3 >= 8GB
- * Version 1.06                get boot-up messages to show full cyl count
- * Version 1.07                disable door-locking if it fails
- * Version 1.08                fixed CHS/LBA translations for ATA4 > 8GB,
- *                     process of adding new ATA4 compliance.
- *                     fixed problems in allowing fdisk to see
- *                     the entire disk.
- * Version 1.09                added increment of rq->sector in ide_multwrite
- *                     added UDMA 3/4 reporting
- * Version 1.10                request queue changes, Ultra DMA 100
- * Version 1.11                added 48-bit lba
- * Version 1.12                adding taskfile io access method
- * Version 1.13                added standby and flush-cache for notifier
- * Version 1.14                added acoustic-wcache
- * Version 1.15                convert all calls to ide_raw_taskfile
- *                             since args will return register content.
- * Version 1.16                added suspend-resume-checkpower
- * Version 1.17                do flush on standby, do flush on ATA < ATA6
- *                     fix wcache setup.
  */
 
 #define IDEDISK_VERSION        "1.18"
@@ -961,11 +935,8 @@ static void idedisk_setup (ide_drive_t *drive)
        if (id->buf_size)
                printk (" w/%dKiB Cache", id->buf_size/2);
 
-       printk(", CHS=%d/%d/%d", 
-              drive->bios_cyl, drive->bios_head, drive->bios_sect);
-       if (drive->using_dma)
-               ide_dma_verbose(drive);
-       printk("\n");
+       printk(KERN_CONT ", CHS=%d/%d/%d\n",
+                        drive->bios_cyl, drive->bios_head, drive->bios_sect);
 
        /* write cache enabled? */
        if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5)))
index 0d795a1678c77fff37d57b1813eed8a079cff6f2..4703837bf1fcdab9b6523c2fa4d5ff70bccd50a3 100644 (file)
@@ -611,12 +611,6 @@ static int __ide_dma_test_irq(ide_drive_t *drive)
        ide_hwif_t *hwif        = HWIF(drive);
        u8 dma_stat             = hwif->INB(hwif->dma_status);
 
-#if 0  /* do not set unless you know what you are doing */
-       if (dma_stat & 4) {
-               u8 stat = hwif->INB(IDE_STATUS_REG);
-               hwif->OUTB(hwif->dma_status, dma_stat & 0xE4);
-       }
-#endif
        /* return 1 if INTR asserted */
        if ((dma_stat & 4) == 4)
                return 1;
@@ -753,10 +747,12 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode)
                        mode = XFER_MW_DMA_1;
        }
 
-       printk(KERN_DEBUG "%s: %s mode selected\n", drive->name,
+       mode = min(mode, req_mode);
+
+       printk(KERN_INFO "%s: %s mode selected\n", drive->name,
                          mode ? ide_xfer_verbose(mode) : "no DMA");
 
-       return min(mode, req_mode);
+       return mode;
 }
 
 EXPORT_SYMBOL_GPL(ide_find_dma_mode);
@@ -772,6 +768,9 @@ static int ide_tune_dma(ide_drive_t *drive)
        if (__ide_dma_bad_drive(drive))
                return 0;
 
+       if (ide_id_dma_bug(drive))
+               return 0;
+
        if (drive->hwif->host_flags & IDE_HFLAG_TRUST_BIOS_FOR_DMA)
                return config_drive_for_dma(drive);
 
@@ -806,58 +805,23 @@ static int ide_dma_check(ide_drive_t *drive)
        return vdma ? 0 : -1;
 }
 
-void ide_dma_verbose(ide_drive_t *drive)
+int ide_id_dma_bug(ide_drive_t *drive)
 {
-       struct hd_driveid *id   = drive->id;
-       ide_hwif_t *hwif        = HWIF(drive);
+       struct hd_driveid *id = drive->id;
 
        if (id->field_valid & 4) {
                if ((id->dma_ultra >> 8) && (id->dma_mword >> 8))
-                       goto bug_dma_off;
-               if (id->dma_ultra & ((id->dma_ultra >> 8) & hwif->ultra_mask)) {
-                       if (((id->dma_ultra >> 11) & 0x1F) &&
-                           eighty_ninty_three(drive)) {
-                               if ((id->dma_ultra >> 15) & 1) {
-                                       printk(", UDMA(mode 7)");
-                               } else if ((id->dma_ultra >> 14) & 1) {
-                                       printk(", UDMA(133)");
-                               } else if ((id->dma_ultra >> 13) & 1) {
-                                       printk(", UDMA(100)");
-                               } else if ((id->dma_ultra >> 12) & 1) {
-                                       printk(", UDMA(66)");
-                               } else if ((id->dma_ultra >> 11) & 1) {
-                                       printk(", UDMA(44)");
-                               } else
-                                       goto mode_two;
-                       } else {
-               mode_two:
-                               if ((id->dma_ultra >> 10) & 1) {
-                                       printk(", UDMA(33)");
-                               } else if ((id->dma_ultra >> 9) & 1) {
-                                       printk(", UDMA(25)");
-                               } else if ((id->dma_ultra >> 8) & 1) {
-                                       printk(", UDMA(16)");
-                               }
-                       }
-               } else {
-                       printk(", (U)DMA");     /* Can be BIOS-enabled! */
-               }
+                       goto err_out;
        } else if (id->field_valid & 2) {
                if ((id->dma_mword >> 8) && (id->dma_1word >> 8))
-                       goto bug_dma_off;
-               printk(", DMA");
-       } else if (id->field_valid & 1) {
-               goto bug_dma_off;
+                       goto err_out;
        }
-       return;
-bug_dma_off:
-       printk(", BUG DMA OFF");
-       hwif->dma_off_quietly(drive);
-       return;
+       return 0;
+err_out:
+       printk(KERN_ERR "%s: bad DMA info in identify block\n", drive->name);
+       return 1;
 }
 
-EXPORT_SYMBOL(ide_dma_verbose);
-
 int ide_set_dma(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = drive->hwif;
index db22d1ff4e559ff1eb2652de98b23e5c6ae22267..bef781fec5006d694069c614e2bda90ebec2b277 100644 (file)
@@ -970,7 +970,8 @@ static void ide_check_pm_state(ide_drive_t *drive, struct request *rq)
                if (rc)
                        printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name);
                SELECT_DRIVE(drive);
-               HWIF(drive)->OUTB(8, HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]);
+               if (IDE_CONTROL_REG)
+                       HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
                rc = ide_wait_not_busy(HWIF(drive), 100000);
                if (rc)
                        printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name);
index 5c3256180ae541f824f28042d8704bd24eacba79..cef405ddaf0e3191a2d0eadd3f63681284d9d31f 100644 (file)
@@ -748,6 +748,9 @@ int ide_driveid_update(ide_drive_t *drive)
                drive->id->dma_1word = id->dma_1word;
                /* anything more ? */
                kfree(id);
+
+               if (drive->using_dma && ide_id_dma_bug(drive))
+                       ide_dma_off(drive);
        }
 
        return 1;
index 1609b8604f567b8c976848e3a8e97f2861c27f2f..062d3bcb2471c4a3cd4a9a9c2ed17a5557a9ea39 100644 (file)
  *     Add common non I/O op stuff here. Make sure it has proper
  *     kernel-doc function headers or your patch will be rejected
  */
+
+static const char *udma_str[] =
+        { "UDMA/16", "UDMA/25",  "UDMA/33",  "UDMA/44",
+          "UDMA/66", "UDMA/100", "UDMA/133", "UDMA7" };
+static const char *mwdma_str[] =
+       { "MWDMA0", "MWDMA1", "MWDMA2" };
+static const char *swdma_str[] =
+       { "SWDMA0", "SWDMA1", "SWDMA2" };
+static const char *pio_str[] =
+       { "PIO0", "PIO1", "PIO2", "PIO3", "PIO4", "PIO5" };
 
 /**
  *     ide_xfer_verbose        -       return IDE mode names
- *     @xfer_rate: rate to name
+ *     @mode: transfer mode
  *
  *     Returns a constant string giving the name of the mode
  *     requested.
  */
 
-char *ide_xfer_verbose (u8 xfer_rate)
+const char *ide_xfer_verbose(u8 mode)
 {
-        switch(xfer_rate) {
-                case XFER_UDMA_7:      return("UDMA 7");
-                case XFER_UDMA_6:      return("UDMA 6");
-                case XFER_UDMA_5:      return("UDMA 5");
-                case XFER_UDMA_4:      return("UDMA 4");
-                case XFER_UDMA_3:      return("UDMA 3");
-                case XFER_UDMA_2:      return("UDMA 2");
-                case XFER_UDMA_1:      return("UDMA 1");
-                case XFER_UDMA_0:      return("UDMA 0");
-                case XFER_MW_DMA_2:    return("MW DMA 2");
-                case XFER_MW_DMA_1:    return("MW DMA 1");
-                case XFER_MW_DMA_0:    return("MW DMA 0");
-                case XFER_SW_DMA_2:    return("SW DMA 2");
-                case XFER_SW_DMA_1:    return("SW DMA 1");
-                case XFER_SW_DMA_0:    return("SW DMA 0");
-                case XFER_PIO_4:       return("PIO 4");
-                case XFER_PIO_3:       return("PIO 3");
-                case XFER_PIO_2:       return("PIO 2");
-                case XFER_PIO_1:       return("PIO 1");
-                case XFER_PIO_0:       return("PIO 0");
-                case XFER_PIO_SLOW:    return("PIO SLOW");
-                default:               return("XFER ERROR");
-        }
+       const char *s;
+       u8 i = mode & 0xf;
+
+       if (mode >= XFER_UDMA_0 && mode <= XFER_UDMA_7)
+               s = udma_str[i];
+       else if (mode >= XFER_MW_DMA_0 && mode <= XFER_MW_DMA_2)
+               s = mwdma_str[i];
+       else if (mode >= XFER_SW_DMA_0 && mode <= XFER_SW_DMA_2)
+               s = swdma_str[i];
+       else if (mode >= XFER_PIO_0 && mode <= XFER_PIO_5)
+               s = pio_str[i & 0x7];
+       else if (mode == XFER_PIO_SLOW)
+               s = "PIO SLOW";
+       else
+               s = "XFER ERROR";
+
+       return s;
 }
 
 EXPORT_SYMBOL(ide_xfer_verbose);
index ee848c7059954b091f14f200e89411ccfcd70109..2994523be7bf8ed508160bb3ab60c71467081da1 100644 (file)
  *
  * This is the IDE probe module, as evolved from hd.c and ide.c.
  *
- * Version 1.00                move drive probing code from ide.c to ide-probe.c
- * Version 1.01                fix compilation problem for m68k
- * Version 1.02                increase WAIT_PIDENTIFY to avoid CD-ROM locking at boot
- *                      by Andrea Arcangeli
- * Version 1.03                fix for (hwif->chipset == ide_4drives)
- * Version 1.04                fixed buggy treatments of known flash memory cards
- *
- * Version 1.05                fix for (hwif->chipset == ide_pdc4030)
- *                     added ide6/7/8/9
- *                     allowed for secondary flash card to be detectable
- *                      with new flag : drive->ata_flash : 1;
- * Version 1.06                stream line request queue and prep for cascade project.
- * Version 1.07                max_sect <= 255; slower disks would get behind and
- *                     then fall over when they get to 256.    Paul G.
- * Version 1.10                Update set for new IDE. drive->id is now always
- *                     valid after probe time even with noprobe
+ * -- increase WAIT_PIDENTIFY to avoid CD-ROM locking at boot
+ *      by Andrea Arcangeli
  */
 
 #include <linux/module.h>
@@ -667,7 +653,8 @@ static int wait_hwif_ready(ide_hwif_t *hwif)
                /* Ignore disks that we will not probe for later. */
                if (!drive->noprobe || drive->present) {
                        SELECT_DRIVE(drive);
-                       hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]);
+                       if (IDE_CONTROL_REG)
+                               hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
                        mdelay(2);
                        rc = ide_wait_not_busy(hwif, 35000);
                        if (rc)
index 674a65c1a1308986743237c46792a6c7661d1c7c..54943da6e4e5cfa45c80ac73a86f6c9de3a10769 100644 (file)
@@ -800,11 +800,17 @@ int set_io_32bit(ide_drive_t *drive, int arg)
        if (arg < 0 || arg > 1 + (SUPPORT_VLB_SYNC << 1))
                return -EINVAL;
 
+       if (ide_spin_wait_hwgroup(drive))
+               return -EBUSY;
+
        drive->io_32bit = arg;
 #ifdef CONFIG_BLK_DEV_DTC2278
        if (HWIF(drive)->chipset == ide_dtc2278)
                HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg;
 #endif /* CONFIG_BLK_DEV_DTC2278 */
+
+       spin_unlock_irq(&ide_lock);
+
        return 0;
 }
 
@@ -1670,10 +1676,34 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
        return sprintf(buf, "ide:m-%s\n", media_string(drive));
 }
 
+static ssize_t model_show(struct device *dev, struct device_attribute *attr,
+                         char *buf)
+{
+       ide_drive_t *drive = to_ide_device(dev);
+       return sprintf(buf, "%s\n", drive->id->model);
+}
+
+static ssize_t firmware_show(struct device *dev, struct device_attribute *attr,
+                            char *buf)
+{
+       ide_drive_t *drive = to_ide_device(dev);
+       return sprintf(buf, "%s\n", drive->id->fw_rev);
+}
+
+static ssize_t serial_show(struct device *dev, struct device_attribute *attr,
+                          char *buf)
+{
+       ide_drive_t *drive = to_ide_device(dev);
+       return sprintf(buf, "%s\n", drive->id->serial_no);
+}
+
 static struct device_attribute ide_dev_attrs[] = {
        __ATTR_RO(media),
        __ATTR_RO(drivename),
        __ATTR_RO(modalias),
+       __ATTR_RO(model),
+       __ATTR_RO(firmware),
+       __ATTR(serial, 0400, serial_show, NULL),
        __ATTR_NULL
 };
 
index 5682895d36d997d556bc442a2399e4ccdb30ab70..9fce25bdec8acc192ec2e4108098da8dfbe8683a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/pci/hpt366.c              Version 1.21    Oct 23, 2007
+ * linux/drivers/ide/pci/hpt366.c              Version 1.22    Dec 4, 2007
  *
  * Copyright (C) 1999-2003             Andre Hedrick <andre@linux-ide.org>
  * Portions Copyright (C) 2001         Sun Microsystems, Inc.
@@ -310,6 +310,8 @@ static u32 twenty_five_base_hpt36x[] = {
        /* XFER_PIO_0 */        0xc0d08585
 };
 
+#if 0
+/* These are the timing tables from the HighPoint open source drivers... */
 static u32 thirty_three_base_hpt37x[] = {
        /* XFER_UDMA_6 */       0x12446231,     /* 0x12646231 ?? */
        /* XFER_UDMA_5 */       0x12446231,
@@ -369,6 +371,73 @@ static u32 sixty_six_base_hpt37x[] = {
        /* XFER_PIO_1 */        0x0d029d26,
        /* XFER_PIO_0 */        0x0d029d5e
 };
+#else
+/*
+ * The following are the new timing tables with PIO mode data/taskfile transfer
+ * overclocking fixed...
+ */
+
+/* This table is taken from the HPT370 data manual rev. 1.02 */
+static u32 thirty_three_base_hpt37x[] = {
+       /* XFER_UDMA_6 */       0x16455031,     /* 0x16655031 ?? */
+       /* XFER_UDMA_5 */       0x16455031,
+       /* XFER_UDMA_4 */       0x16455031,
+       /* XFER_UDMA_3 */       0x166d5031,
+       /* XFER_UDMA_2 */       0x16495031,
+       /* XFER_UDMA_1 */       0x164d5033,
+       /* XFER_UDMA_0 */       0x16515097,
+
+       /* XFER_MW_DMA_2 */     0x26515031,
+       /* XFER_MW_DMA_1 */     0x26515033,
+       /* XFER_MW_DMA_0 */     0x26515097,
+
+       /* XFER_PIO_4 */        0x06515021,
+       /* XFER_PIO_3 */        0x06515022,
+       /* XFER_PIO_2 */        0x06515033,
+       /* XFER_PIO_1 */        0x06915065,
+       /* XFER_PIO_0 */        0x06d1508a
+};
+
+static u32 fifty_base_hpt37x[] = {
+       /* XFER_UDMA_6 */       0x1a861842,
+       /* XFER_UDMA_5 */       0x1a861842,
+       /* XFER_UDMA_4 */       0x1aae1842,
+       /* XFER_UDMA_3 */       0x1a8e1842,
+       /* XFER_UDMA_2 */       0x1a0e1842,
+       /* XFER_UDMA_1 */       0x1a161854,
+       /* XFER_UDMA_0 */       0x1a1a18ea,
+
+       /* XFER_MW_DMA_2 */     0x2a821842,
+       /* XFER_MW_DMA_1 */     0x2a821854,
+       /* XFER_MW_DMA_0 */     0x2a8218ea,
+
+       /* XFER_PIO_4 */        0x0a821842,
+       /* XFER_PIO_3 */        0x0a821843,
+       /* XFER_PIO_2 */        0x0a821855,
+       /* XFER_PIO_1 */        0x0ac218a8,
+       /* XFER_PIO_0 */        0x0b02190c
+};
+
+static u32 sixty_six_base_hpt37x[] = {
+       /* XFER_UDMA_6 */       0x1c86fe62,
+       /* XFER_UDMA_5 */       0x1caefe62,     /* 0x1c8afe62 */
+       /* XFER_UDMA_4 */       0x1c8afe62,
+       /* XFER_UDMA_3 */       0x1c8efe62,
+       /* XFER_UDMA_2 */       0x1c92fe62,
+       /* XFER_UDMA_1 */       0x1c9afe62,
+       /* XFER_UDMA_0 */       0x1c82fe62,
+
+       /* XFER_MW_DMA_2 */     0x2c82fe62,
+       /* XFER_MW_DMA_1 */     0x2c82fe66,
+       /* XFER_MW_DMA_0 */     0x2c82ff2e,
+
+       /* XFER_PIO_4 */        0x0c82fe62,
+       /* XFER_PIO_3 */        0x0c82fe84,
+       /* XFER_PIO_2 */        0x0c82fea6,
+       /* XFER_PIO_1 */        0x0d02ff26,
+       /* XFER_PIO_0 */        0x0d42ff7f
+};
+#endif
 
 #define HPT366_DEBUG_DRIVE_INFO                0
 #define HPT371_ALLOW_ATA133_6          1
index 4234efeba606750d9b4d7e4cc5ad95aaea57faba..2b4f44e45a1a370936300b4c7900f0dbf49f0148 100644 (file)
@@ -482,8 +482,9 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)
 {
        struct pci_dev *dev2;
 
-       dev2 = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn) + 2,
+       dev2 = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn) + 1,
                                                PCI_FUNC(dev->devfn)));
+
        if (dev2 &&
            dev2->vendor == dev->vendor &&
            dev2->device == dev->device) {
index 25fd090532206197212576093088ebbcbeced62b..d2cd5a3d38f82e6a18b12024cf7ad14777eb5612 100644 (file)
@@ -704,7 +704,7 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_devices);
 /*
  *     Module interfaces
  */
+
 static int pre_init = 1;               /* Before first ordered IDE scan */
 static LIST_HEAD(ide_pci_drivers);
 
@@ -714,7 +714,7 @@ static LIST_HEAD(ide_pci_drivers);
  *     @module: owner module of the driver
  *
  *     Registers a driver with the IDE layer. The IDE layer arranges that
- *     boot time setup is done in the expected device order and then 
+ *     boot time setup is done in the expected device order and then
  *     hands the controllers off to the core PCI code to do the rest of
  *     the work.
  *
@@ -724,13 +724,12 @@ static LIST_HEAD(ide_pci_drivers);
 int __ide_pci_register_driver(struct pci_driver *driver, struct module *module,
                              const char *mod_name)
 {
-       if(!pre_init)
+       if (!pre_init)
                return __pci_register_driver(driver, module, mod_name);
        driver->driver.owner = module;
        list_add_tail(&driver->node, &ide_pci_drivers);
        return 0;
 }
-
 EXPORT_SYMBOL_GPL(__ide_pci_register_driver);
 
 /**
@@ -741,17 +740,18 @@ EXPORT_SYMBOL_GPL(__ide_pci_register_driver);
  *     This is only used during boot up to get the ordering correct. After
  *     boot up the pci layer takes over the job.
  */
+
 static int __init ide_scan_pcidev(struct pci_dev *dev)
 {
        struct list_head *l;
        struct pci_driver *d;
-       
+
        list_for_each(l, &ide_pci_drivers) {
                d = list_entry(l, struct pci_driver, node);
                if (d->id_table) {
-                       const struct pci_device_id *id = pci_match_id(d->id_table,
-                                                                     dev);
+                       const struct pci_device_id *id =
+                               pci_match_id(d->id_table, dev);
+
                        if (id != NULL && d->probe(dev, id) >= 0) {
                                dev->driver = d;
                                pci_dev_get(dev);
@@ -779,13 +779,13 @@ void __init ide_scan_pcibus (int scan_direction)
 
        pre_init = 0;
        if (!scan_direction)
-               while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
+               while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)))
                        ide_scan_pcidev(dev);
        else
-               while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID, dev))
-                      != NULL)
+               while ((dev = pci_get_device_reverse(PCI_ANY_ID, PCI_ANY_ID,
+                                                    dev)))
                        ide_scan_pcidev(dev);
-       
+
        /*
         *      Hand the drivers over to the PCI layer now we
         *      are post init.
@@ -794,9 +794,10 @@ void __init ide_scan_pcibus (int scan_direction)
        list_for_each_safe(l, n, &ide_pci_drivers) {
                list_del(l);
                d = list_entry(l, struct pci_driver, node);
-               if (__pci_register_driver(d, d->driver.owner, d->driver.mod_name))
-                       printk(KERN_ERR "%s: failed to register driver for %s\n",
-                              __FUNCTION__, d->driver.mod_name);
+               if (__pci_register_driver(d, d->driver.owner,
+                                         d->driver.mod_name))
+                       printk(KERN_ERR "%s: failed to register %s driver\n",
+                                       __FUNCTION__, d->driver.mod_name);
        }
 }
 #endif
index 87f12d4312a70be74fd5d68196793ec869cdf033..74d2b72a11d833851f72da709b328eafe6373272 100644 (file)
@@ -322,6 +322,7 @@ extern int ehca_static_rate;
 extern int ehca_port_act_time;
 extern int ehca_use_hp_mr;
 extern int ehca_scaling_code;
+extern int ehca_lock_hcalls;
 
 struct ipzu_queue_resp {
        u32 qe_size;      /* queue entry size */
index 90d4334179bf2e5466a108c184af10e6d9ecd59b..6a56d86a295105549c0a41205601f7b6c1fd8106 100644 (file)
 #ifdef CONFIG_PPC_64K_PAGES
 #include <linux/slab.h>
 #endif
+
 #include "ehca_classes.h"
 #include "ehca_iverbs.h"
 #include "ehca_mrmw.h"
 #include "ehca_tools.h"
 #include "hcp_if.h"
 
-#define HCAD_VERSION "0024"
+#define HCAD_VERSION "0025"
 
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_AUTHOR("Christoph Raisch <raisch@de.ibm.com>");
@@ -66,6 +67,7 @@ int ehca_poll_all_eqs  = 1;
 int ehca_static_rate   = -1;
 int ehca_scaling_code  = 0;
 int ehca_mr_largepage  = 1;
+int ehca_lock_hcalls   = -1;
 
 module_param_named(open_aqp1,     ehca_open_aqp1,     int, S_IRUGO);
 module_param_named(debug_level,   ehca_debug_level,   int, S_IRUGO);
@@ -77,6 +79,7 @@ module_param_named(poll_all_eqs,  ehca_poll_all_eqs,  int, S_IRUGO);
 module_param_named(static_rate,   ehca_static_rate,   int, S_IRUGO);
 module_param_named(scaling_code,  ehca_scaling_code,  int, S_IRUGO);
 module_param_named(mr_largepage,  ehca_mr_largepage,  int, S_IRUGO);
+module_param_named(lock_hcalls,   ehca_lock_hcalls,   bool, S_IRUGO);
 
 MODULE_PARM_DESC(open_aqp1,
                 "AQP1 on startup (0: no (default), 1: yes)");
@@ -102,6 +105,9 @@ MODULE_PARM_DESC(scaling_code,
 MODULE_PARM_DESC(mr_largepage,
                 "use large page for MR (0: use PAGE_SIZE (default), "
                 "1: use large page depending on MR size");
+MODULE_PARM_DESC(lock_hcalls,
+                "serialize all hCalls made by the driver "
+                "(default: autodetect)");
 
 DEFINE_RWLOCK(ehca_qp_idr_lock);
 DEFINE_RWLOCK(ehca_cq_idr_lock);
@@ -258,6 +264,7 @@ static struct cap_descr {
        { HCA_CAP_UD_LL_QP, "HCA_CAP_UD_LL_QP" },
        { HCA_CAP_RESIZE_MR, "HCA_CAP_RESIZE_MR" },
        { HCA_CAP_MINI_QP, "HCA_CAP_MINI_QP" },
+       { HCA_CAP_H_ALLOC_RES_SYNC, "HCA_CAP_H_ALLOC_RES_SYNC" },
 };
 
 static int ehca_sense_attributes(struct ehca_shca *shca)
@@ -333,6 +340,12 @@ static int ehca_sense_attributes(struct ehca_shca *shca)
                if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca->hca_cap))
                        ehca_gen_dbg("   %s", hca_cap_descr[i].descr);
 
+       /* Autodetect hCall locking -- the "H_ALLOC_RESOURCE synced" flag is
+        * a firmware property, so it's valid across all adapters
+        */
+       if (ehca_lock_hcalls == -1)
+               ehca_lock_hcalls = !(shca->hca_cap & HCA_CAP_H_ALLOC_RES_SYNC);
+
        /* translate supported MR page sizes; always support 4K */
        shca->hca_cap_mr_pgsize = EHCA_PAGESIZE;
        if (ehca_mr_largepage) { /* support extra sizes only if enabled */
index dd126681fed095dc7dd58eb674c6dd08e0f80c94..eff5fb55604b4c5b218a693bf61eef9bc0c0063b 100644 (file)
@@ -838,7 +838,7 @@ struct ib_srq *ehca_create_srq(struct ib_pd *pd,
 
        /* copy back return values */
        srq_init_attr->attr.max_wr = qp_init_attr.cap.max_recv_wr;
-       srq_init_attr->attr.max_sge = qp_init_attr.cap.max_recv_sge;
+       srq_init_attr->attr.max_sge = 3;
 
        /* drive SRQ into RTR state */
        mqpcb = ehca_alloc_fw_ctrlblock(GFP_KERNEL);
@@ -1750,7 +1750,7 @@ int ehca_query_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr)
        }
 
        srq_attr->max_wr = qpcb->max_nr_outst_recv_wr - 1;
-       srq_attr->max_sge = qpcb->actual_nr_sges_in_rq_wqe;
+       srq_attr->max_sge = 3;
        srq_attr->srq_limit = EHCA_BMASK_GET(
                MQPCB_CURR_SRQ_LIMIT, qpcb->curr_srq_limit);
 
index c16a21374bb5a3c222a73147c28584cb871ab619..7029aa6537517b043321004a4da114590c5ca04f 100644 (file)
@@ -120,26 +120,21 @@ static long ehca_plpar_hcall_norets(unsigned long opcode,
                                    unsigned long arg7)
 {
        long ret;
-       int i, sleep_msecs, do_lock;
-       unsigned long flags;
+       int i, sleep_msecs;
+       unsigned long flags = 0;
 
        ehca_gen_dbg("opcode=%lx " HCALL7_REGS_FORMAT,
                     opcode, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
 
-       /* lock H_FREE_RESOURCE(MR) against itself and H_ALLOC_RESOURCE(MR) */
-       if ((opcode == H_FREE_RESOURCE) && (arg7 == 5)) {
-               arg7 = 0; /* better not upset firmware */
-               do_lock = 1;
-       }
-
        for (i = 0; i < 5; i++) {
-               if (do_lock)
+               /* serialize hCalls to work around firmware issue */
+               if (ehca_lock_hcalls)
                        spin_lock_irqsave(&hcall_lock, flags);
 
                ret = plpar_hcall_norets(opcode, arg1, arg2, arg3, arg4,
                                         arg5, arg6, arg7);
 
-               if (do_lock)
+               if (ehca_lock_hcalls)
                        spin_unlock_irqrestore(&hcall_lock, flags);
 
                if (H_IS_LONG_BUSY(ret)) {
@@ -174,24 +169,22 @@ static long ehca_plpar_hcall9(unsigned long opcode,
                              unsigned long arg9)
 {
        long ret;
-       int i, sleep_msecs, do_lock;
+       int i, sleep_msecs;
        unsigned long flags = 0;
 
        ehca_gen_dbg("INPUT -- opcode=%lx " HCALL9_REGS_FORMAT, opcode,
                     arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
 
-       /* lock H_ALLOC_RESOURCE(MR) against itself and H_FREE_RESOURCE(MR) */
-       do_lock = ((opcode == H_ALLOC_RESOURCE) && (arg2 == 5));
-
        for (i = 0; i < 5; i++) {
-               if (do_lock)
+               /* serialize hCalls to work around firmware issue */
+               if (ehca_lock_hcalls)
                        spin_lock_irqsave(&hcall_lock, flags);
 
                ret = plpar_hcall9(opcode, outs,
                                   arg1, arg2, arg3, arg4, arg5,
                                   arg6, arg7, arg8, arg9);
 
-               if (do_lock)
+               if (ehca_lock_hcalls)
                        spin_unlock_irqrestore(&hcall_lock, flags);
 
                if (H_IS_LONG_BUSY(ret)) {
@@ -821,7 +814,7 @@ u64 hipz_h_free_resource_mr(const struct ipz_adapter_handle adapter_handle,
        return ehca_plpar_hcall_norets(H_FREE_RESOURCE,
                                       adapter_handle.handle,    /* r4 */
                                       mr->ipz_mr_handle.handle, /* r5 */
-                                      0, 0, 0, 0, 5);
+                                      0, 0, 0, 0, 0);
 }
 
 u64 hipz_h_reregister_pmr(const struct ipz_adapter_handle adapter_handle,
index 485b8400359e756898f864f767695e3292affe35..bf996c7acc4202afa0bf0815be87deb16b6055b3 100644 (file)
@@ -378,6 +378,7 @@ struct hipz_query_hca {
 #define HCA_CAP_UD_LL_QP              EHCA_BMASK_IBM(16, 16)
 #define HCA_CAP_RESIZE_MR             EHCA_BMASK_IBM(17, 17)
 #define HCA_CAP_MINI_QP               EHCA_BMASK_IBM(18, 18)
+#define HCA_CAP_H_ALLOC_RES_SYNC      EHCA_BMASK_IBM(19, 19)
 
 /* query port response block */
 struct hipz_query_port {
index 8fa19939c2b6e5878bdfd29158d92a08be3dccf2..8cf91353b56afa82e64b48324a9c5e6aea65494b 100644 (file)
@@ -3,6 +3,6 @@
 #
 
 obj-y := common/
-obj-$(CONFIG_VIDEO_DEV) += video/
+obj-y += video/
 obj-$(CONFIG_VIDEO_DEV) += radio/
 obj-$(CONFIG_DVB_CORE)  += dvb/
index f245a3b2ef470e6819fcdc90d1458372646fa198..ae36d101006b6d0600898b76af319b95d90c1c31 100644 (file)
@@ -1205,13 +1205,10 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
                DEB_D(("VIDIOCGMBUF \n"));
 
                q = &fh->video_q;
-               mutex_lock(&q->lock);
                err = videobuf_mmap_setup(q,gbuffers,gbufsize,
                                          V4L2_MEMORY_MMAP);
-               if (err < 0) {
-                       mutex_unlock(&q->lock);
+               if (err < 0)
                        return err;
-               }
 
                gbuffers = err;
                memset(mbuf,0,sizeof(*mbuf));
@@ -1219,7 +1216,6 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
                mbuf->size   = gbuffers * gbufsize;
                for (i = 0; i < gbuffers; i++)
                        mbuf->offsets[i] = i * gbufsize;
-               mutex_unlock(&q->lock);
                return 0;
        }
 #endif
@@ -1440,10 +1436,7 @@ static void video_close(struct saa7146_dev *dev, struct file *file)
                err = saa7146_stop_preview(fh);
        }
 
-       // release all capture buffers
-       mutex_lock(&q->lock);
-       videobuf_read_stop(q);
-       mutex_unlock(&q->lock);
+       videobuf_stop(q);
 
        /* hmm, why is this function declared void? */
        /* return err */
index 73ac0a93fdebdfe2a68af50c2798a046c7d59b56..60a910052c16fa0c0488214b5daadd36782e38a5 100644 (file)
@@ -62,3 +62,6 @@ dvb-usb-af9005-remote-objs = af9005-remote.o
 obj-$(CONFIG_DVB_USB_AF9005_REMOTE) += dvb-usb-af9005-remote.o
 
 EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
+# due to tuner-xc3028
+EXTRA_CFLAGS += -Idrivers/media/video
+
index 9a184da01c47385ae4772c3a2ce45774b4b7a807..8ee6cd4da9e7c1053099792ef5ec0700bbd29ccf 100644 (file)
@@ -223,6 +223,9 @@ static struct dibx000_agc_config dib3000p_panasonic_agc_config = {
        .agc2_slope2 = 0x1e,
 };
 
+#if defined(CONFIG_DVB_DIB3000MC) ||                                   \
+       (defined(CONFIG_DVB_DIB3000MC_MODULE) && defined(MODULE))
+
 static struct dib3000mc_config mod3000p_dib3000p_config = {
        &dib3000p_panasonic_agc_config,
 
@@ -305,6 +308,7 @@ int dibusb_dib3000mc_tuner_attach(struct dvb_usb_adapter *adap)
        return 0;
 }
 EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach);
+#endif
 
 /*
  * common remote control stuff
index 8dee7ec9456ae02d919581fb1a034ff5f8a51dff..562d9208857ab25290c5f7fdd0f4b7c6b0e86380 100644 (file)
@@ -107,7 +107,7 @@ static struct vsb_snr_tab {
        u16     val;
        u16     data;
 } vsb_snr_tab[] = {
-       { 1023, 770, },
+       {  924, 300, },
        {  923, 300, },
        {  918, 295, },
        {  915, 290, },
@@ -154,6 +154,7 @@ static struct qam64_snr_tab {
        u16     val;
        u16     data;
 } qam64_snr_tab[] = {
+       {    1,   0, },
        {   12, 300, },
        {   15, 290, },
        {   18, 280, },
@@ -217,6 +218,7 @@ static struct qam64_snr_tab {
        {   95, 202, },
        {   96, 201, },
        {  104, 200, },
+       {  255,   0, },
 };
 
 /* QAM256 SNR lookup table */
@@ -224,6 +226,7 @@ static struct qam256_snr_tab {
        u16     val;
        u16     data;
 } qam256_snr_tab[] = {
+       {    1,   0, },
        {   12, 400, },
        {   13, 390, },
        {   15, 380, },
@@ -292,6 +295,7 @@ static struct qam256_snr_tab {
        {  105, 262, },
        {  106, 261, },
        {  110, 260, },
+       {  255,   0, },
 };
 
 /* 8 bit registers, 16 bit values */
@@ -670,14 +674,15 @@ static int s5h1409_read_snr(struct dvb_frontend* fe, u16* snr)
        u16 reg;
        dprintk("%s()\n", __FUNCTION__);
 
-       reg = s5h1409_readreg(state, 0xf1) & 0x1ff;
-
        switch(state->current_modulation) {
        case QAM_64:
+               reg = s5h1409_readreg(state, 0xf0) & 0xff;
                return s5h1409_qam64_lookup_snr(fe, snr, reg);
        case QAM_256:
+               reg = s5h1409_readreg(state, 0xf0) & 0xff;
                return s5h1409_qam256_lookup_snr(fe, snr, reg);
        case VSB_8:
+               reg = s5h1409_readreg(state, 0xf1) & 0x3ff;
                return s5h1409_vsb_lookup_snr(fe, snr, reg);
        default:
                break;
index 9a8ddc537f8f338d9c055d186321a499d66e1b4c..9d26ace651518389d1cbd3255ee6b05ef83eba34 100644 (file)
@@ -158,7 +158,7 @@ static int tda10086_init(struct dvb_frontend* fe)
        tda10086_write_byte(state, 0x3d, 0x80);
 
        // setup SEC
-       tda10086_write_byte(state, 0x36, 0x00); // all SEC off
+       tda10086_write_byte(state, 0x36, 0x80); // all SEC off, no 22k tone
        tda10086_write_byte(state, 0x34, (((1<<19) * (22000/1000)) / (SACLK/1000)));      // } tone frequency
        tda10086_write_byte(state, 0x35, (((1<<19) * (22000/1000)) / (SACLK/1000)) >> 8); // }
 
@@ -183,13 +183,13 @@ static int tda10086_set_tone (struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
 
        dprintk ("%s\n", __FUNCTION__);
 
-       switch(tone) {
+       switch (tone) {
        case SEC_TONE_OFF:
-               tda10086_write_byte(state, 0x36, 0x00);
+               tda10086_write_byte(state, 0x36, 0x80);
                break;
 
        case SEC_TONE_ON:
-               tda10086_write_byte(state, 0x36, 0x01);
+               tda10086_write_byte(state, 0x36, 0x81);
                break;
        }
 
@@ -212,7 +212,7 @@ static int tda10086_send_master_cmd (struct dvb_frontend* fe,
        for(i=0; i< cmd->msg_len; i++) {
                tda10086_write_byte(state, 0x48+i, cmd->msg[i]);
        }
-       tda10086_write_byte(state, 0x36, 0x08 | ((cmd->msg_len - 1) << 4));
+       tda10086_write_byte(state, 0x36, 0x88 | ((cmd->msg_len - 1) << 4));
 
        tda10086_diseqc_wait(state);
 
@@ -230,11 +230,11 @@ static int tda10086_send_burst (struct dvb_frontend* fe, fe_sec_mini_cmd_t minic
 
        switch(minicmd) {
        case SEC_MINI_A:
-               tda10086_write_byte(state, 0x36, 0x04);
+               tda10086_write_byte(state, 0x36, 0x84);
                break;
 
        case SEC_MINI_B:
-               tda10086_write_byte(state, 0x36, 0x06);
+               tda10086_write_byte(state, 0x36, 0x86);
                break;
        }
 
index a97a7fd2c89132a596027619d8e3e9fbfedc6be9..0106df4c55e827da3410630463888b7bcecda789 100644 (file)
@@ -122,7 +122,7 @@ static void zl10353_calc_nominal_rate(struct dvb_frontend *fe,
                                      enum fe_bandwidth bandwidth,
                                      u16 *nominal_rate)
 {
-       u32 adc_clock = 22528; /* 20.480 MHz on the board(!?) */
+       u32 adc_clock = 45056; /* 45.056 MHz */
        u8 bw;
        struct zl10353_state *state = fe->demodulator_priv;
 
@@ -142,7 +142,7 @@ static void zl10353_calc_nominal_rate(struct dvb_frontend *fe,
                break;
        }
 
-       *nominal_rate = (64 * bw * (1<<16) / (7 * 8) * 4000 / adc_clock + 2) / 4;
+       *nominal_rate = (bw * (1 << 23) / 7 * 125 + adc_clock / 2) / adc_clock;
 
        dprintk("%s: bw %d, adc_clock %d => 0x%x\n",
                __FUNCTION__, bw, adc_clock, *nominal_rate);
index cb274dc12b82596ead31dfd1f5bf5667197992d5..1c3d494a6da9e3bd04ba06ba646c2d4c7beb5c0d 100644 (file)
@@ -30,7 +30,7 @@ struct zl10353_config
        u8 demod_address;
 
        /* frequencies in kHz */
-       int adc_clock;  // default: 22528
+       int adc_clock;  /* default: 45056 */
 
        /* set if no pll is connected to the secondary i2c bus */
        int no_tuner;
index b767b098d14bb677b9c9b7e6393825c61cedff38..96b415576f0deb8f5330eda6f758deb3cb76a73d 100644 (file)
@@ -300,7 +300,6 @@ static struct i2c_client bt866_client_tmpl =
        .addr = 0,
        .adapter = NULL,
        .driver = &i2c_driver_bt866,
-       .usage_count = 0
 };
 
 static int bt866_found_proc(struct i2c_adapter *adapter,
index 3abd9fa54d2cd5a856f8b0d2af24b57e88dec493..585d1ef95afdd6956d5dca05b50c524f4e5511d7 100644 (file)
@@ -5080,7 +5080,7 @@ static void PXC200_muxsel(struct bttv *btv, unsigned int input)
 /* ----------------------------------------------------------------------- */
 /* motherboard chipset specific stuff                                      */
 
-void __devinit bttv_check_chipset(void)
+void __init bttv_check_chipset(void)
 {
        int pcipci_fail = 0;
        struct pci_dev *dev = NULL;
index a88b56e6ca05c3c2d990e2313c2bd79b857124f6..c02d92deacd2aab2b1009ca573183c898b818d42 100644 (file)
@@ -3827,10 +3827,7 @@ static int bttv_release(struct inode *inode, struct file *file)
 
        /* stop vbi capture */
        if (check_btres(fh, RESOURCE_VBI)) {
-               if (fh->vbi.streaming)
-                       videobuf_streamoff(&fh->vbi);
-               if (fh->vbi.reading)
-                       videobuf_read_stop(&fh->vbi);
+               videobuf_stop(&fh->vbi);
                free_btres(btv,fh,RESOURCE_VBI);
        }
 
@@ -4988,7 +4985,7 @@ static struct pci_driver bttv_pci_driver = {
 #endif
 };
 
-static int bttv_init_module(void)
+static int __init bttv_init_module(void)
 {
        int ret;
 
@@ -5021,7 +5018,7 @@ static int bttv_init_module(void)
        return pci_register_driver(&bttv_pci_driver);
 }
 
-static void bttv_cleanup_module(void)
+static void __exit bttv_cleanup_module(void)
 {
        pci_unregister_driver(&bttv_pci_driver);
        bus_unregister(&bttv_sub_bus_type);
index f33f0b47142cd319b75942ab4d19ec269cb85922..f802b5653569874fa0a6dbef531c964566c784c8 100644 (file)
@@ -1085,10 +1085,7 @@ static int mpeg_release(struct inode *inode, struct file *file)
 
        cx8802_cancel_buffers(fh->dev);
        /* stop mpeg capture */
-       if (fh->mpegq.streaming)
-               videobuf_streamoff(&fh->mpegq);
-       if (fh->mpegq.reading)
-               videobuf_read_stop(&fh->mpegq);
+       videobuf_stop(&fh->mpegq);
 
        videobuf_mmap_free(&fh->mpegq);
        file->private_data = NULL;
index 5ee05f8f3fad3091d11e2d8381012f5533bbadaa..c84dafbdb991aae420a0f4bc80f3b8f71174110c 100644 (file)
@@ -851,10 +851,7 @@ static int video_release(struct inode *inode, struct file *file)
 
        /* stop vbi capture */
        if (res_check(fh, RESOURCE_VBI)) {
-               if (fh->vbiq.streaming)
-                       videobuf_streamoff(&fh->vbiq);
-               if (fh->vbiq.reading)
-                       videobuf_read_stop(&fh->vbiq);
+               videobuf_stop(&fh->vbiq);
                res_free(dev,fh,RESOURCE_VBI);
        }
 
index 2529c298b862a4c80c83404894783af34ca4534a..0906bc5766cc0b46becbe85735df042333c56b59 100644 (file)
@@ -144,7 +144,8 @@ static int em28xx_config(struct em28xx *dev)
 {
 
        /* Sets I2C speed to 100 KHz */
-       em28xx_write_regs_req(dev, 0x00, 0x06, "\x40", 1);
+       if (!dev->is_em2800)
+               em28xx_write_regs_req(dev, 0x00, 0x06, "\x40", 1);
 
        /* enable vbi capturing */
 
@@ -570,7 +571,9 @@ static void em28xx_vm_close(struct vm_area_struct *vma)
 {
        /* NOTE: buffers are not freed here */
        struct em28xx_frame_t *f = vma->vm_private_data;
-       f->vma_use_count--;
+
+       if (f->vma_use_count)
+               f->vma_use_count--;
 }
 
 static struct vm_operations_struct em28xx_vm_ops = {
index 623eea2652ca1fda2844d29b4c5cb0fb7c792163..77b27dc750b1bc9ef5592cbbad1a4e76cb7b2edd 100644 (file)
@@ -706,7 +706,7 @@ void ivtv_call_i2c_clients(struct ivtv *itv, unsigned int cmd, void *arg)
 }
 
 /* init + register i2c algo-bit adapter */
-int __devinit init_ivtv_i2c(struct ivtv *itv)
+int init_ivtv_i2c(struct ivtv *itv)
 {
        IVTV_DEBUG_I2C("i2c init\n");
 
index de6a07442298d44d6735cde7266a201a48cba39c..987042c09b643fb42ef4faabbb7843359e9bdd41 100644 (file)
@@ -35,7 +35,7 @@ int ivtv_call_i2c_client(struct ivtv *itv, int addr, unsigned int cmd, void *arg
 void ivtv_call_i2c_clients(struct ivtv *itv, unsigned int cmd, void *arg);
 
 /* init + register i2c algo-bit adapter */
-int __devinit init_ivtv_i2c(struct ivtv *itv);
+int init_ivtv_i2c(struct ivtv *itv);
 void exit_ivtv_i2c(struct ivtv *itv);
 
 #endif
index aa03e61ef310f59b84bc4372a23921c4f7517128..74fb0e021979eec1b805c8f16b34d14f21287ba6 100644 (file)
@@ -76,7 +76,7 @@ static struct {
        int minor_offset;
        int dma, pio;
        enum v4l2_buf_type buf_type;
-       struct file_operations *fops;
+       const struct file_operations *fops;
 } ivtv_stream_info[] = {
        {       /* IVTV_ENC_STREAM_TYPE_MPG */
                "encoder MPG",
index ad0232935df6fb760f176f97695f8ce81ed38957..996b49491f5a2f29c5ca6c3ed02604a47239faa1 100644 (file)
@@ -187,12 +187,14 @@ static int i2c_senddata(struct saa5246a_device *t, ...)
 {
        unsigned char buf[64];
        int v;
-       int ct=0;
+       int ct = 0;
        va_list argp;
-       va_start(argp,t);
+       va_start(argp, t);
 
-       while((v=va_arg(argp,int))!=-1)
-               buf[ct++]=v;
+       while ((v = va_arg(argp, int)) != -1)
+               buf[ct++] = v;
+
+       va_end(argp);
        return i2c_sendbuf(t, buf[0], ct-1, buf+1);
 }
 
index 94bb59a32b17e3e984dfb0ec03905ef99a4dc855..f55d6e85f20f34c59d93e4ae9a5f70c59ecd0a32 100644 (file)
@@ -282,12 +282,14 @@ static int i2c_senddata(struct saa5249_device *t, ...)
 {
        unsigned char buf[64];
        int v;
-       int ct=0;
+       int ct = 0;
        va_list argp;
        va_start(argp,t);
 
-       while((v=va_arg(argp,int))!=-1)
-               buf[ct++]=v;
+       while ((v = va_arg(argp, int)) != -1)
+               buf[ct++] = v;
+
+       va_end(argp);
        return i2c_sendbuf(t, buf[0], ct-1, buf+1);
 }
 
index b9c5cf7dc849224c1cfcd83da1f20ff074a29e1c..4878f3067787e5e046f3625e0510471cf6e38b0c 100644 (file)
@@ -222,7 +222,8 @@ static irqreturn_t saa7134_alsa_irq(int irq, void *dev_id)
 
                if (report & SAA7134_IRQ_REPORT_DONE_RA3) {
                        handled = 1;
-                       saa_writel(SAA7134_IRQ_REPORT,report);
+                       saa_writel(SAA7134_IRQ_REPORT,
+                                  SAA7134_IRQ_REPORT_DONE_RA3);
                        saa7134_irq_alsa_done(dev, status);
                } else {
                        goto out;
@@ -457,7 +458,7 @@ static struct snd_pcm_hardware snd_card_saa7134_capture =
        .buffer_bytes_max =     (256*1024),
        .period_bytes_min =     64,
        .period_bytes_max =     (256*1024),
-       .periods_min =          2,
+       .periods_min =          4,
        .periods_max =          1024,
 };
 
@@ -491,7 +492,7 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream,
 
        snd_assert(period_size >= 0x100 && period_size <= 0x10000,
                   return -EINVAL);
-       snd_assert(periods >= 2, return -EINVAL);
+       snd_assert(periods >= 4, return -EINVAL);
        snd_assert(period_size * periods <= 1024 * 1024, return -EINVAL);
 
        dev = saa7134->dev;
@@ -647,7 +648,14 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
                saa7134_tvaudio_setmute(dev);
        }
 
-       if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
+       err = snd_pcm_hw_constraint_integer(runtime,
+                                               SNDRV_PCM_HW_PARAM_PERIODS);
+       if (err < 0)
+               return err;
+
+       err = snd_pcm_hw_constraint_step(runtime, 0,
+                                               SNDRV_PCM_HW_PARAM_PERIODS, 2);
+       if (err < 0)
                return err;
 
        return 0;
index 4f3dad9ae6d6a3193434ee9ccfabad677b2791e1..98c1b084a7160eeaeb18b7033c670cb3668a1ece 100644 (file)
@@ -334,7 +334,7 @@ struct saa7134_board saa7134_boards[] = {
                        .tv   = 1,
                },{
                        .name = name_comp1,
-                       .vmux = 2,
+                       .vmux = 0,
                        .amux = LINE1,
                },{
                        .name = name_comp2,
@@ -3221,6 +3221,7 @@ struct saa7134_board saa7134_boards[] = {
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
+               .tuner_config   = 1,
                .mpeg           = SAA7134_MPEG_DVB,
                .inputs         = {{
                        .name = name_tv,
index a499eea379e65a4e3209ff5c464f5ac83c45b57a..4fd187ac9d7088378498f408c1b2efa2e732c142 100644 (file)
@@ -569,21 +569,22 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id)
        for (loop = 0; loop < 10; loop++) {
                report = saa_readl(SAA7134_IRQ_REPORT);
                status = saa_readl(SAA7134_IRQ_STATUS);
-               if (0 == report) {
-                       if (irq_debug > 1)
-                               printk(KERN_DEBUG "%s/irq: no (more) work\n",
-                                      dev->name);
-                       goto out;
-               }
-
-               /* If dmasound support is active and we get a sound report, exit
-                  and let the saa7134-alsa/oss module deal with it */
 
+               /* If dmasound support is active and we get a sound report,
+                * mask out the report and let the saa7134-alsa module deal
+                * with it */
                if ((report & SAA7134_IRQ_REPORT_DONE_RA3) &&
                        (dev->dmasound.priv_data != NULL) )
                {
                        if (irq_debug > 1)
-                               printk(KERN_DEBUG "%s/irq: ignoring interrupt for DMA sound\n",
+                               printk(KERN_DEBUG "%s/irq: preserving DMA sound interrupt\n",
+                                      dev->name);
+                       report &= ~SAA7134_IRQ_REPORT_DONE_RA3;
+               }
+
+               if (0 == report) {
+                       if (irq_debug > 1)
+                               printk(KERN_DEBUG "%s/irq: no (more) work\n",
                                       dev->name);
                        goto out;
                }
index 38d87332cc5dcd312fd815bece3d40709ee38c42..e1ab099ec4c62ecdf2fdebc4a018bb27e96f1272 100644 (file)
@@ -662,6 +662,7 @@ static struct tda1004x_config hauppauge_hvr_1110_config = {
        .if_freq       = TDA10046_FREQ_045,
        .i2c_gate      = 0x4b,
        .tuner_address = 0x61,
+       .tuner_config  = 1,
        .request_firmware = philips_tda1004x_request_firmware
 };
 
index 75d0c5bf46d284def842762960d060304e882a02..9322f44865b8341ee74976b76c0fb107e1bf0088 100644 (file)
@@ -110,11 +110,8 @@ static int ts_release(struct inode *inode, struct file *file)
 {
        struct saa7134_dev *dev = file->private_data;
 
-       if (dev->empress_tsq.streaming)
-               videobuf_streamoff(&dev->empress_tsq);
        mutex_lock(&dev->empress_tsq.lock);
-       if (dev->empress_tsq.reading)
-               videobuf_read_stop(&dev->empress_tsq);
+       videobuf_stop(&dev->empress_tsq);
        videobuf_mmap_free(&dev->empress_tsq);
        dev->empress_users--;
 
index 3b9ffb4b648a67fcf8eeb4eb5637fbec605a5e06..6396d9b5c0636ced4538fc47460078b54ec0c6d3 100644 (file)
@@ -1445,10 +1445,7 @@ static int video_release(struct inode *inode, struct file *file)
 
        /* stop vbi capture */
        if (res_check(fh, RESOURCE_VBI)) {
-               if (fh->vbi.streaming)
-                       videobuf_streamoff(&fh->vbi);
-               if (fh->vbi.reading)
-                       videobuf_read_stop(&fh->vbi);
+               videobuf_stop(&fh->vbi);
                res_free(dev,fh,RESOURCE_VBI);
        }
 
index 25d0aef88ef51392c69e15992cbc0fbcb93414f9..445eba4174d75b3c48b694fcf3dea2e769e9e541 100644 (file)
@@ -290,6 +290,7 @@ static inline void tvp5150_selmux(struct i2c_client *c)
        int opmode=0;
        struct tvp5150 *decoder = i2c_get_clientdata(c);
        int input = 0;
+       unsigned char val;
 
        if ((decoder->route.output & TVP5150_BLACK_SCREEN) || !decoder->enable)
                input = 8;
@@ -315,6 +316,16 @@ static inline void tvp5150_selmux(struct i2c_client *c)
 
        tvp5150_write(c, TVP5150_OP_MODE_CTL, opmode);
        tvp5150_write(c, TVP5150_VD_IN_SRC_SEL_1, input);
+
+       /* Svideo should enable YCrCb output and disable GPCL output
+        * For Composite and TV, it should be the reverse
+        */
+       val = tvp5150_read(c, TVP5150_MISC_CTL);
+       if (decoder->route.input == TVP5150_SVIDEO)
+               val = (val & ~0x40) | 0x10;
+       else
+               val = (val & ~0x10) | 0x40;
+       tvp5150_write(c, TVP5150_MISC_CTL, val);
 };
 
 struct i2c_reg_value {
index 89a44f16f0ba50892be204f19f66c576cf46a2e1..c8a5cb57963b07bc75c6be6c75b7fdda4025d8a5 100644 (file)
@@ -141,6 +141,7 @@ void videobuf_queue_core_init(struct videobuf_queue* q,
        INIT_LIST_HEAD(&q->stream);
 }
 
+/* Locking: Only usage in bttv unsafe find way to remove */
 int videobuf_queue_is_busy(struct videobuf_queue *q)
 {
        int i;
@@ -178,6 +179,7 @@ int videobuf_queue_is_busy(struct videobuf_queue *q)
        return 0;
 }
 
+/* Locking: Caller holds q->lock */
 void videobuf_queue_cancel(struct videobuf_queue *q)
 {
        unsigned long flags=0;
@@ -208,6 +210,7 @@ void videobuf_queue_cancel(struct videobuf_queue *q)
 
 /* --------------------------------------------------------------------- */
 
+/* Locking: Caller holds q->lock */
 enum v4l2_field videobuf_next_field(struct videobuf_queue *q)
 {
        enum v4l2_field field = q->field;
@@ -226,6 +229,7 @@ enum v4l2_field videobuf_next_field(struct videobuf_queue *q)
        return field;
 }
 
+/* Locking: Caller holds q->lock */
 static void videobuf_status(struct videobuf_queue *q, struct v4l2_buffer *b,
                            struct videobuf_buffer *vb, enum v4l2_buf_type type)
 {
@@ -281,20 +285,108 @@ static void videobuf_status(struct videobuf_queue *q, struct v4l2_buffer *b,
        b->sequence  = vb->field_count >> 1;
 }
 
+/* Locking: Caller holds q->lock */
+static int __videobuf_mmap_free(struct videobuf_queue *q)
+{
+       int i;
+       int rc;
+
+       if (!q)
+               return 0;
+
+       MAGIC_CHECK(q->int_ops->magic,MAGIC_QTYPE_OPS);
+
+       rc  = CALL(q,mmap_free,q);
+       if (rc<0)
+               return rc;
+
+       for (i = 0; i < VIDEO_MAX_FRAME; i++) {
+               if (NULL == q->bufs[i])
+                       continue;
+               q->ops->buf_release(q,q->bufs[i]);
+               kfree(q->bufs[i]);
+               q->bufs[i] = NULL;
+       }
+
+       return rc;
+}
+
+int videobuf_mmap_free(struct videobuf_queue *q)
+{
+       int ret;
+       mutex_lock(&q->lock);
+       ret = __videobuf_mmap_free(q);
+       mutex_unlock(&q->lock);
+       return ret;
+}
+
+/* Locking: Caller holds q->lock */
+static int __videobuf_mmap_setup(struct videobuf_queue *q,
+                       unsigned int bcount, unsigned int bsize,
+                       enum v4l2_memory memory)
+{
+       unsigned int i;
+       int err;
+
+       MAGIC_CHECK(q->int_ops->magic,MAGIC_QTYPE_OPS);
+
+       err = __videobuf_mmap_free(q);
+       if (0 != err)
+               return err;
+
+       /* Allocate and initialize buffers */
+       for (i = 0; i < bcount; i++) {
+               q->bufs[i] = videobuf_alloc(q);
+
+               if (q->bufs[i] == NULL)
+                       break;
+
+               q->bufs[i]->i      = i;
+               q->bufs[i]->input  = UNSET;
+               q->bufs[i]->memory = memory;
+               q->bufs[i]->bsize  = bsize;
+               switch (memory) {
+               case V4L2_MEMORY_MMAP:
+                       q->bufs[i]->boff  = bsize * i;
+                       break;
+               case V4L2_MEMORY_USERPTR:
+               case V4L2_MEMORY_OVERLAY:
+                       /* nothing */
+                       break;
+               }
+       }
+
+       if (!i)
+               return -ENOMEM;
+
+       dprintk(1,"mmap setup: %d buffers, %d bytes each\n",
+               i, bsize);
+
+       return i;
+}
+
+int videobuf_mmap_setup(struct videobuf_queue *q,
+                       unsigned int bcount, unsigned int bsize,
+                       enum v4l2_memory memory)
+{
+       int ret;
+       mutex_lock(&q->lock);
+       ret = __videobuf_mmap_setup(q, bcount, bsize, memory);
+       mutex_unlock(&q->lock);
+       return ret;
+}
+
 int videobuf_reqbufs(struct videobuf_queue *q,
                 struct v4l2_requestbuffers *req)
 {
        unsigned int size,count;
        int retval;
 
-       if (req->type != q->type) {
-               dprintk(1,"reqbufs: queue type invalid\n");
-               return -EINVAL;
-       }
        if (req->count < 1) {
                dprintk(1,"reqbufs: count invalid (%d)\n",req->count);
                return -EINVAL;
        }
+
        if (req->memory != V4L2_MEMORY_MMAP     &&
            req->memory != V4L2_MEMORY_USERPTR  &&
            req->memory != V4L2_MEMORY_OVERLAY) {
@@ -303,6 +395,12 @@ int videobuf_reqbufs(struct videobuf_queue *q,
        }
 
        mutex_lock(&q->lock);
+       if (req->type != q->type) {
+               dprintk(1,"reqbufs: queue type invalid\n");
+               retval = -EINVAL;
+               goto done;
+       }
+
        if (q->streaming) {
                dprintk(1,"reqbufs: streaming already exists\n");
                retval = -EBUSY;
@@ -323,7 +421,7 @@ int videobuf_reqbufs(struct videobuf_queue *q,
        dprintk(1,"reqbufs: bufs=%d, size=0x%x [%d pages total]\n",
                count, size, (count*size)>>PAGE_SHIFT);
 
-       retval = videobuf_mmap_setup(q,count,size,req->memory);
+       retval = __videobuf_mmap_setup(q,count,size,req->memory);
        if (retval < 0) {
                dprintk(1,"reqbufs: mmap setup returned %d\n",retval);
                goto done;
@@ -338,20 +436,28 @@ int videobuf_reqbufs(struct videobuf_queue *q,
 
 int videobuf_querybuf(struct videobuf_queue *q, struct v4l2_buffer *b)
 {
+       int ret = -EINVAL;
+
+       mutex_lock(&q->lock);
        if (unlikely(b->type != q->type)) {
                dprintk(1,"querybuf: Wrong type.\n");
-               return -EINVAL;
+               goto done;
        }
        if (unlikely(b->index < 0 || b->index >= VIDEO_MAX_FRAME)) {
                dprintk(1,"querybuf: index out of range.\n");
-               return -EINVAL;
+               goto done;
        }
        if (unlikely(NULL == q->bufs[b->index])) {
                dprintk(1,"querybuf: buffer is null.\n");
-               return -EINVAL;
+               goto done;
        }
+
        videobuf_status(q,b,q->bufs[b->index],q->type);
-       return 0;
+
+       ret = 0;
+done:
+       mutex_unlock(&q->lock);
+       return ret;
 }
 
 int videobuf_qbuf(struct videobuf_queue *q,
@@ -541,22 +647,30 @@ int videobuf_streamon(struct videobuf_queue *q)
        return retval;
 }
 
-int videobuf_streamoff(struct videobuf_queue *q)
+/* Locking: Caller holds q->lock */
+static int __videobuf_streamoff(struct videobuf_queue *q)
 {
-       int retval = -EINVAL;
-
-       mutex_lock(&q->lock);
        if (!q->streaming)
-               goto done;
+               return -EINVAL;
+
        videobuf_queue_cancel(q);
        q->streaming = 0;
-       retval = 0;
 
- done:
+       return 0;
+}
+
+int videobuf_streamoff(struct videobuf_queue *q)
+{
+       int retval;
+
+       mutex_lock(&q->lock);
+       retval = __videobuf_streamoff(q);
        mutex_unlock(&q->lock);
+
        return retval;
 }
 
+/* Locking: Caller holds q->lock */
 static ssize_t videobuf_read_zerocopy(struct videobuf_queue *q,
                                      char __user *data,
                                      size_t count, loff_t *ppos)
@@ -691,7 +805,8 @@ ssize_t videobuf_read_one(struct videobuf_queue *q,
        return retval;
 }
 
-int videobuf_read_start(struct videobuf_queue *q)
+/* Locking: Caller holds q->lock */
+int __videobuf_read_start(struct videobuf_queue *q)
 {
        enum v4l2_field field;
        unsigned long flags=0;
@@ -705,7 +820,7 @@ int videobuf_read_start(struct videobuf_queue *q)
                count = VIDEO_MAX_FRAME;
        size = PAGE_ALIGN(size);
 
-       err = videobuf_mmap_setup(q, count, size, V4L2_MEMORY_USERPTR);
+       err = __videobuf_mmap_setup(q, count, size, V4L2_MEMORY_USERPTR);
        if (err < 0)
                return err;
 
@@ -728,12 +843,13 @@ int videobuf_read_start(struct videobuf_queue *q)
        return 0;
 }
 
-void videobuf_read_stop(struct videobuf_queue *q)
+static void __videobuf_read_stop(struct videobuf_queue *q)
 {
        int i;
 
+
        videobuf_queue_cancel(q);
-       videobuf_mmap_free(q);
+       __videobuf_mmap_free(q);
        INIT_LIST_HEAD(&q->stream);
        for (i = 0; i < VIDEO_MAX_FRAME; i++) {
                if (NULL == q->bufs[i])
@@ -743,8 +859,41 @@ void videobuf_read_stop(struct videobuf_queue *q)
        }
        q->read_buf = NULL;
        q->reading  = 0;
+       
 }
 
+int videobuf_read_start(struct videobuf_queue *q)
+{
+       int rc;
+
+       mutex_lock(&q->lock);
+       rc = __videobuf_read_start(q);
+       mutex_unlock(&q->lock);
+
+       return rc;
+}
+
+void videobuf_read_stop(struct videobuf_queue *q)
+{
+       mutex_lock(&q->lock);
+       __videobuf_read_stop(q);
+       mutex_unlock(&q->lock);
+}
+
+void videobuf_stop(struct videobuf_queue *q)
+{
+       mutex_lock(&q->lock);
+
+       if (q->streaming)
+               __videobuf_streamoff(q);
+
+       if (q->reading)
+               __videobuf_read_stop(q);
+
+       mutex_unlock(&q->lock);
+}
+
+
 ssize_t videobuf_read_stream(struct videobuf_queue *q,
                             char __user *data, size_t count, loff_t *ppos,
                             int vbihack, int nonblocking)
@@ -760,7 +909,7 @@ ssize_t videobuf_read_stream(struct videobuf_queue *q,
        if (q->streaming)
                goto done;
        if (!q->reading) {
-               retval = videobuf_read_start(q);
+               retval = __videobuf_read_start(q);
                if (retval < 0)
                        goto done;
        }
@@ -833,7 +982,7 @@ unsigned int videobuf_poll_stream(struct file *file,
                                         struct videobuf_buffer, stream);
        } else {
                if (!q->reading)
-                       videobuf_read_start(q);
+                       __videobuf_read_start(q);
                if (!q->reading) {
                        rc = POLLERR;
                } else if (NULL == q->read_buf) {
@@ -858,75 +1007,6 @@ unsigned int videobuf_poll_stream(struct file *file,
        return rc;
 }
 
-int videobuf_mmap_setup(struct videobuf_queue *q,
-                       unsigned int bcount, unsigned int bsize,
-                       enum v4l2_memory memory)
-{
-       unsigned int i;
-       int err;
-
-       MAGIC_CHECK(q->int_ops->magic,MAGIC_QTYPE_OPS);
-
-       err = videobuf_mmap_free(q);
-       if (0 != err)
-               return err;
-
-       /* Allocate and initialize buffers */
-       for (i = 0; i < bcount; i++) {
-               q->bufs[i] = videobuf_alloc(q);
-
-               if (q->bufs[i] == NULL)
-                       break;
-
-               q->bufs[i]->i      = i;
-               q->bufs[i]->input  = UNSET;
-               q->bufs[i]->memory = memory;
-               q->bufs[i]->bsize  = bsize;
-               switch (memory) {
-               case V4L2_MEMORY_MMAP:
-                       q->bufs[i]->boff  = bsize * i;
-                       break;
-               case V4L2_MEMORY_USERPTR:
-               case V4L2_MEMORY_OVERLAY:
-                       /* nothing */
-                       break;
-               }
-       }
-
-       if (!i)
-               return -ENOMEM;
-
-       dprintk(1,"mmap setup: %d buffers, %d bytes each\n",
-               i, bsize);
-
-       return i;
-}
-
-int videobuf_mmap_free(struct videobuf_queue *q)
-{
-       int i;
-       int rc;
-
-       if (!q)
-               return 0;
-
-       MAGIC_CHECK(q->int_ops->magic,MAGIC_QTYPE_OPS);
-
-       rc  = CALL(q,mmap_free,q);
-       if (rc<0)
-               return rc;
-
-       for (i = 0; i < VIDEO_MAX_FRAME; i++) {
-               if (NULL == q->bufs[i])
-                       continue;
-               q->ops->buf_release(q,q->bufs[i]);
-               kfree(q->bufs[i]);
-               q->bufs[i] = NULL;
-       }
-
-       return rc;
-}
-
 int videobuf_mmap_mapper(struct videobuf_queue *q,
                         struct vm_area_struct *vma)
 {
@@ -991,6 +1071,7 @@ EXPORT_SYMBOL_GPL(videobuf_streamoff);
 
 EXPORT_SYMBOL_GPL(videobuf_read_start);
 EXPORT_SYMBOL_GPL(videobuf_read_stop);
+EXPORT_SYMBOL_GPL(videobuf_stop);
 EXPORT_SYMBOL_GPL(videobuf_read_stream);
 EXPORT_SYMBOL_GPL(videobuf_read_one);
 EXPORT_SYMBOL_GPL(videobuf_poll_stream);
index cd74341c984fd0cd37678c955e5689b2b55697ea..e01259438bb2755bd8bf284554675145282086aa 100644 (file)
@@ -51,7 +51,7 @@ videobuf_vm_open(struct vm_area_struct *vma)
 {
        struct videobuf_mapping *map = vma->vm_private_data;
 
-       dprintk(2,"vm_open %p [count=%d,vma=%08lx-%08lx]\n",map,
+       dprintk(2,"vm_open %p [count=%u,vma=%08lx-%08lx]\n",map,
                map->count,vma->vm_start,vma->vm_end);
 
        map->count++;
@@ -64,7 +64,7 @@ videobuf_vm_close(struct vm_area_struct *vma)
        struct videobuf_queue *q = map->q;
        int i;
 
-       dprintk(2,"vm_close %p [count=%d,vma=%08lx-%08lx]\n",map,
+       dprintk(2,"vm_close %p [count=%u,vma=%08lx-%08lx]\n",map,
                map->count,vma->vm_start,vma->vm_end);
 
        map->count--;
@@ -221,7 +221,7 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q,
        }
 
        /* create mapping + update buffer list */
-       map = q->bufs[first]->map = kmalloc(sizeof(struct videobuf_mapping),GFP_KERNEL);
+       map = q->bufs[first]->map = kzalloc(sizeof(struct videobuf_mapping),GFP_KERNEL);
        if (NULL == map)
                return -ENOMEM;
 
index ee73dc75131ccb5348089ed9548f737937d4cc0c..9b54ff9d2e36210209d2335489fb5fb1fd901ad6 100644 (file)
@@ -1076,6 +1076,7 @@ static int vivi_release(struct inode *inode, struct file *file)
        int minor = iminor(inode);
 
        vivi_stop_thread(vidq);
+       videobuf_stop(&fh->vb_vidq);
        videobuf_mmap_free(&fh->vb_vidq);
 
        kfree (fh);
index ab23a3221585302fec8a33d79ceade142b93f7dc..cf56647a6ca4822307d52b5911b4a4152b7a7766 100644 (file)
@@ -987,9 +987,9 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
                KEY_UNKNOWN,    /* 0x0C: FN+BACKSPACE */
                KEY_UNKNOWN,    /* 0x0D: FN+INSERT */
                KEY_UNKNOWN,    /* 0x0E: FN+DELETE */
-               KEY_BRIGHTNESSUP,       /* 0x0F: FN+HOME (brightness up) */
+               KEY_RESERVED,   /* 0x0F: FN+HOME (brightness up) */
                /* Scan codes 0x10 to 0x1F: Extended ACPI HKEY hot keys */
-               KEY_BRIGHTNESSDOWN,     /* 0x10: FN+END (brightness down) */
+               KEY_RESERVED,   /* 0x10: FN+END (brightness down) */
                KEY_RESERVED,   /* 0x11: FN+PGUP (thinklight toggle) */
                KEY_UNKNOWN,    /* 0x12: FN+PGDOWN */
                KEY_ZOOM,       /* 0x13: FN+SPACE (zoom) */
index 6cde4edc846b1f20f4a28ed67f4d3d00ed5a2988..d9107e542dface363ef53d71339361d99f7619de 100644 (file)
@@ -2588,7 +2588,6 @@ config MLX4_DEBUG
 config TEHUTI
        tristate "Tehuti Networks 10G Ethernet"
        depends on PCI
-       select ZLIB_INFLATE
        help
          Tehuti Networks 10G Ethernet NIC
 
index 03134f47a4eb602489f3ca2c10f4ebcbe8076bd6..48f2f30059359f4a6a45e5d7b697fb33874c70d4 100644 (file)
@@ -158,7 +158,7 @@ static int setup_data(struct net_device *dev)
 {
        struct fs_enet_private *fep = netdev_priv(dev);
 
-#ifdef CONFIG_PPC_CPM_NEW_BINDING
+#ifndef CONFIG_PPC_CPM_NEW_BINDING
        struct fs_platform_info *fpi = fep->fpi;
 
        fep->scc.idx = fs_get_scc_index(fpi->fs_no);
index c6355c00fd7abb8e1143f81a0c4bb2945edb97fd..9081234ab45815c497b8a8a11fdc3a40e2863be5 100644 (file)
@@ -1168,6 +1168,7 @@ static int stir421x_patch_device(struct irda_usb_cb *self)
 static int irda_usb_net_open(struct net_device *netdev)
 {
        struct irda_usb_cb *self;
+       unsigned long flags;
        char    hwname[16];
        int i;
        
@@ -1177,13 +1178,16 @@ static int irda_usb_net_open(struct net_device *netdev)
        self = (struct irda_usb_cb *) netdev->priv;
        IRDA_ASSERT(self != NULL, return -1;);
 
+       spin_lock_irqsave(&self->lock, flags);
        /* Can only open the device if it's there */
        if(!self->present) {
+               spin_unlock_irqrestore(&self->lock, flags);
                IRDA_WARNING("%s(), device not present!\n", __FUNCTION__);
                return -1;
        }
 
        if(self->needspatch) {
+               spin_unlock_irqrestore(&self->lock, flags);
                IRDA_WARNING("%s(), device needs patch\n", __FUNCTION__) ;
                return -EIO ;
        }
@@ -1198,6 +1202,7 @@ static int irda_usb_net_open(struct net_device *netdev)
        /* To do *before* submitting Rx urbs and starting net Tx queue
         * Jean II */
        self->netopen = 1;
+       spin_unlock_irqrestore(&self->lock, flags);
 
        /* 
         * Now that everything should be initialized properly,
index 0b769192d4ce0753c872410c601a1e2eb4849a8e..93916cf33f295604e939d02d2b7a1f0bfef28e66 100644 (file)
@@ -677,6 +677,8 @@ static int mcs_net_close(struct net_device *netdev)
        /* Stop transmit processing */
        netif_stop_queue(netdev);
 
+       kfree_skb(mcs->rx_buff.skb);
+
        /* kill and free the receive and transmit URBs */
        usb_kill_urb(mcs->rx_urb);
        usb_free_urb(mcs->rx_urb);
index 042bc2f0417d8615318bffc479d7d0614b547401..e59c485bc497f0f98054b6fea0424c320c3a3dfb 100644 (file)
@@ -142,9 +142,6 @@ enum StirCtrl2Mask {
 };
 
 enum StirFifoCtlMask {
-       FIFOCTL_EOF = 0x80,
-       FIFOCTL_UNDER = 0x40,
-       FIFOCTL_OVER = 0x20,
        FIFOCTL_DIR = 0x10,
        FIFOCTL_CLR = 0x08,
        FIFOCTL_EMPTY = 0x04,
@@ -594,9 +591,10 @@ static int fifo_txwait(struct stir_cb *stir, int space)
 {
        int err;
        unsigned long count, status;
+       unsigned long prev_count = 0x1fff;
 
        /* Read FIFO status and count */
-       for(;;) {
+       for (;; prev_count = count) {
                err = read_reg(stir, REG_FIFOCTL, stir->fifo_status, 
                                   FIFO_REGS_SIZE);
                if (unlikely(err != FIFO_REGS_SIZE)) {
@@ -629,6 +627,10 @@ static int fifo_txwait(struct stir_cb *stir, int space)
                if (space >= 0 && STIR_FIFO_SIZE - 4 > space + count)
                        return 0;
 
+               /* queue confused */
+               if (prev_count < count)
+                       break;
+
                /* estimate transfer time for remaining chars */
                msleep((count * 8000) / stir->speed);
        }
index 232ecba5340fb1f703c20218e1c09c9dfa156a1f..61e24b7a45a306da29fe20916a3e8ca40e45c1d6 100644 (file)
 struct ppp_header {
        u8 address;
        u8 control;
-       u16 protocol;
+       __be16 protocol;
 };
 #define PPP_HEADER_LEN          sizeof (struct ppp_header)
 
 struct lcp_header {
        u8 type;
        u8 ident;
-       u16 len;
+       __be16 len;
 };
 #define LCP_HEADER_LEN          sizeof (struct lcp_header)
 
 struct cisco_packet {
-       u32 type;
-       u32 par1;
-       u32 par2;
-       u16 rel;
-       u16 time0;
-       u16 time1;
+       __be32 type;
+       __be32 par1;
+       __be32 par2;
+       __be16 rel;
+       __be16 time0;
+       __be16 time1;
 };
 #define CISCO_PACKET_LEN 18
 #define CISCO_BIG_PACKET_LEN 20
@@ -139,7 +139,7 @@ static struct sk_buff_head tx_queue;
 static void sppp_keepalive (unsigned long dummy);
 static void sppp_cp_send (struct sppp *sp, u16 proto, u8 type,
        u8 ident, u16 len, void *data);
-static void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2);
+static void sppp_cisco_send (struct sppp *sp, int type, u32 par1, u32 par2);
 static void sppp_lcp_input (struct sppp *sp, struct sk_buff *m);
 static void sppp_cisco_input (struct sppp *sp, struct sk_buff *m);
 static void sppp_ipcp_input (struct sppp *sp, struct sk_buff *m);
@@ -447,7 +447,7 @@ static void sppp_keepalive (unsigned long dummy)
                        sppp_cisco_send (sp, CISCO_KEEPALIVE_REQ, ++sp->pp_seq,
                                sp->pp_rseq);
                else if (sp->lcp.state == LCP_STATE_OPENED) {
-                       long nmagic = htonl (sp->lcp.magic);
+                       __be32 nmagic = htonl (sp->lcp.magic);
                        sp->lcp.echoid = ++sp->pp_seq;
                        sppp_cp_send (sp, PPP_LCP, LCP_ECHO_REQ,
                                sp->lcp.echoid, 4, &nmagic);
@@ -667,7 +667,7 @@ badreq:
                                        dev->name, len);
                        break;
                }
-               if (ntohl (*(long*)(h+1)) == sp->lcp.magic) {
+               if (ntohl (*(__be32*)(h+1)) == sp->lcp.magic) {
                        /* Line loopback mode detected. */
                        printk (KERN_WARNING "%s: loopback\n", dev->name);
                        if_down (dev);
@@ -680,7 +680,7 @@ badreq:
                        sppp_lcp_open (sp);
                        break;
                }
-               *(long*)(h+1) = htonl (sp->lcp.magic);
+               *(__be32 *)(h+1) = htonl (sp->lcp.magic);
                sppp_cp_send (sp, PPP_LCP, LCP_ECHO_REPLY, h->ident, len-4, h+1);
                break;
        case LCP_ECHO_REPLY:
@@ -692,7 +692,7 @@ badreq:
                                        dev->name, len);
                        break;
                }
-               if (ntohl (*(long*)(h+1)) != sp->lcp.magic)
+               if (ntohl(*(__be32 *)(h+1)) != sp->lcp.magic)
                sp->pp_alivecnt = 0;
                break;
        }
@@ -765,7 +765,7 @@ static void sppp_cisco_input (struct sppp *sp, struct sk_buff *skb)
                {
                struct in_device *in_dev;
                struct in_ifaddr *ifa;
-               __be32 addr = 0, mask = ~0; /* FIXME: is the mask correct? */
+               __be32 addr = 0, mask = htonl(~0U); /* FIXME: is the mask correct? */
 #ifdef CONFIG_INET
                rcu_read_lock();
                if ((in_dev = __in_dev_get_rcu(dev)) != NULL)
@@ -782,8 +782,7 @@ static void sppp_cisco_input (struct sppp *sp, struct sk_buff *skb)
                }
                rcu_read_unlock();
 #endif         
-               /* I hope both addr and mask are in the net order */
-               sppp_cisco_send (sp, CISCO_ADDR_REPLY, addr, mask);
+               sppp_cisco_send (sp, CISCO_ADDR_REPLY, ntohl(addr), ntohl(mask));
                break;
                }
        }
@@ -844,7 +843,7 @@ static void sppp_cp_send (struct sppp *sp, u16 proto, u8 type,
  * Send Cisco keepalive packet.
  */
 
-static void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2)
+static void sppp_cisco_send (struct sppp *sp, int type, u32 par1, u32 par2)
 {
        struct ppp_header *h;
        struct cisco_packet *ch;
@@ -868,7 +867,7 @@ static void sppp_cisco_send (struct sppp *sp, int type, long par1, long par2)
        ch->type = htonl (type);
        ch->par1 = htonl (par1);
        ch->par2 = htonl (par2);
-       ch->rel = -1;
+       ch->rel = htons(0xffff);
        ch->time0 = htons ((u16) (t >> 16));
        ch->time1 = htons ((u16) t);
 
index c2f8a78c894c180dbf838fbce8cf2d0c4212057f..2f75d695eed767fe9c999edd464370963aa910c7 100644 (file)
@@ -276,7 +276,8 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom)
                        sz = pci_size(l, sz, (u32)PCI_ROM_ADDRESS_MASK);
                        if (sz) {
                                res->flags = (l & IORESOURCE_ROM_ENABLE) |
-                                 IORESOURCE_MEM | IORESOURCE_READONLY;
+                                 IORESOURCE_MEM | IORESOURCE_PREFETCH |
+                                 IORESOURCE_READONLY | IORESOURCE_CACHEABLE;
                                res->start = l & PCI_ROM_ADDRESS_MASK;
                                res->end = res->start + (unsigned long) sz;
                        }
index 7b5773d882127cd0b935468cfa4b58a682a6a920..a4e758143665aa2427aa97ecf6f86dcfbb20d4c2 100644 (file)
@@ -154,7 +154,7 @@ struct wd_device {
 };
 
 static struct wd_device wd_dev = { 
-               0, SPIN_LOCK_UNLOCKED, 0, 0, 0, 0,
+               0, __SPIN_LOCK_UNLOCKED(wd_dev.lock), 0, 0, 0, 0,
 };
 
 static struct timer_list wd_timer;
index 7a835a35f21da52296179b0e9a3feeaca9a3c307..9706de9d98d51969044a68f8cf0663fac4dde80e 100644 (file)
@@ -242,6 +242,11 @@ static void idescsi_output_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsign
        }
 }
 
+static void ide_scsi_hex_dump(u8 *data, int len)
+{
+       print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, data, len, 0);
+}
+
 static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_command)
 {
        idescsi_scsi_t *scsi = drive_to_idescsi(drive);
@@ -272,8 +277,7 @@ static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_co
        pc->scsi_cmd = ((idescsi_pc_t *) failed_command->special)->scsi_cmd;
        if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
                printk ("ide-scsi: %s: queue cmd = ", drive->name);
-               print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, pc->c,
-                              6, 0);
+               ide_scsi_hex_dump(pc->c, 6);
        }
        rq->rq_disk = scsi->disk;
        return ide_do_drive_cmd(drive, rq, ide_preempt);
@@ -328,8 +332,7 @@ static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs)
                idescsi_pc_t *opc = (idescsi_pc_t *) rq->buffer;
                if (log) {
                        printk ("ide-scsi: %s: wrap up check %lu, rst = ", drive->name, opc->scsi_cmd->serial_number);
-                       print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1,
-                                      pc->buffer, 16, 0);
+                       ide_scsi_hex_dump(pc->buffer, 16);
                }
                memcpy((void *) opc->scsi_cmd->sense_buffer, pc->buffer, SCSI_SENSE_BUFFERSIZE);
                kfree(pc->buffer);
@@ -808,12 +811,10 @@ static int idescsi_queue (struct scsi_cmnd *cmd,
 
        if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
                printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number);
-               print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1,
-                              cmd->cmnd, cmd->cmd_len, 0);
+               ide_scsi_hex_dump(cmd->cmnd, cmd->cmd_len);
                if (memcmp(pc->c, cmd->cmnd, cmd->cmd_len)) {
                        printk ("ide-scsi: %s: que %lu, tsl = ", drive->name, cmd->serial_number);
-                       print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1,
-                                      pc->c, 12, 0);
+                       ide_scsi_hex_dump(pc->c, 12);
                }
        }
 
index 70a09a3d5af0ee6999b98a57d766f4420688d94c..707c5b03bce92c1694f62721bbfe455a405b98bb 100644 (file)
 
 #include "suncore.h"
 
-int sunserial_current_minor = 64;
+static int sunserial_current_minor = 64;
 
-EXPORT_SYMBOL(sunserial_current_minor);
+int sunserial_register_minors(struct uart_driver *drv, int count)
+{
+       int err = 0;
+
+       drv->minor = sunserial_current_minor;
+       drv->nr += count;
+       /* Register the driver on the first call */
+       if (drv->nr == count)
+               err = uart_register_driver(drv);
+       if (err == 0) {
+               sunserial_current_minor += count;
+               drv->tty_driver->name_base = drv->minor - 64;
+       }
+       return err;
+}
+EXPORT_SYMBOL(sunserial_register_minors);
+
+void sunserial_unregister_minors(struct uart_driver *drv, int count)
+{
+       drv->nr -= count;
+       sunserial_current_minor -= count;
+
+       if (drv->nr == 0)
+               uart_unregister_driver(drv);
+}
+EXPORT_SYMBOL(sunserial_unregister_minors);
 
-int sunserial_console_match(struct console *con, struct device_node *dp,
+int __init sunserial_console_match(struct console *con, struct device_node *dp,
                            struct uart_driver *drv, int line)
 {
        int off;
@@ -133,8 +158,6 @@ sunserial_console_termios(struct console *con)
        con->cflag = cflag;
 }
 
-EXPORT_SYMBOL(sunserial_console_termios);
-
 /* Sun serial MOUSE auto baud rate detection.  */
 static struct mouse_baud_cflag {
        int baud;
index 829d7d65d6dbf4dec55e8992a8d77a795b0b02d2..042668aa602e756f00d8c011dbcc4307c04709ef 100644 (file)
@@ -22,7 +22,8 @@
 extern unsigned int suncore_mouse_baud_cflag_next(unsigned int, int *);
 extern int suncore_mouse_baud_detection(unsigned char, int);
 
-extern int sunserial_current_minor;
+extern int sunserial_register_minors(struct uart_driver *, int);
+extern void sunserial_unregister_minors(struct uart_driver *, int);
 
 extern int sunserial_console_match(struct console *, struct device_node *,
                                   struct uart_driver *, int);
index 8ff900b098116ebc7c54f4b5ec676223fe4cf54b..be0fe152891b762135ec1d72ff9a8cd200aea708 100644 (file)
@@ -562,16 +562,10 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m
 
        port->dev = &op->dev;
 
-       sunhv_reg.minor = sunserial_current_minor;
-       sunhv_reg.nr = 1;
-
-       err = uart_register_driver(&sunhv_reg);
+       err = sunserial_register_minors(&sunhv_reg, 1);
        if (err)
                goto out_free_con_read_page;
 
-       sunhv_reg.tty_driver->name_base = sunhv_reg.minor - 64;
-       sunserial_current_minor += 1;
-
        sunserial_console_match(&sunhv_console, op->node,
                                &sunhv_reg, port->line);
 
@@ -591,8 +585,7 @@ out_remove_port:
        uart_remove_one_port(&sunhv_reg, port);
 
 out_unregister_driver:
-       sunserial_current_minor -= 1;
-       uart_unregister_driver(&sunhv_reg);
+       sunserial_unregister_minors(&sunhv_reg, 1);
 
 out_free_con_read_page:
        kfree(con_read_page);
@@ -614,8 +607,7 @@ static int __devexit hv_remove(struct of_device *dev)
 
        uart_remove_one_port(&sunhv_reg, port);
 
-       sunserial_current_minor -= 1;
-       uart_unregister_driver(&sunhv_reg);
+       sunserial_unregister_minors(&sunhv_reg, 1);
 
        kfree(port);
        sunhv_port = NULL;
index ff610c23314bd74e5b9fa9d3f103334c1c957581..543f93741e6f5e9b09e79fb9f40076554cc9cc1a 100644 (file)
@@ -832,7 +832,6 @@ static struct uart_driver sunsab_reg = {
 };
 
 static struct uart_sunsab_port *sunsab_ports;
-static int num_channels;
 
 #ifdef CONFIG_SERIAL_SUNSAB_CONSOLE
 
@@ -1102,8 +1101,8 @@ static int __init sunsab_init(void)
 {
        struct device_node *dp;
        int err;
+       int num_channels = 0;
 
-       num_channels = 0;
        for_each_node_by_name(dp, "se")
                num_channels += 2;
        for_each_node_by_name(dp, "serial") {
@@ -1117,20 +1116,14 @@ static int __init sunsab_init(void)
                if (!sunsab_ports)
                        return -ENOMEM;
 
-               sunsab_reg.minor = sunserial_current_minor;
-               sunsab_reg.nr = num_channels;
                sunsab_reg.cons = SUNSAB_CONSOLE();
-
-               err = uart_register_driver(&sunsab_reg);
+               err = sunserial_register_minors(&sunsab_reg, num_channels);
                if (err) {
                        kfree(sunsab_ports);
                        sunsab_ports = NULL;
 
                        return err;
                }
-
-               sunsab_reg.tty_driver->name_base = sunsab_reg.minor - 64;
-               sunserial_current_minor += num_channels;
        }
 
        return of_register_driver(&sab_driver, &of_bus_type);
@@ -1139,9 +1132,8 @@ static int __init sunsab_init(void)
 static void __exit sunsab_exit(void)
 {
        of_unregister_driver(&sab_driver);
-       if (num_channels) {
-               sunserial_current_minor -= num_channels;
-               uart_unregister_driver(&sunsab_reg);
+       if (sunsab_reg.nr) {
+               sunserial_unregister_minors(&sunsab_reg, sunsab_reg.nr);
        }
 
        kfree(sunsab_ports);
index e074943feff536bc6be21b435acb527a6453c75b..4e2302d43ab163966234da9091b173b955a9c131 100644 (file)
@@ -1528,14 +1528,12 @@ static struct of_platform_driver su_driver = {
        .remove         = __devexit_p(su_remove),
 };
 
-static int num_uart;
-
 static int __init sunsu_init(void)
 {
        struct device_node *dp;
        int err;
+       int num_uart = 0;
 
-       num_uart = 0;
        for_each_node_by_name(dp, "su") {
                if (su_get_type(dp) == SU_PORT_PORT)
                        num_uart++;
@@ -1552,26 +1550,22 @@ static int __init sunsu_init(void)
        }
 
        if (num_uart) {
-               sunsu_reg.minor = sunserial_current_minor;
-               sunsu_reg.nr = num_uart;
-               err = uart_register_driver(&sunsu_reg);
+               err = sunserial_register_minors(&sunsu_reg, num_uart);
                if (err)
                        return err;
-               sunsu_reg.tty_driver->name_base = sunsu_reg.minor - 64;
-               sunserial_current_minor += num_uart;
        }
 
        err = of_register_driver(&su_driver, &of_bus_type);
        if (err && num_uart)
-               uart_unregister_driver(&sunsu_reg);
+               sunserial_unregister_minors(&sunsu_reg, num_uart);
 
        return err;
 }
 
 static void __exit sunsu_exit(void)
 {
-       if (num_uart)
-               uart_unregister_driver(&sunsu_reg);
+       if (sunsu_reg.nr)
+               sunserial_unregister_minors(&sunsu_reg, sunsu_reg.nr);
 }
 
 module_init(sunsu_init);
index 283bef0d24cb47a0fa0e956af5ef5a95c800a9ce..cb2e405063794f97922aaa6f5eaf9e0d77a15302 100644 (file)
        readb(&((__channel)->control))
 #endif
 
-static int num_sunzilog;
-#define NUM_SUNZILOG   num_sunzilog
-#define NUM_CHANNELS   (NUM_SUNZILOG * 2)
-
 #define ZS_CLOCK               4915200 /* Zilog input clock rate. */
 #define ZS_CLOCK_DIVISOR       16      /* Divisor this driver uses. */
 
@@ -1031,18 +1027,19 @@ static struct uart_driver sunzilog_reg = {
        .major          =       TTY_MAJOR,
 };
 
-static int __init sunzilog_alloc_tables(void)
+static int __init sunzilog_alloc_tables(int num_sunzilog)
 {
        struct uart_sunzilog_port *up;
        unsigned long size;
+       int num_channels = num_sunzilog * 2;
        int i;
 
-       size = NUM_CHANNELS * sizeof(struct uart_sunzilog_port);
+       size = num_channels * sizeof(struct uart_sunzilog_port);
        sunzilog_port_table = kzalloc(size, GFP_KERNEL);
        if (!sunzilog_port_table)
                return -ENOMEM;
 
-       for (i = 0; i < NUM_CHANNELS; i++) {
+       for (i = 0; i < num_channels; i++) {
                up = &sunzilog_port_table[i];
 
                spin_lock_init(&up->port.lock);
@@ -1050,13 +1047,13 @@ static int __init sunzilog_alloc_tables(void)
                if (i == 0)
                        sunzilog_irq_chain = up;
 
-               if (i < NUM_CHANNELS - 1)
+               if (i < num_channels - 1)
                        up->next = up + 1;
                else
                        up->next = NULL;
        }
 
-       size = NUM_SUNZILOG * sizeof(struct zilog_layout __iomem *);
+       size = num_sunzilog * sizeof(struct zilog_layout __iomem *);
        sunzilog_chip_regs = kzalloc(size, GFP_KERNEL);
        if (!sunzilog_chip_regs) {
                kfree(sunzilog_port_table);
@@ -1496,34 +1493,28 @@ static int __init sunzilog_init(void)
        struct device_node *dp;
        int err, uart_count;
        int num_keybms;
+       int num_sunzilog = 0;
 
-       NUM_SUNZILOG = 0;
        num_keybms = 0;
        for_each_node_by_name(dp, "zs") {
-               NUM_SUNZILOG++;
+               num_sunzilog++;
                if (of_find_property(dp, "keyboard", NULL))
                        num_keybms++;
        }
 
        uart_count = 0;
-       if (NUM_SUNZILOG) {
+       if (num_sunzilog) {
                int uart_count;
 
-               err = sunzilog_alloc_tables();
+               err = sunzilog_alloc_tables(num_sunzilog);
                if (err)
                        goto out;
 
-               uart_count = (NUM_SUNZILOG * 2) - (2 * num_keybms);
+               uart_count = (num_sunzilog * 2) - (2 * num_keybms);
 
-               sunzilog_reg.nr = uart_count;
-               sunzilog_reg.minor = sunserial_current_minor;
-               err = uart_register_driver(&sunzilog_reg);
+               err = sunserial_register_minors(&sunzilog_reg, uart_count);
                if (err)
                        goto out_free_tables;
-
-               sunzilog_reg.tty_driver->name_base = sunzilog_reg.minor - 64;
-
-               sunserial_current_minor += uart_count;
        }
 
        err = of_register_driver(&zs_driver, &of_bus_type);
@@ -1557,8 +1548,8 @@ out_unregister_driver:
        of_unregister_driver(&zs_driver);
 
 out_unregister_uart:
-       if (NUM_SUNZILOG) {
-               uart_unregister_driver(&sunzilog_reg);
+       if (num_sunzilog) {
+               sunserial_unregister_minors(&sunzilog_reg, num_sunzilog);
                sunzilog_reg.cons = NULL;
        }
 
@@ -1590,8 +1581,8 @@ static void __exit sunzilog_exit(void)
                zilog_irq = -1;
        }
 
-       if (NUM_SUNZILOG) {
-               uart_unregister_driver(&sunzilog_reg);
+       if (sunzilog_reg.nr) {
+               sunserial_unregister_minors(&sunzilog_reg, sunzilog_reg.nr);
                sunzilog_free_tables();
        }
 }
index 5cf6d5f9acbdb749340b0f8922f5ec177afbe3f5..3fb9af80cbf4319e133f1434453a38ae538944d2 100644 (file)
@@ -125,7 +125,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
 
        pci_set_master (dev);
 
-       retval = usb_add_hcd (hcd, dev->irq, IRQF_SHARED);
+       retval = usb_add_hcd(hcd, dev->irq, IRQF_DISABLED | IRQF_SHARED);
        if (retval != 0)
                goto err4;
        return retval;
index 13b326a13377051e54cf7824adffad8ef21fd1c0..b04d232d4c6561720f219ff506fcd2a35a9c0caf 100644 (file)
@@ -522,9 +522,9 @@ static void hub_quiesce(struct usb_hub *hub)
        /* (blocking) stop khubd and related activity */
        usb_kill_urb(hub->urb);
        if (hub->has_indicators)
-               cancel_delayed_work(&hub->leds);
-       if (hub->has_indicators || hub->tt.hub)
-               flush_scheduled_work();
+               cancel_delayed_work_sync(&hub->leds);
+       if (hub->tt.hub)
+               cancel_work_sync(&hub->tt.kevent);
 }
 
 static void hub_activate(struct usb_hub *hub)
index a6adf7e0f6f8de4cc49595211dc5de7e6d4e779e..cd62b029d1766e606945e2c8a12e1ecc08fd119f 100644 (file)
@@ -887,6 +887,7 @@ static void pullup(struct at91_udc *udc, int is_on)
 
        if (is_on) {
                clk_on(udc);
+               at91_udp_write(udc, AT91_UDP_ICR, AT91_UDP_RXRSM);
                at91_udp_write(udc, AT91_UDP_TXVC, 0);
                if (cpu_is_at91rm9200())
                        at91_set_gpio_value(udc->board.pullup_pin, 1);
@@ -904,6 +905,7 @@ static void pullup(struct at91_udc *udc, int is_on)
                }
        } else {
                stop_activity(udc);
+               at91_udp_write(udc, AT91_UDP_IDR, AT91_UDP_RXRSM);
                at91_udp_write(udc, AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS);
                if (cpu_is_at91rm9200())
                        at91_set_gpio_value(udc->board.pullup_pin, 0);
index b7b7bfbce527e057c7f509d0260b98609a7eeca5..430821cb95c8f32dae781f26a44290ae9138a7e3 100644 (file)
@@ -122,7 +122,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver,
        temp = in_le32(hcd->regs + 0x1a8);
        out_le32(hcd->regs + 0x1a8, temp | 0x3);
 
-       retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
+       retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
        if (retval != 0)
                goto err4;
        return retval;
index 704f33fdd2f12bc974966568984c2d63baf4c7a4..ecfe800fd7208e6c9602e87d51affcb4d2f948be 100644 (file)
@@ -732,24 +732,27 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
        struct ohci_regs __iomem *regs = ohci->regs;
        int                     ints;
 
-       /* we can eliminate a (slow) ohci_readl()
-        * if _only_ WDH caused this irq
+       /* Read interrupt status (and flush pending writes).  We ignore the
+        * optimization of checking the LSB of hcca->done_head; it doesn't
+        * work on all systems (edge triggering for OHCI can be a factor).
         */
-       if ((ohci->hcca->done_head != 0)
-                       && ! (hc32_to_cpup (ohci, &ohci->hcca->done_head)
-                               & 0x01)) {
-               ints =  OHCI_INTR_WDH;
+       ints = ohci_readl(ohci, &regs->intrstatus);
 
-       /* cardbus/... hardware gone before remove() */
-       } else if ((ints = ohci_readl (ohci, &regs->intrstatus)) == ~(u32)0) {
+       /* Check for an all 1's result which is a typical consequence
+        * of dead, unclocked, or unplugged (CardBus...) devices
+        */
+       if (ints == ~(u32)0) {
                disable (ohci);
                ohci_dbg (ohci, "device removed!\n");
                return IRQ_HANDLED;
+       }
+
+       /* We only care about interrupts that are enabled */
+       ints &= ohci_readl(ohci, &regs->intrenable);
 
        /* interrupt for some other device? */
-       } else if ((ints &= ohci_readl (ohci, &regs->intrenable)) == 0) {
+       if (ints == 0)
                return IRQ_NOTMINE;
-       }
 
        if (ints & OHCI_INTR_UE) {
                // e.g. due to PCI Master/Target Abort
index 0a74269201502e4381ecc609b6f039568d99b537..0c3e6b790b7b8e1372005940389d648affd69392 100644 (file)
@@ -142,7 +142,7 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
 
        ohci_hcd_init(ohci);
 
-       rv = usb_add_hcd(hcd, irq, 0);
+       rv = usb_add_hcd(hcd, irq, IRQF_DISABLED);
        if (rv == 0)
                return 0;
 
index fe70e72340de4e0735d40f67279a5d4ebcb6ce08..6e9c2d6db88756370c5b2f7d9a1bf9cc5d2beabe 100644 (file)
@@ -160,7 +160,7 @@ static int ssb_ohci_attach(struct ssb_device *dev)
        hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len);
        if (!hcd->regs)
                goto err_put_hcd;
-       err = usb_add_hcd(hcd, dev->irq, IRQF_SHARED);
+       err = usb_add_hcd(hcd, dev->irq, IRQF_DISABLED | IRQF_SHARED);
        if (err)
                goto err_iounmap;
 
index ae8ec4474eb801a1a748d3480cbbcb3fed1ddfd8..0ce2fc5e396b130dba59bca0bd2310658814624a 100644 (file)
@@ -2197,7 +2197,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
        INIT_LIST_HEAD(&r8a66597->child_device);
 
        hcd->rsrc_start = res->start;
-       ret = usb_add_hcd(hcd, irq, 0);
+       ret = usb_add_hcd(hcd, irq, IRQF_DISABLED);
        if (ret != 0) {
                err("Failed to add hcd");
                goto clean_up;
index 4db17f75f4f1a51268767ae1bf0b09f8c6461ec9..ec987897b8ededd485ac67a0a877a144cb24b39c 100644 (file)
@@ -378,7 +378,6 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
 {
        struct uhci_hcd *uhci = hcd_to_uhci(hcd);
        unsigned short status;
-       unsigned long flags;
 
        /*
         * Read the interrupt status, and write it back to clear the
@@ -398,7 +397,7 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
                        dev_err(uhci_dev(uhci), "host controller process "
                                        "error, something bad happened!\n");
                if (status & USBSTS_HCH) {
-                       spin_lock_irqsave(&uhci->lock, flags);
+                       spin_lock(&uhci->lock);
                        if (uhci->rh_state >= UHCI_RH_RUNNING) {
                                dev_err(uhci_dev(uhci),
                                        "host controller halted, "
@@ -415,16 +414,16 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
                                 * pending unlinks */
                                mod_timer(&hcd->rh_timer, jiffies);
                        }
-                       spin_unlock_irqrestore(&uhci->lock, flags);
+                       spin_unlock(&uhci->lock);
                }
        }
 
        if (status & USBSTS_RD)
                usb_hcd_poll_rh_status(hcd);
        else {
-               spin_lock_irqsave(&uhci->lock, flags);
+               spin_lock(&uhci->lock);
                uhci_scan_schedule(uhci);
-               spin_unlock_irqrestore(&uhci->lock, flags);
+               spin_unlock(&uhci->lock);
        }
 
        return IRQ_HANDLED;
index 3a83cb4c4bc258de412d9e48707e0addc4e1b1f6..da16b5157816b691df56ab8a692c3b812cc86bde 100644 (file)
@@ -71,6 +71,7 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */
        { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
        { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */
+       { USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */
        { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */
        { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
        { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
@@ -98,8 +99,8 @@ static struct usb_serial_driver cp2101_device = {
        .usb_driver             = &cp2101_driver,
        .id_table               = id_table,
        .num_interrupt_in       = 0,
-       .num_bulk_in            = 0,
-       .num_bulk_out           = 0,
+       .num_bulk_in            = NUM_DONT_CARE,
+       .num_bulk_out           = NUM_DONT_CARE,
        .num_ports              = 1,
        .open                   = cp2101_open,
        .close                  = cp2101_close,
index 4590124cf8883714377147949ff873bcf228f1a4..d1185f53447b3f0b915807376dc99867509e755c 100644 (file)
@@ -158,8 +158,8 @@ static struct usb_device_id option_ids[] = {
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) },
        { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
-       { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) },
-       { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) },
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1100) }, /* Novatel Merlin XS620/S640 */
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1110) }, /* Novatel Merlin S620 */
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1120) }, /* Novatel Merlin EX720 */
index 605ebccdcd51012b5f551538653ffb0ab175eb25..e5c274044a5fdd9accf3d2a4225e089565d56d57 100644 (file)
@@ -100,6 +100,7 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */
        { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */
        { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */
+       { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */
        { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */
        { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */
        { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U */
@@ -137,7 +138,6 @@ static struct usb_device_id id_table_3port [] = {
        { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */
        { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */
        { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */
-       { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */
        { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */
        { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */
        { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/
index 836a34ae6ec62a5737c3b46e3f47dfecdeff9c5f..7c9593b7b04e27da6c21577c18e6c3f907206f07 100644 (file)
@@ -114,9 +114,15 @@ static int slave_configure(struct scsi_device *sdev)
         * while others have trouble with more than 64K. At this time we
         * are limiting both to 32K (64 sectores).
         */
-       if ((us->flags & US_FL_MAX_SECTORS_64) &&
-                       sdev->request_queue->max_sectors > 64)
-               blk_queue_max_sectors(sdev->request_queue, 64);
+       if (us->flags & (US_FL_MAX_SECTORS_64 | US_FL_MAX_SECTORS_MIN)) {
+               unsigned int max_sectors = 64;
+
+               if (us->flags & US_FL_MAX_SECTORS_MIN)
+                       max_sectors = PAGE_CACHE_SIZE >> 9;
+               if (sdev->request_queue->max_sectors > max_sectors)
+                       blk_queue_max_sectors(sdev->request_queue,
+