Procházet zdrojové kódy

Merge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

Jody McIntyre před 19 roky
rodič
revize
a880b11a95
100 změnil soubory, kde provedl 658 přidání a 600 odebrání
  1. 1 1
      Documentation/arm/VFP/release-notes.txt
  2. 0 1
      Documentation/dvb/faq.txt
  3. 1 1
      Documentation/filesystems/affs.txt
  4. 1 2
      Documentation/filesystems/ext2.txt
  5. 5 5
      Documentation/floppy.txt
  6. 1 1
      Documentation/ioctl-number.txt
  7. 35 25
      Documentation/kernel-docs.txt
  8. 1 1
      Documentation/mca.txt
  9. 1 4
      Documentation/networking/driver.txt
  10. 1 8
      Documentation/networking/ifenslave.c
  11. 1 1
      Documentation/networking/iphase.txt
  12. 2 6
      Documentation/networking/irda.txt
  13. 1 2
      Documentation/networking/ray_cs.txt
  14. 14 14
      Documentation/networking/vortex.txt
  15. 1 1
      Documentation/power/pci.txt
  16. 2 2
      Documentation/scsi/ibmmca.txt
  17. 2 2
      Documentation/usb/ibmcam.txt
  18. 2 2
      Documentation/usb/ov511.txt
  19. 3 3
      Documentation/usb/rio.txt
  20. 5 2
      Documentation/video4linux/zr36120.txt
  21. 19 1
      MAINTAINERS
  22. 0 7
      arch/i386/kernel/process.c
  23. 2 2
      arch/i386/pci/common.c
  24. 1 1
      arch/i386/pci/direct.c
  25. 5 2
      arch/i386/pci/i386.c
  26. 0 7
      arch/ia64/kernel/process.c
  27. 10 6
      arch/powerpc/Makefile
  28. 0 1
      arch/powerpc/kernel/process.c
  29. 1 2
      arch/powerpc/kernel/vdso.c
  30. 0 4
      arch/powerpc/mm/4xx_mmu.c
  31. 4 6
      arch/powerpc/mm/hugetlbpage.c
  32. 1 1
      arch/powerpc/mm/mem.c
  33. 6 0
      arch/powerpc/mm/tlb_32.c
  34. 2 2
      arch/powerpc/mm/tlb_64.c
  35. 1 1
      arch/powerpc/platforms/iseries/iommu.c
  36. 1 1
      arch/powerpc/platforms/pseries/iommu.c
  37. 1 1
      arch/powerpc/sysdev/dart.h
  38. 2 2
      arch/powerpc/sysdev/u3_iommu.c
  39. 1 1
      arch/sparc/kernel/ioport.c
  40. 1 1
      arch/sparc/mm/generic.c
  41. 1 1
      arch/sparc64/kernel/sbus.c
  42. 1 1
      arch/sparc64/mm/generic.c
  43. 1 1
      arch/um/Makefile
  44. 9 0
      arch/um/include/sysdep-i386/stub.h
  45. 11 1
      arch/um/include/sysdep-x86_64/stub.h
  46. 14 7
      arch/um/kernel/skas/clone.c
  47. 1 1
      arch/um/sys-i386/Makefile
  48. 19 16
      arch/um/sys-i386/ldt.c
  49. 7 4
      arch/um/sys-i386/stub_segv.c
  50. 1 1
      arch/um/sys-x86_64/Makefile
  51. 10 10
      arch/um/sys-x86_64/stub_segv.c
  52. 0 7
      arch/x86_64/kernel/process.c
  53. 9 12
      drivers/base/bus.c
  54. 3 5
      drivers/base/dd.c
  55. 0 6
      drivers/block/floppy.c
  56. 11 5
      drivers/char/drm/drm_lock.c
  57. 1 1
      drivers/char/drm/drm_memory.c
  58. 1 1
      drivers/char/drm/drm_memory_debug.h
  59. 1 1
      drivers/char/drm/mga_drv.c
  60. 1 2
      drivers/char/drm/radeon_drv.h
  61. 1 1
      drivers/char/mem.c
  62. 1 1
      drivers/cpufreq/cpufreq.c
  63. 1 0
      drivers/firmware/Kconfig
  64. 1 1
      drivers/hwmon/hdaps.c
  65. 7 0
      drivers/hwmon/it87.c
  66. 1 1
      drivers/hwmon/lm78.c
  67. 6 2
      drivers/hwmon/w83627hf.c
  68. 2 2
      drivers/infiniband/core/mad.c
  69. 3 0
      drivers/md/dm-bio-list.h
  70. 2 1
      drivers/md/dm-ioctl.c
  71. 2 2
      drivers/md/dm-log.c
  72. 7 6
      drivers/md/dm-mpath.c
  73. 9 11
      drivers/md/dm-raid1.c
  74. 1 1
      drivers/message/i2o/pci.c
  75. 2 0
      drivers/net/dgrs.c
  76. 0 1
      drivers/pci/hotplug/pciehp.h
  77. 2 13
      drivers/pci/hotplug/pciehp_ctrl.c
  78. 9 1
      drivers/pci/hotplug/pciehp_hpc.c
  79. 1 0
      drivers/pci/pci-acpi.c
  80. 6 6
      drivers/sbus/char/aurora.c
  81. 5 4
      drivers/scsi/dpt_i2o.c
  82. 1 1
      drivers/scsi/scsi.c
  83. 36 2
      drivers/usb/core/hcd-pci.c
  84. 0 1
      drivers/usb/core/hub.c
  85. 84 76
      drivers/usb/host/ehci-hcd.c
  86. 7 0
      drivers/usb/host/ehci-hub.c
  87. 170 189
      drivers/usb/host/ehci-pci.c
  88. 0 36
      drivers/usb/host/ohci-pci.c
  89. 1 1
      drivers/usb/media/sn9c102_core.c
  90. 2 0
      drivers/usb/serial/ftdi_sio.c
  91. 7 0
      drivers/usb/serial/ftdi_sio.h
  92. 0 1
      drivers/usb/serial/ipw.c
  93. 9 0
      drivers/usb/storage/unusual_devs.h
  94. 2 2
      drivers/video/console/fbcon_rotate.h
  95. 1 0
      drivers/video/console/vgacon.c
  96. 5 1
      drivers/video/fbmem.c
  97. 8 8
      fs/compat.c
  98. 4 4
      fs/exec.c
  99. 8 4
      fs/hugetlbfs/inode.c
  100. 4 4
      fs/jffs2/debug.h

+ 1 - 1
Documentation/arm/VFP/release-notes.txt

@@ -12,7 +12,7 @@ This release has been validated against the SoftFloat-2b library by
 John R. Hauser using the TestFloat-2a test suite.  Details of this
 John R. Hauser using the TestFloat-2a test suite.  Details of this
 library and test suite can be found at:
 library and test suite can be found at:
 
 
-   http://www.cs.berkeley.edu/~jhauser/arithmetic/SoftFloat.html
+   http://www.jhauser.us/arithmetic/SoftFloat.html
 
 
 The operations which have been tested with this package are:
 The operations which have been tested with this package are:
 
 

+ 0 - 1
Documentation/dvb/faq.txt

@@ -60,7 +60,6 @@ Some very frequently asked questions about linuxtv-dvb
 		Metzler Bros. DVB development; alternate drivers and
 		Metzler Bros. DVB development; alternate drivers and
 		DVB utilities, include dvb-mpegtools and tuxzap.
 		DVB utilities, include dvb-mpegtools and tuxzap.
 
 
-	http://www.linuxstb.org/
 	http://sourceforge.net/projects/dvbtools/
 	http://sourceforge.net/projects/dvbtools/
 		Dave Chapman's dvbtools package, including
 		Dave Chapman's dvbtools package, including
 		dvbstream and dvbtune
 		dvbstream and dvbtune

+ 1 - 1
Documentation/filesystems/affs.txt

@@ -216,4 +216,4 @@ due to an incompatibility with the Amiga floppy controller.
 
 
 If you are interested in an Amiga Emulator for Linux, look at
 If you are interested in an Amiga Emulator for Linux, look at
 
 
-http://www-users.informatik.rwth-aachen.de/~crux/uae.html
+http://www.freiburg.linux.de/~uae/

+ 1 - 2
Documentation/filesystems/ext2.txt

@@ -369,9 +369,8 @@ The kernel source	file:/usr/src/linux/fs/ext2/
 e2fsprogs (e2fsck)	http://e2fsprogs.sourceforge.net/
 e2fsprogs (e2fsck)	http://e2fsprogs.sourceforge.net/
 Design & Implementation	http://e2fsprogs.sourceforge.net/ext2intro.html
 Design & Implementation	http://e2fsprogs.sourceforge.net/ext2intro.html
 Journaling (ext3)	ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/
 Journaling (ext3)	ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/
-Hashed Directories	http://kernelnewbies.org/~phillips/htree/
 Filesystem Resizing	http://ext2resize.sourceforge.net/
 Filesystem Resizing	http://ext2resize.sourceforge.net/
-Compression (*)		http://www.netspace.net.au/~reiter/e2compr/
+Compression (*)		http://e2compr.sourceforge.net/
 
 
 Implementations for:
 Implementations for:
 Windows 95/98/NT/2000	http://uranus.it.swin.edu.au/~jn/linux/Explore2fs.htm
 Windows 95/98/NT/2000	http://uranus.it.swin.edu.au/~jn/linux/Explore2fs.htm

+ 5 - 5
Documentation/floppy.txt

@@ -4,7 +4,7 @@ FAQ list:
 =========
 =========
 
 
  A FAQ list may be found in the fdutils package (see below), and also
  A FAQ list may be found in the fdutils package (see below), and also
-at http://fdutils.linux.lu/FAQ.html
+at <http://fdutils.linux.lu/faq.html>.
 
 
 
 
 LILO configuration options (Thinkpad users, read this)
 LILO configuration options (Thinkpad users, read this)
@@ -217,10 +217,10 @@ It also contains additional documentation about the floppy driver.
 The latest version can be found at fdutils homepage:
 The latest version can be found at fdutils homepage:
  http://fdutils.linux.lu
  http://fdutils.linux.lu
 
 
-The fdutils-5.4 release can be found at:
- http://fdutils.linux.lu/fdutils-5.4.src.tar.gz
- http://www.tux.org/pub/knaff/fdutils/fdutils-5.4.src.tar.gz
- ftp://metalab.unc.edu/pub/Linux/utils/disk-management/fdutils-5.4.src.tar.gz
+The fdutils releases can be found at:
+ http://fdutils.linux.lu/download.html
+ http://www.tux.org/pub/knaff/fdutils/
+ ftp://metalab.unc.edu/pub/Linux/utils/disk-management/
 
 
 Reporting problems about the floppy driver
 Reporting problems about the floppy driver
 ==========================================
 ==========================================

+ 1 - 1
Documentation/ioctl-number.txt

@@ -133,7 +133,7 @@ Code	Seq#	Include File		Comments
 'l'	00-3F	linux/tcfs_fs.h		transparent cryptographic file system
 'l'	00-3F	linux/tcfs_fs.h		transparent cryptographic file system
 					<http://mikonos.dia.unisa.it/tcfs>
 					<http://mikonos.dia.unisa.it/tcfs>
 'l'	40-7F	linux/udf_fs_i.h	in development:
 'l'	40-7F	linux/udf_fs_i.h	in development:
-					<http://www.trylinux.com/projects/udf/>
+					<http://sourceforge.net/projects/linux-udf/>
 'm'	all	linux/mtio.h		conflict!
 'm'	all	linux/mtio.h		conflict!
 'm'	all	linux/soundcard.h	conflict!
 'm'	all	linux/soundcard.h	conflict!
 'm'	all	linux/synclink.h	conflict!
 'm'	all	linux/synclink.h	conflict!

+ 35 - 25
Documentation/kernel-docs.txt

@@ -196,7 +196,7 @@
        
        
      * Title: "Writing Linux Device Drivers"
      * Title: "Writing Linux Device Drivers"
        Author: Michael K. Johnson.
        Author: Michael K. Johnson.
-       URL: http://people.redhat.com/johnsonm/devices.html
+       URL: http://users.evitech.fi/~tk/rtos/writing_linux_device_d.html
        Keywords: files, VFS, file operations, kernel interface, character
        Keywords: files, VFS, file operations, kernel interface, character
        vs block devices, I/O access, hardware interrupts, DMA, access to
        vs block devices, I/O access, hardware interrupts, DMA, access to
        user memory, memory allocation, timers.
        user memory, memory allocation, timers.
@@ -284,7 +284,7 @@
        
        
      * Title: "Linux Kernel Module Programming Guide"
      * Title: "Linux Kernel Module Programming Guide"
        Author: Ori Pomerantz.
        Author: Ori Pomerantz.
-       URL: http://www.tldp.org/LDP/lkmpg/mpg.html
+       URL: http://tldp.org/LDP/lkmpg/2.6/html/index.html
        Keywords: modules, GPL book, /proc, ioctls, system calls,
        Keywords: modules, GPL book, /proc, ioctls, system calls,
        interrupt handlers .
        interrupt handlers .
        Description: Very nice 92 pages GPL book on the topic of modules
        Description: Very nice 92 pages GPL book on the topic of modules
@@ -292,7 +292,7 @@
        
        
      * Title: "Device File System (devfs) Overview"
      * Title: "Device File System (devfs) Overview"
        Author: Richard Gooch.
        Author: Richard Gooch.
-       URL: http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.txt
+       URL: http://www.atnf.csiro.au/people/rgooch/linux/docs/devfs.html
        Keywords: filesystem, /dev, devfs, dynamic devices, major/minor
        Keywords: filesystem, /dev, devfs, dynamic devices, major/minor
        allocation, device management.
        allocation, device management.
        Description: Document describing Richard Gooch's controversial
        Description: Document describing Richard Gooch's controversial
@@ -316,9 +316,8 @@
        
        
      * Title: "The Kernel Hacking HOWTO"
      * Title: "The Kernel Hacking HOWTO"
        Author: Various Talented People, and Rusty.
        Author: Various Talented People, and Rusty.
-       URL:
-       http://www.lisoleg.net/doc/Kernel-Hacking-HOWTO/kernel-hacking-HOW
-       TO.html
+       Location: in kernel tree, Documentation/DocBook/kernel-hacking/
+       (must be built as "make {htmldocs | psdocs | pdfdocs})
        Keywords: HOWTO, kernel contexts, deadlock, locking, modules,
        Keywords: HOWTO, kernel contexts, deadlock, locking, modules,
        symbols, return conventions.
        symbols, return conventions.
        Description: From the Introduction: "Please understand that I
        Description: From the Introduction: "Please understand that I
@@ -332,13 +331,13 @@
        originally written for the 2.3 kernels, but nearly all of it
        originally written for the 2.3 kernels, but nearly all of it
        applies to 2.2 too; 2.0 is slightly different".
        applies to 2.2 too; 2.0 is slightly different".
        
        
-     * Title: "ALSA 0.5.0 Developer documentation"
-       Author: Stephan 'Jumpy' Bartels .
-       URL: http://www.math.TU-Berlin.de/~sbartels/alsa/
+     * Title: "Writing an ALSA Driver"
+       Author: Takashi Iwai <tiwai@suse.de>
+       URL: http://www.alsa-project.org/~iwai/writing-an-alsa-driver/index.html
        Keywords: ALSA, sound, soundcard, driver, lowlevel, hardware.
        Keywords: ALSA, sound, soundcard, driver, lowlevel, hardware.
        Description: Advanced Linux Sound Architecture for developers,
        Description: Advanced Linux Sound Architecture for developers,
-       both at kernel and user-level sides. Work in progress. ALSA is
-       supposed to be Linux's next generation sound architecture.
+       both at kernel and user-level sides. ALSA is the Linux kernel
+       sound architecture in the 2.6 kernel version.
        
        
      * Title: "Programming Guide for Linux USB Device Drivers"
      * Title: "Programming Guide for Linux USB Device Drivers"
        Author: Detlef Fliegl.
        Author: Detlef Fliegl.
@@ -369,8 +368,8 @@
        filesystems, IPC and Networking Code.
        filesystems, IPC and Networking Code.
        
        
      * Title: "Linux Kernel Mailing List Glossary"
      * Title: "Linux Kernel Mailing List Glossary"
-       Author: John Levon.
-       URL: http://www.movement.uklinux.net/glossary.html
+       Author: various
+       URL: http://kernelnewbies.org/glossary/
        Keywords: glossary, terms, linux-kernel.
        Keywords: glossary, terms, linux-kernel.
        Description: From the introduction: "This glossary is intended as
        Description: From the introduction: "This glossary is intended as
        a brief description of some of the acronyms and terms you may hear
        a brief description of some of the acronyms and terms you may hear
@@ -378,9 +377,8 @@
        
        
      * Title: "Linux Kernel Locking HOWTO"
      * Title: "Linux Kernel Locking HOWTO"
        Author: Various Talented People, and Rusty.
        Author: Various Talented People, and Rusty.
-       URL:
-       http://netfilter.kernelnotes.org/unreliable-guides/kernel-locking-
-       HOWTO.html
+       Location: in kernel tree, Documentation/DocBook/kernel-locking/
+       (must be built as "make {htmldocs | psdocs | pdfdocs})
        Keywords: locks, locking, spinlock, semaphore, atomic, race
        Keywords: locks, locking, spinlock, semaphore, atomic, race
        condition, bottom halves, tasklets, softirqs.
        condition, bottom halves, tasklets, softirqs.
        Description: The title says it all: document describing the
        Description: The title says it all: document describing the
@@ -490,7 +488,7 @@
        
        
      * Title: "Get those boards talking under Linux."
      * Title: "Get those boards talking under Linux."
        Author: Alex Ivchenko.
        Author: Alex Ivchenko.
-       URL: http://www.ednmag.com/ednmag/reg/2000/06222000/13df2.htm
+       URL: http://www.edn.com/article/CA46968.html
        Keywords: data-acquisition boards, drivers, modules, interrupts,
        Keywords: data-acquisition boards, drivers, modules, interrupts,
        memory allocation.
        memory allocation.
        Description: Article written for people wishing to make their data
        Description: Article written for people wishing to make their data
@@ -498,7 +496,7 @@
        overview on writing drivers, from the naming of functions to
        overview on writing drivers, from the naming of functions to
        interrupt handling.
        interrupt handling.
        Notes: Two-parts article. Part II is at
        Notes: Two-parts article. Part II is at
-       http://www.ednmag.com/ednmag/reg/2000/07062000/14df.htm
+       URL: http://www.edn.com/article/CA46998.html
        
        
      * Title: "Linux PCMCIA Programmer's Guide"
      * Title: "Linux PCMCIA Programmer's Guide"
        Author: David Hinds.
        Author: David Hinds.
@@ -529,7 +527,7 @@
        definitive guide for hackers, virus coders and system
        definitive guide for hackers, virus coders and system
        administrators."
        administrators."
        Author: pragmatic/THC.
        Author: pragmatic/THC.
-       URL: http://packetstorm.securify.com/groups/thc/LKM_HACKING.html
+       URL: http://packetstormsecurity.org/docs/hack/LKM_HACKING.html
        Keywords: syscalls, intercept, hide, abuse, symbol table.
        Keywords: syscalls, intercept, hide, abuse, symbol table.
        Description: Interesting paper on how to abuse the Linux kernel in
        Description: Interesting paper on how to abuse the Linux kernel in
        order to intercept and modify syscalls, make
        order to intercept and modify syscalls, make
@@ -537,8 +535,7 @@
        write kernel modules based virus... and solutions for admins to
        write kernel modules based virus... and solutions for admins to
        avoid all those abuses.
        avoid all those abuses.
        Notes: For 2.0.x kernels. Gives guidances to port it to 2.2.x
        Notes: For 2.0.x kernels. Gives guidances to port it to 2.2.x
-       kernels. Also available in txt format at
-       http://www.blacknemesis.org/hacking/txt/cllkm.txt
+       kernels.
        
        
      BOOKS: (Not on-line)
      BOOKS: (Not on-line)
    
    
@@ -557,7 +554,17 @@
        ISBN: 0-59600-008-1
        ISBN: 0-59600-008-1
        Notes: Further information in
        Notes: Further information in
        http://www.oreilly.com/catalog/linuxdrive2/
        http://www.oreilly.com/catalog/linuxdrive2/
-       
+
+     * Title: "Linux Device Drivers, 3nd Edition"
+       Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman
+       Publisher: O'Reilly & Associates.
+       Date: 2005.
+       Pages: 636.
+       ISBN: 0-596-00590-3
+       Notes: Further information in
+       http://www.oreilly.com/catalog/linuxdrive3/
+       PDF format, URL: http://lwn.net/Kernel/LDD3/
+
      * Title: "Linux Kernel Internals"
      * Title: "Linux Kernel Internals"
        Author: Michael Beck.
        Author: Michael Beck.
        Publisher: Addison-Wesley.
        Publisher: Addison-Wesley.
@@ -766,12 +773,15 @@
        documents, FAQs...
        documents, FAQs...
        
        
      * Name: "linux-kernel mailing list archives and search engines"
      * Name: "linux-kernel mailing list archives and search engines"
+       URL: http://vger.kernel.org/vger-lists.html
        URL: http://www.uwsg.indiana.edu/hypermail/linux/kernel/index.html
        URL: http://www.uwsg.indiana.edu/hypermail/linux/kernel/index.html
-       URL: http://www.kernelnotes.org/lnxlists/linux-kernel/
-       URL: http://www.geocrawler.com
+       URL: http://marc.theaimsgroup.com/?l=linux-kernel
+       URL: http://groups.google.com/group/mlist.linux.kernel
+       URL: http://www.cs.helsinki.fi/linux/linux-kernel/
+       URL: http://www.lib.uaa.alaska.edu/linux-kernel/
        Keywords: linux-kernel, archives, search.
        Keywords: linux-kernel, archives, search.
        Description: Some of the linux-kernel mailing list archivers. If
        Description: Some of the linux-kernel mailing list archivers. If
        you have a better/another one, please let me know.
        you have a better/another one, please let me know.
      _________________________________________________________________
      _________________________________________________________________
    
    
-   Document last updated on Thu Jun 28 15:09:39 CEST 2001
+   Document last updated on Sat 2005-NOV-19

+ 1 - 1
Documentation/mca.txt

@@ -252,7 +252,7 @@ their names here, but I don't have a list handy.  Check the MCA Linux
 home page (URL below) for a perpetually out-of-date list.
 home page (URL below) for a perpetually out-of-date list.
 
 
 =====================================================================
 =====================================================================
-MCA Linux Home Page: http://glycerine.itsmm.uni.edu/mca/
+MCA Linux Home Page: http://www.dgmicro.com/mca/
 
 
 Christophe Beauregard
 Christophe Beauregard
 chrisb@truespectra.com
 chrisb@truespectra.com

+ 1 - 4
Documentation/networking/driver.txt

@@ -1,7 +1,4 @@
-Documents about softnet driver issues in general can be found
-at:
-
-	http://www.firstfloor.org/~andi/softnet/
+Document about softnet driver issues
 
 
 Transmit path guidelines:
 Transmit path guidelines:
 
 

+ 1 - 8
Documentation/networking/ifenslave.c

@@ -693,13 +693,7 @@ static int enslave(char *master_ifname, char *slave_ifname)
 		/* Older bonding versions would panic if the slave has no IP
 		/* Older bonding versions would panic if the slave has no IP
 		 * address, so get the IP setting from the master.
 		 * address, so get the IP setting from the master.
 		 */
 		 */
-		res = set_if_addr(master_ifname, slave_ifname);
-		if (res) {
-			fprintf(stderr,
-				"Slave '%s': Error: set address failed\n",
-				slave_ifname);
-			return res;
-		}
+		set_if_addr(master_ifname, slave_ifname);
 	} else {
 	} else {
 		res = clear_if_addr(slave_ifname);
 		res = clear_if_addr(slave_ifname);
 		if (res) {
 		if (res) {
@@ -1085,7 +1079,6 @@ static int set_if_addr(char *master_ifname, char *slave_ifname)
 				slave_ifname, ifra[i].req_name,
 				slave_ifname, ifra[i].req_name,
 				strerror(saved_errno));
 				strerror(saved_errno));
 
 
-			return res;
 		}
 		}
 
 
 		ipaddr = ifr.ifr_addr.sa_data;
 		ipaddr = ifr.ifr_addr.sa_data;

+ 1 - 1
Documentation/networking/iphase.txt

@@ -22,7 +22,7 @@ The features and limitations of this driver are as follows:
     - All variants of Interphase ATM PCI (i)Chip adapter cards are supported, 
     - All variants of Interphase ATM PCI (i)Chip adapter cards are supported, 
       including x575 (OC3, control memory 128K , 512K and packet memory 128K, 
       including x575 (OC3, control memory 128K , 512K and packet memory 128K, 
       512K and 1M), x525 (UTP25) and x531 (DS3 and E3). See 
       512K and 1M), x525 (UTP25) and x531 (DS3 and E3). See 
-           http://www.iphase.com/products/ClassSheet.cfm?ClassID=ATM 
+      http://www.iphase.com/site/iphase-web/?epi_menuItemID=e196f04b4b3b40502f150882e21046a0
       for details.
       for details.
     - Only x86 platforms are supported.
     - Only x86 platforms are supported.
     - SMP is supported.
     - SMP is supported.

+ 2 - 6
Documentation/networking/irda.txt

@@ -3,12 +3,8 @@ of the IrDA Utilities. More detailed information about these and associated
 programs can be found on http://irda.sourceforge.net/
 programs can be found on http://irda.sourceforge.net/
 
 
 For more information about how to use the IrDA protocol stack, see the
 For more information about how to use the IrDA protocol stack, see the
-Linux Infared HOWTO (http://www.tuxmobil.org/Infrared-HOWTO/Infrared-HOWTO.html)
-by Werner Heuser <wehe@tuxmobil.org>
+Linux Infrared HOWTO by Werner Heuser <wehe@tuxmobil.org>:
+<http://www.tuxmobil.org/Infrared-HOWTO/Infrared-HOWTO.html>
 
 
 There is an active mailing list for discussing Linux-IrDA matters called
 There is an active mailing list for discussing Linux-IrDA matters called
     irda-users@lists.sourceforge.net
     irda-users@lists.sourceforge.net
-
-
-
-

+ 1 - 2
Documentation/networking/ray_cs.txt

@@ -29,8 +29,7 @@ with nondefault parameters, they can be edited in
 will find them all.
 will find them all.
 
 
 Information on card services is available at:
 Information on card services is available at:
-	ftp://hyper.stanford.edu/pub/pcmcia/doc
-        http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html
+	http://pcmcia-cs.sourceforge.net/
 
 
 
 
 Card services user programs are still required for PCMCIA devices.
 Card services user programs are still required for PCMCIA devices.

+ 14 - 14
Documentation/networking/vortex.txt

@@ -11,7 +11,7 @@ The driver was written by Donald Becker <becker@scyld.com>
 Don is no longer the prime maintainer of this version of the driver. 
 Don is no longer the prime maintainer of this version of the driver. 
 Please report problems to one or more of:
 Please report problems to one or more of:
 
 
-  Andrew Morton <andrewm@uow.edu.au>
+  Andrew Morton <akpm@osdl.org>
   Netdev mailing list <netdev@vger.kernel.org>
   Netdev mailing list <netdev@vger.kernel.org>
   Linux kernel mailing list <linux-kernel@vger.kernel.org>
   Linux kernel mailing list <linux-kernel@vger.kernel.org>
 
 
@@ -274,24 +274,24 @@ Details of the device driver implementation are at the top of the source file.
 
 
 Additional documentation is available at Don Becker's Linux Drivers site:
 Additional documentation is available at Don Becker's Linux Drivers site:
 
 
-  http://www.scyld.com/network/vortex.html
+     http://www.scyld.com/vortex.html
 
 
 Donald Becker's driver development site:
 Donald Becker's driver development site:
 
 
-     http://www.scyld.com/network
+     http://www.scyld.com/network.html
 
 
 Donald's vortex-diag program is useful for inspecting the NIC's state:
 Donald's vortex-diag program is useful for inspecting the NIC's state:
 
 
-     http://www.scyld.com/diag/#pci-diags
+     http://www.scyld.com/ethercard_diag.html
 
 
 Donald's mii-diag program may be used for inspecting and manipulating
 Donald's mii-diag program may be used for inspecting and manipulating
 the NIC's Media Independent Interface subsystem:
 the NIC's Media Independent Interface subsystem:
 
 
-     http://www.scyld.com/diag/#mii-diag
+     http://www.scyld.com/ethercard_diag.html#mii-diag
 
 
 Donald's wake-on-LAN page:
 Donald's wake-on-LAN page:
 
 
-     http://www.scyld.com/expert/wake-on-lan.html
+     http://www.scyld.com/wakeonlan.html
 
 
 3Com's documentation for many NICs, including the ones supported by
 3Com's documentation for many NICs, including the ones supported by
 this driver is available at 
 this driver is available at 
@@ -305,7 +305,7 @@ this driver is available at
 Driver updates and a detailed changelog for the modifications which
 Driver updates and a detailed changelog for the modifications which
 were made for the 2.3/2,4 series kernel is available at
 were made for the 2.3/2,4 series kernel is available at
 
 
-     http://www.uow.edu.au/~andrewm/linux/#3c59x-2.3
+     http://www.zip.com.au/~akpm/linux/#3c59x-bc
 
 
 
 
 Autonegotiation notes
 Autonegotiation notes
@@ -434,8 +434,8 @@ steps you should take:
          send all logs to the maintainer.
          send all logs to the maintainer.
 
 
       3) Download you card's diagnostic tool from Donald
       3) Download you card's diagnostic tool from Donald
-         Backer's website http://www.scyld.com/diag.  Download
-         mii-diag.c as well.  Build these.
+         Becker's website <http://www.scyld.com/ethercard_diag.html>.
+         Download mii-diag.c as well.  Build these.
 
 
          a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is
          a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is
             working correctly.  Save the output.
             working correctly.  Save the output.
@@ -443,8 +443,8 @@ steps you should take:
          b) Run the above commands when the card is malfunctioning.  Send
          b) Run the above commands when the card is malfunctioning.  Send
             both sets of output.
             both sets of output.
 
 
-Finally, please be patient and be prepared to do some work.  You may end up working on
-this problem for a week or more as the maintainer asks more questions, asks for more
-tests, asks for patches to be applied, etc.  At the end of it all, the problem may even
-remain unresolved.
-
+Finally, please be patient and be prepared to do some work.  You may
+end up working on this problem for a week or more as the maintainer
+asks more questions, asks for more tests, asks for patches to be
+applied, etc.  At the end of it all, the problem may even remain
+unresolved.

+ 1 - 1
Documentation/power/pci.txt

@@ -335,5 +335,5 @@ this on the whole.
 PCI Local Bus Specification 
 PCI Local Bus Specification 
 PCI Bus Power Management Interface Specification
 PCI Bus Power Management Interface Specification
 
 
-  http://pcisig.org
+  http://www.pcisig.com
 
 

+ 2 - 2
Documentation/scsi/ibmmca.txt

@@ -1108,7 +1108,7 @@
      A: You have to activate MCA bus support, first.
      A: You have to activate MCA bus support, first.
      Q: Where can I find the latest info about this driver?
      Q: Where can I find the latest info about this driver?
      A: See the file MAINTAINERS for the current WWW-address, which offers
      A: See the file MAINTAINERS for the current WWW-address, which offers
-        updates, info and Q/A lists. At this files' origin, the webaddress
+        updates, info and Q/A lists. At this file's origin, the webaddress
 	was: http://www.uni-mainz.de/~langm000/linux.html
 	was: http://www.uni-mainz.de/~langm000/linux.html
      Q: My SCSI-adapter is not recognized by the driver, what can I do?
      Q: My SCSI-adapter is not recognized by the driver, what can I do?
      A: Just force it to be recognized by kernel parameters. See section 5.1.
      A: Just force it to be recognized by kernel parameters. See section 5.1.
@@ -1248,7 +1248,7 @@
    --------------------
    --------------------
    The address of the IBM SCSI-subsystem supporting WWW-page is:
    The address of the IBM SCSI-subsystem supporting WWW-page is:
    
    
-        http://www.uni-mainz.de/~langm000/linux.html
+        http://www.staff.uni-mainz.de/mlang/linux.html
 	
 	
    Here you can find info about the background of this driver, patches,
    Here you can find info about the background of this driver, patches,
    troubleshooting support, news and a bugreport form. Please check that
    troubleshooting support, news and a bugreport form. Please check that

+ 2 - 2
Documentation/usb/ibmcam.txt

@@ -28,8 +28,8 @@ SUPPORTED CAMERAS:
 Xirlink "C-It" camera, also known as "IBM PC Camera".
 Xirlink "C-It" camera, also known as "IBM PC Camera".
 The device uses proprietary ASIC (and compression method);
 The device uses proprietary ASIC (and compression method);
 it is manufactured by Xirlink. See http://www.xirlink.com/
 it is manufactured by Xirlink. See http://www.xirlink.com/
-http://www.ibmpccamera.com or http://www.c-itnow.com/ for
-details and pictures.
+(renamed to http://www.veo.com), http://www.ibmpccamera.com,
+or http://www.c-itnow.com/ for details and pictures.
 
 
 This very chipset ("X Chip", as marked at the factory)
 This very chipset ("X Chip", as marked at the factory)
 is used in several other cameras, and they are supported
 is used in several other cameras, and they are supported

+ 2 - 2
Documentation/usb/ov511.txt

@@ -22,8 +22,8 @@ WHAT YOU NEED:
   http://www.ovt.com/omniusbp.html
   http://www.ovt.com/omniusbp.html
 
 
 - A Video4Linux compatible frame grabber program (I recommend vidcat and xawtv)
 - A Video4Linux compatible frame grabber program (I recommend vidcat and xawtv)
-    vidcat is part of the w3cam package:  http://www.hdk-berlin.de/~rasca/w3cam/
-    xawtv is available at:  http://www.in-berlin.de/User/kraxel/xawtv.html
+    vidcat is part of the w3cam package:  http://mpx.freeshell.net/
+    xawtv is available at:  http://linux.bytesex.org/xawtv/
 
 
 HOW TO USE IT:
 HOW TO USE IT:
 
 

+ 3 - 3
Documentation/usb/rio.txt

@@ -46,9 +46,9 @@ Contact information:
 --------------------
 --------------------
 
 
    The main page for the project is hosted at sourceforge.net in the following
    The main page for the project is hosted at sourceforge.net in the following
-   address: http://rio500.sourceforge.net You can also go to the sourceforge
-   project page at: http://sourceforge.net/project/?group_id=1944 There is 
-   also a mailing list: rio500-users@lists.sourceforge.net
+   URL: <http://rio500.sourceforge.net>. You can also go to the project's
+   sourceforge home page at: <http://sourceforge.net/projects/rio500/>.
+   There is also a mailing list: rio500-users@lists.sourceforge.net
 
 
 Authors:
 Authors:
 -------
 -------

+ 5 - 2
Documentation/video4linux/zr36120.txt

@@ -76,8 +76,11 @@ activates the GRAB bit. A few ms later the VSYNC (re-)rises and
 the zoran starts to work on a new and freshly broadcasted frame....
 the zoran starts to work on a new and freshly broadcasted frame....
 
 
 For pointers I used the specs of both chips. Below are the URLs:
 For pointers I used the specs of both chips. Below are the URLs:
-	http://www.zoran.com/ftp/download/devices/pci/ZR36120/36120data.pdf
-	http://www-us.semiconductor.philips.com/acrobat/datasheets/SAA_7110_A_1.pdf
+  http://www.zoran.com/ftp/download/devices/pci/ZR36120/36120data.pdf
+  http://www-us.semiconductor.philips.com/acrobat/datasheets/SAA_7110_A_1.pdf
+Some alternatives for the Philips SAA 7110 datasheet are:
+  http://www.datasheetcatalog.com/datasheets_pdf/S/A/A/7/SAA7110.shtml
+  http://www.datasheetarchive.com/search.php?search=SAA7110&sType=part
 
 
 The documentation has very little on absolute numbers or timings
 The documentation has very little on absolute numbers or timings
 needed for the various modes/resolutions, but there are other
 needed for the various modes/resolutions, but there are other

+ 19 - 1
MAINTAINERS

@@ -58,7 +58,7 @@ P: Person
 M: Mail patches to
 M: Mail patches to
 L: Mailing list that is relevant to this area
 L: Mailing list that is relevant to this area
 W: Web-page with status/info
 W: Web-page with status/info
-T: SCM tree type and URL.  Type is one of: git, hg, quilt.
+T: SCM tree type and location.  Type is one of: git, hg, quilt.
 S: Status, one of the following:
 S: Status, one of the following:
 
 
 	Supported:	Someone is actually paid to look after this.
 	Supported:	Someone is actually paid to look after this.
@@ -227,6 +227,7 @@ AGPGART DRIVER
 P:	Dave Jones
 P:	Dave Jones
 M:	davej@codemonkey.org.uk
 M:	davej@codemonkey.org.uk
 W:	http://www.codemonkey.org.uk/projects/agp/
 W:	http://www.codemonkey.org.uk/projects/agp/
+T:	git kernel.org:/pub/scm/linux/kernel/git/davej/agpgart.git
 S:	Maintained
 S:	Maintained
 
 
 AHA152X SCSI DRIVER
 AHA152X SCSI DRIVER
@@ -384,6 +385,7 @@ P:	David Woodhouse
 M:	dwmw2@infradead.org
 M:	dwmw2@infradead.org
 L:	linux-audit@redhat.com
 L:	linux-audit@redhat.com
 W:	http://people.redhat.com/sgrubb/audit/
 W:	http://people.redhat.com/sgrubb/audit/
+T:	git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git
 S:	Maintained
 S:	Maintained
 
 
 AX.25 NETWORK LAYER
 AX.25 NETWORK LAYER
@@ -432,6 +434,7 @@ L:	bluez-devel@lists.sf.net
 W:	http://bluez.sf.net
 W:	http://bluez.sf.net
 W:	http://www.bluez.org
 W:	http://www.bluez.org
 W:	http://www.holtmann.org/linux/bluetooth/
 W:	http://www.holtmann.org/linux/bluetooth/
+T:	git kernel.org:/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6.git
 S:	Maintained
 S:	Maintained
 
 
 BLUETOOTH RFCOMM LAYER
 BLUETOOTH RFCOMM LAYER
@@ -547,6 +550,7 @@ P:	Steve French
 M:	sfrench@samba.org
 M:	sfrench@samba.org
 L:	samba-technical@lists.samba.org
 L:	samba-technical@lists.samba.org
 W:	http://us1.samba.org/samba/Linux_CIFS_client.html
 W:	http://us1.samba.org/samba/Linux_CIFS_client.html
+T:	git kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
 S:	Supported	
 S:	Supported	
 
 
 CIRRUS LOGIC GENERIC FBDEV DRIVER
 CIRRUS LOGIC GENERIC FBDEV DRIVER
@@ -608,6 +612,7 @@ P:	Dave Jones
 M:	davej@codemonkey.org.uk
 M:	davej@codemonkey.org.uk
 L:	cpufreq@lists.linux.org.uk
 L:	cpufreq@lists.linux.org.uk
 W:	http://www.codemonkey.org.uk/projects/cpufreq/
 W:	http://www.codemonkey.org.uk/projects/cpufreq/
+T:	git kernel.org/pub/scm/linux/kernel/davej/cpufreq.git
 S:	Maintained
 S:	Maintained
 
 
 CPUID/MSR DRIVER
 CPUID/MSR DRIVER
@@ -641,6 +646,7 @@ M:	herbert@gondor.apana.org.au
 P:	David S. Miller
 P:	David S. Miller
 M:	davem@davemloft.net
 M:	davem@davemloft.net
 L:	linux-crypto@vger.kernel.org
 L:	linux-crypto@vger.kernel.org
+T:	git kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6.git
 S:	Maintained
 S:	Maintained
 
 
 CYBERPRO FB DRIVER
 CYBERPRO FB DRIVER
@@ -1185,6 +1191,7 @@ P:	Bartlomiej Zolnierkiewicz
 M:	B.Zolnierkiewicz@elka.pw.edu.pl
 M:	B.Zolnierkiewicz@elka.pw.edu.pl
 L:	linux-kernel@vger.kernel.org
 L:	linux-kernel@vger.kernel.org
 L:	linux-ide@vger.kernel.org
 L:	linux-ide@vger.kernel.org
+T:	git kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git
 S:	Maintained
 S:	Maintained
 
 
 IDE/ATAPI CDROM DRIVER
 IDE/ATAPI CDROM DRIVER
@@ -1279,6 +1286,7 @@ P:	Vojtech Pavlik
 M:	vojtech@suse.cz
 M:	vojtech@suse.cz
 L:	linux-input@atrey.karlin.mff.cuni.cz
 L:	linux-input@atrey.karlin.mff.cuni.cz
 L:	linux-joystick@atrey.karlin.mff.cuni.cz
 L:	linux-joystick@atrey.karlin.mff.cuni.cz
+T:	git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git
 S:	Maintained
 S:	Maintained
 
 
 INOTIFY
 INOTIFY
@@ -1392,6 +1400,7 @@ P:	Kai Germaschewski
 M:	kai.germaschewski@gmx.de
 M:	kai.germaschewski@gmx.de
 L:	isdn4linux@listserv.isdn4linux.de
 L:	isdn4linux@listserv.isdn4linux.de
 W:	http://www.isdn4linux.de
 W:	http://www.isdn4linux.de
+T:	git kernel.org:/pub/scm/linux/kernel/kkeil/isdn-2.6.git
 S:	Maintained
 S:	Maintained
 
 
 ISDN SUBSYSTEM (Eicon active card driver)
 ISDN SUBSYSTEM (Eicon active card driver)
@@ -1420,6 +1429,7 @@ P:	Dave Kleikamp
 M:	shaggy@austin.ibm.com
 M:	shaggy@austin.ibm.com
 L:	jfs-discussion@lists.sourceforge.net
 L:	jfs-discussion@lists.sourceforge.net
 W:	http://jfs.sourceforge.net/
 W:	http://jfs.sourceforge.net/
+T:	git kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6.git
 S:	Supported
 S:	Supported
 
 
 KCONFIG
 KCONFIG
@@ -1534,6 +1544,7 @@ P:	Paul Mackerras
 M:	paulus@samba.org
 M:	paulus@samba.org
 W:	http://www.penguinppc.org/
 W:	http://www.penguinppc.org/
 L:	linuxppc-dev@ozlabs.org
 L:	linuxppc-dev@ozlabs.org
+T:	git kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc.git
 S:	Supported
 S:	Supported
 
 
 LINUX FOR POWER MACINTOSH
 LINUX FOR POWER MACINTOSH
@@ -1601,6 +1612,7 @@ P:	Chris Wright
 M:	chrisw@osdl.org
 M:	chrisw@osdl.org
 L:	linux-security-module@wirex.com
 L:	linux-security-module@wirex.com
 W:	http://lsm.immunix.org
 W:	http://lsm.immunix.org
+T:	git kernel.org:/pub/scm/linux/kernel/git/chrisw/lsm-2.6.git
 S:	Supported
 S:	Supported
 
 
 LM83 HARDWARE MONITOR DRIVER
 LM83 HARDWARE MONITOR DRIVER
@@ -1695,6 +1707,7 @@ P:	David Woodhouse
 M:	dwmw2@infradead.org
 M:	dwmw2@infradead.org
 W:	http://www.linux-mtd.infradead.org/
 W:	http://www.linux-mtd.infradead.org/
 L:	linux-mtd@lists.infradead.org
 L:	linux-mtd@lists.infradead.org
+T:	git kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6.git
 S:	Maintained
 S:	Maintained
 
 
 MICROTEK X6 SCANNER
 MICROTEK X6 SCANNER
@@ -1815,6 +1828,7 @@ M:	yoshfuji@linux-ipv6.org
 P:	Patrick McHardy
 P:	Patrick McHardy
 M:	kaber@coreworks.de
 M:	kaber@coreworks.de
 L:	netdev@vger.kernel.org
 L:	netdev@vger.kernel.org
+T:	git kernel.org:/pub/scm/linux/kernel/davem/net-2.6.git
 S:	Maintained
 S:	Maintained
 
 
 IPVS
 IPVS
@@ -1866,6 +1880,7 @@ M:	aia21@cantab.net
 L:	linux-ntfs-dev@lists.sourceforge.net
 L:	linux-ntfs-dev@lists.sourceforge.net
 L:	linux-kernel@vger.kernel.org
 L:	linux-kernel@vger.kernel.org
 W:	http://linux-ntfs.sf.net/
 W:	http://linux-ntfs.sf.net/
+T:	git kernel.org:/pub/scm/linux/kernel/git/aia21/ntfs-2.6.git
 S:	Maintained
 S:	Maintained
 
 
 NVIDIA (RIVA) FRAMEBUFFER DRIVER
 NVIDIA (RIVA) FRAMEBUFFER DRIVER
@@ -2389,6 +2404,7 @@ P:	Anton Blanchard
 M:	anton@samba.org
 M:	anton@samba.org
 L:	sparclinux@vger.kernel.org
 L:	sparclinux@vger.kernel.org
 L:	ultralinux@vger.kernel.org
 L:	ultralinux@vger.kernel.org
+T:	git kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6.git
 S:	Maintained
 S:	Maintained
 
 
 SHARP LH SUPPORT (LH7952X & LH7A40X)
 SHARP LH SUPPORT (LH7952X & LH7A40X)
@@ -2527,6 +2543,7 @@ P:      Adrian Bunk
 M:      trivial@kernel.org
 M:      trivial@kernel.org
 L:      linux-kernel@vger.kernel.org
 L:      linux-kernel@vger.kernel.org
 W:      http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/
 W:      http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/
+T:      git kernel.org:/pub/scm/linux/kernel/git/bunk/trivial.git
 S:      Maintained
 S:      Maintained
 
 
 TMS380 TOKEN-RING NETWORK DRIVER
 TMS380 TOKEN-RING NETWORK DRIVER
@@ -2860,6 +2877,7 @@ P:      Latchesar Ionkov
 M:      lucho@ionkov.net
 M:      lucho@ionkov.net
 L:      v9fs-developer@lists.sourceforge.net
 L:      v9fs-developer@lists.sourceforge.net
 W:      http://v9fs.sf.net
 W:      http://v9fs.sf.net
+T:      git kernel.org:/pub/scm/linux/kernel/ericvh/v9fs-devel.git
 S:      Maintained
 S:      Maintained
 
 
 VIDEO FOR LINUX
 VIDEO FOR LINUX

+ 0 - 7
arch/i386/kernel/process.c

@@ -393,13 +393,6 @@ void flush_thread(void)
 {
 {
 	struct task_struct *tsk = current;
 	struct task_struct *tsk = current;
 
 
-	/*
-	 * Remove function-return probe instances associated with this task
-	 * and put them back on the free list. Do not insert an exit probe for
-	 * this function, it will be disabled by kprobe_flush_task if you do.
-	 */
-	kprobe_flush_task(tsk);
-
 	memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
 	memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
 	memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));	
 	memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));	
 	/*
 	/*

+ 2 - 2
arch/i386/pci/common.c

@@ -132,7 +132,7 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum)
 		}
 		}
 	}
 	}
 
 
-	printk("PCI: Probing PCI hardware (bus %02x)\n", busnum);
+	printk(KERN_DEBUG "PCI: Probing PCI hardware (bus %02x)\n", busnum);
 
 
 	return pci_scan_bus_parented(NULL, busnum, &pci_root_ops, NULL);
 	return pci_scan_bus_parented(NULL, busnum, &pci_root_ops, NULL);
 }
 }
@@ -144,7 +144,7 @@ static int __init pcibios_init(void)
 	struct cpuinfo_x86 *c = &boot_cpu_data;
 	struct cpuinfo_x86 *c = &boot_cpu_data;
 
 
 	if (!raw_pci_ops) {
 	if (!raw_pci_ops) {
-		printk("PCI: System does not support PCI\n");
+		printk(KERN_WARNING "PCI: System does not support PCI\n");
 		return 0;
 		return 0;
 	}
 	}
 
 

+ 1 - 1
arch/i386/pci/direct.c

@@ -201,7 +201,7 @@ static int __init pci_sanity_check(struct pci_raw_ops *o)
 			return 1;
 			return 1;
 	}
 	}
 
 
-	DBG("PCI: Sanity check failed\n");
+	DBG(KERN_WARNING "PCI: Sanity check failed\n");
 	return 0;
 	return 0;
 }
 }
 
 

+ 5 - 2
arch/i386/pci/i386.c

@@ -221,6 +221,11 @@ int pcibios_enable_resources(struct pci_dev *dev, int mask)
 			continue;
 			continue;
 
 
 		r = &dev->resource[idx];
 		r = &dev->resource[idx];
+		if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
+			continue;
+		if ((idx == PCI_ROM_RESOURCE) &&
+				(!(r->flags & IORESOURCE_ROM_ENABLE)))
+			continue;
 		if (!r->start && r->end) {
 		if (!r->start && r->end) {
 			printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
 			printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
 			return -EINVAL;
 			return -EINVAL;
@@ -230,8 +235,6 @@ int pcibios_enable_resources(struct pci_dev *dev, int mask)
 		if (r->flags & IORESOURCE_MEM)
 		if (r->flags & IORESOURCE_MEM)
 			cmd |= PCI_COMMAND_MEMORY;
 			cmd |= PCI_COMMAND_MEMORY;
 	}
 	}
-	if (dev->resource[PCI_ROM_RESOURCE].start)
-		cmd |= PCI_COMMAND_MEMORY;
 	if (cmd != old_cmd) {
 	if (cmd != old_cmd) {
 		printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);
 		printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd);
 		pci_write_config_word(dev, PCI_COMMAND, cmd);
 		pci_write_config_word(dev, PCI_COMMAND, cmd);

+ 0 - 7
arch/ia64/kernel/process.c

@@ -718,13 +718,6 @@ kernel_thread_helper (int (*fn)(void *), void *arg)
 void
 void
 flush_thread (void)
 flush_thread (void)
 {
 {
-	/*
-	 * Remove function-return probe instances associated with this task
-	 * and put them back on the free list. Do not insert an exit probe for
-	 * this function, it will be disabled by kprobe_flush_task if you do.
-	 */
-	kprobe_flush_task(current);
-
 	/* drop floating-point and debug-register state if it exists: */
 	/* drop floating-point and debug-register state if it exists: */
 	current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
 	current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
 	ia64_drop_fpu(current);
 	ia64_drop_fpu(current);

+ 10 - 6
arch/powerpc/Makefile

@@ -61,15 +61,17 @@ endif
 LDFLAGS_vmlinux	:= -Bstatic
 LDFLAGS_vmlinux	:= -Bstatic
 
 
 # The -Iarch/$(ARCH)/include is temporary while we are merging
 # The -Iarch/$(ARCH)/include is temporary while we are merging
-CPPFLAGS	+= -Iarch/$(ARCH) -Iarch/$(ARCH)/include
-AFLAGS		+= -Iarch/$(ARCH)
-CFLAGS		+= -Iarch/$(ARCH) -msoft-float -pipe
+CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -Iarch/$(ARCH)/include
+AFLAGS-$(CONFIG_PPC32)	:= -Iarch/$(ARCH)
 CFLAGS-$(CONFIG_PPC64)	:= -mminimal-toc -mtraceback=none  -mcall-aixdesc
 CFLAGS-$(CONFIG_PPC64)	:= -mminimal-toc -mtraceback=none  -mcall-aixdesc
-CFLAGS-$(CONFIG_PPC32)	:= -ffixed-r2 -mmultiple
-CFLAGS		+= $(CFLAGS-y)
+CFLAGS-$(CONFIG_PPC32)	:= -Iarch/$(ARCH) -ffixed-r2 -mmultiple
+CPPFLAGS	+= $(CPPFLAGS-y)
+AFLAGS		+= $(AFLAGS-y)
+CFLAGS		+= -msoft-float -pipe $(CFLAGS-y)
 CPP		= $(CC) -E $(CFLAGS)
 CPP		= $(CC) -E $(CFLAGS)
 # Temporary hack until we have migrated to asm-powerpc
 # Temporary hack until we have migrated to asm-powerpc
-LINUXINCLUDE    += -Iarch/$(ARCH)/include
+LINUXINCLUDE-$(CONFIG_PPC32)	:= -Iarch/$(ARCH)/include
+LINUXINCLUDE    += $(LINUXINCLUDE-y)
 
 
 CHECKFLAGS	+= -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__
 CHECKFLAGS	+= -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__
 
 
@@ -173,11 +175,13 @@ archclean:
 
 
 archprepare: checkbin
 archprepare: checkbin
 
 
+ifeq ($(CONFIG_PPC32),y)
 # Temporary hack until we have migrated to asm-powerpc
 # Temporary hack until we have migrated to asm-powerpc
 include/asm: arch/$(ARCH)/include/asm
 include/asm: arch/$(ARCH)/include/asm
 arch/$(ARCH)/include/asm: FORCE
 arch/$(ARCH)/include/asm: FORCE
 	$(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi
 	$(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi
 	$(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm
 	$(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm
+endif
 
 
 # Use the file '.tmp_gas_check' for binutils tests, as gas won't output
 # Use the file '.tmp_gas_check' for binutils tests, as gas won't output
 # to stdout and these checks are run even on install targets.
 # to stdout and these checks are run even on install targets.

+ 0 - 1
arch/powerpc/kernel/process.c

@@ -457,7 +457,6 @@ void flush_thread(void)
 	if (t->flags & _TIF_ABI_PENDING)
 	if (t->flags & _TIF_ABI_PENDING)
 		t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT);
 		t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT);
 #endif
 #endif
-	kprobe_flush_task(current);
 
 
 #ifndef CONFIG_SMP
 #ifndef CONFIG_SMP
 	if (last_task_used_math == current)
 	if (last_task_used_math == current)

+ 1 - 2
arch/powerpc/kernel/vdso.c

@@ -285,8 +285,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
 	 * It's fine to use that for setting breakpoints in the vDSO code
 	 * It's fine to use that for setting breakpoints in the vDSO code
 	 * pages though
 	 * pages though
 	 */
 	 */
-	vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE |
-		VM_MAYEXEC | VM_RESERVED;
+	vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
 	vma->vm_flags |= mm->def_flags;
 	vma->vm_flags |= mm->def_flags;
 	vma->vm_page_prot = protection_map[vma->vm_flags & 0x7];
 	vma->vm_page_prot = protection_map[vma->vm_flags & 0x7];
 	vma->vm_ops = &vdso_vmops;
 	vma->vm_ops = &vdso_vmops;

+ 0 - 4
arch/powerpc/mm/4xx_mmu.c

@@ -110,13 +110,11 @@ unsigned long __init mmu_mapin_ram(void)
 		pmd_t *pmdp;
 		pmd_t *pmdp;
 		unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
 		unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
 
 
-		spin_lock(&init_mm.page_table_lock);
 		pmdp = pmd_offset(pgd_offset_k(v), v);
 		pmdp = pmd_offset(pgd_offset_k(v), v);
 		pmd_val(*pmdp++) = val;
 		pmd_val(*pmdp++) = val;
 		pmd_val(*pmdp++) = val;
 		pmd_val(*pmdp++) = val;
 		pmd_val(*pmdp++) = val;
 		pmd_val(*pmdp++) = val;
 		pmd_val(*pmdp++) = val;
 		pmd_val(*pmdp++) = val;
-		spin_unlock(&init_mm.page_table_lock);
 
 
 		v += LARGE_PAGE_SIZE_16M;
 		v += LARGE_PAGE_SIZE_16M;
 		p += LARGE_PAGE_SIZE_16M;
 		p += LARGE_PAGE_SIZE_16M;
@@ -127,10 +125,8 @@ unsigned long __init mmu_mapin_ram(void)
 		pmd_t *pmdp;
 		pmd_t *pmdp;
 		unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
 		unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
 
 
-		spin_lock(&init_mm.page_table_lock);
 		pmdp = pmd_offset(pgd_offset_k(v), v);
 		pmdp = pmd_offset(pgd_offset_k(v), v);
 		pmd_val(*pmdp) = val;
 		pmd_val(*pmdp) = val;
-		spin_unlock(&init_mm.page_table_lock);
 
 
 		v += LARGE_PAGE_SIZE_4M;
 		v += LARGE_PAGE_SIZE_4M;
 		p += LARGE_PAGE_SIZE_4M;
 		p += LARGE_PAGE_SIZE_4M;

+ 4 - 6
arch/powerpc/mm/hugetlbpage.c

@@ -287,15 +287,15 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
 
 
 int prepare_hugepage_range(unsigned long addr, unsigned long len)
 int prepare_hugepage_range(unsigned long addr, unsigned long len)
 {
 {
-	int err;
+	int err = 0;
 
 
 	if ( (addr+len) < addr )
 	if ( (addr+len) < addr )
 		return -EINVAL;
 		return -EINVAL;
 
 
-	if ((addr + len) < 0x100000000UL)
+	if (addr < 0x100000000UL)
 		err = open_low_hpage_areas(current->mm,
 		err = open_low_hpage_areas(current->mm,
 					  LOW_ESID_MASK(addr, len));
 					  LOW_ESID_MASK(addr, len));
-	else
+	if ((addr + len) > 0x100000000UL)
 		err = open_high_hpage_areas(current->mm,
 		err = open_high_hpage_areas(current->mm,
 					    HTLB_AREA_MASK(addr, len));
 					    HTLB_AREA_MASK(addr, len));
 	if (err) {
 	if (err) {
@@ -754,9 +754,7 @@ repeat:
 	}
 	}
 
 
 	/*
 	/*
-	 * No need to use ldarx/stdcx here because all who
-	 * might be updating the pte will hold the
-	 * page_table_lock
+	 * No need to use ldarx/stdcx here
 	 */
 	 */
 	*ptep = __pte(new_pte & ~_PAGE_BUSY);
 	*ptep = __pte(new_pte & ~_PAGE_BUSY);
 
 

+ 1 - 1
arch/powerpc/mm/mem.c

@@ -495,7 +495,7 @@ EXPORT_SYMBOL(flush_icache_user_range);
  * We use it to preload an HPTE into the hash table corresponding to
  * We use it to preload an HPTE into the hash table corresponding to
  * the updated linux PTE.
  * the updated linux PTE.
  * 
  * 
- * This must always be called with the mm->page_table_lock held
+ * This must always be called with the pte lock held.
  */
  */
 void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
 void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
 		      pte_t pte)
 		      pte_t pte)

+ 6 - 0
arch/powerpc/mm/tlb_32.c

@@ -149,6 +149,12 @@ void flush_tlb_mm(struct mm_struct *mm)
 		return;
 		return;
 	}
 	}
 
 
+	/*
+	 * It is safe to go down the mm's list of vmas when called
+	 * from dup_mmap, holding mmap_sem.  It would also be safe from
+	 * unmap_region or exit_mmap, but not from vmtruncate on SMP -
+	 * but it seems dup_mmap is the only SMP case which gets here.
+	 */
 	for (mp = mm->mmap; mp != NULL; mp = mp->vm_next)
 	for (mp = mm->mmap; mp != NULL; mp = mp->vm_next)
 		flush_range(mp->vm_mm, mp->vm_start, mp->vm_end);
 		flush_range(mp->vm_mm, mp->vm_start, mp->vm_end);
 	FINISH_FLUSH;
 	FINISH_FLUSH;

+ 2 - 2
arch/powerpc/mm/tlb_64.c

@@ -95,7 +95,7 @@ static void pte_free_submit(struct pte_freelist_batch *batch)
 
 
 void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf)
 void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf)
 {
 {
-	/* This is safe as we are holding page_table_lock */
+	/* This is safe since tlb_gather_mmu has disabled preemption */
         cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id());
         cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id());
 	struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);
 	struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);
 
 
@@ -206,7 +206,7 @@ void __flush_tlb_pending(struct ppc64_tlb_batch *batch)
 
 
 void pte_free_finish(void)
 void pte_free_finish(void)
 {
 {
-	/* This is safe as we are holding page_table_lock */
+	/* This is safe since tlb_gather_mmu has disabled preemption */
 	struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);
 	struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);
 
 
 	if (*batchp == NULL)
 	if (*batchp == NULL)

+ 1 - 1
arch/powerpc/platforms/iseries/iommu.c

@@ -3,7 +3,7 @@
  *
  *
  * Rewrite, cleanup:
  * Rewrite, cleanup:
  *
  *
- * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
+ * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
  *
  *
  * Dynamic DMA mapping support, iSeries-specific parts.
  * Dynamic DMA mapping support, iSeries-specific parts.
  *
  *

+ 1 - 1
arch/powerpc/platforms/pseries/iommu.c

@@ -5,7 +5,7 @@
  *
  *
  * Rewrite, cleanup: 
  * Rewrite, cleanup: 
  *
  *
- * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
+ * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
  *
  *
  * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR.
  * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR.
  *
  *

+ 1 - 1
arch/powerpc/sysdev/dart.h

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
+ * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
  *
  *
  * This program is free software; you can redistribute it and/or modify
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * it under the terms of the GNU General Public License as published by

+ 2 - 2
arch/powerpc/sysdev/u3_iommu.c

@@ -1,11 +1,11 @@
 /*
 /*
  * arch/powerpc/sysdev/u3_iommu.c
  * arch/powerpc/sysdev/u3_iommu.c
  *
  *
- * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
+ * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
  *
  *
  * Based on pSeries_iommu.c:
  * Based on pSeries_iommu.c:
  * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
  * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
- * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
+ * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
  *
  *
  * Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu.
  * Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu.
  *
  *

+ 1 - 1
arch/sparc/kernel/ioport.c

@@ -252,7 +252,7 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, long len, u32 *dma_addrp)
 	}
 	}
 
 
 	order = get_order(len_total);
 	order = get_order(len_total);
-	if ((va = __get_free_pages(GFP_KERNEL, order)) == 0)
+	if ((va = __get_free_pages(GFP_KERNEL|__GFP_COMP, order)) == 0)
 		goto err_nopages;
 		goto err_nopages;
 
 
 	if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL)
 	if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL)

+ 1 - 1
arch/sparc/mm/generic.c

@@ -74,7 +74,7 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
 	unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT;
 	unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT;
 
 
 	/* See comment in mm/memory.c remap_pfn_range */
 	/* See comment in mm/memory.c remap_pfn_range */
-	vma->vm_flags |= VM_IO | VM_RESERVED;
+	vma->vm_flags |= VM_IO | VM_RESERVED | VM_UNPAGED;
 
 
 	prot = __pgprot(pg_iobits);
 	prot = __pgprot(pg_iobits);
 	offset -= from;
 	offset -= from;

+ 1 - 1
arch/sparc64/kernel/sbus.c

@@ -327,7 +327,7 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, size_t size, dma_addr_t *dvma
 	order = get_order(size);
 	order = get_order(size);
 	if (order >= 10)
 	if (order >= 10)
 		return NULL;
 		return NULL;
-	first_page = __get_free_pages(GFP_KERNEL, order);
+	first_page = __get_free_pages(GFP_KERNEL|__GFP_COMP, order);
 	if (first_page == 0UL)
 	if (first_page == 0UL)
 		return NULL;
 		return NULL;
 	memset((char *)first_page, 0, PAGE_SIZE << order);
 	memset((char *)first_page, 0, PAGE_SIZE << order);

+ 1 - 1
arch/sparc64/mm/generic.c

@@ -128,7 +128,7 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
 	unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT;
 	unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT;
 
 
 	/* See comment in mm/memory.c remap_pfn_range */
 	/* See comment in mm/memory.c remap_pfn_range */
-	vma->vm_flags |= VM_IO | VM_RESERVED;
+	vma->vm_flags |= VM_IO | VM_RESERVED | VM_UNPAGED;
 
 
 	prot = __pgprot(pg_iobits);
 	prot = __pgprot(pg_iobits);
 	offset -= from;
 	offset -= from;

+ 1 - 1
arch/um/Makefile

@@ -17,7 +17,7 @@ core-y			+= $(ARCH_DIR)/kernel/		\
 
 
 # Have to precede the include because the included Makefiles reference them.
 # Have to precede the include because the included Makefiles reference them.
 SYMLINK_HEADERS := archparam.h system.h sigcontext.h processor.h ptrace.h \
 SYMLINK_HEADERS := archparam.h system.h sigcontext.h processor.h ptrace.h \
-	module.h vm-flags.h elf.h
+	module.h vm-flags.h elf.h ldt.h
 SYMLINK_HEADERS := $(foreach header,$(SYMLINK_HEADERS),include/asm-um/$(header))
 SYMLINK_HEADERS := $(foreach header,$(SYMLINK_HEADERS),include/asm-um/$(header))
 
 
 # XXX: The "os" symlink is only used by arch/um/include/os.h, which includes
 # XXX: The "os" symlink is only used by arch/um/include/os.h, which includes

+ 9 - 0
arch/um/include/sysdep-i386/stub.h

@@ -16,6 +16,15 @@ extern void stub_clone_handler(void);
 #define STUB_MMAP_NR __NR_mmap2
 #define STUB_MMAP_NR __NR_mmap2
 #define MMAP_OFFSET(o) ((o) >> PAGE_SHIFT)
 #define MMAP_OFFSET(o) ((o) >> PAGE_SHIFT)
 
 
+static inline long stub_syscall0(long syscall)
+{
+	long ret;
+
+	__asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall));
+
+	return ret;
+}
+
 static inline long stub_syscall1(long syscall, long arg1)
 static inline long stub_syscall1(long syscall, long arg1)
 {
 {
 	long ret;
 	long ret;

+ 11 - 1
arch/um/include/sysdep-x86_64/stub.h

@@ -6,7 +6,6 @@
 #ifndef __SYSDEP_STUB_H
 #ifndef __SYSDEP_STUB_H
 #define __SYSDEP_STUB_H
 #define __SYSDEP_STUB_H
 
 
-#include <asm/ptrace.h>
 #include <asm/unistd.h>
 #include <asm/unistd.h>
 #include <sysdep/ptrace_user.h>
 #include <sysdep/ptrace_user.h>
 
 
@@ -20,6 +19,17 @@ extern void stub_clone_handler(void);
 #define __syscall_clobber "r11","rcx","memory"
 #define __syscall_clobber "r11","rcx","memory"
 #define __syscall "syscall"
 #define __syscall "syscall"
 
 
+static inline long stub_syscall0(long syscall)
+{
+	long ret;
+
+	__asm__ volatile (__syscall
+		: "=a" (ret)
+		: "0" (syscall) : __syscall_clobber );
+
+	return ret;
+}
+
 static inline long stub_syscall2(long syscall, long arg1, long arg2)
 static inline long stub_syscall2(long syscall, long arg1, long arg2)
 {
 {
 	long ret;
 	long ret;

+ 14 - 7
arch/um/kernel/skas/clone.c

@@ -9,18 +9,24 @@
 #include "stub-data.h"
 #include "stub-data.h"
 #include "uml-config.h"
 #include "uml-config.h"
 #include "sysdep/stub.h"
 #include "sysdep/stub.h"
+#include "kern_constants.h"
 
 
 /* This is in a separate file because it needs to be compiled with any
 /* This is in a separate file because it needs to be compiled with any
  * extraneous gcc flags (-pg, -fprofile-arcs, -ftest-coverage) disabled
  * extraneous gcc flags (-pg, -fprofile-arcs, -ftest-coverage) disabled
+ *
+ * Use UM_KERN_PAGE_SIZE instead of PAGE_SIZE because that calls getpagesize
+ * on some systems.
  */
  */
+
+#define STUB_DATA(field) (((struct stub_data *) UML_CONFIG_STUB_DATA)->field)
+
 void __attribute__ ((__section__ (".__syscall_stub")))
 void __attribute__ ((__section__ (".__syscall_stub")))
 stub_clone_handler(void)
 stub_clone_handler(void)
 {
 {
 	long err;
 	long err;
-	struct stub_data *from = (struct stub_data *) UML_CONFIG_STUB_DATA;
 
 
 	err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD,
 	err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD,
-			    UML_CONFIG_STUB_DATA + PAGE_SIZE / 2 -
+			    UML_CONFIG_STUB_DATA + UM_KERN_PAGE_SIZE / 2 -
 			    sizeof(void *));
 			    sizeof(void *));
 	if(err != 0)
 	if(err != 0)
 		goto out;
 		goto out;
@@ -30,15 +36,16 @@ stub_clone_handler(void)
 		goto out;
 		goto out;
 
 
 	err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL,
 	err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL,
-			    (long) &from->timer, 0);
+			    (long) &STUB_DATA(timer), 0);
 	if(err)
 	if(err)
 		goto out;
 		goto out;
 
 
-	err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA, PAGE_SIZE,
-			    PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED,
-			    from->fd, from->offset);
+	err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA,
+			    UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE,
+			    MAP_FIXED | MAP_SHARED, STUB_DATA(fd),
+			    STUB_DATA(offset));
  out:
  out:
 	/* save current result. Parent: pid; child: retcode of mmap */
 	/* save current result. Parent: pid; child: retcode of mmap */
-	from->err = err;
+	STUB_DATA(err) = err;
 	trap_myself();
 	trap_myself();
 }
 }

+ 1 - 1
arch/um/sys-i386/Makefile

@@ -5,7 +5,7 @@ obj-y = bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \
 obj-$(CONFIG_HIGHMEM) += highmem.o
 obj-$(CONFIG_HIGHMEM) += highmem.o
 obj-$(CONFIG_MODULES) += module.o
 obj-$(CONFIG_MODULES) += module.o
 
 
-USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o
+USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o stub_segv.o
 
 
 SYMLINKS = bitops.c semaphore.c highmem.c module.c
 SYMLINKS = bitops.c semaphore.c highmem.c module.c
 
 

+ 19 - 16
arch/um/sys-i386/ldt.c

@@ -228,7 +228,7 @@ static int read_ldt(void __user * ptr, unsigned long bytecount)
 		size = LDT_ENTRY_SIZE*LDT_DIRECT_ENTRIES;
 		size = LDT_ENTRY_SIZE*LDT_DIRECT_ENTRIES;
 		if(size > bytecount)
 		if(size > bytecount)
 			size = bytecount;
 			size = bytecount;
-		if(copy_to_user(ptr, ldt->entries, size))
+		if(copy_to_user(ptr, ldt->u.entries, size))
 			err = -EFAULT;
 			err = -EFAULT;
 		bytecount -= size;
 		bytecount -= size;
 		ptr += size;
 		ptr += size;
@@ -239,7 +239,7 @@ static int read_ldt(void __user * ptr, unsigned long bytecount)
 			size = PAGE_SIZE;
 			size = PAGE_SIZE;
 			if(size > bytecount)
 			if(size > bytecount)
 				size = bytecount;
 				size = bytecount;
-			if(copy_to_user(ptr, ldt->pages[i], size)){
+			if(copy_to_user(ptr, ldt->u.pages[i], size)){
 				err = -EFAULT;
 				err = -EFAULT;
 				break;
 				break;
 			}
 			}
@@ -321,10 +321,11 @@ static int write_ldt(void __user * ptr, unsigned long bytecount, int func)
 		    i*LDT_ENTRIES_PER_PAGE <= ldt_info.entry_number;
 		    i*LDT_ENTRIES_PER_PAGE <= ldt_info.entry_number;
 		    i++){
 		    i++){
 			if(i == 0)
 			if(i == 0)
-				memcpy(&entry0, ldt->entries, sizeof(entry0));
-			ldt->pages[i] = (struct ldt_entry *)
-					__get_free_page(GFP_KERNEL|__GFP_ZERO);
-			if(!ldt->pages[i]){
+				memcpy(&entry0, ldt->u.entries,
+				       sizeof(entry0));
+			ldt->u.pages[i] = (struct ldt_entry *)
+				__get_free_page(GFP_KERNEL|__GFP_ZERO);
+			if(!ldt->u.pages[i]){
 				err = -ENOMEM;
 				err = -ENOMEM;
 				/* Undo the change in host */
 				/* Undo the change in host */
 				memset(&ldt_info, 0, sizeof(ldt_info));
 				memset(&ldt_info, 0, sizeof(ldt_info));
@@ -332,8 +333,9 @@ static int write_ldt(void __user * ptr, unsigned long bytecount, int func)
 				goto out_unlock;
 				goto out_unlock;
 			}
 			}
 			if(i == 0) {
 			if(i == 0) {
-				memcpy(ldt->pages[0], &entry0, sizeof(entry0));
-				memcpy(ldt->pages[0]+1, ldt->entries+1,
+				memcpy(ldt->u.pages[0], &entry0,
+				       sizeof(entry0));
+				memcpy(ldt->u.pages[0]+1, ldt->u.entries+1,
 				       sizeof(entry0)*(LDT_DIRECT_ENTRIES-1));
 				       sizeof(entry0)*(LDT_DIRECT_ENTRIES-1));
 			}
 			}
 			ldt->entry_count = (i + 1) * LDT_ENTRIES_PER_PAGE;
 			ldt->entry_count = (i + 1) * LDT_ENTRIES_PER_PAGE;
@@ -343,9 +345,9 @@ static int write_ldt(void __user * ptr, unsigned long bytecount, int func)
 		ldt->entry_count = ldt_info.entry_number + 1;
 		ldt->entry_count = ldt_info.entry_number + 1;
 
 
 	if(ldt->entry_count <= LDT_DIRECT_ENTRIES)
 	if(ldt->entry_count <= LDT_DIRECT_ENTRIES)
-		ldt_p = ldt->entries + ldt_info.entry_number;
+		ldt_p = ldt->u.entries + ldt_info.entry_number;
 	else
 	else
-		ldt_p = ldt->pages[ldt_info.entry_number/LDT_ENTRIES_PER_PAGE] +
+		ldt_p = ldt->u.pages[ldt_info.entry_number/LDT_ENTRIES_PER_PAGE] +
 			ldt_info.entry_number%LDT_ENTRIES_PER_PAGE;
 			ldt_info.entry_number%LDT_ENTRIES_PER_PAGE;
 
 
 	if(ldt_info.base_addr == 0 && ldt_info.limit == 0 &&
 	if(ldt_info.base_addr == 0 && ldt_info.limit == 0 &&
@@ -501,8 +503,8 @@ long init_new_ldt(struct mmu_context_skas * new_mm,
 		 */
 		 */
 		down(&from_mm->ldt.semaphore);
 		down(&from_mm->ldt.semaphore);
 		if(from_mm->ldt.entry_count <= LDT_DIRECT_ENTRIES){
 		if(from_mm->ldt.entry_count <= LDT_DIRECT_ENTRIES){
-			memcpy(new_mm->ldt.entries, from_mm->ldt.entries,
-			       sizeof(new_mm->ldt.entries));
+			memcpy(new_mm->ldt.u.entries, from_mm->ldt.u.entries,
+			       sizeof(new_mm->ldt.u.entries));
 		}
 		}
 		else{
 		else{
 			i = from_mm->ldt.entry_count / LDT_ENTRIES_PER_PAGE;
 			i = from_mm->ldt.entry_count / LDT_ENTRIES_PER_PAGE;
@@ -512,9 +514,10 @@ long init_new_ldt(struct mmu_context_skas * new_mm,
 					err = -ENOMEM;
 					err = -ENOMEM;
 					break;
 					break;
 				}
 				}
-				new_mm->ldt.pages[i] = (struct ldt_entry*)page;
-				memcpy(new_mm->ldt.pages[i],
-				       from_mm->ldt.pages[i], PAGE_SIZE);
+				new_mm->ldt.u.pages[i] =
+					(struct ldt_entry *) page;
+				memcpy(new_mm->ldt.u.pages[i],
+				       from_mm->ldt.u.pages[i], PAGE_SIZE);
 			}
 			}
 		}
 		}
 		new_mm->ldt.entry_count = from_mm->ldt.entry_count;
 		new_mm->ldt.entry_count = from_mm->ldt.entry_count;
@@ -532,7 +535,7 @@ void free_ldt(struct mmu_context_skas * mm)
 	if(!ptrace_ldt && mm->ldt.entry_count > LDT_DIRECT_ENTRIES){
 	if(!ptrace_ldt && mm->ldt.entry_count > LDT_DIRECT_ENTRIES){
 		i = mm->ldt.entry_count / LDT_ENTRIES_PER_PAGE;
 		i = mm->ldt.entry_count / LDT_ENTRIES_PER_PAGE;
 		while(i-- > 0){
 		while(i-- > 0){
-			free_page((long )mm->ldt.pages[i]);
+			free_page((long )mm->ldt.u.pages[i]);
 		}
 		}
 	}
 	}
 	mm->ldt.entry_count = 0;
 	mm->ldt.entry_count = 0;

+ 7 - 4
arch/um/sys-i386/stub_segv.c

@@ -3,9 +3,11 @@
  * Licensed under the GPL
  * Licensed under the GPL
  */
  */
 
 
-#include <asm/signal.h>
+#include <signal.h>
+#include <sys/select.h> /* The only way I can see to get sigset_t */
 #include <asm/unistd.h>
 #include <asm/unistd.h>
 #include "uml-config.h"
 #include "uml-config.h"
+#include "sysdep/stub.h"
 #include "sysdep/sigcontext.h"
 #include "sysdep/sigcontext.h"
 #include "sysdep/faultinfo.h"
 #include "sysdep/faultinfo.h"
 
 
@@ -13,13 +15,14 @@ void __attribute__ ((__section__ (".__syscall_stub")))
 stub_segv_handler(int sig)
 stub_segv_handler(int sig)
 {
 {
 	struct sigcontext *sc = (struct sigcontext *) (&sig + 1);
 	struct sigcontext *sc = (struct sigcontext *) (&sig + 1);
+	int pid;
 
 
 	GET_FAULTINFO_FROM_SC(*((struct faultinfo *) UML_CONFIG_STUB_DATA),
 	GET_FAULTINFO_FROM_SC(*((struct faultinfo *) UML_CONFIG_STUB_DATA),
 			      sc);
 			      sc);
 
 
-	__asm__("movl %0, %%eax ; int $0x80": : "g" (__NR_getpid));
-	__asm__("movl %%eax, %%ebx ; movl %0, %%eax ; movl %1, %%ecx ;"
-		"int $0x80": : "g" (__NR_kill), "g" (SIGUSR1));
+	pid = stub_syscall0(__NR_getpid);
+	stub_syscall2(__NR_kill, pid, SIGUSR1);
+
 	/* Load pointer to sigcontext into esp, since we need to leave
 	/* Load pointer to sigcontext into esp, since we need to leave
 	 * the stack in its original form when we do the sigreturn here, by
 	 * the stack in its original form when we do the sigreturn here, by
 	 * hand.
 	 * hand.

+ 1 - 1
arch/um/sys-x86_64/Makefile

@@ -12,7 +12,7 @@ lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o ldt.o mem.o memcpy.o \
 obj-y := ksyms.o
 obj-y := ksyms.o
 obj-$(CONFIG_MODULES) += module.o um_module.o
 obj-$(CONFIG_MODULES) += module.o um_module.o
 
 
-USER_OBJS := ptrace_user.o sigcontext.o
+USER_OBJS := ptrace_user.o sigcontext.o stub_segv.o
 
 
 SYMLINKS = bitops.c csum-copy.S csum-partial.c csum-wrappers.c ldt.c memcpy.S \
 SYMLINKS = bitops.c csum-copy.S csum-partial.c csum-wrappers.c ldt.c memcpy.S \
 	thunk.S module.c
 	thunk.S module.c

+ 10 - 10
arch/um/sys-x86_64/stub_segv.c

@@ -3,14 +3,14 @@
  * Licensed under the GPL
  * Licensed under the GPL
  */
  */
 
 
-#include <asm/signal.h>
+#include <stddef.h>
+#include <signal.h>
 #include <linux/compiler.h>
 #include <linux/compiler.h>
 #include <asm/unistd.h>
 #include <asm/unistd.h>
-#include <asm/ucontext.h>
 #include "uml-config.h"
 #include "uml-config.h"
 #include "sysdep/sigcontext.h"
 #include "sysdep/sigcontext.h"
 #include "sysdep/faultinfo.h"
 #include "sysdep/faultinfo.h"
-#include <stddef.h>
+#include "sysdep/stub.h"
 
 
 /* Copied from sys-x86_64/signal.c - Can't find an equivalent definition
 /* Copied from sys-x86_64/signal.c - Can't find an equivalent definition
  * in the libc headers anywhere.
  * in the libc headers anywhere.
@@ -31,21 +31,21 @@ void __attribute__ ((__section__ (".__syscall_stub")))
 stub_segv_handler(int sig)
 stub_segv_handler(int sig)
 {
 {
 	struct ucontext *uc;
 	struct ucontext *uc;
+        int pid;
 
 
 	__asm__("movq %%rdx, %0" : "=g" (uc) :);
 	__asm__("movq %%rdx, %0" : "=g" (uc) :);
 	GET_FAULTINFO_FROM_SC(*((struct faultinfo *) UML_CONFIG_STUB_DATA),
 	GET_FAULTINFO_FROM_SC(*((struct faultinfo *) UML_CONFIG_STUB_DATA),
 			      &uc->uc_mcontext);
 			      &uc->uc_mcontext);
 
 
-	__asm__("movq %0, %%rax ; syscall": : "g" (__NR_getpid));	
-	__asm__("movq %%rax, %%rdi ; movq %0, %%rax ; movq %1, %%rsi ;"
-		"syscall": : "g" (__NR_kill), "g" (SIGUSR1) : 
-		"%rdi", "%rax", "%rsi");
+	pid = stub_syscall0(__NR_getpid);
+	stub_syscall2(__NR_kill, pid, SIGUSR1);
+
 	/* sys_sigreturn expects that the stack pointer will be 8 bytes into
 	/* sys_sigreturn expects that the stack pointer will be 8 bytes into
 	 * the signal frame.  So, we use the ucontext pointer, which we know
 	 * the signal frame.  So, we use the ucontext pointer, which we know
 	 * already, to get the signal frame pointer, and add 8 to that.
 	 * already, to get the signal frame pointer, and add 8 to that.
 	 */
 	 */
-	__asm__("movq %0, %%rsp": : 
+	__asm__("movq %0, %%rsp; movq %1, %%rax ; syscall": :
 		"g" ((unsigned long) container_of(uc, struct rt_sigframe, 
 		"g" ((unsigned long) container_of(uc, struct rt_sigframe, 
-						  uc) + 8));
-	__asm__("movq %0, %%rax ; syscall" : : "g" (__NR_rt_sigreturn));
+						  uc) + 8),
+                "g" (__NR_rt_sigreturn));
 }
 }

+ 0 - 7
arch/x86_64/kernel/process.c

@@ -351,13 +351,6 @@ void flush_thread(void)
 	struct task_struct *tsk = current;
 	struct task_struct *tsk = current;
 	struct thread_info *t = current_thread_info();
 	struct thread_info *t = current_thread_info();
 
 
-	/*
-	 * Remove function-return probe instances associated with this task
-	 * and put them back on the free list. Do not insert an exit probe for
-	 * this function, it will be disabled by kprobe_flush_task if you do.
-	 */
-	kprobe_flush_task(tsk);
-
 	if (t->flags & _TIF_ABI_PENDING)
 	if (t->flags & _TIF_ABI_PENDING)
 		t->flags ^= (_TIF_ABI_PENDING | _TIF_IA32);
 		t->flags ^= (_TIF_ABI_PENDING | _TIF_IA32);
 
 

+ 9 - 12
drivers/base/bus.c

@@ -133,7 +133,7 @@ static struct kobj_type ktype_bus = {
 decl_subsys(bus, &ktype_bus, NULL);
 decl_subsys(bus, &ktype_bus, NULL);
 
 
 
 
-/* Manually detach a device from it's associated driver. */
+/* Manually detach a device from its associated driver. */
 static int driver_helper(struct device *dev, void *data)
 static int driver_helper(struct device *dev, void *data)
 {
 {
 	const char *name = data;
 	const char *name = data;
@@ -151,14 +151,13 @@ static ssize_t driver_unbind(struct device_driver *drv,
 	int err = -ENODEV;
 	int err = -ENODEV;
 
 
 	dev = bus_find_device(bus, NULL, (void *)buf, driver_helper);
 	dev = bus_find_device(bus, NULL, (void *)buf, driver_helper);
-	if ((dev) &&
-	    (dev->driver == drv)) {
+	if (dev && dev->driver == drv) {
 		device_release_driver(dev);
 		device_release_driver(dev);
 		err = count;
 		err = count;
 	}
 	}
-	if (err)
-		return err;
-	return count;
+	put_device(dev);
+	put_bus(bus);
+	return err;
 }
 }
 static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind);
 static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind);
 
 
@@ -175,16 +174,14 @@ static ssize_t driver_bind(struct device_driver *drv,
 	int err = -ENODEV;
 	int err = -ENODEV;
 
 
 	dev = bus_find_device(bus, NULL, (void *)buf, driver_helper);
 	dev = bus_find_device(bus, NULL, (void *)buf, driver_helper);
-	if ((dev) &&
-	    (dev->driver == NULL)) {
+	if (dev && dev->driver == NULL) {
 		down(&dev->sem);
 		down(&dev->sem);
 		err = driver_probe_device(drv, dev);
 		err = driver_probe_device(drv, dev);
 		up(&dev->sem);
 		up(&dev->sem);
-		put_device(dev);
 	}
 	}
-	if (err)
-		return err;
-	return count;
+	put_device(dev);
+	put_bus(bus);
+	return err;
 }
 }
 static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind);
 static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind);
 
 

+ 3 - 5
drivers/base/dd.c

@@ -62,7 +62,6 @@ void device_bind_driver(struct device * dev)
  *	because we don't know the format of the ID structures, nor what
  *	because we don't know the format of the ID structures, nor what
  *	is to be considered a match and what is not.
  *	is to be considered a match and what is not.
  *
  *
- *
  *	This function returns 1 if a match is found, an error if one
  *	This function returns 1 if a match is found, an error if one
  *	occurs (that is not -ENODEV or -ENXIO), and 0 otherwise.
  *	occurs (that is not -ENODEV or -ENXIO), and 0 otherwise.
  *
  *
@@ -158,7 +157,6 @@ static int __driver_attach(struct device * dev, void * data)
 		driver_probe_device(drv, dev);
 		driver_probe_device(drv, dev);
 	up(&dev->sem);
 	up(&dev->sem);
 
 
-
 	return 0;
 	return 0;
 }
 }
 
 
@@ -225,15 +223,15 @@ void driver_detach(struct device_driver * drv)
 	struct device * dev;
 	struct device * dev;
 
 
 	for (;;) {
 	for (;;) {
-		spin_lock_irq(&drv->klist_devices.k_lock);
+		spin_lock(&drv->klist_devices.k_lock);
 		if (list_empty(&drv->klist_devices.k_list)) {
 		if (list_empty(&drv->klist_devices.k_list)) {
-			spin_unlock_irq(&drv->klist_devices.k_lock);
+			spin_unlock(&drv->klist_devices.k_lock);
 			break;
 			break;
 		}
 		}
 		dev = list_entry(drv->klist_devices.k_list.prev,
 		dev = list_entry(drv->klist_devices.k_list.prev,
 				struct device, knode_driver.n_node);
 				struct device, knode_driver.n_node);
 		get_device(dev);
 		get_device(dev);
-		spin_unlock_irq(&drv->klist_devices.k_lock);
+		spin_unlock(&drv->klist_devices.k_lock);
 
 
 		down(&dev->sem);
 		down(&dev->sem);
 		if (dev->driver == drv)
 		if (dev->driver == drv)

+ 0 - 6
drivers/block/floppy.c

@@ -3714,12 +3714,6 @@ static int floppy_open(struct inode *inode, struct file *filp)
 		USETF(FD_VERIFY);
 		USETF(FD_VERIFY);
 	}
 	}
 
 
-	/* set underlying gendisk policy to reflect real ro/rw status */
-	if (UTESTF(FD_DISK_WRITABLE))
-		inode->i_bdev->bd_disk->policy = 0;
-	else
-		inode->i_bdev->bd_disk->policy = 1;
-
 	if (UDRS->fd_ref == -1 || (UDRS->fd_ref && (filp->f_flags & O_EXCL)))
 	if (UDRS->fd_ref == -1 || (UDRS->fd_ref && (filp->f_flags & O_EXCL)))
 		goto out2;
 		goto out2;
 
 

+ 11 - 5
drivers/char/drm/drm_lock.c

@@ -104,6 +104,10 @@ int drm_lock(struct inode *inode, struct file *filp,
 	__set_current_state(TASK_RUNNING);
 	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&dev->lock.lock_queue, &entry);
 	remove_wait_queue(&dev->lock.lock_queue, &entry);
 
 
+	DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
+	if (ret)
+		return ret;
+
 	sigemptyset(&dev->sigmask);
 	sigemptyset(&dev->sigmask);
 	sigaddset(&dev->sigmask, SIGSTOP);
 	sigaddset(&dev->sigmask, SIGSTOP);
 	sigaddset(&dev->sigmask, SIGTSTP);
 	sigaddset(&dev->sigmask, SIGTSTP);
@@ -116,8 +120,12 @@ int drm_lock(struct inode *inode, struct file *filp,
 	if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY))
 	if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY))
 		dev->driver->dma_ready(dev);
 		dev->driver->dma_ready(dev);
 
 
-	if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT))
-		return dev->driver->dma_quiescent(dev);
+	if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) {
+		if (dev->driver->dma_quiescent(dev)) {
+			DRM_DEBUG("%d waiting for DMA quiescent\n", lock.context);
+			return DRM_ERR(EBUSY);
+		}
+	}
 
 
 	/* dev->driver->kernel_context_switch isn't used by any of the x86
 	/* dev->driver->kernel_context_switch isn't used by any of the x86
 	 *  drivers but is used by the Sparc driver.
 	 *  drivers but is used by the Sparc driver.
@@ -128,9 +136,7 @@ int drm_lock(struct inode *inode, struct file *filp,
 		dev->driver->kernel_context_switch(dev, dev->last_context,
 		dev->driver->kernel_context_switch(dev, dev->last_context,
 						   lock.context);
 						   lock.context);
 	}
 	}
-	DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
-
-	return ret;
+	return 0;
 }
 }
 
 
 /**
 /**

+ 1 - 1
drivers/char/drm/drm_memory.c

@@ -95,7 +95,7 @@ unsigned long drm_alloc_pages(int order, int area)
 	unsigned long addr;
 	unsigned long addr;
 	unsigned int sz;
 	unsigned int sz;
 
 
-	address = __get_free_pages(GFP_KERNEL, order);
+	address = __get_free_pages(GFP_KERNEL|__GFP_COMP, order);
 	if (!address)
 	if (!address)
 		return 0;
 		return 0;
 
 

+ 1 - 1
drivers/char/drm/drm_memory_debug.h

@@ -221,7 +221,7 @@ unsigned long DRM(alloc_pages) (int order, int area) {
 	}
 	}
 	spin_unlock(&DRM(mem_lock));
 	spin_unlock(&DRM(mem_lock));
 
 
-	address = __get_free_pages(GFP_KERNEL, order);
+	address = __get_free_pages(GFP_KERNEL|__GFP_COMP, order);
 	if (!address) {
 	if (!address) {
 		spin_lock(&DRM(mem_lock));
 		spin_lock(&DRM(mem_lock));
 		++DRM(mem_stats)[area].fail_count;
 		++DRM(mem_stats)[area].fail_count;

+ 1 - 1
drivers/char/drm/mga_drv.c

@@ -161,7 +161,7 @@ static int mga_driver_device_is_agp(drm_device_t * dev)
 	 * device.
 	 * device.
 	 */
 	 */
 
 
-	if ((pdev->device == 0x0525)
+	if ((pdev->device == 0x0525) && pdev->bus->self
 	    && (pdev->bus->self->vendor == 0x3388)
 	    && (pdev->bus->self->vendor == 0x3388)
 	    && (pdev->bus->self->device == 0x0021)) {
 	    && (pdev->bus->self->device == 0x0021)) {
 		return 0;
 		return 0;

+ 1 - 2
drivers/char/drm/radeon_drv.h

@@ -214,8 +214,6 @@ typedef struct drm_radeon_private {
 
 
 	int microcode_version;
 	int microcode_version;
 
 
-	int is_pci;
-
 	struct {
 	struct {
 		u32 boxes;
 		u32 boxes;
 		int freelist_timeouts;
 		int freelist_timeouts;
@@ -275,6 +273,7 @@ typedef struct drm_radeon_private {
 
 
 	/* starting from here on, data is preserved accross an open */
 	/* starting from here on, data is preserved accross an open */
 	uint32_t flags;		/* see radeon_chip_flags */
 	uint32_t flags;		/* see radeon_chip_flags */
+	int is_pci;
 } drm_radeon_private_t;
 } drm_radeon_private_t;
 
 
 typedef struct drm_radeon_buf_priv {
 typedef struct drm_radeon_buf_priv {

+ 1 - 1
drivers/char/mem.c

@@ -591,7 +591,7 @@ static inline size_t read_zero_pagealigned(char __user * buf, size_t size)
 
 
 		if (vma->vm_start > addr || (vma->vm_flags & VM_WRITE) == 0)
 		if (vma->vm_start > addr || (vma->vm_flags & VM_WRITE) == 0)
 			goto out_up;
 			goto out_up;
-		if (vma->vm_flags & (VM_SHARED | VM_HUGETLB))
+		if (vma->vm_flags & (VM_SHARED | VM_HUGETLB | VM_UNPAGED))
 			break;
 			break;
 		count = vma->vm_end - addr;
 		count = vma->vm_end - addr;
 		if (count > size)
 		if (count > size)

+ 1 - 1
drivers/cpufreq/cpufreq.c

@@ -693,8 +693,8 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev)
 	unsigned int cpu = sys_dev->id;
 	unsigned int cpu = sys_dev->id;
 	unsigned long flags;
 	unsigned long flags;
 	struct cpufreq_policy *data;
 	struct cpufreq_policy *data;
-	struct sys_device *cpu_sys_dev;
 #ifdef CONFIG_SMP
 #ifdef CONFIG_SMP
+	struct sys_device *cpu_sys_dev;
 	unsigned int j;
 	unsigned int j;
 #endif
 #endif
 
 

+ 1 - 0
drivers/firmware/Kconfig

@@ -60,6 +60,7 @@ config EFI_PCDP
 
 
 config DELL_RBU
 config DELL_RBU
 	tristate "BIOS update support for DELL systems via sysfs"
 	tristate "BIOS update support for DELL systems via sysfs"
+	depends on X86
 	select FW_LOADER
 	select FW_LOADER
 	help
 	help
 	 Say m if you want to have the option of updating the BIOS for your
 	 Say m if you want to have the option of updating the BIOS for your

+ 1 - 1
drivers/hwmon/hdaps.c

@@ -570,7 +570,7 @@ static int __init hdaps_init(void)
 	hdaps_idev->evbit[0] = BIT(EV_ABS);
 	hdaps_idev->evbit[0] = BIT(EV_ABS);
 	input_set_abs_params(hdaps_idev, ABS_X,
 	input_set_abs_params(hdaps_idev, ABS_X,
 			-256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT);
 			-256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT);
-	input_set_abs_params(hdaps_idev, ABS_X,
+	input_set_abs_params(hdaps_idev, ABS_Y,
 			-256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT);
 			-256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT);
 
 
 	input_register_device(hdaps_idev);
 	input_register_device(hdaps_idev);

+ 7 - 0
drivers/hwmon/it87.c

@@ -522,8 +522,15 @@ static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr,
 	struct i2c_client *client = to_i2c_client(dev);
 	struct i2c_client *client = to_i2c_client(dev);
 	struct it87_data *data = i2c_get_clientdata(client);
 	struct it87_data *data = i2c_get_clientdata(client);
 	int val = simple_strtol(buf, NULL, 10);
 	int val = simple_strtol(buf, NULL, 10);
+	u8 reg = it87_read_value(client, IT87_REG_FAN_DIV);
 
 
 	down(&data->update_lock);
 	down(&data->update_lock);
+	switch (nr) {
+	case 0: data->fan_div[nr] = reg & 0x07; break;
+	case 1: data->fan_div[nr] = (reg >> 3) & 0x07; break;
+	case 2: data->fan_div[nr] = (reg & 0x40) ? 3 : 1; break;
+	}
+
 	data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr]));
 	data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr]));
 	it87_write_value(client, IT87_REG_FAN_MIN(nr), data->fan_min[nr]);
 	it87_write_value(client, IT87_REG_FAN_MIN(nr), data->fan_min[nr]);
 	up(&data->update_lock);
 	up(&data->update_lock);

+ 1 - 1
drivers/hwmon/lm78.c

@@ -451,7 +451,7 @@ static DEVICE_ATTR(fan3_div, S_IRUGO, show_fan_3_div, NULL);
 static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf)
 static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf)
 {
 {
 	struct lm78_data *data = lm78_update_device(dev);
 	struct lm78_data *data = lm78_update_device(dev);
-	return sprintf(buf, "%d\n", vid_from_reg(82, data->vid));
+	return sprintf(buf, "%d\n", vid_from_reg(data->vid, 82));
 }
 }
 static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
 static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
 
 

+ 6 - 2
drivers/hwmon/w83627hf.c

@@ -456,7 +456,9 @@ static ssize_t store_regs_in_min0(struct device *dev, struct device_attribute *a
 		(w83627thf == data->type || w83637hf == data->type))
 		(w83627thf == data->type || w83637hf == data->type))
 
 
 		/* use VRM9 calculation */
 		/* use VRM9 calculation */
-		data->in_min[0] = (u8)(((val * 100) - 70000 + 244) / 488);
+		data->in_min[0] =
+			SENSORS_LIMIT(((val * 100) - 70000 + 244) / 488, 0,
+					255);
 	else
 	else
 		/* use VRM8 (standard) calculation */
 		/* use VRM8 (standard) calculation */
 		data->in_min[0] = IN_TO_REG(val);
 		data->in_min[0] = IN_TO_REG(val);
@@ -481,7 +483,9 @@ static ssize_t store_regs_in_max0(struct device *dev, struct device_attribute *a
 		(w83627thf == data->type || w83637hf == data->type))
 		(w83627thf == data->type || w83637hf == data->type))
 		
 		
 		/* use VRM9 calculation */
 		/* use VRM9 calculation */
-		data->in_max[0] = (u8)(((val * 100) - 70000 + 244) / 488);
+		data->in_max[0] =
+			SENSORS_LIMIT(((val * 100) - 70000 + 244) / 488, 0,
+					255);
 	else
 	else
 		/* use VRM8 (standard) calculation */
 		/* use VRM8 (standard) calculation */
 		data->in_max[0] = IN_TO_REG(val);
 		data->in_max[0] = IN_TO_REG(val);

+ 2 - 2
drivers/infiniband/core/mad.c

@@ -355,9 +355,9 @@ error4:
 	spin_unlock_irqrestore(&port_priv->reg_lock, flags);
 	spin_unlock_irqrestore(&port_priv->reg_lock, flags);
 	kfree(reg_req);
 	kfree(reg_req);
 error3:
 error3:
-	kfree(mad_agent_priv);
-error2:
 	ib_dereg_mr(mad_agent_priv->agent.mr);
 	ib_dereg_mr(mad_agent_priv->agent.mr);
+error2:
+	kfree(mad_agent_priv);
 error1:
 error1:
 	return ret;
 	return ret;
 }
 }

+ 3 - 0
drivers/md/dm-bio-list.h

@@ -33,6 +33,9 @@ static inline void bio_list_add(struct bio_list *bl, struct bio *bio)
 
 
 static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2)
 static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2)
 {
 {
+	if (!bl2->head)
+		return;
+
 	if (bl->tail)
 	if (bl->tail)
 		bl->tail->bi_next = bl2->head;
 		bl->tail->bi_next = bl2->head;
 	else
 	else

+ 2 - 1
drivers/md/dm-ioctl.c

@@ -425,8 +425,8 @@ static void list_version_get_needed(struct target_type *tt, void *needed_param)
 {
 {
     size_t *needed = needed_param;
     size_t *needed = needed_param;
 
 
+    *needed += sizeof(struct dm_target_versions);
     *needed += strlen(tt->name);
     *needed += strlen(tt->name);
-    *needed += sizeof(tt->version);
     *needed += ALIGN_MASK;
     *needed += ALIGN_MASK;
 }
 }
 
 
@@ -974,6 +974,7 @@ static int table_load(struct dm_ioctl *param, size_t param_size)
 	if (!hc) {
 	if (!hc) {
 		DMWARN("device doesn't appear to be in the dev hash table.");
 		DMWARN("device doesn't appear to be in the dev hash table.");
 		up_write(&_hash_lock);
 		up_write(&_hash_lock);
+		dm_table_put(t);
 		return -ENXIO;
 		return -ENXIO;
 	}
 	}
 
 

+ 2 - 2
drivers/md/dm-log.c

@@ -333,10 +333,10 @@ static int core_ctr(struct dirty_log *log, struct dm_target *ti,
 	lc->sync = sync;
 	lc->sync = sync;
 
 
 	/*
 	/*
-	 * Work out how many words we need to hold the bitset.
+	 * Work out how many "unsigned long"s we need to hold the bitset.
 	 */
 	 */
 	bitset_size = dm_round_up(region_count,
 	bitset_size = dm_round_up(region_count,
-				  sizeof(*lc->clean_bits) << BYTE_SHIFT);
+				  sizeof(unsigned long) << BYTE_SHIFT);
 	bitset_size >>= BYTE_SHIFT;
 	bitset_size >>= BYTE_SHIFT;
 
 
 	lc->bitset_uint32_count = bitset_size / 4;
 	lc->bitset_uint32_count = bitset_size / 4;

+ 7 - 6
drivers/md/dm-mpath.c

@@ -1000,6 +1000,7 @@ static int do_end_io(struct multipath *m, struct bio *bio,
 {
 {
 	struct hw_handler *hwh = &m->hw_handler;
 	struct hw_handler *hwh = &m->hw_handler;
 	unsigned err_flags = MP_FAIL_PATH;	/* Default behavior */
 	unsigned err_flags = MP_FAIL_PATH;	/* Default behavior */
+	unsigned long flags;
 
 
 	if (!error)
 	if (!error)
 		return 0;	/* I/O complete */
 		return 0;	/* I/O complete */
@@ -1010,17 +1011,17 @@ static int do_end_io(struct multipath *m, struct bio *bio,
 	if (error == -EOPNOTSUPP)
 	if (error == -EOPNOTSUPP)
 		return error;
 		return error;
 
 
-	spin_lock(&m->lock);
+	spin_lock_irqsave(&m->lock, flags);
 	if (!m->nr_valid_paths) {
 	if (!m->nr_valid_paths) {
 		if (!m->queue_if_no_path) {
 		if (!m->queue_if_no_path) {
-			spin_unlock(&m->lock);
+			spin_unlock_irqrestore(&m->lock, flags);
 			return -EIO;
 			return -EIO;
 		} else {
 		} else {
-			spin_unlock(&m->lock);
+			spin_unlock_irqrestore(&m->lock, flags);
 			goto requeue;
 			goto requeue;
 		}
 		}
 	}
 	}
-	spin_unlock(&m->lock);
+	spin_unlock_irqrestore(&m->lock, flags);
 
 
 	if (hwh->type && hwh->type->error)
 	if (hwh->type && hwh->type->error)
 		err_flags = hwh->type->error(hwh, bio);
 		err_flags = hwh->type->error(hwh, bio);
@@ -1040,12 +1041,12 @@ static int do_end_io(struct multipath *m, struct bio *bio,
 	dm_bio_restore(&mpio->details, bio);
 	dm_bio_restore(&mpio->details, bio);
 
 
 	/* queue for the daemon to resubmit or fail */
 	/* queue for the daemon to resubmit or fail */
-	spin_lock(&m->lock);
+	spin_lock_irqsave(&m->lock, flags);
 	bio_list_add(&m->queued_ios, bio);
 	bio_list_add(&m->queued_ios, bio);
 	m->queue_size++;
 	m->queue_size++;
 	if (!m->queue_io)
 	if (!m->queue_io)
 		queue_work(kmultipathd, &m->process_queued_ios);
 		queue_work(kmultipathd, &m->process_queued_ios);
-	spin_unlock(&m->lock);
+	spin_unlock_irqrestore(&m->lock, flags);
 
 
 	return 1;	/* io not complete */
 	return 1;	/* io not complete */
 }
 }

+ 9 - 11
drivers/md/dm-raid1.c

@@ -376,16 +376,18 @@ static void rh_inc(struct region_hash *rh, region_t region)
 	read_lock(&rh->hash_lock);
 	read_lock(&rh->hash_lock);
 	reg = __rh_find(rh, region);
 	reg = __rh_find(rh, region);
 
 
+	spin_lock_irq(&rh->region_lock);
 	atomic_inc(&reg->pending);
 	atomic_inc(&reg->pending);
 
 
-	spin_lock_irq(&rh->region_lock);
 	if (reg->state == RH_CLEAN) {
 	if (reg->state == RH_CLEAN) {
-		rh->log->type->mark_region(rh->log, reg->key);
-
 		reg->state = RH_DIRTY;
 		reg->state = RH_DIRTY;
 		list_del_init(&reg->list);	/* take off the clean list */
 		list_del_init(&reg->list);	/* take off the clean list */
-	}
-	spin_unlock_irq(&rh->region_lock);
+		spin_unlock_irq(&rh->region_lock);
+
+		rh->log->type->mark_region(rh->log, reg->key);
+	} else
+		spin_unlock_irq(&rh->region_lock);
+
 
 
 	read_unlock(&rh->hash_lock);
 	read_unlock(&rh->hash_lock);
 }
 }
@@ -408,21 +410,17 @@ static void rh_dec(struct region_hash *rh, region_t region)
 	reg = __rh_lookup(rh, region);
 	reg = __rh_lookup(rh, region);
 	read_unlock(&rh->hash_lock);
 	read_unlock(&rh->hash_lock);
 
 
+	spin_lock_irqsave(&rh->region_lock, flags);
 	if (atomic_dec_and_test(&reg->pending)) {
 	if (atomic_dec_and_test(&reg->pending)) {
-		spin_lock_irqsave(&rh->region_lock, flags);
-		if (atomic_read(&reg->pending)) { /* check race */
-			spin_unlock_irqrestore(&rh->region_lock, flags);
-			return;
-		}
 		if (reg->state == RH_RECOVERING) {
 		if (reg->state == RH_RECOVERING) {
 			list_add_tail(&reg->list, &rh->quiesced_regions);
 			list_add_tail(&reg->list, &rh->quiesced_regions);
 		} else {
 		} else {
 			reg->state = RH_CLEAN;
 			reg->state = RH_CLEAN;
 			list_add(&reg->list, &rh->clean_regions);
 			list_add(&reg->list, &rh->clean_regions);
 		}
 		}
-		spin_unlock_irqrestore(&rh->region_lock, flags);
 		should_wake = 1;
 		should_wake = 1;
 	}
 	}
+	spin_unlock_irqrestore(&rh->region_lock, flags);
 
 
 	if (should_wake)
 	if (should_wake)
 		wake();
 		wake();

+ 1 - 1
drivers/message/i2o/pci.c

@@ -421,8 +421,8 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
 	i2o_pci_free(c);
 	i2o_pci_free(c);
 
 
       free_controller:
       free_controller:
-	i2o_iop_free(c);
 	put_device(c->device.parent);
 	put_device(c->device.parent);
+	i2o_iop_free(c);
 
 
       disable:
       disable:
 	pci_disable_device(pdev);
 	pci_disable_device(pdev);

+ 2 - 0
drivers/net/dgrs.c

@@ -1458,6 +1458,8 @@ static struct pci_driver dgrs_pci_driver = {
 	.probe = dgrs_pci_probe,
 	.probe = dgrs_pci_probe,
 	.remove = __devexit_p(dgrs_pci_remove),
 	.remove = __devexit_p(dgrs_pci_remove),
 };
 };
+#else
+static struct pci_driver dgrs_pci_driver = {};
 #endif
 #endif
 
 
 
 

+ 0 - 1
drivers/pci/hotplug/pciehp.h

@@ -59,7 +59,6 @@ struct slot {
 	struct slot *next;
 	struct slot *next;
 	u8 bus;
 	u8 bus;
 	u8 device;
 	u8 device;
-	u16 status;
 	u32 number;
 	u32 number;
 	u8 state;
 	u8 state;
 	struct timer_list task_event;
 	struct timer_list task_event;

+ 2 - 13
drivers/pci/hotplug/pciehp_ctrl.c

@@ -207,7 +207,6 @@ u8 pciehp_handle_power_fault(u8 hp_slot, void *inst_id)
 		 * power fault Cleared
 		 * power fault Cleared
 		 */
 		 */
 		info("Power fault cleared on Slot(%d)\n", ctrl->first_slot + hp_slot);
 		info("Power fault cleared on Slot(%d)\n", ctrl->first_slot + hp_slot);
-		p_slot->status = 0x00;
 		taskInfo->event_type = INT_POWER_FAULT_CLEAR;
 		taskInfo->event_type = INT_POWER_FAULT_CLEAR;
 	} else {
 	} else {
 		/*
 		/*
@@ -215,8 +214,6 @@ u8 pciehp_handle_power_fault(u8 hp_slot, void *inst_id)
 		 */
 		 */
 		info("Power fault on Slot(%d)\n", ctrl->first_slot + hp_slot);
 		info("Power fault on Slot(%d)\n", ctrl->first_slot + hp_slot);
 		taskInfo->event_type = INT_POWER_FAULT;
 		taskInfo->event_type = INT_POWER_FAULT;
-		/* set power fault status for this board */
-		p_slot->status = 0xFF;
 		info("power fault bit %x set\n", hp_slot);
 		info("power fault bit %x set\n", hp_slot);
 	}
 	}
 	if (rc)
 	if (rc)
@@ -317,13 +314,10 @@ static int board_added(struct slot *p_slot)
 		return rc;
 		return rc;
 	}
 	}
 
 
-	dbg("%s: slot status = %x\n", __FUNCTION__, p_slot->status);
-
 	/* Check for a power fault */
 	/* Check for a power fault */
-	if (p_slot->status == 0xFF) {
-		/* power fault occurred, but it was benign */
+	if (p_slot->hpc_ops->query_power_fault(p_slot)) {
+		dbg("%s: power fault detected\n", __FUNCTION__);
 		rc = POWER_FAILURE;
 		rc = POWER_FAILURE;
-		p_slot->status = 0;
 		goto err_exit;
 		goto err_exit;
 	}
 	}
 
 
@@ -334,8 +328,6 @@ static int board_added(struct slot *p_slot)
 		goto err_exit;
 		goto err_exit;
 	}
 	}
 
 
-	p_slot->status = 0;
-
 	/*
 	/*
 	 * Some PCI Express root ports require fixup after hot-plug operation.
 	 * Some PCI Express root ports require fixup after hot-plug operation.
 	 */
 	 */
@@ -382,9 +374,6 @@ static int remove_board(struct slot *p_slot)
 
 
 	dbg("In %s, hp_slot = %d\n", __FUNCTION__, hp_slot);
 	dbg("In %s, hp_slot = %d\n", __FUNCTION__, hp_slot);
 
 
-	/* Change status to shutdown */
-	p_slot->status = 0x01;
-
 	/* Wait for exclusive access to hardware */
 	/* Wait for exclusive access to hardware */
 	down(&ctrl->crit_sect);
 	down(&ctrl->crit_sect);
 
 

+ 9 - 1
drivers/pci/hotplug/pciehp_hpc.c

@@ -750,7 +750,7 @@ static int hpc_power_on_slot(struct slot * slot)
 {
 {
 	struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle;
 	struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle;
 	u16 slot_cmd;
 	u16 slot_cmd;
-	u16 slot_ctrl;
+	u16 slot_ctrl, slot_status;
 
 
 	int retval = 0;
 	int retval = 0;
 
 
@@ -767,6 +767,14 @@ static int hpc_power_on_slot(struct slot * slot)
 		return -1;
 		return -1;
 	}
 	}
 
 
+	/* Clear sticky power-fault bit from previous power failures */
+	hp_register_read_word(php_ctlr->pci_dev,
+			SLOT_STATUS(slot->ctrl->cap_base), slot_status);
+	slot_status &= PWR_FAULT_DETECTED;
+	if (slot_status)
+		hp_register_write_word(php_ctlr->pci_dev,
+			SLOT_STATUS(slot->ctrl->cap_base), slot_status);
+
 	retval = hp_register_read_word(php_ctlr->pci_dev, SLOT_CTRL(slot->ctrl->cap_base), slot_ctrl);
 	retval = hp_register_read_word(php_ctlr->pci_dev, SLOT_CTRL(slot->ctrl->cap_base), slot_ctrl);
 
 
 	if (retval) {
 	if (retval) {

+ 1 - 0
drivers/pci/pci-acpi.c

@@ -178,6 +178,7 @@ EXPORT_SYMBOL(pci_osc_support_set);
 
 
 /**
 /**
  * pci_osc_control_set - commit requested control to Firmware
  * pci_osc_control_set - commit requested control to Firmware
+ * @handle: acpi_handle for the target ACPI object
  * @flags: driver's requested control bits
  * @flags: driver's requested control bits
  *
  *
  * Attempt to take control from Firmware on requested control bits.
  * Attempt to take control from Firmware on requested control bits.

+ 6 - 6
drivers/sbus/char/aurora.c

@@ -124,25 +124,25 @@ static inline int aurora_paranoia_check(struct Aurora_port const * port,
  */
  */
 
 
 /* Get board number from pointer */
 /* Get board number from pointer */
-extern inline int board_No (struct Aurora_board const * bp)
+static inline int board_No (struct Aurora_board const * bp)
 {
 {
 	return bp - aurora_board;
 	return bp - aurora_board;
 }
 }
 
 
 /* Get port number from pointer */
 /* Get port number from pointer */
-extern inline int port_No (struct Aurora_port const * port)
+static inline int port_No (struct Aurora_port const * port)
 {
 {
 	return AURORA_PORT(port - aurora_port); 
 	return AURORA_PORT(port - aurora_port); 
 }
 }
 
 
 /* Get pointer to board from pointer to port */
 /* Get pointer to board from pointer to port */
-extern inline struct Aurora_board * port_Board(struct Aurora_port const * port)
+static inline struct Aurora_board * port_Board(struct Aurora_port const * port)
 {
 {
 	return &aurora_board[AURORA_BOARD(port - aurora_port)];
 	return &aurora_board[AURORA_BOARD(port - aurora_port)];
 }
 }
 
 
 /* Wait for Channel Command Register ready */
 /* Wait for Channel Command Register ready */
-extern inline void aurora_wait_CCR(struct aurora_reg128 * r)
+static inline void aurora_wait_CCR(struct aurora_reg128 * r)
 {
 {
 	unsigned long delay;
 	unsigned long delay;
 
 
@@ -161,7 +161,7 @@ printk("aurora_wait_CCR\n");
  */
  */
 
 
 /* Must be called with enabled interrupts */
 /* Must be called with enabled interrupts */
-extern inline void aurora_long_delay(unsigned long delay)
+static inline void aurora_long_delay(unsigned long delay)
 {
 {
 	unsigned long i;
 	unsigned long i;
 
 
@@ -420,7 +420,7 @@ static void aurora_release_io_range(struct Aurora_board *bp)
 	sbus_iounmap((unsigned long)bp->r3, 4);
 	sbus_iounmap((unsigned long)bp->r3, 4);
 }
 }
 
 
-extern inline void aurora_mark_event(struct Aurora_port * port, int event)
+static inline void aurora_mark_event(struct Aurora_port * port, int event)
 {
 {
 #ifdef AURORA_DEBUG
 #ifdef AURORA_DEBUG
 	printk("aurora_mark_event: start\n");
 	printk("aurora_mark_event: start\n");

+ 5 - 4
drivers/scsi/dpt_i2o.c

@@ -816,7 +816,7 @@ static int adpt_hba_reset(adpt_hba* pHba)
 static void adpt_i2o_sys_shutdown(void)
 static void adpt_i2o_sys_shutdown(void)
 {
 {
 	adpt_hba *pHba, *pNext;
 	adpt_hba *pHba, *pNext;
-	struct adpt_i2o_post_wait_data *p1, *p2;
+	struct adpt_i2o_post_wait_data *p1, *old;
 
 
 	 printk(KERN_INFO"Shutting down Adaptec I2O controllers.\n");
 	 printk(KERN_INFO"Shutting down Adaptec I2O controllers.\n");
 	 printk(KERN_INFO"   This could take a few minutes if there are many devices attached\n");
 	 printk(KERN_INFO"   This could take a few minutes if there are many devices attached\n");
@@ -830,13 +830,14 @@ static void adpt_i2o_sys_shutdown(void)
 	}
 	}
 
 
 	/* Remove any timedout entries from the wait queue.  */
 	/* Remove any timedout entries from the wait queue.  */
-	p2 = NULL;
 //	spin_lock_irqsave(&adpt_post_wait_lock, flags);
 //	spin_lock_irqsave(&adpt_post_wait_lock, flags);
 	/* Nothing should be outstanding at this point so just
 	/* Nothing should be outstanding at this point so just
 	 * free them 
 	 * free them 
 	 */
 	 */
-	for(p1 = adpt_post_wait_queue; p1; p2 = p1, p1 = p2->next) {
-		kfree(p1);
+	for(p1 = adpt_post_wait_queue; p1;) {
+		old = p1;
+		p1 = p1->next;
+		kfree(old);
 	}
 	}
 //	spin_unlock_irqrestore(&adpt_post_wait_lock, flags);
 //	spin_unlock_irqrestore(&adpt_post_wait_lock, flags);
 	adpt_post_wait_queue = NULL;
 	adpt_post_wait_queue = NULL;

+ 1 - 1
drivers/scsi/scsi.c

@@ -265,10 +265,10 @@ struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, gfp_t gfp_mask)
 		spin_lock_irqsave(&dev->list_lock, flags);
 		spin_lock_irqsave(&dev->list_lock, flags);
 		list_add_tail(&cmd->list, &dev->cmd_list);
 		list_add_tail(&cmd->list, &dev->cmd_list);
 		spin_unlock_irqrestore(&dev->list_lock, flags);
 		spin_unlock_irqrestore(&dev->list_lock, flags);
+		cmd->jiffies_at_alloc = jiffies;
 	} else
 	} else
 		put_device(&dev->sdev_gendev);
 		put_device(&dev->sdev_gendev);
 
 
-	cmd->jiffies_at_alloc = jiffies;
 	return cmd;
 	return cmd;
 }				
 }				
 EXPORT_SYMBOL(scsi_get_command);
 EXPORT_SYMBOL(scsi_get_command);

+ 36 - 2
drivers/usb/core/hcd-pci.c

@@ -20,9 +20,17 @@
 #include <linux/kernel.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/pci.h>
+#include <linux/usb.h>
+
 #include <asm/io.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/irq.h>
-#include <linux/usb.h>
+
+#ifdef CONFIG_PPC_PMAC
+#include <asm/machdep.h>
+#include <asm/pmac_feature.h>
+#include <asm/pci-bridge.h>
+#include <asm/prom.h>
+#endif
 
 
 #include "usb.h"
 #include "usb.h"
 #include "hcd.h"
 #include "hcd.h"
@@ -277,8 +285,22 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
 	}
 	}
 
 
 done:
 done:
-	if (retval == 0)
+	if (retval == 0) {
 		dev->dev.power.power_state = PMSG_SUSPEND;
 		dev->dev.power.power_state = PMSG_SUSPEND;
+
+#ifdef CONFIG_PPC_PMAC
+		/* Disable ASIC clocks for USB */
+		if (_machine == _MACH_Pmac) {
+			struct device_node	*of_node;
+
+			of_node = pci_device_to_OF_node (dev);
+			if (of_node)
+				pmac_call_feature(PMAC_FTR_USB_ENABLE,
+							of_node, 0, 0);
+		}
+#endif
+	}
+
 	return retval;
 	return retval;
 }
 }
 EXPORT_SYMBOL (usb_hcd_pci_suspend);
 EXPORT_SYMBOL (usb_hcd_pci_suspend);
@@ -301,6 +323,18 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
 		return 0;
 		return 0;
 	}
 	}
 
 
+#ifdef CONFIG_PPC_PMAC
+	/* Reenable ASIC clocks for USB */
+	if (_machine == _MACH_Pmac) {
+		struct device_node *of_node;
+
+		of_node = pci_device_to_OF_node (dev);
+		if (of_node)
+			pmac_call_feature (PMAC_FTR_USB_ENABLE,
+						of_node, 0, 1);
+	}
+#endif
+
 	/* NOTE:  chip docs cover clean "real suspend" cases (what Linux
 	/* NOTE:  chip docs cover clean "real suspend" cases (what Linux
 	 * calls "standby", "suspend to RAM", and so on).  There are also
 	 * calls "standby", "suspend to RAM", and so on).  There are also
 	 * dirty cases when swsusp fakes a suspend in "shutdown" mode.
 	 * dirty cases when swsusp fakes a suspend in "shutdown" mode.

+ 0 - 1
drivers/usb/core/hub.c

@@ -1669,7 +1669,6 @@ int usb_suspend_device(struct usb_device *udev)
 	return 0;
 	return 0;
 #endif
 #endif
 }
 }
-EXPORT_SYMBOL_GPL(usb_suspend_device);
 
 
 /*
 /*
  * If the USB "suspend" state is in use (rather than "global suspend"),
  * If the USB "suspend" state is in use (rather than "global suspend"),

+ 84 - 76
drivers/usb/host/ehci-hcd.c

@@ -411,50 +411,39 @@ static void ehci_stop (struct usb_hcd *hcd)
 	dbg_status (ehci, "ehci_stop completed", readl (&ehci->regs->status));
 	dbg_status (ehci, "ehci_stop completed", readl (&ehci->regs->status));
 }
 }
 
 
-static int ehci_run (struct usb_hcd *hcd)
+/* one-time init, only for memory state */
+static int ehci_init(struct usb_hcd *hcd)
 {
 {
-	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
+	struct ehci_hcd		*ehci = hcd_to_ehci(hcd);
 	u32			temp;
 	u32			temp;
 	int			retval;
 	int			retval;
 	u32			hcc_params;
 	u32			hcc_params;
-	int			first;
-
-	/* skip some things on restart paths */
-	first = (ehci->watchdog.data == 0);
-	if (first) {
-		init_timer (&ehci->watchdog);
-		ehci->watchdog.function = ehci_watchdog;
-		ehci->watchdog.data = (unsigned long) ehci;
-	}
+
+	spin_lock_init(&ehci->lock);
+
+	init_timer(&ehci->watchdog);
+	ehci->watchdog.function = ehci_watchdog;
+	ehci->watchdog.data = (unsigned long) ehci;
 
 
 	/*
 	/*
 	 * hw default: 1K periodic list heads, one per frame.
 	 * hw default: 1K periodic list heads, one per frame.
 	 * periodic_size can shrink by USBCMD update if hcc_params allows.
 	 * periodic_size can shrink by USBCMD update if hcc_params allows.
 	 */
 	 */
 	ehci->periodic_size = DEFAULT_I_TDPS;
 	ehci->periodic_size = DEFAULT_I_TDPS;
-	if (first && (retval = ehci_mem_init (ehci, GFP_KERNEL)) < 0)
+	if ((retval = ehci_mem_init(ehci, GFP_KERNEL)) < 0)
 		return retval;
 		return retval;
 
 
 	/* controllers may cache some of the periodic schedule ... */
 	/* controllers may cache some of the periodic schedule ... */
-	hcc_params = readl (&ehci->caps->hcc_params);
-	if (HCC_ISOC_CACHE (hcc_params)) 	// full frame cache
+	hcc_params = readl(&ehci->caps->hcc_params);
+	if (HCC_ISOC_CACHE(hcc_params)) 	// full frame cache
 		ehci->i_thresh = 8;
 		ehci->i_thresh = 8;
 	else					// N microframes cached
 	else					// N microframes cached
-		ehci->i_thresh = 2 + HCC_ISOC_THRES (hcc_params);
+		ehci->i_thresh = 2 + HCC_ISOC_THRES(hcc_params);
 
 
 	ehci->reclaim = NULL;
 	ehci->reclaim = NULL;
 	ehci->reclaim_ready = 0;
 	ehci->reclaim_ready = 0;
 	ehci->next_uframe = -1;
 	ehci->next_uframe = -1;
 
 
-	/* controller state:  unknown --> reset */
-
-	/* EHCI spec section 4.1 */
-	if ((retval = ehci_reset (ehci)) != 0) {
-		ehci_mem_cleanup (ehci);
-		return retval;
-	}
-	writel (ehci->periodic_dma, &ehci->regs->frame_list);
-
 	/*
 	/*
 	 * dedicate a qh for the async ring head, since we couldn't unlink
 	 * dedicate a qh for the async ring head, since we couldn't unlink
 	 * a 'real' qh without stopping the async schedule [4.8].  use it
 	 * a 'real' qh without stopping the async schedule [4.8].  use it
@@ -462,37 +451,13 @@ static int ehci_run (struct usb_hcd *hcd)
 	 * its dummy is used in hw_alt_next of many tds, to prevent the qh
 	 * its dummy is used in hw_alt_next of many tds, to prevent the qh
 	 * from automatically advancing to the next td after short reads.
 	 * from automatically advancing to the next td after short reads.
 	 */
 	 */
-	if (first) {
-		ehci->async->qh_next.qh = NULL;
-		ehci->async->hw_next = QH_NEXT (ehci->async->qh_dma);
-		ehci->async->hw_info1 = cpu_to_le32 (QH_HEAD);
-		ehci->async->hw_token = cpu_to_le32 (QTD_STS_HALT);
-		ehci->async->hw_qtd_next = EHCI_LIST_END;
-		ehci->async->qh_state = QH_STATE_LINKED;
-		ehci->async->hw_alt_next = QTD_NEXT (ehci->async->dummy->qtd_dma);
-	}
-	writel ((u32)ehci->async->qh_dma, &ehci->regs->async_next);
-
-	/*
-	 * hcc_params controls whether ehci->regs->segment must (!!!)
-	 * be used; it constrains QH/ITD/SITD and QTD locations.
-	 * pci_pool consistent memory always uses segment zero.
-	 * streaming mappings for I/O buffers, like pci_map_single(),
-	 * can return segments above 4GB, if the device allows.
-	 *
-	 * NOTE:  the dma mask is visible through dma_supported(), so
-	 * drivers can pass this info along ... like NETIF_F_HIGHDMA,
-	 * Scsi_Host.highmem_io, and so forth.  It's readonly to all
-	 * host side drivers though.
-	 */
-	if (HCC_64BIT_ADDR (hcc_params)) {
-		writel (0, &ehci->regs->segment);
-#if 0
-// this is deeply broken on almost all architectures
-		if (!dma_set_mask (hcd->self.controller, DMA_64BIT_MASK))
-			ehci_info (ehci, "enabled 64bit DMA\n");
-#endif
-	}
+	ehci->async->qh_next.qh = NULL;
+	ehci->async->hw_next = QH_NEXT(ehci->async->qh_dma);
+	ehci->async->hw_info1 = cpu_to_le32(QH_HEAD);
+	ehci->async->hw_token = cpu_to_le32(QTD_STS_HALT);
+	ehci->async->hw_qtd_next = EHCI_LIST_END;
+	ehci->async->qh_state = QH_STATE_LINKED;
+	ehci->async->hw_alt_next = QTD_NEXT(ehci->async->dummy->qtd_dma);
 
 
 	/* clear interrupt enables, set irq latency */
 	/* clear interrupt enables, set irq latency */
 	if (log2_irq_thresh < 0 || log2_irq_thresh > 6)
 	if (log2_irq_thresh < 0 || log2_irq_thresh > 6)
@@ -507,13 +472,13 @@ static int ehci_run (struct usb_hcd *hcd)
 		 * make problems:  throughput reduction (!), data errors...
 		 * make problems:  throughput reduction (!), data errors...
 		 */
 		 */
 		if (park) {
 		if (park) {
-			park = min (park, (unsigned) 3);
+			park = min(park, (unsigned) 3);
 			temp |= CMD_PARK;
 			temp |= CMD_PARK;
 			temp |= park << 8;
 			temp |= park << 8;
 		}
 		}
-		ehci_info (ehci, "park %d\n", park);
+		ehci_dbg(ehci, "park %d\n", park);
 	}
 	}
-	if (HCC_PGM_FRAMELISTLEN (hcc_params)) {
+	if (HCC_PGM_FRAMELISTLEN(hcc_params)) {
 		/* periodic schedule size can be smaller than default */
 		/* periodic schedule size can be smaller than default */
 		temp &= ~(3 << 2);
 		temp &= ~(3 << 2);
 		temp |= (EHCI_TUNE_FLS << 2);
 		temp |= (EHCI_TUNE_FLS << 2);
@@ -521,16 +486,63 @@ static int ehci_run (struct usb_hcd *hcd)
 		case 0: ehci->periodic_size = 1024; break;
 		case 0: ehci->periodic_size = 1024; break;
 		case 1: ehci->periodic_size = 512; break;
 		case 1: ehci->periodic_size = 512; break;
 		case 2: ehci->periodic_size = 256; break;
 		case 2: ehci->periodic_size = 256; break;
-		default:	BUG ();
+		default:	BUG();
 		}
 		}
 	}
 	}
+	ehci->command = temp;
+
+	ehci->reboot_notifier.notifier_call = ehci_reboot;
+	register_reboot_notifier(&ehci->reboot_notifier);
+
+	return 0;
+}
+
+/* start HC running; it's halted, ehci_init() has been run (once) */
+static int ehci_run (struct usb_hcd *hcd)
+{
+	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
+	int			retval;
+	u32			temp;
+	u32			hcc_params;
+
+	/* EHCI spec section 4.1 */
+	if ((retval = ehci_reset(ehci)) != 0) {
+		unregister_reboot_notifier(&ehci->reboot_notifier);
+		ehci_mem_cleanup(ehci);
+		return retval;
+	}
+	writel(ehci->periodic_dma, &ehci->regs->frame_list);
+	writel((u32)ehci->async->qh_dma, &ehci->regs->async_next);
+
+	/*
+	 * hcc_params controls whether ehci->regs->segment must (!!!)
+	 * be used; it constrains QH/ITD/SITD and QTD locations.
+	 * pci_pool consistent memory always uses segment zero.
+	 * streaming mappings for I/O buffers, like pci_map_single(),
+	 * can return segments above 4GB, if the device allows.
+	 *
+	 * NOTE:  the dma mask is visible through dma_supported(), so
+	 * drivers can pass this info along ... like NETIF_F_HIGHDMA,
+	 * Scsi_Host.highmem_io, and so forth.  It's readonly to all
+	 * host side drivers though.
+	 */
+	hcc_params = readl(&ehci->caps->hcc_params);
+	if (HCC_64BIT_ADDR(hcc_params)) {
+		writel(0, &ehci->regs->segment);
+#if 0
+// this is deeply broken on almost all architectures
+		if (!dma_set_mask(hcd->self.controller, DMA_64BIT_MASK))
+			ehci_info(ehci, "enabled 64bit DMA\n");
+#endif
+	}
+
+
 	// Philips, Intel, and maybe others need CMD_RUN before the
 	// Philips, Intel, and maybe others need CMD_RUN before the
 	// root hub will detect new devices (why?); NEC doesn't
 	// root hub will detect new devices (why?); NEC doesn't
-	temp |= CMD_RUN;
-	writel (temp, &ehci->regs->command);
-	dbg_cmd (ehci, "init", temp);
-
-	/* set async sleep time = 10 us ... ? */
+	ehci->command &= ~(CMD_LRESET|CMD_IAAD|CMD_PSE|CMD_ASE|CMD_RESET);
+	ehci->command |= CMD_RUN;
+	writel (ehci->command, &ehci->regs->command);
+	dbg_cmd (ehci, "init", ehci->command);
 
 
 	/*
 	/*
 	 * Start, enabling full USB 2.0 functionality ... usb 1.1 devices
 	 * Start, enabling full USB 2.0 functionality ... usb 1.1 devices
@@ -538,26 +550,23 @@ static int ehci_run (struct usb_hcd *hcd)
 	 * involved with the root hub.  (Except where one is integrated,
 	 * involved with the root hub.  (Except where one is integrated,
 	 * and there's no companion controller unless maybe for USB OTG.)
 	 * and there's no companion controller unless maybe for USB OTG.)
 	 */
 	 */
-	if (first) {
-		ehci->reboot_notifier.notifier_call = ehci_reboot;
-		register_reboot_notifier (&ehci->reboot_notifier);
-	}
-
 	hcd->state = HC_STATE_RUNNING;
 	hcd->state = HC_STATE_RUNNING;
 	writel (FLAG_CF, &ehci->regs->configured_flag);
 	writel (FLAG_CF, &ehci->regs->configured_flag);
-	readl (&ehci->regs->command);	/* unblock posted write */
+	readl (&ehci->regs->command);	/* unblock posted writes */
 
 
 	temp = HC_VERSION(readl (&ehci->caps->hc_capbase));
 	temp = HC_VERSION(readl (&ehci->caps->hc_capbase));
 	ehci_info (ehci,
 	ehci_info (ehci,
-		"USB %x.%x %s, EHCI %x.%02x, driver %s\n",
+		"USB %x.%x started, EHCI %x.%02x, driver %s\n",
 		((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f),
 		((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f),
-		first ? "initialized" : "restarted",
 		temp >> 8, temp & 0xff, DRIVER_VERSION);
 		temp >> 8, temp & 0xff, DRIVER_VERSION);
 
 
 	writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */
 	writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */
 
 
-	if (first)
-		create_debug_files (ehci);
+	/* GRR this is run-once init(), being done every time the HC starts.
+	 * So long as they're part of class devices, we can't do it init()
+	 * since the class device isn't created that early.
+	 */
+	create_debug_files(ehci);
 
 
 	return 0;
 	return 0;
 }
 }
@@ -636,9 +645,8 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs)
 			 * stop that signaling.
 			 * stop that signaling.
 			 */
 			 */
 			ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);
 			ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);
-			mod_timer (&hcd->rh_timer,
-					ehci->reset_done [i] + 1);
 			ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
 			ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
+			usb_hcd_resume_root_hub(hcd);
 		}
 		}
 	}
 	}
 
 

+ 7 - 0
drivers/usb/host/ehci-hub.c

@@ -94,6 +94,13 @@ static int ehci_bus_resume (struct usb_hcd *hcd)
 		msleep(5);
 		msleep(5);
 	spin_lock_irq (&ehci->lock);
 	spin_lock_irq (&ehci->lock);
 
 
+	/* Ideally and we've got a real resume here, and no port's power
+	 * was lost.  (For PCI, that means Vaux was maintained.)  But we
+	 * could instead be restoring a swsusp snapshot -- so that BIOS was
+	 * the last user of the controller, not reset/pm hardware keeping
+	 * state we gave to it.
+	 */
+
 	/* re-init operational registers in case we lost power */
 	/* re-init operational registers in case we lost power */
 	if (readl (&ehci->regs->intr_enable) == 0) {
 	if (readl (&ehci->regs->intr_enable) == 0) {
  		/* at least some APM implementations will try to deliver
  		/* at least some APM implementations will try to deliver

+ 170 - 189
drivers/usb/host/ehci-pci.c

@@ -27,7 +27,7 @@
 /* EHCI 0.96 (and later) section 5.1 says how to kick BIOS/SMM/...
 /* EHCI 0.96 (and later) section 5.1 says how to kick BIOS/SMM/...
  * off the controller (maybe it can boot from highspeed USB disks).
  * off the controller (maybe it can boot from highspeed USB disks).
  */
  */
-static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap)
+static int bios_handoff(struct ehci_hcd *ehci, int where, u32 cap)
 {
 {
 	struct pci_dev *pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller);
 	struct pci_dev *pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller);
 
 
@@ -48,7 +48,7 @@ static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap)
 				where, cap);
 				where, cap);
 			// some BIOS versions seem buggy...
 			// some BIOS versions seem buggy...
 			// return 1;
 			// return 1;
-			ehci_warn (ehci, "continuing after BIOS bug...\n");
+			ehci_warn(ehci, "continuing after BIOS bug...\n");
 			/* disable all SMIs, and clear "BIOS owns" flag */
 			/* disable all SMIs, and clear "BIOS owns" flag */
 			pci_write_config_dword(pdev, where + 4, 0);
 			pci_write_config_dword(pdev, where + 4, 0);
 			pci_write_config_byte(pdev, where + 2, 0);
 			pci_write_config_byte(pdev, where + 2, 0);
@@ -58,96 +58,47 @@ static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap)
 	return 0;
 	return 0;
 }
 }
 
 
-/* called by khubd or root hub init threads */
-static int ehci_pci_reset (struct usb_hcd *hcd)
+/* called after powerup, by probe or system-pm "wakeup" */
+static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev)
 {
 {
-	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
 	u32			temp;
 	u32			temp;
+	int			retval;
 	unsigned		count = 256/4;
 	unsigned		count = 256/4;
 
 
-	spin_lock_init (&ehci->lock);
-
-	ehci->caps = hcd->regs;
-	ehci->regs = hcd->regs + HC_LENGTH (readl (&ehci->caps->hc_capbase));
-	dbg_hcs_params (ehci, "reset");
-	dbg_hcc_params (ehci, "reset");
-
-	/* cache this readonly data; minimize chip reads */
-	ehci->hcs_params = readl (&ehci->caps->hcs_params);
-
-	if (hcd->self.controller->bus == &pci_bus_type) {
-		struct pci_dev	*pdev = to_pci_dev(hcd->self.controller);
-
-		switch (pdev->vendor) {
-		case PCI_VENDOR_ID_TDI:
-			if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
-				ehci->is_tdi_rh_tt = 1;
-				tdi_reset (ehci);
-			}
-			break;
-		case PCI_VENDOR_ID_AMD:
-			/* AMD8111 EHCI doesn't work, according to AMD errata */
-			if (pdev->device == 0x7463) {
-				ehci_info (ehci, "ignoring AMD8111 (errata)\n");
-				return -EIO;
-			}
-			break;
-		case PCI_VENDOR_ID_NVIDIA:
-			/* NVidia reports that certain chips don't handle
-			 * QH, ITD, or SITD addresses above 2GB.  (But TD,
-			 * data buffer, and periodic schedule are normal.)
-			 */
-			switch (pdev->device) {
-			case 0x003c:	/* MCP04 */
-			case 0x005b:	/* CK804 */
-			case 0x00d8:	/* CK8 */
-			case 0x00e8:	/* CK8S */
-				if (pci_set_consistent_dma_mask(pdev,
-							DMA_31BIT_MASK) < 0)
-					ehci_warn (ehci, "can't enable NVidia "
-						"workaround for >2GB RAM\n");
-				break;
-			}
-			break;
-		}
-
-		/* optional debug port, normally in the first BAR */
-		temp = pci_find_capability (pdev, 0x0a);
-		if (temp) {
-			pci_read_config_dword(pdev, temp, &temp);
-			temp >>= 16;
-			if ((temp & (3 << 13)) == (1 << 13)) {
-				temp &= 0x1fff;
-				ehci->debug = hcd->regs + temp;
-				temp = readl (&ehci->debug->control);
-				ehci_info (ehci, "debug port %d%s\n",
-					HCS_DEBUG_PORT(ehci->hcs_params),
-					(temp & DBGP_ENABLED)
-						? " IN USE"
-						: "");
-				if (!(temp & DBGP_ENABLED))
-					ehci->debug = NULL;
-			}
+	/* optional debug port, normally in the first BAR */
+	temp = pci_find_capability(pdev, 0x0a);
+	if (temp) {
+		pci_read_config_dword(pdev, temp, &temp);
+		temp >>= 16;
+		if ((temp & (3 << 13)) == (1 << 13)) {
+			temp &= 0x1fff;
+			ehci->debug = ehci_to_hcd(ehci)->regs + temp;
+			temp = readl(&ehci->debug->control);
+			ehci_info(ehci, "debug port %d%s\n",
+				HCS_DEBUG_PORT(ehci->hcs_params),
+				(temp & DBGP_ENABLED)
+					? " IN USE"
+					: "");
+			if (!(temp & DBGP_ENABLED))
+				ehci->debug = NULL;
 		}
 		}
+	}
 
 
-		temp = HCC_EXT_CAPS (readl (&ehci->caps->hcc_params));
-	} else
-		temp = 0;
+	temp = HCC_EXT_CAPS(readl(&ehci->caps->hcc_params));
 
 
 	/* EHCI 0.96 and later may have "extended capabilities" */
 	/* EHCI 0.96 and later may have "extended capabilities" */
 	while (temp && count--) {
 	while (temp && count--) {
 		u32		cap;
 		u32		cap;
 
 
-		pci_read_config_dword (to_pci_dev(hcd->self.controller),
-				temp, &cap);
-		ehci_dbg (ehci, "capability %04x at %02x\n", cap, temp);
+		pci_read_config_dword(pdev, temp, &cap);
+		ehci_dbg(ehci, "capability %04x at %02x\n", cap, temp);
 		switch (cap & 0xff) {
 		switch (cap & 0xff) {
 		case 1:			/* BIOS/SMM/... handoff */
 		case 1:			/* BIOS/SMM/... handoff */
-			if (bios_handoff (ehci, temp, cap) != 0)
+			if (bios_handoff(ehci, temp, cap) != 0)
 				return -EOPNOTSUPP;
 				return -EOPNOTSUPP;
 			break;
 			break;
 		case 0:			/* illegal reserved capability */
 		case 0:			/* illegal reserved capability */
-			ehci_warn (ehci, "illegal capability!\n");
+			ehci_dbg(ehci, "illegal capability!\n");
 			cap = 0;
 			cap = 0;
 			/* FALLTHROUGH */
 			/* FALLTHROUGH */
 		default:		/* unknown */
 		default:		/* unknown */
@@ -156,77 +107,109 @@ static int ehci_pci_reset (struct usb_hcd *hcd)
 		temp = (cap >> 8) & 0xff;
 		temp = (cap >> 8) & 0xff;
 	}
 	}
 	if (!count) {
 	if (!count) {
-		ehci_err (ehci, "bogus capabilities ... PCI problems!\n");
+		ehci_err(ehci, "bogus capabilities ... PCI problems!\n");
 		return -EIO;
 		return -EIO;
 	}
 	}
-	if (ehci_is_TDI(ehci))
-		ehci_reset (ehci);
 
 
-	ehci_port_power (ehci, 0);
+	/* PCI Memory-Write-Invalidate cycle support is optional (uncommon) */
+	retval = pci_set_mwi(pdev);
+	if (!retval)
+		ehci_dbg(ehci, "MWI active\n");
+
+	ehci_port_power(ehci, 0);
+
+	return 0;
+}
+
+/* called by khubd or root hub (re)init threads; leaves HC in halt state */
+static int ehci_pci_reset(struct usb_hcd *hcd)
+{
+	struct ehci_hcd		*ehci = hcd_to_ehci(hcd);
+	struct pci_dev		*pdev = to_pci_dev(hcd->self.controller);
+	u32			temp;
+	int			retval;
+
+	ehci->caps = hcd->regs;
+	ehci->regs = hcd->regs + HC_LENGTH(readl(&ehci->caps->hc_capbase));
+	dbg_hcs_params(ehci, "reset");
+	dbg_hcc_params(ehci, "reset");
+
+	/* cache this readonly data; minimize chip reads */
+	ehci->hcs_params = readl(&ehci->caps->hcs_params);
+
+	retval = ehci_halt(ehci);
+	if (retval)
+		return retval;
+
+	/* NOTE:  only the parts below this line are PCI-specific */
+
+	switch (pdev->vendor) {
+	case PCI_VENDOR_ID_TDI:
+		if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
+			ehci->is_tdi_rh_tt = 1;
+			tdi_reset(ehci);
+		}
+		break;
+	case PCI_VENDOR_ID_AMD:
+		/* AMD8111 EHCI doesn't work, according to AMD errata */
+		if (pdev->device == 0x7463) {
+			ehci_info(ehci, "ignoring AMD8111 (errata)\n");
+			return -EIO;
+		}
+		break;
+	case PCI_VENDOR_ID_NVIDIA:
+		/* NVidia reports that certain chips don't handle
+		 * QH, ITD, or SITD addresses above 2GB.  (But TD,
+		 * data buffer, and periodic schedule are normal.)
+		 */
+		switch (pdev->device) {
+		case 0x003c:	/* MCP04 */
+		case 0x005b:	/* CK804 */
+		case 0x00d8:	/* CK8 */
+		case 0x00e8:	/* CK8S */
+			if (pci_set_consistent_dma_mask(pdev,
+						DMA_31BIT_MASK) < 0)
+				ehci_warn(ehci, "can't enable NVidia "
+					"workaround for >2GB RAM\n");
+			break;
+		}
+		break;
+	}
+
+	if (ehci_is_TDI(ehci))
+		ehci_reset(ehci);
 
 
 	/* at least the Genesys GL880S needs fixup here */
 	/* at least the Genesys GL880S needs fixup here */
 	temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);
 	temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);
 	temp &= 0x0f;
 	temp &= 0x0f;
 	if (temp && HCS_N_PORTS(ehci->hcs_params) > temp) {
 	if (temp && HCS_N_PORTS(ehci->hcs_params) > temp) {
-		ehci_dbg (ehci, "bogus port configuration: "
+		ehci_dbg(ehci, "bogus port configuration: "
 			"cc=%d x pcc=%d < ports=%d\n",
 			"cc=%d x pcc=%d < ports=%d\n",
 			HCS_N_CC(ehci->hcs_params),
 			HCS_N_CC(ehci->hcs_params),
 			HCS_N_PCC(ehci->hcs_params),
 			HCS_N_PCC(ehci->hcs_params),
 			HCS_N_PORTS(ehci->hcs_params));
 			HCS_N_PORTS(ehci->hcs_params));
 
 
-		if (hcd->self.controller->bus == &pci_bus_type) {
-			struct pci_dev	*pdev;
-
-			pdev = to_pci_dev(hcd->self.controller);
-			switch (pdev->vendor) {
-			case 0x17a0:		/* GENESYS */
-				/* GL880S: should be PORTS=2 */
-				temp |= (ehci->hcs_params & ~0xf);
-				ehci->hcs_params = temp;
-				break;
-			case PCI_VENDOR_ID_NVIDIA:
-				/* NF4: should be PCC=10 */
-				break;
-			}
+		switch (pdev->vendor) {
+		case 0x17a0:		/* GENESYS */
+			/* GL880S: should be PORTS=2 */
+			temp |= (ehci->hcs_params & ~0xf);
+			ehci->hcs_params = temp;
+			break;
+		case PCI_VENDOR_ID_NVIDIA:
+			/* NF4: should be PCC=10 */
+			break;
 		}
 		}
 	}
 	}
 
 
-	/* force HC to halt state */
-	return ehci_halt (ehci);
-}
-
-static int ehci_pci_start (struct usb_hcd *hcd)
-{
-	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
-	int result = 0;
-
-	if (hcd->self.controller->bus == &pci_bus_type) {
-		struct pci_dev		*pdev;
-		u16			port_wake;
-
-		pdev = to_pci_dev(hcd->self.controller);
-
-		/* Serial Bus Release Number is at PCI 0x60 offset */
-		pci_read_config_byte(pdev, 0x60, &ehci->sbrn);
-
-		/* port wake capability, reported by boot firmware */
-		pci_read_config_word(pdev, 0x62, &port_wake);
-		hcd->can_wakeup = (port_wake & 1) != 0;
+	/* Serial Bus Release Number is at PCI 0x60 offset */
+	pci_read_config_byte(pdev, 0x60, &ehci->sbrn);
 
 
-		/* help hc dma work well with cachelines */
-		result = pci_set_mwi(pdev);
-		if (result)
-			ehci_dbg(ehci, "unable to enable MWI - not fatal.\n");
-	}
-
-	return ehci_run (hcd);
-}
+	/* REVISIT:  per-port wake capability (PCI 0x62) currently unused */
 
 
-/* always called by thread; normally rmmod */
+	retval = ehci_pci_reinit(ehci, pdev);
 
 
-static void ehci_pci_stop (struct usb_hcd *hcd)
-{
-	ehci_stop (hcd);
+	/* finish init */
+	return ehci_init(hcd);
 }
 }
 
 
 /*-------------------------------------------------------------------------*/
 /*-------------------------------------------------------------------------*/
@@ -235,90 +218,88 @@ static void ehci_pci_stop (struct usb_hcd *hcd)
 
 
 /* suspend/resume, section 4.3 */
 /* suspend/resume, section 4.3 */
 
 
-/* These routines rely on the bus (pci, platform, etc)
+/* These routines rely on the PCI bus glue
  * to handle powerdown and wakeup, and currently also on
  * to handle powerdown and wakeup, and currently also on
  * transceivers that don't need any software attention to set up
  * transceivers that don't need any software attention to set up
  * the right sort of wakeup.
  * the right sort of wakeup.
+ * Also they depend on separate root hub suspend/resume.
  */
  */
 
 
-static int ehci_pci_suspend (struct usb_hcd *hcd, pm_message_t message)
+static int ehci_pci_suspend(struct usb_hcd *hcd, pm_message_t message)
 {
 {
-	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
+	struct ehci_hcd		*ehci = hcd_to_ehci(hcd);
 
 
-	if (time_before (jiffies, ehci->next_statechange))
-		msleep (100);
+	if (time_before(jiffies, ehci->next_statechange))
+		msleep(10);
 
 
-#ifdef	CONFIG_USB_SUSPEND
-	(void) usb_suspend_device (hcd->self.root_hub);
-#else
-	usb_lock_device (hcd->self.root_hub);
-	(void) ehci_bus_suspend (hcd);
-	usb_unlock_device (hcd->self.root_hub);
-#endif
-
-	// save (PCI) FLADJ in case of Vaux power loss
+	// could save FLADJ in case of Vaux power loss
 	// ... we'd only use it to handle clock skew
 	// ... we'd only use it to handle clock skew
 
 
 	return 0;
 	return 0;
 }
 }
 
 
-static int ehci_pci_resume (struct usb_hcd *hcd)
+static int ehci_pci_resume(struct usb_hcd *hcd)
 {
 {
-	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
+	struct ehci_hcd		*ehci = hcd_to_ehci(hcd);
 	unsigned		port;
 	unsigned		port;
 	struct usb_device	*root = hcd->self.root_hub;
 	struct usb_device	*root = hcd->self.root_hub;
+	struct pci_dev		*pdev = to_pci_dev(hcd->self.controller);
 	int			retval = -EINVAL;
 	int			retval = -EINVAL;
 
 
-	// maybe restore (PCI) FLADJ
+	// maybe restore FLADJ
 
 
-	if (time_before (jiffies, ehci->next_statechange))
-		msleep (100);
+	if (time_before(jiffies, ehci->next_statechange))
+		msleep(100);
+
+	/* If CF is clear, we lost PCI Vaux power and need to restart.  */
+	if (readl(&ehci->regs->configured_flag) != FLAG_CF)
+		goto restart;
 
 
 	/* If any port is suspended (or owned by the companion),
 	/* If any port is suspended (or owned by the companion),
 	 * we know we can/must resume the HC (and mustn't reset it).
 	 * we know we can/must resume the HC (and mustn't reset it).
+	 * We just defer that to the root hub code.
 	 */
 	 */
-	for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; ) {
+	for (port = HCS_N_PORTS(ehci->hcs_params); port > 0; ) {
 		u32	status;
 		u32	status;
 		port--;
 		port--;
-		status = readl (&ehci->regs->port_status [port]);
+		status = readl(&ehci->regs->port_status [port]);
 		if (!(status & PORT_POWER))
 		if (!(status & PORT_POWER))
 			continue;
 			continue;
-		if (status & (PORT_SUSPEND | PORT_OWNER)) {
-			down (&hcd->self.root_hub->serialize);
-			retval = ehci_bus_resume (hcd);
-			up (&hcd->self.root_hub->serialize);
-			break;
+		if (status & (PORT_SUSPEND | PORT_RESUME | PORT_OWNER)) {
+			usb_hcd_resume_root_hub(hcd);
+			return 0;
 		}
 		}
+	}
+
+restart:
+	ehci_dbg(ehci, "lost power, restarting\n");
+	for (port = HCS_N_PORTS(ehci->hcs_params); port > 0; ) {
+		port--;
 		if (!root->children [port])
 		if (!root->children [port])
 			continue;
 			continue;
-		dbg_port (ehci, __FUNCTION__, port + 1, status);
-		usb_set_device_state (root->children[port],
+		usb_set_device_state(root->children[port],
 					USB_STATE_NOTATTACHED);
 					USB_STATE_NOTATTACHED);
 	}
 	}
 
 
 	/* Else reset, to cope with power loss or flush-to-storage
 	/* Else reset, to cope with power loss or flush-to-storage
-	 * style "resume" having activated BIOS during reboot.
+	 * style "resume" having let BIOS kick in during reboot.
 	 */
 	 */
-	if (port == 0) {
-		(void) ehci_halt (ehci);
-		(void) ehci_reset (ehci);
-		(void) ehci_pci_reset (hcd);
-
-		/* emptying the schedule aborts any urbs */
-		spin_lock_irq (&ehci->lock);
-		if (ehci->reclaim)
-			ehci->reclaim_ready = 1;
-		ehci_work (ehci, NULL);
-		spin_unlock_irq (&ehci->lock);
-
-		/* restart; khubd will disconnect devices */
-		retval = ehci_run (hcd);
-
-		/* here we "know" root ports should always stay powered;
-		 * but some controllers may lose all power.
-		 */
-		ehci_port_power (ehci, 1);
-	}
+	(void) ehci_halt(ehci);
+	(void) ehci_reset(ehci);
+	(void) ehci_pci_reinit(ehci, pdev);
+
+	/* emptying the schedule aborts any urbs */
+	spin_lock_irq(&ehci->lock);
+	if (ehci->reclaim)
+		ehci->reclaim_ready = 1;
+	ehci_work(ehci, NULL);
+	spin_unlock_irq(&ehci->lock);
+
+	/* restart; khubd will disconnect devices */
+	retval = ehci_run(hcd);
+
+	/* here we "know" root ports should always stay powered */
+	ehci_port_power(ehci, 1);
 
 
 	return retval;
 	return retval;
 }
 }
@@ -339,12 +320,12 @@ static const struct hc_driver ehci_pci_hc_driver = {
 	 * basic lifecycle operations
 	 * basic lifecycle operations
 	 */
 	 */
 	.reset =		ehci_pci_reset,
 	.reset =		ehci_pci_reset,
-	.start =		ehci_pci_start,
+	.start =		ehci_run,
 #ifdef	CONFIG_PM
 #ifdef	CONFIG_PM
 	.suspend =		ehci_pci_suspend,
 	.suspend =		ehci_pci_suspend,
 	.resume =		ehci_pci_resume,
 	.resume =		ehci_pci_resume,
 #endif
 #endif
-	.stop =			ehci_pci_stop,
+	.stop =			ehci_stop,
 
 
 	/*
 	/*
 	 * managing i/o requests and associated device resources
 	 * managing i/o requests and associated device resources
@@ -377,7 +358,7 @@ static const struct pci_device_id pci_ids [] = { {
 	},
 	},
 	{ /* end: all zeroes */ }
 	{ /* end: all zeroes */ }
 };
 };
-MODULE_DEVICE_TABLE (pci, pci_ids);
+MODULE_DEVICE_TABLE(pci, pci_ids);
 
 
 /* pci driver glue; this is a "new style" PCI driver module */
 /* pci driver glue; this is a "new style" PCI driver module */
 static struct pci_driver ehci_pci_driver = {
 static struct pci_driver ehci_pci_driver = {
@@ -393,22 +374,22 @@ static struct pci_driver ehci_pci_driver = {
 #endif
 #endif
 };
 };
 
 
-static int __init ehci_hcd_pci_init (void)
+static int __init ehci_hcd_pci_init(void)
 {
 {
 	if (usb_disabled())
 	if (usb_disabled())
 		return -ENODEV;
 		return -ENODEV;
 
 
-	pr_debug ("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
+	pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n",
 		hcd_name,
 		hcd_name,
-		sizeof (struct ehci_qh), sizeof (struct ehci_qtd),
-		sizeof (struct ehci_itd), sizeof (struct ehci_sitd));
+		sizeof(struct ehci_qh), sizeof(struct ehci_qtd),
+		sizeof(struct ehci_itd), sizeof(struct ehci_sitd));
 
 
-	return pci_register_driver (&ehci_pci_driver);
+	return pci_register_driver(&ehci_pci_driver);
 }
 }
-module_init (ehci_hcd_pci_init);
+module_init(ehci_hcd_pci_init);
 
 
-static void __exit ehci_hcd_pci_cleanup (void)
+static void __exit ehci_hcd_pci_cleanup(void)
 {
 {
-	pci_unregister_driver (&ehci_pci_driver);
+	pci_unregister_driver(&ehci_pci_driver);
 }
 }
-module_exit (ehci_hcd_pci_cleanup);
+module_exit(ehci_hcd_pci_cleanup);

+ 0 - 36
drivers/usb/host/ohci-pci.c

@@ -14,15 +14,6 @@
  * This file is licenced under the GPL.
  * This file is licenced under the GPL.
  */
  */
  
  
-#include <linux/jiffies.h>
-
-#ifdef CONFIG_PPC_PMAC
-#include <asm/machdep.h>
-#include <asm/pmac_feature.h>
-#include <asm/pci-bridge.h>
-#include <asm/prom.h>
-#endif
-
 #ifndef CONFIG_PCI
 #ifndef CONFIG_PCI
 #error "This file is PCI bus glue.  CONFIG_PCI must be defined."
 #error "This file is PCI bus glue.  CONFIG_PCI must be defined."
 #endif
 #endif
@@ -115,39 +106,12 @@ ohci_pci_start (struct usb_hcd *hcd)
 static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message)
 static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message)
 {
 {
 	/* root hub was already suspended */
 	/* root hub was already suspended */
-
-	/* FIXME these PMAC things get called in the wrong places.  ASIC
-	 * clocks should be turned off AFTER entering D3, and on BEFORE
-	 * trying to enter D0.  Evidently the PCI layer doesn't currently
-	 * provide the right sort of platform hooks for this ...
-	 */
-#ifdef CONFIG_PPC_PMAC
-	if (_machine == _MACH_Pmac) {
-	   	struct device_node	*of_node;
- 
-		/* Disable USB PAD & cell clock */
-		of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));
-		if (of_node)
-			pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0);
-	}
-#endif /* CONFIG_PPC_PMAC */
 	return 0;
 	return 0;
 }
 }
 
 
 
 
 static int ohci_pci_resume (struct usb_hcd *hcd)
 static int ohci_pci_resume (struct usb_hcd *hcd)
 {
 {
-#ifdef CONFIG_PPC_PMAC
-	if (_machine == _MACH_Pmac) {
-		struct device_node *of_node;
-
-		/* Re-enable USB PAD & cell clock */
-		of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller));
-		if (of_node)
-			pmac_call_feature (PMAC_FTR_USB_ENABLE, of_node, 0, 1);
-	}
-#endif /* CONFIG_PPC_PMAC */
-
 	usb_hcd_resume_root_hub(hcd);
 	usb_hcd_resume_root_hub(hcd);
 	return 0;
 	return 0;
 }
 }

+ 1 - 1
drivers/usb/media/sn9c102_core.c

@@ -199,7 +199,7 @@ static void sn9c102_release_buffers(struct sn9c102_device* cam)
 {
 {
 	if (cam->nbuffers) {
 	if (cam->nbuffers) {
 		rvfree(cam->frame[0].bufmem,
 		rvfree(cam->frame[0].bufmem,
-		       cam->nbuffers * cam->frame[0].buf.length);
+		       cam->nbuffers * PAGE_ALIGN(cam->frame[0].buf.length));
 		cam->nbuffers = 0;
 		cam->nbuffers = 0;
 	}
 	}
 }
 }

+ 2 - 0
drivers/usb/serial/ftdi_sio.c

@@ -475,6 +475,8 @@ static struct usb_device_id id_table_combined [] = {
 	{ USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16HR_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16HR_PID) },
+	{ USB_DEVICE(KOBIL_VID, KOBIL_CONV_B1_PID) },
+	{ USB_DEVICE(KOBIL_VID, KOBIL_CONV_KAAN_PID) },
 	{ },					/* Optional parameter entry */
 	{ },					/* Optional parameter entry */
 	{ }					/* Terminating entry */
 	{ }					/* Terminating entry */
 };
 };

+ 7 - 0
drivers/usb/serial/ftdi_sio.h

@@ -127,6 +127,13 @@
 #define SEALEVEL_2803_7_PID	0X2873 	/* SeaLINK+8 (2803) Port 7 */
 #define SEALEVEL_2803_7_PID	0X2873 	/* SeaLINK+8 (2803) Port 7 */
 #define SEALEVEL_2803_8_PID	0X2883 	/* SeaLINK+8 (2803) Port 8 */
 #define SEALEVEL_2803_8_PID	0X2883 	/* SeaLINK+8 (2803) Port 8 */
 
 
+/*
+ * The following are the values for two KOBIL chipcard terminals.
+ */
+#define KOBIL_VID		0x0d46	/* KOBIL Vendor ID */
+#define KOBIL_CONV_B1_PID	0x2020	/* KOBIL Konverter for B1 */
+#define KOBIL_CONV_KAAN_PID	0x2021	/* KOBIL_Konverter for KAAN */
+
 /*
 /*
  * DSS-20 Sync Station for Sony Ericsson P800
  * DSS-20 Sync Station for Sony Ericsson P800
  */
  */

+ 0 - 1
drivers/usb/serial/ipw.c

@@ -46,7 +46,6 @@
 #include <linux/module.h>
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/spinlock.h>
 #include <linux/usb.h>
 #include <linux/usb.h>
-#include <linux/usb.h>
 #include <asm/uaccess.h>
 #include <asm/uaccess.h>
 #include "usb-serial.h"
 #include "usb-serial.h"
 
 

+ 9 - 0
drivers/usb/storage/unusual_devs.h

@@ -1118,6 +1118,15 @@ UNUSUAL_DEV(  0x2735, 0x100b, 0x0000, 0x9999,
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_GO_SLOW ),
 		US_FL_GO_SLOW ),
 
 
+/*
+ * David Härdeman <david@2gen.com>
+ * The key makes the SCSI stack print confusing (but harmless) messages
+ */
+UNUSUAL_DEV(  0x4146, 0xba01, 0x0100, 0x0100,
+		"Iomega",
+		"Micro Mini 1GB",
+		US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ),
+
 #ifdef CONFIG_USB_STORAGE_SDDR55
 #ifdef CONFIG_USB_STORAGE_SDDR55
 UNUSUAL_DEV(  0x55aa, 0xa103, 0x0000, 0x9999, 
 UNUSUAL_DEV(  0x55aa, 0xa103, 0x0000, 0x9999, 
 		"Sandisk",
 		"Sandisk",

+ 2 - 2
drivers/video/console/fbcon_rotate.h

@@ -49,7 +49,7 @@ static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat)
 static inline void rotate_ud(const char *in, char *out, u32 width, u32 height)
 static inline void rotate_ud(const char *in, char *out, u32 width, u32 height)
 {
 {
 	int i, j;
 	int i, j;
-	int shift = width % 8;
+	int shift = (8 - (width % 8)) & 7;
 
 
 	width = (width + 7) & ~7;
 	width = (width + 7) & ~7;
 
 
@@ -85,7 +85,7 @@ static inline void rotate_cw(const char *in, char *out, u32 width, u32 height)
 static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height)
 static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height)
 {
 {
 	int i, j, h = height, w = width;
 	int i, j, h = height, w = width;
-	int shift = width % 8;
+	int shift = (8 - (width % 8)) & 7;
 
 
 	width = (width + 7) & ~7;
 	width = (width + 7) & ~7;
 	height = (height + 7) & ~7;
 	height = (height + 7) & ~7;

+ 1 - 0
drivers/video/console/vgacon.c

@@ -966,6 +966,7 @@ static int vgacon_adjust_height(struct vc_data *vc, unsigned fontheight)
 	outb_p(0x12, vga_video_port_reg);	/* Vertical display limit */
 	outb_p(0x12, vga_video_port_reg);	/* Vertical display limit */
 	outb_p(vde, vga_video_port_val);
 	outb_p(vde, vga_video_port_val);
 	spin_unlock_irq(&vga_lock);
 	spin_unlock_irq(&vga_lock);
+	vga_video_font_height = fontheight;
 
 
 	for (i = 0; i < MAX_NR_CONSOLES; i++) {
 	for (i = 0; i < MAX_NR_CONSOLES; i++) {
 		struct vc_data *c = vc_cons[i].d;
 		struct vc_data *c = vc_cons[i].d;

+ 5 - 1
drivers/video/fbmem.c

@@ -452,13 +452,17 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
 
 
 	/* Return if no suitable logo was found */
 	/* Return if no suitable logo was found */
 	fb_logo.logo = fb_find_logo(depth);
 	fb_logo.logo = fb_find_logo(depth);
+
+	if (!fb_logo.logo) {
+		return 0;
+	}
 	
 	
 	if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD)
 	if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD)
 		yres = info->var.yres;
 		yres = info->var.yres;
 	else
 	else
 		yres = info->var.xres;
 		yres = info->var.xres;
 
 
-	if (fb_logo.logo && fb_logo.logo->height > yres) {
+	if (fb_logo.logo->height > yres) {
 		fb_logo.logo = NULL;
 		fb_logo.logo = NULL;
 		return 0;
 		return 0;
 	}
 	}

+ 8 - 8
fs/compat.c

@@ -168,8 +168,8 @@ asmlinkage long compat_sys_statfs(const char __user *path, struct compat_statfs
 	if (!error) {
 	if (!error) {
 		struct kstatfs tmp;
 		struct kstatfs tmp;
 		error = vfs_statfs(nd.dentry->d_inode->i_sb, &tmp);
 		error = vfs_statfs(nd.dentry->d_inode->i_sb, &tmp);
-		if (!error && put_compat_statfs(buf, &tmp))
-			error = -EFAULT;
+		if (!error)
+			error = put_compat_statfs(buf, &tmp);
 		path_release(&nd);
 		path_release(&nd);
 	}
 	}
 	return error;
 	return error;
@@ -186,8 +186,8 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user
 	if (!file)
 	if (!file)
 		goto out;
 		goto out;
 	error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp);
 	error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp);
-	if (!error && put_compat_statfs(buf, &tmp))
-		error = -EFAULT;
+	if (!error)
+		error = put_compat_statfs(buf, &tmp);
 	fput(file);
 	fput(file);
 out:
 out:
 	return error;
 	return error;
@@ -236,8 +236,8 @@ asmlinkage long compat_sys_statfs64(const char __user *path, compat_size_t sz, s
 	if (!error) {
 	if (!error) {
 		struct kstatfs tmp;
 		struct kstatfs tmp;
 		error = vfs_statfs(nd.dentry->d_inode->i_sb, &tmp);
 		error = vfs_statfs(nd.dentry->d_inode->i_sb, &tmp);
-		if (!error && put_compat_statfs64(buf, &tmp))
-			error = -EFAULT;
+		if (!error)
+			error = put_compat_statfs64(buf, &tmp);
 		path_release(&nd);
 		path_release(&nd);
 	}
 	}
 	return error;
 	return error;
@@ -257,8 +257,8 @@ asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct c
 	if (!file)
 	if (!file)
 		goto out;
 		goto out;
 	error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp);
 	error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp);
-	if (!error && put_compat_statfs64(buf, &tmp))
-		error = -EFAULT;
+	if (!error)
+		error = put_compat_statfs64(buf, &tmp);
 	fput(file);
 	fput(file);
 out:
 out:
 	return error;
 	return error;

+ 4 - 4
fs/exec.c

@@ -668,7 +668,7 @@ static inline int de_thread(struct task_struct *tsk)
 	if (!thread_group_leader(current)) {
 	if (!thread_group_leader(current)) {
 		struct task_struct *parent;
 		struct task_struct *parent;
 		struct dentry *proc_dentry1, *proc_dentry2;
 		struct dentry *proc_dentry1, *proc_dentry2;
-		unsigned long exit_state, ptrace;
+		unsigned long ptrace;
 
 
 		/*
 		/*
 		 * Wait for the thread group leader to be a zombie.
 		 * Wait for the thread group leader to be a zombie.
@@ -726,15 +726,15 @@ static inline int de_thread(struct task_struct *tsk)
 		list_del(&current->tasks);
 		list_del(&current->tasks);
 		list_add_tail(&current->tasks, &init_task.tasks);
 		list_add_tail(&current->tasks, &init_task.tasks);
 		current->exit_signal = SIGCHLD;
 		current->exit_signal = SIGCHLD;
-		exit_state = leader->exit_state;
+
+		BUG_ON(leader->exit_state != EXIT_ZOMBIE);
+		leader->exit_state = EXIT_DEAD;
 
 
 		write_unlock_irq(&tasklist_lock);
 		write_unlock_irq(&tasklist_lock);
 		spin_unlock(&leader->proc_lock);
 		spin_unlock(&leader->proc_lock);
 		spin_unlock(&current->proc_lock);
 		spin_unlock(&current->proc_lock);
 		proc_pid_flush(proc_dentry1);
 		proc_pid_flush(proc_dentry1);
 		proc_pid_flush(proc_dentry2);
 		proc_pid_flush(proc_dentry2);
-
-		BUG_ON(exit_state != EXIT_ZOMBIE);
         }
         }
 
 
 	/*
 	/*

+ 8 - 4
fs/hugetlbfs/inode.c

@@ -512,10 +512,14 @@ static int hugetlbfs_statfs(struct super_block *sb, struct kstatfs *buf)
 	buf->f_bsize = HPAGE_SIZE;
 	buf->f_bsize = HPAGE_SIZE;
 	if (sbinfo) {
 	if (sbinfo) {
 		spin_lock(&sbinfo->stat_lock);
 		spin_lock(&sbinfo->stat_lock);
-		buf->f_blocks = sbinfo->max_blocks;
-		buf->f_bavail = buf->f_bfree = sbinfo->free_blocks;
-		buf->f_files = sbinfo->max_inodes;
-		buf->f_ffree = sbinfo->free_inodes;
+		/* If no limits set, just report 0 for max/free/used
+		 * blocks, like simple_statfs() */
+		if (sbinfo->max_blocks >= 0) {
+			buf->f_blocks = sbinfo->max_blocks;
+			buf->f_bavail = buf->f_bfree = sbinfo->free_blocks;
+			buf->f_files = sbinfo->max_inodes;
+			buf->f_ffree = sbinfo->free_inodes;
+		}
 		spin_unlock(&sbinfo->stat_lock);
 		spin_unlock(&sbinfo->stat_lock);
 	}
 	}
 	buf->f_namelen = NAME_MAX;
 	buf->f_namelen = NAME_MAX;

+ 4 - 4
fs/jffs2/debug.h

@@ -82,28 +82,28 @@
 	do {								\
 	do {								\
 		printk(JFFS2_ERR_MSG_PREFIX				\
 		printk(JFFS2_ERR_MSG_PREFIX				\
 			" (%d) %s: " fmt, current->pid,			\
 			" (%d) %s: " fmt, current->pid,			\
-			__FUNCTION__, ##__VA_ARGS__);			\
+			__FUNCTION__ , ##__VA_ARGS__);			\
 	} while(0)
 	} while(0)
 
 
 #define JFFS2_WARNING(fmt, ...)						\
 #define JFFS2_WARNING(fmt, ...)						\
 	do {								\
 	do {								\
 		printk(JFFS2_WARN_MSG_PREFIX				\
 		printk(JFFS2_WARN_MSG_PREFIX				\
 			" (%d) %s: " fmt, current->pid,			\
 			" (%d) %s: " fmt, current->pid,			\
-			__FUNCTION__, ##__VA_ARGS__);			\
+			__FUNCTION__ , ##__VA_ARGS__);			\
 	} while(0)
 	} while(0)
 
 
 #define JFFS2_NOTICE(fmt, ...)						\
 #define JFFS2_NOTICE(fmt, ...)						\
 	do {								\
 	do {								\
 		printk(JFFS2_NOTICE_MSG_PREFIX				\
 		printk(JFFS2_NOTICE_MSG_PREFIX				\
 			" (%d) %s: " fmt, current->pid,			\
 			" (%d) %s: " fmt, current->pid,			\
-			__FUNCTION__, ##__VA_ARGS__);			\
+			__FUNCTION__ , ##__VA_ARGS__);			\
 	} while(0)
 	} while(0)
 
 
 #define JFFS2_DEBUG(fmt, ...)						\
 #define JFFS2_DEBUG(fmt, ...)						\
 	do {								\
 	do {								\
 		printk(JFFS2_DBG_MSG_PREFIX				\
 		printk(JFFS2_DBG_MSG_PREFIX				\
 			" (%d) %s: " fmt, current->pid,			\
 			" (%d) %s: " fmt, current->pid,			\
-			__FUNCTION__, ##__VA_ARGS__);			\
+			__FUNCTION__ , ##__VA_ARGS__);			\
 	} while(0)
 	} while(0)
 
 
 /*
 /*

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů