aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-05-04 19:08:35 -0400
committerAnton Altaparmakov <aia21@cantab.net>2005-05-04 19:08:35 -0400
commit36050271e6ec19390184e1a83470eb7e725cad65 (patch)
treeef2c84331d71890e9a68eb63d925d5545cbb4103
parentd4b9ba7bf6f38cff55b5d95a0db7dd91311ce20a (diff)
parent1d42a0ecf478962e8aede355a0be41365c117ff0 (diff)
Merge with /usr/src/ntfs-2.6.git
-rw-r--r--Documentation/aoe/aoe.txt40
-rw-r--r--Documentation/aoe/status.sh4
-rw-r--r--Documentation/pci.txt1
-rw-r--r--Documentation/power/pci.txt35
-rw-r--r--arch/alpha/Kconfig4
-rw-r--r--arch/arm/Kconfig4
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c10
-rw-r--r--arch/arm26/Kconfig4
-rw-r--r--arch/i386/Kconfig4
-rw-r--r--arch/m68knommu/Kconfig5
-rw-r--r--arch/mips/Kconfig4
-rw-r--r--arch/parisc/Kconfig4
-rw-r--r--arch/ppc/Kconfig4
-rw-r--r--arch/ppc64/Kconfig3
-rw-r--r--arch/sh/Kconfig4
-rw-r--r--arch/sparc/prom/memory.c28
-rw-r--r--arch/sparc/prom/sun4prom.c2
-rw-r--r--arch/sparc64/kernel/irq.c6
-rw-r--r--arch/x86_64/Kconfig5
-rw-r--r--drivers/block/Kconfig2
-rw-r--r--drivers/block/aoe/aoe.h2
-rw-r--r--drivers/block/aoe/aoeblk.c13
-rw-r--r--drivers/block/aoe/aoedev.c11
-rw-r--r--drivers/block/aoe/aoenet.c17
-rw-r--r--drivers/char/Kconfig4
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c32
-rw-r--r--drivers/char/ipmi/ipmi_si_sm.h2
-rw-r--r--drivers/char/mbcs.c4
-rw-r--r--drivers/char/mbcs.h4
-rw-r--r--drivers/char/sonypi.c6
-rw-r--r--drivers/mmc/Kconfig2
-rw-r--r--drivers/net/Kconfig10
-rw-r--r--drivers/net/appletalk/Kconfig2
-rw-r--r--drivers/net/hamradio/Kconfig4
-rw-r--r--drivers/net/irda/Kconfig10
-rw-r--r--drivers/net/wan/Kconfig6
-rw-r--r--drivers/parport/Kconfig2
-rw-r--r--drivers/parport/parport_pc.c34
-rw-r--r--drivers/pci/hotplug/ibmphp.h2
-rw-r--r--drivers/pci/hotplug/ibmphp_hpc.c6
-rw-r--r--drivers/pci/hotplug/ibmphp_pci.c7
-rw-r--r--drivers/pci/hotplug/pci_hotplug.h2
-rw-r--r--drivers/pci/hotplug/pciehp_core.c23
-rw-r--r--drivers/pci/hotplug/pcihp_skeleton.c2
-rw-r--r--drivers/pci/msi.c6
-rw-r--r--drivers/pci/pci-acpi.c2
-rw-r--r--drivers/pci/pci-driver.c11
-rw-r--r--drivers/pci/pci-sysfs.c82
-rw-r--r--drivers/pci/pci.c20
-rw-r--r--drivers/pci/probe.c1
-rw-r--r--drivers/pci/proc.c1
-rw-r--r--drivers/pci/quirks.c2
-rw-r--r--drivers/scsi/Kconfig12
-rw-r--r--drivers/usb/core/message.c4
-rw-r--r--drivers/usb/core/urb.c6
-rw-r--r--drivers/usb/gadget/ether.c2
-rw-r--r--drivers/usb/gadget/inode.c2
-rw-r--r--drivers/usb/gadget/lh7a40x_udc.c2
-rw-r--r--drivers/usb/gadget/serial.c2
-rw-r--r--drivers/usb/host/ehci-hcd.c65
-rw-r--r--drivers/usb/host/ehci-hub.c2
-rw-r--r--drivers/usb/host/ehci.h19
-rw-r--r--drivers/usb/host/hc_crisv10.c2
-rw-r--r--drivers/usb/host/sl811-hcd.c4
-rw-r--r--drivers/usb/image/mdc800.c2
-rw-r--r--drivers/usb/input/aiptek.c2
-rw-r--r--drivers/usb/input/mtouchusb.c2
-rw-r--r--drivers/usb/media/ov511.c2
-rw-r--r--drivers/usb/media/pwc/pwc-ctrl.c2
-rw-r--r--drivers/usb/media/pwc/pwc-if.c6
-rw-r--r--drivers/usb/media/pwc/pwc-ioctl.h2
-rw-r--r--drivers/usb/misc/legousbtower.c2
-rw-r--r--drivers/usb/net/usbnet.c3
-rw-r--r--drivers/usb/net/zd1201.c8
-rw-r--r--drivers/usb/serial/Kconfig9
-rw-r--r--drivers/usb/serial/Makefile1
-rw-r--r--drivers/usb/serial/airprime.c63
-rw-r--r--drivers/usb/serial/cypress_m8.c187
-rw-r--r--drivers/usb/serial/ftdi_sio.c46
-rw-r--r--drivers/usb/serial/ftdi_sio.h36
-rw-r--r--drivers/usb/serial/io_usbvend.h2
-rw-r--r--drivers/usb/serial/keyspan_usa90msg.h2
-rw-r--r--drivers/usb/storage/debug.c1
-rw-r--r--drivers/usb/storage/shuttle_usbat.c2
-rw-r--r--drivers/usb/storage/unusual_devs.h17
-rw-r--r--drivers/video/i810/i810_main.c6
-rw-r--r--fs/jfs/jfs_xtree.c6
-rw-r--r--include/asm-alpha/signal.h11
-rw-r--r--include/asm-arm/signal.h15
-rw-r--r--include/asm-arm26/signal.h11
-rw-r--r--include/asm-cris/signal.h11
-rw-r--r--include/asm-frv/signal.h11
-rw-r--r--include/asm-generic/signal.h21
-rw-r--r--include/asm-h8300/signal.h11
-rw-r--r--include/asm-i386/signal.h15
-rw-r--r--include/asm-ia64/signal.h11
-rw-r--r--include/asm-m32r/signal.h15
-rw-r--r--include/asm-m68k/signal.h15
-rw-r--r--include/asm-m68knommu/signal.h11
-rw-r--r--include/asm-mips/signal.h9
-rw-r--r--include/asm-ppc/signal.h15
-rw-r--r--include/asm-ppc64/signal.h20
-rw-r--r--include/asm-s390/signal.h11
-rw-r--r--include/asm-sh/signal.h11
-rw-r--r--include/asm-sh64/signal.h11
-rw-r--r--include/asm-sparc/floppy.h2
-rw-r--r--include/asm-sparc/signal.h11
-rw-r--r--include/asm-sparc64/parport.h6
-rw-r--r--include/asm-sparc64/signal.h16
-rw-r--r--include/asm-v850/signal.h12
-rw-r--r--include/asm-x86_64/signal.h14
-rw-r--r--include/linux/pci.h3
-rw-r--r--include/net/addrconf.h3
-rw-r--r--net/irda/irda_device.c2
114 files changed, 714 insertions, 626 deletions
diff --git a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt
index 43e50108d0e2..3a4dbe4663c9 100644
--- a/Documentation/aoe/aoe.txt
+++ b/Documentation/aoe/aoe.txt
@@ -4,6 +4,16 @@ The EtherDrive (R) HOWTO for users of 2.6 kernels is found at ...
4 4
5 It has many tips and hints! 5 It has many tips and hints!
6 6
7The aoetools are userland programs that are designed to work with this
8driver. The aoetools are on sourceforge.
9
10 http://aoetools.sourceforge.net/
11
12The scripts in this Documentation/aoe directory are intended to
13document the use of the driver and are not necessary if you install
14the aoetools.
15
16
7CREATING DEVICE NODES 17CREATING DEVICE NODES
8 18
9 Users of udev should find the block device nodes created 19 Users of udev should find the block device nodes created
@@ -35,14 +45,15 @@ USING DEVICE NODES
35 45
36 "echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to 46 "echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to
37 limit ATA over Ethernet traffic to eth2 and eth4. AoE traffic from 47 limit ATA over Ethernet traffic to eth2 and eth4. AoE traffic from
38 untrusted networks should be ignored as a matter of security. 48 untrusted networks should be ignored as a matter of security. See
49 also the aoe_iflist driver option described below.
39 50
40 "echo > /dev/etherd/discover" tells the driver to find out what AoE 51 "echo > /dev/etherd/discover" tells the driver to find out what AoE
41 devices are available. 52 devices are available.
42 53
43 These character devices may disappear and be replaced by sysfs 54 These character devices may disappear and be replaced by sysfs
44 counterparts, so distribution maintainers are encouraged to create 55 counterparts. Using the commands in aoetools insulates users from
45 scripts that use these devices. 56 these implementation details.
46 57
47 The block devices are named like this: 58 The block devices are named like this:
48 59
@@ -66,7 +77,8 @@ USING SYSFS
66 through which we are communicating with the remote AoE device. 77 through which we are communicating with the remote AoE device.
67 78
68 There is a script in this directory that formats this information 79 There is a script in this directory that formats this information
69 in a convenient way. 80 in a convenient way. Users with aoetools can use the aoe-stat
81 command.
70 82
71 root@makki root# sh Documentation/aoe/status.sh 83 root@makki root# sh Documentation/aoe/status.sh
72 e10.0 eth3 up 84 e10.0 eth3 up
@@ -89,3 +101,23 @@ USING SYSFS
89 e4.7 eth1 up 101 e4.7 eth1 up
90 e4.8 eth1 up 102 e4.8 eth1 up
91 e4.9 eth1 up 103 e4.9 eth1 up
104
105 Use /sys/module/aoe/parameters/aoe_iflist (or better, the driver
106 option discussed below) instead of /dev/etherd/interfaces to limit
107 AoE traffic to the network interfaces in the given
108 whitespace-separated list. Unlike the old character device, the
109 sysfs entry can be read from as well as written to.
110
111 It's helpful to trigger discovery after setting the list of allowed
112 interfaces. The aoetools package provides an aoe-discover script
113 for this purpose. You can also directly use the
114 /dev/etherd/discover special file described above.
115
116DRIVER OPTIONS
117
118 There is a boot option for the built-in aoe driver and a
119 corresponding module parameter, aoe_iflist. Without this option,
120 all network interfaces may be used for ATA over Ethernet. Here is a
121 usage example for the module parameter.
122
123 modprobe aoe_iflist="eth1 eth3"
diff --git a/Documentation/aoe/status.sh b/Documentation/aoe/status.sh
index 6628116d4a9f..751f3be514b8 100644
--- a/Documentation/aoe/status.sh
+++ b/Documentation/aoe/status.sh
@@ -14,10 +14,6 @@ test ! -d "$sysd/block" && {
14 echo "$me Error: sysfs is not mounted" 1>&2 14 echo "$me Error: sysfs is not mounted" 1>&2
15 exit 1 15 exit 1
16} 16}
17test -z "`lsmod | grep '^aoe'`" && {
18 echo "$me Error: aoe module is not loaded" 1>&2
19 exit 1
20}
21 17
22for d in `ls -d $sysd/block/etherd* 2>/dev/null | grep -v p` end; do 18for d in `ls -d $sysd/block/etherd* 2>/dev/null | grep -v p` end; do
23 # maybe ls comes up empty, so we use "end" 19 # maybe ls comes up empty, so we use "end"
diff --git a/Documentation/pci.txt b/Documentation/pci.txt
index 67514bf87ccd..62b1dc5d97e2 100644
--- a/Documentation/pci.txt
+++ b/Documentation/pci.txt
@@ -279,6 +279,7 @@ pci_for_each_dev_reverse() Superseded by pci_find_device_reverse()
279pci_for_each_bus() Superseded by pci_find_next_bus() 279pci_for_each_bus() Superseded by pci_find_next_bus()
280pci_find_device() Superseded by pci_get_device() 280pci_find_device() Superseded by pci_get_device()
281pci_find_subsys() Superseded by pci_get_subsys() 281pci_find_subsys() Superseded by pci_get_subsys()
282pci_find_slot() Superseded by pci_get_slot()
282pcibios_find_class() Superseded by pci_get_class() 283pcibios_find_class() Superseded by pci_get_class()
283pci_find_class() Superseded by pci_get_class() 284pci_find_class() Superseded by pci_get_class()
284pci_(read|write)_*_nodev() Superseded by pci_bus_(read|write)_*() 285pci_(read|write)_*_nodev() Superseded by pci_bus_(read|write)_*()
diff --git a/Documentation/power/pci.txt b/Documentation/power/pci.txt
index c85428e7ad92..35b1a7dae342 100644
--- a/Documentation/power/pci.txt
+++ b/Documentation/power/pci.txt
@@ -165,40 +165,9 @@ Description:
165These functions are intended for use by individual drivers, and are defined in 165These functions are intended for use by individual drivers, and are defined in
166struct pci_driver: 166struct pci_driver:
167 167
168 int (*save_state) (struct pci_dev *dev, u32 state); 168 int (*suspend) (struct pci_dev *dev, pm_message_t state);
169 int (*suspend) (struct pci_dev *dev, u32 state);
170 int (*resume) (struct pci_dev *dev); 169 int (*resume) (struct pci_dev *dev);
171 int (*enable_wake) (struct pci_dev *dev, u32 state, int enable); 170 int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable);
172
173
174save_state
175----------
176
177Usage:
178
179if (dev->driver && dev->driver->save_state)
180 dev->driver->save_state(dev,state);
181
182The driver should use this callback to save device state. It should take into
183account the current state of the device and the requested state in order to
184avoid any unnecessary operations.
185
186For example, a video card that supports all 4 states (D0-D3), all controller
187context is preserved when entering D1, but the screen is placed into a low power
188state (blanked).
189
190The driver can also interpret this function as a notification that it may be
191entering a sleep state in the near future. If it knows that the device cannot
192enter the requested state, either because of lack of support for it, or because
193the device is middle of some critical operation, then it should fail.
194
195This function should not be used to set any state in the device or the driver
196because the device may not actually enter the sleep state (e.g. another driver
197later causes causes a global state transition to fail).
198
199Note that in intermediate low power states, a device's I/O and memory spaces may
200be disabled and may not be available in subsequent transitions to lower power
201states.
202 171
203 172
204suspend 173suspend
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 0c79b9d95f74..f7c96635d3b4 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -280,6 +280,10 @@ config ISA
280 (MCA) or VESA. ISA is an older system, now being displaced by PCI; 280 (MCA) or VESA. ISA is an older system, now being displaced by PCI;
281 newer boards don't support it. If you have ISA, say Y, otherwise N. 281 newer boards don't support it. If you have ISA, say Y, otherwise N.
282 282
283config ISA_DMA_API
284 bool
285 default y
286
283config PCI 287config PCI
284 bool 288 bool
285 depends on !ALPHA_JENSEN 289 depends on !ALPHA_JENSEN
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4055115ae0e2..8bfcb37460fa 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -266,6 +266,10 @@ config ISA_DMA
266 depends on FOOTBRIDGE_HOST || ARCH_SHARK 266 depends on FOOTBRIDGE_HOST || ARCH_SHARK
267 default y 267 default y
268 268
269config ISA_DMA_API
270 bool
271 default y
272
269config PCI 273config PCI
270 bool "PCI support" if ARCH_INTEGRATOR_AP 274 bool "PCI support" if ARCH_INTEGRATOR_AP
271 default y if ARCH_SHARK || FOOTBRIDGE_HOST || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_IXP2000 275 default y if ARCH_SHARK || FOOTBRIDGE_HOST || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_IXP2000
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index 94bcdb933e41..aa92e3708838 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -502,15 +502,6 @@ pci_set_dma_mask(struct pci_dev *dev, u64 mask)
502} 502}
503 503
504int 504int
505pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask)
506{
507 if (mask >= SZ_64M - 1 )
508 return 0;
509
510 return -EIO;
511}
512
513int
514pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) 505pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
515{ 506{
516 if (mask >= SZ_64M - 1 ) 507 if (mask >= SZ_64M - 1 )
@@ -520,7 +511,6 @@ pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
520} 511}
521 512
522EXPORT_SYMBOL(pci_set_dma_mask); 513EXPORT_SYMBOL(pci_set_dma_mask);
523EXPORT_SYMBOL(pci_dac_set_dma_mask);
524EXPORT_SYMBOL(pci_set_consistent_dma_mask); 514EXPORT_SYMBOL(pci_set_consistent_dma_mask);
525EXPORT_SYMBOL(ixp4xx_pci_read); 515EXPORT_SYMBOL(ixp4xx_pci_read);
526EXPORT_SYMBOL(ixp4xx_pci_write); 516EXPORT_SYMBOL(ixp4xx_pci_write);
diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig
index 3955de5af4c0..6caed90661fc 100644
--- a/arch/arm26/Kconfig
+++ b/arch/arm26/Kconfig
@@ -89,6 +89,10 @@ config PAGESIZE_16
89 machine with 4MB of memory. 89 machine with 4MB of memory.
90endmenu 90endmenu
91 91
92config ISA_DMA_API
93 bool
94 default y
95
92menu "General setup" 96menu "General setup"
93 97
94# Compressed boot loader in ROM. Yes, we really want to ask about 98# Compressed boot loader in ROM. Yes, we really want to ask about
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 99b4f294a52d..fee589119606 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -1173,6 +1173,10 @@ source "drivers/pci/pcie/Kconfig"
1173 1173
1174source "drivers/pci/Kconfig" 1174source "drivers/pci/Kconfig"
1175 1175
1176config ISA_DMA_API
1177 bool
1178 default y
1179
1176config ISA 1180config ISA
1177 bool "ISA support" 1181 bool "ISA support"
1178 depends on !(X86_VOYAGER || X86_VISWS) 1182 depends on !(X86_VOYAGER || X86_VISWS)
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index fc4615b6d3a9..e729bd280623 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -534,6 +534,11 @@ endchoice
534 534
535endmenu 535endmenu
536 536
537config ISA_DMA_API
538 bool
539 depends on !M5272
540 default y
541
537menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)" 542menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
538 543
539config PCI 544config PCI
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 5e666aad8815..ab9944693f1f 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1656,3 +1656,7 @@ config GENERIC_HARDIRQS
1656config GENERIC_IRQ_PROBE 1656config GENERIC_IRQ_PROBE
1657 bool 1657 bool
1658 default y 1658 default y
1659
1660config ISA_DMA_API
1661 bool
1662 default y
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 5b5cd00d98ca..e7e7c56fc212 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -45,6 +45,10 @@ config GENERIC_IRQ_PROBE
45config PM 45config PM
46 bool 46 bool
47 47
48config ISA_DMA_API
49 bool
50 default y
51
48source "init/Kconfig" 52source "init/Kconfig"
49 53
50 54
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index c3d941345e3d..ff04dcd30200 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -1079,6 +1079,10 @@ source kernel/power/Kconfig
1079 1079
1080endmenu 1080endmenu
1081 1081
1082config ISA_DMA_API
1083 bool
1084 default y
1085
1082menu "Bus options" 1086menu "Bus options"
1083 1087
1084config ISA 1088config ISA
diff --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig
index ef1f05e437c4..f5508abf1188 100644
--- a/arch/ppc64/Kconfig
+++ b/arch/ppc64/Kconfig
@@ -293,6 +293,9 @@ config SECCOMP
293 293
294endmenu 294endmenu
295 295
296config ISA_DMA_API
297 bool
298 default y
296 299
297menu "General setup" 300menu "General setup"
298 301
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 722ea1d63c94..3468d5127223 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -693,6 +693,10 @@ config RTC_9701JE
693 693
694endmenu 694endmenu
695 695
696config ISA_DMA_API
697 bool
698 depends on MPC1211
699 default y
696 700
697menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)" 701menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
698 702
diff --git a/arch/sparc/prom/memory.c b/arch/sparc/prom/memory.c
index 46aa51afec14..c20e5309f8aa 100644
--- a/arch/sparc/prom/memory.c
+++ b/arch/sparc/prom/memory.c
@@ -47,9 +47,9 @@ prom_sortmemlist(struct linux_mlist_v0 *thislist)
47 char *tmpaddr; 47 char *tmpaddr;
48 char *lowest; 48 char *lowest;
49 49
50 for(i=0; thislist[i].theres_more != 0; i++) { 50 for(i=0; thislist[i].theres_more; i++) {
51 lowest = thislist[i].start_adr; 51 lowest = thislist[i].start_adr;
52 for(mitr = i+1; thislist[mitr-1].theres_more != 0; mitr++) 52 for(mitr = i+1; thislist[mitr-1].theres_more; mitr++)
53 if(thislist[mitr].start_adr < lowest) { 53 if(thislist[mitr].start_adr < lowest) {
54 lowest = thislist[mitr].start_adr; 54 lowest = thislist[mitr].start_adr;
55 swapi = mitr; 55 swapi = mitr;
@@ -85,7 +85,7 @@ void __init prom_meminit(void)
85 prom_phys_total[iter].num_bytes = mptr->num_bytes; 85 prom_phys_total[iter].num_bytes = mptr->num_bytes;
86 prom_phys_total[iter].theres_more = &prom_phys_total[iter+1]; 86 prom_phys_total[iter].theres_more = &prom_phys_total[iter+1];
87 } 87 }
88 prom_phys_total[iter-1].theres_more = 0x0; 88 prom_phys_total[iter-1].theres_more = NULL;
89 /* Second, the total prom taken descriptors. */ 89 /* Second, the total prom taken descriptors. */
90 for(mptr = (*(romvec->pv_v0mem.v0_prommap)), iter=0; 90 for(mptr = (*(romvec->pv_v0mem.v0_prommap)), iter=0;
91 mptr; mptr=mptr->theres_more, iter++) { 91 mptr; mptr=mptr->theres_more, iter++) {
@@ -93,7 +93,7 @@ void __init prom_meminit(void)
93 prom_prom_taken[iter].num_bytes = mptr->num_bytes; 93 prom_prom_taken[iter].num_bytes = mptr->num_bytes;
94 prom_prom_taken[iter].theres_more = &prom_prom_taken[iter+1]; 94 prom_prom_taken[iter].theres_more = &prom_prom_taken[iter+1];
95 } 95 }
96 prom_prom_taken[iter-1].theres_more = 0x0; 96 prom_prom_taken[iter-1].theres_more = NULL;
97 /* Last, the available physical descriptors. */ 97 /* Last, the available physical descriptors. */
98 for(mptr = (*(romvec->pv_v0mem.v0_available)), iter=0; 98 for(mptr = (*(romvec->pv_v0mem.v0_available)), iter=0;
99 mptr; mptr=mptr->theres_more, iter++) { 99 mptr; mptr=mptr->theres_more, iter++) {
@@ -101,7 +101,7 @@ void __init prom_meminit(void)
101 prom_phys_avail[iter].num_bytes = mptr->num_bytes; 101 prom_phys_avail[iter].num_bytes = mptr->num_bytes;
102 prom_phys_avail[iter].theres_more = &prom_phys_avail[iter+1]; 102 prom_phys_avail[iter].theres_more = &prom_phys_avail[iter+1];
103 } 103 }
104 prom_phys_avail[iter-1].theres_more = 0x0; 104 prom_phys_avail[iter-1].theres_more = NULL;
105 /* Sort all the lists. */ 105 /* Sort all the lists. */
106 prom_sortmemlist(prom_phys_total); 106 prom_sortmemlist(prom_phys_total);
107 prom_sortmemlist(prom_prom_taken); 107 prom_sortmemlist(prom_prom_taken);
@@ -124,7 +124,7 @@ void __init prom_meminit(void)
124 prom_phys_avail[iter].theres_more = 124 prom_phys_avail[iter].theres_more =
125 &prom_phys_avail[iter+1]; 125 &prom_phys_avail[iter+1];
126 } 126 }
127 prom_phys_avail[iter-1].theres_more = 0x0; 127 prom_phys_avail[iter-1].theres_more = NULL;
128 128
129 num_regs = prom_getproperty(node, "reg", 129 num_regs = prom_getproperty(node, "reg",
130 (char *) prom_reg_memlist, 130 (char *) prom_reg_memlist,
@@ -138,7 +138,7 @@ void __init prom_meminit(void)
138 prom_phys_total[iter].theres_more = 138 prom_phys_total[iter].theres_more =
139 &prom_phys_total[iter+1]; 139 &prom_phys_total[iter+1];
140 } 140 }
141 prom_phys_total[iter-1].theres_more = 0x0; 141 prom_phys_total[iter-1].theres_more = NULL;
142 142
143 node = prom_getchild(prom_root_node); 143 node = prom_getchild(prom_root_node);
144 node = prom_searchsiblings(node, "virtual-memory"); 144 node = prom_searchsiblings(node, "virtual-memory");
@@ -158,7 +158,7 @@ void __init prom_meminit(void)
158 prom_prom_taken[iter].theres_more = 158 prom_prom_taken[iter].theres_more =
159 &prom_prom_taken[iter+1]; 159 &prom_prom_taken[iter+1];
160 } 160 }
161 prom_prom_taken[iter-1].theres_more = 0x0; 161 prom_prom_taken[iter-1].theres_more = NULL;
162 162
163 prom_sortmemlist(prom_prom_taken); 163 prom_sortmemlist(prom_prom_taken);
164 164
@@ -182,15 +182,15 @@ void __init prom_meminit(void)
182 case PROM_SUN4: 182 case PROM_SUN4:
183#ifdef CONFIG_SUN4 183#ifdef CONFIG_SUN4
184 /* how simple :) */ 184 /* how simple :) */
185 prom_phys_total[0].start_adr = 0x0; 185 prom_phys_total[0].start_adr = NULL;
186 prom_phys_total[0].num_bytes = *(sun4_romvec->memorysize); 186 prom_phys_total[0].num_bytes = *(sun4_romvec->memorysize);
187 prom_phys_total[0].theres_more = 0x0; 187 prom_phys_total[0].theres_more = NULL;
188 prom_prom_taken[0].start_adr = 0x0; 188 prom_prom_taken[0].start_adr = NULL;
189 prom_prom_taken[0].num_bytes = 0x0; 189 prom_prom_taken[0].num_bytes = 0x0;
190 prom_prom_taken[0].theres_more = 0x0; 190 prom_prom_taken[0].theres_more = NULL;
191 prom_phys_avail[0].start_adr = 0x0; 191 prom_phys_avail[0].start_adr = NULL;
192 prom_phys_avail[0].num_bytes = *(sun4_romvec->memoryavail); 192 prom_phys_avail[0].num_bytes = *(sun4_romvec->memoryavail);
193 prom_phys_avail[0].theres_more = 0x0; 193 prom_phys_avail[0].theres_more = NULL;
194#endif 194#endif
195 break; 195 break;
196 196
diff --git a/arch/sparc/prom/sun4prom.c b/arch/sparc/prom/sun4prom.c
index 69ca735f0d4e..00390a2652aa 100644
--- a/arch/sparc/prom/sun4prom.c
+++ b/arch/sparc/prom/sun4prom.c
@@ -151,7 +151,7 @@ struct linux_romvec * __init sun4_prom_init(void)
151 * have more time, we can teach the penguin to say "By your 151 * have more time, we can teach the penguin to say "By your
152 * command" or "Activating turbo boost, Michael". :-) 152 * command" or "Activating turbo boost, Michael". :-)
153 */ 153 */
154 sun4_romvec->setLEDs(0x0); 154 sun4_romvec->setLEDs(NULL);
155 155
156 printk("PROMLIB: Old Sun4 boot PROM monitor %s, romvec version %d\n", 156 printk("PROMLIB: Old Sun4 boot PROM monitor %s, romvec version %d\n",
157 sun4_romvec->monid, 157 sun4_romvec->monid,
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index a38cb5036df0..4dcb8af94090 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -756,7 +756,7 @@ void handler_irq(int irq, struct pt_regs *regs)
756 clear_softint(clr_mask); 756 clear_softint(clr_mask);
757 } 757 }
758#else 758#else
759 int should_forward = 1; 759 int should_forward = 0;
760 760
761 clear_softint(1 << irq); 761 clear_softint(1 << irq);
762#endif 762#endif
@@ -1007,10 +1007,10 @@ static int retarget_one_irq(struct irqaction *p, int goal_cpu)
1007 } 1007 }
1008 upa_writel(tid | IMAP_VALID, imap); 1008 upa_writel(tid | IMAP_VALID, imap);
1009 1009
1010 while (!cpu_online(goal_cpu)) { 1010 do {
1011 if (++goal_cpu >= NR_CPUS) 1011 if (++goal_cpu >= NR_CPUS)
1012 goal_cpu = 0; 1012 goal_cpu = 0;
1013 } 1013 } while (!cpu_online(goal_cpu));
1014 1014
1015 return goal_cpu; 1015 return goal_cpu;
1016} 1016}
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig
index 80c38c5d71fe..44ee7f6acf7b 100644
--- a/arch/x86_64/Kconfig
+++ b/arch/x86_64/Kconfig
@@ -379,6 +379,11 @@ config GENERIC_IRQ_PROBE
379 bool 379 bool
380 default y 380 default y
381 381
382# we have no ISA slots, but we do have ISA-style DMA.
383config ISA_DMA_API
384 bool
385 default y
386
382menu "Power management options" 387menu "Power management options"
383 388
384source kernel/power/Kconfig 389source kernel/power/Kconfig
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index e43e02328968..b594768b0241 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -105,7 +105,7 @@ config ATARI_SLM
105 105
106config BLK_DEV_XD 106config BLK_DEV_XD
107 tristate "XT hard disk support" 107 tristate "XT hard disk support"
108 depends on ISA 108 depends on ISA && ISA_DMA_API
109 help 109 help
110 Very old 8 bit hard disk controllers used in the IBM XT computer 110 Very old 8 bit hard disk controllers used in the IBM XT computer
111 will be supported if you say Y here. 111 will be supported if you say Y here.
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
index aa8b547ffafa..721ba8086043 100644
--- a/drivers/block/aoe/aoe.h
+++ b/drivers/block/aoe/aoe.h
@@ -1,5 +1,5 @@
1/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */ 1/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */
2#define VERSION "6" 2#define VERSION "10"
3#define AOE_MAJOR 152 3#define AOE_MAJOR 152
4#define DEVICE_NAME "aoe" 4#define DEVICE_NAME "aoe"
5 5
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 4780f7926d42..0e97fcb9f3a1 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -37,6 +37,13 @@ static ssize_t aoedisk_show_netif(struct gendisk * disk, char *page)
37 37
38 return snprintf(page, PAGE_SIZE, "%s\n", d->ifp->name); 38 return snprintf(page, PAGE_SIZE, "%s\n", d->ifp->name);
39} 39}
40/* firmware version */
41static ssize_t aoedisk_show_fwver(struct gendisk * disk, char *page)
42{
43 struct aoedev *d = disk->private_data;
44
45 return snprintf(page, PAGE_SIZE, "0x%04x\n", (unsigned int) d->fw_ver);
46}
40 47
41static struct disk_attribute disk_attr_state = { 48static struct disk_attribute disk_attr_state = {
42 .attr = {.name = "state", .mode = S_IRUGO }, 49 .attr = {.name = "state", .mode = S_IRUGO },
@@ -50,6 +57,10 @@ static struct disk_attribute disk_attr_netif = {
50 .attr = {.name = "netif", .mode = S_IRUGO }, 57 .attr = {.name = "netif", .mode = S_IRUGO },
51 .show = aoedisk_show_netif 58 .show = aoedisk_show_netif
52}; 59};
60static struct disk_attribute disk_attr_fwver = {
61 .attr = {.name = "firmware-version", .mode = S_IRUGO },
62 .show = aoedisk_show_fwver
63};
53 64
54static void 65static void
55aoedisk_add_sysfs(struct aoedev *d) 66aoedisk_add_sysfs(struct aoedev *d)
@@ -57,6 +68,7 @@ aoedisk_add_sysfs(struct aoedev *d)
57 sysfs_create_file(&d->gd->kobj, &disk_attr_state.attr); 68 sysfs_create_file(&d->gd->kobj, &disk_attr_state.attr);
58 sysfs_create_file(&d->gd->kobj, &disk_attr_mac.attr); 69 sysfs_create_file(&d->gd->kobj, &disk_attr_mac.attr);
59 sysfs_create_file(&d->gd->kobj, &disk_attr_netif.attr); 70 sysfs_create_file(&d->gd->kobj, &disk_attr_netif.attr);
71 sysfs_create_file(&d->gd->kobj, &disk_attr_fwver.attr);
60} 72}
61void 73void
62aoedisk_rm_sysfs(struct aoedev *d) 74aoedisk_rm_sysfs(struct aoedev *d)
@@ -64,6 +76,7 @@ aoedisk_rm_sysfs(struct aoedev *d)
64 sysfs_remove_link(&d->gd->kobj, "state"); 76 sysfs_remove_link(&d->gd->kobj, "state");
65 sysfs_remove_link(&d->gd->kobj, "mac"); 77 sysfs_remove_link(&d->gd->kobj, "mac");
66 sysfs_remove_link(&d->gd->kobj, "netif"); 78 sysfs_remove_link(&d->gd->kobj, "netif");
79 sysfs_remove_link(&d->gd->kobj, "firmware-version");
67} 80}
68 81
69static int 82static int
diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index ec16c64dd114..6e231c5a1199 100644
--- a/drivers/block/aoe/aoedev.c
+++ b/drivers/block/aoe/aoedev.c
@@ -109,25 +109,22 @@ aoedev_set(ulong sysminor, unsigned char *addr, struct net_device *ifp, ulong bu
109 spin_lock_irqsave(&devlist_lock, flags); 109 spin_lock_irqsave(&devlist_lock, flags);
110 110
111 for (d=devlist; d; d=d->next) 111 for (d=devlist; d; d=d->next)
112 if (d->sysminor == sysminor 112 if (d->sysminor == sysminor)
113 || memcmp(d->addr, addr, sizeof d->addr) == 0)
114 break; 113 break;
115 114
116 if (d == NULL && (d = aoedev_newdev(bufcnt)) == NULL) { 115 if (d == NULL && (d = aoedev_newdev(bufcnt)) == NULL) {
117 spin_unlock_irqrestore(&devlist_lock, flags); 116 spin_unlock_irqrestore(&devlist_lock, flags);
118 printk(KERN_INFO "aoe: aoedev_set: aoedev_newdev failure.\n"); 117 printk(KERN_INFO "aoe: aoedev_set: aoedev_newdev failure.\n");
119 return NULL; 118 return NULL;
120 } 119 } /* if newdev, (d->flags & DEVFL_UP) == 0 for below */
121 120
122 spin_unlock_irqrestore(&devlist_lock, flags); 121 spin_unlock_irqrestore(&devlist_lock, flags);
123 spin_lock_irqsave(&d->lock, flags); 122 spin_lock_irqsave(&d->lock, flags);
124 123
125 d->ifp = ifp; 124 d->ifp = ifp;
126 125 memcpy(d->addr, addr, sizeof d->addr);
127 if (d->sysminor != sysminor 126 if ((d->flags & DEVFL_UP) == 0) {
128 || (d->flags & DEVFL_UP) == 0) {
129 aoedev_downdev(d); /* flushes outstanding frames */ 127 aoedev_downdev(d); /* flushes outstanding frames */
130 memcpy(d->addr, addr, sizeof d->addr);
131 d->sysminor = sysminor; 128 d->sysminor = sysminor;
132 d->aoemajor = AOEMAJOR(sysminor); 129 d->aoemajor = AOEMAJOR(sysminor);
133 d->aoeminor = AOEMINOR(sysminor); 130 d->aoeminor = AOEMINOR(sysminor);
diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c
index bc92aacb6dad..9e6f51c528b0 100644
--- a/drivers/block/aoe/aoenet.c
+++ b/drivers/block/aoe/aoenet.c
@@ -7,6 +7,7 @@
7#include <linux/hdreg.h> 7#include <linux/hdreg.h>
8#include <linux/blkdev.h> 8#include <linux/blkdev.h>
9#include <linux/netdevice.h> 9#include <linux/netdevice.h>
10#include <linux/moduleparam.h>
10#include "aoe.h" 11#include "aoe.h"
11 12
12#define NECODES 5 13#define NECODES 5
@@ -26,6 +27,19 @@ enum {
26}; 27};
27 28
28static char aoe_iflist[IFLISTSZ]; 29static char aoe_iflist[IFLISTSZ];
30module_param_string(aoe_iflist, aoe_iflist, IFLISTSZ, 0600);
31MODULE_PARM_DESC(aoe_iflist, "aoe_iflist=\"dev1 [dev2 ...]\"\n");
32
33#ifndef MODULE
34static int __init aoe_iflist_setup(char *str)
35{
36 strncpy(aoe_iflist, str, IFLISTSZ);
37 aoe_iflist[IFLISTSZ - 1] = '\0';
38 return 1;
39}
40
41__setup("aoe_iflist=", aoe_iflist_setup);
42#endif
29 43
30int 44int
31is_aoe_netif(struct net_device *ifp) 45is_aoe_netif(struct net_device *ifp)
@@ -36,7 +50,8 @@ is_aoe_netif(struct net_device *ifp)
36 if (aoe_iflist[0] == '\0') 50 if (aoe_iflist[0] == '\0')
37 return 1; 51 return 1;
38 52
39 for (p = aoe_iflist; *p; p = q + strspn(q, WHITESPACE)) { 53 p = aoe_iflist + strspn(aoe_iflist, WHITESPACE);
54 for (; *p; p = q + strspn(q, WHITESPACE)) {
40 q = p + strcspn(p, WHITESPACE); 55 q = p + strcspn(p, WHITESPACE);
41 if (q != p) 56 if (q != p)
42 len = q - p; 57 len = q - p;
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index e162dab64ffd..2d5a19f6378d 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -153,7 +153,7 @@ config DIGIEPCA
153 153
154config ESPSERIAL 154config ESPSERIAL
155 tristate "Hayes ESP serial port support" 155 tristate "Hayes ESP serial port support"
156 depends on SERIAL_NONSTANDARD && ISA && BROKEN_ON_SMP 156 depends on SERIAL_NONSTANDARD && ISA && BROKEN_ON_SMP && ISA_DMA_API
157 help 157 help
158 This is a driver which supports Hayes ESP serial ports. Both single 158 This is a driver which supports Hayes ESP serial ports. Both single
159 port cards and multiport cards are supported. Make sure to read 159 port cards and multiport cards are supported. Make sure to read
@@ -195,7 +195,7 @@ config ISI
195 195
196config SYNCLINK 196config SYNCLINK
197 tristate "Microgate SyncLink card support" 197 tristate "Microgate SyncLink card support"
198 depends on SERIAL_NONSTANDARD && PCI 198 depends on SERIAL_NONSTANDARD && PCI && ISA_DMA_API
199 help 199 help
200 Provides support for the SyncLink ISA and PCI multiprotocol serial 200 Provides support for the SyncLink ISA and PCI multiprotocol serial
201 adapters. These adapters support asynchronous and HDLC bit 201 adapters. These adapters support asynchronous and HDLC bit
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 5419440087fd..298574e16061 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1617,15 +1617,15 @@ typedef struct dmi_header
1617 u16 handle; 1617 u16 handle;
1618} dmi_header_t; 1618} dmi_header_t;
1619 1619
1620static int decode_dmi(dmi_header_t *dm, int intf_num) 1620static int decode_dmi(dmi_header_t __iomem *dm, int intf_num)
1621{ 1621{
1622 u8 *data = (u8 *)dm; 1622 u8 __iomem *data = (u8 __iomem *)dm;
1623 unsigned long base_addr; 1623 unsigned long base_addr;
1624 u8 reg_spacing; 1624 u8 reg_spacing;
1625 u8 len = dm->length; 1625 u8 len = readb(&dm->length);
1626 dmi_ipmi_data_t *ipmi_data = dmi_data+intf_num; 1626 dmi_ipmi_data_t *ipmi_data = dmi_data+intf_num;
1627 1627
1628 ipmi_data->type = data[4]; 1628 ipmi_data->type = readb(&data[4]);
1629 1629
1630 memcpy(&base_addr, data+8, sizeof(unsigned long)); 1630 memcpy(&base_addr, data+8, sizeof(unsigned long));
1631 if (len >= 0x11) { 1631 if (len >= 0x11) {
@@ -1640,12 +1640,12 @@ static int decode_dmi(dmi_header_t *dm, int intf_num)
1640 } 1640 }
1641 /* If bit 4 of byte 0x10 is set, then the lsb for the address 1641 /* If bit 4 of byte 0x10 is set, then the lsb for the address
1642 is odd. */ 1642 is odd. */
1643 ipmi_data->base_addr = base_addr | ((data[0x10] & 0x10) >> 4); 1643 ipmi_data->base_addr = base_addr | ((readb(&data[0x10]) & 0x10) >> 4);
1644 1644
1645 ipmi_data->irq = data[0x11]; 1645 ipmi_data->irq = readb(&data[0x11]);
1646 1646
1647 /* The top two bits of byte 0x10 hold the register spacing. */ 1647 /* The top two bits of byte 0x10 hold the register spacing. */
1648 reg_spacing = (data[0x10] & 0xC0) >> 6; 1648 reg_spacing = (readb(&data[0x10]) & 0xC0) >> 6;
1649 switch(reg_spacing){ 1649 switch(reg_spacing){
1650 case 0x00: /* Byte boundaries */ 1650 case 0x00: /* Byte boundaries */
1651 ipmi_data->offset = 1; 1651 ipmi_data->offset = 1;
@@ -1673,7 +1673,7 @@ static int decode_dmi(dmi_header_t *dm, int intf_num)
1673 ipmi_data->offset = 1; 1673 ipmi_data->offset = 1;
1674 } 1674 }
1675 1675
1676 ipmi_data->slave_addr = data[6]; 1676 ipmi_data->slave_addr = readb(&data[6]);
1677 1677
1678 if (is_new_interface(-1, ipmi_data->addr_space,ipmi_data->base_addr)) { 1678 if (is_new_interface(-1, ipmi_data->addr_space,ipmi_data->base_addr)) {
1679 dmi_data_entries++; 1679 dmi_data_entries++;
@@ -1687,9 +1687,9 @@ static int decode_dmi(dmi_header_t *dm, int intf_num)
1687 1687
1688static int dmi_table(u32 base, int len, int num) 1688static int dmi_table(u32 base, int len, int num)
1689{ 1689{
1690 u8 *buf; 1690 u8 __iomem *buf;
1691 struct dmi_header *dm; 1691 struct dmi_header __iomem *dm;
1692 u8 *data; 1692 u8 __iomem *data;
1693 int i=1; 1693 int i=1;
1694 int status=-1; 1694 int status=-1;
1695 int intf_num = 0; 1695 int intf_num = 0;
@@ -1702,12 +1702,12 @@ static int dmi_table(u32 base, int len, int num)
1702 1702
1703 while(i<num && (data - buf) < len) 1703 while(i<num && (data - buf) < len)
1704 { 1704 {
1705 dm=(dmi_header_t *)data; 1705 dm=(dmi_header_t __iomem *)data;
1706 1706
1707 if((data-buf+dm->length) >= len) 1707 if((data-buf+readb(&dm->length)) >= len)
1708 break; 1708 break;
1709 1709
1710 if (dm->type == 38) { 1710 if (readb(&dm->type) == 38) {
1711 if (decode_dmi(dm, intf_num) == 0) { 1711 if (decode_dmi(dm, intf_num) == 0) {
1712 intf_num++; 1712 intf_num++;
1713 if (intf_num >= SI_MAX_DRIVERS) 1713 if (intf_num >= SI_MAX_DRIVERS)
@@ -1715,8 +1715,8 @@ static int dmi_table(u32 base, int len, int num)
1715 } 1715 }
1716 } 1716 }
1717 1717
1718 data+=dm->length; 1718 data+=readb(&dm->length);
1719 while((data-buf) < len && (*data || data[1])) 1719 while((data-buf) < len && (readb(data)||readb(data+1)))
1720 data++; 1720 data++;
1721 data+=2; 1721 data+=2;
1722 i++; 1722 i++;
diff --git a/drivers/char/ipmi/ipmi_si_sm.h b/drivers/char/ipmi/ipmi_si_sm.h
index a0212b004016..62791dd42985 100644
--- a/drivers/char/ipmi/ipmi_si_sm.h
+++ b/drivers/char/ipmi/ipmi_si_sm.h
@@ -51,7 +51,7 @@ struct si_sm_io
51 /* Generic info used by the actual handling routines, the 51 /* Generic info used by the actual handling routines, the
52 state machine shouldn't touch these. */ 52 state machine shouldn't touch these. */
53 void *info; 53 void *info;
54 void *addr; 54 void __iomem *addr;
55 int regspacing; 55 int regspacing;
56 int regsize; 56 int regsize;
57 int regshift; 57 int regshift;
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
index ec7100556c50..ac9cfa9701ea 100644
--- a/drivers/char/mbcs.c
+++ b/drivers/char/mbcs.c
@@ -394,7 +394,7 @@ int mbcs_open(struct inode *ip, struct file *fp)
394 return -ENODEV; 394 return -ENODEV;
395} 395}
396 396
397ssize_t mbcs_sram_read(struct file * fp, char *buf, size_t len, loff_t * off) 397ssize_t mbcs_sram_read(struct file * fp, char __user *buf, size_t len, loff_t * off)
398{ 398{
399 struct cx_dev *cx_dev = fp->private_data; 399 struct cx_dev *cx_dev = fp->private_data;
400 struct mbcs_soft *soft = cx_dev->soft; 400 struct mbcs_soft *soft = cx_dev->soft;
@@ -419,7 +419,7 @@ ssize_t mbcs_sram_read(struct file * fp, char *buf, size_t len, loff_t * off)
419} 419}
420 420
421ssize_t 421ssize_t
422mbcs_sram_write(struct file * fp, const char *buf, size_t len, loff_t * off) 422mbcs_sram_write(struct file * fp, const char __user *buf, size_t len, loff_t * off)
423{ 423{
424 struct cx_dev *cx_dev = fp->private_data; 424 struct cx_dev *cx_dev = fp->private_data;
425 struct mbcs_soft *soft = cx_dev->soft; 425 struct mbcs_soft *soft = cx_dev->soft;
diff --git a/drivers/char/mbcs.h b/drivers/char/mbcs.h
index 844644d201c5..e7fd47e43257 100644
--- a/drivers/char/mbcs.h
+++ b/drivers/char/mbcs.h
@@ -543,9 +543,9 @@ struct mbcs_soft {
543}; 543};
544 544
545extern int mbcs_open(struct inode *ip, struct file *fp); 545extern int mbcs_open(struct inode *ip, struct file *fp);
546extern ssize_t mbcs_sram_read(struct file *fp, char *buf, size_t len, 546extern ssize_t mbcs_sram_read(struct file *fp, char __user *buf, size_t len,
547 loff_t * off); 547 loff_t * off);
548extern ssize_t mbcs_sram_write(struct file *fp, const char *buf, size_t len, 548extern ssize_t mbcs_sram_write(struct file *fp, const char __user *buf, size_t len,
549 loff_t * off); 549 loff_t * off);
550extern loff_t mbcs_sram_llseek(struct file *filp, loff_t off, int whence); 550extern loff_t mbcs_sram_llseek(struct file *filp, loff_t off, int whence);
551extern int mbcs_gscr_mmap(struct file *fp, struct vm_area_struct *vma); 551extern int mbcs_gscr_mmap(struct file *fp, struct vm_area_struct *vma);
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index c812191417c3..fd042060809a 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -1021,11 +1021,11 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
1021 ret = -EIO; 1021 ret = -EIO;
1022 break; 1022 break;
1023 } 1023 }
1024 if (copy_to_user((u8 *)arg, &val8, sizeof(val8))) 1024 if (copy_to_user(argp, &val8, sizeof(val8)))
1025 ret = -EFAULT; 1025 ret = -EFAULT;
1026 break; 1026 break;
1027 case SONYPI_IOCSFAN: 1027 case SONYPI_IOCSFAN:
1028 if (copy_from_user(&val8, (u8 *)arg, sizeof(val8))) { 1028 if (copy_from_user(&val8, argp, sizeof(val8))) {
1029 ret = -EFAULT; 1029 ret = -EFAULT;
1030 break; 1030 break;
1031 } 1031 }
@@ -1038,7 +1038,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
1038 ret = -EIO; 1038 ret = -EIO;
1039 break; 1039 break;
1040 } 1040 }
1041 if (copy_to_user((u8 *)arg, &val8, sizeof(val8))) 1041 if (copy_to_user(argp, &val8, sizeof(val8)))
1042 ret = -EFAULT; 1042 ret = -EFAULT;
1043 break; 1043 break;
1044 default: 1044 default:
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 72f2b466b816..2e70d74fbdee 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -51,7 +51,7 @@ config MMC_PXA
51 51
52config MMC_WBSD 52config MMC_WBSD
53 tristate "Winbond W83L51xD SD/MMC Card Interface support" 53 tristate "Winbond W83L51xD SD/MMC Card Interface support"
54 depends on MMC && ISA 54 depends on MMC && ISA && ISA_DMA_API
55 help 55 help
56 This selects the Winbond(R) W83L51xD Secure digital and 56 This selects the Winbond(R) W83L51xD Secure digital and
57 Multimedia card Interface. 57 Multimedia card Interface.
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 68242bda4b9c..3a0a55b62aaf 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -589,7 +589,7 @@ config EL2
589 589
590config ELPLUS 590config ELPLUS
591 tristate "3c505 \"EtherLink Plus\" support" 591 tristate "3c505 \"EtherLink Plus\" support"
592 depends on NET_VENDOR_3COM && ISA 592 depends on NET_VENDOR_3COM && ISA && ISA_DMA_API
593 ---help--- 593 ---help---
594 Information about this network (Ethernet) card can be found in 594 Information about this network (Ethernet) card can be found in
595 <file:Documentation/networking/3c505.txt>. If you have a card of 595 <file:Documentation/networking/3c505.txt>. If you have a card of
@@ -630,7 +630,7 @@ config EL3
630 630
631config 3C515 631config 3C515
632 tristate "3c515 ISA \"Fast EtherLink\"" 632 tristate "3c515 ISA \"Fast EtherLink\""
633 depends on NET_VENDOR_3COM && (ISA || EISA) 633 depends on NET_VENDOR_3COM && (ISA || EISA) && ISA_DMA_API
634 help 634 help
635 If you have a 3Com ISA EtherLink XL "Corkscrew" 3c515 Fast Ethernet 635 If you have a 3Com ISA EtherLink XL "Corkscrew" 3c515 Fast Ethernet
636 network card, say Y and read the Ethernet-HOWTO, available from 636 network card, say Y and read the Ethernet-HOWTO, available from
@@ -708,7 +708,7 @@ config TYPHOON
708 708
709config LANCE 709config LANCE
710 tristate "AMD LANCE and PCnet (AT1500 and NE2100) support" 710 tristate "AMD LANCE and PCnet (AT1500 and NE2100) support"
711 depends on NET_ETHERNET && ISA 711 depends on NET_ETHERNET && ISA && ISA_DMA_API
712 help 712 help
713 If you have a network (Ethernet) card of this type, say Y and read 713 If you have a network (Ethernet) card of this type, say Y and read
714 the Ethernet-HOWTO, available from 714 the Ethernet-HOWTO, available from
@@ -864,7 +864,7 @@ config NI52
864 864
865config NI65 865config NI65
866 tristate "NI6510 support" 866 tristate "NI6510 support"
867 depends on NET_VENDOR_RACAL && ISA 867 depends on NET_VENDOR_RACAL && ISA && ISA_DMA_API
868 help 868 help
869 If you have a network (Ethernet) card of this type, say Y and read 869 If you have a network (Ethernet) card of this type, say Y and read
870 the Ethernet-HOWTO, available from 870 the Ethernet-HOWTO, available from
@@ -1072,7 +1072,7 @@ config NE2000
1072 1072
1073config ZNET 1073config ZNET
1074 tristate "Zenith Z-Note support (EXPERIMENTAL)" 1074 tristate "Zenith Z-Note support (EXPERIMENTAL)"
1075 depends on NET_ISA && EXPERIMENTAL 1075 depends on NET_ISA && EXPERIMENTAL && ISA_DMA_API
1076 help 1076 help
1077 The Zenith Z-Note notebook computer has a built-in network 1077 The Zenith Z-Note notebook computer has a built-in network
1078 (Ethernet) card, and this is the Linux driver for it. Note that the 1078 (Ethernet) card, and this is the Linux driver for it. Note that the
diff --git a/drivers/net/appletalk/Kconfig b/drivers/net/appletalk/Kconfig
index 60b19679ca5c..69c488d933a2 100644
--- a/drivers/net/appletalk/Kconfig
+++ b/drivers/net/appletalk/Kconfig
@@ -13,7 +13,7 @@ config DEV_APPLETALK
13 13
14config LTPC 14config LTPC
15 tristate "Apple/Farallon LocalTalk PC support" 15 tristate "Apple/Farallon LocalTalk PC support"
16 depends on DEV_APPLETALK && (ISA || EISA) 16 depends on DEV_APPLETALK && (ISA || EISA) && ISA_DMA_API
17 help 17 help
18 This allows you to use the AppleTalk PC card to connect to LocalTalk 18 This allows you to use the AppleTalk PC card to connect to LocalTalk
19 networks. The card is also known as the Farallon PhoneNet PC card. 19 networks. The card is also known as the Farallon PhoneNet PC card.
diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig
index 34068f81d45e..7cdebe1a0b61 100644
--- a/drivers/net/hamradio/Kconfig
+++ b/drivers/net/hamradio/Kconfig
@@ -45,7 +45,7 @@ config BPQETHER
45 45
46config DMASCC 46config DMASCC
47 tristate "High-speed (DMA) SCC driver for AX.25" 47 tristate "High-speed (DMA) SCC driver for AX.25"
48 depends on ISA && AX25 && BROKEN_ON_SMP 48 depends on ISA && AX25 && BROKEN_ON_SMP && ISA_DMA_API
49 ---help--- 49 ---help---
50 This is a driver for high-speed SCC boards, i.e. those supporting 50 This is a driver for high-speed SCC boards, i.e. those supporting
51 DMA on one port. You usually use those boards to connect your 51 DMA on one port. You usually use those boards to connect your
@@ -78,7 +78,7 @@ config DMASCC
78 78
79config SCC 79config SCC
80 tristate "Z8530 SCC driver" 80 tristate "Z8530 SCC driver"
81 depends on ISA && AX25 81 depends on ISA && AX25 && ISA_DMA_API
82 ---help--- 82 ---help---
83 These cards are used to connect your Linux box to an amateur radio 83 These cards are used to connect your Linux box to an amateur radio
84 in order to communicate with other computers. If you want to use 84 in order to communicate with other computers. If you want to use
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
index 6bf76a444d48..1c553d7efdd9 100644
--- a/drivers/net/irda/Kconfig
+++ b/drivers/net/irda/Kconfig
@@ -310,7 +310,7 @@ config SIGMATEL_FIR
310 310
311config NSC_FIR 311config NSC_FIR
312 tristate "NSC PC87108/PC87338" 312 tristate "NSC PC87108/PC87338"
313 depends on IRDA 313 depends on IRDA && ISA_DMA_API
314 help 314 help
315 Say Y here if you want to build support for the NSC PC87108 and 315 Say Y here if you want to build support for the NSC PC87108 and
316 PC87338 IrDA chipsets. This driver supports SIR, 316 PC87338 IrDA chipsets. This driver supports SIR,
@@ -321,7 +321,7 @@ config NSC_FIR
321 321
322config WINBOND_FIR 322config WINBOND_FIR
323 tristate "Winbond W83977AF (IR)" 323 tristate "Winbond W83977AF (IR)"
324 depends on IRDA 324 depends on IRDA && ISA_DMA_API
325 help 325 help
326 Say Y here if you want to build IrDA support for the Winbond 326 Say Y here if you want to build IrDA support for the Winbond
327 W83977AF super-io chipset. This driver should be used for the IrDA 327 W83977AF super-io chipset. This driver should be used for the IrDA
@@ -347,7 +347,7 @@ config AU1000_FIR
347 347
348config SMC_IRCC_FIR 348config SMC_IRCC_FIR
349 tristate "SMSC IrCC (EXPERIMENTAL)" 349 tristate "SMSC IrCC (EXPERIMENTAL)"
350 depends on EXPERIMENTAL && IRDA 350 depends on EXPERIMENTAL && IRDA && ISA_DMA_API
351 help 351 help
352 Say Y here if you want to build support for the SMC Infrared 352 Say Y here if you want to build support for the SMC Infrared
353 Communications Controller. It is used in a wide variety of 353 Communications Controller. It is used in a wide variety of
@@ -357,7 +357,7 @@ config SMC_IRCC_FIR
357 357
358config ALI_FIR 358config ALI_FIR
359 tristate "ALi M5123 FIR (EXPERIMENTAL)" 359 tristate "ALi M5123 FIR (EXPERIMENTAL)"
360 depends on EXPERIMENTAL && IRDA 360 depends on EXPERIMENTAL && IRDA && ISA_DMA_API
361 help 361 help
362 Say Y here if you want to build support for the ALi M5123 FIR 362 Say Y here if you want to build support for the ALi M5123 FIR
363 Controller. The ALi M5123 FIR Controller is embedded in ALi M1543C, 363 Controller. The ALi M5123 FIR Controller is embedded in ALi M1543C,
@@ -385,7 +385,7 @@ config SA1100_FIR
385 385
386config VIA_FIR 386config VIA_FIR
387 tristate "VIA VT8231/VT1211 SIR/MIR/FIR" 387 tristate "VIA VT8231/VT1211 SIR/MIR/FIR"
388 depends on IRDA 388 depends on IRDA && ISA_DMA_API
389 help 389 help
390 Say Y here if you want to build support for the VIA VT8231 390 Say Y here if you want to build support for the VIA VT8231
391 and VIA VT1211 IrDA controllers, found on the motherboards using 391 and VIA VT1211 IrDA controllers, found on the motherboards using
diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig
index 35791934a602..66b94668ddd8 100644
--- a/drivers/net/wan/Kconfig
+++ b/drivers/net/wan/Kconfig
@@ -26,7 +26,7 @@ config WAN
26# There is no way to detect a comtrol sv11 - force it modular for now. 26# There is no way to detect a comtrol sv11 - force it modular for now.
27config HOSTESS_SV11 27config HOSTESS_SV11
28 tristate "Comtrol Hostess SV-11 support" 28 tristate "Comtrol Hostess SV-11 support"
29 depends on WAN && ISA && m 29 depends on WAN && ISA && m && ISA_DMA_API
30 help 30 help
31 Driver for Comtrol Hostess SV-11 network card which 31 Driver for Comtrol Hostess SV-11 network card which
32 operates on low speed synchronous serial links at up to 32 operates on low speed synchronous serial links at up to
@@ -38,7 +38,7 @@ config HOSTESS_SV11
38# The COSA/SRP driver has not been tested as non-modular yet. 38# The COSA/SRP driver has not been tested as non-modular yet.
39config COSA 39config COSA
40 tristate "COSA/SRP sync serial boards support" 40 tristate "COSA/SRP sync serial boards support"
41 depends on WAN && ISA && m 41 depends on WAN && ISA && m && ISA_DMA_API
42 ---help--- 42 ---help---
43 Driver for COSA and SRP synchronous serial boards. 43 Driver for COSA and SRP synchronous serial boards.
44 44
@@ -127,7 +127,7 @@ config LANMEDIA
127# There is no way to detect a Sealevel board. Force it modular 127# There is no way to detect a Sealevel board. Force it modular
128config SEALEVEL_4021 128config SEALEVEL_4021
129 tristate "Sealevel Systems 4021 support" 129 tristate "Sealevel Systems 4021 support"
130 depends on WAN && ISA && m 130 depends on WAN && ISA && m && ISA_DMA_API
131 help 131 help
132 This is a driver for the Sealevel Systems ACB 56 serial I/O adapter. 132 This is a driver for the Sealevel Systems ACB 56 serial I/O adapter.
133 133
diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig
index 731010e0e6f6..16a2e6ae37f4 100644
--- a/drivers/parport/Kconfig
+++ b/drivers/parport/Kconfig
@@ -34,7 +34,7 @@ config PARPORT
34 34
35config PARPORT_PC 35config PARPORT_PC
36 tristate "PC-style hardware" 36 tristate "PC-style hardware"
37 depends on PARPORT && (!SPARC64 || PCI) && (!SPARC32 || BROKEN) 37 depends on PARPORT && (!SPARC64 || PCI) && !SPARC32
38 ---help--- 38 ---help---
39 You should say Y here if you have a PC-style parallel port. All 39 You should say Y here if you have a PC-style parallel port. All
40 IBM PC compatible computers and some Alphas have PC-style 40 IBM PC compatible computers and some Alphas have PC-style
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index c5774e7855d0..e7f3bcb79000 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -67,6 +67,10 @@
67 67
68#define PARPORT_PC_MAX_PORTS PARPORT_MAX 68#define PARPORT_PC_MAX_PORTS PARPORT_MAX
69 69
70#ifdef CONFIG_ISA_DMA_API
71#define HAS_DMA
72#endif
73
70/* ECR modes */ 74/* ECR modes */
71#define ECR_SPP 00 75#define ECR_SPP 00
72#define ECR_PS2 01 76#define ECR_PS2 01
@@ -610,6 +614,7 @@ dump_parport_state ("leave fifo_write_block_pio", port);
610 return length - left; 614 return length - left;
611} 615}
612 616
617#ifdef HAS_DMA
613static size_t parport_pc_fifo_write_block_dma (struct parport *port, 618static size_t parport_pc_fifo_write_block_dma (struct parport *port,
614 const void *buf, size_t length) 619 const void *buf, size_t length)
615{ 620{
@@ -732,6 +737,17 @@ dump_parport_state ("enter fifo_write_block_dma", port);
732dump_parport_state ("leave fifo_write_block_dma", port); 737dump_parport_state ("leave fifo_write_block_dma", port);
733 return length - left; 738 return length - left;
734} 739}
740#endif
741
742static inline size_t parport_pc_fifo_write_block(struct parport *port,
743 const void *buf, size_t length)
744{
745#ifdef HAS_DMA
746 if (port->dma != PARPORT_DMA_NONE)
747 return parport_pc_fifo_write_block_dma (port, buf, length);
748#endif
749 return parport_pc_fifo_write_block_pio (port, buf, length);
750}
735 751
736/* Parallel Port FIFO mode (ECP chipsets) */ 752/* Parallel Port FIFO mode (ECP chipsets) */
737static size_t parport_pc_compat_write_block_pio (struct parport *port, 753static size_t parport_pc_compat_write_block_pio (struct parport *port,
@@ -758,10 +774,7 @@ static size_t parport_pc_compat_write_block_pio (struct parport *port,
758 port->physport->ieee1284.phase = IEEE1284_PH_FWD_DATA; 774 port->physport->ieee1284.phase = IEEE1284_PH_FWD_DATA;
759 775
760 /* Write the data to the FIFO. */ 776 /* Write the data to the FIFO. */
761 if (port->dma != PARPORT_DMA_NONE) 777 written = parport_pc_fifo_write_block(port, buf, length);
762 written = parport_pc_fifo_write_block_dma (port, buf, length);
763 else
764 written = parport_pc_fifo_write_block_pio (port, buf, length);
765 778
766 /* Finish up. */ 779 /* Finish up. */
767 /* For some hardware we don't want to touch the mode until 780 /* For some hardware we don't want to touch the mode until
@@ -856,10 +869,7 @@ static size_t parport_pc_ecp_write_block_pio (struct parport *port,
856 port->physport->ieee1284.phase = IEEE1284_PH_FWD_DATA; 869 port->physport->ieee1284.phase = IEEE1284_PH_FWD_DATA;
857 870
858 /* Write the data to the FIFO. */ 871 /* Write the data to the FIFO. */
859 if (port->dma != PARPORT_DMA_NONE) 872 written = parport_pc_fifo_write_block(port, buf, length);
860 written = parport_pc_fifo_write_block_dma (port, buf, length);
861 else
862 written = parport_pc_fifo_write_block_pio (port, buf, length);
863 873
864 /* Finish up. */ 874 /* Finish up. */
865 /* For some hardware we don't want to touch the mode until 875 /* For some hardware we don't want to touch the mode until
@@ -2285,6 +2295,7 @@ struct parport *parport_pc_probe_port (unsigned long int base,
2285 } 2295 }
2286 2296
2287#ifdef CONFIG_PARPORT_PC_FIFO 2297#ifdef CONFIG_PARPORT_PC_FIFO
2298#ifdef HAS_DMA
2288 if (p->dma != PARPORT_DMA_NONE) { 2299 if (p->dma != PARPORT_DMA_NONE) {
2289 if (request_dma (p->dma, p->name)) { 2300 if (request_dma (p->dma, p->name)) {
2290 printk (KERN_WARNING "%s: dma %d in use, " 2301 printk (KERN_WARNING "%s: dma %d in use, "
@@ -2306,7 +2317,8 @@ struct parport *parport_pc_probe_port (unsigned long int base,
2306 } 2317 }
2307 } 2318 }
2308 } 2319 }
2309#endif /* CONFIG_PARPORT_PC_FIFO */ 2320#endif
2321#endif
2310 } 2322 }
2311 2323
2312 /* Done probing. Now put the port into a sensible start-up state. */ 2324 /* Done probing. Now put the port into a sensible start-up state. */
@@ -2367,11 +2379,13 @@ void parport_pc_unregister_port (struct parport *p)
2367 if (p->modes & PARPORT_MODE_ECP) 2379 if (p->modes & PARPORT_MODE_ECP)
2368 release_region(p->base_hi, 3); 2380 release_region(p->base_hi, 3);
2369#ifdef CONFIG_PARPORT_PC_FIFO 2381#ifdef CONFIG_PARPORT_PC_FIFO
2382#ifdef HAS_DMA
2370 if (priv->dma_buf) 2383 if (priv->dma_buf)
2371 pci_free_consistent(priv->dev, PAGE_SIZE, 2384 pci_free_consistent(priv->dev, PAGE_SIZE,
2372 priv->dma_buf, 2385 priv->dma_buf,
2373 priv->dma_handle); 2386 priv->dma_handle);
2374#endif /* CONFIG_PARPORT_PC_FIFO */ 2387#endif
2388#endif
2375 kfree (p->private_data); 2389 kfree (p->private_data);
2376 parport_put_port(p); 2390 parport_put_port(p);
2377 kfree (ops); /* hope no-one cached it */ 2391 kfree (ops); /* hope no-one cached it */
diff --git a/drivers/pci/hotplug/ibmphp.h b/drivers/pci/hotplug/ibmphp.h
index 5bc039da647f..c22e0284d7b1 100644
--- a/drivers/pci/hotplug/ibmphp.h
+++ b/drivers/pci/hotplug/ibmphp.h
@@ -196,7 +196,7 @@ struct ebda_hpc_bus {
196 196
197 197
198/******************************************************************** 198/********************************************************************
199* THREE TYPE OF HOT PLUG CONTROLER * 199* THREE TYPE OF HOT PLUG CONTROLLER *
200********************************************************************/ 200********************************************************************/
201 201
202struct isa_ctlr_access { 202struct isa_ctlr_access {
diff --git a/drivers/pci/hotplug/ibmphp_hpc.c b/drivers/pci/hotplug/ibmphp_hpc.c
index 6894b548c8ca..1a3eb8d3d4cb 100644
--- a/drivers/pci/hotplug/ibmphp_hpc.c
+++ b/drivers/pci/hotplug/ibmphp_hpc.c
@@ -64,7 +64,7 @@ static int to_debug = FALSE;
64#define WPG_I2C_OR 0x2000 // I2C OR operation 64#define WPG_I2C_OR 0x2000 // I2C OR operation
65 65
66//---------------------------------------------------------------------------- 66//----------------------------------------------------------------------------
67// Command set for I2C Master Operation Setup Regisetr 67// Command set for I2C Master Operation Setup Register
68//---------------------------------------------------------------------------- 68//----------------------------------------------------------------------------
69#define WPG_READATADDR_MASK 0x00010000 // read,bytes,I2C shifted,index 69#define WPG_READATADDR_MASK 0x00010000 // read,bytes,I2C shifted,index
70#define WPG_WRITEATADDR_MASK 0x40010000 // write,bytes,I2C shifted,index 70#define WPG_WRITEATADDR_MASK 0x40010000 // write,bytes,I2C shifted,index
@@ -835,7 +835,7 @@ static void poll_hpc (void)
835 if (ibmphp_shutdown) 835 if (ibmphp_shutdown)
836 break; 836 break;
837 837
838 /* try to get the lock to do some kind of harware access */ 838 /* try to get the lock to do some kind of hardware access */
839 down (&semOperations); 839 down (&semOperations);
840 840
841 switch (poll_state) { 841 switch (poll_state) {
@@ -906,7 +906,7 @@ static void poll_hpc (void)
906 poll_state = POLL_LATCH_REGISTER; 906 poll_state = POLL_LATCH_REGISTER;
907 break; 907 break;
908 } 908 }
909 /* give up the harware semaphore */ 909 /* give up the hardware semaphore */
910 up (&semOperations); 910 up (&semOperations);
911 /* sleep for a short time just for good measure */ 911 /* sleep for a short time just for good measure */
912 msleep(100); 912 msleep(100);
diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
index 2335fac65fb4..8122fe734aa7 100644
--- a/drivers/pci/hotplug/ibmphp_pci.c
+++ b/drivers/pci/hotplug/ibmphp_pci.c
@@ -1308,10 +1308,10 @@ static int unconfigure_boot_device (u8 busno, u8 device, u8 function)
1308 /* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */ 1308 /* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */
1309 } else { 1309 } else {
1310 /* This is Memory */ 1310 /* This is Memory */
1311 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1312 if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) { 1311 if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) {
1313 /* pfmem */ 1312 /* pfmem */
1314 debug ("start address of pfmem is %x\n", start_address); 1313 debug ("start address of pfmem is %x\n", start_address);
1314 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1315 1315
1316 if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) { 1316 if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) {
1317 err ("cannot find corresponding PFMEM resource to remove\n"); 1317 err ("cannot find corresponding PFMEM resource to remove\n");
@@ -1325,6 +1325,8 @@ static int unconfigure_boot_device (u8 busno, u8 device, u8 function)
1325 } else { 1325 } else {
1326 /* regular memory */ 1326 /* regular memory */
1327 debug ("start address of mem is %x\n", start_address); 1327 debug ("start address of mem is %x\n", start_address);
1328 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1329
1328 if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) { 1330 if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) {
1329 err ("cannot find corresponding MEM resource to remove\n"); 1331 err ("cannot find corresponding MEM resource to remove\n");
1330 return -EIO; 1332 return -EIO;
@@ -1422,9 +1424,9 @@ static int unconfigure_boot_bridge (u8 busno, u8 device, u8 function)
1422 /* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */ 1424 /* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */
1423 } else { 1425 } else {
1424 /* This is Memory */ 1426 /* This is Memory */
1425 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1426 if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) { 1427 if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) {
1427 /* pfmem */ 1428 /* pfmem */
1429 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1428 if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) { 1430 if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) {
1429 err ("cannot find corresponding PFMEM resource to remove\n"); 1431 err ("cannot find corresponding PFMEM resource to remove\n");
1430 return -EINVAL; 1432 return -EINVAL;
@@ -1436,6 +1438,7 @@ static int unconfigure_boot_bridge (u8 busno, u8 device, u8 function)
1436 } 1438 }
1437 } else { 1439 } else {
1438 /* regular memory */ 1440 /* regular memory */
1441 start_address &= PCI_BASE_ADDRESS_MEM_MASK;
1439 if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) { 1442 if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) {
1440 err ("cannot find corresponding MEM resource to remove\n"); 1443 err ("cannot find corresponding MEM resource to remove\n");
1441 return -EINVAL; 1444 return -EINVAL;
diff --git a/drivers/pci/hotplug/pci_hotplug.h b/drivers/pci/hotplug/pci_hotplug.h
index 57ace325168d..88d44f7fef29 100644
--- a/drivers/pci/hotplug/pci_hotplug.h
+++ b/drivers/pci/hotplug/pci_hotplug.h
@@ -150,7 +150,7 @@ struct hotplug_slot_info {
150 * @name: the name of the slot being registered. This string must 150 * @name: the name of the slot being registered. This string must
151 * be unique amoung slots registered on this system. 151 * be unique amoung slots registered on this system.
152 * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot 152 * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot
153 * @info: pointer to the &struct hotplug_slot_info for the inital values for 153 * @info: pointer to the &struct hotplug_slot_info for the initial values for
154 * this slot. 154 * this slot.
155 * @release: called during pci_hp_deregister to free memory allocated in a 155 * @release: called during pci_hp_deregister to free memory allocated in a
156 * hotplug_slot structure. 156 * hotplug_slot structure.
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index 72baf749e65e..ed1fd8d6178d 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -90,6 +90,22 @@ static struct hotplug_slot_ops pciehp_hotplug_slot_ops = {
90 .get_cur_bus_speed = get_cur_bus_speed, 90 .get_cur_bus_speed = get_cur_bus_speed,
91}; 91};
92 92
93/**
94 * release_slot - free up the memory used by a slot
95 * @hotplug_slot: slot to free
96 */
97static void release_slot(struct hotplug_slot *hotplug_slot)
98{
99 struct slot *slot = hotplug_slot->private;
100
101 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
102
103 kfree(slot->hotplug_slot->info);
104 kfree(slot->hotplug_slot->name);
105 kfree(slot->hotplug_slot);
106 kfree(slot);
107}
108
93static int init_slots(struct controller *ctrl) 109static int init_slots(struct controller *ctrl)
94{ 110{
95 struct slot *new_slot; 111 struct slot *new_slot;
@@ -139,7 +155,8 @@ static int init_slots(struct controller *ctrl)
139 155
140 /* register this slot with the hotplug pci core */ 156 /* register this slot with the hotplug pci core */
141 new_slot->hotplug_slot->private = new_slot; 157 new_slot->hotplug_slot->private = new_slot;
142 make_slot_name (new_slot->hotplug_slot->name, SLOT_NAME_SIZE, new_slot); 158 new_slot->hotplug_slot->release = &release_slot;
159 make_slot_name(new_slot->hotplug_slot->name, SLOT_NAME_SIZE, new_slot);
143 new_slot->hotplug_slot->ops = &pciehp_hotplug_slot_ops; 160 new_slot->hotplug_slot->ops = &pciehp_hotplug_slot_ops;
144 161
145 new_slot->hpc_ops->get_power_status(new_slot, &(new_slot->hotplug_slot->info->power_status)); 162 new_slot->hpc_ops->get_power_status(new_slot, &(new_slot->hotplug_slot->info->power_status));
@@ -188,10 +205,6 @@ static int cleanup_slots (struct controller * ctrl)
188 while (old_slot) { 205 while (old_slot) {
189 next_slot = old_slot->next; 206 next_slot = old_slot->next;
190 pci_hp_deregister (old_slot->hotplug_slot); 207 pci_hp_deregister (old_slot->hotplug_slot);
191 kfree(old_slot->hotplug_slot->info);
192 kfree(old_slot->hotplug_slot->name);
193 kfree(old_slot->hotplug_slot);
194 kfree(old_slot);
195 old_slot = next_slot; 208 old_slot = next_slot;
196 } 209 }
197 210
diff --git a/drivers/pci/hotplug/pcihp_skeleton.c b/drivers/pci/hotplug/pcihp_skeleton.c
index 6605d6bda529..3194d51c6ec9 100644
--- a/drivers/pci/hotplug/pcihp_skeleton.c
+++ b/drivers/pci/hotplug/pcihp_skeleton.c
@@ -297,7 +297,7 @@ static int __init init_slots(void)
297 hotplug_slot->ops = &skel_hotplug_slot_ops; 297 hotplug_slot->ops = &skel_hotplug_slot_ops;
298 298
299 /* 299 /*
300 * Initilize the slot info structure with some known 300 * Initialize the slot info structure with some known
301 * good values. 301 * good values.
302 */ 302 */
303 info->power_status = get_power_status(slot); 303 info->power_status = get_power_status(slot);
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 22ecd3b058be..30206ac43c44 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -522,7 +522,7 @@ void pci_scan_msi_device(struct pci_dev *dev)
522 * msi_capability_init - configure device's MSI capability structure 522 * msi_capability_init - configure device's MSI capability structure
523 * @dev: pointer to the pci_dev data structure of MSI device function 523 * @dev: pointer to the pci_dev data structure of MSI device function
524 * 524 *
525 * Setup the MSI capability structure of device funtion with a single 525 * Setup the MSI capability structure of device function with a single
526 * MSI vector, regardless of device function is capable of handling 526 * MSI vector, regardless of device function is capable of handling
527 * multiple messages. A return of zero indicates the successful setup 527 * multiple messages. A return of zero indicates the successful setup
528 * of an entry zero with the new MSI vector or non-zero for otherwise. 528 * of an entry zero with the new MSI vector or non-zero for otherwise.
@@ -599,7 +599,7 @@ static int msi_capability_init(struct pci_dev *dev)
599 * msix_capability_init - configure device's MSI-X capability 599 * msix_capability_init - configure device's MSI-X capability
600 * @dev: pointer to the pci_dev data structure of MSI-X device function 600 * @dev: pointer to the pci_dev data structure of MSI-X device function
601 * 601 *
602 * Setup the MSI-X capability structure of device funtion with a 602 * Setup the MSI-X capability structure of device function with a
603 * single MSI-X vector. A return of zero indicates the successful setup of 603 * single MSI-X vector. A return of zero indicates the successful setup of
604 * requested MSI-X entries with allocated vectors or non-zero for otherwise. 604 * requested MSI-X entries with allocated vectors or non-zero for otherwise.
605 **/ 605 **/
@@ -1074,7 +1074,7 @@ void pci_disable_msix(struct pci_dev* dev)
1074 * msi_remove_pci_irq_vectors - reclaim MSI(X) vectors to unused state 1074 * msi_remove_pci_irq_vectors - reclaim MSI(X) vectors to unused state
1075 * @dev: pointer to the pci_dev data structure of MSI(X) device function 1075 * @dev: pointer to the pci_dev data structure of MSI(X) device function
1076 * 1076 *
1077 * Being called during hotplug remove, from which the device funciton 1077 * Being called during hotplug remove, from which the device function
1078 * is hot-removed. All previous assigned MSI/MSI-X vectors, if 1078 * is hot-removed. All previous assigned MSI/MSI-X vectors, if
1079 * allocated for this device function, are reclaimed to unused state, 1079 * allocated for this device function, are reclaimed to unused state,
1080 * which may be used later on. 1080 * which may be used later on.
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 968eb32f292d..bc01d34e2634 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -19,7 +19,7 @@
19 19
20static u32 ctrlset_buf[3] = {0, 0, 0}; 20static u32 ctrlset_buf[3] = {0, 0, 0};
21static u32 global_ctrlsets = 0; 21static u32 global_ctrlsets = 0;
22u8 OSC_UUID[16] = {0x5B, 0x4D, 0xDB, 0x33, 0xF7, 0x1F, 0x1C, 0x40, 0x96, 0x57, 0x74, 0x41, 0xC0, 0x3D, 0xD7, 0x66}; 22static u8 OSC_UUID[16] = {0x5B, 0x4D, 0xDB, 0x33, 0xF7, 0x1F, 0x1C, 0x40, 0x96, 0x57, 0x74, 0x41, 0xC0, 0x3D, 0xD7, 0x66};
23 23
24static acpi_status 24static acpi_status
25acpi_query_osc ( 25acpi_query_osc (
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 37b7961efc44..fe98553c978f 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -318,6 +318,14 @@ static int pci_device_resume(struct device * dev)
318 return 0; 318 return 0;
319} 319}
320 320
321static void pci_device_shutdown(struct device *dev)
322{
323 struct pci_dev *pci_dev = to_pci_dev(dev);
324 struct pci_driver *drv = pci_dev->driver;
325
326 if (drv && drv->shutdown)
327 drv->shutdown(pci_dev);
328}
321 329
322#define kobj_to_pci_driver(obj) container_of(obj, struct device_driver, kobj) 330#define kobj_to_pci_driver(obj) container_of(obj, struct device_driver, kobj)
323#define attr_to_driver_attribute(obj) container_of(obj, struct driver_attribute, attr) 331#define attr_to_driver_attribute(obj) container_of(obj, struct driver_attribute, attr)
@@ -373,7 +381,7 @@ pci_populate_driver_dir(struct pci_driver *drv)
373 * 381 *
374 * Adds the driver structure to the list of registered drivers. 382 * Adds the driver structure to the list of registered drivers.
375 * Returns a negative value on error, otherwise 0. 383 * Returns a negative value on error, otherwise 0.
376 * If no error occured, the driver remains registered even if 384 * If no error occurred, the driver remains registered even if
377 * no device was claimed during registration. 385 * no device was claimed during registration.
378 */ 386 */
379int pci_register_driver(struct pci_driver *drv) 387int pci_register_driver(struct pci_driver *drv)
@@ -385,6 +393,7 @@ int pci_register_driver(struct pci_driver *drv)
385 drv->driver.bus = &pci_bus_type; 393 drv->driver.bus = &pci_bus_type;
386 drv->driver.probe = pci_device_probe; 394 drv->driver.probe = pci_device_probe;
387 drv->driver.remove = pci_device_remove; 395 drv->driver.remove = pci_device_remove;
396 drv->driver.shutdown = pci_device_shutdown,
388 drv->driver.owner = drv->owner; 397 drv->driver.owner = drv->owner;
389 drv->driver.kobj.ktype = &pci_driver_kobj_type; 398 drv->driver.kobj.ktype = &pci_driver_kobj_type;
390 pci_init_dynids(&drv->dynids); 399 pci_init_dynids(&drv->dynids);
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index d57ae71d32b1..8568b207f189 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -91,6 +91,7 @@ pci_read_config(struct kobject *kobj, char *buf, loff_t off, size_t count)
91 struct pci_dev *dev = to_pci_dev(container_of(kobj,struct device,kobj)); 91 struct pci_dev *dev = to_pci_dev(container_of(kobj,struct device,kobj));
92 unsigned int size = 64; 92 unsigned int size = 64;
93 loff_t init_off = off; 93 loff_t init_off = off;
94 u8 *data = (u8*) buf;
94 95
95 /* Several chips lock up trying to read undefined config space */ 96 /* Several chips lock up trying to read undefined config space */
96 if (capable(CAP_SYS_ADMIN)) { 97 if (capable(CAP_SYS_ADMIN)) {
@@ -108,30 +109,47 @@ pci_read_config(struct kobject *kobj, char *buf, loff_t off, size_t count)
108 size = count; 109 size = count;
109 } 110 }
110 111
111 while (off & 3) { 112 if ((off & 1) && size) {
112 unsigned char val; 113 u8 val;
113 pci_read_config_byte(dev, off, &val); 114 pci_read_config_byte(dev, off, &val);
114 buf[off - init_off] = val; 115 data[off - init_off] = val;
115 off++; 116 off++;
116 if (--size == 0) 117 size--;
117 break; 118 }
119
120 if ((off & 3) && size > 2) {
121 u16 val;
122 pci_read_config_word(dev, off, &val);
123 data[off - init_off] = val & 0xff;
124 data[off - init_off + 1] = (val >> 8) & 0xff;
125 off += 2;
126 size -= 2;
118 } 127 }
119 128
120 while (size > 3) { 129 while (size > 3) {
121 unsigned int val; 130 u32 val;
122 pci_read_config_dword(dev, off, &val); 131 pci_read_config_dword(dev, off, &val);
123 buf[off - init_off] = val & 0xff; 132 data[off - init_off] = val & 0xff;
124 buf[off - init_off + 1] = (val >> 8) & 0xff; 133 data[off - init_off + 1] = (val >> 8) & 0xff;
125 buf[off - init_off + 2] = (val >> 16) & 0xff; 134 data[off - init_off + 2] = (val >> 16) & 0xff;
126 buf[off - init_off + 3] = (val >> 24) & 0xff; 135 data[off - init_off + 3] = (val >> 24) & 0xff;
127 off += 4; 136 off += 4;
128 size -= 4; 137 size -= 4;
129 } 138 }
130 139
131 while (size > 0) { 140 if (size >= 2) {
132 unsigned char val; 141 u16 val;
142 pci_read_config_word(dev, off, &val);
143 data[off - init_off] = val & 0xff;
144 data[off - init_off + 1] = (val >> 8) & 0xff;
145 off += 2;
146 size -= 2;
147 }
148
149 if (size > 0) {
150 u8 val;
133 pci_read_config_byte(dev, off, &val); 151 pci_read_config_byte(dev, off, &val);
134 buf[off - init_off] = val; 152 data[off - init_off] = val;
135 off++; 153 off++;
136 --size; 154 --size;
137 } 155 }
@@ -145,6 +163,7 @@ pci_write_config(struct kobject *kobj, char *buf, loff_t off, size_t count)
145 struct pci_dev *dev = to_pci_dev(container_of(kobj,struct device,kobj)); 163 struct pci_dev *dev = to_pci_dev(container_of(kobj,struct device,kobj));
146 unsigned int size = count; 164 unsigned int size = count;
147 loff_t init_off = off; 165 loff_t init_off = off;
166 u8 *data = (u8*) buf;
148 167
149 if (off > dev->cfg_size) 168 if (off > dev->cfg_size)
150 return 0; 169 return 0;
@@ -152,26 +171,41 @@ pci_write_config(struct kobject *kobj, char *buf, loff_t off, size_t count)
152 size = dev->cfg_size - off; 171 size = dev->cfg_size - off;
153 count = size; 172 count = size;
154 } 173 }
155 174
156 while (off & 3) { 175 if ((off & 1) && size) {
157 pci_write_config_byte(dev, off, buf[off - init_off]); 176 pci_write_config_byte(dev, off, data[off - init_off]);
158 off++; 177 off++;
159 if (--size == 0) 178 size--;
160 break;
161 } 179 }
180
181 if ((off & 3) && size > 2) {
182 u16 val = data[off - init_off];
183 val |= (u16) data[off - init_off + 1] << 8;
184 pci_write_config_word(dev, off, val);
185 off += 2;
186 size -= 2;
187 }
162 188
163 while (size > 3) { 189 while (size > 3) {
164 unsigned int val = buf[off - init_off]; 190 u32 val = data[off - init_off];
165 val |= (unsigned int) buf[off - init_off + 1] << 8; 191 val |= (u32) data[off - init_off + 1] << 8;
166 val |= (unsigned int) buf[off - init_off + 2] << 16; 192 val |= (u32) data[off - init_off + 2] << 16;
167 val |= (unsigned int) buf[off - init_off + 3] << 24; 193 val |= (u32) data[off - init_off + 3] << 24;
168 pci_write_config_dword(dev, off, val); 194 pci_write_config_dword(dev, off, val);
169 off += 4; 195 off += 4;
170 size -= 4; 196 size -= 4;
171 } 197 }
198
199 if (size >= 2) {
200 u16 val = data[off - init_off];
201 val |= (u16) data[off - init_off + 1] << 8;
202 pci_write_config_word(dev, off, val);
203 off += 2;
204 size -= 2;
205 }
172 206
173 while (size > 0) { 207 if (size) {
174 pci_write_config_byte(dev, off, buf[off - init_off]); 208 pci_write_config_byte(dev, off, data[off - init_off]);
175 off++; 209 off++;
176 --size; 210 --size;
177 } 211 }
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index bfbff8335268..f04b9ffe4153 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -16,6 +16,7 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/spinlock.h> 17#include <linux/spinlock.h>
18#include <asm/dma.h> /* isa_dma_bridge_buggy */ 18#include <asm/dma.h> /* isa_dma_bridge_buggy */
19#include "pci.h"
19 20
20 21
21/** 22/**
@@ -398,10 +399,10 @@ pci_enable_device(struct pci_dev *dev)
398{ 399{
399 int err; 400 int err;
400 401
401 dev->is_enabled = 1;
402 if ((err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1))) 402 if ((err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1)))
403 return err; 403 return err;
404 pci_fixup_device(pci_fixup_enable, dev); 404 pci_fixup_device(pci_fixup_enable, dev);
405 dev->is_enabled = 1;
405 return 0; 406 return 0;
406} 407}
407 408
@@ -427,16 +428,15 @@ pci_disable_device(struct pci_dev *dev)
427{ 428{
428 u16 pci_command; 429 u16 pci_command;
429 430
430 dev->is_enabled = 0;
431 dev->is_busmaster = 0;
432
433 pci_read_config_word(dev, PCI_COMMAND, &pci_command); 431 pci_read_config_word(dev, PCI_COMMAND, &pci_command);
434 if (pci_command & PCI_COMMAND_MASTER) { 432 if (pci_command & PCI_COMMAND_MASTER) {
435 pci_command &= ~PCI_COMMAND_MASTER; 433 pci_command &= ~PCI_COMMAND_MASTER;
436 pci_write_config_word(dev, PCI_COMMAND, pci_command); 434 pci_write_config_word(dev, PCI_COMMAND, pci_command);
437 } 435 }
436 dev->is_busmaster = 0;
438 437
439 pcibios_disable_device(dev); 438 pcibios_disable_device(dev);
439 dev->is_enabled = 0;
440} 440}
441 441
442/** 442/**
@@ -749,17 +749,6 @@ pci_set_dma_mask(struct pci_dev *dev, u64 mask)
749} 749}
750 750
751int 751int
752pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask)
753{
754 if (!pci_dac_dma_supported(dev, mask))
755 return -EIO;
756
757 dev->dma_mask = mask;
758
759 return 0;
760}
761
762int
763pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) 752pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
764{ 753{
765 if (!pci_dma_supported(dev, mask)) 754 if (!pci_dma_supported(dev, mask))
@@ -821,7 +810,6 @@ EXPORT_SYMBOL(pci_set_master);
821EXPORT_SYMBOL(pci_set_mwi); 810EXPORT_SYMBOL(pci_set_mwi);
822EXPORT_SYMBOL(pci_clear_mwi); 811EXPORT_SYMBOL(pci_clear_mwi);
823EXPORT_SYMBOL(pci_set_dma_mask); 812EXPORT_SYMBOL(pci_set_dma_mask);
824EXPORT_SYMBOL(pci_dac_set_dma_mask);
825EXPORT_SYMBOL(pci_set_consistent_dma_mask); 813EXPORT_SYMBOL(pci_set_consistent_dma_mask);
826EXPORT_SYMBOL(pci_assign_resource); 814EXPORT_SYMBOL(pci_assign_resource);
827EXPORT_SYMBOL(pci_find_parent_resource); 815EXPORT_SYMBOL(pci_find_parent_resource);
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 6f0edadd132c..b7ae87823c69 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -9,6 +9,7 @@
9#include <linux/slab.h> 9#include <linux/slab.h>
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/cpumask.h> 11#include <linux/cpumask.h>
12#include "pci.h"
12 13
13#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */ 14#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */
14#define CARDBUS_RESERVE_BUSNR 3 15#define CARDBUS_RESERVE_BUSNR 3
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 84cc4f620d8d..e68bbfb1e7c3 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -15,6 +15,7 @@
15 15
16#include <asm/uaccess.h> 16#include <asm/uaccess.h>
17#include <asm/byteorder.h> 17#include <asm/byteorder.h>
18#include "pci.h"
18 19
19static int proc_initialized; /* = 0 */ 20static int proc_initialized; /* = 0 */
20 21
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 15a398051682..026aa04669a2 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -18,6 +18,7 @@
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include "pci.h"
21 22
22/* Deal with broken BIOS'es that neglect to enable passive release, 23/* Deal with broken BIOS'es that neglect to enable passive release,
23 which can cause problems in combination with the 82441FX/PPro MTRRs */ 24 which can cause problems in combination with the 82441FX/PPro MTRRs */
@@ -328,6 +329,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12,
328DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, quirk_ich4_lpc_acpi ); 329DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, quirk_ich4_lpc_acpi );
329DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, quirk_ich4_lpc_acpi ); 330DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, quirk_ich4_lpc_acpi );
330DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, quirk_ich4_lpc_acpi ); 331DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, quirk_ich4_lpc_acpi );
332DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, quirk_ich4_lpc_acpi );
331 333
332/* 334/*
333 * VIA ACPI: One IO region pointed to by longword at 335 * VIA ACPI: One IO region pointed to by longword at
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 750b11cefd93..1811cb240315 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -260,7 +260,7 @@ config SCSI_3W_9XXX
260 260
261config SCSI_7000FASST 261config SCSI_7000FASST
262 tristate "7000FASST SCSI support" 262 tristate "7000FASST SCSI support"
263 depends on ISA && SCSI 263 depends on ISA && SCSI && ISA_DMA_API
264 help 264 help
265 This driver supports the Western Digital 7000 SCSI host adapter 265 This driver supports the Western Digital 7000 SCSI host adapter
266 family. Some information is in the source: 266 family. Some information is in the source:
@@ -295,7 +295,7 @@ config SCSI_AHA152X
295 295
296config SCSI_AHA1542 296config SCSI_AHA1542
297 tristate "Adaptec AHA1542 support" 297 tristate "Adaptec AHA1542 support"
298 depends on ISA && SCSI 298 depends on ISA && SCSI && ISA_DMA_API
299 ---help--- 299 ---help---
300 This is support for a SCSI host adapter. It is explained in section 300 This is support for a SCSI host adapter. It is explained in section
301 3.4 of the SCSI-HOWTO, available from 301 3.4 of the SCSI-HOWTO, available from
@@ -515,7 +515,7 @@ config SCSI_SATA_VITESSE
515 515
516config SCSI_BUSLOGIC 516config SCSI_BUSLOGIC
517 tristate "BusLogic SCSI support" 517 tristate "BusLogic SCSI support"
518 depends on (PCI || ISA || MCA) && SCSI && (BROKEN || !SPARC64) 518 depends on (PCI || ISA || MCA) && SCSI && ISA_DMA_API
519 ---help--- 519 ---help---
520 This is support for BusLogic MultiMaster and FlashPoint SCSI Host 520 This is support for BusLogic MultiMaster and FlashPoint SCSI Host
521 Adapters. Consult the SCSI-HOWTO, available from 521 Adapters. Consult the SCSI-HOWTO, available from
@@ -571,7 +571,7 @@ config SCSI_DTC3280
571 571
572config SCSI_EATA 572config SCSI_EATA
573 tristate "EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) support" 573 tristate "EATA ISA/EISA/PCI (DPT and generic EATA/DMA-compliant boards) support"
574 depends on (ISA || EISA || PCI) && SCSI && (BROKEN || !SPARC64) 574 depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API
575 ---help--- 575 ---help---
576 This driver supports all EATA/DMA-compliant SCSI host adapters. DPT 576 This driver supports all EATA/DMA-compliant SCSI host adapters. DPT
577 ISA and all EISA I/O addresses are probed looking for the "EATA" 577 ISA and all EISA I/O addresses are probed looking for the "EATA"
@@ -665,7 +665,7 @@ config SCSI_FD_MCS
665 665
666config SCSI_GDTH 666config SCSI_GDTH
667 tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support" 667 tristate "Intel/ICP (former GDT SCSI Disk Array) RAID Controller support"
668 depends on (ISA || EISA || PCI) && SCSI && (BROKEN || !SPARC64) 668 depends on (ISA || EISA || PCI) && SCSI && ISA_DMA_API
669 ---help--- 669 ---help---
670 Formerly called GDT SCSI Disk Array Controller Support. 670 Formerly called GDT SCSI Disk Array Controller Support.
671 671
@@ -1416,7 +1416,7 @@ config SCSI_T128
1416 1416
1417config SCSI_U14_34F 1417config SCSI_U14_34F
1418 tristate "UltraStor 14F/34F support" 1418 tristate "UltraStor 14F/34F support"
1419 depends on ISA && SCSI 1419 depends on ISA && SCSI && ISA_DMA_API
1420 ---help--- 1420 ---help---
1421 This is support for the UltraStor 14F and 34F SCSI-2 host adapters. 1421 This is support for the UltraStor 14F and 34F SCSI-2 host adapters.
1422 The source at <file:drivers/scsi/u14-34f.c> contains some 1422 The source at <file:drivers/scsi/u14-34f.c> contains some
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index e12c5be1e0a3..f50aaf25c98e 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -431,7 +431,7 @@ nomem:
431 * (2) error, where io->status is a negative errno value. The number 431 * (2) error, where io->status is a negative errno value. The number
432 * of io->bytes transferred before the error is usually less 432 * of io->bytes transferred before the error is usually less
433 * than requested, and can be nonzero. 433 * than requested, and can be nonzero.
434 * (3) cancelation, a type of error with status -ECONNRESET that 434 * (3) cancellation, a type of error with status -ECONNRESET that
435 * is initiated by usb_sg_cancel(). 435 * is initiated by usb_sg_cancel().
436 * 436 *
437 * When this function returns, all memory allocated through usb_sg_init() or 437 * When this function returns, all memory allocated through usb_sg_init() or
@@ -1282,7 +1282,7 @@ static void release_interface(struct device *dev)
1282 * bus rwsem; usb device driver probe() methods cannot use this routine. 1282 * bus rwsem; usb device driver probe() methods cannot use this routine.
1283 * 1283 *
1284 * Returns zero on success, or else the status code returned by the 1284 * Returns zero on success, or else the status code returned by the
1285 * underlying call that failed. On succesful completion, each interface 1285 * underlying call that failed. On successful completion, each interface
1286 * in the original device configuration has been destroyed, and each one 1286 * in the original device configuration has been destroyed, and each one
1287 * in the new configuration has been probed by all relevant usb device 1287 * in the new configuration has been probed by all relevant usb device
1288 * drivers currently known to the kernel. 1288 * drivers currently known to the kernel.
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index 16972159a57a..0faf18d511de 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -121,7 +121,7 @@ struct urb * usb_get_urb(struct urb *urb)
121 * describing that request to the USB subsystem. Request completion will 121 * describing that request to the USB subsystem. Request completion will
122 * be indicated later, asynchronously, by calling the completion handler. 122 * be indicated later, asynchronously, by calling the completion handler.
123 * The three types of completion are success, error, and unlink 123 * The three types of completion are success, error, and unlink
124 * (a software-induced fault, also called "request cancelation"). 124 * (a software-induced fault, also called "request cancellation").
125 * 125 *
126 * URBs may be submitted in interrupt context. 126 * URBs may be submitted in interrupt context.
127 * 127 *
@@ -170,7 +170,7 @@ struct urb * usb_get_urb(struct urb *urb)
170 * As of Linux 2.6, all USB endpoint transfer queues support depths greater 170 * As of Linux 2.6, all USB endpoint transfer queues support depths greater
171 * than one. This was previously a HCD-specific behavior, except for ISO 171 * than one. This was previously a HCD-specific behavior, except for ISO
172 * transfers. Non-isochronous endpoint queues are inactive during cleanup 172 * transfers. Non-isochronous endpoint queues are inactive during cleanup
173 * after faults (transfer errors or cancelation). 173 * after faults (transfer errors or cancellation).
174 * 174 *
175 * Reserved Bandwidth Transfers: 175 * Reserved Bandwidth Transfers:
176 * 176 *
@@ -395,7 +395,7 @@ int usb_submit_urb(struct urb *urb, int mem_flags)
395 * 395 *
396 * This routine cancels an in-progress request. URBs complete only 396 * This routine cancels an in-progress request. URBs complete only
397 * once per submission, and may be canceled only once per submission. 397 * once per submission, and may be canceled only once per submission.
398 * Successful cancelation means the requests's completion handler will 398 * Successful cancellation means the requests's completion handler will
399 * be called with a status code indicating that the request has been 399 * be called with a status code indicating that the request has been
400 * canceled (rather than any other code) and will quickly be removed 400 * canceled (rather than any other code) and will quickly be removed
401 * from host controller data structures. 401 * from host controller data structures.
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 3993156c2e82..3f783cbdc7c3 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -569,7 +569,7 @@ static const struct usb_cdc_ether_desc ether_desc = {
569 569
570/* include the status endpoint if we can, even where it's optional. 570/* include the status endpoint if we can, even where it's optional.
571 * use wMaxPacketSize big enough to fit CDC_NOTIFY_SPEED_CHANGE in one 571 * use wMaxPacketSize big enough to fit CDC_NOTIFY_SPEED_CHANGE in one
572 * packet, to simplify cancelation; and a big transfer interval, to 572 * packet, to simplify cancellation; and a big transfer interval, to
573 * waste less bandwidth. 573 * waste less bandwidth.
574 * 574 *
575 * some drivers (like Linux 2.4 cdc-ether!) "need" it to exist even 575 * some drivers (like Linux 2.4 cdc-ether!) "need" it to exist even
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index 2cff67ccce45..1e5e6ddef787 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -275,7 +275,7 @@ static const char *CHIP;
275 * 275 *
276 * After opening, configure non-control endpoints. Then use normal 276 * After opening, configure non-control endpoints. Then use normal
277 * stream read() and write() requests; and maybe ioctl() to get more 277 * stream read() and write() requests; and maybe ioctl() to get more
278 * precise FIFO status when recovering from cancelation. 278 * precise FIFO status when recovering from cancellation.
279 */ 279 */
280 280
281static void epio_complete (struct usb_ep *ep, struct usb_request *req) 281static void epio_complete (struct usb_ep *ep, struct usb_request *req)
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c
index 0def9f70e889..df75ab65a5ec 100644
--- a/drivers/usb/gadget/lh7a40x_udc.c
+++ b/drivers/usb/gadget/lh7a40x_udc.c
@@ -705,7 +705,7 @@ void nuke(struct lh7a40x_ep *ep, int status)
705 done(ep, req, status); 705 done(ep, req, status);
706 } 706 }
707 707
708 /* Disable IRQ if EP is enabled (has decriptor) */ 708 /* Disable IRQ if EP is enabled (has descriptor) */
709 if (ep->desc) 709 if (ep->desc)
710 pio_irq_disable(ep_index(ep)); 710 pio_irq_disable(ep_index(ep));
711} 711}
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index f1762ed6db63..4d591c764e38 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -240,7 +240,7 @@ struct gs_dev {
240 struct usb_ep *dev_notify_ep; /* address of notify endpoint */ 240 struct usb_ep *dev_notify_ep; /* address of notify endpoint */
241 struct usb_ep *dev_in_ep; /* address of in endpoint */ 241 struct usb_ep *dev_in_ep; /* address of in endpoint */
242 struct usb_ep *dev_out_ep; /* address of out endpoint */ 242 struct usb_ep *dev_out_ep; /* address of out endpoint */
243 struct usb_endpoint_descriptor /* desciptor of notify ep */ 243 struct usb_endpoint_descriptor /* descriptor of notify ep */
244 *dev_notify_ep_desc; 244 *dev_notify_ep_desc;
245 struct usb_endpoint_descriptor /* descriptor of in endpoint */ 245 struct usb_endpoint_descriptor /* descriptor of in endpoint */
246 *dev_in_ep_desc; 246 *dev_in_ep_desc;
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 84d2b93aca37..bc69bd7acebe 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -346,6 +346,22 @@ ehci_reboot (struct notifier_block *self, unsigned long code, void *null)
346 return 0; 346 return 0;
347} 347}
348 348
349static void ehci_port_power (struct ehci_hcd *ehci, int is_on)
350{
351 unsigned port;
352
353 if (!HCS_PPC (ehci->hcs_params))
354 return;
355
356 ehci_dbg (ehci, "...power%s ports...\n", is_on ? "up" : "down");
357 for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; )
358 (void) ehci_hub_control(ehci_to_hcd(ehci),
359 is_on ? SetPortFeature : ClearPortFeature,
360 USB_PORT_FEAT_POWER,
361 port--, NULL, 0);
362 msleep(20);
363}
364
349 365
350/* called by khubd or root hub init threads */ 366/* called by khubd or root hub init threads */
351 367
@@ -362,8 +378,10 @@ static int ehci_hc_reset (struct usb_hcd *hcd)
362 dbg_hcs_params (ehci, "reset"); 378 dbg_hcs_params (ehci, "reset");
363 dbg_hcc_params (ehci, "reset"); 379 dbg_hcc_params (ehci, "reset");
364 380
381 /* cache this readonly data; minimize chip reads */
382 ehci->hcs_params = readl (&ehci->caps->hcs_params);
383
365#ifdef CONFIG_PCI 384#ifdef CONFIG_PCI
366 /* EHCI 0.96 and later may have "extended capabilities" */
367 if (hcd->self.controller->bus == &pci_bus_type) { 385 if (hcd->self.controller->bus == &pci_bus_type) {
368 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); 386 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
369 387
@@ -383,9 +401,30 @@ static int ehci_hc_reset (struct usb_hcd *hcd)
383 break; 401 break;
384 } 402 }
385 403
404 /* optional debug port, normally in the first BAR */
405 temp = pci_find_capability (pdev, 0x0a);
406 if (temp) {
407 pci_read_config_dword(pdev, temp, &temp);
408 temp >>= 16;
409 if ((temp & (3 << 13)) == (1 << 13)) {
410 temp &= 0x1fff;
411 ehci->debug = hcd->regs + temp;
412 temp = readl (&ehci->debug->control);
413 ehci_info (ehci, "debug port %d%s\n",
414 HCS_DEBUG_PORT(ehci->hcs_params),
415 (temp & DBGP_ENABLED)
416 ? " IN USE"
417 : "");
418 if (!(temp & DBGP_ENABLED))
419 ehci->debug = NULL;
420 }
421 }
422
386 temp = HCC_EXT_CAPS (readl (&ehci->caps->hcc_params)); 423 temp = HCC_EXT_CAPS (readl (&ehci->caps->hcc_params));
387 } else 424 } else
388 temp = 0; 425 temp = 0;
426
427 /* EHCI 0.96 and later may have "extended capabilities" */
389 while (temp && count--) { 428 while (temp && count--) {
390 u32 cap; 429 u32 cap;
391 430
@@ -414,8 +453,7 @@ static int ehci_hc_reset (struct usb_hcd *hcd)
414 ehci_reset (ehci); 453 ehci_reset (ehci);
415#endif 454#endif
416 455
417 /* cache this readonly data; minimize PCI reads */ 456 ehci_port_power (ehci, 0);
418 ehci->hcs_params = readl (&ehci->caps->hcs_params);
419 457
420 /* at least the Genesys GL880S needs fixup here */ 458 /* at least the Genesys GL880S needs fixup here */
421 temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params); 459 temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params);
@@ -657,16 +695,11 @@ done2:
657static void ehci_stop (struct usb_hcd *hcd) 695static void ehci_stop (struct usb_hcd *hcd)
658{ 696{
659 struct ehci_hcd *ehci = hcd_to_ehci (hcd); 697 struct ehci_hcd *ehci = hcd_to_ehci (hcd);
660 u8 rh_ports, port;
661 698
662 ehci_dbg (ehci, "stop\n"); 699 ehci_dbg (ehci, "stop\n");
663 700
664 /* Turn off port power on all root hub ports. */ 701 /* Turn off port power on all root hub ports. */
665 rh_ports = HCS_N_PORTS (ehci->hcs_params); 702 ehci_port_power (ehci, 0);
666 for (port = 1; port <= rh_ports; port++)
667 (void) ehci_hub_control(hcd,
668 ClearPortFeature, USB_PORT_FEAT_POWER,
669 port, NULL, 0);
670 703
671 /* no more interrupts ... */ 704 /* no more interrupts ... */
672 del_timer_sync (&ehci->watchdog); 705 del_timer_sync (&ehci->watchdog);
@@ -748,7 +781,6 @@ static int ehci_resume (struct usb_hcd *hcd)
748 unsigned port; 781 unsigned port;
749 struct usb_device *root = hcd->self.root_hub; 782 struct usb_device *root = hcd->self.root_hub;
750 int retval = -EINVAL; 783 int retval = -EINVAL;
751 int powerup = 0;
752 784
753 // maybe restore (PCI) FLADJ 785 // maybe restore (PCI) FLADJ
754 786
@@ -766,8 +798,6 @@ static int ehci_resume (struct usb_hcd *hcd)
766 up (&hcd->self.root_hub->serialize); 798 up (&hcd->self.root_hub->serialize);
767 break; 799 break;
768 } 800 }
769 if ((status & PORT_POWER) == 0)
770 powerup = 1;
771 if (!root->children [port]) 801 if (!root->children [port])
772 continue; 802 continue;
773 dbg_port (ehci, __FUNCTION__, port + 1, status); 803 dbg_port (ehci, __FUNCTION__, port + 1, status);
@@ -794,16 +824,9 @@ static int ehci_resume (struct usb_hcd *hcd)
794 retval = ehci_start (hcd); 824 retval = ehci_start (hcd);
795 825
796 /* here we "know" root ports should always stay powered; 826 /* here we "know" root ports should always stay powered;
797 * but some controllers may lost all power. 827 * but some controllers may lose all power.
798 */ 828 */
799 if (powerup) { 829 ehci_port_power (ehci, 1);
800 ehci_dbg (ehci, "...powerup ports...\n");
801 for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; )
802 (void) ehci_hub_control(hcd,
803 SetPortFeature, USB_PORT_FEAT_POWER,
804 port--, NULL, 0);
805 msleep(20);
806 }
807 } 830 }
808 831
809 return retval; 832 return retval;
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 2373537fabed..02fefab3501e 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -281,6 +281,8 @@ ehci_hub_descriptor (
281 temp = 0x0008; /* per-port overcurrent reporting */ 281 temp = 0x0008; /* per-port overcurrent reporting */
282 if (HCS_PPC (ehci->hcs_params)) 282 if (HCS_PPC (ehci->hcs_params))
283 temp |= 0x0001; /* per-port power control */ 283 temp |= 0x0001; /* per-port power control */
284 else
285 temp |= 0x0002; /* no power switching */
284#if 0 286#if 0
285// re-enable when we support USB_PORT_FEAT_INDICATOR below. 287// re-enable when we support USB_PORT_FEAT_INDICATOR below.
286 if (HCS_INDICATOR (ehci->hcs_params)) 288 if (HCS_INDICATOR (ehci->hcs_params))
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index e763a8399a75..4df498231752 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -47,6 +47,12 @@ struct ehci_stats {
47#define EHCI_MAX_ROOT_PORTS 15 /* see HCS_N_PORTS */ 47#define EHCI_MAX_ROOT_PORTS 15 /* see HCS_N_PORTS */
48 48
49struct ehci_hcd { /* one per controller */ 49struct ehci_hcd { /* one per controller */
50 /* glue to PCI and HCD framework */
51 struct ehci_caps __iomem *caps;
52 struct ehci_regs __iomem *regs;
53 struct ehci_dbg_port __iomem *debug;
54
55 __u32 hcs_params; /* cached register copy */
50 spinlock_t lock; 56 spinlock_t lock;
51 57
52 /* async schedule support */ 58 /* async schedule support */
@@ -84,11 +90,6 @@ struct ehci_hcd { /* one per controller */
84 90
85 unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */ 91 unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */
86 92
87 /* glue to PCI and HCD framework */
88 struct ehci_caps __iomem *caps;
89 struct ehci_regs __iomem *regs;
90 __u32 hcs_params; /* cached register copy */
91
92 /* irq statistics */ 93 /* irq statistics */
93#ifdef EHCI_STATS 94#ifdef EHCI_STATS
94 struct ehci_stats stats; 95 struct ehci_stats stats;
@@ -165,7 +166,7 @@ struct ehci_caps {
165 /* these fields are specified as 8 and 16 bit registers, 166 /* these fields are specified as 8 and 16 bit registers,
166 * but some hosts can't perform 8 or 16 bit PCI accesses. 167 * but some hosts can't perform 8 or 16 bit PCI accesses.
167 */ 168 */
168 u32 hc_capbase; 169 u32 hc_capbase;
169#define HC_LENGTH(p) (((p)>>00)&0x00ff) /* bits 7:0 */ 170#define HC_LENGTH(p) (((p)>>00)&0x00ff) /* bits 7:0 */
170#define HC_VERSION(p) (((p)>>16)&0xffff) /* bits 31:16 */ 171#define HC_VERSION(p) (((p)>>16)&0xffff) /* bits 31:16 */
171 u32 hcs_params; /* HCSPARAMS - offset 0x4 */ 172 u32 hcs_params; /* HCSPARAMS - offset 0x4 */
@@ -273,7 +274,7 @@ struct ehci_dbg_port {
273#define DBGP_ENABLED (1<<28) 274#define DBGP_ENABLED (1<<28)
274#define DBGP_DONE (1<<16) 275#define DBGP_DONE (1<<16)
275#define DBGP_INUSE (1<<10) 276#define DBGP_INUSE (1<<10)
276#define DBGP_ERRCODE(x) (((x)>>7)&0x0f) 277#define DBGP_ERRCODE(x) (((x)>>7)&0x07)
277# define DBGP_ERR_BAD 1 278# define DBGP_ERR_BAD 1
278# define DBGP_ERR_SIGNAL 2 279# define DBGP_ERR_SIGNAL 2
279#define DBGP_ERROR (1<<6) 280#define DBGP_ERROR (1<<6)
@@ -282,11 +283,11 @@ struct ehci_dbg_port {
282#define DBGP_LEN(x) (((x)>>0)&0x0f) 283#define DBGP_LEN(x) (((x)>>0)&0x0f)
283 u32 pids; 284 u32 pids;
284#define DBGP_PID_GET(x) (((x)>>16)&0xff) 285#define DBGP_PID_GET(x) (((x)>>16)&0xff)
285#define DBGP_PID_SET(data,tok) (((data)<<8)|(tok)); 286#define DBGP_PID_SET(data,tok) (((data)<<8)|(tok))
286 u32 data03; 287 u32 data03;
287 u32 data47; 288 u32 data47;
288 u32 address; 289 u32 address;
289#define DBGP_EPADDR(dev,ep) (((dev)<<8)|(ep)); 290#define DBGP_EPADDR(dev,ep) (((dev)<<8)|(ep))
290} __attribute__ ((packed)); 291} __attribute__ ((packed));
291 292
292/*-------------------------------------------------------------------------*/ 293/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/hc_crisv10.c b/drivers/usb/host/hc_crisv10.c
index 376f8a034f65..d9883d774d3a 100644
--- a/drivers/usb/host/hc_crisv10.c
+++ b/drivers/usb/host/hc_crisv10.c
@@ -4329,7 +4329,7 @@ static int __init etrax_usb_hc_init(void)
4329 bus->bus_name="ETRAX 100LX"; 4329 bus->bus_name="ETRAX 100LX";
4330 bus->hcpriv = hc; 4330 bus->hcpriv = hc;
4331 4331
4332 /* Initalize RH to the default address. 4332 /* Initialize RH to the default address.
4333 And make sure that we have no status change indication */ 4333 And make sure that we have no status change indication */
4334 hc->rh.numports = 2; /* The RH has two ports */ 4334 hc->rh.numports = 2; /* The RH has two ports */
4335 hc->rh.devnum = 1; 4335 hc->rh.devnum = 1;
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index d309e292198e..a374b7692073 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -134,7 +134,7 @@ static void port_power(struct sl811 *sl811, int is_on)
134 134
135/* This is a PIO-only HCD. Queueing appends URBs to the endpoint's queue, 135/* This is a PIO-only HCD. Queueing appends URBs to the endpoint's queue,
136 * and may start I/O. Endpoint queues are scanned during completion irq 136 * and may start I/O. Endpoint queues are scanned during completion irq
137 * handlers (one per packet: ACK, NAK, faults, etc) and urb cancelation. 137 * handlers (one per packet: ACK, NAK, faults, etc) and urb cancellation.
138 * 138 *
139 * Using an external DMA engine to copy a packet at a time could work, 139 * Using an external DMA engine to copy a packet at a time could work,
140 * though setup/teardown costs may be too big to make it worthwhile. 140 * though setup/teardown costs may be too big to make it worthwhile.
@@ -738,7 +738,7 @@ retry:
738 } 738 }
739#endif 739#endif
740 740
741 /* port status seems wierd until after reset, so 741 /* port status seems weird until after reset, so
742 * force the reset and make khubd clean up later. 742 * force the reset and make khubd clean up later.
743 */ 743 */
744 sl811->port1 |= (1 << USB_PORT_FEAT_C_CONNECTION) 744 sl811->port1 |= (1 << USB_PORT_FEAT_C_CONNECTION)
diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
index 5791723e6083..a330a4b50e16 100644
--- a/drivers/usb/image/mdc800.c
+++ b/drivers/usb/image/mdc800.c
@@ -23,7 +23,7 @@
23 * 23 *
24 * 24 *
25 * The driver brings the USB functions of the MDC800 to Linux. 25 * The driver brings the USB functions of the MDC800 to Linux.
26 * To use the Camera you must support the USB Protocoll of the camera 26 * To use the Camera you must support the USB Protocol of the camera
27 * to the Kernel Node. 27 * to the Kernel Node.
28 * The Driver uses a misc device Node. Create it with : 28 * The Driver uses a misc device Node. Create it with :
29 * mknod /dev/mustek c 180 32 29 * mknod /dev/mustek c 180 32
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c
index 2d76be62f4e0..94ce2a9ad50f 100644
--- a/drivers/usb/input/aiptek.c
+++ b/drivers/usb/input/aiptek.c
@@ -386,7 +386,7 @@ static int aiptek_convert_from_2s_complement(unsigned char c)
386 * convention above.) I therefore have taken over REL_MISC and ABS_MISC 386 * convention above.) I therefore have taken over REL_MISC and ABS_MISC
387 * (for relative and absolute reports, respectively) for communicating 387 * (for relative and absolute reports, respectively) for communicating
388 * Proximity. Why two events? I thought it interesting to know if the 388 * Proximity. Why two events? I thought it interesting to know if the
389 * Proximity event occured while the tablet was in absolute or relative 389 * Proximity event occurred while the tablet was in absolute or relative
390 * mode. 390 * mode.
391 * 391 *
392 * Other tablets use the notion of a certain minimum stylus pressure 392 * Other tablets use the notion of a certain minimum stylus pressure
diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c
index 6b45a66d58c1..ab1a2a30ce7c 100644
--- a/drivers/usb/input/mtouchusb.c
+++ b/drivers/usb/input/mtouchusb.c
@@ -32,7 +32,7 @@
32 * Changed reset from standard USB dev reset to vendor reset 32 * Changed reset from standard USB dev reset to vendor reset
33 * Changed data sent to host from compensated to raw coordinates 33 * Changed data sent to host from compensated to raw coordinates
34 * Eliminated vendor/product module params 34 * Eliminated vendor/product module params
35 * Performed multiple successfull tests with an EXII-5010UC 35 * Performed multiple successful tests with an EXII-5010UC
36 * 36 *
37 * 1.5 02/27/2005 ddstreet@ieee.org 37 * 1.5 02/27/2005 ddstreet@ieee.org
38 * Added module parameter to select raw or hw-calibrated coordinate reporting 38 * Added module parameter to select raw or hw-calibrated coordinate reporting
diff --git a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c
index d6051822416e..036c485d1d1e 100644
--- a/drivers/usb/media/ov511.c
+++ b/drivers/usb/media/ov511.c
@@ -5041,7 +5041,7 @@ ov6xx0_configure(struct usb_ov511 *ov)
5041 { OV511_I2C_BUS, 0x2a, 0x04 }, /* Disable framerate adjust */ 5041 { OV511_I2C_BUS, 0x2a, 0x04 }, /* Disable framerate adjust */
5042// { OV511_I2C_BUS, 0x2b, 0xac }, /* Framerate; Set 2a[7] first */ 5042// { OV511_I2C_BUS, 0x2b, 0xac }, /* Framerate; Set 2a[7] first */
5043 { OV511_I2C_BUS, 0x2d, 0x99 }, 5043 { OV511_I2C_BUS, 0x2d, 0x99 },
5044 { OV511_I2C_BUS, 0x33, 0xa0 }, /* Color Procesing Parameter */ 5044 { OV511_I2C_BUS, 0x33, 0xa0 }, /* Color Processing Parameter */
5045 { OV511_I2C_BUS, 0x34, 0xd2 }, /* Max A/D range */ 5045 { OV511_I2C_BUS, 0x34, 0xd2 }, /* Max A/D range */
5046 { OV511_I2C_BUS, 0x38, 0x8b }, 5046 { OV511_I2C_BUS, 0x38, 0x8b },
5047 { OV511_I2C_BUS, 0x39, 0x40 }, 5047 { OV511_I2C_BUS, 0x39, 0x40 },
diff --git a/drivers/usb/media/pwc/pwc-ctrl.c b/drivers/usb/media/pwc/pwc-ctrl.c
index 42352f531bc0..42ec468d52d6 100644
--- a/drivers/usb/media/pwc/pwc-ctrl.c
+++ b/drivers/usb/media/pwc/pwc-ctrl.c
@@ -1100,7 +1100,7 @@ static inline int pwc_mpt_set_angle(struct pwc_device *pdev, int pan, int tilt)
1100 unsigned char buf[4]; 1100 unsigned char buf[4];
1101 1101
1102 /* set new relative angle; angles are expressed in degrees * 100, 1102 /* set new relative angle; angles are expressed in degrees * 100,
1103 but cam as .5 degree resolution, hence devide by 200. Also 1103 but cam as .5 degree resolution, hence divide by 200. Also
1104 the angle must be multiplied by 64 before it's send to 1104 the angle must be multiplied by 64 before it's send to
1105 the cam (??) 1105 the cam (??)
1106 */ 1106 */
diff --git a/drivers/usb/media/pwc/pwc-if.c b/drivers/usb/media/pwc/pwc-if.c
index c53e2263b7fb..cca47f480a8b 100644
--- a/drivers/usb/media/pwc/pwc-if.c
+++ b/drivers/usb/media/pwc/pwc-if.c
@@ -272,7 +272,7 @@ static int pwc_allocate_buffers(struct pwc_device *pdev)
272 return -ENXIO; 272 return -ENXIO;
273 } 273 }
274#endif 274#endif
275 /* Allocate Isochronuous pipe buffers */ 275 /* Allocate Isochronous pipe buffers */
276 for (i = 0; i < MAX_ISO_BUFS; i++) { 276 for (i = 0; i < MAX_ISO_BUFS; i++) {
277 if (pdev->sbuf[i].data == NULL) { 277 if (pdev->sbuf[i].data == NULL) {
278 kbuf = kmalloc(ISO_BUFFER_SIZE, GFP_KERNEL); 278 kbuf = kmalloc(ISO_BUFFER_SIZE, GFP_KERNEL);
@@ -850,7 +850,7 @@ static int pwc_isoc_init(struct pwc_device *pdev)
850 850
851 if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) { 851 if (pdev->vmax_packet_size < 0 || pdev->vmax_packet_size > ISO_MAX_FRAME_SIZE) {
852 Err("Failed to find packet size for video endpoint in current alternate setting.\n"); 852 Err("Failed to find packet size for video endpoint in current alternate setting.\n");
853 return -ENFILE; /* Odd error, that should be noticable */ 853 return -ENFILE; /* Odd error, that should be noticeable */
854 } 854 }
855 855
856 /* Set alternate interface */ 856 /* Set alternate interface */
@@ -2128,7 +2128,7 @@ static int __init usb_pwc_init(void)
2128 if (leds[1] >= 0) 2128 if (leds[1] >= 0)
2129 led_off = leds[1]; 2129 led_off = leds[1];
2130 2130
2131 /* Big device node whoopla. Basicly, it allows you to assign a 2131 /* Big device node whoopla. Basically, it allows you to assign a
2132 device node (/dev/videoX) to a camera, based on its type 2132 device node (/dev/videoX) to a camera, based on its type
2133 & serial number. The format is [type[.serialnumber]:]node. 2133 & serial number. The format is [type[.serialnumber]:]node.
2134 2134
diff --git a/drivers/usb/media/pwc/pwc-ioctl.h b/drivers/usb/media/pwc/pwc-ioctl.h
index 65805eaa9a1c..5f9cb08bc02e 100644
--- a/drivers/usb/media/pwc/pwc-ioctl.h
+++ b/drivers/usb/media/pwc/pwc-ioctl.h
@@ -75,7 +75,7 @@
75#define PWC_FPS_SNAPSHOT 0x00400000 75#define PWC_FPS_SNAPSHOT 0x00400000
76 76
77 77
78/* structure for transfering x & y coordinates */ 78/* structure for transferring x & y coordinates */
79struct pwc_coord 79struct pwc_coord
80{ 80{
81 int x, y; /* guess what */ 81 int x, y; /* guess what */
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index dd4580cb57e0..7d06105763d4 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -859,7 +859,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
859 info ("udev is NULL."); 859 info ("udev is NULL.");
860 } 860 }
861 861
862 /* allocate memory for our device state and intialize it */ 862 /* allocate memory for our device state and initialize it */
863 863
864 dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL); 864 dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL);
865 865
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index a45ea7c97356..f6bc6b3b333c 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -4071,6 +4071,9 @@ static const struct usb_device_id products [] = {
4071 USB_DEVICE (0x8086, 0x07d3), // "blob" bootloader 4071 USB_DEVICE (0x8086, 0x07d3), // "blob" bootloader
4072 .driver_info = (unsigned long) &blob_info, 4072 .driver_info = (unsigned long) &blob_info,
4073}, { 4073}, {
4074 USB_DEVICE (0x22b8, 0x600c), // USBNET Motorola E680
4075 .driver_info = (unsigned long) &linuxdev_info,
4076}, {
4074 // Linux Ethernet/RNDIS gadget on pxa210/25x/26x 4077 // Linux Ethernet/RNDIS gadget on pxa210/25x/26x
4075 // e.g. Gumstix, current OpenZaurus, ... 4078 // e.g. Gumstix, current OpenZaurus, ...
4076 USB_DEVICE_VER (0x0525, 0xa4a2, 0x0203, 0x0203), 4079 USB_DEVICE_VER (0x0525, 0xa4a2, 0x0203, 0x0203),
diff --git a/drivers/usb/net/zd1201.c b/drivers/usb/net/zd1201.c
index f98cb2af024e..341ae5f732dd 100644
--- a/drivers/usb/net/zd1201.c
+++ b/drivers/usb/net/zd1201.c
@@ -183,7 +183,7 @@ static void zd1201_usbtx(struct urb *urb, struct pt_regs *regs)
183 return; 183 return;
184} 184}
185 185
186/* Incomming data */ 186/* Incoming data */
187static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs) 187static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs)
188{ 188{
189 struct zd1201 *zd = urb->context; 189 struct zd1201 *zd = urb->context;
@@ -772,7 +772,7 @@ static int zd1201_net_stop(struct net_device *dev)
772/* 772/*
773 RFC 1042 encapsulates Ethernet frames in 802.11 frames 773 RFC 1042 encapsulates Ethernet frames in 802.11 frames
774 by prefixing them with 0xaa, 0xaa, 0x03) followed by a SNAP OID of 0 774 by prefixing them with 0xaa, 0xaa, 0x03) followed by a SNAP OID of 0
775 (0x00, 0x00, 0x00). Zd requires an additionnal padding, copy 775 (0x00, 0x00, 0x00). Zd requires an additional padding, copy
776 of ethernet addresses, length of the standard RFC 1042 packet 776 of ethernet addresses, length of the standard RFC 1042 packet
777 and a command byte (which is nul for tx). 777 and a command byte (which is nul for tx).
778 778
@@ -1098,7 +1098,7 @@ static int zd1201_get_range(struct net_device *dev,
1098 1098
1099/* Little bit of magic here: we only get the quality if we poll 1099/* Little bit of magic here: we only get the quality if we poll
1100 * for it, and we never get an actual request to trigger such 1100 * for it, and we never get an actual request to trigger such
1101 * a poll. Therefore we 'asume' that the user will soon ask for 1101 * a poll. Therefore we 'assume' that the user will soon ask for
1102 * the stats after asking the bssid. 1102 * the stats after asking the bssid.
1103 */ 1103 */
1104static int zd1201_get_wap(struct net_device *dev, 1104static int zd1201_get_wap(struct net_device *dev,
@@ -1108,7 +1108,7 @@ static int zd1201_get_wap(struct net_device *dev,
1108 unsigned char buffer[6]; 1108 unsigned char buffer[6];
1109 1109
1110 if (!zd1201_getconfig(zd, ZD1201_RID_COMMSQUALITY, buffer, 6)) { 1110 if (!zd1201_getconfig(zd, ZD1201_RID_COMMSQUALITY, buffer, 6)) {
1111 /* Unfortunatly the quality and noise reported is useless. 1111 /* Unfortunately the quality and noise reported is useless.
1112 they seem to be accumulators that increase until you 1112 they seem to be accumulators that increase until you
1113 read them, unless we poll on a fixed interval we can't 1113 read them, unless we poll on a fixed interval we can't
1114 use them 1114 use them
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig
index 0c4aa00bb39d..bc798edf0358 100644
--- a/drivers/usb/serial/Kconfig
+++ b/drivers/usb/serial/Kconfig
@@ -53,6 +53,15 @@ config USB_SERIAL_GENERIC
53 support" be compiled as a module for this driver to be used 53 support" be compiled as a module for this driver to be used
54 properly. 54 properly.
55 55
56config USB_SERIAL_AIRPRIME
57 tristate "USB AirPrime CDMA Wireless Driver"
58 depends on USB_SERIAL
59 help
60 Say Y here if you want to use a AirPrime CDMA Wireless PC card.
61
62 To compile this driver as a module, choose M here: the
63 module will be called airprime.
64
56config USB_SERIAL_BELKIN 65config USB_SERIAL_BELKIN
57 tristate "USB Belkin and Peracom Single Port Serial Driver" 66 tristate "USB Belkin and Peracom Single Port Serial Driver"
58 depends on USB_SERIAL 67 depends on USB_SERIAL
diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile
index b0aac47d1959..d56ff6d86cce 100644
--- a/drivers/usb/serial/Makefile
+++ b/drivers/usb/serial/Makefile
@@ -11,6 +11,7 @@ usbserial-obj-$(CONFIG_USB_EZUSB) += ezusb.o
11 11
12usbserial-objs := usb-serial.o generic.o bus.o $(usbserial-obj-y) 12usbserial-objs := usb-serial.o generic.o bus.o $(usbserial-obj-y)
13 13
14obj-$(CONFIG_USB_SERIAL_AIRPRIME) += airprime.o
14obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o 15obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o
15obj-$(CONFIG_USB_SERIAL_CP2101) += cp2101.o 16obj-$(CONFIG_USB_SERIAL_CP2101) += cp2101.o
16obj-$(CONFIG_USB_SERIAL_CYBERJACK) += cyberjack.o 17obj-$(CONFIG_USB_SERIAL_CYBERJACK) += cyberjack.o
diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c
new file mode 100644
index 000000000000..a4ce0008d69b
--- /dev/null
+++ b/drivers/usb/serial/airprime.c
@@ -0,0 +1,63 @@
1/*
2 * AirPrime CDMA Wireless Serial USB driver
3 *
4 * Copyright (C) 2005 Greg Kroah-Hartman <gregkh@suse.de>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License version
8 * 2 as published by the Free Software Foundation.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/tty.h>
14#include <linux/module.h>
15#include <linux/usb.h>
16#include "usb-serial.h"
17
18static struct usb_device_id id_table [] = {
19 { USB_DEVICE(0xf3d, 0x0112) },
20 { },
21};
22MODULE_DEVICE_TABLE(usb, id_table);
23
24static struct usb_driver airprime_driver = {
25 .owner = THIS_MODULE,
26 .name = "airprime",
27 .probe = usb_serial_probe,
28 .disconnect = usb_serial_disconnect,
29 .id_table = id_table,
30};
31
32static struct usb_serial_device_type airprime_device = {
33 .owner = THIS_MODULE,
34 .name = "airprime",
35 .id_table = id_table,
36 .num_interrupt_in = NUM_DONT_CARE,
37 .num_bulk_in = NUM_DONT_CARE,
38 .num_bulk_out = NUM_DONT_CARE,
39 .num_ports = 1,
40};
41
42static int __init airprime_init(void)
43{
44 int retval;
45
46 retval = usb_serial_register(&airprime_device);
47 if (retval)
48 return retval;
49 retval = usb_register(&airprime_driver);
50 if (retval)
51 usb_serial_deregister(&airprime_device);
52 return retval;
53}
54
55static void __exit airprime_exit(void)
56{
57 usb_deregister(&airprime_driver);
58 usb_serial_deregister(&airprime_device);
59}
60
61module_init(airprime_init);
62module_exit(airprime_exit);
63MODULE_LICENSE("GPL");
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index d165f42d560d..f34a9bb6a219 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -16,6 +16,14 @@
16 * See http://geocities.com/i0xox0i for information on this driver and the 16 * See http://geocities.com/i0xox0i for information on this driver and the
17 * earthmate usb device. 17 * earthmate usb device.
18 * 18 *
19 * Lonnie Mendez <dignome@gmail.com>
20 * 4-29-2005
21 * Fixed problem where setting or retreiving the serial config would fail with
22 * EPIPE. Removed CRTS toggling so the driver behaves more like other usbserial
23 * adapters. Issued new interval of 1ms instead of the default 10ms. As a
24 * result, transfer speed has been substantially increased. From avg. 850bps to
25 * avg. 3300bps. initial termios has also been modified. Cleaned up code and
26 * formatting issues so it is more readable. Replaced the C++ style comments.
19 * 27 *
20 * Lonnie Mendez <dignome@gmail.com> 28 * Lonnie Mendez <dignome@gmail.com>
21 * 12-15-2004 29 * 12-15-2004
@@ -32,12 +40,6 @@
32 * 10-2003 40 * 10-2003
33 * Driver first released. 41 * Driver first released.
34 * 42 *
35 *
36 * Long Term TODO:
37 * Improve transfer speeds - both read/write are somewhat slow
38 * at this point.
39 * Improve debugging. Show modem line status with debug output and
40 * implement filtering for certain data as a module parameter.
41 */ 43 */
42 44
43/* Thanks to Neil Whelchel for writing the first cypress m8 implementation for linux. */ 45/* Thanks to Neil Whelchel for writing the first cypress m8 implementation for linux. */
@@ -72,11 +74,12 @@
72 static int debug; 74 static int debug;
73#endif 75#endif
74static int stats; 76static int stats;
77static int interval;
75 78
76/* 79/*
77 * Version Information 80 * Version Information
78 */ 81 */
79#define DRIVER_VERSION "v1.08" 82#define DRIVER_VERSION "v1.09"
80#define DRIVER_AUTHOR "Lonnie Mendez <dignome@gmail.com>, Neil Whelchel <koyama@firstlight.net>" 83#define DRIVER_AUTHOR "Lonnie Mendez <dignome@gmail.com>, Neil Whelchel <koyama@firstlight.net>"
81#define DRIVER_DESC "Cypress USB to Serial Driver" 84#define DRIVER_DESC "Cypress USB to Serial Driver"
82 85
@@ -130,7 +133,6 @@ struct cypress_private {
130 char prev_status, diff_status; /* used for TIOCMIWAIT */ 133 char prev_status, diff_status; /* used for TIOCMIWAIT */
131 /* we pass a pointer to this as the arguement sent to cypress_set_termios old_termios */ 134 /* we pass a pointer to this as the arguement sent to cypress_set_termios old_termios */
132 struct termios tmp_termios; /* stores the old termios settings */ 135 struct termios tmp_termios; /* stores the old termios settings */
133 char calledfromopen; /* used when issuing lines on open - fixes rts drop bug */
134}; 136};
135 137
136/* write buffer structure */ 138/* write buffer structure */
@@ -168,10 +170,8 @@ static void cypress_buf_free(struct cypress_buf *cb);
168static void cypress_buf_clear(struct cypress_buf *cb); 170static void cypress_buf_clear(struct cypress_buf *cb);
169static unsigned int cypress_buf_data_avail(struct cypress_buf *cb); 171static unsigned int cypress_buf_data_avail(struct cypress_buf *cb);
170static unsigned int cypress_buf_space_avail(struct cypress_buf *cb); 172static unsigned int cypress_buf_space_avail(struct cypress_buf *cb);
171static unsigned int cypress_buf_put(struct cypress_buf *cb, const char *buf, 173static unsigned int cypress_buf_put(struct cypress_buf *cb, const char *buf, unsigned int count);
172 unsigned int count); 174static unsigned int cypress_buf_get(struct cypress_buf *cb, char *buf, unsigned int count);
173static unsigned int cypress_buf_get(struct cypress_buf *cb, char *buf,
174 unsigned int count);
175 175
176 176
177static struct usb_serial_device_type cypress_earthmate_device = { 177static struct usb_serial_device_type cypress_earthmate_device = {
@@ -234,14 +234,13 @@ static struct usb_serial_device_type cypress_hidcom_device = {
234 *****************************************************************************/ 234 *****************************************************************************/
235 235
236 236
237/* This function can either set or retreive the current serial line settings */ 237/* This function can either set or retrieve the current serial line settings */
238static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_mask, int data_bits, int stop_bits, 238static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_mask, int data_bits, int stop_bits,
239 int parity_enable, int parity_type, int reset, int cypress_request_type) 239 int parity_enable, int parity_type, int reset, int cypress_request_type)
240{ 240{
241 int i, n_baud_rate = 0, retval = 0; 241 int new_baudrate = 0, retval = 0, tries = 0;
242 struct cypress_private *priv; 242 struct cypress_private *priv;
243 __u8 feature_buffer[5]; 243 __u8 feature_buffer[8];
244 __u8 config;
245 unsigned long flags; 244 unsigned long flags;
246 245
247 dbg("%s", __FUNCTION__); 246 dbg("%s", __FUNCTION__);
@@ -256,7 +255,8 @@ static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_m
256 * of 57600bps (I have no idea whether DeLorme chose to use the general purpose 255 * of 57600bps (I have no idea whether DeLorme chose to use the general purpose
257 * firmware or not), if you need to modify this speed setting for your own 256 * firmware or not), if you need to modify this speed setting for your own
258 * project please add your own chiptype and modify the code likewise. The 257 * project please add your own chiptype and modify the code likewise. The
259 * Cypress HID->COM device will work successfully up to 115200bps. 258 * Cypress HID->COM device will work successfully up to 115200bps (but the
259 * actual throughput is around 3kBps).
260 */ 260 */
261 if (baud_mask != priv->cbr_mask) { 261 if (baud_mask != priv->cbr_mask) {
262 dbg("%s - baud rate is changing", __FUNCTION__); 262 dbg("%s - baud rate is changing", __FUNCTION__);
@@ -265,109 +265,114 @@ static int cypress_serial_control (struct usb_serial_port *port, unsigned baud_m
265 * but are not used with NMEA and SiRF protocols */ 265 * but are not used with NMEA and SiRF protocols */
266 266
267 if ( (baud_mask == B300) || (baud_mask == B600) ) { 267 if ( (baud_mask == B300) || (baud_mask == B600) ) {
268 err("%s - failed setting baud rate, unsupported speed (default to 4800)", 268 err("%s - failed setting baud rate, unsupported speed",
269 __FUNCTION__); 269 __FUNCTION__);
270 n_baud_rate = 4800; 270 new_baudrate = priv->baud_rate;
271 } else if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) { 271 } else if ( (new_baudrate = mask_to_rate(baud_mask)) == -1) {
272 err("%s - failed setting baud rate, unsupported speed (default to 4800)", 272 err("%s - failed setting baud rate, unsupported speed",
273 __FUNCTION__); 273 __FUNCTION__);
274 n_baud_rate = 4800; 274 new_baudrate = priv->baud_rate;
275 } 275 }
276 } else if (priv->chiptype == CT_CYPHIDCOM) { 276 } else if (priv->chiptype == CT_CYPHIDCOM) {
277 if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) { 277 if ( (new_baudrate = mask_to_rate(baud_mask)) == -1) {
278 err("%s - failed setting baud rate, unsupported speed (default to 4800)", 278 err("%s - failed setting baud rate, unsupported speed",
279 __FUNCTION__); 279 __FUNCTION__);
280 n_baud_rate = 4800; 280 new_baudrate = priv->baud_rate;
281 } 281 }
282 } else if (priv->chiptype == CT_GENERIC) { 282 } else if (priv->chiptype == CT_GENERIC) {
283 if ( (n_baud_rate = mask_to_rate(baud_mask)) == -1) { 283 if ( (new_baudrate = mask_to_rate(baud_mask)) == -1) {
284 err("%s - failed setting baud rate, unsupported speed (default to 4800)", 284 err("%s - failed setting baud rate, unsupported speed",
285 __FUNCTION__); 285 __FUNCTION__);
286 n_baud_rate = 4800; 286 new_baudrate = priv->baud_rate;
287 } 287 }
288 } else { 288 } else {
289 info("%s - please define your chiptype, using 4800bps default", __FUNCTION__); 289 info("%s - please define your chiptype", __FUNCTION__);
290 n_baud_rate = 4800; 290 new_baudrate = priv->baud_rate;
291 } 291 }
292 } else { /* baud rate not changing, keep the old */ 292 } else { /* baud rate not changing, keep the old */
293 n_baud_rate = priv->baud_rate; 293 new_baudrate = priv->baud_rate;
294 } 294 }
295 dbg("%s - baud rate is being sent as %d", __FUNCTION__, n_baud_rate); 295 dbg("%s - baud rate is being sent as %d", __FUNCTION__, new_baudrate);
296
297 296
298 /* 297 memset(feature_buffer, 0, 8);
299 * This algorithm accredited to Jiang Jay Zhang... thanks for all the help! 298 /* fill the feature_buffer with new configuration */
300 */ 299 *((u_int32_t *)feature_buffer) = new_baudrate;
301 for (i = 0; i < 4; ++i) {
302 feature_buffer[i] = ( n_baud_rate >> (i*8) & 0xFF );
303 }
304 300
305 config = 0; // reset config byte 301 feature_buffer[4] |= data_bits; /* assign data bits in 2 bit space ( max 3 ) */
306 config |= data_bits; // assign data bits in 2 bit space ( max 3 )
307 /* 1 bit gap */ 302 /* 1 bit gap */
308 config |= (stop_bits << 3); // assign stop bits in 1 bit space 303 feature_buffer[4] |= (stop_bits << 3); /* assign stop bits in 1 bit space */
309 config |= (parity_enable << 4); // assign parity flag in 1 bit space 304 feature_buffer[4] |= (parity_enable << 4); /* assign parity flag in 1 bit space */
310 config |= (parity_type << 5); // assign parity type in 1 bit space 305 feature_buffer[4] |= (parity_type << 5); /* assign parity type in 1 bit space */
311 /* 1 bit gap */ 306 /* 1 bit gap */
312 config |= (reset << 7); // assign reset at end of byte, 1 bit space 307 feature_buffer[4] |= (reset << 7); /* assign reset at end of byte, 1 bit space */
313
314 feature_buffer[4] = config;
315 308
316 dbg("%s - device is being sent this feature report:", __FUNCTION__); 309 dbg("%s - device is being sent this feature report:", __FUNCTION__);
317 dbg("%s - %02X - %02X - %02X - %02X - %02X", __FUNCTION__, feature_buffer[0], feature_buffer[1], 310 dbg("%s - %02X - %02X - %02X - %02X - %02X", __FUNCTION__, feature_buffer[0], feature_buffer[1],
318 feature_buffer[2], feature_buffer[3], feature_buffer[4]); 311 feature_buffer[2], feature_buffer[3], feature_buffer[4]);
319 312
313 do {
320 retval = usb_control_msg (port->serial->dev, usb_sndctrlpipe(port->serial->dev, 0), 314 retval = usb_control_msg (port->serial->dev, usb_sndctrlpipe(port->serial->dev, 0),
321 HID_REQ_SET_REPORT, USB_DIR_OUT | USB_RECIP_INTERFACE | USB_TYPE_CLASS, 315 HID_REQ_SET_REPORT, USB_DIR_OUT | USB_RECIP_INTERFACE | USB_TYPE_CLASS,
322 0x0300, 0, feature_buffer, 5, 500); 316 0x0300, 0, feature_buffer, 8, 500);
317
318 if (tries++ >= 3)
319 break;
323 320
324 if (retval != 5) 321 if (retval == EPIPE)
322 usb_clear_halt(port->serial->dev, 0x00);
323 } while (retval != 8 && retval != ENODEV);
324
325 if (retval != 8)
325 err("%s - failed sending serial line settings - %d", __FUNCTION__, retval); 326 err("%s - failed sending serial line settings - %d", __FUNCTION__, retval);
326 else { 327 else {
327 spin_lock_irqsave(&priv->lock, flags); 328 spin_lock_irqsave(&priv->lock, flags);
328 priv->baud_rate = n_baud_rate; 329 priv->baud_rate = new_baudrate;
329 priv->cbr_mask = baud_mask; 330 priv->cbr_mask = baud_mask;
330 priv->current_config = config; 331 priv->current_config = feature_buffer[4];
331 ++priv->cmd_count;
332 spin_unlock_irqrestore(&priv->lock, flags); 332 spin_unlock_irqrestore(&priv->lock, flags);
333 } 333 }
334 break; 334 break;
335 case CYPRESS_GET_CONFIG: 335 case CYPRESS_GET_CONFIG:
336 dbg("%s - retreiving serial line settings", __FUNCTION__); 336 dbg("%s - retreiving serial line settings", __FUNCTION__);
337 /* reset values in feature buffer */ 337 /* set initial values in feature buffer */
338 memset(feature_buffer, 0, 5); 338 memset(feature_buffer, 0, 8);
339 339
340 do {
340 retval = usb_control_msg (port->serial->dev, usb_rcvctrlpipe(port->serial->dev, 0), 341 retval = usb_control_msg (port->serial->dev, usb_rcvctrlpipe(port->serial->dev, 0),
341 HID_REQ_GET_REPORT, USB_DIR_IN | USB_RECIP_INTERFACE | USB_TYPE_CLASS, 342 HID_REQ_GET_REPORT, USB_DIR_IN | USB_RECIP_INTERFACE | USB_TYPE_CLASS,
342 0x0300, 0, feature_buffer, 5, 500); 343 0x0300, 0, feature_buffer, 8, 500);
344
345 if (tries++ >= 3)
346 break;
347
348 if (retval == EPIPE)
349 usb_clear_halt(port->serial->dev, 0x00);
350 } while (retval != 5 && retval != ENODEV);
351
343 if (retval != 5) { 352 if (retval != 5) {
344 err("%s - failed to retreive serial line settings - %d", __FUNCTION__, retval); 353 err("%s - failed to retreive serial line settings - %d", __FUNCTION__, retval);
345 return retval; 354 return retval;
346 } else { 355 } else {
347 spin_lock_irqsave(&priv->lock, flags); 356 spin_lock_irqsave(&priv->lock, flags);
357
348 /* store the config in one byte, and later use bit masks to check values */ 358 /* store the config in one byte, and later use bit masks to check values */
349 priv->current_config = feature_buffer[4]; 359 priv->current_config = feature_buffer[4];
350 /* reverse the process above to get the baud_mask value */ 360 priv->baud_rate = *((u_int32_t *)feature_buffer);
351 n_baud_rate = 0; // reset bits
352 for (i = 0; i < 4; ++i) {
353 n_baud_rate |= ( feature_buffer[i] << (i*8) );
354 }
355 361
356 priv->baud_rate = n_baud_rate; 362 if ( (priv->cbr_mask = rate_to_mask(priv->baud_rate)) == 0x40)
357 if ( (priv->cbr_mask = rate_to_mask(n_baud_rate)) == 0x40)
358 dbg("%s - failed setting the baud mask (not defined)", __FUNCTION__); 363 dbg("%s - failed setting the baud mask (not defined)", __FUNCTION__);
359 ++priv->cmd_count;
360 spin_unlock_irqrestore(&priv->lock, flags); 364 spin_unlock_irqrestore(&priv->lock, flags);
361 } 365 }
362 break;
363 default:
364 err("%s - unsupported serial control command issued", __FUNCTION__);
365 } 366 }
367 spin_lock_irqsave(&priv->lock, flags);
368 ++priv->cmd_count;
369 spin_unlock_irqrestore(&priv->lock, flags);
370
366 return retval; 371 return retval;
367} /* cypress_serial_control */ 372} /* cypress_serial_control */
368 373
369 374
370/* given a baud mask, it will return speed on success */ 375/* given a baud mask, it will return integer baud on success */
371static int mask_to_rate (unsigned mask) 376static int mask_to_rate (unsigned mask)
372{ 377{
373 int rate; 378 int rate;
@@ -438,11 +443,12 @@ static int generic_startup (struct usb_serial *serial)
438 443
439 usb_reset_configuration (serial->dev); 444 usb_reset_configuration (serial->dev);
440 445
446 interval = 1;
441 priv->cmd_ctrl = 0; 447 priv->cmd_ctrl = 0;
442 priv->line_control = 0; 448 priv->line_control = 0;
443 priv->termios_initialized = 0; 449 priv->termios_initialized = 0;
444 priv->calledfromopen = 0;
445 priv->rx_flags = 0; 450 priv->rx_flags = 0;
451 priv->cbr_mask = B300;
446 usb_set_serial_port_data(serial->port[0], priv); 452 usb_set_serial_port_data(serial->port[0], priv);
447 453
448 return (0); 454 return (0);
@@ -513,7 +519,6 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
513 dbg("%s - port %d", __FUNCTION__, port->number); 519 dbg("%s - port %d", __FUNCTION__, port->number);
514 520
515 /* clear halts before open */ 521 /* clear halts before open */
516 usb_clear_halt(serial->dev, 0x00);
517 usb_clear_halt(serial->dev, 0x81); 522 usb_clear_halt(serial->dev, 0x81);
518 usb_clear_halt(serial->dev, 0x02); 523 usb_clear_halt(serial->dev, 0x02);
519 524
@@ -531,7 +536,6 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
531 /* raise both lines and set termios */ 536 /* raise both lines and set termios */
532 spin_lock_irqsave(&priv->lock, flags); 537 spin_lock_irqsave(&priv->lock, flags);
533 priv->line_control = CONTROL_DTR | CONTROL_RTS; 538 priv->line_control = CONTROL_DTR | CONTROL_RTS;
534 priv->calledfromopen = 1;
535 priv->cmd_ctrl = 1; 539 priv->cmd_ctrl = 1;
536 spin_unlock_irqrestore(&priv->lock, flags); 540 spin_unlock_irqrestore(&priv->lock, flags);
537 result = cypress_write(port, NULL, 0); 541 result = cypress_write(port, NULL, 0);
@@ -553,7 +557,7 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp)
553 usb_fill_int_urb(port->interrupt_in_urb, serial->dev, 557 usb_fill_int_urb(port->interrupt_in_urb, serial->dev,
554 usb_rcvintpipe(serial->dev, port->interrupt_in_endpointAddress), 558 usb_rcvintpipe(serial->dev, port->interrupt_in_endpointAddress),
555 port->interrupt_in_urb->transfer_buffer, port->interrupt_in_urb->transfer_buffer_length, 559 port->interrupt_in_urb->transfer_buffer, port->interrupt_in_urb->transfer_buffer_length,
556 cypress_read_int_callback, port, port->interrupt_in_urb->interval); 560 cypress_read_int_callback, port, interval);
557 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 561 result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
558 562
559 if (result){ 563 if (result){
@@ -680,12 +684,12 @@ static void cypress_send(struct usb_serial_port *port)
680 spin_lock_irqsave(&priv->lock, flags); 684 spin_lock_irqsave(&priv->lock, flags);
681 switch (port->interrupt_out_size) { 685 switch (port->interrupt_out_size) {
682 case 32: 686 case 32:
683 // this is for the CY7C64013... 687 /* this is for the CY7C64013... */
684 offset = 2; 688 offset = 2;
685 port->interrupt_out_buffer[0] = priv->line_control; 689 port->interrupt_out_buffer[0] = priv->line_control;
686 break; 690 break;
687 case 8: 691 case 8:
688 // this is for the CY7C63743... 692 /* this is for the CY7C63743... */
689 offset = 1; 693 offset = 1;
690 port->interrupt_out_buffer[0] = priv->line_control; 694 port->interrupt_out_buffer[0] = priv->line_control;
691 break; 695 break;
@@ -738,6 +742,7 @@ send:
738 742
739 port->interrupt_out_urb->transfer_buffer_length = actual_size; 743 port->interrupt_out_urb->transfer_buffer_length = actual_size;
740 port->interrupt_out_urb->dev = port->serial->dev; 744 port->interrupt_out_urb->dev = port->serial->dev;
745 port->interrupt_out_urb->interval = interval;
741 result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC); 746 result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC);
742 if (result) { 747 if (result) {
743 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, 748 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__,
@@ -910,7 +915,7 @@ static void cypress_set_termios (struct usb_serial_port *port, struct termios *o
910 unsigned cflag, iflag, baud_mask; 915 unsigned cflag, iflag, baud_mask;
911 unsigned long flags; 916 unsigned long flags;
912 __u8 oldlines; 917 __u8 oldlines;
913 int linechange; 918 int linechange = 0;
914 919
915 dbg("%s - port %d", __FUNCTION__, port->number); 920 dbg("%s - port %d", __FUNCTION__, port->number);
916 921
@@ -996,15 +1001,7 @@ static void cypress_set_termios (struct usb_serial_port *port, struct termios *o
996 case B115200: dbg("%s - setting baud 115200bps", __FUNCTION__); break; 1001 case B115200: dbg("%s - setting baud 115200bps", __FUNCTION__); break;
997 default: dbg("%s - unknown masked baud rate", __FUNCTION__); 1002 default: dbg("%s - unknown masked baud rate", __FUNCTION__);
998 } 1003 }
999 priv->line_control |= CONTROL_DTR; 1004 priv->line_control = (CONTROL_DTR | CONTROL_RTS);
1000
1001 /* toggle CRTSCTS? - don't do this if being called from cypress_open */
1002 if (!priv->calledfromopen) {
1003 if (cflag & CRTSCTS)
1004 priv->line_control |= CONTROL_RTS;
1005 else
1006 priv->line_control &= ~CONTROL_RTS;
1007 }
1008 } 1005 }
1009 spin_unlock_irqrestore(&priv->lock, flags); 1006 spin_unlock_irqrestore(&priv->lock, flags);
1010 1007
@@ -1014,8 +1011,6 @@ static void cypress_set_termios (struct usb_serial_port *port, struct termios *o
1014 cypress_serial_control(port, baud_mask, data_bits, stop_bits, parity_enable, 1011 cypress_serial_control(port, baud_mask, data_bits, stop_bits, parity_enable,
1015 parity_type, 0, CYPRESS_SET_CONFIG); 1012 parity_type, 0, CYPRESS_SET_CONFIG);
1016 1013
1017 msleep(50); /* give some time between change and read (50ms) */
1018
1019 /* we perform a CYPRESS_GET_CONFIG so that the current settings are filled into the private structure 1014 /* we perform a CYPRESS_GET_CONFIG so that the current settings are filled into the private structure
1020 * this should confirm that all is working if it returns what we just set */ 1015 * this should confirm that all is working if it returns what we just set */
1021 cypress_serial_control(port, 0, 0, 0, 0, 0, 0, CYPRESS_GET_CONFIG); 1016 cypress_serial_control(port, 0, 0, 0, 0, 0, 0, CYPRESS_GET_CONFIG);
@@ -1031,7 +1026,6 @@ static void cypress_set_termios (struct usb_serial_port *port, struct termios *o
1031 dbg("Using custom termios settings for a baud rate of 4800bps."); 1026 dbg("Using custom termios settings for a baud rate of 4800bps.");
1032 /* define custom termios settings for NMEA protocol */ 1027 /* define custom termios settings for NMEA protocol */
1033 1028
1034
1035 tty->termios->c_iflag /* input modes - */ 1029 tty->termios->c_iflag /* input modes - */
1036 &= ~(IGNBRK /* disable ignore break */ 1030 &= ~(IGNBRK /* disable ignore break */
1037 | BRKINT /* disable break causes interrupt */ 1031 | BRKINT /* disable break causes interrupt */
@@ -1052,23 +1046,16 @@ static void cypress_set_termios (struct usb_serial_port *port, struct termios *o
1052 | ISIG /* disable interrupt, quit, and suspend special characters */ 1046 | ISIG /* disable interrupt, quit, and suspend special characters */
1053 | IEXTEN); /* disable non-POSIX special characters */ 1047 | IEXTEN); /* disable non-POSIX special characters */
1054 1048
1055 } else if (priv->chiptype == CT_CYPHIDCOM) { 1049 } /* CT_CYPHIDCOM: Application should handle this for device */
1056
1057 // Software app handling it for device...
1058 1050
1059 }
1060 linechange = (priv->line_control != oldlines); 1051 linechange = (priv->line_control != oldlines);
1061 spin_unlock_irqrestore(&priv->lock, flags); 1052 spin_unlock_irqrestore(&priv->lock, flags);
1062 1053
1063 /* if necessary, set lines */ 1054 /* if necessary, set lines */
1064 if (!priv->calledfromopen && linechange) { 1055 if (linechange) {
1065 priv->cmd_ctrl = 1; 1056 priv->cmd_ctrl = 1;
1066 cypress_write(port, NULL, 0); 1057 cypress_write(port, NULL, 0);
1067 } 1058 }
1068
1069 if (priv->calledfromopen)
1070 priv->calledfromopen = 0;
1071
1072} /* cypress_set_termios */ 1059} /* cypress_set_termios */
1073 1060
1074 1061
@@ -1164,7 +1151,7 @@ static void cypress_read_int_callback(struct urb *urb, struct pt_regs *regs)
1164 spin_lock_irqsave(&priv->lock, flags); 1151 spin_lock_irqsave(&priv->lock, flags);
1165 switch(urb->actual_length) { 1152 switch(urb->actual_length) {
1166 case 32: 1153 case 32:
1167 // This is for the CY7C64013... 1154 /* This is for the CY7C64013... */
1168 priv->current_status = data[0] & 0xF8; 1155 priv->current_status = data[0] & 0xF8;
1169 bytes = data[1]+2; 1156 bytes = data[1]+2;
1170 i=2; 1157 i=2;
@@ -1172,7 +1159,7 @@ static void cypress_read_int_callback(struct urb *urb, struct pt_regs *regs)
1172 havedata = 1; 1159 havedata = 1;
1173 break; 1160 break;
1174 case 8: 1161 case 8:
1175 // This is for the CY7C63743... 1162 /* This is for the CY7C63743... */
1176 priv->current_status = data[0] & 0xF8; 1163 priv->current_status = data[0] & 0xF8;
1177 bytes = (data[0] & 0x07)+1; 1164 bytes = (data[0] & 0x07)+1;
1178 i=1; 1165 i=1;
@@ -1245,7 +1232,7 @@ continue_read:
1245 port->interrupt_in_urb->transfer_buffer, 1232 port->interrupt_in_urb->transfer_buffer,
1246 port->interrupt_in_urb->transfer_buffer_length, 1233 port->interrupt_in_urb->transfer_buffer_length,
1247 cypress_read_int_callback, port, 1234 cypress_read_int_callback, port,
1248 port->interrupt_in_urb->interval); 1235 interval);
1249 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); 1236 result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
1250 if (result) 1237 if (result)
1251 dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); 1238 dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
@@ -1274,6 +1261,8 @@ static void cypress_write_int_callback(struct urb *urb, struct pt_regs *regs)
1274 dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); 1261 dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
1275 priv->write_urb_in_use = 0; 1262 priv->write_urb_in_use = 0;
1276 return; 1263 return;
1264 case -EPIPE: /* no break needed */
1265 usb_clear_halt(port->serial->dev, 0x02);
1277 default: 1266 default:
1278 /* error in the urb, so we have to resubmit it */ 1267 /* error in the urb, so we have to resubmit it */
1279 dbg("%s - Overflow in write", __FUNCTION__); 1268 dbg("%s - Overflow in write", __FUNCTION__);
@@ -1535,3 +1524,5 @@ module_param(debug, bool, S_IRUGO | S_IWUSR);
1535MODULE_PARM_DESC(debug, "Debug enabled or not"); 1524MODULE_PARM_DESC(debug, "Debug enabled or not");
1536module_param(stats, bool, S_IRUGO | S_IWUSR); 1525module_param(stats, bool, S_IRUGO | S_IWUSR);
1537MODULE_PARM_DESC(stats, "Enable statistics or not"); 1526MODULE_PARM_DESC(stats, "Enable statistics or not");
1527module_param(interval, int, S_IRUGO | S_IWUSR);
1528MODULE_PARM_DESC(interval, "Overrides interrupt interval");
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 4c788c767a97..52394f08a947 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -76,7 +76,7 @@
76 * Defererence pointers after any paranoid checks, not before. 76 * Defererence pointers after any paranoid checks, not before.
77 * 77 *
78 * (21/Jun/2003) Erik Nygren 78 * (21/Jun/2003) Erik Nygren
79 * Added support for Home Electronics Tira-1 IR tranceiver using FT232BM chip. 79 * Added support for Home Electronics Tira-1 IR transceiver using FT232BM chip.
80 * See <http://www.home-electro.com/tira1.htm>. Only operates properly 80 * See <http://www.home-electro.com/tira1.htm>. Only operates properly
81 * at 100000 and RTS-CTS, so set custom divisor mode on startup. 81 * at 100000 and RTS-CTS, so set custom divisor mode on startup.
82 * Also force the Tira-1 and USB-UIRT to only use their custom baud rates. 82 * Also force the Tira-1 and USB-UIRT to only use their custom baud rates.
@@ -91,7 +91,7 @@
91 * Minor whitespace and comment changes. 91 * Minor whitespace and comment changes.
92 * 92 *
93 * (12/Jun/2003) David Norwood 93 * (12/Jun/2003) David Norwood
94 * Added support for USB-UIRT IR tranceiver using 8U232AM chip. 94 * Added support for USB-UIRT IR transceiver using 8U232AM chip.
95 * See <http://home.earthlink.net/~jrhees/USBUIRT/index.htm>. Only 95 * See <http://home.earthlink.net/~jrhees/USBUIRT/index.htm>. Only
96 * operates properly at 312500, so set custom divisor mode on startup. 96 * operates properly at 312500, so set custom divisor mode on startup.
97 * 97 *
@@ -272,6 +272,7 @@ static int debug;
272 272
273static struct usb_device_id id_table_sio [] = { 273static struct usb_device_id id_table_sio [] = {
274 { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) }, 274 { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
275 { USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) },
275 { } /* Terminating entry */ 276 { } /* Terminating entry */
276}; 277};
277 278
@@ -296,7 +297,6 @@ static struct usb_device_id id_table_8U232AM [] = {
296 { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0, 0x3ff) }, 297 { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0, 0x3ff) },
297 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0, 0x3ff) }, 298 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0, 0x3ff) },
298 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0, 0x3ff) }, 299 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0, 0x3ff) },
299 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID, 0, 0x3ff) },
300 { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0, 0x3ff) }, 300 { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0, 0x3ff) },
301 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, 301 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
302 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) }, 302 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
@@ -369,11 +369,14 @@ static struct usb_device_id id_table_8U232AM [] = {
369 { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0, 0x3ff) }, 369 { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0, 0x3ff) },
370 { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0, 0x3ff) }, 370 { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0, 0x3ff) },
371 { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0, 0x3ff) }, 371 { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0, 0x3ff) },
372 { USB_DEVICE_VER(FTDI_RM_VID, FTDI_RMCANVIEW_PID, 0, 0x3ff) }, 372 { USB_DEVICE_VER(FTDI_VID, FTDI_RM_CANVIEW_PID, 0, 0x3ff) },
373 { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0, 0x3ff) }, 373 { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0, 0x3ff) },
374 { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0, 0x3ff) }, 374 { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0, 0x3ff) },
375 { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0, 0x3ff) }, 375 { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0, 0x3ff) },
376 { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0, 0x3ff) }, 376 { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0, 0x3ff) },
377 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_0_PID, 0, 0x3ff) },
378 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID, 0, 0x3ff) },
379 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID, 0, 0x3ff) },
377 { } /* Terminating entry */ 380 { } /* Terminating entry */
378}; 381};
379 382
@@ -382,7 +385,6 @@ static struct usb_device_id id_table_FT232BM [] = {
382 { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0x400, 0xffff) }, 385 { USB_DEVICE_VER(FTDI_VID, FTDI_IRTRANS_PID, 0x400, 0xffff) },
383 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0x400, 0xffff) }, 386 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_PID, 0x400, 0xffff) },
384 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0x400, 0xffff) }, 387 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_PID, 0x400, 0xffff) },
385 { USB_DEVICE_VER(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID, 0x400, 0xffff) },
386 { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0x400, 0xffff) }, 388 { USB_DEVICE_VER(FTDI_VID, FTDI_RELAIS_PID, 0x400, 0xffff) },
387 { USB_DEVICE_VER(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID, 0x400, 0xffff) }, 389 { USB_DEVICE_VER(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID, 0x400, 0xffff) },
388 { USB_DEVICE_VER(FTDI_VID, FTDI_XF_632_PID, 0x400, 0xffff) }, 390 { USB_DEVICE_VER(FTDI_VID, FTDI_XF_632_PID, 0x400, 0xffff) },
@@ -485,11 +487,15 @@ static struct usb_device_id id_table_FT232BM [] = {
485 { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0x400, 0xffff) }, 487 { USB_DEVICE_VER(INTREPID_VID, INTREPID_NEOVI_PID, 0x400, 0xffff) },
486 { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0x400, 0xffff) }, 488 { USB_DEVICE_VER(FALCOM_VID, FALCOM_TWIST_PID, 0x400, 0xffff) },
487 { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0x400, 0xffff) }, 489 { USB_DEVICE_VER(FTDI_VID, FTDI_SUUNTO_SPORTS_PID, 0x400, 0xffff) },
488 { USB_DEVICE_VER(FTDI_RM_VID, FTDI_RMCANVIEW_PID, 0x400, 0xffff) }, 490 { USB_DEVICE_VER(FTDI_VID, FTDI_RM_CANVIEW_PID, 0x400, 0xffff) },
489 { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0x400, 0xffff) }, 491 { USB_DEVICE_VER(BANDB_VID, BANDB_USOTL4_PID, 0x400, 0xffff) },
490 { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0x400, 0xffff) }, 492 { USB_DEVICE_VER(BANDB_VID, BANDB_USTL4_PID, 0x400, 0xffff) },
491 { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0x400, 0xffff) }, 493 { USB_DEVICE_VER(BANDB_VID, BANDB_USO9ML2_PID, 0x400, 0xffff) },
492 { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0x400, 0xffff) }, 494 { USB_DEVICE_VER(FTDI_VID, EVER_ECO_PRO_CDS, 0x400, 0xffff) },
495 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_0_PID, 0x400, 0xffff) },
496 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID, 0x400, 0xffff) },
497 { USB_DEVICE_VER(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID, 0x400, 0xffff) },
498 { USB_DEVICE_VER(FTDI_VID, FTDI_ACTIVE_ROBOTS_PID, 0x400, 0xffff) },
493 { } /* Terminating entry */ 499 { } /* Terminating entry */
494}; 500};
495 501
@@ -517,7 +523,6 @@ static struct usb_device_id id_table_combined [] = {
517 { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) }, 523 { USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
518 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) }, 524 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
519 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) }, 525 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
520 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_ALT_PID) },
521 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) }, 526 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) },
522 { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) }, 527 { USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },
523 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) }, 528 { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
@@ -596,6 +601,22 @@ static struct usb_device_id id_table_combined [] = {
596 { USB_DEVICE(FTDI_VID, PROTEGO_R2X0) }, 601 { USB_DEVICE(FTDI_VID, PROTEGO_R2X0) },
597 { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_3) }, 602 { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_3) },
598 { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_4) }, 603 { USB_DEVICE(FTDI_VID, PROTEGO_SPECIAL_4) },
604 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E808_PID, 0x400, 0xffff) },
605 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E809_PID, 0x400, 0xffff) },
606 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80A_PID, 0x400, 0xffff) },
607 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80B_PID, 0x400, 0xffff) },
608 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80C_PID, 0x400, 0xffff) },
609 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80D_PID, 0x400, 0xffff) },
610 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80E_PID, 0x400, 0xffff) },
611 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E80F_PID, 0x400, 0xffff) },
612 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E888_PID, 0x400, 0xffff) },
613 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E889_PID, 0x400, 0xffff) },
614 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88A_PID, 0x400, 0xffff) },
615 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88B_PID, 0x400, 0xffff) },
616 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88C_PID, 0x400, 0xffff) },
617 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88D_PID, 0x400, 0xffff) },
618 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88E_PID, 0x400, 0xffff) },
619 { USB_DEVICE_VER(FTDI_VID, FTDI_GUDEADS_E88F_PID, 0x400, 0xffff) },
599 { USB_DEVICE(FTDI_VID, FTDI_ELV_UO100_PID) }, 620 { USB_DEVICE(FTDI_VID, FTDI_ELV_UO100_PID) },
600 { USB_DEVICE_VER(FTDI_VID, LINX_SDMUSBQSS_PID, 0x400, 0xffff) }, 621 { USB_DEVICE_VER(FTDI_VID, LINX_SDMUSBQSS_PID, 0x400, 0xffff) },
601 { USB_DEVICE_VER(FTDI_VID, LINX_MASTERDEVEL2_PID, 0x400, 0xffff) }, 622 { USB_DEVICE_VER(FTDI_VID, LINX_MASTERDEVEL2_PID, 0x400, 0xffff) },
@@ -609,11 +630,16 @@ static struct usb_device_id id_table_combined [] = {
609 { USB_DEVICE(INTREPID_VID, INTREPID_NEOVI_PID) }, 630 { USB_DEVICE(INTREPID_VID, INTREPID_NEOVI_PID) },
610 { USB_DEVICE(FALCOM_VID, FALCOM_TWIST_PID) }, 631 { USB_DEVICE(FALCOM_VID, FALCOM_TWIST_PID) },
611 { USB_DEVICE(FTDI_VID, FTDI_SUUNTO_SPORTS_PID) }, 632 { USB_DEVICE(FTDI_VID, FTDI_SUUNTO_SPORTS_PID) },
612 { USB_DEVICE(FTDI_RM_VID, FTDI_RMCANVIEW_PID) }, 633 { USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) },
613 { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) }, 634 { USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) },
614 { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) }, 635 { USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) },
615 { USB_DEVICE(BANDB_VID, BANDB_USO9ML2_PID) }, 636 { USB_DEVICE(BANDB_VID, BANDB_USO9ML2_PID) },
616 { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) }, 637 { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) },
638 { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_0_PID) },
639 { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID) },
640 { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID) },
641 { USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) },
642 { USB_DEVICE_VER(FTDI_VID, FTDI_ACTIVE_ROBOTS_PID, 0x400, 0xffff) },
617 { } /* Terminating entry */ 643 { } /* Terminating entry */
618}; 644};
619 645
@@ -1457,10 +1483,10 @@ static int ftdi_FT2232C_startup (struct usb_serial *serial)
1457 inter = serial->interface->altsetting->desc.bInterfaceNumber; 1483 inter = serial->interface->altsetting->desc.bInterfaceNumber;
1458 1484
1459 if (inter) { 1485 if (inter) {
1460 priv->interface = INTERFACE_B; 1486 priv->interface = PIT_SIOB;
1461 } 1487 }
1462 else { 1488 else {
1463 priv->interface = INTERFACE_A; 1489 priv->interface = PIT_SIOA;
1464 } 1490 }
1465 priv->baud_base = 48000000 / 2; /* Would be / 16, but FT2232C supports multiple of 0.125 divisor fractions! */ 1491 priv->baud_base = 48000000 / 2; /* Would be / 16, but FT2232C supports multiple of 0.125 divisor fractions! */
1466 1492
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index be5d60bf90b9..a52bb13a9ce4 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -26,7 +26,6 @@
26#define FTDI_SIO_PID 0x8372 /* Product Id SIO application of 8U100AX */ 26#define FTDI_SIO_PID 0x8372 /* Product Id SIO application of 8U100AX */
27#define FTDI_8U232AM_PID 0x6001 /* Similar device to SIO above */ 27#define FTDI_8U232AM_PID 0x6001 /* Similar device to SIO above */
28#define FTDI_8U232AM_ALT_PID 0x6006 /* FTDI's alternate PID for above */ 28#define FTDI_8U232AM_ALT_PID 0x6006 /* FTDI's alternate PID for above */
29#define FTDI_8U232AM_ALT_ALT_PID 0xf3c0 /* FTDI's second alternate PID for above */
30#define FTDI_8U2232C_PID 0x6010 /* Dual channel device */ 29#define FTDI_8U2232C_PID 0x6010 /* Dual channel device */
31#define FTDI_RELAIS_PID 0xFA10 /* Relais device from Rudolf Gugler */ 30#define FTDI_RELAIS_PID 0xFA10 /* Relais device from Rudolf Gugler */
32#define FTDI_NF_RIC_VID 0x0DCD /* Vendor Id */ 31#define FTDI_NF_RIC_VID 0x0DCD /* Vendor Id */
@@ -137,7 +136,7 @@
137/* 136/*
138 * Home Electronics (www.home-electro.com) USB gadgets 137 * Home Electronics (www.home-electro.com) USB gadgets
139 */ 138 */
140#define FTDI_HE_TIRA1_PID 0xFA78 /* Tira-1 IR tranceiver */ 139#define FTDI_HE_TIRA1_PID 0xFA78 /* Tira-1 IR transceiver */
141 140
142/* USB-UIRT - An infrared receiver and transmitter using the 8U232AM chip */ 141/* USB-UIRT - An infrared receiver and transmitter using the 8U232AM chip */
143/* http://home.earthlink.net/~jrhees/USBUIRT/index.htm */ 142/* http://home.earthlink.net/~jrhees/USBUIRT/index.htm */
@@ -157,7 +156,8 @@
157 */ 156 */
158#define OCT_VID 0x0B39 /* OCT vendor ID */ 157#define OCT_VID 0x0B39 /* OCT vendor ID */
159/* Note: OCT US101 is also rebadged as Dick Smith Electronics (NZ) XH6381 */ 158/* Note: OCT US101 is also rebadged as Dick Smith Electronics (NZ) XH6381 */
160/* Also rebadged as SIIG Inc. model US2308 */ 159/* Also rebadged as Dick Smith Electronics (Aus) XH6451 */
160/* Also rebadged as SIIG Inc. model US2308 hardware version 1 */
161#define OCT_US101_PID 0x0421 /* OCT US101 USB to RS-232 */ 161#define OCT_US101_PID 0x0421 /* OCT US101 USB to RS-232 */
162 162
163/* an infrared receiver for user access control with IR tags */ 163/* an infrared receiver for user access control with IR tags */
@@ -236,10 +236,10 @@
236 236
237/* 237/*
238 * RM Michaelides CANview USB (http://www.rmcan.com) 238 * RM Michaelides CANview USB (http://www.rmcan.com)
239 * CAN filedbus interface adapter, addad by port GmbH www.port.de) 239 * CAN fieldbus interface adapter, added by port GmbH www.port.de)
240 * Ian Abbott changed the macro names for consistency.
240 */ 241 */
241#define FTDI_RM_VID 0x0403 /* Vendor Id */ 242#define FTDI_RM_CANVIEW_PID 0xfd60 /* Product Id */
242#define FTDI_RMCANVIEW_PID 0xfd60 /* Product Id */
243 243
244/* 244/*
245 * EVER Eco Pro UPS (http://www.ever.com.pl/) 245 * EVER Eco Pro UPS (http://www.ever.com.pl/)
@@ -247,6 +247,26 @@
247 247
248#define EVER_ECO_PRO_CDS 0xe520 /* RS-232 converter */ 248#define EVER_ECO_PRO_CDS 0xe520 /* RS-232 converter */
249 249
250/*
251 * 4N-GALAXY.DE PIDs for CAN-USB, USB-RS232, USB-RS422, USB-RS485,
252 * USB-TTY activ, USB-TTY passiv. Some PIDs are used by several devices
253 * and I'm not entirely sure which are used by which.
254 */
255#define FTDI_4N_GALAXY_DE_0_PID 0x8372
256#define FTDI_4N_GALAXY_DE_1_PID 0xF3C0
257#define FTDI_4N_GALAXY_DE_2_PID 0xF3C1
258
259/*
260 * Mobility Electronics products.
261 */
262#define MOBILITY_VID 0x1342
263#define MOBILITY_USB_SERIAL_PID 0x0202 /* EasiDock USB 200 serial */
264
265/*
266 * Active Robots product ids.
267 */
268#define FTDI_ACTIVE_ROBOTS_PID 0xE548 /* USB comms board */
269
250/* Commands */ 270/* Commands */
251#define FTDI_SIO_RESET 0 /* Reset the port */ 271#define FTDI_SIO_RESET 0 /* Reset the port */
252#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ 272#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */
@@ -259,10 +279,6 @@
259#define FTDI_SIO_SET_LATENCY_TIMER 9 /* Set the latency timer */ 279#define FTDI_SIO_SET_LATENCY_TIMER 9 /* Set the latency timer */
260#define FTDI_SIO_GET_LATENCY_TIMER 10 /* Get the latency timer */ 280#define FTDI_SIO_GET_LATENCY_TIMER 10 /* Get the latency timer */
261 281
262/* Port interface code for FT2232C */
263#define INTERFACE_A 1
264#define INTERFACE_B 2
265
266 282
267/* 283/*
268 * BmRequestType: 1100 0000b 284 * BmRequestType: 1100 0000b
diff --git a/drivers/usb/serial/io_usbvend.h b/drivers/usb/serial/io_usbvend.h
index 8c1fa5e722b1..f1804fd5a3dd 100644
--- a/drivers/usb/serial/io_usbvend.h
+++ b/drivers/usb/serial/io_usbvend.h
@@ -289,7 +289,7 @@
289// 289//
290 290
291// 291//
292// Edgeport Compatiblity Descriptor 292// Edgeport Compatibility Descriptor
293// 293//
294// This descriptor is only returned by Edgeport-compatible devices 294// This descriptor is only returned by Edgeport-compatible devices
295// supporting the EPiC spec. True ION devices do not return this 295// supporting the EPiC spec. True ION devices do not return this
diff --git a/drivers/usb/serial/keyspan_usa90msg.h b/drivers/usb/serial/keyspan_usa90msg.h
index dd935b62c1a8..86708ecd8735 100644
--- a/drivers/usb/serial/keyspan_usa90msg.h
+++ b/drivers/usb/serial/keyspan_usa90msg.h
@@ -19,7 +19,7 @@
19 19
20 This file is available under a BSD-style copyright 20 This file is available under a BSD-style copyright
21 21
22 2. The name of InnoSys Incorprated may not be used to endorse or promote 22 2. The name of InnoSys Incorporated may not be used to endorse or promote
23 products derived from this software without specific prior written 23 products derived from this software without specific prior written
24 permission. 24 permission.
25 25
diff --git a/drivers/usb/storage/debug.c b/drivers/usb/storage/debug.c
index d76483706bc9..5a9321705a74 100644
--- a/drivers/usb/storage/debug.c
+++ b/drivers/usb/storage/debug.c
@@ -47,6 +47,7 @@
47#include <linux/cdrom.h> 47#include <linux/cdrom.h>
48#include <scsi/scsi.h> 48#include <scsi/scsi.h>
49#include <scsi/scsi_cmnd.h> 49#include <scsi/scsi_cmnd.h>
50#include <scsi/scsi_dbg.h>
50 51
51#include "debug.h" 52#include "debug.h"
52#include "scsi.h" 53#include "scsi.h"
diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c
index 7eff03d9b041..f3b60288696c 100644
--- a/drivers/usb/storage/shuttle_usbat.c
+++ b/drivers/usb/storage/shuttle_usbat.c
@@ -786,7 +786,7 @@ static int usbat_flash_check_media(struct us_data *us,
786 if (rc != USB_STOR_XFER_GOOD) 786 if (rc != USB_STOR_XFER_GOOD)
787 return USB_STOR_TRANSPORT_ERROR; 787 return USB_STOR_TRANSPORT_ERROR;
788 788
789 // Check for media existance 789 // Check for media existence
790 rc = usbat_flash_check_media_present(uio); 790 rc = usbat_flash_check_media_present(uio);
791 if (rc == USBAT_FLASH_MEDIA_NONE) { 791 if (rc == USBAT_FLASH_MEDIA_NONE) {
792 info->sense_key = 0x02; 792 info->sense_key = 0x02;
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index bbda63c24c4d..d2891f475793 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1,5 +1,5 @@
1/* Driver for USB Mass Storage compliant devices 1/* Driver for USB Mass Storage compliant devices
2 * Ununsual Devices File 2 * Unusual Devices File
3 * 3 *
4 * $Id: unusual_devs.h,v 1.32 2002/02/25 02:41:24 mdharm Exp $ 4 * $Id: unusual_devs.h,v 1.32 2002/02/25 02:41:24 mdharm Exp $
5 * 5 *
@@ -48,6 +48,14 @@
48 * USB development list <linux-usb-devel@lists.sourceforge.net>. 48 * USB development list <linux-usb-devel@lists.sourceforge.net>.
49 */ 49 */
50 50
51/* patch submitted by Vivian Bregier <Vivian.Bregier@imag.fr>
52 */
53UNUSUAL_DEV( 0x03eb, 0x2002, 0x0100, 0x0100,
54 "ATMEL",
55 "SND1 Storage",
56 US_SC_DEVICE, US_PR_DEVICE, NULL,
57 US_FL_IGNORE_RESIDUE),
58
51UNUSUAL_DEV( 0x03ee, 0x6901, 0x0000, 0x0100, 59UNUSUAL_DEV( 0x03ee, 0x6901, 0x0000, 0x0100,
52 "Mitsumi", 60 "Mitsumi",
53 "USB FDD", 61 "USB FDD",
@@ -994,6 +1002,13 @@ UNUSUAL_DEV( 0x1019, 0x0c55, 0x0000, 0x9999,
994 US_SC_DEVICE, US_PR_DEVICE, usb_stor_ucr61s2b_init, 1002 US_SC_DEVICE, US_PR_DEVICE, usb_stor_ucr61s2b_init,
995 0 ), 1003 0 ),
996 1004
1005/* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */
1006UNUSUAL_DEV( 0x132b, 0x000b, 0x0001, 0x0001,
1007 "Minolta",
1008 "Dimage Z10",
1009 US_SC_DEVICE, US_PR_DEVICE, NULL,
1010 0 ),
1011
997/* Reported by Kotrla Vitezslav <kotrla@ceb.cz> */ 1012/* Reported by Kotrla Vitezslav <kotrla@ceb.cz> */
998UNUSUAL_DEV( 0x1370, 0x6828, 0x0110, 0x0110, 1013UNUSUAL_DEV( 0x1370, 0x6828, 0x0110, 0x0110,
999 "SWISSBIT", 1014 "SWISSBIT",
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index e04d3e8b2549..a9a618f2aa6a 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -1000,8 +1000,10 @@ static int i810_check_params(struct fb_var_screeninfo *var,
1000 1000
1001 if (fb_validate_mode(var, info)) { 1001 if (fb_validate_mode(var, info)) {
1002 if (fb_get_mode(FB_MAXTIMINGS, 0, var, info)) { 1002 if (fb_get_mode(FB_MAXTIMINGS, 0, var, info)) {
1003 int default_sync = (hsync1-HFMIN)|(hsync2-HFMAX) 1003 int default_sync = (info->monspecs.hfmin-HFMIN)
1004 |(vsync1-VFMIN)|(vsync2-VFMAX); 1004 |(info->monspecs.hfmax-HFMAX)
1005 |(info->monspecs.vfmin-VFMIN)
1006 |(info->monspecs.vfmax-VFMAX);
1005 printk("i810fb: invalid video mode%s\n", 1007 printk("i810fb: invalid video mode%s\n",
1006 default_sync ? "" : 1008 default_sync ? "" :
1007 ". Specifying vsyncN/hsyncN parameters may help"); 1009 ". Specifying vsyncN/hsyncN parameters may help");
diff --git a/fs/jfs/jfs_xtree.c b/fs/jfs/jfs_xtree.c
index 2c1f311914a1..31b34db4519e 100644
--- a/fs/jfs/jfs_xtree.c
+++ b/fs/jfs/jfs_xtree.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) International Business Machines Corp., 2000-2004 2 * Copyright (C) International Business Machines Corp., 2000-2005
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
@@ -688,7 +688,7 @@ static int xtSearch(struct inode *ip, s64 xoff, s64 *nextp,
688 /* search hit - internal page: 688 /* search hit - internal page:
689 * descend/search its child page 689 * descend/search its child page
690 */ 690 */
691 if (index < p->header.nextindex - 1) 691 if (index < le16_to_cpu(p->header.nextindex)-1)
692 next = offsetXAD(&p->xad[index + 1]); 692 next = offsetXAD(&p->xad[index + 1]);
693 goto next; 693 goto next;
694 } 694 }
@@ -705,7 +705,7 @@ static int xtSearch(struct inode *ip, s64 xoff, s64 *nextp,
705 * base is the smallest index with key (Kj) greater than 705 * base is the smallest index with key (Kj) greater than
706 * search key (K) and may be zero or maxentry index. 706 * search key (K) and may be zero or maxentry index.
707 */ 707 */
708 if (base < p->header.nextindex) 708 if (base < le16_to_cpu(p->header.nextindex))
709 next = offsetXAD(&p->xad[base]); 709 next = offsetXAD(&p->xad[base]);
710 /* 710 /*
711 * search miss - leaf page: 711 * search miss - leaf page:
diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h
index 4e0842b415aa..1a2c52a056fb 100644
--- a/include/asm-alpha/signal.h
+++ b/include/asm-alpha/signal.h
@@ -113,16 +113,7 @@ typedef unsigned long sigset_t;
113#define SIG_UNBLOCK 2 /* for unblocking signals */ 113#define SIG_UNBLOCK 2 /* for unblocking signals */
114#define SIG_SETMASK 3 /* for setting the signal mask */ 114#define SIG_SETMASK 3 /* for setting the signal mask */
115 115
116/* Type of a signal handler. */ 116#include <asm-generic/signal.h>
117typedef void __signalfn_t(int);
118typedef __signalfn_t __user *__sighandler_t;
119
120typedef void __restorefn_t(void);
121typedef __restorefn_t __user *__sigrestore_t;
122
123#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
124#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
125#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
126 117
127#ifdef __KERNEL__ 118#ifdef __KERNEL__
128struct osf_sigaction { 119struct osf_sigaction {
diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h
index b860dc3c5dc7..46e69ae395af 100644
--- a/include/asm-arm/signal.h
+++ b/include/asm-arm/signal.h
@@ -117,20 +117,7 @@ typedef unsigned long sigset_t;
117#define SA_IRQNOMASK 0x08000000 117#define SA_IRQNOMASK 0x08000000
118#endif 118#endif
119 119
120#define SIG_BLOCK 0 /* for blocking signals */ 120#include <asm-generic/signal.h>
121#define SIG_UNBLOCK 1 /* for unblocking signals */
122#define SIG_SETMASK 2 /* for setting the signal mask */
123
124/* Type of a signal handler. */
125typedef void __signalfn_t(int);
126typedef __signalfn_t __user *__sighandler_t;
127
128typedef void __restorefn_t(void);
129typedef __restorefn_t __user *__sigrestore_t;
130
131#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
132#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
133#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
134 121
135#ifdef __KERNEL__ 122#ifdef __KERNEL__
136struct old_sigaction { 123struct old_sigaction {
diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h
index a1aacefa6562..dedb29280303 100644
--- a/include/asm-arm26/signal.h
+++ b/include/asm-arm26/signal.h
@@ -117,16 +117,7 @@ typedef unsigned long sigset_t;
117#define SA_IRQNOMASK 0x08000000 117#define SA_IRQNOMASK 0x08000000
118#endif 118#endif
119 119
120#define SIG_BLOCK 0 /* for blocking signals */ 120#include <asm-generic/signal.h>
121#define SIG_UNBLOCK 1 /* for unblocking signals */
122#define SIG_SETMASK 2 /* for setting the signal mask */
123
124/* Type of a signal handler. */
125typedef void (*__sighandler_t)(int);
126
127#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
128#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
129#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
130 121
131#ifdef __KERNEL__ 122#ifdef __KERNEL__
132struct old_sigaction { 123struct old_sigaction {
diff --git a/include/asm-cris/signal.h b/include/asm-cris/signal.h
index 2330769ba55d..dfe039593a78 100644
--- a/include/asm-cris/signal.h
+++ b/include/asm-cris/signal.h
@@ -108,16 +108,7 @@ typedef unsigned long sigset_t;
108#define MINSIGSTKSZ 2048 108#define MINSIGSTKSZ 2048
109#define SIGSTKSZ 8192 109#define SIGSTKSZ 8192
110 110
111#define SIG_BLOCK 0 /* for blocking signals */ 111#include <asm-generic/signal.h>
112#define SIG_UNBLOCK 1 /* for unblocking signals */
113#define SIG_SETMASK 2 /* for setting the signal mask */
114
115/* Type of a signal handler. */
116typedef void (*__sighandler_t)(int);
117
118#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
119#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
120#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
121 112
122#ifdef __KERNEL__ 113#ifdef __KERNEL__
123struct old_sigaction { 114struct old_sigaction {
diff --git a/include/asm-frv/signal.h b/include/asm-frv/signal.h
index c930bb176875..d407bde57eca 100644
--- a/include/asm-frv/signal.h
+++ b/include/asm-frv/signal.h
@@ -107,16 +107,7 @@ typedef unsigned long sigset_t;
107#define MINSIGSTKSZ 2048 107#define MINSIGSTKSZ 2048
108#define SIGSTKSZ 8192 108#define SIGSTKSZ 8192
109 109
110#define SIG_BLOCK 0 /* for blocking signals */ 110#include <asm-generic/signal.h>
111#define SIG_UNBLOCK 1 /* for unblocking signals */
112#define SIG_SETMASK 2 /* for setting the signal mask */
113
114/* Type of a signal handler. */
115typedef void (*__sighandler_t)(int);
116
117#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
118#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
119#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
120 111
121#ifdef __KERNEL__ 112#ifdef __KERNEL__
122struct old_sigaction { 113struct old_sigaction {
diff --git a/include/asm-generic/signal.h b/include/asm-generic/signal.h
new file mode 100644
index 000000000000..9418d6e9b8cd
--- /dev/null
+++ b/include/asm-generic/signal.h
@@ -0,0 +1,21 @@
1#ifndef SIG_BLOCK
2#define SIG_BLOCK 0 /* for blocking signals */
3#endif
4#ifndef SIG_UNBLOCK
5#define SIG_UNBLOCK 1 /* for unblocking signals */
6#endif
7#ifndef SIG_SETMASK
8#define SIG_SETMASK 2 /* for setting the signal mask */
9#endif
10
11#ifndef __ASSEMBLY__
12typedef void __signalfn_t(int);
13typedef __signalfn_t __user *__sighandler_t;
14
15typedef void __restorefn_t(void);
16typedef __restorefn_t __user *__sigrestore_t;
17
18#define SIG_DFL ((__force __sighandler_t)0) /* default signal handling */
19#define SIG_IGN ((__force __sighandler_t)1) /* ignore signal */
20#define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */
21#endif
diff --git a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h
index ac3e01bd6396..8eccdc176163 100644
--- a/include/asm-h8300/signal.h
+++ b/include/asm-h8300/signal.h
@@ -107,16 +107,7 @@ typedef unsigned long sigset_t;
107#define MINSIGSTKSZ 2048 107#define MINSIGSTKSZ 2048
108#define SIGSTKSZ 8192 108#define SIGSTKSZ 8192
109 109
110#define SIG_BLOCK 0 /* for blocking signals */ 110#include <asm-generic/signal.h>
111#define SIG_UNBLOCK 1 /* for unblocking signals */
112#define SIG_SETMASK 2 /* for setting the signal mask */
113
114/* Type of a signal handler. */
115typedef void (*__sighandler_t)(int);
116
117#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
118#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
119#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
120 111
121#ifdef __KERNEL__ 112#ifdef __KERNEL__
122struct old_sigaction { 113struct old_sigaction {
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h
index 0f082bd1c455..cbb47d34aa31 100644
--- a/include/asm-i386/signal.h
+++ b/include/asm-i386/signal.h
@@ -110,20 +110,7 @@ typedef unsigned long sigset_t;
110#define MINSIGSTKSZ 2048 110#define MINSIGSTKSZ 2048
111#define SIGSTKSZ 8192 111#define SIGSTKSZ 8192
112 112
113#define SIG_BLOCK 0 /* for blocking signals */ 113#include <asm-generic/signal.h>
114#define SIG_UNBLOCK 1 /* for unblocking signals */
115#define SIG_SETMASK 2 /* for setting the signal mask */
116
117/* Type of a signal handler. */
118typedef void __signalfn_t(int);
119typedef __signalfn_t __user *__sighandler_t;
120
121typedef void __restorefn_t(void);
122typedef __restorefn_t __user *__sigrestore_t;
123
124#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
125#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
126#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
127 114
128#ifdef __KERNEL__ 115#ifdef __KERNEL__
129struct old_sigaction { 116struct old_sigaction {
diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h
index 85a577ae9146..608168d713d3 100644
--- a/include/asm-ia64/signal.h
+++ b/include/asm-ia64/signal.h
@@ -118,13 +118,7 @@
118 118
119#endif /* __KERNEL__ */ 119#endif /* __KERNEL__ */
120 120
121#define SIG_BLOCK 0 /* for blocking signals */ 121#include <asm-generic/signal.h>
122#define SIG_UNBLOCK 1 /* for unblocking signals */
123#define SIG_SETMASK 2 /* for setting the signal mask */
124
125#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
126#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
127#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
128 122
129# ifndef __ASSEMBLY__ 123# ifndef __ASSEMBLY__
130 124
@@ -133,9 +127,6 @@
133/* Avoid too many header ordering problems. */ 127/* Avoid too many header ordering problems. */
134struct siginfo; 128struct siginfo;
135 129
136/* Type of a signal handler. */
137typedef void __user (*__sighandler_t)(int);
138
139typedef struct sigaltstack { 130typedef struct sigaltstack {
140 void __user *ss_sp; 131 void __user *ss_sp;
141 int ss_flags; 132 int ss_flags;
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h
index 6e55fd421883..95f69b191953 100644
--- a/include/asm-m32r/signal.h
+++ b/include/asm-m32r/signal.h
@@ -114,20 +114,7 @@ typedef unsigned long sigset_t;
114#define MINSIGSTKSZ 2048 114#define MINSIGSTKSZ 2048
115#define SIGSTKSZ 8192 115#define SIGSTKSZ 8192
116 116
117#define SIG_BLOCK 0 /* for blocking signals */ 117#include <asm-generic/signal.h>
118#define SIG_UNBLOCK 1 /* for unblocking signals */
119#define SIG_SETMASK 2 /* for setting the signal mask */
120
121/* Type of a signal handler. */
122typedef void __signalfn_t(int);
123typedef __signalfn_t __user *__sighandler_t;
124
125typedef void __restorefn_t(void);
126typedef __restorefn_t __user *__sigrestore_t;
127
128#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
129#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
130#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
131 118
132#ifdef __KERNEL__ 119#ifdef __KERNEL__
133struct old_sigaction { 120struct old_sigaction {
diff --git a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h
index 1d016e9f19bf..a0cdf9082372 100644
--- a/include/asm-m68k/signal.h
+++ b/include/asm-m68k/signal.h
@@ -105,29 +105,20 @@ typedef unsigned long sigset_t;
105#define MINSIGSTKSZ 2048 105#define MINSIGSTKSZ 2048
106#define SIGSTKSZ 8192 106#define SIGSTKSZ 8192
107 107
108#define SIG_BLOCK 0 /* for blocking signals */ 108#include <asm-generic/signal.h>
109#define SIG_UNBLOCK 1 /* for unblocking signals */
110#define SIG_SETMASK 2 /* for setting the signal mask */
111
112/* Type of a signal handler. */
113typedef void (*__sighandler_t)(int);
114
115#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
116#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
117#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
118 109
119#ifdef __KERNEL__ 110#ifdef __KERNEL__
120struct old_sigaction { 111struct old_sigaction {
121 __sighandler_t sa_handler; 112 __sighandler_t sa_handler;
122 old_sigset_t sa_mask; 113 old_sigset_t sa_mask;
123 unsigned long sa_flags; 114 unsigned long sa_flags;
124 void (*sa_restorer)(void); 115 __sigrestore_t sa_restorer;
125}; 116};
126 117
127struct sigaction { 118struct sigaction {
128 __sighandler_t sa_handler; 119 __sighandler_t sa_handler;
129 unsigned long sa_flags; 120 unsigned long sa_flags;
130 void (*sa_restorer)(void); 121 __sigrestore_t sa_restorer;
131 sigset_t sa_mask; /* mask last for extensibility */ 122 sigset_t sa_mask; /* mask last for extensibility */
132}; 123};
133 124
diff --git a/include/asm-m68knommu/signal.h b/include/asm-m68knommu/signal.h
index 37c9c8a024ba..1d13187f6062 100644
--- a/include/asm-m68knommu/signal.h
+++ b/include/asm-m68knommu/signal.h
@@ -105,16 +105,7 @@ typedef unsigned long sigset_t;
105#define MINSIGSTKSZ 2048 105#define MINSIGSTKSZ 2048
106#define SIGSTKSZ 8192 106#define SIGSTKSZ 8192
107 107
108#define SIG_BLOCK 0 /* for blocking signals */ 108#include <asm-generic/signal.h>
109#define SIG_UNBLOCK 1 /* for unblocking signals */
110#define SIG_SETMASK 2 /* for setting the signal mask */
111
112/* Type of a signal handler. */
113typedef void (*__sighandler_t)(int);
114
115#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
116#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
117#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
118 109
119#ifdef __KERNEL__ 110#ifdef __KERNEL__
120struct old_sigaction { 111struct old_sigaction {
diff --git a/include/asm-mips/signal.h b/include/asm-mips/signal.h
index d81356731eb6..f2c470f1d369 100644
--- a/include/asm-mips/signal.h
+++ b/include/asm-mips/signal.h
@@ -103,14 +103,7 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */
103#define SIG_SETMASK 3 /* for setting the signal mask */ 103#define SIG_SETMASK 3 /* for setting the signal mask */
104#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility: 104#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility:
105 set only the low 32 bit of the sigset. */ 105 set only the low 32 bit of the sigset. */
106 106#include <asm-generic/signal.h>
107/* Type of a signal handler. */
108typedef void (*__sighandler_t)(int);
109
110/* Fake signal functions */
111#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
112#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
113#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
114 107
115struct sigaction { 108struct sigaction {
116 unsigned int sa_flags; 109 unsigned int sa_flags;
diff --git a/include/asm-ppc/signal.h b/include/asm-ppc/signal.h
index d890dabd5a69..caf6ede3710f 100644
--- a/include/asm-ppc/signal.h
+++ b/include/asm-ppc/signal.h
@@ -100,20 +100,7 @@ typedef struct {
100#define MINSIGSTKSZ 2048 100#define MINSIGSTKSZ 2048
101#define SIGSTKSZ 8192 101#define SIGSTKSZ 8192
102 102
103#define SIG_BLOCK 0 /* for blocking signals */ 103#include <asm-generic/signal.h>
104#define SIG_UNBLOCK 1 /* for unblocking signals */
105#define SIG_SETMASK 2 /* for setting the signal mask */
106
107/* Type of a signal handler. */
108typedef void __signalfn_t(int);
109typedef __signalfn_t __user *__sighandler_t;
110
111typedef void __restorefn_t(void);
112typedef __restorefn_t __user *__sigrestore_t;
113
114#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
115#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
116#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
117 104
118struct old_sigaction { 105struct old_sigaction {
119 __sighandler_t sa_handler; 106 __sighandler_t sa_handler;
diff --git a/include/asm-ppc64/signal.h b/include/asm-ppc64/signal.h
index a2d7bbb4befd..432df7dd355d 100644
--- a/include/asm-ppc64/signal.h
+++ b/include/asm-ppc64/signal.h
@@ -97,33 +97,19 @@ typedef struct {
97#define MINSIGSTKSZ 2048 97#define MINSIGSTKSZ 2048
98#define SIGSTKSZ 8192 98#define SIGSTKSZ 8192
99 99
100#define SIG_BLOCK 0 /* for blocking signals */ 100#include <asm-generic/signal.h>
101#define SIG_UNBLOCK 1 /* for unblocking signals */
102#define SIG_SETMASK 2 /* for setting the signal mask */
103
104/* Type of a signal handler. */
105typedef void __sigfunction(int);
106typedef __sigfunction __user * __sighandler_t;
107
108/* Type of the restorer function */
109typedef void __sigrestorer(void);
110typedef __sigrestorer __user * __sigrestorer_t;
111
112#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
113#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
114#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
115 101
116struct old_sigaction { 102struct old_sigaction {
117 __sighandler_t sa_handler; 103 __sighandler_t sa_handler;
118 old_sigset_t sa_mask; 104 old_sigset_t sa_mask;
119 unsigned long sa_flags; 105 unsigned long sa_flags;
120 __sigrestorer_t sa_restorer; 106 __sigrestore_t sa_restorer;
121}; 107};
122 108
123struct sigaction { 109struct sigaction {
124 __sighandler_t sa_handler; 110 __sighandler_t sa_handler;
125 unsigned long sa_flags; 111 unsigned long sa_flags;
126 __sigrestorer_t sa_restorer; 112 __sigrestore_t sa_restorer;
127 sigset_t sa_mask; /* mask last for extensibility */ 113 sigset_t sa_mask; /* mask last for extensibility */
128}; 114};
129 115
diff --git a/include/asm-s390/signal.h b/include/asm-s390/signal.h
index bfed83a818cc..3d6e11c6c1fd 100644
--- a/include/asm-s390/signal.h
+++ b/include/asm-s390/signal.h
@@ -117,16 +117,7 @@ typedef unsigned long sigset_t;
117#define MINSIGSTKSZ 2048 117#define MINSIGSTKSZ 2048
118#define SIGSTKSZ 8192 118#define SIGSTKSZ 8192
119 119
120#define SIG_BLOCK 0 /* for blocking signals */ 120#include <asm-generic/signal.h>
121#define SIG_UNBLOCK 1 /* for unblocking signals */
122#define SIG_SETMASK 2 /* for setting the signal mask */
123
124/* Type of a signal handler. */
125typedef void (*__sighandler_t)(int);
126
127#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
128#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
129#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
130 121
131#ifdef __KERNEL__ 122#ifdef __KERNEL__
132struct old_sigaction { 123struct old_sigaction {
diff --git a/include/asm-sh/signal.h b/include/asm-sh/signal.h
index 29f1ac1bf4df..d6e8eb0e65c7 100644
--- a/include/asm-sh/signal.h
+++ b/include/asm-sh/signal.h
@@ -108,16 +108,7 @@ typedef unsigned long sigset_t;
108#define MINSIGSTKSZ 2048 108#define MINSIGSTKSZ 2048
109#define SIGSTKSZ 8192 109#define SIGSTKSZ 8192
110 110
111#define SIG_BLOCK 0 /* for blocking signals */ 111#include <asm-generic/signal.h>
112#define SIG_UNBLOCK 1 /* for unblocking signals */
113#define SIG_SETMASK 2 /* for setting the signal mask */
114
115/* Type of a signal handler. */
116typedef void (*__sighandler_t)(int);
117
118#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
119#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
120#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
121 112
122#ifdef __KERNEL__ 113#ifdef __KERNEL__
123struct old_sigaction { 114struct old_sigaction {
diff --git a/include/asm-sh64/signal.h b/include/asm-sh64/signal.h
index 864c94ecc98c..2400dc688a65 100644
--- a/include/asm-sh64/signal.h
+++ b/include/asm-sh64/signal.h
@@ -107,16 +107,7 @@ typedef struct {
107#define MINSIGSTKSZ 2048 107#define MINSIGSTKSZ 2048
108#define SIGSTKSZ THREAD_SIZE 108#define SIGSTKSZ THREAD_SIZE
109 109
110#define SIG_BLOCK 0 /* for blocking signals */ 110#include <asm-generic/signal.h>
111#define SIG_UNBLOCK 1 /* for unblocking signals */
112#define SIG_SETMASK 2 /* for setting the signal mask */
113
114/* Type of a signal handler. */
115typedef void (*__sighandler_t)(int);
116
117#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
118#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
119#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
120 111
121#ifdef __KERNEL__ 112#ifdef __KERNEL__
122struct old_sigaction { 113struct old_sigaction {
diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h
index 780ee7ff9dc3..caf926116506 100644
--- a/include/asm-sparc/floppy.h
+++ b/include/asm-sparc/floppy.h
@@ -227,7 +227,7 @@ static __inline__ void sun_fd_disable_dma(void)
227 doing_pdma = 0; 227 doing_pdma = 0;
228 if (pdma_base) { 228 if (pdma_base) {
229 mmu_unlockarea(pdma_base, pdma_areasize); 229 mmu_unlockarea(pdma_base, pdma_areasize);
230 pdma_base = 0; 230 pdma_base = NULL;
231 } 231 }
232} 232}
233 233
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h
index f792e10e704f..aa9960ad0ca9 100644
--- a/include/asm-sparc/signal.h
+++ b/include/asm-sparc/signal.h
@@ -174,16 +174,7 @@ struct sigstack {
174#define SA_STATIC_ALLOC 0x80 174#define SA_STATIC_ALLOC 0x80
175#endif 175#endif
176 176
177/* Type of a signal handler. */ 177#include <asm-generic/signal.h>
178#ifdef __KERNEL__
179typedef void (*__sighandler_t)(int, int, struct sigcontext *, char *);
180#else
181typedef void (*__sighandler_t)(int);
182#endif
183
184#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
185#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
186#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
187 178
188#ifdef __KERNEL__ 179#ifdef __KERNEL__
189struct __new_sigaction { 180struct __new_sigaction {
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h
index ab88349ddadc..b7e635544cec 100644
--- a/include/asm-sparc64/parport.h
+++ b/include/asm-sparc64/parport.h
@@ -13,6 +13,12 @@
13 13
14#define PARPORT_PC_MAX_PORTS PARPORT_MAX 14#define PARPORT_PC_MAX_PORTS PARPORT_MAX
15 15
16/*
17 * While sparc64 doesn't have an ISA DMA API, we provide something that looks
18 * close enough to make parport_pc happy
19 */
20#define HAS_DMA
21
16static struct sparc_ebus_info { 22static struct sparc_ebus_info {
17 struct ebus_dma_info info; 23 struct ebus_dma_info info;
18 unsigned int addr; 24 unsigned int addr;
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
index 466d021d7038..becdf1bc5924 100644
--- a/include/asm-sparc64/signal.h
+++ b/include/asm-sparc64/signal.h
@@ -177,21 +177,7 @@ struct sigstack {
177#define SA_STATIC_ALLOC 0x80 177#define SA_STATIC_ALLOC 0x80
178#endif 178#endif
179 179
180/* Type of a signal handler. */ 180#include <asm-generic/signal.h>
181#ifdef __KERNEL__
182typedef void __signalfn_t(int);
183typedef __signalfn_t __user *__sighandler_t;
184
185typedef void __restorefn_t(void);
186typedef __restorefn_t __user *__sigrestore_t;
187#else
188typedef void (*__sighandler_t)(int);
189typedef void (*__sigrestore_t)(void);
190#endif
191
192#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
193#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
194#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
195 181
196struct __new_sigaction { 182struct __new_sigaction {
197 __sighandler_t sa_handler; 183 __sighandler_t sa_handler;
diff --git a/include/asm-v850/signal.h b/include/asm-v850/signal.h
index ec3566c875d9..cb52caa69925 100644
--- a/include/asm-v850/signal.h
+++ b/include/asm-v850/signal.h
@@ -110,17 +110,7 @@ typedef unsigned long sigset_t;
110#define MINSIGSTKSZ 2048 110#define MINSIGSTKSZ 2048
111#define SIGSTKSZ 8192 111#define SIGSTKSZ 8192
112 112
113#define SIG_BLOCK 0 /* for blocking signals */ 113#include <asm-generic/signal.h>
114#define SIG_UNBLOCK 1 /* for unblocking signals */
115#define SIG_SETMASK 2 /* for setting the signal mask */
116
117/* Type of a signal handler. */
118typedef void (*__sighandler_t)(int);
119
120#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
121#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
122#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
123
124 114
125#ifdef __KERNEL__ 115#ifdef __KERNEL__
126 116
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h
index 4987ad8082ba..fe9b96d94815 100644
--- a/include/asm-x86_64/signal.h
+++ b/include/asm-x86_64/signal.h
@@ -116,21 +116,9 @@ typedef unsigned long sigset_t;
116#define MINSIGSTKSZ 2048 116#define MINSIGSTKSZ 2048
117#define SIGSTKSZ 8192 117#define SIGSTKSZ 8192
118 118
119#define SIG_BLOCK 0 /* for blocking signals */ 119#include <asm-generic/signal.h>
120#define SIG_UNBLOCK 1 /* for unblocking signals */
121#define SIG_SETMASK 2 /* for setting the signal mask */
122 120
123#ifndef __ASSEMBLY__ 121#ifndef __ASSEMBLY__
124/* Type of a signal handler. */
125typedef void __signalfn_t(int);
126typedef __signalfn_t __user *__sighandler_t;
127
128typedef void __restorefn_t(void);
129typedef __restorefn_t __user *__sigrestore_t;
130
131#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
132#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
133#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
134 122
135struct sigaction { 123struct sigaction {
136 __sighandler_t sa_handler; 124 __sighandler_t sa_handler;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 3c89148ae28a..b5238bd18830 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -671,6 +671,7 @@ struct pci_driver {
671 int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */ 671 int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */
672 int (*resume) (struct pci_dev *dev); /* Device woken up */ 672 int (*resume) (struct pci_dev *dev); /* Device woken up */
673 int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */ 673 int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */
674 void (*shutdown) (struct pci_dev *dev);
674 675
675 struct device_driver driver; 676 struct device_driver driver;
676 struct pci_dynids dynids; 677 struct pci_dynids dynids;
@@ -810,7 +811,6 @@ void pci_set_master(struct pci_dev *dev);
810int pci_set_mwi(struct pci_dev *dev); 811int pci_set_mwi(struct pci_dev *dev);
811void pci_clear_mwi(struct pci_dev *dev); 812void pci_clear_mwi(struct pci_dev *dev);
812int pci_set_dma_mask(struct pci_dev *dev, u64 mask); 813int pci_set_dma_mask(struct pci_dev *dev, u64 mask);
813int pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask);
814int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); 814int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
815int pci_assign_resource(struct pci_dev *dev, int i); 815int pci_assign_resource(struct pci_dev *dev, int i);
816 816
@@ -941,7 +941,6 @@ static inline void pci_set_master(struct pci_dev *dev) { }
941static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } 941static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; }
942static inline void pci_disable_device(struct pci_dev *dev) { } 942static inline void pci_disable_device(struct pci_dev *dev) { }
943static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } 943static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; }
944static inline int pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; }
945static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;} 944static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;}
946static inline int pci_register_driver(struct pci_driver *drv) { return 0;} 945static inline int pci_register_driver(struct pci_driver *drv) { return 0;}
947static inline void pci_unregister_driver(struct pci_driver *drv) { } 946static inline void pci_unregister_driver(struct pci_driver *drv) { }
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index f1e5af4be98e..a0ed93672176 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -17,6 +17,8 @@
17 17
18#define IPV6_MAX_ADDRESSES 16 18#define IPV6_MAX_ADDRESSES 16
19 19
20#include <linux/in6.h>
21
20struct prefix_info { 22struct prefix_info {
21 __u8 type; 23 __u8 type;
22 __u8 length; 24 __u8 length;
@@ -43,7 +45,6 @@ struct prefix_info {
43 45
44#ifdef __KERNEL__ 46#ifdef __KERNEL__
45 47
46#include <linux/in6.h>
47#include <linux/netdevice.h> 48#include <linux/netdevice.h>
48#include <net/if_inet6.h> 49#include <net/if_inet6.h>
49#include <net/ipv6.h> 50#include <net/ipv6.h>
diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c
index d6ccd3239dcf..70543d89438b 100644
--- a/net/irda/irda_device.c
+++ b/net/irda/irda_device.c
@@ -470,6 +470,7 @@ void irda_device_unregister_dongle(struct dongle_reg *dongle)
470} 470}
471EXPORT_SYMBOL(irda_device_unregister_dongle); 471EXPORT_SYMBOL(irda_device_unregister_dongle);
472 472
473#ifdef CONFIG_ISA_DMA_API
473/* 474/*
474 * Function setup_dma (idev, buffer, count, mode) 475 * Function setup_dma (idev, buffer, count, mode)
475 * 476 *
@@ -492,3 +493,4 @@ void irda_setup_dma(int channel, dma_addr_t buffer, int count, int mode)
492 release_dma_lock(flags); 493 release_dma_lock(flags);
493} 494}
494EXPORT_SYMBOL(irda_setup_dma); 495EXPORT_SYMBOL(irda_setup_dma);
496#endif