diff options
147 files changed, 1107 insertions, 723 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index 50f99eab0e1f..2a39aeba1464 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -42,14 +42,8 @@ IRQ.txt | |||
42 | - description of what an IRQ is. | 42 | - description of what an IRQ is. |
43 | ManagementStyle | 43 | ManagementStyle |
44 | - how to (attempt to) manage kernel hackers. | 44 | - how to (attempt to) manage kernel hackers. |
45 | MSI-HOWTO.txt | ||
46 | - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ. | ||
47 | RCU/ | 45 | RCU/ |
48 | - directory with info on RCU (read-copy update). | 46 | - directory with info on RCU (read-copy update). |
49 | README.DAC960 | ||
50 | - info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux. | ||
51 | README.cycladesZ | ||
52 | - info on Cyclades-Z firmware loading. | ||
53 | SAK.txt | 47 | SAK.txt |
54 | - info on Secure Attention Keys. | 48 | - info on Secure Attention Keys. |
55 | SM501.txt | 49 | SM501.txt |
@@ -86,20 +80,16 @@ blackfin/ | |||
86 | - directory with documentation for the Blackfin arch. | 80 | - directory with documentation for the Blackfin arch. |
87 | block/ | 81 | block/ |
88 | - info on the Block I/O (BIO) layer. | 82 | - info on the Block I/O (BIO) layer. |
83 | blockdev/ | ||
84 | - info on block devices & drivers | ||
89 | cachetlb.txt | 85 | cachetlb.txt |
90 | - describes the cache/TLB flushing interfaces Linux uses. | 86 | - describes the cache/TLB flushing interfaces Linux uses. |
91 | cciss.txt | ||
92 | - info, major/minor #'s for Compaq's SMART Array Controllers. | ||
93 | cdrom/ | 87 | cdrom/ |
94 | - directory with information on the CD-ROM drivers that Linux has. | 88 | - directory with information on the CD-ROM drivers that Linux has. |
95 | computone.txt | ||
96 | - info on Computone Intelliport II/Plus Multiport Serial Driver. | ||
97 | connector/ | 89 | connector/ |
98 | - docs on the netlink based userspace<->kernel space communication mod. | 90 | - docs on the netlink based userspace<->kernel space communication mod. |
99 | console/ | 91 | console/ |
100 | - documentation on Linux console drivers. | 92 | - documentation on Linux console drivers. |
101 | cpqarray.txt | ||
102 | - info on using Compaq's SMART2 Intelligent Disk Array Controllers. | ||
103 | cpu-freq/ | 93 | cpu-freq/ |
104 | - info on CPU frequency and voltage scaling. | 94 | - info on CPU frequency and voltage scaling. |
105 | cpu-hotplug.txt | 95 | cpu-hotplug.txt |
@@ -126,8 +116,6 @@ device-mapper/ | |||
126 | - directory with info on Device Mapper. | 116 | - directory with info on Device Mapper. |
127 | devices.txt | 117 | devices.txt |
128 | - plain ASCII listing of all the nodes in /dev/ with major minor #'s. | 118 | - plain ASCII listing of all the nodes in /dev/ with major minor #'s. |
129 | digiepca.txt | ||
130 | - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards. | ||
131 | dontdiff | 119 | dontdiff |
132 | - file containing a list of files that should never be diff'ed. | 120 | - file containing a list of files that should never be diff'ed. |
133 | driver-model/ | 121 | driver-model/ |
@@ -152,14 +140,10 @@ filesystems/ | |||
152 | - info on the vfs and the various filesystems that Linux supports. | 140 | - info on the vfs and the various filesystems that Linux supports. |
153 | firmware_class/ | 141 | firmware_class/ |
154 | - request_firmware() hotplug interface info. | 142 | - request_firmware() hotplug interface info. |
155 | floppy.txt | ||
156 | - notes and driver options for the floppy disk driver. | ||
157 | frv/ | 143 | frv/ |
158 | - Fujitsu FR-V Linux documentation. | 144 | - Fujitsu FR-V Linux documentation. |
159 | gpio.txt | 145 | gpio.txt |
160 | - overview of GPIO (General Purpose Input/Output) access conventions. | 146 | - overview of GPIO (General Purpose Input/Output) access conventions. |
161 | hayes-esp.txt | ||
162 | - info on using the Hayes ESP serial driver. | ||
163 | highuid.txt | 147 | highuid.txt |
164 | - notes on the change from 16 bit to 32 bit user/group IDs. | 148 | - notes on the change from 16 bit to 32 bit user/group IDs. |
165 | timers/ | 149 | timers/ |
@@ -186,8 +170,6 @@ io_ordering.txt | |||
186 | - info on ordering I/O writes to memory-mapped addresses. | 170 | - info on ordering I/O writes to memory-mapped addresses. |
187 | ioctl/ | 171 | ioctl/ |
188 | - directory with documents describing various IOCTL calls. | 172 | - directory with documents describing various IOCTL calls. |
189 | ioctl-number.txt | ||
190 | - how to implement and register device/driver ioctl calls. | ||
191 | iostats.txt | 173 | iostats.txt |
192 | - info on I/O statistics Linux kernel provides. | 174 | - info on I/O statistics Linux kernel provides. |
193 | irqflags-tracing.txt | 175 | irqflags-tracing.txt |
@@ -250,14 +232,10 @@ mips/ | |||
250 | - directory with info about Linux on MIPS architecture. | 232 | - directory with info about Linux on MIPS architecture. |
251 | mono.txt | 233 | mono.txt |
252 | - how to execute Mono-based .NET binaries with the help of BINFMT_MISC. | 234 | - how to execute Mono-based .NET binaries with the help of BINFMT_MISC. |
253 | moxa-smartio | ||
254 | - file with info on installing/using Moxa multiport serial driver. | ||
255 | mutex-design.txt | 235 | mutex-design.txt |
256 | - info on the generic mutex subsystem. | 236 | - info on the generic mutex subsystem. |
257 | namespaces/ | 237 | namespaces/ |
258 | - directory with various information about namespaces | 238 | - directory with various information about namespaces |
259 | nbd.txt | ||
260 | - info on a TCP implementation of a network block device. | ||
261 | netlabel/ | 239 | netlabel/ |
262 | - directory with information on the NetLabel subsystem. | 240 | - directory with information on the NetLabel subsystem. |
263 | networking/ | 241 | networking/ |
@@ -270,8 +248,6 @@ numastat.txt | |||
270 | - info on how to read Numa policy hit/miss statistics in sysfs. | 248 | - info on how to read Numa policy hit/miss statistics in sysfs. |
271 | oops-tracing.txt | 249 | oops-tracing.txt |
272 | - how to decode those nasty internal kernel error dump messages. | 250 | - how to decode those nasty internal kernel error dump messages. |
273 | paride.txt | ||
274 | - information about the parallel port IDE subsystem. | ||
275 | parisc/ | 251 | parisc/ |
276 | - directory with info on using Linux on PA-RISC architecture. | 252 | - directory with info on using Linux on PA-RISC architecture. |
277 | parport.txt | 253 | parport.txt |
@@ -294,18 +270,12 @@ printk-formats.txt | |||
294 | - how to get printk format specifiers right | 270 | - how to get printk format specifiers right |
295 | prio_tree.txt | 271 | prio_tree.txt |
296 | - info on radix-priority-search-tree use for indexing vmas. | 272 | - info on radix-priority-search-tree use for indexing vmas. |
297 | ramdisk.txt | ||
298 | - short guide on how to set up and use the RAM disk. | ||
299 | rbtree.txt | 273 | rbtree.txt |
300 | - info on what red-black trees are and what they are for. | 274 | - info on what red-black trees are and what they are for. |
301 | riscom8.txt | ||
302 | - notes on using the RISCom/8 multi-port serial driver. | ||
303 | robust-futex-ABI.txt | 275 | robust-futex-ABI.txt |
304 | - documentation of the robust futex ABI. | 276 | - documentation of the robust futex ABI. |
305 | robust-futexes.txt | 277 | robust-futexes.txt |
306 | - a description of what robust futexes are. | 278 | - a description of what robust futexes are. |
307 | rocket.txt | ||
308 | - info on the Comtrol RocketPort multiport serial driver. | ||
309 | rt-mutex-design.txt | 279 | rt-mutex-design.txt |
310 | - description of the RealTime mutex implementation design. | 280 | - description of the RealTime mutex implementation design. |
311 | rt-mutex.txt | 281 | rt-mutex.txt |
@@ -334,8 +304,6 @@ sparc/ | |||
334 | - directory with info on using Linux on Sparc architecture. | 304 | - directory with info on using Linux on Sparc architecture. |
335 | sparse.txt | 305 | sparse.txt |
336 | - info on how to obtain and use the sparse tool for typechecking. | 306 | - info on how to obtain and use the sparse tool for typechecking. |
337 | specialix.txt | ||
338 | - info on hardware/driver for specialix IO8+ multiport serial card. | ||
339 | spi/ | 307 | spi/ |
340 | - overview of Linux kernel Serial Peripheral Interface (SPI) support. | 308 | - overview of Linux kernel Serial Peripheral Interface (SPI) support. |
341 | spinlocks.txt | 309 | spinlocks.txt |
@@ -344,14 +312,10 @@ stable_api_nonsense.txt | |||
344 | - info on why the kernel does not have a stable in-kernel api or abi. | 312 | - info on why the kernel does not have a stable in-kernel api or abi. |
345 | stable_kernel_rules.txt | 313 | stable_kernel_rules.txt |
346 | - rules and procedures for the -stable kernel releases. | 314 | - rules and procedures for the -stable kernel releases. |
347 | stallion.txt | ||
348 | - info on using the Stallion multiport serial driver. | ||
349 | svga.txt | 315 | svga.txt |
350 | - short guide on selecting video modes at boot via VGA BIOS. | 316 | - short guide on selecting video modes at boot via VGA BIOS. |
351 | sysfs-rules.txt | 317 | sysfs-rules.txt |
352 | - How not to use sysfs. | 318 | - How not to use sysfs. |
353 | sx.txt | ||
354 | - info on the Specialix SX/SI multiport serial driver. | ||
355 | sysctl/ | 319 | sysctl/ |
356 | - directory with info on the /proc/sys/* files. | 320 | - directory with info on the /proc/sys/* files. |
357 | sysrq.txt | 321 | sysrq.txt |
@@ -360,8 +324,6 @@ telephony/ | |||
360 | - directory with info on telephony (e.g. voice over IP) support. | 324 | - directory with info on telephony (e.g. voice over IP) support. |
361 | time_interpolators.txt | 325 | time_interpolators.txt |
362 | - info on time interpolators. | 326 | - info on time interpolators. |
363 | tty.txt | ||
364 | - guide to the locking policies of the tty layer. | ||
365 | uml/ | 327 | uml/ |
366 | - directory with information about User Mode Linux. | 328 | - directory with information about User Mode Linux. |
367 | unicode.txt | 329 | unicode.txt |
diff --git a/Documentation/PCI/00-INDEX b/Documentation/PCI/00-INDEX index 49f43946c6b6..812b17fe3ed0 100644 --- a/Documentation/PCI/00-INDEX +++ b/Documentation/PCI/00-INDEX | |||
@@ -1,5 +1,7 @@ | |||
1 | 00-INDEX | 1 | 00-INDEX |
2 | - this file | 2 | - this file |
3 | MSI-HOWTO.txt | ||
4 | - the Message Signaled Interrupts (MSI) Driver Guide HOWTO and FAQ. | ||
3 | PCI-DMA-mapping.txt | 5 | PCI-DMA-mapping.txt |
4 | - info for PCI drivers using DMA portably across all platforms | 6 | - info for PCI drivers using DMA portably across all platforms |
5 | PCIEBUS-HOWTO.txt | 7 | PCIEBUS-HOWTO.txt |
diff --git a/Documentation/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt index 256defd7e174..256defd7e174 100644 --- a/Documentation/MSI-HOWTO.txt +++ b/Documentation/PCI/MSI-HOWTO.txt | |||
diff --git a/Documentation/blockdev/00-INDEX b/Documentation/blockdev/00-INDEX new file mode 100644 index 000000000000..86f054c47013 --- /dev/null +++ b/Documentation/blockdev/00-INDEX | |||
@@ -0,0 +1,16 @@ | |||
1 | 00-INDEX | ||
2 | - this file | ||
3 | README.DAC960 | ||
4 | - info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux. | ||
5 | cciss.txt | ||
6 | - info, major/minor #'s for Compaq's SMART Array Controllers. | ||
7 | cpqarray.txt | ||
8 | - info on using Compaq's SMART2 Intelligent Disk Array Controllers. | ||
9 | floppy.txt | ||
10 | - notes and driver options for the floppy disk driver. | ||
11 | nbd.txt | ||
12 | - info on a TCP implementation of a network block device. | ||
13 | paride.txt | ||
14 | - information about the parallel port IDE subsystem. | ||
15 | ramdisk.txt | ||
16 | - short guide on how to set up and use the RAM disk. | ||
diff --git a/Documentation/README.DAC960 b/Documentation/blockdev/README.DAC960 index 0e8f618ab534..0e8f618ab534 100644 --- a/Documentation/README.DAC960 +++ b/Documentation/blockdev/README.DAC960 | |||
diff --git a/Documentation/cciss.txt b/Documentation/blockdev/cciss.txt index 89698e8df7d4..89698e8df7d4 100644 --- a/Documentation/cciss.txt +++ b/Documentation/blockdev/cciss.txt | |||
diff --git a/Documentation/cpqarray.txt b/Documentation/blockdev/cpqarray.txt index c7154e20ef5e..c7154e20ef5e 100644 --- a/Documentation/cpqarray.txt +++ b/Documentation/blockdev/cpqarray.txt | |||
diff --git a/Documentation/floppy.txt b/Documentation/blockdev/floppy.txt index 6ccab88705cb..6ccab88705cb 100644 --- a/Documentation/floppy.txt +++ b/Documentation/blockdev/floppy.txt | |||
diff --git a/Documentation/nbd.txt b/Documentation/blockdev/nbd.txt index aeb93ffe6416..aeb93ffe6416 100644 --- a/Documentation/nbd.txt +++ b/Documentation/blockdev/nbd.txt | |||
diff --git a/Documentation/paride.txt b/Documentation/blockdev/paride.txt index e4312676bdda..e4312676bdda 100644 --- a/Documentation/paride.txt +++ b/Documentation/blockdev/paride.txt | |||
diff --git a/Documentation/ramdisk.txt b/Documentation/blockdev/ramdisk.txt index 6c820baa19a6..6c820baa19a6 100644 --- a/Documentation/ramdisk.txt +++ b/Documentation/blockdev/ramdisk.txt | |||
diff --git a/Documentation/ioctl/00-INDEX b/Documentation/ioctl/00-INDEX new file mode 100644 index 000000000000..d2fe4d4729ef --- /dev/null +++ b/Documentation/ioctl/00-INDEX | |||
@@ -0,0 +1,10 @@ | |||
1 | 00-INDEX | ||
2 | - this file | ||
3 | cdrom.txt | ||
4 | - summary of CDROM ioctl calls | ||
5 | hdio.txt | ||
6 | - summary of HDIO_ ioctl calls | ||
7 | ioctl-decoding.txt | ||
8 | - how to decode the bits of an IOCTL code | ||
9 | ioctl-number.txt | ||
10 | - how to implement and register device/driver ioctl calls | ||
diff --git a/Documentation/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt index b880ce5dbd33..b880ce5dbd33 100644 --- a/Documentation/ioctl-number.txt +++ b/Documentation/ioctl/ioctl-number.txt | |||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index c600c4ffc657..9fa6508892c2 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -629,7 +629,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
629 | 629 | ||
630 | digiepca= [HW,SERIAL] | 630 | digiepca= [HW,SERIAL] |
631 | See drivers/char/README.epca and | 631 | See drivers/char/README.epca and |
632 | Documentation/digiepca.txt. | 632 | Documentation/serial/digiepca.txt. |
633 | 633 | ||
634 | disable_mtrr_cleanup [X86] | 634 | disable_mtrr_cleanup [X86] |
635 | enable_mtrr_cleanup [X86] | 635 | enable_mtrr_cleanup [X86] |
@@ -740,7 +740,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
740 | See header of drivers/scsi/fdomain.c. | 740 | See header of drivers/scsi/fdomain.c. |
741 | 741 | ||
742 | floppy= [HW] | 742 | floppy= [HW] |
743 | See Documentation/floppy.txt. | 743 | See Documentation/blockdev/floppy.txt. |
744 | 744 | ||
745 | force_pal_cache_flush | 745 | force_pal_cache_flush |
746 | [IA-64] Avoid check_sal_cache_flush which may hang on | 746 | [IA-64] Avoid check_sal_cache_flush which may hang on |
@@ -1101,7 +1101,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1101 | the same attribute, the last one is used. | 1101 | the same attribute, the last one is used. |
1102 | 1102 | ||
1103 | load_ramdisk= [RAM] List of ramdisks to load from floppy | 1103 | load_ramdisk= [RAM] List of ramdisks to load from floppy |
1104 | See Documentation/ramdisk.txt. | 1104 | See Documentation/blockdev/ramdisk.txt. |
1105 | 1105 | ||
1106 | lockd.nlm_grace_period=P [NFS] Assign grace period. | 1106 | lockd.nlm_grace_period=P [NFS] Assign grace period. |
1107 | Format: <integer> | 1107 | Format: <integer> |
@@ -1596,7 +1596,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1596 | 1596 | ||
1597 | pcd. [PARIDE] | 1597 | pcd. [PARIDE] |
1598 | See header of drivers/block/paride/pcd.c. | 1598 | See header of drivers/block/paride/pcd.c. |
1599 | See also Documentation/paride.txt. | 1599 | See also Documentation/blockdev/paride.txt. |
1600 | 1600 | ||
1601 | pci=option[,option...] [PCI] various PCI subsystem options: | 1601 | pci=option[,option...] [PCI] various PCI subsystem options: |
1602 | off [X86] don't probe for the PCI bus | 1602 | off [X86] don't probe for the PCI bus |
@@ -1697,7 +1697,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1697 | pcmv= [HW,PCMCIA] BadgePAD 4 | 1697 | pcmv= [HW,PCMCIA] BadgePAD 4 |
1698 | 1698 | ||
1699 | pd. [PARIDE] | 1699 | pd. [PARIDE] |
1700 | See Documentation/paride.txt. | 1700 | See Documentation/blockdev/paride.txt. |
1701 | 1701 | ||
1702 | pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at | 1702 | pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at |
1703 | boot time. | 1703 | boot time. |
@@ -1705,10 +1705,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1705 | See arch/parisc/kernel/pdc_chassis.c | 1705 | See arch/parisc/kernel/pdc_chassis.c |
1706 | 1706 | ||
1707 | pf. [PARIDE] | 1707 | pf. [PARIDE] |
1708 | See Documentation/paride.txt. | 1708 | See Documentation/blockdev/paride.txt. |
1709 | 1709 | ||
1710 | pg. [PARIDE] | 1710 | pg. [PARIDE] |
1711 | See Documentation/paride.txt. | 1711 | See Documentation/blockdev/paride.txt. |
1712 | 1712 | ||
1713 | pirq= [SMP,APIC] Manual mp-table setup | 1713 | pirq= [SMP,APIC] Manual mp-table setup |
1714 | See Documentation/x86/i386/IO-APIC.txt. | 1714 | See Documentation/x86/i386/IO-APIC.txt. |
@@ -1778,7 +1778,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1778 | 1778 | ||
1779 | prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk | 1779 | prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk |
1780 | before loading. | 1780 | before loading. |
1781 | See Documentation/ramdisk.txt. | 1781 | See Documentation/blockdev/ramdisk.txt. |
1782 | 1782 | ||
1783 | psmouse.proto= [HW,MOUSE] Highest PS2 mouse protocol extension to | 1783 | psmouse.proto= [HW,MOUSE] Highest PS2 mouse protocol extension to |
1784 | probe for; one of (bare|imps|exps|lifebook|any). | 1784 | probe for; one of (bare|imps|exps|lifebook|any). |
@@ -1798,7 +1798,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1798 | <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq> | 1798 | <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq> |
1799 | 1799 | ||
1800 | pt. [PARIDE] | 1800 | pt. [PARIDE] |
1801 | See Documentation/paride.txt. | 1801 | See Documentation/blockdev/paride.txt. |
1802 | 1802 | ||
1803 | pty.legacy_count= | 1803 | pty.legacy_count= |
1804 | [KNL] Number of legacy pty's. Overwrites compiled-in | 1804 | [KNL] Number of legacy pty's. Overwrites compiled-in |
@@ -1812,10 +1812,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1812 | See Documentation/md.txt. | 1812 | See Documentation/md.txt. |
1813 | 1813 | ||
1814 | ramdisk_blocksize= [RAM] | 1814 | ramdisk_blocksize= [RAM] |
1815 | See Documentation/ramdisk.txt. | 1815 | See Documentation/blockdev/ramdisk.txt. |
1816 | 1816 | ||
1817 | ramdisk_size= [RAM] Sizes of RAM disks in kilobytes | 1817 | ramdisk_size= [RAM] Sizes of RAM disks in kilobytes |
1818 | See Documentation/ramdisk.txt. | 1818 | See Documentation/blockdev/ramdisk.txt. |
1819 | 1819 | ||
1820 | rcupdate.blimit= [KNL,BOOT] | 1820 | rcupdate.blimit= [KNL,BOOT] |
1821 | Set maximum number of finished RCU callbacks to process | 1821 | Set maximum number of finished RCU callbacks to process |
@@ -2147,7 +2147,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2147 | See Documentation/sonypi.txt | 2147 | See Documentation/sonypi.txt |
2148 | 2148 | ||
2149 | specialix= [HW,SERIAL] Specialix multi-serial port adapter | 2149 | specialix= [HW,SERIAL] Specialix multi-serial port adapter |
2150 | See Documentation/specialix.txt. | 2150 | See Documentation/serial/specialix.txt. |
2151 | 2151 | ||
2152 | spia_io_base= [HW,MTD] | 2152 | spia_io_base= [HW,MTD] |
2153 | spia_fio_base= | 2153 | spia_fio_base= |
diff --git a/Documentation/serial/00-INDEX b/Documentation/serial/00-INDEX new file mode 100644 index 000000000000..07dcdb0d2a36 --- /dev/null +++ b/Documentation/serial/00-INDEX | |||
@@ -0,0 +1,24 @@ | |||
1 | 00-INDEX | ||
2 | - this file. | ||
3 | README.cycladesZ | ||
4 | - info on Cyclades-Z firmware loading. | ||
5 | computone.txt | ||
6 | - info on Computone Intelliport II/Plus Multiport Serial Driver. | ||
7 | digiepca.txt | ||
8 | - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards. | ||
9 | hayes-esp.txt | ||
10 | - info on using the Hayes ESP serial driver. | ||
11 | moxa-smartio | ||
12 | - file with info on installing/using Moxa multiport serial driver. | ||
13 | riscom8.txt | ||
14 | - notes on using the RISCom/8 multi-port serial driver. | ||
15 | rocket.txt | ||
16 | - info on the Comtrol RocketPort multiport serial driver. | ||
17 | specialix.txt | ||
18 | - info on hardware/driver for specialix IO8+ multiport serial card. | ||
19 | stallion.txt | ||
20 | - info on using the Stallion multiport serial driver. | ||
21 | sx.txt | ||
22 | - info on the Specialix SX/SI multiport serial driver. | ||
23 | tty.txt | ||
24 | - guide to the locking policies of the tty layer. | ||
diff --git a/Documentation/README.cycladesZ b/Documentation/serial/README.cycladesZ index 024a69443cc2..024a69443cc2 100644 --- a/Documentation/README.cycladesZ +++ b/Documentation/serial/README.cycladesZ | |||
diff --git a/Documentation/computone.txt b/Documentation/serial/computone.txt index 5e2a0c76bfa0..c57ea4781e5d 100644 --- a/Documentation/computone.txt +++ b/Documentation/serial/computone.txt | |||
@@ -247,7 +247,7 @@ shar archive to make it easier to extract the script from the documentation. | |||
247 | To create the ip2mkdev shell script change to a convenient directory (/tmp | 247 | To create the ip2mkdev shell script change to a convenient directory (/tmp |
248 | works just fine) and run the following command: | 248 | works just fine) and run the following command: |
249 | 249 | ||
250 | unshar Documentation/computone.txt | 250 | unshar Documentation/serial/computone.txt |
251 | (This file) | 251 | (This file) |
252 | 252 | ||
253 | You should now have a file ip2mkdev in your current working directory with | 253 | You should now have a file ip2mkdev in your current working directory with |
diff --git a/Documentation/digiepca.txt b/Documentation/serial/digiepca.txt index f2560e22f2c9..f2560e22f2c9 100644 --- a/Documentation/digiepca.txt +++ b/Documentation/serial/digiepca.txt | |||
diff --git a/Documentation/hayes-esp.txt b/Documentation/serial/hayes-esp.txt index 09b5d5856758..09b5d5856758 100644 --- a/Documentation/hayes-esp.txt +++ b/Documentation/serial/hayes-esp.txt | |||
diff --git a/Documentation/moxa-smartio b/Documentation/serial/moxa-smartio index 5337e80a5b96..5337e80a5b96 100644 --- a/Documentation/moxa-smartio +++ b/Documentation/serial/moxa-smartio | |||
diff --git a/Documentation/riscom8.txt b/Documentation/serial/riscom8.txt index 14f61fdad7ca..14f61fdad7ca 100644 --- a/Documentation/riscom8.txt +++ b/Documentation/serial/riscom8.txt | |||
diff --git a/Documentation/rocket.txt b/Documentation/serial/rocket.txt index 1d8582990435..1d8582990435 100644 --- a/Documentation/rocket.txt +++ b/Documentation/serial/rocket.txt | |||
diff --git a/Documentation/specialix.txt b/Documentation/serial/specialix.txt index 6eb6f3a3331c..6eb6f3a3331c 100644 --- a/Documentation/specialix.txt +++ b/Documentation/serial/specialix.txt | |||
diff --git a/Documentation/stallion.txt b/Documentation/serial/stallion.txt index 5c4902d9a5be..5c4902d9a5be 100644 --- a/Documentation/stallion.txt +++ b/Documentation/serial/stallion.txt | |||
diff --git a/Documentation/sx.txt b/Documentation/serial/sx.txt index cb4efa0fb5cc..cb4efa0fb5cc 100644 --- a/Documentation/sx.txt +++ b/Documentation/serial/sx.txt | |||
diff --git a/Documentation/tty.txt b/Documentation/serial/tty.txt index 8e65c4498c52..8e65c4498c52 100644 --- a/Documentation/tty.txt +++ b/Documentation/serial/tty.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 28 | 3 | SUBLEVEL = 28 |
4 | EXTRAVERSION = -rc4 | 4 | EXTRAVERSION = -rc5 |
5 | NAME = Killer Bat of Doom | 5 | NAME = Killer Bat of Doom |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 1cb8602dd9d5..4ed149cbb32a 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -256,8 +256,17 @@ int dmabounce_sync_for_cpu(struct device *, dma_addr_t, unsigned long, | |||
256 | int dmabounce_sync_for_device(struct device *, dma_addr_t, unsigned long, | 256 | int dmabounce_sync_for_device(struct device *, dma_addr_t, unsigned long, |
257 | size_t, enum dma_data_direction); | 257 | size_t, enum dma_data_direction); |
258 | #else | 258 | #else |
259 | #define dmabounce_sync_for_cpu(dev,dma,off,sz,dir) (1) | 259 | static inline int dmabounce_sync_for_cpu(struct device *d, dma_addr_t addr, |
260 | #define dmabounce_sync_for_device(dev,dma,off,sz,dir) (1) | 260 | unsigned long offset, size_t size, enum dma_data_direction dir) |
261 | { | ||
262 | return 1; | ||
263 | } | ||
264 | |||
265 | static inline int dmabounce_sync_for_device(struct device *d, dma_addr_t addr, | ||
266 | unsigned long offset, size_t size, enum dma_data_direction dir) | ||
267 | { | ||
268 | return 1; | ||
269 | } | ||
261 | 270 | ||
262 | 271 | ||
263 | /** | 272 | /** |
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index cb1139ac1943..39d949b63e80 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -19,12 +19,13 @@ struct map_desc { | |||
19 | }; | 19 | }; |
20 | 20 | ||
21 | /* types 0-3 are defined in asm/io.h */ | 21 | /* types 0-3 are defined in asm/io.h */ |
22 | #define MT_CACHECLEAN 4 | 22 | #define MT_UNCACHED 4 |
23 | #define MT_MINICLEAN 5 | 23 | #define MT_CACHECLEAN 5 |
24 | #define MT_LOW_VECTORS 6 | 24 | #define MT_MINICLEAN 6 |
25 | #define MT_HIGH_VECTORS 7 | 25 | #define MT_LOW_VECTORS 7 |
26 | #define MT_MEMORY 8 | 26 | #define MT_HIGH_VECTORS 8 |
27 | #define MT_ROM 9 | 27 | #define MT_MEMORY 9 |
28 | #define MT_ROM 10 | ||
28 | 29 | ||
29 | #ifdef CONFIG_MMU | 30 | #ifdef CONFIG_MMU |
30 | extern void iotable_init(struct map_desc *, int); | 31 | extern void iotable_init(struct map_desc *, int); |
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h index 4c3e101b96c9..b3ebe9e4871f 100644 --- a/arch/arm/mach-clps711x/include/mach/hardware.h +++ b/arch/arm/mach-clps711x/include/mach/hardware.h | |||
@@ -94,20 +94,6 @@ | |||
94 | #include <asm/hardware/ep7212.h> | 94 | #include <asm/hardware/ep7212.h> |
95 | #include <asm/hardware/cs89712.h> | 95 | #include <asm/hardware/cs89712.h> |
96 | 96 | ||
97 | /* dynamic ioremap() areas */ | ||
98 | #define FLASH_START 0x00000000 | ||
99 | #define FLASH_SIZE 0x800000 | ||
100 | #define FLASH_WIDTH 4 | ||
101 | |||
102 | #define SRAM_START 0x60000000 | ||
103 | #define SRAM_SIZE 0xc000 | ||
104 | #define SRAM_WIDTH 4 | ||
105 | |||
106 | #define BOOTROM_START 0x70000000 | ||
107 | #define BOOTROM_SIZE 0x80 | ||
108 | #define BOOTROM_WIDTH 4 | ||
109 | |||
110 | |||
111 | /* static cdb89712_map_io() areas */ | 97 | /* static cdb89712_map_io() areas */ |
112 | #define REGISTER_START 0x80000000 | 98 | #define REGISTER_START 0x80000000 |
113 | #define REGISTER_SIZE 0x4000 | 99 | #define REGISTER_SIZE 0x4000 |
@@ -198,14 +184,6 @@ | |||
198 | #define CEIVA_FLASH_SIZE 0x100000 | 184 | #define CEIVA_FLASH_SIZE 0x100000 |
199 | #define CEIVA_FLASH_WIDTH 2 | 185 | #define CEIVA_FLASH_WIDTH 2 |
200 | 186 | ||
201 | #define SRAM_START 0x60000000 | ||
202 | #define SRAM_SIZE 0xc000 | ||
203 | #define SRAM_WIDTH 4 | ||
204 | |||
205 | #define BOOTROM_START 0x70000000 | ||
206 | #define BOOTROM_SIZE 0x80 | ||
207 | #define BOOTROM_WIDTH 4 | ||
208 | |||
209 | /* | 187 | /* |
210 | * SED1355 LCD controller | 188 | * SED1355 LCD controller |
211 | */ | 189 | */ |
diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c index c3a33b8a5aac..7e247c04d41c 100644 --- a/arch/arm/mach-clps7500/core.c +++ b/arch/arm/mach-clps7500/core.c | |||
@@ -275,9 +275,9 @@ static struct map_desc cl7500_io_desc[] __initdata = { | |||
275 | .length = ISA_SIZE, | 275 | .length = ISA_SIZE, |
276 | .type = MT_DEVICE | 276 | .type = MT_DEVICE |
277 | }, { /* Flash */ | 277 | }, { /* Flash */ |
278 | .virtual = FLASH_BASE, | 278 | .virtual = CLPS7500_FLASH_BASE, |
279 | .pfn = __phys_to_pfn(FLASH_START), | 279 | .pfn = __phys_to_pfn(CLPS7500_FLASH_START), |
280 | .length = FLASH_SIZE, | 280 | .length = CLPS7500_FLASH_SIZE, |
281 | .type = MT_DEVICE | 281 | .type = MT_DEVICE |
282 | }, { /* LED */ | 282 | }, { /* LED */ |
283 | .virtual = LED_BASE, | 283 | .virtual = LED_BASE, |
diff --git a/arch/arm/mach-clps7500/include/mach/hardware.h b/arch/arm/mach-clps7500/include/mach/hardware.h index d66578a3371c..a6ad1d44badf 100644 --- a/arch/arm/mach-clps7500/include/mach/hardware.h +++ b/arch/arm/mach-clps7500/include/mach/hardware.h | |||
@@ -39,9 +39,9 @@ | |||
39 | #define ISA_SIZE 0x00010000 | 39 | #define ISA_SIZE 0x00010000 |
40 | #define ISA_BASE 0xe1000000 | 40 | #define ISA_BASE 0xe1000000 |
41 | 41 | ||
42 | #define FLASH_START 0x01000000 /* XXX */ | 42 | #define CLPS7500_FLASH_START 0x01000000 /* XXX */ |
43 | #define FLASH_SIZE 0x01000000 | 43 | #define CLPS7500_FLASH_SIZE 0x01000000 |
44 | #define FLASH_BASE 0xe2000000 | 44 | #define CLPS7500_FLASH_BASE 0xe2000000 |
45 | 45 | ||
46 | #define LED_START 0x0302B000 | 46 | #define LED_START 0x0302B000 |
47 | #define LED_SIZE 0x00001000 | 47 | #define LED_SIZE 0x00001000 |
diff --git a/arch/arm/mach-h720x/include/mach/boards.h b/arch/arm/mach-h720x/include/mach/boards.h index 079b279e1242..38b8e0d61fbf 100644 --- a/arch/arm/mach-h720x/include/mach/boards.h +++ b/arch/arm/mach-h720x/include/mach/boards.h | |||
@@ -19,9 +19,9 @@ | |||
19 | #ifdef CONFIG_ARCH_H7202 | 19 | #ifdef CONFIG_ARCH_H7202 |
20 | 20 | ||
21 | /* FLASH */ | 21 | /* FLASH */ |
22 | #define FLASH_VIRT 0xd0000000 | 22 | #define H720X_FLASH_VIRT 0xd0000000 |
23 | #define FLASH_PHYS 0x00000000 | 23 | #define H720X_FLASH_PHYS 0x00000000 |
24 | #define FLASH_SIZE 0x02000000 | 24 | #define H720X_FLASH_SIZE 0x02000000 |
25 | 25 | ||
26 | /* onboard LAN controller */ | 26 | /* onboard LAN controller */ |
27 | # define ETH0_PHYS 0x08000000 | 27 | # define ETH0_PHYS 0x08000000 |
diff --git a/arch/arm/mach-integrator/include/mach/platform.h b/arch/arm/mach-integrator/include/mach/platform.h index 028b87839c0f..e00a2624f269 100644 --- a/arch/arm/mach-integrator/include/mach/platform.h +++ b/arch/arm/mach-integrator/include/mach/platform.h | |||
@@ -408,27 +408,10 @@ | |||
408 | #define uHAL_MEMORY_SIZE INTEGRATOR_SSRAM_SIZE | 408 | #define uHAL_MEMORY_SIZE INTEGRATOR_SSRAM_SIZE |
409 | 409 | ||
410 | /* | 410 | /* |
411 | * Application Flash | ||
412 | * | ||
413 | */ | ||
414 | #define FLASH_BASE INTEGRATOR_FLASH_BASE | ||
415 | #define FLASH_SIZE INTEGRATOR_FLASH_SIZE | ||
416 | #define FLASH_END (FLASH_BASE + FLASH_SIZE - 1) | ||
417 | #define FLASH_BLOCK_SIZE SZ_128K | ||
418 | |||
419 | /* | ||
420 | * Boot Flash | ||
421 | * | ||
422 | */ | ||
423 | #define EPROM_BASE INTEGRATOR_BOOT_ROM_HI | ||
424 | #define EPROM_SIZE INTEGRATOR_BOOT_ROM_SIZE | ||
425 | #define EPROM_END (EPROM_BASE + EPROM_SIZE - 1) | ||
426 | |||
427 | /* | ||
428 | * Clean base - dummy | 411 | * Clean base - dummy |
429 | * | 412 | * |
430 | */ | 413 | */ |
431 | #define CLEAN_BASE EPROM_BASE | 414 | #define CLEAN_BASE INTEGRATOR_BOOT_ROM_HI |
432 | 415 | ||
433 | /* | 416 | /* |
434 | * Timer definitions | 417 | * Timer definitions |
diff --git a/arch/arm/mach-realview/clock.c b/arch/arm/mach-realview/clock.c index 3e706c57833a..3347c4236a60 100644 --- a/arch/arm/mach-realview/clock.c +++ b/arch/arm/mach-realview/clock.c | |||
@@ -104,7 +104,7 @@ static struct clk uart_clk = { | |||
104 | 104 | ||
105 | static struct clk mmci_clk = { | 105 | static struct clk mmci_clk = { |
106 | .name = "MCLK", | 106 | .name = "MCLK", |
107 | .rate = 33000000, | 107 | .rate = 24000000, |
108 | }; | 108 | }; |
109 | 109 | ||
110 | int clk_register(struct clk *clk) | 110 | int clk_register(struct clk *clk) |
diff --git a/arch/arm/mach-realview/include/mach/platform.h b/arch/arm/mach-realview/include/mach/platform.h index 4034b54950c2..793a3a332712 100644 --- a/arch/arm/mach-realview/include/mach/platform.h +++ b/arch/arm/mach-realview/include/mach/platform.h | |||
@@ -239,27 +239,10 @@ | |||
239 | #define REALVIEW_DECODE_OFFSET 0xC /* Fitted logic modules */ | 239 | #define REALVIEW_DECODE_OFFSET 0xC /* Fitted logic modules */ |
240 | 240 | ||
241 | /* | 241 | /* |
242 | * Application Flash | ||
243 | * | ||
244 | */ | ||
245 | #define FLASH_BASE REALVIEW_FLASH_BASE | ||
246 | #define FLASH_SIZE REALVIEW_FLASH_SIZE | ||
247 | #define FLASH_END (FLASH_BASE + FLASH_SIZE - 1) | ||
248 | #define FLASH_BLOCK_SIZE SZ_128K | ||
249 | |||
250 | /* | ||
251 | * Boot Flash | ||
252 | * | ||
253 | */ | ||
254 | #define EPROM_BASE REALVIEW_BOOT_ROM_HI | ||
255 | #define EPROM_SIZE REALVIEW_BOOT_ROM_SIZE | ||
256 | #define EPROM_END (EPROM_BASE + EPROM_SIZE - 1) | ||
257 | |||
258 | /* | ||
259 | * Clean base - dummy | 242 | * Clean base - dummy |
260 | * | 243 | * |
261 | */ | 244 | */ |
262 | #define CLEAN_BASE EPROM_BASE | 245 | #define CLEAN_BASE REALVIEW_BOOT_ROM_HI |
263 | 246 | ||
264 | /* | 247 | /* |
265 | * System controller bit assignment | 248 | * System controller bit assignment |
diff --git a/arch/arm/mach-versatile/clock.c b/arch/arm/mach-versatile/clock.c index 9336508ec0b2..58937f1fb38c 100644 --- a/arch/arm/mach-versatile/clock.c +++ b/arch/arm/mach-versatile/clock.c | |||
@@ -105,7 +105,7 @@ static struct clk uart_clk = { | |||
105 | 105 | ||
106 | static struct clk mmci_clk = { | 106 | static struct clk mmci_clk = { |
107 | .name = "MCLK", | 107 | .name = "MCLK", |
108 | .rate = 33000000, | 108 | .rate = 24000000, |
109 | }; | 109 | }; |
110 | 110 | ||
111 | int clk_register(struct clk *clk) | 111 | int clk_register(struct clk *clk) |
diff --git a/arch/arm/mach-versatile/include/mach/platform.h b/arch/arm/mach-versatile/include/mach/platform.h index 27cbe6a3f220..f91ba930ca8a 100644 --- a/arch/arm/mach-versatile/include/mach/platform.h +++ b/arch/arm/mach-versatile/include/mach/platform.h | |||
@@ -436,28 +436,12 @@ | |||
436 | #define SIC_INTMASK_PCI1 (1 << SIC_INT_PCI1) | 436 | #define SIC_INTMASK_PCI1 (1 << SIC_INT_PCI1) |
437 | #define SIC_INTMASK_PCI2 (1 << SIC_INT_PCI2) | 437 | #define SIC_INTMASK_PCI2 (1 << SIC_INT_PCI2) |
438 | #define SIC_INTMASK_PCI3 (1 << SIC_INT_PCI3) | 438 | #define SIC_INTMASK_PCI3 (1 << SIC_INT_PCI3) |
439 | /* | ||
440 | * Application Flash | ||
441 | * | ||
442 | */ | ||
443 | #define FLASH_BASE VERSATILE_FLASH_BASE | ||
444 | #define FLASH_SIZE VERSATILE_FLASH_SIZE | ||
445 | #define FLASH_END (FLASH_BASE + FLASH_SIZE - 1) | ||
446 | #define FLASH_BLOCK_SIZE SZ_128K | ||
447 | |||
448 | /* | ||
449 | * Boot Flash | ||
450 | * | ||
451 | */ | ||
452 | #define EPROM_BASE VERSATILE_BOOT_ROM_HI | ||
453 | #define EPROM_SIZE VERSATILE_BOOT_ROM_SIZE | ||
454 | #define EPROM_END (EPROM_BASE + EPROM_SIZE - 1) | ||
455 | 439 | ||
456 | /* | 440 | /* |
457 | * Clean base - dummy | 441 | * Clean base - dummy |
458 | * | 442 | * |
459 | */ | 443 | */ |
460 | #define CLEAN_BASE EPROM_BASE | 444 | #define CLEAN_BASE VERSATILE_BOOT_ROM_HI |
461 | 445 | ||
462 | /* | 446 | /* |
463 | * System controller bit assignment | 447 | * System controller bit assignment |
diff --git a/arch/arm/mm/cache-feroceon-l2.c b/arch/arm/mm/cache-feroceon-l2.c index 13cdae8b0d44..80cd207cbaea 100644 --- a/arch/arm/mm/cache-feroceon-l2.c +++ b/arch/arm/mm/cache-feroceon-l2.c | |||
@@ -150,7 +150,7 @@ static void feroceon_l2_inv_range(unsigned long start, unsigned long end) | |||
150 | /* | 150 | /* |
151 | * Clean and invalidate partial last cache line. | 151 | * Clean and invalidate partial last cache line. |
152 | */ | 152 | */ |
153 | if (end & (CACHE_LINE_SIZE - 1)) { | 153 | if (start < end && end & (CACHE_LINE_SIZE - 1)) { |
154 | l2_clean_inv_pa(end & ~(CACHE_LINE_SIZE - 1)); | 154 | l2_clean_inv_pa(end & ~(CACHE_LINE_SIZE - 1)); |
155 | end &= ~(CACHE_LINE_SIZE - 1); | 155 | end &= ~(CACHE_LINE_SIZE - 1); |
156 | } | 156 | } |
@@ -158,7 +158,7 @@ static void feroceon_l2_inv_range(unsigned long start, unsigned long end) | |||
158 | /* | 158 | /* |
159 | * Invalidate all full cache lines between 'start' and 'end'. | 159 | * Invalidate all full cache lines between 'start' and 'end'. |
160 | */ | 160 | */ |
161 | while (start != end) { | 161 | while (start < end) { |
162 | unsigned long range_end = calc_range_end(start, end); | 162 | unsigned long range_end = calc_range_end(start, end); |
163 | l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE); | 163 | l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE); |
164 | start = range_end; | 164 | start = range_end; |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index e63db11f16a8..7f36c825718d 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -208,6 +208,12 @@ static struct mem_type mem_types[] = { | |||
208 | .prot_sect = PROT_SECT_DEVICE, | 208 | .prot_sect = PROT_SECT_DEVICE, |
209 | .domain = DOMAIN_IO, | 209 | .domain = DOMAIN_IO, |
210 | }, | 210 | }, |
211 | [MT_UNCACHED] = { | ||
212 | .prot_pte = PROT_PTE_DEVICE, | ||
213 | .prot_l1 = PMD_TYPE_TABLE, | ||
214 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, | ||
215 | .domain = DOMAIN_IO, | ||
216 | }, | ||
211 | [MT_CACHECLEAN] = { | 217 | [MT_CACHECLEAN] = { |
212 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, | 218 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, |
213 | .domain = DOMAIN_KERNEL, | 219 | .domain = DOMAIN_KERNEL, |
diff --git a/arch/arm/plat-iop/setup.c b/arch/arm/plat-iop/setup.c index 4689db638e95..9e573e78176a 100644 --- a/arch/arm/plat-iop/setup.c +++ b/arch/arm/plat-iop/setup.c | |||
@@ -16,14 +16,15 @@ | |||
16 | #include <asm/hardware/iop3xx.h> | 16 | #include <asm/hardware/iop3xx.h> |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Standard IO mapping for all IOP3xx based systems | 19 | * Standard IO mapping for all IOP3xx based systems. Note that |
20 | * the IOP3xx OCCDR must be mapped uncached and unbuffered. | ||
20 | */ | 21 | */ |
21 | static struct map_desc iop3xx_std_desc[] __initdata = { | 22 | static struct map_desc iop3xx_std_desc[] __initdata = { |
22 | { /* mem mapped registers */ | 23 | { /* mem mapped registers */ |
23 | .virtual = IOP3XX_PERIPHERAL_VIRT_BASE, | 24 | .virtual = IOP3XX_PERIPHERAL_VIRT_BASE, |
24 | .pfn = __phys_to_pfn(IOP3XX_PERIPHERAL_PHYS_BASE), | 25 | .pfn = __phys_to_pfn(IOP3XX_PERIPHERAL_PHYS_BASE), |
25 | .length = IOP3XX_PERIPHERAL_SIZE, | 26 | .length = IOP3XX_PERIPHERAL_SIZE, |
26 | .type = MT_DEVICE, | 27 | .type = MT_UNCACHED, |
27 | }, { /* PCI IO space */ | 28 | }, { /* PCI IO space */ |
28 | .virtual = IOP3XX_PCI_LOWER_IO_VA, | 29 | .virtual = IOP3XX_PCI_LOWER_IO_VA, |
29 | .pfn = __phys_to_pfn(IOP3XX_PCI_LOWER_IO_PA), | 30 | .pfn = __phys_to_pfn(IOP3XX_PCI_LOWER_IO_PA), |
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index 7e8a0d394e61..761ee0440c99 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c | |||
@@ -133,7 +133,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, | |||
133 | { | 133 | { |
134 | int i; | 134 | int i; |
135 | 135 | ||
136 | BUG_ON(IRQ_USER + cnt >= NR_IRQS); | 136 | BUG_ON(IRQ_USER + cnt > NR_IRQS); |
137 | m68k_first_user_vec = vec; | 137 | m68k_first_user_vec = vec; |
138 | for (i = 0; i < cnt; i++) | 138 | for (i = 0; i < cnt; i++) |
139 | irq_controller[IRQ_USER + i] = &user_irq_controller; | 139 | irq_controller[IRQ_USER + i] = &user_irq_controller; |
diff --git a/arch/parisc/include/asm/smp.h b/arch/parisc/include/asm/smp.h index 398cdbaf4e54..409e698f4361 100644 --- a/arch/parisc/include/asm/smp.h +++ b/arch/parisc/include/asm/smp.h | |||
@@ -44,8 +44,6 @@ extern void arch_send_call_function_ipi(cpumask_t mask); | |||
44 | 44 | ||
45 | #define PROC_CHANGE_PENALTY 15 /* Schedule penalty */ | 45 | #define PROC_CHANGE_PENALTY 15 /* Schedule penalty */ |
46 | 46 | ||
47 | extern unsigned long cpu_present_mask; | ||
48 | |||
49 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 47 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
50 | 48 | ||
51 | #else /* CONFIG_SMP */ | 49 | #else /* CONFIG_SMP */ |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index ed500ef799b7..08844fc24a2e 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -61,22 +61,25 @@ STACK_SIZE = 1 << STACK_SHIFT | |||
61 | 61 | ||
62 | #ifdef CONFIG_TRACE_IRQFLAGS | 62 | #ifdef CONFIG_TRACE_IRQFLAGS |
63 | .macro TRACE_IRQS_ON | 63 | .macro TRACE_IRQS_ON |
64 | l %r1,BASED(.Ltrace_irq_on) | 64 | basr %r2,%r0 |
65 | l %r1,BASED(.Ltrace_irq_on_caller) | ||
65 | basr %r14,%r1 | 66 | basr %r14,%r1 |
66 | .endm | 67 | .endm |
67 | 68 | ||
68 | .macro TRACE_IRQS_OFF | 69 | .macro TRACE_IRQS_OFF |
69 | l %r1,BASED(.Ltrace_irq_off) | 70 | basr %r2,%r0 |
71 | l %r1,BASED(.Ltrace_irq_off_caller) | ||
70 | basr %r14,%r1 | 72 | basr %r14,%r1 |
71 | .endm | 73 | .endm |
72 | 74 | ||
73 | .macro TRACE_IRQS_CHECK | 75 | .macro TRACE_IRQS_CHECK |
76 | basr %r2,%r0 | ||
74 | tm SP_PSW(%r15),0x03 # irqs enabled? | 77 | tm SP_PSW(%r15),0x03 # irqs enabled? |
75 | jz 0f | 78 | jz 0f |
76 | l %r1,BASED(.Ltrace_irq_on) | 79 | l %r1,BASED(.Ltrace_irq_on_caller) |
77 | basr %r14,%r1 | 80 | basr %r14,%r1 |
78 | j 1f | 81 | j 1f |
79 | 0: l %r1,BASED(.Ltrace_irq_off) | 82 | 0: l %r1,BASED(.Ltrace_irq_off_caller) |
80 | basr %r14,%r1 | 83 | basr %r14,%r1 |
81 | 1: | 84 | 1: |
82 | .endm | 85 | .endm |
@@ -1113,9 +1116,12 @@ cleanup_io_leave_insn: | |||
1113 | .Lschedtail: .long schedule_tail | 1116 | .Lschedtail: .long schedule_tail |
1114 | .Lsysc_table: .long sys_call_table | 1117 | .Lsysc_table: .long sys_call_table |
1115 | #ifdef CONFIG_TRACE_IRQFLAGS | 1118 | #ifdef CONFIG_TRACE_IRQFLAGS |
1116 | .Ltrace_irq_on: .long trace_hardirqs_on | 1119 | .Ltrace_irq_on_caller: |
1117 | .Ltrace_irq_off: | 1120 | .long trace_hardirqs_on_caller |
1118 | .long trace_hardirqs_off | 1121 | .Ltrace_irq_off_caller: |
1122 | .long trace_hardirqs_off_caller | ||
1123 | #endif | ||
1124 | #ifdef CONFIG_LOCKDEP | ||
1119 | .Llockdep_sys_exit: | 1125 | .Llockdep_sys_exit: |
1120 | .long lockdep_sys_exit | 1126 | .long lockdep_sys_exit |
1121 | #endif | 1127 | #endif |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index d7ce150453f2..41aca06682aa 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -61,19 +61,22 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \ | |||
61 | 61 | ||
62 | #ifdef CONFIG_TRACE_IRQFLAGS | 62 | #ifdef CONFIG_TRACE_IRQFLAGS |
63 | .macro TRACE_IRQS_ON | 63 | .macro TRACE_IRQS_ON |
64 | brasl %r14,trace_hardirqs_on | 64 | basr %r2,%r0 |
65 | brasl %r14,trace_hardirqs_on_caller | ||
65 | .endm | 66 | .endm |
66 | 67 | ||
67 | .macro TRACE_IRQS_OFF | 68 | .macro TRACE_IRQS_OFF |
68 | brasl %r14,trace_hardirqs_off | 69 | basr %r2,%r0 |
70 | brasl %r14,trace_hardirqs_off_caller | ||
69 | .endm | 71 | .endm |
70 | 72 | ||
71 | .macro TRACE_IRQS_CHECK | 73 | .macro TRACE_IRQS_CHECK |
74 | basr %r2,%r0 | ||
72 | tm SP_PSW(%r15),0x03 # irqs enabled? | 75 | tm SP_PSW(%r15),0x03 # irqs enabled? |
73 | jz 0f | 76 | jz 0f |
74 | brasl %r14,trace_hardirqs_on | 77 | brasl %r14,trace_hardirqs_on_caller |
75 | j 1f | 78 | j 1f |
76 | 0: brasl %r14,trace_hardirqs_off | 79 | 0: brasl %r14,trace_hardirqs_off_caller |
77 | 1: | 80 | 1: |
78 | .endm | 81 | .endm |
79 | #else | 82 | #else |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 3e2c05cb6a87..04f8c67a6101 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -136,9 +136,12 @@ static void default_idle(void) | |||
136 | return; | 136 | return; |
137 | } | 137 | } |
138 | trace_hardirqs_on(); | 138 | trace_hardirqs_on(); |
139 | /* Don't trace preempt off for idle. */ | ||
140 | stop_critical_timings(); | ||
139 | /* Wait for external, I/O or machine check interrupt. */ | 141 | /* Wait for external, I/O or machine check interrupt. */ |
140 | __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | | 142 | __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | |
141 | PSW_MASK_IO | PSW_MASK_EXT); | 143 | PSW_MASK_IO | PSW_MASK_EXT); |
144 | start_critical_timings(); | ||
142 | } | 145 | } |
143 | 146 | ||
144 | void cpu_idle(void) | 147 | void cpu_idle(void) |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 62122bad1e33..400b040df7fa 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -604,13 +604,13 @@ setup_memory(void) | |||
604 | if (memory_chunk[i].type != CHUNK_READ_WRITE) | 604 | if (memory_chunk[i].type != CHUNK_READ_WRITE) |
605 | continue; | 605 | continue; |
606 | start_chunk = PFN_DOWN(memory_chunk[i].addr); | 606 | start_chunk = PFN_DOWN(memory_chunk[i].addr); |
607 | end_chunk = start_chunk + PFN_DOWN(memory_chunk[i].size) - 1; | 607 | end_chunk = start_chunk + PFN_DOWN(memory_chunk[i].size); |
608 | end_chunk = min(end_chunk, end_pfn); | 608 | end_chunk = min(end_chunk, end_pfn); |
609 | if (start_chunk >= end_chunk) | 609 | if (start_chunk >= end_chunk) |
610 | continue; | 610 | continue; |
611 | add_active_range(0, start_chunk, end_chunk); | 611 | add_active_range(0, start_chunk, end_chunk); |
612 | pfn = max(start_chunk, start_pfn); | 612 | pfn = max(start_chunk, start_pfn); |
613 | for (; pfn <= end_chunk; pfn++) | 613 | for (; pfn < end_chunk; pfn++) |
614 | page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY); | 614 | page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY); |
615 | } | 615 | } |
616 | 616 | ||
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c index 5fdb799062b7..4fe952e557ac 100644 --- a/arch/s390/kernel/sys_s390.c +++ b/arch/s390/kernel/sys_s390.c | |||
@@ -198,7 +198,7 @@ asmlinkage long s390x_newuname(struct new_utsname __user *name) | |||
198 | { | 198 | { |
199 | int ret = sys_newuname(name); | 199 | int ret = sys_newuname(name); |
200 | 200 | ||
201 | if (current->personality == PER_LINUX32 && !ret) { | 201 | if (personality(current->personality) == PER_LINUX32 && !ret) { |
202 | ret = copy_to_user(name->machine, "s390\0\0\0\0", 8); | 202 | ret = copy_to_user(name->machine, "s390\0\0\0\0", 8); |
203 | if (ret) ret = -EFAULT; | 203 | if (ret) ret = -EFAULT; |
204 | } | 204 | } |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 632b13e10053..a947899dcba1 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -65,18 +65,21 @@ static int machine_has_topology_irq; | |||
65 | static struct timer_list topology_timer; | 65 | static struct timer_list topology_timer; |
66 | static void set_topology_timer(void); | 66 | static void set_topology_timer(void); |
67 | static DECLARE_WORK(topology_work, topology_work_fn); | 67 | static DECLARE_WORK(topology_work, topology_work_fn); |
68 | /* topology_lock protects the core linked list */ | ||
69 | static DEFINE_SPINLOCK(topology_lock); | ||
68 | 70 | ||
69 | cpumask_t cpu_core_map[NR_CPUS]; | 71 | cpumask_t cpu_core_map[NR_CPUS]; |
70 | 72 | ||
71 | cpumask_t cpu_coregroup_map(unsigned int cpu) | 73 | cpumask_t cpu_coregroup_map(unsigned int cpu) |
72 | { | 74 | { |
73 | struct core_info *core = &core_info; | 75 | struct core_info *core = &core_info; |
76 | unsigned long flags; | ||
74 | cpumask_t mask; | 77 | cpumask_t mask; |
75 | 78 | ||
76 | cpus_clear(mask); | 79 | cpus_clear(mask); |
77 | if (!machine_has_topology) | 80 | if (!machine_has_topology) |
78 | return cpu_present_map; | 81 | return cpu_present_map; |
79 | mutex_lock(&smp_cpu_state_mutex); | 82 | spin_lock_irqsave(&topology_lock, flags); |
80 | while (core) { | 83 | while (core) { |
81 | if (cpu_isset(cpu, core->mask)) { | 84 | if (cpu_isset(cpu, core->mask)) { |
82 | mask = core->mask; | 85 | mask = core->mask; |
@@ -84,7 +87,7 @@ cpumask_t cpu_coregroup_map(unsigned int cpu) | |||
84 | } | 87 | } |
85 | core = core->next; | 88 | core = core->next; |
86 | } | 89 | } |
87 | mutex_unlock(&smp_cpu_state_mutex); | 90 | spin_unlock_irqrestore(&topology_lock, flags); |
88 | if (cpus_empty(mask)) | 91 | if (cpus_empty(mask)) |
89 | mask = cpumask_of_cpu(cpu); | 92 | mask = cpumask_of_cpu(cpu); |
90 | return mask; | 93 | return mask; |
@@ -133,7 +136,7 @@ static void tl_to_cores(struct tl_info *info) | |||
133 | union tl_entry *tle, *end; | 136 | union tl_entry *tle, *end; |
134 | struct core_info *core = &core_info; | 137 | struct core_info *core = &core_info; |
135 | 138 | ||
136 | mutex_lock(&smp_cpu_state_mutex); | 139 | spin_lock_irq(&topology_lock); |
137 | clear_cores(); | 140 | clear_cores(); |
138 | tle = info->tle; | 141 | tle = info->tle; |
139 | end = (union tl_entry *)((unsigned long)info + info->length); | 142 | end = (union tl_entry *)((unsigned long)info + info->length); |
@@ -157,7 +160,7 @@ static void tl_to_cores(struct tl_info *info) | |||
157 | } | 160 | } |
158 | tle = next_tle(tle); | 161 | tle = next_tle(tle); |
159 | } | 162 | } |
160 | mutex_unlock(&smp_cpu_state_mutex); | 163 | spin_unlock_irq(&topology_lock); |
161 | } | 164 | } |
162 | 165 | ||
163 | static void topology_update_polarization_simple(void) | 166 | static void topology_update_polarization_simple(void) |
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 436c28539577..65eaae34e753 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h | |||
@@ -293,6 +293,10 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) | |||
293 | */ | 293 | */ |
294 | #define xlate_dev_kmem_ptr(p) p | 294 | #define xlate_dev_kmem_ptr(p) p |
295 | 295 | ||
296 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE | ||
297 | int valid_phys_addr_range(unsigned long addr, size_t size); | ||
298 | int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); | ||
299 | |||
296 | #endif /* __KERNEL__ */ | 300 | #endif /* __KERNEL__ */ |
297 | 301 | ||
298 | #endif /* __ASM_SH_IO_H */ | 302 | #endif /* __ASM_SH_IO_H */ |
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h index 52220d70a096..b517ae08b9c0 100644 --- a/arch/sh/include/asm/pgtable.h +++ b/arch/sh/include/asm/pgtable.h | |||
@@ -148,6 +148,12 @@ extern void paging_init(void); | |||
148 | extern void page_table_range_init(unsigned long start, unsigned long end, | 148 | extern void page_table_range_init(unsigned long start, unsigned long end, |
149 | pgd_t *pgd); | 149 | pgd_t *pgd); |
150 | 150 | ||
151 | #if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_CPU_SH4) && defined(CONFIG_MMU) | ||
152 | extern void kmap_coherent_init(void); | ||
153 | #else | ||
154 | #define kmap_coherent_init() do { } while (0) | ||
155 | #endif | ||
156 | |||
151 | #include <asm-generic/pgtable.h> | 157 | #include <asm-generic/pgtable.h> |
152 | 158 | ||
153 | #endif /* __ASM_SH_PGTABLE_H */ | 159 | #endif /* __ASM_SH_PGTABLE_H */ |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index a7412cede534..6d9e6972cfc9 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c | |||
@@ -119,17 +119,17 @@ static struct plat_sci_port sci_platform_data[] = { | |||
119 | },{ | 119 | },{ |
120 | .mapbase = 0xa4e30000, | 120 | .mapbase = 0xa4e30000, |
121 | .flags = UPF_BOOT_AUTOCONF, | 121 | .flags = UPF_BOOT_AUTOCONF, |
122 | .type = PORT_SCI, | 122 | .type = PORT_SCIFA, |
123 | .irqs = { 56, 56, 56, 56 }, | 123 | .irqs = { 56, 56, 56, 56 }, |
124 | },{ | 124 | },{ |
125 | .mapbase = 0xa4e40000, | 125 | .mapbase = 0xa4e40000, |
126 | .flags = UPF_BOOT_AUTOCONF, | 126 | .flags = UPF_BOOT_AUTOCONF, |
127 | .type = PORT_SCI, | 127 | .type = PORT_SCIFA, |
128 | .irqs = { 88, 88, 88, 88 }, | 128 | .irqs = { 88, 88, 88, 88 }, |
129 | },{ | 129 | },{ |
130 | .mapbase = 0xa4e50000, | 130 | .mapbase = 0xa4e50000, |
131 | .flags = UPF_BOOT_AUTOCONF, | 131 | .flags = UPF_BOOT_AUTOCONF, |
132 | .type = PORT_SCI, | 132 | .type = PORT_SCIFA, |
133 | .irqs = { 109, 109, 109, 109 }, | 133 | .irqs = { 109, 109, 109, 109 }, |
134 | }, { | 134 | }, { |
135 | .flags = 0, | 135 | .flags = 0, |
diff --git a/arch/sh/kernel/early_printk.c b/arch/sh/kernel/early_printk.c index 6b7d166694e2..a952dcf9999d 100644 --- a/arch/sh/kernel/early_printk.c +++ b/arch/sh/kernel/early_printk.c | |||
@@ -75,6 +75,7 @@ static struct console bios_console = { | |||
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | static struct uart_port scif_port = { | 77 | static struct uart_port scif_port = { |
78 | .type = PORT_SCIF, | ||
78 | .mapbase = CONFIG_EARLY_SCIF_CONSOLE_PORT, | 79 | .mapbase = CONFIG_EARLY_SCIF_CONSOLE_PORT, |
79 | .membase = (char __iomem *)CONFIG_EARLY_SCIF_CONSOLE_PORT, | 80 | .membase = (char __iomem *)CONFIG_EARLY_SCIF_CONSOLE_PORT, |
80 | }; | 81 | }; |
@@ -84,9 +85,9 @@ static void scif_sercon_putc(int c) | |||
84 | while (((sci_in(&scif_port, SCFDR) & EPK_FIFO_BITS) >= EPK_FIFO_SIZE)) | 85 | while (((sci_in(&scif_port, SCFDR) & EPK_FIFO_BITS) >= EPK_FIFO_SIZE)) |
85 | ; | 86 | ; |
86 | 87 | ||
87 | sci_out(&scif_port, SCxTDR, c); | ||
88 | sci_in(&scif_port, SCxSR); | 88 | sci_in(&scif_port, SCxSR); |
89 | sci_out(&scif_port, SCxSR, 0xf3 & ~(0x20 | 0x40)); | 89 | sci_out(&scif_port, SCxSR, 0xf3 & ~(0x20 | 0x40)); |
90 | sci_out(&scif_port, SCxTDR, c); | ||
90 | 91 | ||
91 | while ((sci_in(&scif_port, SCxSR) & 0x40) == 0) | 92 | while ((sci_in(&scif_port, SCxSR) & 0x40) == 0) |
92 | ; | 93 | ; |
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index aaaf90d06b85..3c61ddd4d43e 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c | |||
@@ -120,7 +120,7 @@ static void tmu_set_mode(enum clock_event_mode mode, | |||
120 | { | 120 | { |
121 | switch (mode) { | 121 | switch (mode) { |
122 | case CLOCK_EVT_MODE_PERIODIC: | 122 | case CLOCK_EVT_MODE_PERIODIC: |
123 | ctrl_outl(ctrl_inl(TMU0_TCNT), TMU0_TCOR); | 123 | ctrl_outl(tmu_latest_interval[TMU0], TMU0_TCOR); |
124 | break; | 124 | break; |
125 | case CLOCK_EVT_MODE_ONESHOT: | 125 | case CLOCK_EVT_MODE_ONESHOT: |
126 | ctrl_outl(0, TMU0_TCOR); | 126 | ctrl_outl(0, TMU0_TCOR); |
diff --git a/arch/sh/lib/copy_page.S b/arch/sh/lib/copy_page.S index 5d12e657be34..43de7e8e4e17 100644 --- a/arch/sh/lib/copy_page.S +++ b/arch/sh/lib/copy_page.S | |||
@@ -80,6 +80,11 @@ ENTRY(copy_page) | |||
80 | .section __ex_table, "a"; \ | 80 | .section __ex_table, "a"; \ |
81 | .long 9999b, 6000f ; \ | 81 | .long 9999b, 6000f ; \ |
82 | .previous | 82 | .previous |
83 | #define EX_NO_POP(...) \ | ||
84 | 9999: __VA_ARGS__ ; \ | ||
85 | .section __ex_table, "a"; \ | ||
86 | .long 9999b, 6005f ; \ | ||
87 | .previous | ||
83 | ENTRY(__copy_user) | 88 | ENTRY(__copy_user) |
84 | ! Check if small number of bytes | 89 | ! Check if small number of bytes |
85 | mov #11,r0 | 90 | mov #11,r0 |
@@ -139,9 +144,9 @@ EX( mov.b r1,@r4 ) | |||
139 | bt 1f | 144 | bt 1f |
140 | 145 | ||
141 | 2: | 146 | 2: |
142 | EX( mov.b @r5+,r0 ) | 147 | EX_NO_POP( mov.b @r5+,r0 ) |
143 | dt r6 | 148 | dt r6 |
144 | EX( mov.b r0,@r4 ) | 149 | EX_NO_POP( mov.b r0,@r4 ) |
145 | bf/s 2b | 150 | bf/s 2b |
146 | add #1,r4 | 151 | add #1,r4 |
147 | 152 | ||
@@ -150,7 +155,7 @@ EX( mov.b r0,@r4 ) | |||
150 | 155 | ||
151 | # Exception handler: | 156 | # Exception handler: |
152 | .section .fixup, "ax" | 157 | .section .fixup, "ax" |
153 | 6000: | 158 | 6005: |
154 | mov.l 8000f,r1 | 159 | mov.l 8000f,r1 |
155 | mov r3,r0 | 160 | mov r3,r0 |
156 | jmp @r1 | 161 | jmp @r1 |
diff --git a/arch/sh/mm/Makefile_32 b/arch/sh/mm/Makefile_32 index 70e0906023cc..f066e76da204 100644 --- a/arch/sh/mm/Makefile_32 +++ b/arch/sh/mm/Makefile_32 | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the Linux SuperH-specific parts of the memory manager. | 2 | # Makefile for the Linux SuperH-specific parts of the memory manager. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := init.o extable_32.o consistent.o | 5 | obj-y := init.o extable_32.o consistent.o mmap.o |
6 | 6 | ||
7 | ifndef CONFIG_CACHE_OFF | 7 | ifndef CONFIG_CACHE_OFF |
8 | cache-$(CONFIG_CPU_SH2) := cache-sh2.o | 8 | cache-$(CONFIG_CPU_SH2) := cache-sh2.o |
diff --git a/arch/sh/mm/Makefile_64 b/arch/sh/mm/Makefile_64 index 0d92a8a3ac9a..9481d0f54efd 100644 --- a/arch/sh/mm/Makefile_64 +++ b/arch/sh/mm/Makefile_64 | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the Linux SuperH-specific parts of the memory manager. | 2 | # Makefile for the Linux SuperH-specific parts of the memory manager. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := init.o consistent.o | 5 | obj-y := init.o consistent.o mmap.o |
6 | 6 | ||
7 | mmu-y := tlb-nommu.o pg-nommu.o extable_32.o | 7 | mmu-y := tlb-nommu.o pg-nommu.o extable_32.o |
8 | mmu-$(CONFIG_MMU) := fault_64.o ioremap_64.o tlbflush_64.o tlb-sh5.o \ | 8 | mmu-$(CONFIG_MMU) := fault_64.o ioremap_64.o tlbflush_64.o tlb-sh5.o \ |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 4abf00031dae..6cbef8caeb56 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -137,6 +137,7 @@ void __init page_table_range_init(unsigned long start, unsigned long end, | |||
137 | void __init paging_init(void) | 137 | void __init paging_init(void) |
138 | { | 138 | { |
139 | unsigned long max_zone_pfns[MAX_NR_ZONES]; | 139 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
140 | unsigned long vaddr; | ||
140 | int nid; | 141 | int nid; |
141 | 142 | ||
142 | /* We don't need to map the kernel through the TLB, as | 143 | /* We don't need to map the kernel through the TLB, as |
@@ -148,10 +149,15 @@ void __init paging_init(void) | |||
148 | * check for a null value. */ | 149 | * check for a null value. */ |
149 | set_TTB(swapper_pg_dir); | 150 | set_TTB(swapper_pg_dir); |
150 | 151 | ||
151 | /* Populate the relevant portions of swapper_pg_dir so that | 152 | /* |
153 | * Populate the relevant portions of swapper_pg_dir so that | ||
152 | * we can use the fixmap entries without calling kmalloc. | 154 | * we can use the fixmap entries without calling kmalloc. |
153 | * pte's will be filled in by __set_fixmap(). */ | 155 | * pte's will be filled in by __set_fixmap(). |
154 | page_table_range_init(FIXADDR_START, FIXADDR_TOP, swapper_pg_dir); | 156 | */ |
157 | vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK; | ||
158 | page_table_range_init(vaddr, 0, swapper_pg_dir); | ||
159 | |||
160 | kmap_coherent_init(); | ||
155 | 161 | ||
156 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | 162 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
157 | 163 | ||
diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c new file mode 100644 index 000000000000..8837d511710a --- /dev/null +++ b/arch/sh/mm/mmap.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * arch/sh/mm/mmap.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Paul Mundt | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/io.h> | ||
11 | #include <linux/mm.h> | ||
12 | #include <asm/page.h> | ||
13 | |||
14 | /* | ||
15 | * You really shouldn't be using read() or write() on /dev/mem. This | ||
16 | * might go away in the future. | ||
17 | */ | ||
18 | int valid_phys_addr_range(unsigned long addr, size_t count) | ||
19 | { | ||
20 | if (addr < __MEMORY_START) | ||
21 | return 0; | ||
22 | if (addr + count > __pa(high_memory)) | ||
23 | return 0; | ||
24 | |||
25 | return 1; | ||
26 | } | ||
27 | |||
28 | int valid_mmap_phys_addr_range(unsigned long pfn, size_t size) | ||
29 | { | ||
30 | return 1; | ||
31 | } | ||
diff --git a/arch/sh/mm/pg-sh4.c b/arch/sh/mm/pg-sh4.c index 38870e0fc182..2fe14da1f839 100644 --- a/arch/sh/mm/pg-sh4.c +++ b/arch/sh/mm/pg-sh4.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Released under the terms of the GNU GPL v2.0. | 7 | * Released under the terms of the GNU GPL v2.0. |
8 | */ | 8 | */ |
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/init.h> | ||
10 | #include <linux/mutex.h> | 11 | #include <linux/mutex.h> |
11 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
12 | #include <linux/highmem.h> | 13 | #include <linux/highmem.h> |
@@ -16,6 +17,20 @@ | |||
16 | 17 | ||
17 | #define CACHE_ALIAS (current_cpu_data.dcache.alias_mask) | 18 | #define CACHE_ALIAS (current_cpu_data.dcache.alias_mask) |
18 | 19 | ||
20 | #define kmap_get_fixmap_pte(vaddr) \ | ||
21 | pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)), (vaddr)) | ||
22 | |||
23 | static pte_t *kmap_coherent_pte; | ||
24 | |||
25 | void __init kmap_coherent_init(void) | ||
26 | { | ||
27 | unsigned long vaddr; | ||
28 | |||
29 | /* cache the first coherent kmap pte */ | ||
30 | vaddr = __fix_to_virt(FIX_CMAP_BEGIN); | ||
31 | kmap_coherent_pte = kmap_get_fixmap_pte(vaddr); | ||
32 | } | ||
33 | |||
19 | static inline void *kmap_coherent(struct page *page, unsigned long addr) | 34 | static inline void *kmap_coherent(struct page *page, unsigned long addr) |
20 | { | 35 | { |
21 | enum fixed_addresses idx; | 36 | enum fixed_addresses idx; |
@@ -34,6 +49,8 @@ static inline void *kmap_coherent(struct page *page, unsigned long addr) | |||
34 | 49 | ||
35 | update_mmu_cache(NULL, vaddr, pte); | 50 | update_mmu_cache(NULL, vaddr, pte); |
36 | 51 | ||
52 | set_pte(kmap_coherent_pte - (FIX_CMAP_END - idx), pte); | ||
53 | |||
37 | return (void *)vaddr; | 54 | return (void *)vaddr; |
38 | } | 55 | } |
39 | 56 | ||
diff --git a/arch/x86/include/asm/iommu.h b/arch/x86/include/asm/iommu.h index e4a552d44465..0b500c5b6446 100644 --- a/arch/x86/include/asm/iommu.h +++ b/arch/x86/include/asm/iommu.h | |||
@@ -6,7 +6,6 @@ extern void no_iommu_init(void); | |||
6 | extern struct dma_mapping_ops nommu_dma_ops; | 6 | extern struct dma_mapping_ops nommu_dma_ops; |
7 | extern int force_iommu, no_iommu; | 7 | extern int force_iommu, no_iommu; |
8 | extern int iommu_detected; | 8 | extern int iommu_detected; |
9 | extern int dmar_disabled; | ||
10 | 9 | ||
11 | extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len); | 10 | extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len); |
12 | 11 | ||
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 3ce029ffaa55..1b894b72c0f5 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -188,20 +188,6 @@ static void __init ati_bugs_contd(int num, int slot, int func) | |||
188 | } | 188 | } |
189 | #endif | 189 | #endif |
190 | 190 | ||
191 | #ifdef CONFIG_DMAR | ||
192 | static void __init intel_g33_dmar(int num, int slot, int func) | ||
193 | { | ||
194 | struct acpi_table_header *dmar_tbl; | ||
195 | acpi_status status; | ||
196 | |||
197 | status = acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_tbl); | ||
198 | if (ACPI_SUCCESS(status)) { | ||
199 | printk(KERN_INFO "BIOS BUG: DMAR advertised on Intel G31/G33 chipset -- ignoring\n"); | ||
200 | dmar_disabled = 1; | ||
201 | } | ||
202 | } | ||
203 | #endif | ||
204 | |||
205 | #define QFLAG_APPLY_ONCE 0x1 | 191 | #define QFLAG_APPLY_ONCE 0x1 |
206 | #define QFLAG_APPLIED 0x2 | 192 | #define QFLAG_APPLIED 0x2 |
207 | #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) | 193 | #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) |
@@ -225,10 +211,6 @@ static struct chipset early_qrk[] __initdata = { | |||
225 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, | 211 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, |
226 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, | 212 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, |
227 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, | 213 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, |
228 | #ifdef CONFIG_DMAR | ||
229 | { PCI_VENDOR_ID_INTEL, 0x29c0, | ||
230 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, intel_g33_dmar }, | ||
231 | #endif | ||
232 | {} | 214 | {} |
233 | }; | 215 | }; |
234 | 216 | ||
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 4b4739486327..9033d164c4ec 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -1227,10 +1227,19 @@ fsm_start: | |||
1227 | /* ATA PIO protocol */ | 1227 | /* ATA PIO protocol */ |
1228 | if (unlikely((status & ATA_DRQ) == 0)) { | 1228 | if (unlikely((status & ATA_DRQ) == 0)) { |
1229 | /* handle BSY=0, DRQ=0 as error */ | 1229 | /* handle BSY=0, DRQ=0 as error */ |
1230 | if (likely(status & (ATA_ERR | ATA_DF))) | 1230 | if (likely(status & (ATA_ERR | ATA_DF))) { |
1231 | /* device stops HSM for abort/error */ | 1231 | /* device stops HSM for abort/error */ |
1232 | qc->err_mask |= AC_ERR_DEV; | 1232 | qc->err_mask |= AC_ERR_DEV; |
1233 | else { | 1233 | |
1234 | /* If diagnostic failed and this is | ||
1235 | * IDENTIFY, it's likely a phantom | ||
1236 | * device. Mark hint. | ||
1237 | */ | ||
1238 | if (qc->dev->horkage & | ||
1239 | ATA_HORKAGE_DIAGNOSTIC) | ||
1240 | qc->err_mask |= | ||
1241 | AC_ERR_NODEV_HINT; | ||
1242 | } else { | ||
1234 | /* HSM violation. Let EH handle this. | 1243 | /* HSM violation. Let EH handle this. |
1235 | * Phantom devices also trigger this | 1244 | * Phantom devices also trigger this |
1236 | * condition. Mark hint. | 1245 | * condition. Mark hint. |
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 61ad8d639ba3..0344a8a8321d 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig | |||
@@ -21,7 +21,8 @@ config BLK_DEV_FD | |||
21 | ---help--- | 21 | ---help--- |
22 | If you want to use the floppy disk drive(s) of your PC under Linux, | 22 | If you want to use the floppy disk drive(s) of your PC under Linux, |
23 | say Y. Information about this driver, especially important for IBM | 23 | say Y. Information about this driver, especially important for IBM |
24 | Thinkpad users, is contained in <file:Documentation/floppy.txt>. | 24 | Thinkpad users, is contained in |
25 | <file:Documentation/blockdev/floppy.txt>. | ||
25 | That file also contains the location of the Floppy driver FAQ as | 26 | That file also contains the location of the Floppy driver FAQ as |
26 | well as location of the fdutils package used to configure additional | 27 | well as location of the fdutils package used to configure additional |
27 | parameters of the driver at run time. | 28 | parameters of the driver at run time. |
@@ -76,7 +77,7 @@ config PARIDE | |||
76 | your computer's parallel port. Most of them are actually IDE devices | 77 | your computer's parallel port. Most of them are actually IDE devices |
77 | using a parallel port IDE adapter. This option enables the PARIDE | 78 | using a parallel port IDE adapter. This option enables the PARIDE |
78 | subsystem which contains drivers for many of these external drives. | 79 | subsystem which contains drivers for many of these external drives. |
79 | Read <file:Documentation/paride.txt> for more information. | 80 | Read <file:Documentation/blockdev/paride.txt> for more information. |
80 | 81 | ||
81 | If you have said Y to the "Parallel-port support" configuration | 82 | If you have said Y to the "Parallel-port support" configuration |
82 | option, you may share a single port between your printer and other | 83 | option, you may share a single port between your printer and other |
@@ -114,9 +115,9 @@ config BLK_CPQ_DA | |||
114 | help | 115 | help |
115 | This is the driver for Compaq Smart Array controllers. Everyone | 116 | This is the driver for Compaq Smart Array controllers. Everyone |
116 | using these boards should say Y here. See the file | 117 | using these boards should say Y here. See the file |
117 | <file:Documentation/cpqarray.txt> for the current list of boards | 118 | <file:Documentation/blockdev/cpqarray.txt> for the current list of |
118 | supported by this driver, and for further information on the use of | 119 | boards supported by this driver, and for further information on the |
119 | this driver. | 120 | use of this driver. |
120 | 121 | ||
121 | config BLK_CPQ_CISS_DA | 122 | config BLK_CPQ_CISS_DA |
122 | tristate "Compaq Smart Array 5xxx support" | 123 | tristate "Compaq Smart Array 5xxx support" |
@@ -124,7 +125,7 @@ config BLK_CPQ_CISS_DA | |||
124 | help | 125 | help |
125 | This is the driver for Compaq Smart Array 5xxx controllers. | 126 | This is the driver for Compaq Smart Array 5xxx controllers. |
126 | Everyone using these boards should say Y here. | 127 | Everyone using these boards should say Y here. |
127 | See <file:Documentation/cciss.txt> for the current list of | 128 | See <file:Documentation/blockdev/cciss.txt> for the current list of |
128 | boards supported by this driver, and for further information | 129 | boards supported by this driver, and for further information |
129 | on the use of this driver. | 130 | on the use of this driver. |
130 | 131 | ||
@@ -135,7 +136,7 @@ config CISS_SCSI_TAPE | |||
135 | help | 136 | help |
136 | When enabled (Y), this option allows SCSI tape drives and SCSI medium | 137 | When enabled (Y), this option allows SCSI tape drives and SCSI medium |
137 | changers (tape robots) to be accessed via a Compaq 5xxx array | 138 | changers (tape robots) to be accessed via a Compaq 5xxx array |
138 | controller. (See <file:Documentation/cciss.txt> for more details.) | 139 | controller. (See <file:Documentation/blockdev/cciss.txt> for more details.) |
139 | 140 | ||
140 | "SCSI support" and "SCSI tape support" must also be enabled for this | 141 | "SCSI support" and "SCSI tape support" must also be enabled for this |
141 | option to work. | 142 | option to work. |
@@ -149,8 +150,8 @@ config BLK_DEV_DAC960 | |||
149 | help | 150 | help |
150 | This driver adds support for the Mylex DAC960, AcceleRAID, and | 151 | This driver adds support for the Mylex DAC960, AcceleRAID, and |
151 | eXtremeRAID PCI RAID controllers. See the file | 152 | eXtremeRAID PCI RAID controllers. See the file |
152 | <file:Documentation/README.DAC960> for further information about | 153 | <file:Documentation/blockdev/README.DAC960> for further information |
153 | this driver. | 154 | about this driver. |
154 | 155 | ||
155 | To compile this driver as a module, choose M here: the | 156 | To compile this driver as a module, choose M here: the |
156 | module will be called DAC960. | 157 | module will be called DAC960. |
@@ -278,9 +279,9 @@ config BLK_DEV_NBD | |||
278 | userland (making server and client physically the same computer, | 279 | userland (making server and client physically the same computer, |
279 | communicating using the loopback network device). | 280 | communicating using the loopback network device). |
280 | 281 | ||
281 | Read <file:Documentation/nbd.txt> for more information, especially | 282 | Read <file:Documentation/blockdev/nbd.txt> for more information, |
282 | about where to find the server code, which runs in user space and | 283 | especially about where to find the server code, which runs in user |
283 | does not need special kernel support. | 284 | space and does not need special kernel support. |
284 | 285 | ||
285 | Note that this has nothing to do with the network file systems NFS | 286 | Note that this has nothing to do with the network file systems NFS |
286 | or Coda; you can say N here even if you intend to use NFS or Coda. | 287 | or Coda; you can say N here even if you intend to use NFS or Coda. |
@@ -321,8 +322,8 @@ config BLK_DEV_RAM | |||
321 | store a copy of a minimal root file system off of a floppy into RAM | 322 | store a copy of a minimal root file system off of a floppy into RAM |
322 | during the initial install of Linux. | 323 | during the initial install of Linux. |
323 | 324 | ||
324 | Note that the kernel command line option "ramdisk=XX" is now | 325 | Note that the kernel command line option "ramdisk=XX" is now obsolete. |
325 | obsolete. For details, read <file:Documentation/ramdisk.txt>. | 326 | For details, read <file:Documentation/blockdev/ramdisk.txt>. |
326 | 327 | ||
327 | To compile this driver as a module, choose M here: the | 328 | To compile this driver as a module, choose M here: the |
328 | module will be called rd. | 329 | module will be called rd. |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 14db747a636e..cf29cc4e6ab7 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -4124,7 +4124,7 @@ static int __init floppy_setup(char *str) | |||
4124 | printk("\n"); | 4124 | printk("\n"); |
4125 | } else | 4125 | } else |
4126 | DPRINT("botched floppy option\n"); | 4126 | DPRINT("botched floppy option\n"); |
4127 | DPRINT("Read Documentation/floppy.txt\n"); | 4127 | DPRINT("Read Documentation/blockdev/floppy.txt\n"); |
4128 | return 0; | 4128 | return 0; |
4129 | } | 4129 | } |
4130 | 4130 | ||
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index fccac18d3111..048d71d244d7 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -1546,8 +1546,6 @@ static void ub_top_sense_done(struct ub_dev *sc, struct ub_scsi_cmd *scmd) | |||
1546 | 1546 | ||
1547 | /* | 1547 | /* |
1548 | * Reset management | 1548 | * Reset management |
1549 | * XXX Move usb_reset_device to khubd. Hogging kevent is not a good thing. | ||
1550 | * XXX Make usb_sync_reset asynchronous. | ||
1551 | */ | 1549 | */ |
1552 | 1550 | ||
1553 | static void ub_reset_enter(struct ub_dev *sc, int try) | 1551 | static void ub_reset_enter(struct ub_dev *sc, int try) |
@@ -1633,6 +1631,22 @@ static void ub_reset_task(struct work_struct *work) | |||
1633 | } | 1631 | } |
1634 | 1632 | ||
1635 | /* | 1633 | /* |
1634 | * XXX Reset brackets are too much hassle to implement, so just stub them | ||
1635 | * in order to prevent forced unbinding (which deadlocks solid when our | ||
1636 | * ->disconnect method waits for the reset to complete and this kills keventd). | ||
1637 | * | ||
1638 | * XXX Tell Alan to move usb_unlock_device inside of usb_reset_device, | ||
1639 | * or else the post_reset is invoked, and restats I/O on a locked device. | ||
1640 | */ | ||
1641 | static int ub_pre_reset(struct usb_interface *iface) { | ||
1642 | return 0; | ||
1643 | } | ||
1644 | |||
1645 | static int ub_post_reset(struct usb_interface *iface) { | ||
1646 | return 0; | ||
1647 | } | ||
1648 | |||
1649 | /* | ||
1636 | * This is called from a process context. | 1650 | * This is called from a process context. |
1637 | */ | 1651 | */ |
1638 | static void ub_revalidate(struct ub_dev *sc, struct ub_lun *lun) | 1652 | static void ub_revalidate(struct ub_dev *sc, struct ub_lun *lun) |
@@ -2446,6 +2460,8 @@ static struct usb_driver ub_driver = { | |||
2446 | .probe = ub_probe, | 2460 | .probe = ub_probe, |
2447 | .disconnect = ub_disconnect, | 2461 | .disconnect = ub_disconnect, |
2448 | .id_table = ub_usb_ids, | 2462 | .id_table = ub_usb_ids, |
2463 | .pre_reset = ub_pre_reset, | ||
2464 | .post_reset = ub_post_reset, | ||
2449 | }; | 2465 | }; |
2450 | 2466 | ||
2451 | static int __init ub_init(void) | 2467 | static int __init ub_init(void) |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 43b35d0369d6..43d6ba83a191 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -124,7 +124,7 @@ config COMPUTONE | |||
124 | which give you many serial ports. You would need something like this | 124 | which give you many serial ports. You would need something like this |
125 | to connect more than two modems to your Linux box, for instance in | 125 | to connect more than two modems to your Linux box, for instance in |
126 | order to become a dial-in server. If you have a card like that, say | 126 | order to become a dial-in server. If you have a card like that, say |
127 | Y here and read <file:Documentation/computone.txt>. | 127 | Y here and read <file:Documentation/serial/computone.txt>. |
128 | 128 | ||
129 | To compile this driver as module, choose M here: the | 129 | To compile this driver as module, choose M here: the |
130 | module will be called ip2. | 130 | module will be called ip2. |
@@ -136,7 +136,7 @@ config ROCKETPORT | |||
136 | This driver supports Comtrol RocketPort and RocketModem PCI boards. | 136 | This driver supports Comtrol RocketPort and RocketModem PCI boards. |
137 | These boards provide 2, 4, 8, 16, or 32 high-speed serial ports or | 137 | These boards provide 2, 4, 8, 16, or 32 high-speed serial ports or |
138 | modems. For information about the RocketPort/RocketModem boards | 138 | modems. For information about the RocketPort/RocketModem boards |
139 | and this driver read <file:Documentation/rocket.txt>. | 139 | and this driver read <file:Documentation/serial/rocket.txt>. |
140 | 140 | ||
141 | To compile this driver as a module, choose M here: the | 141 | To compile this driver as a module, choose M here: the |
142 | module will be called rocket. | 142 | module will be called rocket. |
@@ -154,7 +154,7 @@ config CYCLADES | |||
154 | your Linux box, for instance in order to become a dial-in server. | 154 | your Linux box, for instance in order to become a dial-in server. |
155 | 155 | ||
156 | For information about the Cyclades-Z card, read | 156 | For information about the Cyclades-Z card, read |
157 | <file:Documentation/README.cycladesZ>. | 157 | <file:Documentation/serial/README.cycladesZ>. |
158 | 158 | ||
159 | To compile this driver as a module, choose M here: the | 159 | To compile this driver as a module, choose M here: the |
160 | module will be called cyclades. | 160 | module will be called cyclades. |
@@ -183,7 +183,7 @@ config DIGIEPCA | |||
183 | box, for instance in order to become a dial-in server. This driver | 183 | box, for instance in order to become a dial-in server. This driver |
184 | supports the original PC (ISA) boards as well as PCI, and EISA. If | 184 | supports the original PC (ISA) boards as well as PCI, and EISA. If |
185 | you have a card like this, say Y here and read the file | 185 | you have a card like this, say Y here and read the file |
186 | <file:Documentation/digiepca.txt>. | 186 | <file:Documentation/serial/digiepca.txt>. |
187 | 187 | ||
188 | To compile this driver as a module, choose M here: the | 188 | To compile this driver as a module, choose M here: the |
189 | module will be called epca. | 189 | module will be called epca. |
@@ -289,7 +289,7 @@ config RISCOM8 | |||
289 | which gives you many serial ports. You would need something like | 289 | which gives you many serial ports. You would need something like |
290 | this to connect more than two modems to your Linux box, for instance | 290 | this to connect more than two modems to your Linux box, for instance |
291 | in order to become a dial-in server. If you have a card like that, | 291 | in order to become a dial-in server. If you have a card like that, |
292 | say Y here and read the file <file:Documentation/riscom8.txt>. | 292 | say Y here and read the file <file:Documentation/serial/riscom8.txt>. |
293 | 293 | ||
294 | Also it's possible to say M here and compile this driver as kernel | 294 | Also it's possible to say M here and compile this driver as kernel |
295 | loadable module; the module will be called riscom8. | 295 | loadable module; the module will be called riscom8. |
@@ -304,8 +304,8 @@ config SPECIALIX | |||
304 | your Linux box, for instance in order to become a dial-in server. | 304 | your Linux box, for instance in order to become a dial-in server. |
305 | 305 | ||
306 | If you have a card like that, say Y here and read the file | 306 | If you have a card like that, say Y here and read the file |
307 | <file:Documentation/specialix.txt>. Also it's possible to say M here | 307 | <file:Documentation/serial/specialix.txt>. Also it's possible to say |
308 | and compile this driver as kernel loadable module which will be | 308 | M here and compile this driver as kernel loadable module which will be |
309 | called specialix. | 309 | called specialix. |
310 | 310 | ||
311 | config SX | 311 | config SX |
@@ -313,7 +313,7 @@ config SX | |||
313 | depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA) | 313 | depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA) |
314 | help | 314 | help |
315 | This is a driver for the SX and SI multiport serial cards. | 315 | This is a driver for the SX and SI multiport serial cards. |
316 | Please read the file <file:Documentation/sx.txt> for details. | 316 | Please read the file <file:Documentation/serial/sx.txt> for details. |
317 | 317 | ||
318 | This driver can only be built as a module ( = code which can be | 318 | This driver can only be built as a module ( = code which can be |
319 | inserted in and removed from the running kernel whenever you want). | 319 | inserted in and removed from the running kernel whenever you want). |
@@ -344,8 +344,8 @@ config STALDRV | |||
344 | like this to connect more than two modems to your Linux box, for | 344 | like this to connect more than two modems to your Linux box, for |
345 | instance in order to become a dial-in server. If you say Y here, | 345 | instance in order to become a dial-in server. If you say Y here, |
346 | you will be asked for your specific card model in the next | 346 | you will be asked for your specific card model in the next |
347 | questions. Make sure to read <file:Documentation/stallion.txt> in | 347 | questions. Make sure to read <file:Documentation/serial/stallion.txt> |
348 | this case. If you have never heard about all this, it's safe to | 348 | in this case. If you have never heard about all this, it's safe to |
349 | say N. | 349 | say N. |
350 | 350 | ||
351 | config STALLION | 351 | config STALLION |
@@ -354,7 +354,7 @@ config STALLION | |||
354 | help | 354 | help |
355 | If you have an EasyIO or EasyConnection 8/32 multiport Stallion | 355 | If you have an EasyIO or EasyConnection 8/32 multiport Stallion |
356 | card, then this is for you; say Y. Make sure to read | 356 | card, then this is for you; say Y. Make sure to read |
357 | <file:Documentation/stallion.txt>. | 357 | <file:Documentation/serial/stallion.txt>. |
358 | 358 | ||
359 | To compile this driver as a module, choose M here: the | 359 | To compile this driver as a module, choose M here: the |
360 | module will be called stallion. | 360 | module will be called stallion. |
@@ -365,7 +365,7 @@ config ISTALLION | |||
365 | help | 365 | help |
366 | If you have an EasyConnection 8/64, ONboard, Brumby or Stallion | 366 | If you have an EasyConnection 8/64, ONboard, Brumby or Stallion |
367 | serial multiport card, say Y here. Make sure to read | 367 | serial multiport card, say Y here. Make sure to read |
368 | <file:Documentation/stallion.txt>. | 368 | <file:Documentation/serial/stallion.txt>. |
369 | 369 | ||
370 | To compile this driver as a module, choose M here: the | 370 | To compile this driver as a module, choose M here: the |
371 | module will be called istallion. | 371 | module will be called istallion. |
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index 242fd46fda22..a16b94f12eb2 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c | |||
@@ -72,7 +72,7 @@ | |||
72 | /* | 72 | /* |
73 | * There is a bunch of documentation about the card, jumpers, config | 73 | * There is a bunch of documentation about the card, jumpers, config |
74 | * settings, restrictions, cables, device names and numbers in | 74 | * settings, restrictions, cables, device names and numbers in |
75 | * Documentation/specialix.txt | 75 | * Documentation/serial/specialix.txt |
76 | */ | 76 | */ |
77 | 77 | ||
78 | #include <linux/module.h> | 78 | #include <linux/module.h> |
diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c index 752b5c44df9c..c002144c76bc 100644 --- a/drivers/hwmon/lis3lv02d.c +++ b/drivers/hwmon/lis3lv02d.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/wait.h> | 33 | #include <linux/wait.h> |
34 | #include <linux/poll.h> | 34 | #include <linux/poll.h> |
35 | #include <linux/freezer.h> | 35 | #include <linux/freezer.h> |
36 | #include <linux/version.h> | ||
37 | #include <linux/uaccess.h> | 36 | #include <linux/uaccess.h> |
38 | #include <acpi/acpi_drivers.h> | 37 | #include <acpi/acpi_drivers.h> |
39 | #include <asm/atomic.h> | 38 | #include <asm/atomic.h> |
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 640cbb237328..3384a717fec0 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c | |||
@@ -318,7 +318,8 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd) | |||
318 | } else | 318 | } else |
319 | data = i2c_op(pd, OP_RX, 0); | 319 | data = i2c_op(pd, OP_RX, 0); |
320 | 320 | ||
321 | pd->msg->buf[real_pos] = data; | 321 | if (real_pos >= 0) |
322 | pd->msg->buf[real_pos] = data; | ||
322 | } while (0); | 323 | } while (0); |
323 | 324 | ||
324 | pd->pos++; | 325 | pd->pos++; |
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index cb199c815b53..f50210fe558f 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c | |||
@@ -444,6 +444,7 @@ static struct pcmcia_device_id ide_ids[] = { | |||
444 | PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209), | 444 | PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209), |
445 | PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e), | 445 | PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e), |
446 | PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6), | 446 | PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6), |
447 | PCMCIA_DEVICE_PROD_ID2("Flash Card", 0x5a362506), | ||
447 | PCMCIA_DEVICE_NULL, | 448 | PCMCIA_DEVICE_NULL, |
448 | }; | 449 | }; |
449 | MODULE_DEVICE_TABLE(pcmcia, ide_ids); | 450 | MODULE_DEVICE_TABLE(pcmcia, ide_ids); |
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 4840733cd903..3d7f4923cd13 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -441,13 +441,13 @@ static void process_queued_ios(struct work_struct *work) | |||
441 | __choose_pgpath(m); | 441 | __choose_pgpath(m); |
442 | 442 | ||
443 | pgpath = m->current_pgpath; | 443 | pgpath = m->current_pgpath; |
444 | m->pgpath_to_activate = m->current_pgpath; | ||
445 | 444 | ||
446 | if ((pgpath && !m->queue_io) || | 445 | if ((pgpath && !m->queue_io) || |
447 | (!pgpath && !m->queue_if_no_path)) | 446 | (!pgpath && !m->queue_if_no_path)) |
448 | must_queue = 0; | 447 | must_queue = 0; |
449 | 448 | ||
450 | if (m->pg_init_required && !m->pg_init_in_progress) { | 449 | if (m->pg_init_required && !m->pg_init_in_progress && pgpath) { |
450 | m->pgpath_to_activate = pgpath; | ||
451 | m->pg_init_count++; | 451 | m->pg_init_count++; |
452 | m->pg_init_required = 0; | 452 | m->pg_init_required = 0; |
453 | m->pg_init_in_progress = 1; | 453 | m->pg_init_in_progress = 1; |
@@ -708,6 +708,10 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m) | |||
708 | m->hw_handler_name = NULL; | 708 | m->hw_handler_name = NULL; |
709 | return -EINVAL; | 709 | return -EINVAL; |
710 | } | 710 | } |
711 | |||
712 | if (hw_argc > 1) | ||
713 | DMWARN("Ignoring user-specified arguments for " | ||
714 | "hardware handler \"%s\"", m->hw_handler_name); | ||
711 | consume(as, hw_argc - 1); | 715 | consume(as, hw_argc - 1); |
712 | 716 | ||
713 | return 0; | 717 | return 0; |
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index 9d7b53ed75b2..ec43f9fa4b2a 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
@@ -1032,6 +1032,7 @@ static void mirror_dtr(struct dm_target *ti) | |||
1032 | 1032 | ||
1033 | del_timer_sync(&ms->timer); | 1033 | del_timer_sync(&ms->timer); |
1034 | flush_workqueue(ms->kmirrord_wq); | 1034 | flush_workqueue(ms->kmirrord_wq); |
1035 | flush_scheduled_work(); | ||
1035 | dm_kcopyd_client_destroy(ms->kcopyd_client); | 1036 | dm_kcopyd_client_destroy(ms->kcopyd_client); |
1036 | destroy_workqueue(ms->kmirrord_wq); | 1037 | destroy_workqueue(ms->kmirrord_wq); |
1037 | free_context(ms, ti, ms->nr_mirrors); | 1038 | free_context(ms, ti, ms->nr_mirrors); |
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index a2d068dbe9e2..9e4ef88d421e 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c | |||
@@ -320,8 +320,10 @@ int __init dm_stripe_init(void) | |||
320 | int r; | 320 | int r; |
321 | 321 | ||
322 | r = dm_register_target(&stripe_target); | 322 | r = dm_register_target(&stripe_target); |
323 | if (r < 0) | 323 | if (r < 0) { |
324 | DMWARN("target registration failed"); | 324 | DMWARN("target registration failed"); |
325 | return r; | ||
326 | } | ||
325 | 327 | ||
326 | kstriped = create_singlethread_workqueue("kstriped"); | 328 | kstriped = create_singlethread_workqueue("kstriped"); |
327 | if (!kstriped) { | 329 | if (!kstriped) { |
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 6963ad148408..c99e4728ff41 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -375,7 +375,7 @@ static void start_io_acct(struct dm_io *io) | |||
375 | dm_disk(md)->part0.in_flight = atomic_inc_return(&md->pending); | 375 | dm_disk(md)->part0.in_flight = atomic_inc_return(&md->pending); |
376 | } | 376 | } |
377 | 377 | ||
378 | static int end_io_acct(struct dm_io *io) | 378 | static void end_io_acct(struct dm_io *io) |
379 | { | 379 | { |
380 | struct mapped_device *md = io->md; | 380 | struct mapped_device *md = io->md; |
381 | struct bio *bio = io->bio; | 381 | struct bio *bio = io->bio; |
@@ -391,7 +391,9 @@ static int end_io_acct(struct dm_io *io) | |||
391 | dm_disk(md)->part0.in_flight = pending = | 391 | dm_disk(md)->part0.in_flight = pending = |
392 | atomic_dec_return(&md->pending); | 392 | atomic_dec_return(&md->pending); |
393 | 393 | ||
394 | return !pending; | 394 | /* nudge anyone waiting on suspend queue */ |
395 | if (!pending) | ||
396 | wake_up(&md->wait); | ||
395 | } | 397 | } |
396 | 398 | ||
397 | /* | 399 | /* |
@@ -499,9 +501,7 @@ static void dec_pending(struct dm_io *io, int error) | |||
499 | spin_unlock_irqrestore(&io->md->pushback_lock, flags); | 501 | spin_unlock_irqrestore(&io->md->pushback_lock, flags); |
500 | } | 502 | } |
501 | 503 | ||
502 | if (end_io_acct(io)) | 504 | end_io_acct(io); |
503 | /* nudge anyone waiting on suspend queue */ | ||
504 | wake_up(&io->md->wait); | ||
505 | 505 | ||
506 | if (io->error != DM_ENDIO_REQUEUE) { | 506 | if (io->error != DM_ENDIO_REQUEUE) { |
507 | blk_add_trace_bio(io->md->queue, io->bio, | 507 | blk_add_trace_bio(io->md->queue, io->bio, |
@@ -937,16 +937,24 @@ static void dm_unplug_all(struct request_queue *q) | |||
937 | 937 | ||
938 | static int dm_any_congested(void *congested_data, int bdi_bits) | 938 | static int dm_any_congested(void *congested_data, int bdi_bits) |
939 | { | 939 | { |
940 | int r; | 940 | int r = bdi_bits; |
941 | struct mapped_device *md = (struct mapped_device *) congested_data; | 941 | struct mapped_device *md = congested_data; |
942 | struct dm_table *map = dm_get_table(md); | 942 | struct dm_table *map; |
943 | 943 | ||
944 | if (!map || test_bit(DMF_BLOCK_IO, &md->flags)) | 944 | atomic_inc(&md->pending); |
945 | r = bdi_bits; | 945 | |
946 | else | 946 | if (!test_bit(DMF_BLOCK_IO, &md->flags)) { |
947 | r = dm_table_any_congested(map, bdi_bits); | 947 | map = dm_get_table(md); |
948 | if (map) { | ||
949 | r = dm_table_any_congested(map, bdi_bits); | ||
950 | dm_table_put(map); | ||
951 | } | ||
952 | } | ||
953 | |||
954 | if (!atomic_dec_return(&md->pending)) | ||
955 | /* nudge anyone waiting on suspend queue */ | ||
956 | wake_up(&md->wait); | ||
948 | 957 | ||
949 | dm_table_put(map); | ||
950 | return r; | 958 | return r; |
951 | } | 959 | } |
952 | 960 | ||
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index b59e47272abf..3720f0e03a16 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * experimental driver for simple i2c audio chips. | 2 | * Driver for simple i2c audio chips. |
3 | * | 3 | * |
4 | * Copyright (c) 2000 Gerd Knorr | 4 | * Copyright (c) 2000 Gerd Knorr |
5 | * based on code by: | 5 | * based on code by: |
@@ -7,6 +7,10 @@ | |||
7 | * Steve VanDeBogart (vandebo@uclink.berkeley.edu) | 7 | * Steve VanDeBogart (vandebo@uclink.berkeley.edu) |
8 | * Greg Alexander (galexand@acm.org) | 8 | * Greg Alexander (galexand@acm.org) |
9 | * | 9 | * |
10 | * Copyright(c) 2005-2008 Mauro Carvalho Chehab | ||
11 | * - Some cleanups, code fixes, etc | ||
12 | * - Convert it to V4L2 API | ||
13 | * | ||
10 | * This code is placed under the terms of the GNU General Public License | 14 | * This code is placed under the terms of the GNU General Public License |
11 | * | 15 | * |
12 | * OPTIONS: | 16 | * OPTIONS: |
@@ -30,6 +34,7 @@ | |||
30 | 34 | ||
31 | #include <media/tvaudio.h> | 35 | #include <media/tvaudio.h> |
32 | #include <media/v4l2-common.h> | 36 | #include <media/v4l2-common.h> |
37 | #include <media/v4l2-ioctl.h> | ||
33 | #include <media/v4l2-chip-ident.h> | 38 | #include <media/v4l2-chip-ident.h> |
34 | #include <media/v4l2-i2c-drv-legacy.h> | 39 | #include <media/v4l2-i2c-drv-legacy.h> |
35 | 40 | ||
@@ -58,7 +63,6 @@ typedef int (*checkit)(struct CHIPSTATE*); | |||
58 | typedef int (*initialize)(struct CHIPSTATE*); | 63 | typedef int (*initialize)(struct CHIPSTATE*); |
59 | typedef int (*getmode)(struct CHIPSTATE*); | 64 | typedef int (*getmode)(struct CHIPSTATE*); |
60 | typedef void (*setmode)(struct CHIPSTATE*, int mode); | 65 | typedef void (*setmode)(struct CHIPSTATE*, int mode); |
61 | typedef void (*checkmode)(struct CHIPSTATE*); | ||
62 | 66 | ||
63 | /* i2c command */ | 67 | /* i2c command */ |
64 | typedef struct AUDIOCMD { | 68 | typedef struct AUDIOCMD { |
@@ -79,6 +83,7 @@ struct CHIPDESC { | |||
79 | #define CHIP_HAS_VOLUME 1 | 83 | #define CHIP_HAS_VOLUME 1 |
80 | #define CHIP_HAS_BASSTREBLE 2 | 84 | #define CHIP_HAS_BASSTREBLE 2 |
81 | #define CHIP_HAS_INPUTSEL 4 | 85 | #define CHIP_HAS_INPUTSEL 4 |
86 | #define CHIP_NEED_CHECKMODE 8 | ||
82 | 87 | ||
83 | /* various i2c command sequences */ | 88 | /* various i2c command sequences */ |
84 | audiocmd init; | 89 | audiocmd init; |
@@ -96,23 +101,20 @@ struct CHIPDESC { | |||
96 | getmode getmode; | 101 | getmode getmode; |
97 | setmode setmode; | 102 | setmode setmode; |
98 | 103 | ||
99 | /* check / autoswitch audio after channel switches */ | ||
100 | checkmode checkmode; | ||
101 | |||
102 | /* input switch register + values for v4l inputs */ | 104 | /* input switch register + values for v4l inputs */ |
103 | int inputreg; | 105 | int inputreg; |
104 | int inputmap[4]; | 106 | int inputmap[4]; |
105 | int inputmute; | 107 | int inputmute; |
106 | int inputmask; | 108 | int inputmask; |
107 | }; | 109 | }; |
108 | static struct CHIPDESC chiplist[]; | ||
109 | 110 | ||
110 | /* current state of the chip */ | 111 | /* current state of the chip */ |
111 | struct CHIPSTATE { | 112 | struct CHIPSTATE { |
112 | struct i2c_client *c; | 113 | struct i2c_client *c; |
113 | 114 | ||
114 | /* index into CHIPDESC array */ | 115 | /* chip-specific description - should point to |
115 | int type; | 116 | an entry at CHIPDESC table */ |
117 | struct CHIPDESC *desc; | ||
116 | 118 | ||
117 | /* shadow register set */ | 119 | /* shadow register set */ |
118 | audiocmd shadow; | 120 | audiocmd shadow; |
@@ -152,7 +154,7 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val) | |||
152 | { | 154 | { |
153 | unsigned char buffer[2]; | 155 | unsigned char buffer[2]; |
154 | 156 | ||
155 | if (-1 == subaddr) { | 157 | if (subaddr < 0) { |
156 | v4l_dbg(1, debug, chip->c, "%s: chip_write: 0x%x\n", | 158 | v4l_dbg(1, debug, chip->c, "%s: chip_write: 0x%x\n", |
157 | chip->c->name, val); | 159 | chip->c->name, val); |
158 | chip->shadow.bytes[1] = val; | 160 | chip->shadow.bytes[1] = val; |
@@ -163,6 +165,13 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val) | |||
163 | return -1; | 165 | return -1; |
164 | } | 166 | } |
165 | } else { | 167 | } else { |
168 | if (subaddr + 1 >= ARRAY_SIZE(chip->shadow.bytes)) { | ||
169 | v4l_info(chip->c, | ||
170 | "Tried to access a non-existent register: %d\n", | ||
171 | subaddr); | ||
172 | return -EINVAL; | ||
173 | } | ||
174 | |||
166 | v4l_dbg(1, debug, chip->c, "%s: chip_write: reg%d=0x%x\n", | 175 | v4l_dbg(1, debug, chip->c, "%s: chip_write: reg%d=0x%x\n", |
167 | chip->c->name, subaddr, val); | 176 | chip->c->name, subaddr, val); |
168 | chip->shadow.bytes[subaddr+1] = val; | 177 | chip->shadow.bytes[subaddr+1] = val; |
@@ -177,12 +186,20 @@ static int chip_write(struct CHIPSTATE *chip, int subaddr, int val) | |||
177 | return 0; | 186 | return 0; |
178 | } | 187 | } |
179 | 188 | ||
180 | static int chip_write_masked(struct CHIPSTATE *chip, int subaddr, int val, int mask) | 189 | static int chip_write_masked(struct CHIPSTATE *chip, |
190 | int subaddr, int val, int mask) | ||
181 | { | 191 | { |
182 | if (mask != 0) { | 192 | if (mask != 0) { |
183 | if (-1 == subaddr) { | 193 | if (subaddr < 0) { |
184 | val = (chip->shadow.bytes[1] & ~mask) | (val & mask); | 194 | val = (chip->shadow.bytes[1] & ~mask) | (val & mask); |
185 | } else { | 195 | } else { |
196 | if (subaddr + 1 >= ARRAY_SIZE(chip->shadow.bytes)) { | ||
197 | v4l_info(chip->c, | ||
198 | "Tried to access a non-existent register: %d\n", | ||
199 | subaddr); | ||
200 | return -EINVAL; | ||
201 | } | ||
202 | |||
186 | val = (chip->shadow.bytes[subaddr+1] & ~mask) | (val & mask); | 203 | val = (chip->shadow.bytes[subaddr+1] & ~mask) | (val & mask); |
187 | } | 204 | } |
188 | } | 205 | } |
@@ -228,6 +245,15 @@ static int chip_cmd(struct CHIPSTATE *chip, char *name, audiocmd *cmd) | |||
228 | if (0 == cmd->count) | 245 | if (0 == cmd->count) |
229 | return 0; | 246 | return 0; |
230 | 247 | ||
248 | if (cmd->count + cmd->bytes[0] - 1 >= ARRAY_SIZE(chip->shadow.bytes)) { | ||
249 | v4l_info(chip->c, | ||
250 | "Tried to access a non-existent register range: %d to %d\n", | ||
251 | cmd->bytes[0] + 1, cmd->bytes[0] + cmd->count - 1); | ||
252 | return -EINVAL; | ||
253 | } | ||
254 | |||
255 | /* FIXME: it seems that the shadow bytes are wrong bellow !*/ | ||
256 | |||
231 | /* update our shadow register set; print bytes if (debug > 0) */ | 257 | /* update our shadow register set; print bytes if (debug > 0) */ |
232 | v4l_dbg(1, debug, chip->c, "%s: chip_cmd(%s): reg=%d, data:", | 258 | v4l_dbg(1, debug, chip->c, "%s: chip_cmd(%s): reg=%d, data:", |
233 | chip->c->name, name,cmd->bytes[0]); | 259 | chip->c->name, name,cmd->bytes[0]); |
@@ -263,7 +289,8 @@ static void chip_thread_wake(unsigned long data) | |||
263 | static int chip_thread(void *data) | 289 | static int chip_thread(void *data) |
264 | { | 290 | { |
265 | struct CHIPSTATE *chip = data; | 291 | struct CHIPSTATE *chip = data; |
266 | struct CHIPDESC *desc = chiplist + chip->type; | 292 | struct CHIPDESC *desc = chip->desc; |
293 | int mode; | ||
267 | 294 | ||
268 | v4l_dbg(1, debug, chip->c, "%s: thread started\n", chip->c->name); | 295 | v4l_dbg(1, debug, chip->c, "%s: thread started\n", chip->c->name); |
269 | set_freezable(); | 296 | set_freezable(); |
@@ -282,7 +309,26 @@ static int chip_thread(void *data) | |||
282 | continue; | 309 | continue; |
283 | 310 | ||
284 | /* have a look what's going on */ | 311 | /* have a look what's going on */ |
285 | desc->checkmode(chip); | 312 | mode = desc->getmode(chip); |
313 | if (mode == chip->prevmode) | ||
314 | continue; | ||
315 | |||
316 | /* chip detected a new audio mode - set it */ | ||
317 | v4l_dbg(1, debug, chip->c, "%s: thread checkmode\n", | ||
318 | chip->c->name); | ||
319 | |||
320 | chip->prevmode = mode; | ||
321 | |||
322 | if (mode & V4L2_TUNER_MODE_STEREO) | ||
323 | desc->setmode(chip, V4L2_TUNER_MODE_STEREO); | ||
324 | if (mode & V4L2_TUNER_MODE_LANG1_LANG2) | ||
325 | desc->setmode(chip, V4L2_TUNER_MODE_STEREO); | ||
326 | else if (mode & V4L2_TUNER_MODE_LANG1) | ||
327 | desc->setmode(chip, V4L2_TUNER_MODE_LANG1); | ||
328 | else if (mode & V4L2_TUNER_MODE_LANG2) | ||
329 | desc->setmode(chip, V4L2_TUNER_MODE_LANG2); | ||
330 | else | ||
331 | desc->setmode(chip, V4L2_TUNER_MODE_MONO); | ||
286 | 332 | ||
287 | /* schedule next check */ | 333 | /* schedule next check */ |
288 | mod_timer(&chip->wt, jiffies+msecs_to_jiffies(2000)); | 334 | mod_timer(&chip->wt, jiffies+msecs_to_jiffies(2000)); |
@@ -292,29 +338,6 @@ static int chip_thread(void *data) | |||
292 | return 0; | 338 | return 0; |
293 | } | 339 | } |
294 | 340 | ||
295 | static void generic_checkmode(struct CHIPSTATE *chip) | ||
296 | { | ||
297 | struct CHIPDESC *desc = chiplist + chip->type; | ||
298 | int mode = desc->getmode(chip); | ||
299 | |||
300 | if (mode == chip->prevmode) | ||
301 | return; | ||
302 | |||
303 | v4l_dbg(1, debug, chip->c, "%s: thread checkmode\n", chip->c->name); | ||
304 | chip->prevmode = mode; | ||
305 | |||
306 | if (mode & V4L2_TUNER_MODE_STEREO) | ||
307 | desc->setmode(chip,V4L2_TUNER_MODE_STEREO); | ||
308 | if (mode & V4L2_TUNER_MODE_LANG1_LANG2) | ||
309 | desc->setmode(chip,V4L2_TUNER_MODE_STEREO); | ||
310 | else if (mode & V4L2_TUNER_MODE_LANG1) | ||
311 | desc->setmode(chip,V4L2_TUNER_MODE_LANG1); | ||
312 | else if (mode & V4L2_TUNER_MODE_LANG2) | ||
313 | desc->setmode(chip,V4L2_TUNER_MODE_LANG2); | ||
314 | else | ||
315 | desc->setmode(chip,V4L2_TUNER_MODE_MONO); | ||
316 | } | ||
317 | |||
318 | /* ---------------------------------------------------------------------- */ | 341 | /* ---------------------------------------------------------------------- */ |
319 | /* audio chip descriptions - defines+functions for tda9840 */ | 342 | /* audio chip descriptions - defines+functions for tda9840 */ |
320 | 343 | ||
@@ -777,7 +800,7 @@ static struct tda9874a_MODES { | |||
777 | char *name; | 800 | char *name; |
778 | audiocmd cmd; | 801 | audiocmd cmd; |
779 | } tda9874a_modelist[9] = { | 802 | } tda9874a_modelist[9] = { |
780 | { "A2, B/G", | 803 | { "A2, B/G", /* default */ |
781 | { 9, { TDA9874A_C1FRA, 0x72,0x95,0x55, 0x77,0xA0,0x00, 0x00,0x00 }} }, | 804 | { 9, { TDA9874A_C1FRA, 0x72,0x95,0x55, 0x77,0xA0,0x00, 0x00,0x00 }} }, |
782 | { "A2, M (Korea)", | 805 | { "A2, M (Korea)", |
783 | { 9, { TDA9874A_C1FRA, 0x5D,0xC0,0x00, 0x62,0x6A,0xAA, 0x20,0x22 }} }, | 806 | { 9, { TDA9874A_C1FRA, 0x5D,0xC0,0x00, 0x62,0x6A,0xAA, 0x20,0x22 }} }, |
@@ -791,7 +814,7 @@ static struct tda9874a_MODES { | |||
791 | { 9, { TDA9874A_C1FRA, 0x7D,0x00,0x00, 0x88,0x8A,0xAA, 0x08,0x33 }} }, | 814 | { 9, { TDA9874A_C1FRA, 0x7D,0x00,0x00, 0x88,0x8A,0xAA, 0x08,0x33 }} }, |
792 | { "NICAM, B/G", | 815 | { "NICAM, B/G", |
793 | { 9, { TDA9874A_C1FRA, 0x72,0x95,0x55, 0x79,0xEA,0xAA, 0x08,0x33 }} }, | 816 | { 9, { TDA9874A_C1FRA, 0x72,0x95,0x55, 0x79,0xEA,0xAA, 0x08,0x33 }} }, |
794 | { "NICAM, D/K", /* default */ | 817 | { "NICAM, D/K", |
795 | { 9, { TDA9874A_C1FRA, 0x87,0x6A,0xAA, 0x79,0xEA,0xAA, 0x08,0x33 }} }, | 818 | { 9, { TDA9874A_C1FRA, 0x87,0x6A,0xAA, 0x79,0xEA,0xAA, 0x08,0x33 }} }, |
796 | { "NICAM, L", | 819 | { "NICAM, L", |
797 | { 9, { TDA9874A_C1FRA, 0x87,0x6A,0xAA, 0x79,0xEA,0xAA, 0x09,0x33 }} } | 820 | { 9, { TDA9874A_C1FRA, 0x87,0x6A,0xAA, 0x79,0xEA,0xAA, 0x09,0x33 }} } |
@@ -981,7 +1004,7 @@ static int tda9874a_initialize(struct CHIPSTATE *chip) | |||
981 | { | 1004 | { |
982 | if (tda9874a_SIF > 2) | 1005 | if (tda9874a_SIF > 2) |
983 | tda9874a_SIF = 1; | 1006 | tda9874a_SIF = 1; |
984 | if (tda9874a_STD > 8) | 1007 | if (tda9874a_STD >= ARRAY_SIZE(tda9874a_modelist)) |
985 | tda9874a_STD = 0; | 1008 | tda9874a_STD = 0; |
986 | if(tda9874a_AMSEL > 1) | 1009 | if(tda9874a_AMSEL > 1) |
987 | tda9874a_AMSEL = 0; | 1010 | tda9874a_AMSEL = 0; |
@@ -1089,7 +1112,7 @@ static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; } | |||
1089 | 1112 | ||
1090 | static int tda8425_initialize(struct CHIPSTATE *chip) | 1113 | static int tda8425_initialize(struct CHIPSTATE *chip) |
1091 | { | 1114 | { |
1092 | struct CHIPDESC *desc = chiplist + chip->type; | 1115 | struct CHIPDESC *desc = chip->desc; |
1093 | int inputmap[4] = { /* tuner */ TDA8425_S1_CH2, /* radio */ TDA8425_S1_CH1, | 1116 | int inputmap[4] = { /* tuner */ TDA8425_S1_CH2, /* radio */ TDA8425_S1_CH1, |
1094 | /* extern */ TDA8425_S1_CH1, /* intern */ TDA8425_S1_OFF}; | 1117 | /* extern */ TDA8425_S1_CH1, /* intern */ TDA8425_S1_OFF}; |
1095 | 1118 | ||
@@ -1259,27 +1282,28 @@ static struct CHIPDESC chiplist[] = { | |||
1259 | .addr_lo = I2C_ADDR_TDA9840 >> 1, | 1282 | .addr_lo = I2C_ADDR_TDA9840 >> 1, |
1260 | .addr_hi = I2C_ADDR_TDA9840 >> 1, | 1283 | .addr_hi = I2C_ADDR_TDA9840 >> 1, |
1261 | .registers = 5, | 1284 | .registers = 5, |
1285 | .flags = CHIP_NEED_CHECKMODE, | ||
1262 | 1286 | ||
1287 | /* callbacks */ | ||
1263 | .checkit = tda9840_checkit, | 1288 | .checkit = tda9840_checkit, |
1264 | .getmode = tda9840_getmode, | 1289 | .getmode = tda9840_getmode, |
1265 | .setmode = tda9840_setmode, | 1290 | .setmode = tda9840_setmode, |
1266 | .checkmode = generic_checkmode, | ||
1267 | 1291 | ||
1268 | .init = { 2, { TDA9840_TEST, TDA9840_TEST_INT1SN | 1292 | .init = { 2, { TDA9840_TEST, TDA9840_TEST_INT1SN |
1269 | /* ,TDA9840_SW, TDA9840_MONO */} } | 1293 | /* ,TDA9840_SW, TDA9840_MONO */} } |
1270 | }, | 1294 | }, |
1271 | { | 1295 | { |
1272 | .name = "tda9873h", | 1296 | .name = "tda9873h", |
1273 | .checkit = tda9873_checkit, | ||
1274 | .insmodopt = &tda9873, | 1297 | .insmodopt = &tda9873, |
1275 | .addr_lo = I2C_ADDR_TDA985x_L >> 1, | 1298 | .addr_lo = I2C_ADDR_TDA985x_L >> 1, |
1276 | .addr_hi = I2C_ADDR_TDA985x_H >> 1, | 1299 | .addr_hi = I2C_ADDR_TDA985x_H >> 1, |
1277 | .registers = 3, | 1300 | .registers = 3, |
1278 | .flags = CHIP_HAS_INPUTSEL, | 1301 | .flags = CHIP_HAS_INPUTSEL | CHIP_NEED_CHECKMODE, |
1279 | 1302 | ||
1303 | /* callbacks */ | ||
1304 | .checkit = tda9873_checkit, | ||
1280 | .getmode = tda9873_getmode, | 1305 | .getmode = tda9873_getmode, |
1281 | .setmode = tda9873_setmode, | 1306 | .setmode = tda9873_setmode, |
1282 | .checkmode = generic_checkmode, | ||
1283 | 1307 | ||
1284 | .init = { 4, { TDA9873_SW, 0xa4, 0x06, 0x03 } }, | 1308 | .init = { 4, { TDA9873_SW, 0xa4, 0x06, 0x03 } }, |
1285 | .inputreg = TDA9873_SW, | 1309 | .inputreg = TDA9873_SW, |
@@ -1290,15 +1314,16 @@ static struct CHIPDESC chiplist[] = { | |||
1290 | }, | 1314 | }, |
1291 | { | 1315 | { |
1292 | .name = "tda9874h/a", | 1316 | .name = "tda9874h/a", |
1293 | .checkit = tda9874a_checkit, | ||
1294 | .initialize = tda9874a_initialize, | ||
1295 | .insmodopt = &tda9874a, | 1317 | .insmodopt = &tda9874a, |
1296 | .addr_lo = I2C_ADDR_TDA9874 >> 1, | 1318 | .addr_lo = I2C_ADDR_TDA9874 >> 1, |
1297 | .addr_hi = I2C_ADDR_TDA9874 >> 1, | 1319 | .addr_hi = I2C_ADDR_TDA9874 >> 1, |
1320 | .flags = CHIP_NEED_CHECKMODE, | ||
1298 | 1321 | ||
1322 | /* callbacks */ | ||
1323 | .initialize = tda9874a_initialize, | ||
1324 | .checkit = tda9874a_checkit, | ||
1299 | .getmode = tda9874a_getmode, | 1325 | .getmode = tda9874a_getmode, |
1300 | .setmode = tda9874a_setmode, | 1326 | .setmode = tda9874a_setmode, |
1301 | .checkmode = generic_checkmode, | ||
1302 | }, | 1327 | }, |
1303 | { | 1328 | { |
1304 | .name = "tda9850", | 1329 | .name = "tda9850", |
@@ -1324,10 +1349,11 @@ static struct CHIPDESC chiplist[] = { | |||
1324 | .rightreg = TDA9855_VR, | 1349 | .rightreg = TDA9855_VR, |
1325 | .bassreg = TDA9855_BA, | 1350 | .bassreg = TDA9855_BA, |
1326 | .treblereg = TDA9855_TR, | 1351 | .treblereg = TDA9855_TR, |
1352 | |||
1353 | /* callbacks */ | ||
1327 | .volfunc = tda9855_volume, | 1354 | .volfunc = tda9855_volume, |
1328 | .bassfunc = tda9855_bass, | 1355 | .bassfunc = tda9855_bass, |
1329 | .treblefunc = tda9855_treble, | 1356 | .treblefunc = tda9855_treble, |
1330 | |||
1331 | .getmode = tda985x_getmode, | 1357 | .getmode = tda985x_getmode, |
1332 | .setmode = tda985x_setmode, | 1358 | .setmode = tda985x_setmode, |
1333 | 1359 | ||
@@ -1348,6 +1374,8 @@ static struct CHIPDESC chiplist[] = { | |||
1348 | .rightreg = TEA6300_VL, | 1374 | .rightreg = TEA6300_VL, |
1349 | .bassreg = TEA6300_BA, | 1375 | .bassreg = TEA6300_BA, |
1350 | .treblereg = TEA6300_TR, | 1376 | .treblereg = TEA6300_TR, |
1377 | |||
1378 | /* callbacks */ | ||
1351 | .volfunc = tea6300_shift10, | 1379 | .volfunc = tea6300_shift10, |
1352 | .bassfunc = tea6300_shift12, | 1380 | .bassfunc = tea6300_shift12, |
1353 | .treblefunc = tea6300_shift12, | 1381 | .treblefunc = tea6300_shift12, |
@@ -1358,7 +1386,6 @@ static struct CHIPDESC chiplist[] = { | |||
1358 | }, | 1386 | }, |
1359 | { | 1387 | { |
1360 | .name = "tea6320", | 1388 | .name = "tea6320", |
1361 | .initialize = tea6320_initialize, | ||
1362 | .insmodopt = &tea6320, | 1389 | .insmodopt = &tea6320, |
1363 | .addr_lo = I2C_ADDR_TEA6300 >> 1, | 1390 | .addr_lo = I2C_ADDR_TEA6300 >> 1, |
1364 | .addr_hi = I2C_ADDR_TEA6300 >> 1, | 1391 | .addr_hi = I2C_ADDR_TEA6300 >> 1, |
@@ -1369,6 +1396,9 @@ static struct CHIPDESC chiplist[] = { | |||
1369 | .rightreg = TEA6320_V, | 1396 | .rightreg = TEA6320_V, |
1370 | .bassreg = TEA6320_BA, | 1397 | .bassreg = TEA6320_BA, |
1371 | .treblereg = TEA6320_TR, | 1398 | .treblereg = TEA6320_TR, |
1399 | |||
1400 | /* callbacks */ | ||
1401 | .initialize = tea6320_initialize, | ||
1372 | .volfunc = tea6320_volume, | 1402 | .volfunc = tea6320_volume, |
1373 | .bassfunc = tea6320_shift11, | 1403 | .bassfunc = tea6320_shift11, |
1374 | .treblefunc = tea6320_shift11, | 1404 | .treblefunc = tea6320_shift11, |
@@ -1401,16 +1431,18 @@ static struct CHIPDESC chiplist[] = { | |||
1401 | .rightreg = TDA8425_VR, | 1431 | .rightreg = TDA8425_VR, |
1402 | .bassreg = TDA8425_BA, | 1432 | .bassreg = TDA8425_BA, |
1403 | .treblereg = TDA8425_TR, | 1433 | .treblereg = TDA8425_TR, |
1434 | |||
1435 | /* callbacks */ | ||
1436 | .initialize = tda8425_initialize, | ||
1404 | .volfunc = tda8425_shift10, | 1437 | .volfunc = tda8425_shift10, |
1405 | .bassfunc = tda8425_shift12, | 1438 | .bassfunc = tda8425_shift12, |
1406 | .treblefunc = tda8425_shift12, | 1439 | .treblefunc = tda8425_shift12, |
1440 | .setmode = tda8425_setmode, | ||
1407 | 1441 | ||
1408 | .inputreg = TDA8425_S1, | 1442 | .inputreg = TDA8425_S1, |
1409 | .inputmap = { TDA8425_S1_CH1, TDA8425_S1_CH1, TDA8425_S1_CH1 }, | 1443 | .inputmap = { TDA8425_S1_CH1, TDA8425_S1_CH1, TDA8425_S1_CH1 }, |
1410 | .inputmute = TDA8425_S1_OFF, | 1444 | .inputmute = TDA8425_S1_OFF, |
1411 | 1445 | ||
1412 | .setmode = tda8425_setmode, | ||
1413 | .initialize = tda8425_initialize, | ||
1414 | }, | 1446 | }, |
1415 | { | 1447 | { |
1416 | .name = "pic16c54 (PV951)", | 1448 | .name = "pic16c54 (PV951)", |
@@ -1434,10 +1466,11 @@ static struct CHIPDESC chiplist[] = { | |||
1434 | .addr_lo = I2C_ADDR_TDA9840 >> 1, | 1466 | .addr_lo = I2C_ADDR_TDA9840 >> 1, |
1435 | .addr_hi = I2C_ADDR_TDA9840 >> 1, | 1467 | .addr_hi = I2C_ADDR_TDA9840 >> 1, |
1436 | .registers = 2, | 1468 | .registers = 2, |
1469 | .flags = CHIP_NEED_CHECKMODE, | ||
1437 | 1470 | ||
1471 | /* callbacks */ | ||
1438 | .getmode = ta8874z_getmode, | 1472 | .getmode = ta8874z_getmode, |
1439 | .setmode = ta8874z_setmode, | 1473 | .setmode = ta8874z_setmode, |
1440 | .checkmode = generic_checkmode, | ||
1441 | 1474 | ||
1442 | .init = {2, { TA8874Z_MONO_SET, TA8874Z_SEPARATION_DEFAULT}}, | 1475 | .init = {2, { TA8874Z_MONO_SET, TA8874Z_SEPARATION_DEFAULT}}, |
1443 | }, | 1476 | }, |
@@ -1481,6 +1514,7 @@ static int chip_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
1481 | } | 1514 | } |
1482 | if (desc->name == NULL) { | 1515 | if (desc->name == NULL) { |
1483 | v4l_dbg(1, debug, client, "no matching chip description found\n"); | 1516 | v4l_dbg(1, debug, client, "no matching chip description found\n"); |
1517 | kfree(chip); | ||
1484 | return -EIO; | 1518 | return -EIO; |
1485 | } | 1519 | } |
1486 | v4l_info(client, "%s found @ 0x%x (%s)\n", desc->name, client->addr<<1, client->adapter->name); | 1520 | v4l_info(client, "%s found @ 0x%x (%s)\n", desc->name, client->addr<<1, client->adapter->name); |
@@ -1494,7 +1528,7 @@ static int chip_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
1494 | /* fill required data structures */ | 1528 | /* fill required data structures */ |
1495 | if (!id) | 1529 | if (!id) |
1496 | strlcpy(client->name, desc->name, I2C_NAME_SIZE); | 1530 | strlcpy(client->name, desc->name, I2C_NAME_SIZE); |
1497 | chip->type = desc-chiplist; | 1531 | chip->desc = desc; |
1498 | chip->shadow.count = desc->registers+1; | 1532 | chip->shadow.count = desc->registers+1; |
1499 | chip->prevmode = -1; | 1533 | chip->prevmode = -1; |
1500 | chip->audmode = V4L2_TUNER_MODE_LANG1; | 1534 | chip->audmode = V4L2_TUNER_MODE_LANG1; |
@@ -1506,20 +1540,49 @@ static int chip_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
1506 | chip_cmd(chip,"init",&desc->init); | 1540 | chip_cmd(chip,"init",&desc->init); |
1507 | 1541 | ||
1508 | if (desc->flags & CHIP_HAS_VOLUME) { | 1542 | if (desc->flags & CHIP_HAS_VOLUME) { |
1509 | chip->left = desc->leftinit ? desc->leftinit : 65535; | 1543 | if (!desc->volfunc) { |
1510 | chip->right = desc->rightinit ? desc->rightinit : 65535; | 1544 | /* This shouldn't be happen. Warn user, but keep working |
1511 | chip_write(chip,desc->leftreg,desc->volfunc(chip->left)); | 1545 | without volume controls |
1512 | chip_write(chip,desc->rightreg,desc->volfunc(chip->right)); | 1546 | */ |
1547 | v4l_info(chip->c, "volume callback undefined!\n"); | ||
1548 | desc->flags &= ~CHIP_HAS_VOLUME; | ||
1549 | } else { | ||
1550 | chip->left = desc->leftinit ? desc->leftinit : 65535; | ||
1551 | chip->right = desc->rightinit ? desc->rightinit : 65535; | ||
1552 | chip_write(chip, desc->leftreg, | ||
1553 | desc->volfunc(chip->left)); | ||
1554 | chip_write(chip, desc->rightreg, | ||
1555 | desc->volfunc(chip->right)); | ||
1556 | } | ||
1513 | } | 1557 | } |
1514 | if (desc->flags & CHIP_HAS_BASSTREBLE) { | 1558 | if (desc->flags & CHIP_HAS_BASSTREBLE) { |
1515 | chip->treble = desc->trebleinit ? desc->trebleinit : 32768; | 1559 | if (!desc->bassfunc || !desc->treblefunc) { |
1516 | chip->bass = desc->bassinit ? desc->bassinit : 32768; | 1560 | /* This shouldn't be happen. Warn user, but keep working |
1517 | chip_write(chip,desc->bassreg,desc->bassfunc(chip->bass)); | 1561 | without bass/treble controls |
1518 | chip_write(chip,desc->treblereg,desc->treblefunc(chip->treble)); | 1562 | */ |
1563 | v4l_info(chip->c, "bass/treble callbacks undefined!\n"); | ||
1564 | desc->flags &= ~CHIP_HAS_BASSTREBLE; | ||
1565 | } else { | ||
1566 | chip->treble = desc->trebleinit ? | ||
1567 | desc->trebleinit : 32768; | ||
1568 | chip->bass = desc->bassinit ? | ||
1569 | desc->bassinit : 32768; | ||
1570 | chip_write(chip, desc->bassreg, | ||
1571 | desc->bassfunc(chip->bass)); | ||
1572 | chip_write(chip, desc->treblereg, | ||
1573 | desc->treblefunc(chip->treble)); | ||
1574 | } | ||
1519 | } | 1575 | } |
1520 | 1576 | ||
1521 | chip->thread = NULL; | 1577 | chip->thread = NULL; |
1522 | if (desc->checkmode) { | 1578 | if (desc->flags & CHIP_NEED_CHECKMODE) { |
1579 | if (!desc->getmode || !desc->setmode) { | ||
1580 | /* This shouldn't be happen. Warn user, but keep working | ||
1581 | without kthread | ||
1582 | */ | ||
1583 | v4l_info(chip->c, "set/get mode callbacks undefined!\n"); | ||
1584 | return 0; | ||
1585 | } | ||
1523 | /* start async thread */ | 1586 | /* start async thread */ |
1524 | init_timer(&chip->wt); | 1587 | init_timer(&chip->wt); |
1525 | chip->wt.function = chip_thread_wake; | 1588 | chip->wt.function = chip_thread_wake; |
@@ -1552,7 +1615,7 @@ static int chip_remove(struct i2c_client *client) | |||
1552 | static int tvaudio_get_ctrl(struct CHIPSTATE *chip, | 1615 | static int tvaudio_get_ctrl(struct CHIPSTATE *chip, |
1553 | struct v4l2_control *ctrl) | 1616 | struct v4l2_control *ctrl) |
1554 | { | 1617 | { |
1555 | struct CHIPDESC *desc = chiplist + chip->type; | 1618 | struct CHIPDESC *desc = chip->desc; |
1556 | 1619 | ||
1557 | switch (ctrl->id) { | 1620 | switch (ctrl->id) { |
1558 | case V4L2_CID_AUDIO_MUTE: | 1621 | case V4L2_CID_AUDIO_MUTE: |
@@ -1576,13 +1639,13 @@ static int tvaudio_get_ctrl(struct CHIPSTATE *chip, | |||
1576 | return 0; | 1639 | return 0; |
1577 | } | 1640 | } |
1578 | case V4L2_CID_AUDIO_BASS: | 1641 | case V4L2_CID_AUDIO_BASS: |
1579 | if (desc->flags & CHIP_HAS_BASSTREBLE) | 1642 | if (!(desc->flags & CHIP_HAS_BASSTREBLE)) |
1580 | break; | 1643 | break; |
1581 | ctrl->value = chip->bass; | 1644 | ctrl->value = chip->bass; |
1582 | return 0; | 1645 | return 0; |
1583 | case V4L2_CID_AUDIO_TREBLE: | 1646 | case V4L2_CID_AUDIO_TREBLE: |
1584 | if (desc->flags & CHIP_HAS_BASSTREBLE) | 1647 | if (!(desc->flags & CHIP_HAS_BASSTREBLE)) |
1585 | return -EINVAL; | 1648 | break; |
1586 | ctrl->value = chip->treble; | 1649 | ctrl->value = chip->treble; |
1587 | return 0; | 1650 | return 0; |
1588 | } | 1651 | } |
@@ -1592,7 +1655,7 @@ static int tvaudio_get_ctrl(struct CHIPSTATE *chip, | |||
1592 | static int tvaudio_set_ctrl(struct CHIPSTATE *chip, | 1655 | static int tvaudio_set_ctrl(struct CHIPSTATE *chip, |
1593 | struct v4l2_control *ctrl) | 1656 | struct v4l2_control *ctrl) |
1594 | { | 1657 | { |
1595 | struct CHIPDESC *desc = chiplist + chip->type; | 1658 | struct CHIPDESC *desc = chip->desc; |
1596 | 1659 | ||
1597 | switch (ctrl->id) { | 1660 | switch (ctrl->id) { |
1598 | case V4L2_CID_AUDIO_MUTE: | 1661 | case V4L2_CID_AUDIO_MUTE: |
@@ -1642,16 +1705,15 @@ static int tvaudio_set_ctrl(struct CHIPSTATE *chip, | |||
1642 | return 0; | 1705 | return 0; |
1643 | } | 1706 | } |
1644 | case V4L2_CID_AUDIO_BASS: | 1707 | case V4L2_CID_AUDIO_BASS: |
1645 | if (desc->flags & CHIP_HAS_BASSTREBLE) | 1708 | if (!(desc->flags & CHIP_HAS_BASSTREBLE)) |
1646 | break; | 1709 | break; |
1647 | chip->bass = ctrl->value; | 1710 | chip->bass = ctrl->value; |
1648 | chip_write(chip,desc->bassreg,desc->bassfunc(chip->bass)); | 1711 | chip_write(chip,desc->bassreg,desc->bassfunc(chip->bass)); |
1649 | 1712 | ||
1650 | return 0; | 1713 | return 0; |
1651 | case V4L2_CID_AUDIO_TREBLE: | 1714 | case V4L2_CID_AUDIO_TREBLE: |
1652 | if (desc->flags & CHIP_HAS_BASSTREBLE) | 1715 | if (!(desc->flags & CHIP_HAS_BASSTREBLE)) |
1653 | return -EINVAL; | 1716 | break; |
1654 | |||
1655 | chip->treble = ctrl->value; | 1717 | chip->treble = ctrl->value; |
1656 | chip_write(chip,desc->treblereg,desc->treblefunc(chip->treble)); | 1718 | chip_write(chip,desc->treblereg,desc->treblefunc(chip->treble)); |
1657 | 1719 | ||
@@ -1668,9 +1730,12 @@ static int chip_command(struct i2c_client *client, | |||
1668 | unsigned int cmd, void *arg) | 1730 | unsigned int cmd, void *arg) |
1669 | { | 1731 | { |
1670 | struct CHIPSTATE *chip = i2c_get_clientdata(client); | 1732 | struct CHIPSTATE *chip = i2c_get_clientdata(client); |
1671 | struct CHIPDESC *desc = chiplist + chip->type; | 1733 | struct CHIPDESC *desc = chip->desc; |
1672 | 1734 | ||
1673 | v4l_dbg(1, debug, chip->c, "%s: chip_command 0x%x\n", chip->c->name, cmd); | 1735 | if (debug > 0) { |
1736 | v4l_i2c_print_ioctl(chip->c, cmd); | ||
1737 | printk("\n"); | ||
1738 | } | ||
1674 | 1739 | ||
1675 | switch (cmd) { | 1740 | switch (cmd) { |
1676 | case AUDC_SET_RADIO: | 1741 | case AUDC_SET_RADIO: |
@@ -1695,7 +1760,7 @@ static int chip_command(struct i2c_client *client, | |||
1695 | break; | 1760 | break; |
1696 | case V4L2_CID_AUDIO_BASS: | 1761 | case V4L2_CID_AUDIO_BASS: |
1697 | case V4L2_CID_AUDIO_TREBLE: | 1762 | case V4L2_CID_AUDIO_TREBLE: |
1698 | if (desc->flags & CHIP_HAS_BASSTREBLE) | 1763 | if (!(desc->flags & CHIP_HAS_BASSTREBLE)) |
1699 | return -EINVAL; | 1764 | return -EINVAL; |
1700 | break; | 1765 | break; |
1701 | default: | 1766 | default: |
@@ -1792,12 +1857,20 @@ static int chip_command(struct i2c_client *client, | |||
1792 | break; | 1857 | break; |
1793 | case VIDIOC_S_FREQUENCY: | 1858 | case VIDIOC_S_FREQUENCY: |
1794 | chip->mode = 0; /* automatic */ | 1859 | chip->mode = 0; /* automatic */ |
1795 | if (desc->checkmode && desc->setmode) { | 1860 | |
1861 | /* For chips that provide getmode and setmode, and doesn't | ||
1862 | automatically follows the stereo carrier, a kthread is | ||
1863 | created to set the audio standard. In this case, when then | ||
1864 | the video channel is changed, tvaudio starts on MONO mode. | ||
1865 | After waiting for 2 seconds, the kernel thread is called, | ||
1866 | to follow whatever audio standard is pointed by the | ||
1867 | audio carrier. | ||
1868 | */ | ||
1869 | if (chip->thread) { | ||
1796 | desc->setmode(chip,V4L2_TUNER_MODE_MONO); | 1870 | desc->setmode(chip,V4L2_TUNER_MODE_MONO); |
1797 | if (chip->prevmode != V4L2_TUNER_MODE_MONO) | 1871 | if (chip->prevmode != V4L2_TUNER_MODE_MONO) |
1798 | chip->prevmode = -1; /* reset previous mode */ | 1872 | chip->prevmode = -1; /* reset previous mode */ |
1799 | mod_timer(&chip->wt, jiffies+msecs_to_jiffies(2000)); | 1873 | mod_timer(&chip->wt, jiffies+msecs_to_jiffies(2000)); |
1800 | /* the thread will call checkmode() later */ | ||
1801 | } | 1874 | } |
1802 | break; | 1875 | break; |
1803 | 1876 | ||
@@ -1836,9 +1909,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { | |||
1836 | .legacy_probe = chip_legacy_probe, | 1909 | .legacy_probe = chip_legacy_probe, |
1837 | .id_table = chip_id, | 1910 | .id_table = chip_id, |
1838 | }; | 1911 | }; |
1839 | |||
1840 | /* | ||
1841 | * Local variables: | ||
1842 | * c-basic-offset: 8 | ||
1843 | * End: | ||
1844 | */ | ||
diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c index 976b35d1d035..0207dd59090d 100644 --- a/drivers/misc/c2port/core.c +++ b/drivers/misc/c2port/core.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/ctype.h> | 18 | #include <linux/ctype.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/idr.h> | 20 | #include <linux/idr.h> |
21 | #include <linux/sched.h> | ||
21 | 22 | ||
22 | #include <linux/c2port.h> | 23 | #include <linux/c2port.h> |
23 | 24 | ||
diff --git a/drivers/mtd/maps/cdb89712.c b/drivers/mtd/maps/cdb89712.c index e5059aa3c724..8d92d8db9a98 100644 --- a/drivers/mtd/maps/cdb89712.c +++ b/drivers/mtd/maps/cdb89712.c | |||
@@ -14,7 +14,18 @@ | |||
14 | #include <linux/mtd/map.h> | 14 | #include <linux/mtd/map.h> |
15 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
16 | 16 | ||
17 | 17 | /* dynamic ioremap() areas */ | |
18 | #define FLASH_START 0x00000000 | ||
19 | #define FLASH_SIZE 0x800000 | ||
20 | #define FLASH_WIDTH 4 | ||
21 | |||
22 | #define SRAM_START 0x60000000 | ||
23 | #define SRAM_SIZE 0xc000 | ||
24 | #define SRAM_WIDTH 4 | ||
25 | |||
26 | #define BOOTROM_START 0x70000000 | ||
27 | #define BOOTROM_SIZE 0x80 | ||
28 | #define BOOTROM_WIDTH 4 | ||
18 | 29 | ||
19 | 30 | ||
20 | static struct mtd_info *flash_mtd; | 31 | static struct mtd_info *flash_mtd; |
diff --git a/drivers/mtd/maps/h720x-flash.c b/drivers/mtd/maps/h720x-flash.c index 35fef655ccc4..3b959fad1c4e 100644 --- a/drivers/mtd/maps/h720x-flash.c +++ b/drivers/mtd/maps/h720x-flash.c | |||
@@ -24,8 +24,8 @@ static struct mtd_info *mymtd; | |||
24 | static struct map_info h720x_map = { | 24 | static struct map_info h720x_map = { |
25 | .name = "H720X", | 25 | .name = "H720X", |
26 | .bankwidth = 4, | 26 | .bankwidth = 4, |
27 | .size = FLASH_SIZE, | 27 | .size = H720X_FLASH_SIZE, |
28 | .phys = FLASH_PHYS, | 28 | .phys = H720X_FLASH_PHYS, |
29 | }; | 29 | }; |
30 | 30 | ||
31 | static struct mtd_partition h720x_partitions[] = { | 31 | static struct mtd_partition h720x_partitions[] = { |
@@ -70,7 +70,7 @@ int __init h720x_mtd_init(void) | |||
70 | 70 | ||
71 | char *part_type = NULL; | 71 | char *part_type = NULL; |
72 | 72 | ||
73 | h720x_map.virt = ioremap(FLASH_PHYS, FLASH_SIZE); | 73 | h720x_map.virt = ioremap(h720x_map.phys, h720x_map.size); |
74 | 74 | ||
75 | if (!h720x_map.virt) { | 75 | if (!h720x_map.virt) { |
76 | printk(KERN_ERR "H720x-MTD: ioremap failed\n"); | 76 | printk(KERN_ERR "H720x-MTD: ioremap failed\n"); |
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 37ecf845edfe..e12cdb4543b4 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -1444,6 +1444,10 @@ static const struct usb_device_id products [] = { | |||
1444 | // Apple USB Ethernet Adapter | 1444 | // Apple USB Ethernet Adapter |
1445 | USB_DEVICE(0x05ac, 0x1402), | 1445 | USB_DEVICE(0x05ac, 0x1402), |
1446 | .driver_info = (unsigned long) &ax88772_info, | 1446 | .driver_info = (unsigned long) &ax88772_info, |
1447 | }, { | ||
1448 | // Cables-to-Go USB Ethernet Adapter | ||
1449 | USB_DEVICE(0x0b95, 0x772a), | ||
1450 | .driver_info = (unsigned long) &ax88772_info, | ||
1447 | }, | 1451 | }, |
1448 | { }, // END | 1452 | { }, // END |
1449 | }; | 1453 | }; |
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index b3a63edb6901..ae5ec76dca77 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -63,7 +63,7 @@ static acpi_status acpi_run_osc(acpi_handle handle, | |||
63 | union acpi_object in_params[4]; | 63 | union acpi_object in_params[4]; |
64 | struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL}; | 64 | struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL}; |
65 | union acpi_object *out_obj; | 65 | union acpi_object *out_obj; |
66 | u32 osc_dw0, flags = osc_args->capbuf[OSC_QUERY_TYPE]; | 66 | u32 errors, flags = osc_args->capbuf[OSC_QUERY_TYPE]; |
67 | 67 | ||
68 | /* Setting up input parameters */ | 68 | /* Setting up input parameters */ |
69 | input.count = 4; | 69 | input.count = 4; |
@@ -92,15 +92,16 @@ static acpi_status acpi_run_osc(acpi_handle handle, | |||
92 | status = AE_TYPE; | 92 | status = AE_TYPE; |
93 | goto out_kfree; | 93 | goto out_kfree; |
94 | } | 94 | } |
95 | osc_dw0 = *((u32 *)out_obj->buffer.pointer); | 95 | /* Need to ignore the bit0 in result code */ |
96 | if (osc_dw0) { | 96 | errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0); |
97 | if (osc_dw0 & OSC_REQUEST_ERROR) | 97 | if (errors) { |
98 | if (errors & OSC_REQUEST_ERROR) | ||
98 | printk(KERN_DEBUG "_OSC request fails\n"); | 99 | printk(KERN_DEBUG "_OSC request fails\n"); |
99 | if (osc_dw0 & OSC_INVALID_UUID_ERROR) | 100 | if (errors & OSC_INVALID_UUID_ERROR) |
100 | printk(KERN_DEBUG "_OSC invalid UUID\n"); | 101 | printk(KERN_DEBUG "_OSC invalid UUID\n"); |
101 | if (osc_dw0 & OSC_INVALID_REVISION_ERROR) | 102 | if (errors & OSC_INVALID_REVISION_ERROR) |
102 | printk(KERN_DEBUG "_OSC invalid revision\n"); | 103 | printk(KERN_DEBUG "_OSC invalid revision\n"); |
103 | if (osc_dw0 & OSC_CAPABILITIES_MASK_ERROR) { | 104 | if (errors & OSC_CAPABILITIES_MASK_ERROR) { |
104 | if (flags & OSC_QUERY_ENABLE) | 105 | if (flags & OSC_QUERY_ENABLE) |
105 | goto out_success; | 106 | goto out_success; |
106 | printk(KERN_DEBUG "_OSC FW not grant req. control\n"); | 107 | printk(KERN_DEBUG "_OSC FW not grant req. control\n"); |
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index dcce9f5d8465..4a110b7b2673 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c | |||
@@ -351,10 +351,11 @@ int verify_cis_cache(struct pcmcia_socket *s) | |||
351 | char *buf; | 351 | char *buf; |
352 | 352 | ||
353 | buf = kmalloc(256, GFP_KERNEL); | 353 | buf = kmalloc(256, GFP_KERNEL); |
354 | if (buf == NULL) | 354 | if (buf == NULL) { |
355 | dev_printk(KERN_WARNING, &s->dev, | 355 | dev_printk(KERN_WARNING, &s->dev, |
356 | "no memory for verifying CIS\n"); | 356 | "no memory for verifying CIS\n"); |
357 | return -ENOMEM; | 357 | return -ENOMEM; |
358 | } | ||
358 | list_for_each_entry(cis, &s->cis_cache, node) { | 359 | list_for_each_entry(cis, &s->cis_cache, node) { |
359 | int len = cis->len; | 360 | int len = cis->len; |
360 | 361 | ||
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index c68c5d338285..0660ad182589 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c | |||
@@ -186,12 +186,6 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) | |||
186 | 186 | ||
187 | spin_lock_init(&socket->lock); | 187 | spin_lock_init(&socket->lock); |
188 | 188 | ||
189 | if (socket->resource_ops->init) { | ||
190 | ret = socket->resource_ops->init(socket); | ||
191 | if (ret) | ||
192 | return (ret); | ||
193 | } | ||
194 | |||
195 | /* try to obtain a socket number [yes, it gets ugly if we | 189 | /* try to obtain a socket number [yes, it gets ugly if we |
196 | * register more than 2^sizeof(unsigned int) pcmcia | 190 | * register more than 2^sizeof(unsigned int) pcmcia |
197 | * sockets... but the socket number is deprecated | 191 | * sockets... but the socket number is deprecated |
@@ -226,7 +220,7 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) | |||
226 | /* set proper values in socket->dev */ | 220 | /* set proper values in socket->dev */ |
227 | dev_set_drvdata(&socket->dev, socket); | 221 | dev_set_drvdata(&socket->dev, socket); |
228 | socket->dev.class = &pcmcia_socket_class; | 222 | socket->dev.class = &pcmcia_socket_class; |
229 | snprintf(socket->dev.bus_id, BUS_ID_SIZE, "pcmcia_socket%u", socket->sock); | 223 | dev_set_name(&socket->dev, "pcmcia_socket%u", socket->sock); |
230 | 224 | ||
231 | /* base address = 0, map = 0 */ | 225 | /* base address = 0, map = 0 */ |
232 | socket->cis_mem.flags = 0; | 226 | socket->cis_mem.flags = 0; |
@@ -239,6 +233,12 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) | |||
239 | mutex_init(&socket->skt_mutex); | 233 | mutex_init(&socket->skt_mutex); |
240 | spin_lock_init(&socket->thread_lock); | 234 | spin_lock_init(&socket->thread_lock); |
241 | 235 | ||
236 | if (socket->resource_ops->init) { | ||
237 | ret = socket->resource_ops->init(socket); | ||
238 | if (ret) | ||
239 | goto err; | ||
240 | } | ||
241 | |||
242 | tsk = kthread_run(pccardd, socket, "pccardd"); | 242 | tsk = kthread_run(pccardd, socket, "pccardd"); |
243 | if (IS_ERR(tsk)) { | 243 | if (IS_ERR(tsk)) { |
244 | ret = PTR_ERR(tsk); | 244 | ret = PTR_ERR(tsk); |
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 795660255490..47cab31ff6e4 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -622,7 +622,6 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f | |||
622 | { | 622 | { |
623 | struct pcmcia_device *p_dev, *tmp_dev; | 623 | struct pcmcia_device *p_dev, *tmp_dev; |
624 | unsigned long flags; | 624 | unsigned long flags; |
625 | int bus_id_len; | ||
626 | 625 | ||
627 | s = pcmcia_get_socket(s); | 626 | s = pcmcia_get_socket(s); |
628 | if (!s) | 627 | if (!s) |
@@ -650,12 +649,12 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f | |||
650 | /* by default don't allow DMA */ | 649 | /* by default don't allow DMA */ |
651 | p_dev->dma_mask = DMA_MASK_NONE; | 650 | p_dev->dma_mask = DMA_MASK_NONE; |
652 | p_dev->dev.dma_mask = &p_dev->dma_mask; | 651 | p_dev->dev.dma_mask = &p_dev->dma_mask; |
653 | bus_id_len = sprintf (p_dev->dev.bus_id, "%d.%d", p_dev->socket->sock, p_dev->device_no); | 652 | dev_set_name(&p_dev->dev, "%d.%d", p_dev->socket->sock, p_dev->device_no); |
654 | 653 | if (!dev_name(&p_dev->dev)) | |
655 | p_dev->devname = kmalloc(6 + bus_id_len + 1, GFP_KERNEL); | 654 | goto err_free; |
655 | p_dev->devname = kasprintf(GFP_KERNEL, "pcmcia%s", dev_name(&p_dev->dev)); | ||
656 | if (!p_dev->devname) | 656 | if (!p_dev->devname) |
657 | goto err_free; | 657 | goto err_free; |
658 | sprintf (p_dev->devname, "pcmcia%s", p_dev->dev.bus_id); | ||
659 | ds_dev_dbg(3, &p_dev->dev, "devname is %s\n", p_dev->devname); | 658 | ds_dev_dbg(3, &p_dev->dev, "devname is %s\n", p_dev->devname); |
660 | 659 | ||
661 | spin_lock_irqsave(&pcmcia_dev_list_lock, flags); | 660 | spin_lock_irqsave(&pcmcia_dev_list_lock, flags); |
@@ -668,6 +667,8 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f | |||
668 | list_for_each_entry(tmp_dev, &s->devices_list, socket_device_list) | 667 | list_for_each_entry(tmp_dev, &s->devices_list, socket_device_list) |
669 | if (p_dev->func == tmp_dev->func) { | 668 | if (p_dev->func == tmp_dev->func) { |
670 | p_dev->function_config = tmp_dev->function_config; | 669 | p_dev->function_config = tmp_dev->function_config; |
670 | p_dev->io = tmp_dev->io; | ||
671 | p_dev->irq = tmp_dev->irq; | ||
671 | kref_get(&p_dev->function_config->ref); | 672 | kref_get(&p_dev->function_config->ref); |
672 | } | 673 | } |
673 | 674 | ||
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 76d4a98f0955..f5d0ba8e22d5 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
@@ -302,9 +302,10 @@ int pcmcia_modify_configuration(struct pcmcia_device *p_dev, | |||
302 | /* We only allow changing Vpp1 and Vpp2 to the same value */ | 302 | /* We only allow changing Vpp1 and Vpp2 to the same value */ |
303 | if ((mod->Attributes & CONF_VPP1_CHANGE_VALID) && | 303 | if ((mod->Attributes & CONF_VPP1_CHANGE_VALID) && |
304 | (mod->Attributes & CONF_VPP2_CHANGE_VALID)) { | 304 | (mod->Attributes & CONF_VPP2_CHANGE_VALID)) { |
305 | if (mod->Vpp1 != mod->Vpp2) | 305 | if (mod->Vpp1 != mod->Vpp2) { |
306 | ds_dbg(s, 0, "Vpp1 and Vpp2 must be the same\n"); | 306 | ds_dbg(s, 0, "Vpp1 and Vpp2 must be the same\n"); |
307 | return -EINVAL; | 307 | return -EINVAL; |
308 | } | ||
308 | s->socket.Vpp = mod->Vpp1; | 309 | s->socket.Vpp = mod->Vpp1; |
309 | if (s->ops->set_socket(s, &s->socket)) { | 310 | if (s->ops->set_socket(s, &s->socket)) { |
310 | dev_printk(KERN_WARNING, &s->dev, | 311 | dev_printk(KERN_WARNING, &s->dev, |
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index 17f4ecf1c0c5..9ca22c7aafb2 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c | |||
@@ -71,7 +71,7 @@ static DEFINE_MUTEX(rsrc_mutex); | |||
71 | ======================================================================*/ | 71 | ======================================================================*/ |
72 | 72 | ||
73 | static struct resource * | 73 | static struct resource * |
74 | make_resource(resource_size_t b, resource_size_t n, int flags, char *name) | 74 | make_resource(resource_size_t b, resource_size_t n, int flags, const char *name) |
75 | { | 75 | { |
76 | struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL); | 76 | struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL); |
77 | 77 | ||
@@ -624,7 +624,7 @@ static int nonstatic_adjust_io_region(struct resource *res, unsigned long r_star | |||
624 | static struct resource *nonstatic_find_io_region(unsigned long base, int num, | 624 | static struct resource *nonstatic_find_io_region(unsigned long base, int num, |
625 | unsigned long align, struct pcmcia_socket *s) | 625 | unsigned long align, struct pcmcia_socket *s) |
626 | { | 626 | { |
627 | struct resource *res = make_resource(0, num, IORESOURCE_IO, s->dev.bus_id); | 627 | struct resource *res = make_resource(0, num, IORESOURCE_IO, dev_name(&s->dev)); |
628 | struct socket_data *s_data = s->resource_data; | 628 | struct socket_data *s_data = s->resource_data; |
629 | struct pcmcia_align_data data; | 629 | struct pcmcia_align_data data; |
630 | unsigned long min = base; | 630 | unsigned long min = base; |
@@ -658,7 +658,7 @@ static struct resource *nonstatic_find_io_region(unsigned long base, int num, | |||
658 | static struct resource * nonstatic_find_mem_region(u_long base, u_long num, | 658 | static struct resource * nonstatic_find_mem_region(u_long base, u_long num, |
659 | u_long align, int low, struct pcmcia_socket *s) | 659 | u_long align, int low, struct pcmcia_socket *s) |
660 | { | 660 | { |
661 | struct resource *res = make_resource(0, num, IORESOURCE_MEM, s->dev.bus_id); | 661 | struct resource *res = make_resource(0, num, IORESOURCE_MEM, dev_name(&s->dev)); |
662 | struct socket_data *s_data = s->resource_data; | 662 | struct socket_data *s_data = s->resource_data; |
663 | struct pcmcia_align_data data; | 663 | struct pcmcia_align_data data; |
664 | unsigned long min, max; | 664 | unsigned long min, max; |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 4b76fca64a6f..363bd1303d21 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -1746,6 +1746,11 @@ restart: | |||
1746 | goto restart; | 1746 | goto restart; |
1747 | } | 1747 | } |
1748 | 1748 | ||
1749 | /* log sense for fatal error */ | ||
1750 | if (cqr->status == DASD_CQR_FAILED) { | ||
1751 | dasd_log_sense(cqr, &cqr->irb); | ||
1752 | } | ||
1753 | |||
1749 | /* First of all call extended error reporting. */ | 1754 | /* First of all call extended error reporting. */ |
1750 | if (dasd_eer_enabled(base) && | 1755 | if (dasd_eer_enabled(base) && |
1751 | cqr->status == DASD_CQR_FAILED) { | 1756 | cqr->status == DASD_CQR_FAILED) { |
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index eb5f1b8bc57f..ec9c0bcf66ee 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -324,6 +324,9 @@ static int do_assign_storage(sclp_cmdw_t cmd, u16 rn) | |||
324 | case 0x0120: | 324 | case 0x0120: |
325 | break; | 325 | break; |
326 | default: | 326 | default: |
327 | pr_warning("assign storage failed (cmd=0x%08x, " | ||
328 | "response=0x%04x, rn=0x%04x)\n", cmd, | ||
329 | sccb->header.response_code, rn); | ||
327 | rc = -EIO; | 330 | rc = -EIO; |
328 | break; | 331 | break; |
329 | } | 332 | } |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 4e78c82194b4..4e4008325e28 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -874,11 +874,15 @@ void ccw_device_move_to_orphanage(struct work_struct *work) | |||
874 | replacing_cdev = get_disc_ccwdev_by_dev_id(&dev_id, cdev); | 874 | replacing_cdev = get_disc_ccwdev_by_dev_id(&dev_id, cdev); |
875 | if (replacing_cdev) { | 875 | if (replacing_cdev) { |
876 | sch_attach_disconnected_device(sch, replacing_cdev); | 876 | sch_attach_disconnected_device(sch, replacing_cdev); |
877 | /* Release reference from get_disc_ccwdev_by_dev_id() */ | ||
878 | put_device(&cdev->dev); | ||
877 | return; | 879 | return; |
878 | } | 880 | } |
879 | replacing_cdev = get_orphaned_ccwdev_by_dev_id(css, &dev_id); | 881 | replacing_cdev = get_orphaned_ccwdev_by_dev_id(css, &dev_id); |
880 | if (replacing_cdev) { | 882 | if (replacing_cdev) { |
881 | sch_attach_orphaned_device(sch, replacing_cdev); | 883 | sch_attach_orphaned_device(sch, replacing_cdev); |
884 | /* Release reference from get_orphaned_ccwdev_by_dev_id() */ | ||
885 | put_device(&cdev->dev); | ||
882 | return; | 886 | return; |
883 | } | 887 | } |
884 | sch_create_and_recog_new_device(sch); | 888 | sch_create_and_recog_new_device(sch); |
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c index ff4a6931bb8e..3d442444c618 100644 --- a/drivers/s390/kvm/kvm_virtio.c +++ b/drivers/s390/kvm/kvm_virtio.c | |||
@@ -322,13 +322,13 @@ static int __init kvm_devices_init(void) | |||
322 | return rc; | 322 | return rc; |
323 | } | 323 | } |
324 | 324 | ||
325 | rc = vmem_add_mapping(PFN_PHYS(max_pfn), PAGE_SIZE); | 325 | rc = vmem_add_mapping(real_memory_size, PAGE_SIZE); |
326 | if (rc) { | 326 | if (rc) { |
327 | s390_root_dev_unregister(kvm_root); | 327 | s390_root_dev_unregister(kvm_root); |
328 | return rc; | 328 | return rc; |
329 | } | 329 | } |
330 | 330 | ||
331 | kvm_devices = (void *) PFN_PHYS(max_pfn); | 331 | kvm_devices = (void *) real_memory_size; |
332 | 332 | ||
333 | ctl_set_bit(0, 9); | 333 | ctl_set_bit(0, 9); |
334 | register_external_interrupt(0x2603, kvm_extint_handler); | 334 | register_external_interrupt(0x2603, kvm_extint_handler); |
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 3b56220fb900..3d4e3e3f3fc0 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -610,7 +610,8 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn, | |||
610 | atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status); | 610 | atomic_set_mask(status | ZFCP_STATUS_COMMON_REMOVE, &port->status); |
611 | atomic_set(&port->refcount, 0); | 611 | atomic_set(&port->refcount, 0); |
612 | 612 | ||
613 | dev_set_name(&port->sysfs_device, "0x%016llx", wwpn); | 613 | dev_set_name(&port->sysfs_device, "0x%016llx", |
614 | (unsigned long long)wwpn); | ||
614 | port->sysfs_device.parent = &adapter->ccw_device->dev; | 615 | port->sysfs_device.parent = &adapter->ccw_device->dev; |
615 | 616 | ||
616 | port->sysfs_device.release = zfcp_sysfs_port_release; | 617 | port->sysfs_device.release = zfcp_sysfs_port_release; |
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index b04038c74786..951a8d409d1d 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -116,7 +116,9 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device) | |||
116 | zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, | 116 | zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, |
117 | NULL); | 117 | NULL); |
118 | zfcp_erp_wait(adapter); | 118 | zfcp_erp_wait(adapter); |
119 | goto out; | 119 | up(&zfcp_data.config_sema); |
120 | flush_work(&adapter->scan_work); | ||
121 | return 0; | ||
120 | 122 | ||
121 | out_scsi_register: | 123 | out_scsi_register: |
122 | zfcp_erp_thread_kill(adapter); | 124 | zfcp_erp_thread_kill(adapter); |
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index 060f5f2352ec..31012d58cfb7 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -30,7 +30,7 @@ static void zfcp_dbf_hexdump(debug_info_t *dbf, void *to, int to_len, | |||
30 | dump->offset = offset; | 30 | dump->offset = offset; |
31 | dump->size = min(from_len - offset, room); | 31 | dump->size = min(from_len - offset, room); |
32 | memcpy(dump->data, from + offset, dump->size); | 32 | memcpy(dump->data, from + offset, dump->size); |
33 | debug_event(dbf, level, dump, dump->size); | 33 | debug_event(dbf, level, dump, dump->size + sizeof(*dump)); |
34 | } | 34 | } |
35 | } | 35 | } |
36 | 36 | ||
@@ -108,7 +108,7 @@ static int zfcp_dbf_view_header(debug_info_t *id, struct debug_view *view, | |||
108 | t.tv_sec, t.tv_nsec); | 108 | t.tv_sec, t.tv_nsec); |
109 | zfcp_dbf_out(&p, "cpu", "%02i", entry->id.fields.cpuid); | 109 | zfcp_dbf_out(&p, "cpu", "%02i", entry->id.fields.cpuid); |
110 | } else { | 110 | } else { |
111 | zfcp_dbf_outd(&p, NULL, dump->data, dump->size, dump->offset, | 111 | zfcp_dbf_outd(&p, "", dump->data, dump->size, dump->offset, |
112 | dump->total_size); | 112 | dump->total_size); |
113 | if ((dump->offset + dump->size) == dump->total_size) | 113 | if ((dump->offset + dump->size) == dump->total_size) |
114 | p += sprintf(p, "\n"); | 114 | p += sprintf(p, "\n"); |
@@ -366,6 +366,7 @@ static void zfcp_hba_dbf_view_response(char **p, | |||
366 | break; | 366 | break; |
367 | zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd); | 367 | zfcp_dbf_out(p, "scsi_cmnd", "0x%0Lx", r->u.fcp.cmnd); |
368 | zfcp_dbf_out(p, "scsi_serial", "0x%016Lx", r->u.fcp.serial); | 368 | zfcp_dbf_out(p, "scsi_serial", "0x%016Lx", r->u.fcp.serial); |
369 | p += sprintf(*p, "\n"); | ||
369 | break; | 370 | break; |
370 | 371 | ||
371 | case FSF_QTCB_OPEN_PORT_WITH_DID: | 372 | case FSF_QTCB_OPEN_PORT_WITH_DID: |
@@ -465,7 +466,8 @@ static int zfcp_hba_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
465 | else if (strncmp(r->tag, "berr", ZFCP_DBF_TAG_SIZE) == 0) | 466 | else if (strncmp(r->tag, "berr", ZFCP_DBF_TAG_SIZE) == 0) |
466 | zfcp_hba_dbf_view_berr(&p, &r->u.berr); | 467 | zfcp_hba_dbf_view_berr(&p, &r->u.berr); |
467 | 468 | ||
468 | p += sprintf(p, "\n"); | 469 | if (strncmp(r->tag, "resp", ZFCP_DBF_TAG_SIZE) != 0) |
470 | p += sprintf(p, "\n"); | ||
469 | return p - out_buf; | 471 | return p - out_buf; |
470 | } | 472 | } |
471 | 473 | ||
@@ -880,6 +882,7 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) | |||
880 | struct ct_hdr *hdr = sg_virt(ct->req); | 882 | struct ct_hdr *hdr = sg_virt(ct->req); |
881 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; | 883 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; |
882 | struct zfcp_san_dbf_record_ct_request *oct = &r->u.ct_req; | 884 | struct zfcp_san_dbf_record_ct_request *oct = &r->u.ct_req; |
885 | int level = 3; | ||
883 | unsigned long flags; | 886 | unsigned long flags; |
884 | 887 | ||
885 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); | 888 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); |
@@ -896,9 +899,10 @@ void zfcp_san_dbf_event_ct_request(struct zfcp_fsf_req *fsf_req) | |||
896 | oct->options = hdr->options; | 899 | oct->options = hdr->options; |
897 | oct->max_res_size = hdr->max_res_size; | 900 | oct->max_res_size = hdr->max_res_size; |
898 | oct->len = min((int)ct->req->length - (int)sizeof(struct ct_hdr), | 901 | oct->len = min((int)ct->req->length - (int)sizeof(struct ct_hdr), |
899 | ZFCP_DBF_CT_PAYLOAD); | 902 | ZFCP_DBF_SAN_MAX_PAYLOAD); |
900 | memcpy(oct->payload, (void *)hdr + sizeof(struct ct_hdr), oct->len); | 903 | debug_event(adapter->san_dbf, level, r, sizeof(*r)); |
901 | debug_event(adapter->san_dbf, 3, r, sizeof(*r)); | 904 | zfcp_dbf_hexdump(adapter->san_dbf, r, sizeof(*r), level, |
905 | (void *)hdr + sizeof(struct ct_hdr), oct->len); | ||
902 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); | 906 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); |
903 | } | 907 | } |
904 | 908 | ||
@@ -914,6 +918,7 @@ void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) | |||
914 | struct ct_hdr *hdr = sg_virt(ct->resp); | 918 | struct ct_hdr *hdr = sg_virt(ct->resp); |
915 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; | 919 | struct zfcp_san_dbf_record *r = &adapter->san_dbf_buf; |
916 | struct zfcp_san_dbf_record_ct_response *rct = &r->u.ct_resp; | 920 | struct zfcp_san_dbf_record_ct_response *rct = &r->u.ct_resp; |
921 | int level = 3; | ||
917 | unsigned long flags; | 922 | unsigned long flags; |
918 | 923 | ||
919 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); | 924 | spin_lock_irqsave(&adapter->san_dbf_lock, flags); |
@@ -929,9 +934,10 @@ void zfcp_san_dbf_event_ct_response(struct zfcp_fsf_req *fsf_req) | |||
929 | rct->expl = hdr->reason_code_expl; | 934 | rct->expl = hdr->reason_code_expl; |
930 | rct->vendor_unique = hdr->vendor_unique; | 935 | rct->vendor_unique = hdr->vendor_unique; |
931 | rct->len = min((int)ct->resp->length - (int)sizeof(struct ct_hdr), | 936 | rct->len = min((int)ct->resp->length - (int)sizeof(struct ct_hdr), |
932 | ZFCP_DBF_CT_PAYLOAD); | 937 | ZFCP_DBF_SAN_MAX_PAYLOAD); |
933 | memcpy(rct->payload, (void *)hdr + sizeof(struct ct_hdr), rct->len); | 938 | debug_event(adapter->san_dbf, level, r, sizeof(*r)); |
934 | debug_event(adapter->san_dbf, 3, r, sizeof(*r)); | 939 | zfcp_dbf_hexdump(adapter->san_dbf, r, sizeof(*r), level, |
940 | (void *)hdr + sizeof(struct ct_hdr), rct->len); | ||
935 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); | 941 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); |
936 | } | 942 | } |
937 | 943 | ||
@@ -954,7 +960,7 @@ static void zfcp_san_dbf_event_els(const char *tag, int level, | |||
954 | rec->u.els.ls_code = ls_code; | 960 | rec->u.els.ls_code = ls_code; |
955 | debug_event(adapter->san_dbf, level, rec, sizeof(*rec)); | 961 | debug_event(adapter->san_dbf, level, rec, sizeof(*rec)); |
956 | zfcp_dbf_hexdump(adapter->san_dbf, rec, sizeof(*rec), level, | 962 | zfcp_dbf_hexdump(adapter->san_dbf, rec, sizeof(*rec), level, |
957 | buffer, min(buflen, ZFCP_DBF_ELS_MAX_PAYLOAD)); | 963 | buffer, min(buflen, ZFCP_DBF_SAN_MAX_PAYLOAD)); |
958 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); | 964 | spin_unlock_irqrestore(&adapter->san_dbf_lock, flags); |
959 | } | 965 | } |
960 | 966 | ||
@@ -1008,8 +1014,6 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
1008 | char *out_buf, const char *in_buf) | 1014 | char *out_buf, const char *in_buf) |
1009 | { | 1015 | { |
1010 | struct zfcp_san_dbf_record *r = (struct zfcp_san_dbf_record *)in_buf; | 1016 | struct zfcp_san_dbf_record *r = (struct zfcp_san_dbf_record *)in_buf; |
1011 | char *buffer = NULL; | ||
1012 | int buflen = 0, total = 0; | ||
1013 | char *p = out_buf; | 1017 | char *p = out_buf; |
1014 | 1018 | ||
1015 | if (strncmp(r->tag, "dump", ZFCP_DBF_TAG_SIZE) == 0) | 1019 | if (strncmp(r->tag, "dump", ZFCP_DBF_TAG_SIZE) == 0) |
@@ -1029,9 +1033,6 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
1029 | zfcp_dbf_out(&p, "gs_subtype", "0x%02x", ct->gs_subtype); | 1033 | zfcp_dbf_out(&p, "gs_subtype", "0x%02x", ct->gs_subtype); |
1030 | zfcp_dbf_out(&p, "options", "0x%02x", ct->options); | 1034 | zfcp_dbf_out(&p, "options", "0x%02x", ct->options); |
1031 | zfcp_dbf_out(&p, "max_res_size", "0x%04x", ct->max_res_size); | 1035 | zfcp_dbf_out(&p, "max_res_size", "0x%04x", ct->max_res_size); |
1032 | total = ct->len; | ||
1033 | buffer = ct->payload; | ||
1034 | buflen = min(total, ZFCP_DBF_CT_PAYLOAD); | ||
1035 | } else if (strncmp(r->tag, "rctc", ZFCP_DBF_TAG_SIZE) == 0) { | 1036 | } else if (strncmp(r->tag, "rctc", ZFCP_DBF_TAG_SIZE) == 0) { |
1036 | struct zfcp_san_dbf_record_ct_response *ct = &r->u.ct_resp; | 1037 | struct zfcp_san_dbf_record_ct_response *ct = &r->u.ct_resp; |
1037 | zfcp_dbf_out(&p, "cmd_rsp_code", "0x%04x", ct->cmd_rsp_code); | 1038 | zfcp_dbf_out(&p, "cmd_rsp_code", "0x%04x", ct->cmd_rsp_code); |
@@ -1039,23 +1040,12 @@ static int zfcp_san_dbf_view_format(debug_info_t *id, struct debug_view *view, | |||
1039 | zfcp_dbf_out(&p, "reason_code", "0x%02x", ct->reason_code); | 1040 | zfcp_dbf_out(&p, "reason_code", "0x%02x", ct->reason_code); |
1040 | zfcp_dbf_out(&p, "reason_code_expl", "0x%02x", ct->expl); | 1041 | zfcp_dbf_out(&p, "reason_code_expl", "0x%02x", ct->expl); |
1041 | zfcp_dbf_out(&p, "vendor_unique", "0x%02x", ct->vendor_unique); | 1042 | zfcp_dbf_out(&p, "vendor_unique", "0x%02x", ct->vendor_unique); |
1042 | total = ct->len; | ||
1043 | buffer = ct->payload; | ||
1044 | buflen = min(total, ZFCP_DBF_CT_PAYLOAD); | ||
1045 | } else if (strncmp(r->tag, "oels", ZFCP_DBF_TAG_SIZE) == 0 || | 1043 | } else if (strncmp(r->tag, "oels", ZFCP_DBF_TAG_SIZE) == 0 || |
1046 | strncmp(r->tag, "rels", ZFCP_DBF_TAG_SIZE) == 0 || | 1044 | strncmp(r->tag, "rels", ZFCP_DBF_TAG_SIZE) == 0 || |
1047 | strncmp(r->tag, "iels", ZFCP_DBF_TAG_SIZE) == 0) { | 1045 | strncmp(r->tag, "iels", ZFCP_DBF_TAG_SIZE) == 0) { |
1048 | struct zfcp_san_dbf_record_els *els = &r->u.els; | 1046 | struct zfcp_san_dbf_record_els *els = &r->u.els; |
1049 | zfcp_dbf_out(&p, "ls_code", "0x%02x", els->ls_code); | 1047 | zfcp_dbf_out(&p, "ls_code", "0x%02x", els->ls_code); |
1050 | total = els->len; | ||
1051 | buffer = els->payload; | ||
1052 | buflen = min(total, ZFCP_DBF_ELS_PAYLOAD); | ||
1053 | } | 1048 | } |
1054 | |||
1055 | zfcp_dbf_outd(&p, "payload", buffer, buflen, 0, total); | ||
1056 | if (buflen == total) | ||
1057 | p += sprintf(p, "\n"); | ||
1058 | |||
1059 | return p - out_buf; | 1049 | return p - out_buf; |
1060 | } | 1050 | } |
1061 | 1051 | ||
diff --git a/drivers/s390/scsi/zfcp_dbf.h b/drivers/s390/scsi/zfcp_dbf.h index e8f450801fea..5d6b2dff855b 100644 --- a/drivers/s390/scsi/zfcp_dbf.h +++ b/drivers/s390/scsi/zfcp_dbf.h | |||
@@ -163,8 +163,6 @@ struct zfcp_san_dbf_record_ct_request { | |||
163 | u8 options; | 163 | u8 options; |
164 | u16 max_res_size; | 164 | u16 max_res_size; |
165 | u32 len; | 165 | u32 len; |
166 | #define ZFCP_DBF_CT_PAYLOAD 24 | ||
167 | u8 payload[ZFCP_DBF_CT_PAYLOAD]; | ||
168 | } __attribute__ ((packed)); | 166 | } __attribute__ ((packed)); |
169 | 167 | ||
170 | struct zfcp_san_dbf_record_ct_response { | 168 | struct zfcp_san_dbf_record_ct_response { |
@@ -174,15 +172,11 @@ struct zfcp_san_dbf_record_ct_response { | |||
174 | u8 expl; | 172 | u8 expl; |
175 | u8 vendor_unique; | 173 | u8 vendor_unique; |
176 | u32 len; | 174 | u32 len; |
177 | u8 payload[ZFCP_DBF_CT_PAYLOAD]; | ||
178 | } __attribute__ ((packed)); | 175 | } __attribute__ ((packed)); |
179 | 176 | ||
180 | struct zfcp_san_dbf_record_els { | 177 | struct zfcp_san_dbf_record_els { |
181 | u8 ls_code; | 178 | u8 ls_code; |
182 | u32 len; | 179 | u32 len; |
183 | #define ZFCP_DBF_ELS_PAYLOAD 32 | ||
184 | #define ZFCP_DBF_ELS_MAX_PAYLOAD 1024 | ||
185 | u8 payload[ZFCP_DBF_ELS_PAYLOAD]; | ||
186 | } __attribute__ ((packed)); | 180 | } __attribute__ ((packed)); |
187 | 181 | ||
188 | struct zfcp_san_dbf_record { | 182 | struct zfcp_san_dbf_record { |
@@ -196,6 +190,8 @@ struct zfcp_san_dbf_record { | |||
196 | struct zfcp_san_dbf_record_ct_response ct_resp; | 190 | struct zfcp_san_dbf_record_ct_response ct_resp; |
197 | struct zfcp_san_dbf_record_els els; | 191 | struct zfcp_san_dbf_record_els els; |
198 | } u; | 192 | } u; |
193 | #define ZFCP_DBF_SAN_MAX_PAYLOAD 1024 | ||
194 | u8 payload[32]; | ||
199 | } __attribute__ ((packed)); | 195 | } __attribute__ ((packed)); |
200 | 196 | ||
201 | struct zfcp_scsi_dbf_record { | 197 | struct zfcp_scsi_dbf_record { |
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 9040f738ff33..35364f64da7f 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -472,6 +472,7 @@ static void zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *act) | |||
472 | ZFCP_STATUS_ERP_TIMEDOUT)) { | 472 | ZFCP_STATUS_ERP_TIMEDOUT)) { |
473 | act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; | 473 | act->fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; |
474 | zfcp_rec_dbf_event_action(142, act); | 474 | zfcp_rec_dbf_event_action(142, act); |
475 | act->fsf_req->erp_action = NULL; | ||
475 | } | 476 | } |
476 | if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) | 477 | if (act->status & ZFCP_STATUS_ERP_TIMEDOUT) |
477 | zfcp_rec_dbf_event_action(143, act); | 478 | zfcp_rec_dbf_event_action(143, act); |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 5ae1d497e5ed..d024442ee128 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -683,6 +683,7 @@ static struct zfcp_fsf_req *zfcp_fsf_alloc_noqtcb(mempool_t *pool) | |||
683 | if (!req) | 683 | if (!req) |
684 | return NULL; | 684 | return NULL; |
685 | memset(req, 0, sizeof(*req)); | 685 | memset(req, 0, sizeof(*req)); |
686 | req->pool = pool; | ||
686 | return req; | 687 | return req; |
687 | } | 688 | } |
688 | 689 | ||
@@ -769,28 +770,24 @@ static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_adapter *adapter, | |||
769 | static int zfcp_fsf_req_send(struct zfcp_fsf_req *req) | 770 | static int zfcp_fsf_req_send(struct zfcp_fsf_req *req) |
770 | { | 771 | { |
771 | struct zfcp_adapter *adapter = req->adapter; | 772 | struct zfcp_adapter *adapter = req->adapter; |
772 | struct zfcp_qdio_queue *req_q = &adapter->req_q; | 773 | unsigned long flags; |
773 | int idx; | 774 | int idx; |
774 | 775 | ||
775 | /* put allocated FSF request into hash table */ | 776 | /* put allocated FSF request into hash table */ |
776 | spin_lock(&adapter->req_list_lock); | 777 | spin_lock_irqsave(&adapter->req_list_lock, flags); |
777 | idx = zfcp_reqlist_hash(req->req_id); | 778 | idx = zfcp_reqlist_hash(req->req_id); |
778 | list_add_tail(&req->list, &adapter->req_list[idx]); | 779 | list_add_tail(&req->list, &adapter->req_list[idx]); |
779 | spin_unlock(&adapter->req_list_lock); | 780 | spin_unlock_irqrestore(&adapter->req_list_lock, flags); |
780 | 781 | ||
781 | req->qdio_outb_usage = atomic_read(&req_q->count); | 782 | req->qdio_outb_usage = atomic_read(&adapter->req_q.count); |
782 | req->issued = get_clock(); | 783 | req->issued = get_clock(); |
783 | if (zfcp_qdio_send(req)) { | 784 | if (zfcp_qdio_send(req)) { |
784 | /* Queues are down..... */ | ||
785 | del_timer(&req->timer); | 785 | del_timer(&req->timer); |
786 | spin_lock(&adapter->req_list_lock); | 786 | spin_lock_irqsave(&adapter->req_list_lock, flags); |
787 | zfcp_reqlist_remove(adapter, req); | 787 | /* lookup request again, list might have changed */ |
788 | spin_unlock(&adapter->req_list_lock); | 788 | if (zfcp_reqlist_find_safe(adapter, req)) |
789 | /* undo changes in request queue made for this request */ | 789 | zfcp_reqlist_remove(adapter, req); |
790 | atomic_add(req->sbal_number, &req_q->count); | 790 | spin_unlock_irqrestore(&adapter->req_list_lock, flags); |
791 | req_q->first -= req->sbal_number; | ||
792 | req_q->first += QDIO_MAX_BUFFERS_PER_Q; | ||
793 | req_q->first %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */ | ||
794 | zfcp_erp_adapter_reopen(adapter, 0, 116, req); | 791 | zfcp_erp_adapter_reopen(adapter, 0, 116, req); |
795 | return -EIO; | 792 | return -EIO; |
796 | } | 793 | } |
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index ca8f85f3dad4..e46fd3e9f68f 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -24,14 +24,10 @@ char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu) | |||
24 | static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) | 24 | static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) |
25 | { | 25 | { |
26 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; | 26 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; |
27 | WARN_ON(!unit); | 27 | atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); |
28 | if (unit) { | 28 | unit->device = NULL; |
29 | atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); | 29 | zfcp_erp_unit_failed(unit, 12, NULL); |
30 | sdpnt->hostdata = NULL; | 30 | zfcp_unit_put(unit); |
31 | unit->device = NULL; | ||
32 | zfcp_erp_unit_failed(unit, 12, NULL); | ||
33 | zfcp_unit_put(unit); | ||
34 | } | ||
35 | } | 31 | } |
36 | 32 | ||
37 | static int zfcp_scsi_slave_configure(struct scsi_device *sdp) | 33 | static int zfcp_scsi_slave_configure(struct scsi_device *sdp) |
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 8aba4fdfb522..6194ed5d02c4 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -2445,7 +2445,7 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd) | |||
2445 | hba_status = detailed_status >> 8; | 2445 | hba_status = detailed_status >> 8; |
2446 | 2446 | ||
2447 | // calculate resid for sg | 2447 | // calculate resid for sg |
2448 | scsi_set_resid(cmd, scsi_bufflen(cmd) - readl(reply+5)); | 2448 | scsi_set_resid(cmd, scsi_bufflen(cmd) - readl(reply+20)); |
2449 | 2449 | ||
2450 | pHba = (adpt_hba*) cmd->device->host->hostdata[0]; | 2450 | pHba = (adpt_hba*) cmd->device->host->hostdata[0]; |
2451 | 2451 | ||
@@ -2456,7 +2456,7 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd) | |||
2456 | case I2O_SCSI_DSC_SUCCESS: | 2456 | case I2O_SCSI_DSC_SUCCESS: |
2457 | cmd->result = (DID_OK << 16); | 2457 | cmd->result = (DID_OK << 16); |
2458 | // handle underflow | 2458 | // handle underflow |
2459 | if(readl(reply+5) < cmd->underflow ) { | 2459 | if (readl(reply+20) < cmd->underflow) { |
2460 | cmd->result = (DID_ERROR <<16); | 2460 | cmd->result = (DID_ERROR <<16); |
2461 | printk(KERN_WARNING"%s: SCSI CMD underflow\n",pHba->name); | 2461 | printk(KERN_WARNING"%s: SCSI CMD underflow\n",pHba->name); |
2462 | } | 2462 | } |
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 28c9da7d4a5c..7dc62deb4087 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
@@ -4402,6 +4402,10 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) | |||
4402 | scb_t *scb; | 4402 | scb_t *scb; |
4403 | int rval; | 4403 | int rval; |
4404 | 4404 | ||
4405 | scmd = scsi_allocate_command(GFP_KERNEL); | ||
4406 | if (!scmd) | ||
4407 | return -ENOMEM; | ||
4408 | |||
4405 | /* | 4409 | /* |
4406 | * The internal commands share one command id and hence are | 4410 | * The internal commands share one command id and hence are |
4407 | * serialized. This is so because we want to reserve maximum number of | 4411 | * serialized. This is so because we want to reserve maximum number of |
@@ -4412,12 +4416,11 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) | |||
4412 | scb = &adapter->int_scb; | 4416 | scb = &adapter->int_scb; |
4413 | memset(scb, 0, sizeof(scb_t)); | 4417 | memset(scb, 0, sizeof(scb_t)); |
4414 | 4418 | ||
4415 | scmd = &adapter->int_scmd; | ||
4416 | memset(scmd, 0, sizeof(Scsi_Cmnd)); | ||
4417 | |||
4418 | sdev = kzalloc(sizeof(struct scsi_device), GFP_KERNEL); | 4419 | sdev = kzalloc(sizeof(struct scsi_device), GFP_KERNEL); |
4419 | scmd->device = sdev; | 4420 | scmd->device = sdev; |
4420 | 4421 | ||
4422 | memset(adapter->int_cdb, 0, sizeof(adapter->int_cdb)); | ||
4423 | scmd->cmnd = adapter->int_cdb; | ||
4421 | scmd->device->host = adapter->host; | 4424 | scmd->device->host = adapter->host; |
4422 | scmd->host_scribble = (void *)scb; | 4425 | scmd->host_scribble = (void *)scb; |
4423 | scmd->cmnd[0] = MEGA_INTERNAL_CMD; | 4426 | scmd->cmnd[0] = MEGA_INTERNAL_CMD; |
@@ -4456,6 +4459,8 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru) | |||
4456 | 4459 | ||
4457 | mutex_unlock(&adapter->int_mtx); | 4460 | mutex_unlock(&adapter->int_mtx); |
4458 | 4461 | ||
4462 | scsi_free_command(GFP_KERNEL, scmd); | ||
4463 | |||
4459 | return rval; | 4464 | return rval; |
4460 | } | 4465 | } |
4461 | 4466 | ||
diff --git a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h index ee70bd4ae4ba..795201fa0b48 100644 --- a/drivers/scsi/megaraid.h +++ b/drivers/scsi/megaraid.h | |||
@@ -888,8 +888,8 @@ typedef struct { | |||
888 | 888 | ||
889 | u8 sglen; /* f/w supported scatter-gather list length */ | 889 | u8 sglen; /* f/w supported scatter-gather list length */ |
890 | 890 | ||
891 | unsigned char int_cdb[MAX_COMMAND_SIZE]; | ||
891 | scb_t int_scb; | 892 | scb_t int_scb; |
892 | Scsi_Cmnd int_scmd; | ||
893 | struct mutex int_mtx; /* To synchronize the internal | 893 | struct mutex int_mtx; /* To synchronize the internal |
894 | commands */ | 894 | commands */ |
895 | struct completion int_waitq; /* wait queue for internal | 895 | struct completion int_waitq; /* wait queue for internal |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index f25f41a499e5..b97194096d8e 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -2547,7 +2547,6 @@ typedef struct scsi_qla_host { | |||
2547 | uint8_t fcode_revision[16]; | 2547 | uint8_t fcode_revision[16]; |
2548 | uint32_t fw_revision[4]; | 2548 | uint32_t fw_revision[4]; |
2549 | 2549 | ||
2550 | uint16_t fdt_odd_index; | ||
2551 | uint32_t fdt_wrt_disable; | 2550 | uint32_t fdt_wrt_disable; |
2552 | uint32_t fdt_erase_cmd; | 2551 | uint32_t fdt_erase_cmd; |
2553 | uint32_t fdt_block_size; | 2552 | uint32_t fdt_block_size; |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index a470f2d3270d..4218f20f5ed5 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -140,7 +140,6 @@ int | |||
140 | qla2100_pci_config(scsi_qla_host_t *ha) | 140 | qla2100_pci_config(scsi_qla_host_t *ha) |
141 | { | 141 | { |
142 | uint16_t w; | 142 | uint16_t w; |
143 | uint32_t d; | ||
144 | unsigned long flags; | 143 | unsigned long flags; |
145 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 144 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
146 | 145 | ||
@@ -151,10 +150,7 @@ qla2100_pci_config(scsi_qla_host_t *ha) | |||
151 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); | 150 | w |= (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); |
152 | pci_write_config_word(ha->pdev, PCI_COMMAND, w); | 151 | pci_write_config_word(ha->pdev, PCI_COMMAND, w); |
153 | 152 | ||
154 | /* Reset expansion ROM address decode enable */ | 153 | pci_disable_rom(ha->pdev); |
155 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
156 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
157 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
158 | 154 | ||
159 | /* Get PCI bus information. */ | 155 | /* Get PCI bus information. */ |
160 | spin_lock_irqsave(&ha->hardware_lock, flags); | 156 | spin_lock_irqsave(&ha->hardware_lock, flags); |
@@ -174,7 +170,6 @@ int | |||
174 | qla2300_pci_config(scsi_qla_host_t *ha) | 170 | qla2300_pci_config(scsi_qla_host_t *ha) |
175 | { | 171 | { |
176 | uint16_t w; | 172 | uint16_t w; |
177 | uint32_t d; | ||
178 | unsigned long flags = 0; | 173 | unsigned long flags = 0; |
179 | uint32_t cnt; | 174 | uint32_t cnt; |
180 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 175 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
@@ -236,10 +231,7 @@ qla2300_pci_config(scsi_qla_host_t *ha) | |||
236 | 231 | ||
237 | pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); | 232 | pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); |
238 | 233 | ||
239 | /* Reset expansion ROM address decode enable */ | 234 | pci_disable_rom(ha->pdev); |
240 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
241 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
242 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
243 | 235 | ||
244 | /* Get PCI bus information. */ | 236 | /* Get PCI bus information. */ |
245 | spin_lock_irqsave(&ha->hardware_lock, flags); | 237 | spin_lock_irqsave(&ha->hardware_lock, flags); |
@@ -259,7 +251,6 @@ int | |||
259 | qla24xx_pci_config(scsi_qla_host_t *ha) | 251 | qla24xx_pci_config(scsi_qla_host_t *ha) |
260 | { | 252 | { |
261 | uint16_t w; | 253 | uint16_t w; |
262 | uint32_t d; | ||
263 | unsigned long flags = 0; | 254 | unsigned long flags = 0; |
264 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | 255 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; |
265 | 256 | ||
@@ -281,10 +272,7 @@ qla24xx_pci_config(scsi_qla_host_t *ha) | |||
281 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) | 272 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) |
282 | pcie_set_readrq(ha->pdev, 2048); | 273 | pcie_set_readrq(ha->pdev, 2048); |
283 | 274 | ||
284 | /* Reset expansion ROM address decode enable */ | 275 | pci_disable_rom(ha->pdev); |
285 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
286 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
287 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
288 | 276 | ||
289 | ha->chip_revision = ha->pdev->revision; | 277 | ha->chip_revision = ha->pdev->revision; |
290 | 278 | ||
@@ -306,7 +294,6 @@ int | |||
306 | qla25xx_pci_config(scsi_qla_host_t *ha) | 294 | qla25xx_pci_config(scsi_qla_host_t *ha) |
307 | { | 295 | { |
308 | uint16_t w; | 296 | uint16_t w; |
309 | uint32_t d; | ||
310 | 297 | ||
311 | pci_set_master(ha->pdev); | 298 | pci_set_master(ha->pdev); |
312 | pci_try_set_mwi(ha->pdev); | 299 | pci_try_set_mwi(ha->pdev); |
@@ -320,10 +307,7 @@ qla25xx_pci_config(scsi_qla_host_t *ha) | |||
320 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) | 307 | if (pci_find_capability(ha->pdev, PCI_CAP_ID_EXP)) |
321 | pcie_set_readrq(ha->pdev, 2048); | 308 | pcie_set_readrq(ha->pdev, 2048); |
322 | 309 | ||
323 | /* Reset expansion ROM address decode enable */ | 310 | pci_disable_rom(ha->pdev); |
324 | pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); | ||
325 | d &= ~PCI_ROM_ADDRESS_ENABLE; | ||
326 | pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); | ||
327 | 311 | ||
328 | ha->chip_revision = ha->pdev->revision; | 312 | ha->chip_revision = ha->pdev->revision; |
329 | 313 | ||
@@ -980,7 +964,6 @@ qla2x00_setup_chip(scsi_qla_host_t *ha) | |||
980 | &ha->fw_minor_version, | 964 | &ha->fw_minor_version, |
981 | &ha->fw_subminor_version, | 965 | &ha->fw_subminor_version, |
982 | &ha->fw_attributes, &ha->fw_memory_size); | 966 | &ha->fw_attributes, &ha->fw_memory_size); |
983 | qla2x00_resize_request_q(ha); | ||
984 | ha->flags.npiv_supported = 0; | 967 | ha->flags.npiv_supported = 0; |
985 | if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) || | 968 | if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) || |
986 | IS_QLA84XX(ha)) && | 969 | IS_QLA84XX(ha)) && |
@@ -992,6 +975,7 @@ qla2x00_setup_chip(scsi_qla_host_t *ha) | |||
992 | ha->max_npiv_vports = | 975 | ha->max_npiv_vports = |
993 | MIN_MULTI_ID_FABRIC - 1; | 976 | MIN_MULTI_ID_FABRIC - 1; |
994 | } | 977 | } |
978 | qla2x00_resize_request_q(ha); | ||
995 | 979 | ||
996 | if (ql2xallocfwdump) | 980 | if (ql2xallocfwdump) |
997 | qla2x00_alloc_fw_dump(ha); | 981 | qla2x00_alloc_fw_dump(ha); |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 36bc6851e23d..3402746ec128 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -1964,7 +1964,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *ha, uint16_t *cur_xchg_cnt, | |||
1964 | *cur_iocb_cnt = mcp->mb[7]; | 1964 | *cur_iocb_cnt = mcp->mb[7]; |
1965 | if (orig_iocb_cnt) | 1965 | if (orig_iocb_cnt) |
1966 | *orig_iocb_cnt = mcp->mb[10]; | 1966 | *orig_iocb_cnt = mcp->mb[10]; |
1967 | if (max_npiv_vports) | 1967 | if (ha->flags.npiv_supported && max_npiv_vports) |
1968 | *max_npiv_vports = mcp->mb[11]; | 1968 | *max_npiv_vports = mcp->mb[11]; |
1969 | } | 1969 | } |
1970 | 1970 | ||
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 21dd182ad512..35567203ef61 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -728,6 +728,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
728 | if (ha->isp_ops->abort_command(ha, sp)) { | 728 | if (ha->isp_ops->abort_command(ha, sp)) { |
729 | DEBUG2(printk("%s(%ld): abort_command " | 729 | DEBUG2(printk("%s(%ld): abort_command " |
730 | "mbx failed.\n", __func__, ha->host_no)); | 730 | "mbx failed.\n", __func__, ha->host_no)); |
731 | ret = FAILED; | ||
731 | } else { | 732 | } else { |
732 | DEBUG3(printk("%s(%ld): abort_command " | 733 | DEBUG3(printk("%s(%ld): abort_command " |
733 | "mbx success.\n", __func__, ha->host_no)); | 734 | "mbx success.\n", __func__, ha->host_no)); |
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 90a13211717f..e4af678eb2d6 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -722,6 +722,7 @@ done: | |||
722 | static void | 722 | static void |
723 | qla2xxx_get_fdt_info(scsi_qla_host_t *ha) | 723 | qla2xxx_get_fdt_info(scsi_qla_host_t *ha) |
724 | { | 724 | { |
725 | #define FLASH_BLK_SIZE_4K 0x1000 | ||
725 | #define FLASH_BLK_SIZE_32K 0x8000 | 726 | #define FLASH_BLK_SIZE_32K 0x8000 |
726 | #define FLASH_BLK_SIZE_64K 0x10000 | 727 | #define FLASH_BLK_SIZE_64K 0x10000 |
727 | const char *loc, *locations[] = { "MID", "FDT" }; | 728 | const char *loc, *locations[] = { "MID", "FDT" }; |
@@ -755,7 +756,6 @@ qla2xxx_get_fdt_info(scsi_qla_host_t *ha) | |||
755 | loc = locations[1]; | 756 | loc = locations[1]; |
756 | mid = le16_to_cpu(fdt->man_id); | 757 | mid = le16_to_cpu(fdt->man_id); |
757 | fid = le16_to_cpu(fdt->id); | 758 | fid = le16_to_cpu(fdt->id); |
758 | ha->fdt_odd_index = mid == 0x1f; | ||
759 | ha->fdt_wrt_disable = fdt->wrt_disable_bits; | 759 | ha->fdt_wrt_disable = fdt->wrt_disable_bits; |
760 | ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0300 | fdt->erase_cmd); | 760 | ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0300 | fdt->erase_cmd); |
761 | ha->fdt_block_size = le32_to_cpu(fdt->block_size); | 761 | ha->fdt_block_size = le32_to_cpu(fdt->block_size); |
@@ -788,8 +788,7 @@ no_flash_data: | |||
788 | ha->fdt_block_size = FLASH_BLK_SIZE_64K; | 788 | ha->fdt_block_size = FLASH_BLK_SIZE_64K; |
789 | break; | 789 | break; |
790 | case 0x1f: /* Atmel 26DF081A. */ | 790 | case 0x1f: /* Atmel 26DF081A. */ |
791 | ha->fdt_odd_index = 1; | 791 | ha->fdt_block_size = FLASH_BLK_SIZE_4K; |
792 | ha->fdt_block_size = FLASH_BLK_SIZE_64K; | ||
793 | ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0320); | 792 | ha->fdt_erase_cmd = flash_conf_to_access_addr(0x0320); |
794 | ha->fdt_unprotect_sec_cmd = flash_conf_to_access_addr(0x0339); | 793 | ha->fdt_unprotect_sec_cmd = flash_conf_to_access_addr(0x0339); |
795 | ha->fdt_protect_sec_cmd = flash_conf_to_access_addr(0x0336); | 794 | ha->fdt_protect_sec_cmd = flash_conf_to_access_addr(0x0336); |
@@ -801,9 +800,9 @@ no_flash_data: | |||
801 | } | 800 | } |
802 | done: | 801 | done: |
803 | DEBUG2(qla_printk(KERN_DEBUG, ha, "FDT[%s]: (0x%x/0x%x) erase=0x%x " | 802 | DEBUG2(qla_printk(KERN_DEBUG, ha, "FDT[%s]: (0x%x/0x%x) erase=0x%x " |
804 | "pro=%x upro=%x idx=%d wrtd=0x%x blk=0x%x.\n", loc, mid, fid, | 803 | "pro=%x upro=%x wrtd=0x%x blk=0x%x.\n", loc, mid, fid, |
805 | ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd, | 804 | ha->fdt_erase_cmd, ha->fdt_protect_sec_cmd, |
806 | ha->fdt_unprotect_sec_cmd, ha->fdt_odd_index, ha->fdt_wrt_disable, | 805 | ha->fdt_unprotect_sec_cmd, ha->fdt_wrt_disable, |
807 | ha->fdt_block_size)); | 806 | ha->fdt_block_size)); |
808 | } | 807 | } |
809 | 808 | ||
@@ -987,13 +986,9 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, | |||
987 | qla24xx_unprotect_flash(ha); | 986 | qla24xx_unprotect_flash(ha); |
988 | 987 | ||
989 | for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) { | 988 | for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) { |
990 | if (ha->fdt_odd_index) { | 989 | |
991 | findex = faddr << 2; | 990 | findex = faddr; |
992 | fdata = findex & sec_mask; | 991 | fdata = (findex & sec_mask) << 2; |
993 | } else { | ||
994 | findex = faddr; | ||
995 | fdata = (findex & sec_mask) << 2; | ||
996 | } | ||
997 | 992 | ||
998 | /* Are we at the beginning of a sector? */ | 993 | /* Are we at the beginning of a sector? */ |
999 | if ((findex & rest_addr) == 0) { | 994 | if ((findex & rest_addr) == 0) { |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index be5e299df528..eea6720adf16 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
@@ -7,7 +7,7 @@ | |||
7 | /* | 7 | /* |
8 | * Driver version | 8 | * Driver version |
9 | */ | 9 | */ |
10 | #define QLA2XXX_VERSION "8.02.01-k8" | 10 | #define QLA2XXX_VERSION "8.02.01-k9" |
11 | 11 | ||
12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
13 | #define QLA_DRIVER_MINOR_VER 2 | 13 | #define QLA_DRIVER_MINOR_VER 2 |
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 94ed262bdf0c..386361778ebb 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1340,9 +1340,10 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) | |||
1340 | * LLD/transport was disrupted during processing of the IO. | 1340 | * LLD/transport was disrupted during processing of the IO. |
1341 | * The transport class is now blocked/blocking, | 1341 | * The transport class is now blocked/blocking, |
1342 | * and the transport will decide what to do with the IO | 1342 | * and the transport will decide what to do with the IO |
1343 | * based on its timers and recovery capablilities. | 1343 | * based on its timers and recovery capablilities if |
1344 | * there are enough retries. | ||
1344 | */ | 1345 | */ |
1345 | return ADD_TO_MLQUEUE; | 1346 | goto maybe_retry; |
1346 | case DID_TRANSPORT_FAILFAST: | 1347 | case DID_TRANSPORT_FAILFAST: |
1347 | /* | 1348 | /* |
1348 | * The transport decided to failfast the IO (most likely | 1349 | * The transport decided to failfast the IO (most likely |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 5c0f32c7fbf6..165fc010978c 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -144,9 +144,9 @@ static void put_char(struct uart_port *port, char c) | |||
144 | status = sci_in(port, SCxSR); | 144 | status = sci_in(port, SCxSR); |
145 | } while (!(status & SCxSR_TDxE(port))); | 145 | } while (!(status & SCxSR_TDxE(port))); |
146 | 146 | ||
147 | sci_out(port, SCxTDR, c); | ||
148 | sci_in(port, SCxSR); /* Dummy read */ | 147 | sci_in(port, SCxSR); /* Dummy read */ |
149 | sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port)); | 148 | sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port)); |
149 | sci_out(port, SCxTDR, c); | ||
150 | 150 | ||
151 | spin_unlock_irqrestore(&port->lock, flags); | 151 | spin_unlock_irqrestore(&port->lock, flags); |
152 | } | 152 | } |
@@ -478,10 +478,10 @@ static void sci_transmit_chars(struct uart_port *port) | |||
478 | return; | 478 | return; |
479 | } | 479 | } |
480 | 480 | ||
481 | if (port->type == PORT_SCIF) | 481 | if (port->type == PORT_SCI) |
482 | count = scif_txroom(port); | ||
483 | else | ||
484 | count = sci_txroom(port); | 482 | count = sci_txroom(port); |
483 | else | ||
484 | count = scif_txroom(port); | ||
485 | 485 | ||
486 | do { | 486 | do { |
487 | unsigned char c; | 487 | unsigned char c; |
@@ -510,7 +510,7 @@ static void sci_transmit_chars(struct uart_port *port) | |||
510 | } else { | 510 | } else { |
511 | ctrl = sci_in(port, SCSCR); | 511 | ctrl = sci_in(port, SCSCR); |
512 | 512 | ||
513 | if (port->type == PORT_SCIF) { | 513 | if (port->type != PORT_SCI) { |
514 | sci_in(port, SCxSR); /* Dummy read */ | 514 | sci_in(port, SCxSR); /* Dummy read */ |
515 | sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port)); | 515 | sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port)); |
516 | } | 516 | } |
@@ -536,10 +536,10 @@ static inline void sci_receive_chars(struct uart_port *port) | |||
536 | return; | 536 | return; |
537 | 537 | ||
538 | while (1) { | 538 | while (1) { |
539 | if (port->type == PORT_SCIF) | 539 | if (port->type == PORT_SCI) |
540 | count = scif_rxroom(port); | ||
541 | else | ||
542 | count = sci_rxroom(port); | 540 | count = sci_rxroom(port); |
541 | else | ||
542 | count = scif_rxroom(port); | ||
543 | 543 | ||
544 | /* Don't copy more bytes than there is room for in the buffer */ | 544 | /* Don't copy more bytes than there is room for in the buffer */ |
545 | count = tty_buffer_request_room(tty, count); | 545 | count = tty_buffer_request_room(tty, count); |
@@ -714,7 +714,7 @@ static inline int sci_handle_breaks(struct uart_port *port) | |||
714 | 714 | ||
715 | #if defined(SCIF_ORER) | 715 | #if defined(SCIF_ORER) |
716 | /* XXX: Handle SCIF overrun error */ | 716 | /* XXX: Handle SCIF overrun error */ |
717 | if (port->type == PORT_SCIF && (sci_in(port, SCLSR) & SCIF_ORER) != 0) { | 717 | if (port->type != PORT_SCI && (sci_in(port, SCLSR) & SCIF_ORER) != 0) { |
718 | sci_out(port, SCLSR, 0); | 718 | sci_out(port, SCLSR, 0); |
719 | if (tty_insert_flip_char(tty, 0, TTY_OVERRUN)) { | 719 | if (tty_insert_flip_char(tty, 0, TTY_OVERRUN)) { |
720 | copied++; | 720 | copied++; |
@@ -1042,7 +1042,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, | |||
1042 | 1042 | ||
1043 | sci_out(port, SCSCR, 0x00); /* TE=0, RE=0, CKE1=0 */ | 1043 | sci_out(port, SCSCR, 0x00); /* TE=0, RE=0, CKE1=0 */ |
1044 | 1044 | ||
1045 | if (port->type == PORT_SCIF) | 1045 | if (port->type != PORT_SCI) |
1046 | sci_out(port, SCFCR, SCFCR_RFRST | SCFCR_TFRST); | 1046 | sci_out(port, SCFCR, SCFCR_RFRST | SCFCR_TFRST); |
1047 | 1047 | ||
1048 | smr_val = sci_in(port, SCSMR) & 3; | 1048 | smr_val = sci_in(port, SCSMR) & 3; |
@@ -1085,6 +1085,7 @@ static const char *sci_type(struct uart_port *port) | |||
1085 | case PORT_SCI: return "sci"; | 1085 | case PORT_SCI: return "sci"; |
1086 | case PORT_SCIF: return "scif"; | 1086 | case PORT_SCIF: return "scif"; |
1087 | case PORT_IRDA: return "irda"; | 1087 | case PORT_IRDA: return "irda"; |
1088 | case PORT_SCIFA: return "scifa"; | ||
1088 | } | 1089 | } |
1089 | 1090 | ||
1090 | return NULL; | 1091 | return NULL; |
@@ -1112,6 +1113,7 @@ static void sci_config_port(struct uart_port *port, int flags) | |||
1112 | s->init_pins = sci_init_pins_sci; | 1113 | s->init_pins = sci_init_pins_sci; |
1113 | break; | 1114 | break; |
1114 | case PORT_SCIF: | 1115 | case PORT_SCIF: |
1116 | case PORT_SCIFA: | ||
1115 | s->init_pins = sci_init_pins_scif; | 1117 | s->init_pins = sci_init_pins_scif; |
1116 | break; | 1118 | break; |
1117 | case PORT_IRDA: | 1119 | case PORT_IRDA: |
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h index 6163a45f968f..9f33b064172e 100644 --- a/drivers/serial/sh-sci.h +++ b/drivers/serial/sh-sci.h | |||
@@ -289,18 +289,18 @@ | |||
289 | #define CPU_SCIx_FNS(name, sci_offset, sci_size, scif_offset, scif_size)\ | 289 | #define CPU_SCIx_FNS(name, sci_offset, sci_size, scif_offset, scif_size)\ |
290 | static inline unsigned int sci_##name##_in(struct uart_port *port) \ | 290 | static inline unsigned int sci_##name##_in(struct uart_port *port) \ |
291 | { \ | 291 | { \ |
292 | if (port->type == PORT_SCI) { \ | 292 | if (port->type == PORT_SCIF) { \ |
293 | SCI_IN(sci_size, sci_offset) \ | 293 | SCI_IN(scif_size, scif_offset) \ |
294 | } else { \ | 294 | } else { /* PORT_SCI or PORT_SCIFA */ \ |
295 | SCI_IN(scif_size, scif_offset); \ | 295 | SCI_IN(sci_size, sci_offset); \ |
296 | } \ | 296 | } \ |
297 | } \ | 297 | } \ |
298 | static inline void sci_##name##_out(struct uart_port *port, unsigned int value) \ | 298 | static inline void sci_##name##_out(struct uart_port *port, unsigned int value) \ |
299 | { \ | 299 | { \ |
300 | if (port->type == PORT_SCI) { \ | 300 | if (port->type == PORT_SCIF) { \ |
301 | SCI_OUT(sci_size, sci_offset, value) \ | 301 | SCI_OUT(scif_size, scif_offset, value) \ |
302 | } else { \ | 302 | } else { /* PORT_SCI or PORT_SCIFA */ \ |
303 | SCI_OUT(scif_size, scif_offset, value); \ | 303 | SCI_OUT(sci_size, sci_offset, value); \ |
304 | } \ | 304 | } \ |
305 | } | 305 | } |
306 | 306 | ||
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 20104443081a..d50a99f70aee 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -158,16 +158,12 @@ static int acm_wb_is_avail(struct acm *acm) | |||
158 | } | 158 | } |
159 | 159 | ||
160 | /* | 160 | /* |
161 | * Finish write. | 161 | * Finish write. Caller must hold acm->write_lock |
162 | */ | 162 | */ |
163 | static void acm_write_done(struct acm *acm, struct acm_wb *wb) | 163 | static void acm_write_done(struct acm *acm, struct acm_wb *wb) |
164 | { | 164 | { |
165 | unsigned long flags; | ||
166 | |||
167 | spin_lock_irqsave(&acm->write_lock, flags); | ||
168 | wb->use = 0; | 165 | wb->use = 0; |
169 | acm->transmitting--; | 166 | acm->transmitting--; |
170 | spin_unlock_irqrestore(&acm->write_lock, flags); | ||
171 | } | 167 | } |
172 | 168 | ||
173 | /* | 169 | /* |
@@ -482,6 +478,7 @@ static void acm_write_bulk(struct urb *urb) | |||
482 | { | 478 | { |
483 | struct acm_wb *wb = urb->context; | 479 | struct acm_wb *wb = urb->context; |
484 | struct acm *acm = wb->instance; | 480 | struct acm *acm = wb->instance; |
481 | unsigned long flags; | ||
485 | 482 | ||
486 | if (verbose || urb->status | 483 | if (verbose || urb->status |
487 | || (urb->actual_length != urb->transfer_buffer_length)) | 484 | || (urb->actual_length != urb->transfer_buffer_length)) |
@@ -490,7 +487,9 @@ static void acm_write_bulk(struct urb *urb) | |||
490 | urb->transfer_buffer_length, | 487 | urb->transfer_buffer_length, |
491 | urb->status); | 488 | urb->status); |
492 | 489 | ||
490 | spin_lock_irqsave(&acm->write_lock, flags); | ||
493 | acm_write_done(acm, wb); | 491 | acm_write_done(acm, wb); |
492 | spin_unlock_irqrestore(&acm->write_lock, flags); | ||
494 | if (ACM_READY(acm)) | 493 | if (ACM_READY(acm)) |
495 | schedule_work(&acm->work); | 494 | schedule_work(&acm->work); |
496 | else | 495 | else |
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 887738577b28..6d1048faf08e 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -1091,6 +1091,7 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0) | |||
1091 | continue; | 1091 | continue; |
1092 | dev_dbg(&dev->dev, "unregistering interface %s\n", | 1092 | dev_dbg(&dev->dev, "unregistering interface %s\n", |
1093 | dev_name(&interface->dev)); | 1093 | dev_name(&interface->dev)); |
1094 | interface->unregistering = 1; | ||
1094 | usb_remove_sysfs_intf_files(interface); | 1095 | usb_remove_sysfs_intf_files(interface); |
1095 | device_del(&interface->dev); | 1096 | device_del(&interface->dev); |
1096 | } | 1097 | } |
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index f66fba11fbd5..4fb65fdc9dc3 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
@@ -840,7 +840,7 @@ int usb_create_sysfs_intf_files(struct usb_interface *intf) | |||
840 | struct usb_host_interface *alt = intf->cur_altsetting; | 840 | struct usb_host_interface *alt = intf->cur_altsetting; |
841 | int retval; | 841 | int retval; |
842 | 842 | ||
843 | if (intf->sysfs_files_created) | 843 | if (intf->sysfs_files_created || intf->unregistering) |
844 | return 0; | 844 | return 0; |
845 | 845 | ||
846 | /* The interface string may be present in some altsettings | 846 | /* The interface string may be present in some altsettings |
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index 4342bd9c3bb6..1f68af9db3f7 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c | |||
@@ -85,8 +85,8 @@ EXPORT_SYMBOL_GPL(usb_alloc_urb); | |||
85 | * Must be called when a user of a urb is finished with it. When the last user | 85 | * Must be called when a user of a urb is finished with it. When the last user |
86 | * of the urb calls this function, the memory of the urb is freed. | 86 | * of the urb calls this function, the memory of the urb is freed. |
87 | * | 87 | * |
88 | * Note: The transfer buffer associated with the urb is not freed, that must be | 88 | * Note: The transfer buffer associated with the urb is not freed unless the |
89 | * done elsewhere. | 89 | * URB_FREE_BUFFER transfer flag is set. |
90 | */ | 90 | */ |
91 | void usb_free_urb(struct urb *urb) | 91 | void usb_free_urb(struct urb *urb) |
92 | { | 92 | { |
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c index 5ee1590b8e9c..c1d34df0b157 100644 --- a/drivers/usb/gadget/f_acm.c +++ b/drivers/usb/gadget/f_acm.c | |||
@@ -463,7 +463,11 @@ static int acm_cdc_notify(struct f_acm *acm, u8 type, u16 value, | |||
463 | notify->wLength = cpu_to_le16(length); | 463 | notify->wLength = cpu_to_le16(length); |
464 | memcpy(buf, data, length); | 464 | memcpy(buf, data, length); |
465 | 465 | ||
466 | /* ep_queue() can complete immediately if it fills the fifo... */ | ||
467 | spin_unlock(&acm->lock); | ||
466 | status = usb_ep_queue(ep, req, GFP_ATOMIC); | 468 | status = usb_ep_queue(ep, req, GFP_ATOMIC); |
469 | spin_lock(&acm->lock); | ||
470 | |||
467 | if (status < 0) { | 471 | if (status < 0) { |
468 | ERROR(acm->port.func.config->cdev, | 472 | ERROR(acm->port.func.config->cdev, |
469 | "acm ttyGS%d can't notify serial state, %d\n", | 473 | "acm ttyGS%d can't notify serial state, %d\n", |
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 56f592dc0b36..f3a75a929e0a 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig | |||
@@ -110,29 +110,18 @@ config USB_ISP116X_HCD | |||
110 | 110 | ||
111 | config USB_ISP1760_HCD | 111 | config USB_ISP1760_HCD |
112 | tristate "ISP 1760 HCD support" | 112 | tristate "ISP 1760 HCD support" |
113 | depends on USB && EXPERIMENTAL | 113 | depends on USB && EXPERIMENTAL && (PCI || PPC_OF) |
114 | ---help--- | 114 | ---help--- |
115 | The ISP1760 chip is a USB 2.0 host controller. | 115 | The ISP1760 chip is a USB 2.0 host controller. |
116 | 116 | ||
117 | This driver does not support isochronous transfers or OTG. | 117 | This driver does not support isochronous transfers or OTG. |
118 | This USB controller is usually attached to a non-DMA-Master | ||
119 | capable bus. NXP's eval kit brings this chip on PCI card | ||
120 | where the chip itself is behind a PLB to simulate such | ||
121 | a bus. | ||
118 | 122 | ||
119 | To compile this driver as a module, choose M here: the | 123 | To compile this driver as a module, choose M here: the |
120 | module will be called isp1760-hcd. | 124 | module will be called isp1760. |
121 | |||
122 | config USB_ISP1760_PCI | ||
123 | bool "Support for the PCI bus" | ||
124 | depends on USB_ISP1760_HCD && PCI | ||
125 | ---help--- | ||
126 | Enables support for the device present on the PCI bus. | ||
127 | This should only be required if you happen to have the eval kit from | ||
128 | NXP and you are going to test it. | ||
129 | |||
130 | config USB_ISP1760_OF | ||
131 | bool "Support for the OF platform bus" | ||
132 | depends on USB_ISP1760_HCD && PPC_OF | ||
133 | ---help--- | ||
134 | Enables support for the device present on the PowerPC | ||
135 | OpenFirmware platform bus. | ||
136 | 125 | ||
137 | config USB_OHCI_HCD | 126 | config USB_OHCI_HCD |
138 | tristate "OHCI HCD support" | 127 | tristate "OHCI HCD support" |
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 15a803b206b8..4725d15d096f 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -643,7 +643,7 @@ static int ehci_run (struct usb_hcd *hcd) | |||
643 | static irqreturn_t ehci_irq (struct usb_hcd *hcd) | 643 | static irqreturn_t ehci_irq (struct usb_hcd *hcd) |
644 | { | 644 | { |
645 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); | 645 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); |
646 | u32 status, pcd_status = 0, cmd; | 646 | u32 status, masked_status, pcd_status = 0, cmd; |
647 | int bh; | 647 | int bh; |
648 | 648 | ||
649 | spin_lock (&ehci->lock); | 649 | spin_lock (&ehci->lock); |
@@ -656,14 +656,14 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
656 | goto dead; | 656 | goto dead; |
657 | } | 657 | } |
658 | 658 | ||
659 | status &= INTR_MASK; | 659 | masked_status = status & INTR_MASK; |
660 | if (!status) { /* irq sharing? */ | 660 | if (!masked_status) { /* irq sharing? */ |
661 | spin_unlock(&ehci->lock); | 661 | spin_unlock(&ehci->lock); |
662 | return IRQ_NONE; | 662 | return IRQ_NONE; |
663 | } | 663 | } |
664 | 664 | ||
665 | /* clear (just) interrupts */ | 665 | /* clear (just) interrupts */ |
666 | ehci_writel(ehci, status, &ehci->regs->status); | 666 | ehci_writel(ehci, masked_status, &ehci->regs->status); |
667 | cmd = ehci_readl(ehci, &ehci->regs->command); | 667 | cmd = ehci_readl(ehci, &ehci->regs->command); |
668 | bh = 0; | 668 | bh = 0; |
669 | 669 | ||
@@ -734,18 +734,17 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
734 | 734 | ||
735 | /* PCI errors [4.15.2.4] */ | 735 | /* PCI errors [4.15.2.4] */ |
736 | if (unlikely ((status & STS_FATAL) != 0)) { | 736 | if (unlikely ((status & STS_FATAL) != 0)) { |
737 | ehci_err(ehci, "fatal error\n"); | ||
737 | dbg_cmd(ehci, "fatal", cmd); | 738 | dbg_cmd(ehci, "fatal", cmd); |
738 | dbg_status(ehci, "fatal", status); | 739 | dbg_status(ehci, "fatal", status); |
739 | if (status & STS_HALT) { | 740 | ehci_halt(ehci); |
740 | ehci_err (ehci, "fatal error\n"); | ||
741 | dead: | 741 | dead: |
742 | ehci_reset (ehci); | 742 | ehci_reset(ehci); |
743 | ehci_writel(ehci, 0, &ehci->regs->configured_flag); | 743 | ehci_writel(ehci, 0, &ehci->regs->configured_flag); |
744 | /* generic layer kills/unlinks all urbs, then | 744 | /* generic layer kills/unlinks all urbs, then |
745 | * uses ehci_stop to clean up the rest | 745 | * uses ehci_stop to clean up the rest |
746 | */ | 746 | */ |
747 | bh = 1; | 747 | bh = 1; |
748 | } | ||
749 | } | 748 | } |
750 | 749 | ||
751 | if (bh) | 750 | if (bh) |
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c index 0eba894bcb01..9c9da35abc6c 100644 --- a/drivers/usb/host/ehci-ps3.c +++ b/drivers/usb/host/ehci-ps3.c | |||
@@ -205,6 +205,7 @@ static int ps3_ehci_remove(struct ps3_system_bus_device *dev) | |||
205 | 205 | ||
206 | tmp = hcd->irq; | 206 | tmp = hcd->irq; |
207 | 207 | ||
208 | ehci_shutdown(hcd); | ||
208 | usb_remove_hcd(hcd); | 209 | usb_remove_hcd(hcd); |
209 | 210 | ||
210 | ps3_system_bus_set_driver_data(dev, NULL); | 211 | ps3_system_bus_set_driver_data(dev, NULL); |
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 4a0c5a78b2ed..a081ee65bde6 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -918,7 +918,7 @@ iso_stream_init ( | |||
918 | */ | 918 | */ |
919 | stream->usecs = HS_USECS_ISO (maxp); | 919 | stream->usecs = HS_USECS_ISO (maxp); |
920 | bandwidth = stream->usecs * 8; | 920 | bandwidth = stream->usecs * 8; |
921 | bandwidth /= 1 << (interval - 1); | 921 | bandwidth /= interval; |
922 | 922 | ||
923 | } else { | 923 | } else { |
924 | u32 addr; | 924 | u32 addr; |
@@ -951,7 +951,7 @@ iso_stream_init ( | |||
951 | } else | 951 | } else |
952 | stream->raw_mask = smask_out [hs_transfers - 1]; | 952 | stream->raw_mask = smask_out [hs_transfers - 1]; |
953 | bandwidth = stream->usecs + stream->c_usecs; | 953 | bandwidth = stream->usecs + stream->c_usecs; |
954 | bandwidth /= 1 << (interval + 2); | 954 | bandwidth /= interval << 3; |
955 | 955 | ||
956 | /* stream->splits gets created from raw_mask later */ | 956 | /* stream->splits gets created from raw_mask later */ |
957 | stream->address = cpu_to_hc32(ehci, addr); | 957 | stream->address = cpu_to_hc32(ehci, addr); |
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index af849f596135..b87ca7cf4b37 100644 --- a/drivers/usb/host/isp1760-if.c +++ b/drivers/usb/host/isp1760-if.c | |||
@@ -14,16 +14,16 @@ | |||
14 | #include "../core/hcd.h" | 14 | #include "../core/hcd.h" |
15 | #include "isp1760-hcd.h" | 15 | #include "isp1760-hcd.h" |
16 | 16 | ||
17 | #ifdef CONFIG_USB_ISP1760_OF | 17 | #ifdef CONFIG_PPC_OF |
18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
19 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #ifdef CONFIG_USB_ISP1760_PCI | 22 | #ifdef CONFIG_PCI |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #ifdef CONFIG_USB_ISP1760_OF | 26 | #ifdef CONFIG_PPC_OF |
27 | static int of_isp1760_probe(struct of_device *dev, | 27 | static int of_isp1760_probe(struct of_device *dev, |
28 | const struct of_device_id *match) | 28 | const struct of_device_id *match) |
29 | { | 29 | { |
@@ -128,7 +128,7 @@ static struct of_platform_driver isp1760_of_driver = { | |||
128 | }; | 128 | }; |
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | #ifdef CONFIG_USB_ISP1760_PCI | 131 | #ifdef CONFIG_PCI |
132 | static u32 nxp_pci_io_base; | 132 | static u32 nxp_pci_io_base; |
133 | static u32 iolength; | 133 | static u32 iolength; |
134 | static u32 pci_mem_phy0; | 134 | static u32 pci_mem_phy0; |
@@ -288,28 +288,28 @@ static struct pci_driver isp1761_pci_driver = { | |||
288 | 288 | ||
289 | static int __init isp1760_init(void) | 289 | static int __init isp1760_init(void) |
290 | { | 290 | { |
291 | int ret = -ENODEV; | 291 | int ret; |
292 | 292 | ||
293 | init_kmem_once(); | 293 | init_kmem_once(); |
294 | 294 | ||
295 | #ifdef CONFIG_USB_ISP1760_OF | 295 | #ifdef CONFIG_PPC_OF |
296 | ret = of_register_platform_driver(&isp1760_of_driver); | 296 | ret = of_register_platform_driver(&isp1760_of_driver); |
297 | if (ret) { | 297 | if (ret) { |
298 | deinit_kmem_cache(); | 298 | deinit_kmem_cache(); |
299 | return ret; | 299 | return ret; |
300 | } | 300 | } |
301 | #endif | 301 | #endif |
302 | #ifdef CONFIG_USB_ISP1760_PCI | 302 | #ifdef CONFIG_PCI |
303 | ret = pci_register_driver(&isp1761_pci_driver); | 303 | ret = pci_register_driver(&isp1761_pci_driver); |
304 | if (ret) | 304 | if (ret) |
305 | goto unreg_of; | 305 | goto unreg_of; |
306 | #endif | 306 | #endif |
307 | return ret; | 307 | return ret; |
308 | 308 | ||
309 | #ifdef CONFIG_USB_ISP1760_PCI | 309 | #ifdef CONFIG_PCI |
310 | unreg_of: | 310 | unreg_of: |
311 | #endif | 311 | #endif |
312 | #ifdef CONFIG_USB_ISP1760_OF | 312 | #ifdef CONFIG_PPC_OF |
313 | of_unregister_platform_driver(&isp1760_of_driver); | 313 | of_unregister_platform_driver(&isp1760_of_driver); |
314 | #endif | 314 | #endif |
315 | deinit_kmem_cache(); | 315 | deinit_kmem_cache(); |
@@ -319,10 +319,10 @@ module_init(isp1760_init); | |||
319 | 319 | ||
320 | static void __exit isp1760_exit(void) | 320 | static void __exit isp1760_exit(void) |
321 | { | 321 | { |
322 | #ifdef CONFIG_USB_ISP1760_OF | 322 | #ifdef CONFIG_PPC_OF |
323 | of_unregister_platform_driver(&isp1760_of_driver); | 323 | of_unregister_platform_driver(&isp1760_of_driver); |
324 | #endif | 324 | #endif |
325 | #ifdef CONFIG_USB_ISP1760_PCI | 325 | #ifdef CONFIG_PCI |
326 | pci_unregister_driver(&isp1761_pci_driver); | 326 | pci_unregister_driver(&isp1761_pci_driver); |
327 | #endif | 327 | #endif |
328 | deinit_kmem_cache(); | 328 | deinit_kmem_cache(); |
diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c index 2089d8a46c4b..3c1a3b5f89f1 100644 --- a/drivers/usb/host/ohci-ps3.c +++ b/drivers/usb/host/ohci-ps3.c | |||
@@ -192,7 +192,7 @@ fail_start: | |||
192 | return result; | 192 | return result; |
193 | } | 193 | } |
194 | 194 | ||
195 | static int ps3_ohci_remove (struct ps3_system_bus_device *dev) | 195 | static int ps3_ohci_remove(struct ps3_system_bus_device *dev) |
196 | { | 196 | { |
197 | unsigned int tmp; | 197 | unsigned int tmp; |
198 | struct usb_hcd *hcd = | 198 | struct usb_hcd *hcd = |
@@ -205,6 +205,7 @@ static int ps3_ohci_remove (struct ps3_system_bus_device *dev) | |||
205 | 205 | ||
206 | tmp = hcd->irq; | 206 | tmp = hcd->irq; |
207 | 207 | ||
208 | ohci_shutdown(hcd); | ||
208 | usb_remove_hcd(hcd); | 209 | usb_remove_hcd(hcd); |
209 | 210 | ||
210 | ps3_system_bus_set_driver_data(dev, NULL); | 211 | ps3_system_bus_set_driver_data(dev, NULL); |
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index c18d8790c410..2376f24f3c83 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c | |||
@@ -1763,11 +1763,12 @@ static void r8a66597_timer(unsigned long _r8a66597) | |||
1763 | { | 1763 | { |
1764 | struct r8a66597 *r8a66597 = (struct r8a66597 *)_r8a66597; | 1764 | struct r8a66597 *r8a66597 = (struct r8a66597 *)_r8a66597; |
1765 | unsigned long flags; | 1765 | unsigned long flags; |
1766 | int port; | ||
1766 | 1767 | ||
1767 | spin_lock_irqsave(&r8a66597->lock, flags); | 1768 | spin_lock_irqsave(&r8a66597->lock, flags); |
1768 | 1769 | ||
1769 | r8a66597_root_hub_control(r8a66597, 0); | 1770 | for (port = 0; port < R8A66597_MAX_ROOT_HUB; port++) |
1770 | r8a66597_root_hub_control(r8a66597, 1); | 1771 | r8a66597_root_hub_control(r8a66597, port); |
1771 | 1772 | ||
1772 | spin_unlock_irqrestore(&r8a66597->lock, flags); | 1773 | spin_unlock_irqrestore(&r8a66597->lock, flags); |
1773 | } | 1774 | } |
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 69c34a58e205..b4ec716de7da 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
@@ -3270,6 +3270,7 @@ static struct usb_device_id sisusb_table [] = { | |||
3270 | { USB_DEVICE(0x0711, 0x0900) }, | 3270 | { USB_DEVICE(0x0711, 0x0900) }, |
3271 | { USB_DEVICE(0x0711, 0x0901) }, | 3271 | { USB_DEVICE(0x0711, 0x0901) }, |
3272 | { USB_DEVICE(0x0711, 0x0902) }, | 3272 | { USB_DEVICE(0x0711, 0x0902) }, |
3273 | { USB_DEVICE(0x0711, 0x0903) }, | ||
3273 | { USB_DEVICE(0x0711, 0x0918) }, | 3274 | { USB_DEVICE(0x0711, 0x0918) }, |
3274 | { USB_DEVICE(0x182d, 0x021c) }, | 3275 | { USB_DEVICE(0x182d, 0x021c) }, |
3275 | { USB_DEVICE(0x182d, 0x0269) }, | 3276 | { USB_DEVICE(0x182d, 0x0269) }, |
diff --git a/drivers/usb/misc/vstusb.c b/drivers/usb/misc/vstusb.c index 8648470c81ca..63dff9ba73c5 100644 --- a/drivers/usb/misc/vstusb.c +++ b/drivers/usb/misc/vstusb.c | |||
@@ -620,7 +620,7 @@ static long vstusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
620 | __func__); | 620 | __func__); |
621 | retval = -EFAULT; | 621 | retval = -EFAULT; |
622 | } else { | 622 | } else { |
623 | dev_dbg(&dev->dev, "%s: recv %d bytes from pipe %d\n", | 623 | dev_dbg(&dev->dev, "%s: recv %zd bytes from pipe %d\n", |
624 | __func__, usb_data.count, usb_data.pipe); | 624 | __func__, usb_data.count, usb_data.pipe); |
625 | } | 625 | } |
626 | 626 | ||
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 4a35745b30be..5280dba9b1fb 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -114,8 +114,8 @@ | |||
114 | 114 | ||
115 | 115 | ||
116 | 116 | ||
117 | unsigned debug; | 117 | unsigned musb_debug; |
118 | module_param(debug, uint, S_IRUGO | S_IWUSR); | 118 | module_param(musb_debug, uint, S_IRUGO | S_IWUSR); |
119 | MODULE_PARM_DESC(debug, "Debug message level. Default = 0"); | 119 | MODULE_PARM_DESC(debug, "Debug message level. Default = 0"); |
120 | 120 | ||
121 | #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia" | 121 | #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia" |
@@ -2248,7 +2248,7 @@ static int __init musb_init(void) | |||
2248 | "host" | 2248 | "host" |
2249 | #endif | 2249 | #endif |
2250 | ", debug=%d\n", | 2250 | ", debug=%d\n", |
2251 | musb_driver_name, debug); | 2251 | musb_driver_name, musb_debug); |
2252 | return platform_driver_probe(&musb_driver, musb_probe); | 2252 | return platform_driver_probe(&musb_driver, musb_probe); |
2253 | } | 2253 | } |
2254 | 2254 | ||
diff --git a/drivers/usb/musb/musb_debug.h b/drivers/usb/musb/musb_debug.h index 4d2794441b15..9fc1db44c72c 100644 --- a/drivers/usb/musb/musb_debug.h +++ b/drivers/usb/musb/musb_debug.h | |||
@@ -48,11 +48,11 @@ | |||
48 | __func__, __LINE__ , ## args); \ | 48 | __func__, __LINE__ , ## args); \ |
49 | } } while (0) | 49 | } } while (0) |
50 | 50 | ||
51 | extern unsigned debug; | 51 | extern unsigned musb_debug; |
52 | 52 | ||
53 | static inline int _dbg_level(unsigned l) | 53 | static inline int _dbg_level(unsigned l) |
54 | { | 54 | { |
55 | return debug >= l; | 55 | return musb_debug >= l; |
56 | } | 56 | } |
57 | 57 | ||
58 | #define DBG(level, fmt, args...) xprintk(level, KERN_DEBUG, fmt, ## args) | 58 | #define DBG(level, fmt, args...) xprintk(level, KERN_DEBUG, fmt, ## args) |
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 3133990f04ec..e45e70bcc5e2 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c | |||
@@ -378,6 +378,19 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status) | |||
378 | 378 | ||
379 | switch (qh->type) { | 379 | switch (qh->type) { |
380 | 380 | ||
381 | case USB_ENDPOINT_XFER_CONTROL: | ||
382 | case USB_ENDPOINT_XFER_BULK: | ||
383 | /* fifo policy for these lists, except that NAKing | ||
384 | * should rotate a qh to the end (for fairness). | ||
385 | */ | ||
386 | if (qh->mux == 1) { | ||
387 | head = qh->ring.prev; | ||
388 | list_del(&qh->ring); | ||
389 | kfree(qh); | ||
390 | qh = first_qh(head); | ||
391 | break; | ||
392 | } | ||
393 | |||
381 | case USB_ENDPOINT_XFER_ISOC: | 394 | case USB_ENDPOINT_XFER_ISOC: |
382 | case USB_ENDPOINT_XFER_INT: | 395 | case USB_ENDPOINT_XFER_INT: |
383 | /* this is where periodic bandwidth should be | 396 | /* this is where periodic bandwidth should be |
@@ -388,17 +401,6 @@ musb_giveback(struct musb_qh *qh, struct urb *urb, int status) | |||
388 | kfree(qh); | 401 | kfree(qh); |
389 | qh = NULL; | 402 | qh = NULL; |
390 | break; | 403 | break; |
391 | |||
392 | case USB_ENDPOINT_XFER_CONTROL: | ||
393 | case USB_ENDPOINT_XFER_BULK: | ||
394 | /* fifo policy for these lists, except that NAKing | ||
395 | * should rotate a qh to the end (for fairness). | ||
396 | */ | ||
397 | head = qh->ring.prev; | ||
398 | list_del(&qh->ring); | ||
399 | kfree(qh); | ||
400 | qh = first_qh(head); | ||
401 | break; | ||
402 | } | 404 | } |
403 | } | 405 | } |
404 | return qh; | 406 | return qh; |
@@ -1507,10 +1509,29 @@ void musb_host_rx(struct musb *musb, u8 epnum) | |||
1507 | musb_writew(hw_ep->regs, MUSB_RXCSR, val); | 1509 | musb_writew(hw_ep->regs, MUSB_RXCSR, val); |
1508 | 1510 | ||
1509 | #ifdef CONFIG_USB_INVENTRA_DMA | 1511 | #ifdef CONFIG_USB_INVENTRA_DMA |
1512 | if (usb_pipeisoc(pipe)) { | ||
1513 | struct usb_iso_packet_descriptor *d; | ||
1514 | |||
1515 | d = urb->iso_frame_desc + qh->iso_idx; | ||
1516 | d->actual_length = xfer_len; | ||
1517 | |||
1518 | /* even if there was an error, we did the dma | ||
1519 | * for iso_frame_desc->length | ||
1520 | */ | ||
1521 | if (d->status != EILSEQ && d->status != -EOVERFLOW) | ||
1522 | d->status = 0; | ||
1523 | |||
1524 | if (++qh->iso_idx >= urb->number_of_packets) | ||
1525 | done = true; | ||
1526 | else | ||
1527 | done = false; | ||
1528 | |||
1529 | } else { | ||
1510 | /* done if urb buffer is full or short packet is recd */ | 1530 | /* done if urb buffer is full or short packet is recd */ |
1511 | done = (urb->actual_length + xfer_len >= | 1531 | done = (urb->actual_length + xfer_len >= |
1512 | urb->transfer_buffer_length | 1532 | urb->transfer_buffer_length |
1513 | || dma->actual_len < qh->maxpacket); | 1533 | || dma->actual_len < qh->maxpacket); |
1534 | } | ||
1514 | 1535 | ||
1515 | /* send IN token for next packet, without AUTOREQ */ | 1536 | /* send IN token for next packet, without AUTOREQ */ |
1516 | if (!done) { | 1537 | if (!done) { |
@@ -1547,7 +1568,8 @@ void musb_host_rx(struct musb *musb, u8 epnum) | |||
1547 | if (dma) { | 1568 | if (dma) { |
1548 | struct dma_controller *c; | 1569 | struct dma_controller *c; |
1549 | u16 rx_count; | 1570 | u16 rx_count; |
1550 | int ret; | 1571 | int ret, length; |
1572 | dma_addr_t buf; | ||
1551 | 1573 | ||
1552 | rx_count = musb_readw(epio, MUSB_RXCOUNT); | 1574 | rx_count = musb_readw(epio, MUSB_RXCOUNT); |
1553 | 1575 | ||
@@ -1560,6 +1582,35 @@ void musb_host_rx(struct musb *musb, u8 epnum) | |||
1560 | 1582 | ||
1561 | c = musb->dma_controller; | 1583 | c = musb->dma_controller; |
1562 | 1584 | ||
1585 | if (usb_pipeisoc(pipe)) { | ||
1586 | int status = 0; | ||
1587 | struct usb_iso_packet_descriptor *d; | ||
1588 | |||
1589 | d = urb->iso_frame_desc + qh->iso_idx; | ||
1590 | |||
1591 | if (iso_err) { | ||
1592 | status = -EILSEQ; | ||
1593 | urb->error_count++; | ||
1594 | } | ||
1595 | if (rx_count > d->length) { | ||
1596 | if (status == 0) { | ||
1597 | status = -EOVERFLOW; | ||
1598 | urb->error_count++; | ||
1599 | } | ||
1600 | DBG(2, "** OVERFLOW %d into %d\n",\ | ||
1601 | rx_count, d->length); | ||
1602 | |||
1603 | length = d->length; | ||
1604 | } else | ||
1605 | length = rx_count; | ||
1606 | d->status = status; | ||
1607 | buf = urb->transfer_dma + d->offset; | ||
1608 | } else { | ||
1609 | length = rx_count; | ||
1610 | buf = urb->transfer_dma + | ||
1611 | urb->actual_length; | ||
1612 | } | ||
1613 | |||
1563 | dma->desired_mode = 0; | 1614 | dma->desired_mode = 0; |
1564 | #ifdef USE_MODE1 | 1615 | #ifdef USE_MODE1 |
1565 | /* because of the issue below, mode 1 will | 1616 | /* because of the issue below, mode 1 will |
@@ -1571,6 +1622,12 @@ void musb_host_rx(struct musb *musb, u8 epnum) | |||
1571 | urb->actual_length) | 1622 | urb->actual_length) |
1572 | > qh->maxpacket) | 1623 | > qh->maxpacket) |
1573 | dma->desired_mode = 1; | 1624 | dma->desired_mode = 1; |
1625 | if (rx_count < hw_ep->max_packet_sz_rx) { | ||
1626 | length = rx_count; | ||
1627 | dma->bDesiredMode = 0; | ||
1628 | } else { | ||
1629 | length = urb->transfer_buffer_length; | ||
1630 | } | ||
1574 | #endif | 1631 | #endif |
1575 | 1632 | ||
1576 | /* Disadvantage of using mode 1: | 1633 | /* Disadvantage of using mode 1: |
@@ -1608,12 +1665,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) | |||
1608 | */ | 1665 | */ |
1609 | ret = c->channel_program( | 1666 | ret = c->channel_program( |
1610 | dma, qh->maxpacket, | 1667 | dma, qh->maxpacket, |
1611 | dma->desired_mode, | 1668 | dma->desired_mode, buf, length); |
1612 | urb->transfer_dma | ||
1613 | + urb->actual_length, | ||
1614 | (dma->desired_mode == 0) | ||
1615 | ? rx_count | ||
1616 | : urb->transfer_buffer_length); | ||
1617 | 1669 | ||
1618 | if (!ret) { | 1670 | if (!ret) { |
1619 | c->channel_release(dma); | 1671 | c->channel_release(dma); |
@@ -1631,19 +1683,6 @@ void musb_host_rx(struct musb *musb, u8 epnum) | |||
1631 | } | 1683 | } |
1632 | } | 1684 | } |
1633 | 1685 | ||
1634 | if (dma && usb_pipeisoc(pipe)) { | ||
1635 | struct usb_iso_packet_descriptor *d; | ||
1636 | int iso_stat = status; | ||
1637 | |||
1638 | d = urb->iso_frame_desc + qh->iso_idx; | ||
1639 | d->actual_length += xfer_len; | ||
1640 | if (iso_err) { | ||
1641 | iso_stat = -EILSEQ; | ||
1642 | urb->error_count++; | ||
1643 | } | ||
1644 | d->status = iso_stat; | ||
1645 | } | ||
1646 | |||
1647 | finish: | 1686 | finish: |
1648 | urb->actual_length += xfer_len; | 1687 | urb->actual_length += xfer_len; |
1649 | qh->offset += xfer_len; | 1688 | qh->offset += xfer_len; |
@@ -1671,22 +1710,9 @@ static int musb_schedule( | |||
1671 | struct list_head *head = NULL; | 1710 | struct list_head *head = NULL; |
1672 | 1711 | ||
1673 | /* use fixed hardware for control and bulk */ | 1712 | /* use fixed hardware for control and bulk */ |
1674 | switch (qh->type) { | 1713 | if (qh->type == USB_ENDPOINT_XFER_CONTROL) { |
1675 | case USB_ENDPOINT_XFER_CONTROL: | ||
1676 | head = &musb->control; | 1714 | head = &musb->control; |
1677 | hw_ep = musb->control_ep; | 1715 | hw_ep = musb->control_ep; |
1678 | break; | ||
1679 | case USB_ENDPOINT_XFER_BULK: | ||
1680 | hw_ep = musb->bulk_ep; | ||
1681 | if (is_in) | ||
1682 | head = &musb->in_bulk; | ||
1683 | else | ||
1684 | head = &musb->out_bulk; | ||
1685 | break; | ||
1686 | } | ||
1687 | if (head) { | ||
1688 | idle = list_empty(head); | ||
1689 | list_add_tail(&qh->ring, head); | ||
1690 | goto success; | 1716 | goto success; |
1691 | } | 1717 | } |
1692 | 1718 | ||
@@ -1725,19 +1751,34 @@ static int musb_schedule( | |||
1725 | else | 1751 | else |
1726 | diff = hw_ep->max_packet_sz_tx - qh->maxpacket; | 1752 | diff = hw_ep->max_packet_sz_tx - qh->maxpacket; |
1727 | 1753 | ||
1728 | if (diff > 0 && best_diff > diff) { | 1754 | if (diff >= 0 && best_diff > diff) { |
1729 | best_diff = diff; | 1755 | best_diff = diff; |
1730 | best_end = epnum; | 1756 | best_end = epnum; |
1731 | } | 1757 | } |
1732 | } | 1758 | } |
1733 | if (best_end < 0) | 1759 | /* use bulk reserved ep1 if no other ep is free */ |
1760 | if (best_end > 0 && qh->type == USB_ENDPOINT_XFER_BULK) { | ||
1761 | hw_ep = musb->bulk_ep; | ||
1762 | if (is_in) | ||
1763 | head = &musb->in_bulk; | ||
1764 | else | ||
1765 | head = &musb->out_bulk; | ||
1766 | goto success; | ||
1767 | } else if (best_end < 0) { | ||
1734 | return -ENOSPC; | 1768 | return -ENOSPC; |
1769 | } | ||
1735 | 1770 | ||
1736 | idle = 1; | 1771 | idle = 1; |
1772 | qh->mux = 0; | ||
1737 | hw_ep = musb->endpoints + best_end; | 1773 | hw_ep = musb->endpoints + best_end; |
1738 | musb->periodic[best_end] = qh; | 1774 | musb->periodic[best_end] = qh; |
1739 | DBG(4, "qh %p periodic slot %d\n", qh, best_end); | 1775 | DBG(4, "qh %p periodic slot %d\n", qh, best_end); |
1740 | success: | 1776 | success: |
1777 | if (head) { | ||
1778 | idle = list_empty(head); | ||
1779 | list_add_tail(&qh->ring, head); | ||
1780 | qh->mux = 1; | ||
1781 | } | ||
1741 | qh->hw_ep = hw_ep; | 1782 | qh->hw_ep = hw_ep; |
1742 | qh->hep->hcpriv = qh; | 1783 | qh->hep->hcpriv = qh; |
1743 | if (idle) | 1784 | if (idle) |
@@ -2015,11 +2056,13 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) | |||
2015 | sched = &musb->control; | 2056 | sched = &musb->control; |
2016 | break; | 2057 | break; |
2017 | case USB_ENDPOINT_XFER_BULK: | 2058 | case USB_ENDPOINT_XFER_BULK: |
2018 | if (usb_pipein(urb->pipe)) | 2059 | if (qh->mux == 1) { |
2019 | sched = &musb->in_bulk; | 2060 | if (usb_pipein(urb->pipe)) |
2020 | else | 2061 | sched = &musb->in_bulk; |
2021 | sched = &musb->out_bulk; | 2062 | else |
2022 | break; | 2063 | sched = &musb->out_bulk; |
2064 | break; | ||
2065 | } | ||
2023 | default: | 2066 | default: |
2024 | /* REVISIT when we get a schedule tree, periodic | 2067 | /* REVISIT when we get a schedule tree, periodic |
2025 | * transfers won't always be at the head of a | 2068 | * transfers won't always be at the head of a |
@@ -2067,11 +2110,13 @@ musb_h_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep) | |||
2067 | sched = &musb->control; | 2110 | sched = &musb->control; |
2068 | break; | 2111 | break; |
2069 | case USB_ENDPOINT_XFER_BULK: | 2112 | case USB_ENDPOINT_XFER_BULK: |
2070 | if (is_in) | 2113 | if (qh->mux == 1) { |
2071 | sched = &musb->in_bulk; | 2114 | if (is_in) |
2072 | else | 2115 | sched = &musb->in_bulk; |
2073 | sched = &musb->out_bulk; | 2116 | else |
2074 | break; | 2117 | sched = &musb->out_bulk; |
2118 | break; | ||
2119 | } | ||
2075 | default: | 2120 | default: |
2076 | /* REVISIT when we get a schedule tree, periodic transfers | 2121 | /* REVISIT when we get a schedule tree, periodic transfers |
2077 | * won't always be at the head of a singleton queue... | 2122 | * won't always be at the head of a singleton queue... |
diff --git a/drivers/usb/musb/musb_host.h b/drivers/usb/musb/musb_host.h index 77bcdb9d5b32..0b7fbcd21963 100644 --- a/drivers/usb/musb/musb_host.h +++ b/drivers/usb/musb/musb_host.h | |||
@@ -53,6 +53,7 @@ struct musb_qh { | |||
53 | 53 | ||
54 | struct list_head ring; /* of musb_qh */ | 54 | struct list_head ring; /* of musb_qh */ |
55 | /* struct musb_qh *next; */ /* for periodic tree */ | 55 | /* struct musb_qh *next; */ /* for periodic tree */ |
56 | u8 mux; /* qh multiplexed to hw_ep */ | ||
56 | 57 | ||
57 | unsigned offset; /* in urb->transfer_buffer */ | 58 | unsigned offset; /* in urb->transfer_buffer */ |
58 | unsigned segsize; /* current xfer fragment */ | 59 | unsigned segsize; /* current xfer fragment */ |
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 9d2dcb121c5e..ce6c162920f7 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -53,7 +53,9 @@ static void musb_do_idle(unsigned long _musb) | |||
53 | { | 53 | { |
54 | struct musb *musb = (void *)_musb; | 54 | struct musb *musb = (void *)_musb; |
55 | unsigned long flags; | 55 | unsigned long flags; |
56 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | ||
56 | u8 power; | 57 | u8 power; |
58 | #endif | ||
57 | u8 devctl; | 59 | u8 devctl; |
58 | 60 | ||
59 | devctl = musb_readb(musb->mregs, MUSB_DEVCTL); | 61 | devctl = musb_readb(musb->mregs, MUSB_DEVCTL); |
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index b73b036f3d77..ee8fca92a4ac 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c | |||
@@ -605,7 +605,7 @@ void musb_platform_set_mode(struct musb *musb, u8 musb_mode) | |||
605 | 605 | ||
606 | if (musb->board_mode != MUSB_OTG) { | 606 | if (musb->board_mode != MUSB_OTG) { |
607 | ERR("Changing mode currently only supported in OTG mode\n"); | 607 | ERR("Changing mode currently only supported in OTG mode\n"); |
608 | return; | 608 | return -EINVAL; |
609 | } | 609 | } |
610 | 610 | ||
611 | otg_stat = musb_readl(tbase, TUSB_DEV_OTG_STAT); | 611 | otg_stat = musb_readl(tbase, TUSB_DEV_OTG_STAT); |
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c index 8008d0bc80ad..9035d7256b03 100644 --- a/drivers/usb/serial/cp2101.c +++ b/drivers/usb/serial/cp2101.c | |||
@@ -67,6 +67,7 @@ static struct usb_device_id id_table [] = { | |||
67 | { USB_DEVICE(0x10C4, 0x800A) }, /* SPORTident BSM7-D-USB main station */ | 67 | { USB_DEVICE(0x10C4, 0x800A) }, /* SPORTident BSM7-D-USB main station */ |
68 | { USB_DEVICE(0x10C4, 0x803B) }, /* Pololu USB-serial converter */ | 68 | { USB_DEVICE(0x10C4, 0x803B) }, /* Pololu USB-serial converter */ |
69 | { USB_DEVICE(0x10C4, 0x8053) }, /* Enfora EDG1228 */ | 69 | { USB_DEVICE(0x10C4, 0x8053) }, /* Enfora EDG1228 */ |
70 | { USB_DEVICE(0x10C4, 0x8054) }, /* Enfora GSM2228 */ | ||
70 | { USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */ | 71 | { USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */ |
71 | { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */ | 72 | { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */ |
72 | { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ | 73 | { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ |
@@ -85,6 +86,7 @@ static struct usb_device_id id_table [] = { | |||
85 | { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ | 86 | { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ |
86 | { USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */ | 87 | { USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */ |
87 | { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ | 88 | { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ |
89 | { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */ | ||
88 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ | 90 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ |
89 | { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ | 91 | { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ |
90 | { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */ | 92 | { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */ |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index bd07eaa300b9..6fa1ec441b61 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -160,6 +160,11 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po | |||
160 | 160 | ||
161 | #define NOVATELWIRELESS_VENDOR_ID 0x1410 | 161 | #define NOVATELWIRELESS_VENDOR_ID 0x1410 |
162 | 162 | ||
163 | /* YISO PRODUCTS */ | ||
164 | |||
165 | #define YISO_VENDOR_ID 0x0EAB | ||
166 | #define YISO_PRODUCT_U893 0xC893 | ||
167 | |||
163 | /* MERLIN EVDO PRODUCTS */ | 168 | /* MERLIN EVDO PRODUCTS */ |
164 | #define NOVATELWIRELESS_PRODUCT_V640 0x1100 | 169 | #define NOVATELWIRELESS_PRODUCT_V640 0x1100 |
165 | #define NOVATELWIRELESS_PRODUCT_V620 0x1110 | 170 | #define NOVATELWIRELESS_PRODUCT_V620 0x1110 |
@@ -408,6 +413,7 @@ static struct usb_device_id option_ids[] = { | |||
408 | { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, | 413 | { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, |
409 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) }, | 414 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) }, |
410 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, | 415 | { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, |
416 | { USB_DEVICE(YISO_VENDOR_ID, YISO_PRODUCT_U893) }, | ||
411 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, | 417 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, |
412 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, | 418 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, |
413 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1004) }, | 419 | { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_1004) }, |
diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig index 3d9249632ae1..c68b738900bd 100644 --- a/drivers/usb/storage/Kconfig +++ b/drivers/usb/storage/Kconfig | |||
@@ -2,8 +2,8 @@ | |||
2 | # USB Storage driver configuration | 2 | # USB Storage driver configuration |
3 | # | 3 | # |
4 | 4 | ||
5 | comment "NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'" | 5 | comment "NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;" |
6 | comment "may also be needed; see USB_STORAGE Help for more information" | 6 | comment "see USB_STORAGE Help for more information" |
7 | depends on USB | 7 | depends on USB |
8 | 8 | ||
9 | config USB_STORAGE | 9 | config USB_STORAGE |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index fb9e20e624c1..d4e5fc86e43c 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -253,6 +253,14 @@ UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0591, | |||
253 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 253 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
254 | US_FL_FIX_CAPACITY ), | 254 | US_FL_FIX_CAPACITY ), |
255 | 255 | ||
256 | /* Submitted by Ricky Wong Yung Fei <evilbladewarrior@gmail.com> */ | ||
257 | /* Nokia 7610 Supernova - Too many sectors reported in usb storage mode */ | ||
258 | UNUSUAL_DEV( 0x0421, 0x00f5, 0x0000, 0x0470, | ||
259 | "Nokia", | ||
260 | "7610 Supernova", | ||
261 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
262 | US_FL_FIX_CAPACITY ), | ||
263 | |||
256 | /* Reported by Olaf Hering <olh@suse.de> from novell bug #105878 */ | 264 | /* Reported by Olaf Hering <olh@suse.de> from novell bug #105878 */ |
257 | UNUSUAL_DEV( 0x0424, 0x0fdc, 0x0210, 0x0210, | 265 | UNUSUAL_DEV( 0x0424, 0x0fdc, 0x0210, 0x0210, |
258 | "SMSC", | 266 | "SMSC", |
@@ -418,6 +426,13 @@ UNUSUAL_DEV( 0x04b0, 0x0417, 0x0100, 0x0100, | |||
418 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 426 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
419 | US_FL_FIX_CAPACITY), | 427 | US_FL_FIX_CAPACITY), |
420 | 428 | ||
429 | /* Reported by paul ready <lxtwin@homecall.co.uk> */ | ||
430 | UNUSUAL_DEV( 0x04b0, 0x0419, 0x0100, 0x0200, | ||
431 | "NIKON", | ||
432 | "NIKON DSC D300", | ||
433 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
434 | US_FL_FIX_CAPACITY), | ||
435 | |||
421 | /* Reported by Doug Maxey (dwm@austin.ibm.com) */ | 436 | /* Reported by Doug Maxey (dwm@austin.ibm.com) */ |
422 | UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110, | 437 | UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110, |
423 | "IBM", | 438 | "IBM", |
@@ -1258,6 +1273,13 @@ UNUSUAL_DEV( 0x0839, 0x000a, 0x0001, 0x0001, | |||
1258 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1273 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1259 | US_FL_FIX_INQUIRY), | 1274 | US_FL_FIX_INQUIRY), |
1260 | 1275 | ||
1276 | /* Reported by Luciano Rocha <luciano@eurotux.com> */ | ||
1277 | UNUSUAL_DEV( 0x0840, 0x0082, 0x0001, 0x0001, | ||
1278 | "Argosy", | ||
1279 | "Storage", | ||
1280 | US_SC_DEVICE, US_PR_DEVICE, NULL, | ||
1281 | US_FL_FIX_CAPACITY), | ||
1282 | |||
1261 | /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. | 1283 | /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. |
1262 | * Flag will support Bulk devices which use a standards-violating 32-byte | 1284 | * Flag will support Bulk devices which use a standards-violating 32-byte |
1263 | * Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with | 1285 | * Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with |
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index d910501de6d2..8d86b7960f0d 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c | |||
@@ -812,7 +812,7 @@ int dlm_release_lockspace(void *lockspace, int force) | |||
812 | error = release_lockspace(ls, force); | 812 | error = release_lockspace(ls, force); |
813 | if (!error) | 813 | if (!error) |
814 | ls_count--; | 814 | ls_count--; |
815 | else if (!ls_count) | 815 | if (!ls_count) |
816 | threads_stop(); | 816 | threads_stop(); |
817 | mutex_unlock(&ls_lock); | 817 | mutex_unlock(&ls_lock); |
818 | 818 | ||
diff --git a/fs/inotify.c b/fs/inotify.c index 690e72595e6e..7bbed1b89825 100644 --- a/fs/inotify.c +++ b/fs/inotify.c | |||
@@ -106,6 +106,20 @@ void get_inotify_watch(struct inotify_watch *watch) | |||
106 | } | 106 | } |
107 | EXPORT_SYMBOL_GPL(get_inotify_watch); | 107 | EXPORT_SYMBOL_GPL(get_inotify_watch); |
108 | 108 | ||
109 | int pin_inotify_watch(struct inotify_watch *watch) | ||
110 | { | ||
111 | struct super_block *sb = watch->inode->i_sb; | ||
112 | spin_lock(&sb_lock); | ||
113 | if (sb->s_count >= S_BIAS) { | ||
114 | atomic_inc(&sb->s_active); | ||
115 | spin_unlock(&sb_lock); | ||
116 | atomic_inc(&watch->count); | ||
117 | return 1; | ||
118 | } | ||
119 | spin_unlock(&sb_lock); | ||
120 | return 0; | ||
121 | } | ||
122 | |||
109 | /** | 123 | /** |
110 | * put_inotify_watch - decrements the ref count on a given watch. cleans up | 124 | * put_inotify_watch - decrements the ref count on a given watch. cleans up |
111 | * watch references if the count reaches zero. inotify_watch is freed by | 125 | * watch references if the count reaches zero. inotify_watch is freed by |
@@ -124,6 +138,13 @@ void put_inotify_watch(struct inotify_watch *watch) | |||
124 | } | 138 | } |
125 | EXPORT_SYMBOL_GPL(put_inotify_watch); | 139 | EXPORT_SYMBOL_GPL(put_inotify_watch); |
126 | 140 | ||
141 | void unpin_inotify_watch(struct inotify_watch *watch) | ||
142 | { | ||
143 | struct super_block *sb = watch->inode->i_sb; | ||
144 | put_inotify_watch(watch); | ||
145 | deactivate_super(sb); | ||
146 | } | ||
147 | |||
127 | /* | 148 | /* |
128 | * inotify_handle_get_wd - returns the next WD for use by the given handle | 149 | * inotify_handle_get_wd - returns the next WD for use by the given handle |
129 | * | 150 | * |
@@ -479,6 +500,112 @@ void inotify_init_watch(struct inotify_watch *watch) | |||
479 | } | 500 | } |
480 | EXPORT_SYMBOL_GPL(inotify_init_watch); | 501 | EXPORT_SYMBOL_GPL(inotify_init_watch); |
481 | 502 | ||
503 | /* | ||
504 | * Watch removals suck violently. To kick the watch out we need (in this | ||
505 | * order) inode->inotify_mutex and ih->mutex. That's fine if we have | ||
506 | * a hold on inode; however, for all other cases we need to make damn sure | ||
507 | * we don't race with umount. We can *NOT* just grab a reference to a | ||
508 | * watch - inotify_unmount_inodes() will happily sail past it and we'll end | ||
509 | * with reference to inode potentially outliving its superblock. Ideally | ||
510 | * we just want to grab an active reference to superblock if we can; that | ||
511 | * will make sure we won't go into inotify_umount_inodes() until we are | ||
512 | * done. Cleanup is just deactivate_super(). However, that leaves a messy | ||
513 | * case - what if we *are* racing with umount() and active references to | ||
514 | * superblock can't be acquired anymore? We can bump ->s_count, grab | ||
515 | * ->s_umount, which will almost certainly wait until the superblock is shut | ||
516 | * down and the watch in question is pining for fjords. That's fine, but | ||
517 | * there is a problem - we might have hit the window between ->s_active | ||
518 | * getting to 0 / ->s_count - below S_BIAS (i.e. the moment when superblock | ||
519 | * is past the point of no return and is heading for shutdown) and the | ||
520 | * moment when deactivate_super() acquires ->s_umount. We could just do | ||
521 | * drop_super() yield() and retry, but that's rather antisocial and this | ||
522 | * stuff is luser-triggerable. OTOH, having grabbed ->s_umount and having | ||
523 | * found that we'd got there first (i.e. that ->s_root is non-NULL) we know | ||
524 | * that we won't race with inotify_umount_inodes(). So we could grab a | ||
525 | * reference to watch and do the rest as above, just with drop_super() instead | ||
526 | * of deactivate_super(), right? Wrong. We had to drop ih->mutex before we | ||
527 | * could grab ->s_umount. So the watch could've been gone already. | ||
528 | * | ||
529 | * That still can be dealt with - we need to save watch->wd, do idr_find() | ||
530 | * and compare its result with our pointer. If they match, we either have | ||
531 | * the damn thing still alive or we'd lost not one but two races at once, | ||
532 | * the watch had been killed and a new one got created with the same ->wd | ||
533 | * at the same address. That couldn't have happened in inotify_destroy(), | ||
534 | * but inotify_rm_wd() could run into that. Still, "new one got created" | ||
535 | * is not a problem - we have every right to kill it or leave it alone, | ||
536 | * whatever's more convenient. | ||
537 | * | ||
538 | * So we can use idr_find(...) == watch && watch->inode->i_sb == sb as | ||
539 | * "grab it and kill it" check. If it's been our original watch, we are | ||
540 | * fine, if it's a newcomer - nevermind, just pretend that we'd won the | ||
541 | * race and kill the fscker anyway; we are safe since we know that its | ||
542 | * superblock won't be going away. | ||
543 | * | ||
544 | * And yes, this is far beyond mere "not very pretty"; so's the entire | ||
545 | * concept of inotify to start with. | ||
546 | */ | ||
547 | |||
548 | /** | ||
549 | * pin_to_kill - pin the watch down for removal | ||
550 | * @ih: inotify handle | ||
551 | * @watch: watch to kill | ||
552 | * | ||
553 | * Called with ih->mutex held, drops it. Possible return values: | ||
554 | * 0 - nothing to do, it has died | ||
555 | * 1 - remove it, drop the reference and deactivate_super() | ||
556 | * 2 - remove it, drop the reference and drop_super(); we tried hard to avoid | ||
557 | * that variant, since it involved a lot of PITA, but that's the best that | ||
558 | * could've been done. | ||
559 | */ | ||
560 | static int pin_to_kill(struct inotify_handle *ih, struct inotify_watch *watch) | ||
561 | { | ||
562 | struct super_block *sb = watch->inode->i_sb; | ||
563 | s32 wd = watch->wd; | ||
564 | |||
565 | spin_lock(&sb_lock); | ||
566 | if (sb->s_count >= S_BIAS) { | ||
567 | atomic_inc(&sb->s_active); | ||
568 | spin_unlock(&sb_lock); | ||
569 | get_inotify_watch(watch); | ||
570 | mutex_unlock(&ih->mutex); | ||
571 | return 1; /* the best outcome */ | ||
572 | } | ||
573 | sb->s_count++; | ||
574 | spin_unlock(&sb_lock); | ||
575 | mutex_unlock(&ih->mutex); /* can't grab ->s_umount under it */ | ||
576 | down_read(&sb->s_umount); | ||
577 | if (likely(!sb->s_root)) { | ||
578 | /* fs is already shut down; the watch is dead */ | ||
579 | drop_super(sb); | ||
580 | return 0; | ||
581 | } | ||
582 | /* raced with the final deactivate_super() */ | ||
583 | mutex_lock(&ih->mutex); | ||
584 | if (idr_find(&ih->idr, wd) != watch || watch->inode->i_sb != sb) { | ||
585 | /* the watch is dead */ | ||
586 | mutex_unlock(&ih->mutex); | ||
587 | drop_super(sb); | ||
588 | return 0; | ||
589 | } | ||
590 | /* still alive or freed and reused with the same sb and wd; kill */ | ||
591 | get_inotify_watch(watch); | ||
592 | mutex_unlock(&ih->mutex); | ||
593 | return 2; | ||
594 | } | ||
595 | |||
596 | static void unpin_and_kill(struct inotify_watch *watch, int how) | ||
597 | { | ||
598 | struct super_block *sb = watch->inode->i_sb; | ||
599 | put_inotify_watch(watch); | ||
600 | switch (how) { | ||
601 | case 1: | ||
602 | deactivate_super(sb); | ||
603 | break; | ||
604 | case 2: | ||
605 | drop_super(sb); | ||
606 | } | ||
607 | } | ||
608 | |||
482 | /** | 609 | /** |
483 | * inotify_destroy - clean up and destroy an inotify instance | 610 | * inotify_destroy - clean up and destroy an inotify instance |
484 | * @ih: inotify handle | 611 | * @ih: inotify handle |
@@ -490,11 +617,15 @@ void inotify_destroy(struct inotify_handle *ih) | |||
490 | * pretty. We cannot do a simple iteration over the list, because we | 617 | * pretty. We cannot do a simple iteration over the list, because we |
491 | * do not know the inode until we iterate to the watch. But we need to | 618 | * do not know the inode until we iterate to the watch. But we need to |
492 | * hold inode->inotify_mutex before ih->mutex. The following works. | 619 | * hold inode->inotify_mutex before ih->mutex. The following works. |
620 | * | ||
621 | * AV: it had to become even uglier to start working ;-/ | ||
493 | */ | 622 | */ |
494 | while (1) { | 623 | while (1) { |
495 | struct inotify_watch *watch; | 624 | struct inotify_watch *watch; |
496 | struct list_head *watches; | 625 | struct list_head *watches; |
626 | struct super_block *sb; | ||
497 | struct inode *inode; | 627 | struct inode *inode; |
628 | int how; | ||
498 | 629 | ||
499 | mutex_lock(&ih->mutex); | 630 | mutex_lock(&ih->mutex); |
500 | watches = &ih->watches; | 631 | watches = &ih->watches; |
@@ -503,8 +634,10 @@ void inotify_destroy(struct inotify_handle *ih) | |||
503 | break; | 634 | break; |
504 | } | 635 | } |
505 | watch = list_first_entry(watches, struct inotify_watch, h_list); | 636 | watch = list_first_entry(watches, struct inotify_watch, h_list); |
506 | get_inotify_watch(watch); | 637 | sb = watch->inode->i_sb; |
507 | mutex_unlock(&ih->mutex); | 638 | how = pin_to_kill(ih, watch); |
639 | if (!how) | ||
640 | continue; | ||
508 | 641 | ||
509 | inode = watch->inode; | 642 | inode = watch->inode; |
510 | mutex_lock(&inode->inotify_mutex); | 643 | mutex_lock(&inode->inotify_mutex); |
@@ -518,7 +651,7 @@ void inotify_destroy(struct inotify_handle *ih) | |||
518 | 651 | ||
519 | mutex_unlock(&ih->mutex); | 652 | mutex_unlock(&ih->mutex); |
520 | mutex_unlock(&inode->inotify_mutex); | 653 | mutex_unlock(&inode->inotify_mutex); |
521 | put_inotify_watch(watch); | 654 | unpin_and_kill(watch, how); |
522 | } | 655 | } |
523 | 656 | ||
524 | /* free this handle: the put matching the get in inotify_init() */ | 657 | /* free this handle: the put matching the get in inotify_init() */ |
@@ -719,7 +852,9 @@ void inotify_evict_watch(struct inotify_watch *watch) | |||
719 | int inotify_rm_wd(struct inotify_handle *ih, u32 wd) | 852 | int inotify_rm_wd(struct inotify_handle *ih, u32 wd) |
720 | { | 853 | { |
721 | struct inotify_watch *watch; | 854 | struct inotify_watch *watch; |
855 | struct super_block *sb; | ||
722 | struct inode *inode; | 856 | struct inode *inode; |
857 | int how; | ||
723 | 858 | ||
724 | mutex_lock(&ih->mutex); | 859 | mutex_lock(&ih->mutex); |
725 | watch = idr_find(&ih->idr, wd); | 860 | watch = idr_find(&ih->idr, wd); |
@@ -727,9 +862,12 @@ int inotify_rm_wd(struct inotify_handle *ih, u32 wd) | |||
727 | mutex_unlock(&ih->mutex); | 862 | mutex_unlock(&ih->mutex); |
728 | return -EINVAL; | 863 | return -EINVAL; |
729 | } | 864 | } |
730 | get_inotify_watch(watch); | 865 | sb = watch->inode->i_sb; |
866 | how = pin_to_kill(ih, watch); | ||
867 | if (!how) | ||
868 | return 0; | ||
869 | |||
731 | inode = watch->inode; | 870 | inode = watch->inode; |
732 | mutex_unlock(&ih->mutex); | ||
733 | 871 | ||
734 | mutex_lock(&inode->inotify_mutex); | 872 | mutex_lock(&inode->inotify_mutex); |
735 | mutex_lock(&ih->mutex); | 873 | mutex_lock(&ih->mutex); |
@@ -740,7 +878,7 @@ int inotify_rm_wd(struct inotify_handle *ih, u32 wd) | |||
740 | 878 | ||
741 | mutex_unlock(&ih->mutex); | 879 | mutex_unlock(&ih->mutex); |
742 | mutex_unlock(&inode->inotify_mutex); | 880 | mutex_unlock(&inode->inotify_mutex); |
743 | put_inotify_watch(watch); | 881 | unpin_and_kill(watch, how); |
744 | 882 | ||
745 | return 0; | 883 | return 0; |
746 | } | 884 | } |
diff --git a/include/linux/inotify.h b/include/linux/inotify.h index bd578578a8b9..37ea2894b3c0 100644 --- a/include/linux/inotify.h +++ b/include/linux/inotify.h | |||
@@ -134,6 +134,8 @@ extern void inotify_remove_watch_locked(struct inotify_handle *, | |||
134 | struct inotify_watch *); | 134 | struct inotify_watch *); |
135 | extern void get_inotify_watch(struct inotify_watch *); | 135 | extern void get_inotify_watch(struct inotify_watch *); |
136 | extern void put_inotify_watch(struct inotify_watch *); | 136 | extern void put_inotify_watch(struct inotify_watch *); |
137 | extern int pin_inotify_watch(struct inotify_watch *); | ||
138 | extern void unpin_inotify_watch(struct inotify_watch *); | ||
137 | 139 | ||
138 | #else | 140 | #else |
139 | 141 | ||
@@ -228,6 +230,15 @@ static inline void put_inotify_watch(struct inotify_watch *watch) | |||
228 | { | 230 | { |
229 | } | 231 | } |
230 | 232 | ||
233 | extern inline int pin_inotify_watch(struct inotify_watch *watch) | ||
234 | { | ||
235 | return 0; | ||
236 | } | ||
237 | |||
238 | extern inline void unpin_inotify_watch(struct inotify_watch *watch) | ||
239 | { | ||
240 | } | ||
241 | |||
231 | #endif /* CONFIG_INOTIFY */ | 242 | #endif /* CONFIG_INOTIFY */ |
232 | 243 | ||
233 | #endif /* __KERNEL __ */ | 244 | #endif /* __KERNEL __ */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index fba141d3ca07..dc7e0d0a6474 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -318,32 +318,36 @@ static inline char *pack_hex_byte(char *buf, u8 byte) | |||
318 | return buf; | 318 | return buf; |
319 | } | 319 | } |
320 | 320 | ||
321 | #define pr_emerg(fmt, arg...) \ | 321 | #ifndef pr_fmt |
322 | printk(KERN_EMERG fmt, ##arg) | 322 | #define pr_fmt(fmt) fmt |
323 | #define pr_alert(fmt, arg...) \ | 323 | #endif |
324 | printk(KERN_ALERT fmt, ##arg) | 324 | |
325 | #define pr_crit(fmt, arg...) \ | 325 | #define pr_emerg(fmt, ...) \ |
326 | printk(KERN_CRIT fmt, ##arg) | 326 | printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) |
327 | #define pr_err(fmt, arg...) \ | 327 | #define pr_alert(fmt, ...) \ |
328 | printk(KERN_ERR fmt, ##arg) | 328 | printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) |
329 | #define pr_warning(fmt, arg...) \ | 329 | #define pr_crit(fmt, ...) \ |
330 | printk(KERN_WARNING fmt, ##arg) | 330 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) |
331 | #define pr_notice(fmt, arg...) \ | 331 | #define pr_err(fmt, ...) \ |
332 | printk(KERN_NOTICE fmt, ##arg) | 332 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) |
333 | #define pr_info(fmt, arg...) \ | 333 | #define pr_warning(fmt, ...) \ |
334 | printk(KERN_INFO fmt, ##arg) | 334 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) |
335 | #define pr_notice(fmt, ...) \ | ||
336 | printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) | ||
337 | #define pr_info(fmt, ...) \ | ||
338 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) | ||
335 | 339 | ||
336 | /* If you are writing a driver, please use dev_dbg instead */ | 340 | /* If you are writing a driver, please use dev_dbg instead */ |
337 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) | 341 | #if defined(CONFIG_DYNAMIC_PRINTK_DEBUG) |
338 | #define pr_debug(fmt, ...) do { \ | 342 | #define pr_debug(fmt, ...) do { \ |
339 | dynamic_pr_debug(fmt, ##__VA_ARGS__); \ | 343 | dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ |
340 | } while (0) | 344 | } while (0) |
341 | #elif defined(DEBUG) | 345 | #elif defined(DEBUG) |
342 | #define pr_debug(fmt, arg...) \ | 346 | #define pr_debug(fmt, ...) \ |
343 | printk(KERN_DEBUG fmt, ##arg) | 347 | printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |
344 | #else | 348 | #else |
345 | #define pr_debug(fmt, arg...) \ | 349 | #define pr_debug(fmt, ...) \ |
346 | ({ if (0) printk(KERN_DEBUG fmt, ##arg); 0; }) | 350 | ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) |
347 | #endif | 351 | #endif |
348 | 352 | ||
349 | /* | 353 | /* |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index e27f216361fc..4e4f1277f3bf 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -155,6 +155,9 @@ | |||
155 | 155 | ||
156 | #define PORT_SC26XX 82 | 156 | #define PORT_SC26XX 82 |
157 | 157 | ||
158 | /* SH-SCI */ | ||
159 | #define PORT_SCIFA 83 | ||
160 | |||
158 | #ifdef __KERNEL__ | 161 | #ifdef __KERNEL__ |
159 | 162 | ||
160 | #include <linux/compiler.h> | 163 | #include <linux/compiler.h> |
diff --git a/include/linux/slab.h b/include/linux/slab.h index ba965c84ae06..000da12b5cf0 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -23,6 +23,34 @@ | |||
23 | #define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ | 23 | #define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */ |
24 | #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ | 24 | #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */ |
25 | #define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */ | 25 | #define SLAB_PANIC 0x00040000UL /* Panic if kmem_cache_create() fails */ |
26 | /* | ||
27 | * SLAB_DESTROY_BY_RCU - **WARNING** READ THIS! | ||
28 | * | ||
29 | * This delays freeing the SLAB page by a grace period, it does _NOT_ | ||
30 | * delay object freeing. This means that if you do kmem_cache_free() | ||
31 | * that memory location is free to be reused at any time. Thus it may | ||
32 | * be possible to see another object there in the same RCU grace period. | ||
33 | * | ||
34 | * This feature only ensures the memory location backing the object | ||
35 | * stays valid, the trick to using this is relying on an independent | ||
36 | * object validation pass. Something like: | ||
37 | * | ||
38 | * rcu_read_lock() | ||
39 | * again: | ||
40 | * obj = lockless_lookup(key); | ||
41 | * if (obj) { | ||
42 | * if (!try_get_ref(obj)) // might fail for free objects | ||
43 | * goto again; | ||
44 | * | ||
45 | * if (obj->key != key) { // not the object we expected | ||
46 | * put_ref(obj); | ||
47 | * goto again; | ||
48 | * } | ||
49 | * } | ||
50 | * rcu_read_unlock(); | ||
51 | * | ||
52 | * See also the comment on struct slab_rcu in mm/slab.c. | ||
53 | */ | ||
26 | #define SLAB_DESTROY_BY_RCU 0x00080000UL /* Defer freeing slabs to RCU */ | 54 | #define SLAB_DESTROY_BY_RCU 0x00080000UL /* Defer freeing slabs to RCU */ |
27 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ | 55 | #define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */ |
28 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ | 56 | #define SLAB_TRACE 0x00200000UL /* Trace allocations and frees */ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 8fa973bede5e..f72aa51f7bcd 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -108,6 +108,7 @@ enum usb_interface_condition { | |||
108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
109 | * @is_active: flag set when the interface is bound and not suspended. | 109 | * @is_active: flag set when the interface is bound and not suspended. |
110 | * @sysfs_files_created: sysfs attributes exist | 110 | * @sysfs_files_created: sysfs attributes exist |
111 | * @unregistering: flag set when the interface is being unregistered | ||
111 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | 112 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup |
112 | * capability during autosuspend. | 113 | * capability during autosuspend. |
113 | * @needs_altsetting0: flag set when a set-interface request for altsetting 0 | 114 | * @needs_altsetting0: flag set when a set-interface request for altsetting 0 |
@@ -163,6 +164,7 @@ struct usb_interface { | |||
163 | enum usb_interface_condition condition; /* state of binding */ | 164 | enum usb_interface_condition condition; /* state of binding */ |
164 | unsigned is_active:1; /* the interface is not suspended */ | 165 | unsigned is_active:1; /* the interface is not suspended */ |
165 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ | 166 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ |
167 | unsigned unregistering:1; /* unregistration is in progress */ | ||
166 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ | 168 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ |
167 | unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ | 169 | unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ |
168 | unsigned needs_binding:1; /* needs delayed unbind/rebind */ | 170 | unsigned needs_binding:1; /* needs delayed unbind/rebind */ |
diff --git a/init/Kconfig b/init/Kconfig index 86b00c53fade..226da2733c1e 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -771,8 +771,7 @@ config SLAB | |||
771 | help | 771 | help |
772 | The regular slab allocator that is established and known to work | 772 | The regular slab allocator that is established and known to work |
773 | well in all environments. It organizes cache hot objects in | 773 | well in all environments. It organizes cache hot objects in |
774 | per cpu and per node queues. SLAB is the default choice for | 774 | per cpu and per node queues. |
775 | a slab allocator. | ||
776 | 775 | ||
777 | config SLUB | 776 | config SLUB |
778 | bool "SLUB (Unqueued Allocator)" | 777 | bool "SLUB (Unqueued Allocator)" |
@@ -781,7 +780,8 @@ config SLUB | |||
781 | instead of managing queues of cached objects (SLAB approach). | 780 | instead of managing queues of cached objects (SLAB approach). |
782 | Per cpu caching is realized using slabs of objects instead | 781 | Per cpu caching is realized using slabs of objects instead |
783 | of queues of objects. SLUB can use memory efficiently | 782 | of queues of objects. SLUB can use memory efficiently |
784 | and has enhanced diagnostics. | 783 | and has enhanced diagnostics. SLUB is the default choice for |
784 | a slab allocator. | ||
785 | 785 | ||
786 | config SLOB | 786 | config SLOB |
787 | depends on EMBEDDED | 787 | depends on EMBEDDED |
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 8ba0e0d934f2..8b509441f49a 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -24,6 +24,7 @@ struct audit_chunk { | |||
24 | struct list_head trees; /* with root here */ | 24 | struct list_head trees; /* with root here */ |
25 | int dead; | 25 | int dead; |
26 | int count; | 26 | int count; |
27 | atomic_long_t refs; | ||
27 | struct rcu_head head; | 28 | struct rcu_head head; |
28 | struct node { | 29 | struct node { |
29 | struct list_head list; | 30 | struct list_head list; |
@@ -56,7 +57,8 @@ static LIST_HEAD(prune_list); | |||
56 | * tree is refcounted; one reference for "some rules on rules_list refer to | 57 | * tree is refcounted; one reference for "some rules on rules_list refer to |
57 | * it", one for each chunk with pointer to it. | 58 | * it", one for each chunk with pointer to it. |
58 | * | 59 | * |
59 | * chunk is refcounted by embedded inotify_watch. | 60 | * chunk is refcounted by embedded inotify_watch + .refs (non-zero refcount |
61 | * of watch contributes 1 to .refs). | ||
60 | * | 62 | * |
61 | * node.index allows to get from node.list to containing chunk. | 63 | * node.index allows to get from node.list to containing chunk. |
62 | * MSB of that sucker is stolen to mark taggings that we might have to | 64 | * MSB of that sucker is stolen to mark taggings that we might have to |
@@ -121,6 +123,7 @@ static struct audit_chunk *alloc_chunk(int count) | |||
121 | INIT_LIST_HEAD(&chunk->hash); | 123 | INIT_LIST_HEAD(&chunk->hash); |
122 | INIT_LIST_HEAD(&chunk->trees); | 124 | INIT_LIST_HEAD(&chunk->trees); |
123 | chunk->count = count; | 125 | chunk->count = count; |
126 | atomic_long_set(&chunk->refs, 1); | ||
124 | for (i = 0; i < count; i++) { | 127 | for (i = 0; i < count; i++) { |
125 | INIT_LIST_HEAD(&chunk->owners[i].list); | 128 | INIT_LIST_HEAD(&chunk->owners[i].list); |
126 | chunk->owners[i].index = i; | 129 | chunk->owners[i].index = i; |
@@ -129,9 +132,8 @@ static struct audit_chunk *alloc_chunk(int count) | |||
129 | return chunk; | 132 | return chunk; |
130 | } | 133 | } |
131 | 134 | ||
132 | static void __free_chunk(struct rcu_head *rcu) | 135 | static void free_chunk(struct audit_chunk *chunk) |
133 | { | 136 | { |
134 | struct audit_chunk *chunk = container_of(rcu, struct audit_chunk, head); | ||
135 | int i; | 137 | int i; |
136 | 138 | ||
137 | for (i = 0; i < chunk->count; i++) { | 139 | for (i = 0; i < chunk->count; i++) { |
@@ -141,14 +143,16 @@ static void __free_chunk(struct rcu_head *rcu) | |||
141 | kfree(chunk); | 143 | kfree(chunk); |
142 | } | 144 | } |
143 | 145 | ||
144 | static inline void free_chunk(struct audit_chunk *chunk) | 146 | void audit_put_chunk(struct audit_chunk *chunk) |
145 | { | 147 | { |
146 | call_rcu(&chunk->head, __free_chunk); | 148 | if (atomic_long_dec_and_test(&chunk->refs)) |
149 | free_chunk(chunk); | ||
147 | } | 150 | } |
148 | 151 | ||
149 | void audit_put_chunk(struct audit_chunk *chunk) | 152 | static void __put_chunk(struct rcu_head *rcu) |
150 | { | 153 | { |
151 | put_inotify_watch(&chunk->watch); | 154 | struct audit_chunk *chunk = container_of(rcu, struct audit_chunk, head); |
155 | audit_put_chunk(chunk); | ||
152 | } | 156 | } |
153 | 157 | ||
154 | enum {HASH_SIZE = 128}; | 158 | enum {HASH_SIZE = 128}; |
@@ -176,7 +180,7 @@ struct audit_chunk *audit_tree_lookup(const struct inode *inode) | |||
176 | 180 | ||
177 | list_for_each_entry_rcu(p, list, hash) { | 181 | list_for_each_entry_rcu(p, list, hash) { |
178 | if (p->watch.inode == inode) { | 182 | if (p->watch.inode == inode) { |
179 | get_inotify_watch(&p->watch); | 183 | atomic_long_inc(&p->refs); |
180 | return p; | 184 | return p; |
181 | } | 185 | } |
182 | } | 186 | } |
@@ -194,17 +198,49 @@ int audit_tree_match(struct audit_chunk *chunk, struct audit_tree *tree) | |||
194 | 198 | ||
195 | /* tagging and untagging inodes with trees */ | 199 | /* tagging and untagging inodes with trees */ |
196 | 200 | ||
197 | static void untag_chunk(struct audit_chunk *chunk, struct node *p) | 201 | static struct audit_chunk *find_chunk(struct node *p) |
202 | { | ||
203 | int index = p->index & ~(1U<<31); | ||
204 | p -= index; | ||
205 | return container_of(p, struct audit_chunk, owners[0]); | ||
206 | } | ||
207 | |||
208 | static void untag_chunk(struct node *p) | ||
198 | { | 209 | { |
210 | struct audit_chunk *chunk = find_chunk(p); | ||
199 | struct audit_chunk *new; | 211 | struct audit_chunk *new; |
200 | struct audit_tree *owner; | 212 | struct audit_tree *owner; |
201 | int size = chunk->count - 1; | 213 | int size = chunk->count - 1; |
202 | int i, j; | 214 | int i, j; |
203 | 215 | ||
216 | if (!pin_inotify_watch(&chunk->watch)) { | ||
217 | /* | ||
218 | * Filesystem is shutting down; all watches are getting | ||
219 | * evicted, just take it off the node list for this | ||
220 | * tree and let the eviction logics take care of the | ||
221 | * rest. | ||
222 | */ | ||
223 | owner = p->owner; | ||
224 | if (owner->root == chunk) { | ||
225 | list_del_init(&owner->same_root); | ||
226 | owner->root = NULL; | ||
227 | } | ||
228 | list_del_init(&p->list); | ||
229 | p->owner = NULL; | ||
230 | put_tree(owner); | ||
231 | return; | ||
232 | } | ||
233 | |||
234 | spin_unlock(&hash_lock); | ||
235 | |||
236 | /* | ||
237 | * pin_inotify_watch() succeeded, so the watch won't go away | ||
238 | * from under us. | ||
239 | */ | ||
204 | mutex_lock(&chunk->watch.inode->inotify_mutex); | 240 | mutex_lock(&chunk->watch.inode->inotify_mutex); |
205 | if (chunk->dead) { | 241 | if (chunk->dead) { |
206 | mutex_unlock(&chunk->watch.inode->inotify_mutex); | 242 | mutex_unlock(&chunk->watch.inode->inotify_mutex); |
207 | return; | 243 | goto out; |
208 | } | 244 | } |
209 | 245 | ||
210 | owner = p->owner; | 246 | owner = p->owner; |
@@ -221,7 +257,7 @@ static void untag_chunk(struct audit_chunk *chunk, struct node *p) | |||
221 | inotify_evict_watch(&chunk->watch); | 257 | inotify_evict_watch(&chunk->watch); |
222 | mutex_unlock(&chunk->watch.inode->inotify_mutex); | 258 | mutex_unlock(&chunk->watch.inode->inotify_mutex); |
223 | put_inotify_watch(&chunk->watch); | 259 | put_inotify_watch(&chunk->watch); |
224 | return; | 260 | goto out; |
225 | } | 261 | } |
226 | 262 | ||
227 | new = alloc_chunk(size); | 263 | new = alloc_chunk(size); |
@@ -263,7 +299,7 @@ static void untag_chunk(struct audit_chunk *chunk, struct node *p) | |||
263 | inotify_evict_watch(&chunk->watch); | 299 | inotify_evict_watch(&chunk->watch); |
264 | mutex_unlock(&chunk->watch.inode->inotify_mutex); | 300 | mutex_unlock(&chunk->watch.inode->inotify_mutex); |
265 | put_inotify_watch(&chunk->watch); | 301 | put_inotify_watch(&chunk->watch); |
266 | return; | 302 | goto out; |
267 | 303 | ||
268 | Fallback: | 304 | Fallback: |
269 | // do the best we can | 305 | // do the best we can |
@@ -277,6 +313,9 @@ Fallback: | |||
277 | put_tree(owner); | 313 | put_tree(owner); |
278 | spin_unlock(&hash_lock); | 314 | spin_unlock(&hash_lock); |
279 | mutex_unlock(&chunk->watch.inode->inotify_mutex); | 315 | mutex_unlock(&chunk->watch.inode->inotify_mutex); |
316 | out: | ||
317 | unpin_inotify_watch(&chunk->watch); | ||
318 | spin_lock(&hash_lock); | ||
280 | } | 319 | } |
281 | 320 | ||
282 | static int create_chunk(struct inode *inode, struct audit_tree *tree) | 321 | static int create_chunk(struct inode *inode, struct audit_tree *tree) |
@@ -387,13 +426,6 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree) | |||
387 | return 0; | 426 | return 0; |
388 | } | 427 | } |
389 | 428 | ||
390 | static struct audit_chunk *find_chunk(struct node *p) | ||
391 | { | ||
392 | int index = p->index & ~(1U<<31); | ||
393 | p -= index; | ||
394 | return container_of(p, struct audit_chunk, owners[0]); | ||
395 | } | ||
396 | |||
397 | static void kill_rules(struct audit_tree *tree) | 429 | static void kill_rules(struct audit_tree *tree) |
398 | { | 430 | { |
399 | struct audit_krule *rule, *next; | 431 | struct audit_krule *rule, *next; |
@@ -431,17 +463,10 @@ static void prune_one(struct audit_tree *victim) | |||
431 | spin_lock(&hash_lock); | 463 | spin_lock(&hash_lock); |
432 | while (!list_empty(&victim->chunks)) { | 464 | while (!list_empty(&victim->chunks)) { |
433 | struct node *p; | 465 | struct node *p; |
434 | struct audit_chunk *chunk; | ||
435 | 466 | ||
436 | p = list_entry(victim->chunks.next, struct node, list); | 467 | p = list_entry(victim->chunks.next, struct node, list); |
437 | chunk = find_chunk(p); | ||
438 | get_inotify_watch(&chunk->watch); | ||
439 | spin_unlock(&hash_lock); | ||
440 | |||
441 | untag_chunk(chunk, p); | ||
442 | 468 | ||
443 | put_inotify_watch(&chunk->watch); | 469 | untag_chunk(p); |
444 | spin_lock(&hash_lock); | ||
445 | } | 470 | } |
446 | spin_unlock(&hash_lock); | 471 | spin_unlock(&hash_lock); |
447 | put_tree(victim); | 472 | put_tree(victim); |
@@ -469,7 +494,6 @@ static void trim_marked(struct audit_tree *tree) | |||
469 | 494 | ||
470 | while (!list_empty(&tree->chunks)) { | 495 | while (!list_empty(&tree->chunks)) { |
471 | struct node *node; | 496 | struct node *node; |
472 | struct audit_chunk *chunk; | ||
473 | 497 | ||
474 | node = list_entry(tree->chunks.next, struct node, list); | 498 | node = list_entry(tree->chunks.next, struct node, list); |
475 | 499 | ||
@@ -477,14 +501,7 @@ static void trim_marked(struct audit_tree *tree) | |||
477 | if (!(node->index & (1U<<31))) | 501 | if (!(node->index & (1U<<31))) |
478 | break; | 502 | break; |
479 | 503 | ||
480 | chunk = find_chunk(node); | 504 | untag_chunk(node); |
481 | get_inotify_watch(&chunk->watch); | ||
482 | spin_unlock(&hash_lock); | ||
483 | |||
484 | untag_chunk(chunk, node); | ||
485 | |||
486 | put_inotify_watch(&chunk->watch); | ||
487 | spin_lock(&hash_lock); | ||
488 | } | 505 | } |
489 | if (!tree->root && !tree->goner) { | 506 | if (!tree->root && !tree->goner) { |
490 | tree->goner = 1; | 507 | tree->goner = 1; |
@@ -878,7 +895,7 @@ static void handle_event(struct inotify_watch *watch, u32 wd, u32 mask, | |||
878 | static void destroy_watch(struct inotify_watch *watch) | 895 | static void destroy_watch(struct inotify_watch *watch) |
879 | { | 896 | { |
880 | struct audit_chunk *chunk = container_of(watch, struct audit_chunk, watch); | 897 | struct audit_chunk *chunk = container_of(watch, struct audit_chunk, watch); |
881 | free_chunk(chunk); | 898 | call_rcu(&chunk->head, __put_chunk); |
882 | } | 899 | } |
883 | 900 | ||
884 | static const struct inotify_operations rtree_inotify_ops = { | 901 | static const struct inotify_operations rtree_inotify_ops = { |
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index b7d354e2b0ef..9fd85a4640a0 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
@@ -1094,8 +1094,8 @@ static void audit_inotify_unregister(struct list_head *in_list) | |||
1094 | list_for_each_entry_safe(p, n, in_list, ilist) { | 1094 | list_for_each_entry_safe(p, n, in_list, ilist) { |
1095 | list_del(&p->ilist); | 1095 | list_del(&p->ilist); |
1096 | inotify_rm_watch(audit_ih, &p->wdata); | 1096 | inotify_rm_watch(audit_ih, &p->wdata); |
1097 | /* the put matching the get in audit_do_del_rule() */ | 1097 | /* the unpin matching the pin in audit_do_del_rule() */ |
1098 | put_inotify_watch(&p->wdata); | 1098 | unpin_inotify_watch(&p->wdata); |
1099 | } | 1099 | } |
1100 | } | 1100 | } |
1101 | 1101 | ||
@@ -1389,9 +1389,13 @@ static inline int audit_del_rule(struct audit_entry *entry, | |||
1389 | /* Put parent on the inotify un-registration | 1389 | /* Put parent on the inotify un-registration |
1390 | * list. Grab a reference before releasing | 1390 | * list. Grab a reference before releasing |
1391 | * audit_filter_mutex, to be released in | 1391 | * audit_filter_mutex, to be released in |
1392 | * audit_inotify_unregister(). */ | 1392 | * audit_inotify_unregister(). |
1393 | list_add(&parent->ilist, &inotify_list); | 1393 | * If filesystem is going away, just leave |
1394 | get_inotify_watch(&parent->wdata); | 1394 | * the sucker alone, eviction will take |
1395 | * care of it. | ||
1396 | */ | ||
1397 | if (pin_inotify_watch(&parent->wdata)) | ||
1398 | list_add(&parent->ilist, &inotify_list); | ||
1395 | } | 1399 | } |
1396 | } | 1400 | } |
1397 | } | 1401 | } |
diff --git a/kernel/exit.c b/kernel/exit.c index ae2b92be5fae..2d8be7ebb0f7 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/cn_proc.h> | 40 | #include <linux/cn_proc.h> |
41 | #include <linux/mutex.h> | 41 | #include <linux/mutex.h> |
42 | #include <linux/futex.h> | 42 | #include <linux/futex.h> |
43 | #include <linux/compat.h> | ||
44 | #include <linux/pipe_fs_i.h> | 43 | #include <linux/pipe_fs_i.h> |
45 | #include <linux/audit.h> /* for audit_free() */ | 44 | #include <linux/audit.h> /* for audit_free() */ |
46 | #include <linux/resource.h> | 45 | #include <linux/resource.h> |
@@ -1059,14 +1058,6 @@ NORET_TYPE void do_exit(long code) | |||
1059 | exit_itimers(tsk->signal); | 1058 | exit_itimers(tsk->signal); |
1060 | } | 1059 | } |
1061 | acct_collect(code, group_dead); | 1060 | acct_collect(code, group_dead); |
1062 | #ifdef CONFIG_FUTEX | ||
1063 | if (unlikely(tsk->robust_list)) | ||
1064 | exit_robust_list(tsk); | ||
1065 | #ifdef CONFIG_COMPAT | ||
1066 | if (unlikely(tsk->compat_robust_list)) | ||
1067 | compat_exit_robust_list(tsk); | ||
1068 | #endif | ||
1069 | #endif | ||
1070 | if (group_dead) | 1061 | if (group_dead) |
1071 | tty_audit_exit(); | 1062 | tty_audit_exit(); |
1072 | if (unlikely(tsk->audit_context)) | 1063 | if (unlikely(tsk->audit_context)) |
diff --git a/kernel/fork.c b/kernel/fork.c index f6083561dfe0..2a372a0e206f 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/jiffies.h> | 40 | #include <linux/jiffies.h> |
41 | #include <linux/tracehook.h> | 41 | #include <linux/tracehook.h> |
42 | #include <linux/futex.h> | 42 | #include <linux/futex.h> |
43 | #include <linux/compat.h> | ||
43 | #include <linux/task_io_accounting_ops.h> | 44 | #include <linux/task_io_accounting_ops.h> |
44 | #include <linux/rcupdate.h> | 45 | #include <linux/rcupdate.h> |
45 | #include <linux/ptrace.h> | 46 | #include <linux/ptrace.h> |
@@ -519,6 +520,16 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) | |||
519 | { | 520 | { |
520 | struct completion *vfork_done = tsk->vfork_done; | 521 | struct completion *vfork_done = tsk->vfork_done; |
521 | 522 | ||
523 | /* Get rid of any futexes when releasing the mm */ | ||
524 | #ifdef CONFIG_FUTEX | ||
525 | if (unlikely(tsk->robust_list)) | ||
526 | exit_robust_list(tsk); | ||
527 | #ifdef CONFIG_COMPAT | ||
528 | if (unlikely(tsk->compat_robust_list)) | ||
529 | compat_exit_robust_list(tsk); | ||
530 | #endif | ||
531 | #endif | ||
532 | |||
522 | /* Get rid of any cached register state */ | 533 | /* Get rid of any cached register state */ |
523 | deactivate_mm(tsk, mm); | 534 | deactivate_mm(tsk, mm); |
524 | 535 | ||
diff --git a/mm/vmscan.c b/mm/vmscan.c index 3b5860294bb6..c141b3e78071 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -2368,39 +2368,6 @@ int page_evictable(struct page *page, struct vm_area_struct *vma) | |||
2368 | return 1; | 2368 | return 1; |
2369 | } | 2369 | } |
2370 | 2370 | ||
2371 | static void show_page_path(struct page *page) | ||
2372 | { | ||
2373 | char buf[256]; | ||
2374 | if (page_is_file_cache(page)) { | ||
2375 | struct address_space *mapping = page->mapping; | ||
2376 | struct dentry *dentry; | ||
2377 | pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); | ||
2378 | |||
2379 | spin_lock(&mapping->i_mmap_lock); | ||
2380 | dentry = d_find_alias(mapping->host); | ||
2381 | printk(KERN_INFO "rescued: %s %lu\n", | ||
2382 | dentry_path(dentry, buf, 256), pgoff); | ||
2383 | spin_unlock(&mapping->i_mmap_lock); | ||
2384 | } else { | ||
2385 | #if defined(CONFIG_MM_OWNER) && defined(CONFIG_MMU) | ||
2386 | struct anon_vma *anon_vma; | ||
2387 | struct vm_area_struct *vma; | ||
2388 | |||
2389 | anon_vma = page_lock_anon_vma(page); | ||
2390 | if (!anon_vma) | ||
2391 | return; | ||
2392 | |||
2393 | list_for_each_entry(vma, &anon_vma->head, anon_vma_node) { | ||
2394 | printk(KERN_INFO "rescued: anon %s\n", | ||
2395 | vma->vm_mm->owner->comm); | ||
2396 | break; | ||
2397 | } | ||
2398 | page_unlock_anon_vma(anon_vma); | ||
2399 | #endif | ||
2400 | } | ||
2401 | } | ||
2402 | |||
2403 | |||
2404 | /** | 2371 | /** |
2405 | * check_move_unevictable_page - check page for evictability and move to appropriate zone lru list | 2372 | * check_move_unevictable_page - check page for evictability and move to appropriate zone lru list |
2406 | * @page: page to check evictability and move to appropriate lru list | 2373 | * @page: page to check evictability and move to appropriate lru list |
@@ -2421,8 +2388,6 @@ retry: | |||
2421 | if (page_evictable(page, NULL)) { | 2388 | if (page_evictable(page, NULL)) { |
2422 | enum lru_list l = LRU_INACTIVE_ANON + page_is_file_cache(page); | 2389 | enum lru_list l = LRU_INACTIVE_ANON + page_is_file_cache(page); |
2423 | 2390 | ||
2424 | show_page_path(page); | ||
2425 | |||
2426 | __dec_zone_state(zone, NR_UNEVICTABLE); | 2391 | __dec_zone_state(zone, NR_UNEVICTABLE); |
2427 | list_move(&page->lru, &zone->lru[l].list); | 2392 | list_move(&page->lru, &zone->lru[l].list); |
2428 | __inc_zone_state(zone, NR_INACTIVE_ANON + l); | 2393 | __inc_zone_state(zone, NR_INACTIVE_ANON + l); |
diff --git a/net/9p/Kconfig b/net/9p/Kconfig index c42c0c400bf9..0663f99e977a 100644 --- a/net/9p/Kconfig +++ b/net/9p/Kconfig | |||
@@ -13,22 +13,24 @@ menuconfig NET_9P | |||
13 | 13 | ||
14 | If unsure, say N. | 14 | If unsure, say N. |
15 | 15 | ||
16 | if NET_9P | ||
17 | |||
16 | config NET_9P_VIRTIO | 18 | config NET_9P_VIRTIO |
17 | depends on NET_9P && EXPERIMENTAL && VIRTIO | 19 | depends on EXPERIMENTAL && VIRTIO |
18 | tristate "9P Virtio Transport (Experimental)" | 20 | tristate "9P Virtio Transport (Experimental)" |
19 | help | 21 | help |
20 | This builds support for a transports between | 22 | This builds support for a transports between |
21 | guest partitions and a host partition. | 23 | guest partitions and a host partition. |
22 | 24 | ||
23 | config NET_9P_RDMA | 25 | config NET_9P_RDMA |
24 | depends on NET_9P && INFINIBAND && EXPERIMENTAL | 26 | depends on INET && INFINIBAND && EXPERIMENTAL |
25 | tristate "9P RDMA Transport (Experimental)" | 27 | tristate "9P RDMA Transport (Experimental)" |
26 | help | 28 | help |
27 | This builds support for a RDMA transport. | 29 | This builds support for an RDMA transport. |
28 | 30 | ||
29 | config NET_9P_DEBUG | 31 | config NET_9P_DEBUG |
30 | bool "Debug information" | 32 | bool "Debug information" |
31 | depends on NET_9P | ||
32 | help | 33 | help |
33 | Say Y if you want the 9P subsystem to log debug information. | 34 | Say Y if you want the 9P subsystem to log debug information. |
34 | 35 | ||
36 | endif | ||