diff options
179 files changed, 1742 insertions, 724 deletions
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl index ba9975771503..ff3e5bec1c24 100644 --- a/Documentation/DocBook/libata.tmpl +++ b/Documentation/DocBook/libata.tmpl | |||
@@ -107,10 +107,6 @@ void (*dev_config) (struct ata_port *, struct ata_device *); | |||
107 | issue of SET FEATURES - XFER MODE, and prior to operation. | 107 | issue of SET FEATURES - XFER MODE, and prior to operation. |
108 | </para> | 108 | </para> |
109 | <para> | 109 | <para> |
110 | Called by ata_device_add() after ata_dev_identify() determines | ||
111 | a device is present. | ||
112 | </para> | ||
113 | <para> | ||
114 | This entry may be specified as NULL in ata_port_operations. | 110 | This entry may be specified as NULL in ata_port_operations. |
115 | </para> | 111 | </para> |
116 | 112 | ||
@@ -154,8 +150,8 @@ unsigned int (*mode_filter) (struct ata_port *, struct ata_device *, unsigned in | |||
154 | 150 | ||
155 | <sect2><title>Taskfile read/write</title> | 151 | <sect2><title>Taskfile read/write</title> |
156 | <programlisting> | 152 | <programlisting> |
157 | void (*tf_load) (struct ata_port *ap, struct ata_taskfile *tf); | 153 | void (*sff_tf_load) (struct ata_port *ap, struct ata_taskfile *tf); |
158 | void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); | 154 | void (*sff_tf_read) (struct ata_port *ap, struct ata_taskfile *tf); |
159 | </programlisting> | 155 | </programlisting> |
160 | 156 | ||
161 | <para> | 157 | <para> |
@@ -164,36 +160,35 @@ void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); | |||
164 | hardware registers / DMA buffers, to obtain the current set of | 160 | hardware registers / DMA buffers, to obtain the current set of |
165 | taskfile register values. | 161 | taskfile register values. |
166 | Most drivers for taskfile-based hardware (PIO or MMIO) use | 162 | Most drivers for taskfile-based hardware (PIO or MMIO) use |
167 | ata_tf_load() and ata_tf_read() for these hooks. | 163 | ata_sff_tf_load() and ata_sff_tf_read() for these hooks. |
168 | </para> | 164 | </para> |
169 | 165 | ||
170 | </sect2> | 166 | </sect2> |
171 | 167 | ||
172 | <sect2><title>PIO data read/write</title> | 168 | <sect2><title>PIO data read/write</title> |
173 | <programlisting> | 169 | <programlisting> |
174 | void (*data_xfer) (struct ata_device *, unsigned char *, unsigned int, int); | 170 | void (*sff_data_xfer) (struct ata_device *, unsigned char *, unsigned int, int); |
175 | </programlisting> | 171 | </programlisting> |
176 | 172 | ||
177 | <para> | 173 | <para> |
178 | All bmdma-style drivers must implement this hook. This is the low-level | 174 | All bmdma-style drivers must implement this hook. This is the low-level |
179 | operation that actually copies the data bytes during a PIO data | 175 | operation that actually copies the data bytes during a PIO data |
180 | transfer. | 176 | transfer. |
181 | Typically the driver | 177 | Typically the driver will choose one of ata_sff_data_xfer_noirq(), |
182 | will choose one of ata_pio_data_xfer_noirq(), ata_pio_data_xfer(), or | 178 | ata_sff_data_xfer(), or ata_sff_data_xfer32(). |
183 | ata_mmio_data_xfer(). | ||
184 | </para> | 179 | </para> |
185 | 180 | ||
186 | </sect2> | 181 | </sect2> |
187 | 182 | ||
188 | <sect2><title>ATA command execute</title> | 183 | <sect2><title>ATA command execute</title> |
189 | <programlisting> | 184 | <programlisting> |
190 | void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); | 185 | void (*sff_exec_command)(struct ata_port *ap, struct ata_taskfile *tf); |
191 | </programlisting> | 186 | </programlisting> |
192 | 187 | ||
193 | <para> | 188 | <para> |
194 | causes an ATA command, previously loaded with | 189 | causes an ATA command, previously loaded with |
195 | ->tf_load(), to be initiated in hardware. | 190 | ->tf_load(), to be initiated in hardware. |
196 | Most drivers for taskfile-based hardware use ata_exec_command() | 191 | Most drivers for taskfile-based hardware use ata_sff_exec_command() |
197 | for this hook. | 192 | for this hook. |
198 | </para> | 193 | </para> |
199 | 194 | ||
@@ -218,8 +213,8 @@ command. | |||
218 | 213 | ||
219 | <sect2><title>Read specific ATA shadow registers</title> | 214 | <sect2><title>Read specific ATA shadow registers</title> |
220 | <programlisting> | 215 | <programlisting> |
221 | u8 (*check_status)(struct ata_port *ap); | 216 | u8 (*sff_check_status)(struct ata_port *ap); |
222 | u8 (*check_altstatus)(struct ata_port *ap); | 217 | u8 (*sff_check_altstatus)(struct ata_port *ap); |
223 | </programlisting> | 218 | </programlisting> |
224 | 219 | ||
225 | <para> | 220 | <para> |
@@ -227,20 +222,14 @@ u8 (*check_altstatus)(struct ata_port *ap); | |||
227 | hardware. On some hardware, reading the Status register has | 222 | hardware. On some hardware, reading the Status register has |
228 | the side effect of clearing the interrupt condition. | 223 | the side effect of clearing the interrupt condition. |
229 | Most drivers for taskfile-based hardware use | 224 | Most drivers for taskfile-based hardware use |
230 | ata_check_status() for this hook. | 225 | ata_sff_check_status() for this hook. |
231 | </para> | ||
232 | <para> | ||
233 | Note that because this is called from ata_device_add(), at | ||
234 | least a dummy function that clears device interrupts must be | ||
235 | provided for all drivers, even if the controller doesn't | ||
236 | actually have a taskfile status register. | ||
237 | </para> | 226 | </para> |
238 | 227 | ||
239 | </sect2> | 228 | </sect2> |
240 | 229 | ||
241 | <sect2><title>Select ATA device on bus</title> | 230 | <sect2><title>Select ATA device on bus</title> |
242 | <programlisting> | 231 | <programlisting> |
243 | void (*dev_select)(struct ata_port *ap, unsigned int device); | 232 | void (*sff_dev_select)(struct ata_port *ap, unsigned int device); |
244 | </programlisting> | 233 | </programlisting> |
245 | 234 | ||
246 | <para> | 235 | <para> |
@@ -251,9 +240,7 @@ void (*dev_select)(struct ata_port *ap, unsigned int device); | |||
251 | </para> | 240 | </para> |
252 | <para> | 241 | <para> |
253 | Most drivers for taskfile-based hardware use | 242 | Most drivers for taskfile-based hardware use |
254 | ata_std_dev_select() for this hook. Controllers which do not | 243 | ata_sff_dev_select() for this hook. |
255 | support second drives on a port (such as SATA contollers) will | ||
256 | use ata_noop_dev_select(). | ||
257 | </para> | 244 | </para> |
258 | 245 | ||
259 | </sect2> | 246 | </sect2> |
@@ -441,13 +428,13 @@ void (*irq_clear) (struct ata_port *); | |||
441 | to struct ata_host_set. | 428 | to struct ata_host_set. |
442 | </para> | 429 | </para> |
443 | <para> | 430 | <para> |
444 | Most legacy IDE drivers use ata_interrupt() for the | 431 | Most legacy IDE drivers use ata_sff_interrupt() for the |
445 | irq_handler hook, which scans all ports in the host_set, | 432 | irq_handler hook, which scans all ports in the host_set, |
446 | determines which queued command was active (if any), and calls | 433 | determines which queued command was active (if any), and calls |
447 | ata_host_intr(ap,qc). | 434 | ata_sff_host_intr(ap,qc). |
448 | </para> | 435 | </para> |
449 | <para> | 436 | <para> |
450 | Most legacy IDE drivers use ata_bmdma_irq_clear() for the | 437 | Most legacy IDE drivers use ata_sff_irq_clear() for the |
451 | irq_clear() hook, which simply clears the interrupt and error | 438 | irq_clear() hook, which simply clears the interrupt and error |
452 | flags in the DMA status register. | 439 | flags in the DMA status register. |
453 | </para> | 440 | </para> |
@@ -496,10 +483,6 @@ void (*host_stop) (struct ata_host_set *host_set); | |||
496 | data from port at this time. | 483 | data from port at this time. |
497 | </para> | 484 | </para> |
498 | <para> | 485 | <para> |
499 | Many drivers use ata_port_stop() as this hook, which frees the | ||
500 | PRD table. | ||
501 | </para> | ||
502 | <para> | ||
503 | ->host_stop() is called after all ->port_stop() calls | 486 | ->host_stop() is called after all ->port_stop() calls |
504 | have completed. The hook must finalize hardware shutdown, release DMA | 487 | have completed. The hook must finalize hardware shutdown, release DMA |
505 | and other resources, etc. | 488 | and other resources, etc. |
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index 3219ee0dbfef..5ebf5af1d716 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients | |||
@@ -74,6 +74,11 @@ structure at all. You should use this to keep device-specific data. | |||
74 | /* retrieve the value */ | 74 | /* retrieve the value */ |
75 | void *i2c_get_clientdata(const struct i2c_client *client); | 75 | void *i2c_get_clientdata(const struct i2c_client *client); |
76 | 76 | ||
77 | Note that starting with kernel 2.6.34, you don't have to set the `data' field | ||
78 | to NULL in remove() or if probe() failed anymore. The i2c-core does this | ||
79 | automatically on these occasions. Those are also the only times the core will | ||
80 | touch this field. | ||
81 | |||
77 | 82 | ||
78 | Accessing the client | 83 | Accessing the client |
79 | ==================== | 84 | ==================== |
diff --git a/Documentation/input/elantech.txt b/Documentation/input/elantech.txt index a10c3b6ba7c4..56941ae1f5db 100644 --- a/Documentation/input/elantech.txt +++ b/Documentation/input/elantech.txt | |||
@@ -333,14 +333,14 @@ byte 0: | |||
333 | byte 1: | 333 | byte 1: |
334 | 334 | ||
335 | bit 7 6 5 4 3 2 1 0 | 335 | bit 7 6 5 4 3 2 1 0 |
336 | x15 x14 x13 x12 x11 x10 x9 x8 | 336 | . . . . . x10 x9 x8 |
337 | 337 | ||
338 | byte 2: | 338 | byte 2: |
339 | 339 | ||
340 | bit 7 6 5 4 3 2 1 0 | 340 | bit 7 6 5 4 3 2 1 0 |
341 | x7 x6 x5 x4 x4 x2 x1 x0 | 341 | x7 x6 x5 x4 x4 x2 x1 x0 |
342 | 342 | ||
343 | x15..x0 = absolute x value (horizontal) | 343 | x10..x0 = absolute x value (horizontal) |
344 | 344 | ||
345 | byte 3: | 345 | byte 3: |
346 | 346 | ||
@@ -350,14 +350,14 @@ byte 3: | |||
350 | byte 4: | 350 | byte 4: |
351 | 351 | ||
352 | bit 7 6 5 4 3 2 1 0 | 352 | bit 7 6 5 4 3 2 1 0 |
353 | y15 y14 y13 y12 y11 y10 y8 y8 | 353 | . . . . . . y9 y8 |
354 | 354 | ||
355 | byte 5: | 355 | byte 5: |
356 | 356 | ||
357 | bit 7 6 5 4 3 2 1 0 | 357 | bit 7 6 5 4 3 2 1 0 |
358 | y7 y6 y5 y4 y3 y2 y1 y0 | 358 | y7 y6 y5 y4 y3 y2 y1 y0 |
359 | 359 | ||
360 | y15..y0 = absolute y value (vertical) | 360 | y9..y0 = absolute y value (vertical) |
361 | 361 | ||
362 | 362 | ||
363 | 4.2.2 Two finger touch | 363 | 4.2.2 Two finger touch |
diff --git a/Documentation/spi/spidev_test.c b/Documentation/spi/spidev_test.c index 10abd3773e49..16feda901469 100644 --- a/Documentation/spi/spidev_test.c +++ b/Documentation/spi/spidev_test.c | |||
@@ -58,7 +58,7 @@ static void transfer(int fd) | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); | 60 | ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr); |
61 | if (ret == 1) | 61 | if (ret < 1) |
62 | pabort("can't send spi message"); | 62 | pabort("can't send spi message"); |
63 | 63 | ||
64 | for (ret = 0; ret < ARRAY_SIZE(tx); ret++) { | 64 | for (ret = 0; ret < ARRAY_SIZE(tx); ret++) { |
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index 568578db93b6..876ca8d5e927 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h | |||
@@ -46,7 +46,7 @@ struct ehci_hcd_omap_platform_data { | |||
46 | struct omap_musb_board_data { | 46 | struct omap_musb_board_data { |
47 | u8 interface_type; | 47 | u8 interface_type; |
48 | u8 mode; | 48 | u8 mode; |
49 | u8 power; | 49 | u16 power; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; | 52 | enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 29e86923d1bf..7e6fd1cbd3f8 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -49,7 +49,7 @@ config AR7 | |||
49 | family: TNETD7100, 7200 and 7300. | 49 | family: TNETD7100, 7200 and 7300. |
50 | 50 | ||
51 | config BCM47XX | 51 | config BCM47XX |
52 | bool "BCM47XX based boards" | 52 | bool "Broadcom BCM47XX based boards" |
53 | select CEVT_R4K | 53 | select CEVT_R4K |
54 | select CSRC_R4K | 54 | select CSRC_R4K |
55 | select DMA_NONCOHERENT | 55 | select DMA_NONCOHERENT |
@@ -509,6 +509,7 @@ config SIBYTE_SWARM | |||
509 | bool "Sibyte BCM91250A-SWARM" | 509 | bool "Sibyte BCM91250A-SWARM" |
510 | select BOOT_ELF32 | 510 | select BOOT_ELF32 |
511 | select DMA_COHERENT | 511 | select DMA_COHERENT |
512 | select HAVE_PATA_PLATFORM | ||
512 | select NR_CPUS_DEFAULT_2 | 513 | select NR_CPUS_DEFAULT_2 |
513 | select SIBYTE_SB1250 | 514 | select SIBYTE_SB1250 |
514 | select SWAP_IO_SPACE | 515 | select SWAP_IO_SPACE |
@@ -523,6 +524,7 @@ config SIBYTE_LITTLESUR | |||
523 | depends on EXPERIMENTAL | 524 | depends on EXPERIMENTAL |
524 | select BOOT_ELF32 | 525 | select BOOT_ELF32 |
525 | select DMA_COHERENT | 526 | select DMA_COHERENT |
527 | select HAVE_PATA_PLATFORM | ||
526 | select NR_CPUS_DEFAULT_2 | 528 | select NR_CPUS_DEFAULT_2 |
527 | select SIBYTE_SB1250 | 529 | select SIBYTE_SB1250 |
528 | select SWAP_IO_SPACE | 530 | select SWAP_IO_SPACE |
@@ -1305,6 +1307,33 @@ config CPU_CAVIUM_OCTEON | |||
1305 | 1307 | ||
1306 | endchoice | 1308 | endchoice |
1307 | 1309 | ||
1310 | if CPU_LOONGSON2F | ||
1311 | config CPU_NOP_WORKAROUNDS | ||
1312 | bool | ||
1313 | |||
1314 | config CPU_JUMP_WORKAROUNDS | ||
1315 | bool | ||
1316 | |||
1317 | config CPU_LOONGSON2F_WORKAROUNDS | ||
1318 | bool "Loongson 2F Workarounds" | ||
1319 | default y | ||
1320 | select CPU_NOP_WORKAROUNDS | ||
1321 | select CPU_JUMP_WORKAROUNDS | ||
1322 | help | ||
1323 | Loongson 2F01 / 2F02 processors have the NOP & JUMP issues which | ||
1324 | require workarounds. Without workarounds the system may hang | ||
1325 | unexpectedly. For more information please refer to the gas | ||
1326 | -mfix-loongson2f-nop and -mfix-loongson2f-jump options. | ||
1327 | |||
1328 | Loongson 2F03 and later have fixed these issues and no workarounds | ||
1329 | are needed. The workarounds have no significant side effect on them | ||
1330 | but may decrease the performance of the system so this option should | ||
1331 | be disabled unless the kernel is intended to be run on 2F01 or 2F02 | ||
1332 | systems. | ||
1333 | |||
1334 | If unsure, please say Y. | ||
1335 | endif # CPU_LOONGSON2F | ||
1336 | |||
1308 | config SYS_SUPPORTS_ZBOOT | 1337 | config SYS_SUPPORTS_ZBOOT |
1309 | bool | 1338 | bool |
1310 | select HAVE_KERNEL_GZIP | 1339 | select HAVE_KERNEL_GZIP |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 2f2eac233322..0b9c01add0a0 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -136,6 +136,19 @@ cflags-$(CONFIG_CPU_LOONGSON2E) += \ | |||
136 | $(call cc-option,-march=loongson2e,-march=r4600) | 136 | $(call cc-option,-march=loongson2e,-march=r4600) |
137 | cflags-$(CONFIG_CPU_LOONGSON2F) += \ | 137 | cflags-$(CONFIG_CPU_LOONGSON2F) += \ |
138 | $(call cc-option,-march=loongson2f,-march=r4600) | 138 | $(call cc-option,-march=loongson2f,-march=r4600) |
139 | # enable the workarounds for loongson2f | ||
140 | ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS | ||
141 | ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),) | ||
142 | $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop) | ||
143 | else | ||
144 | cflags-$(CONFIG_CPU_NOP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-nop | ||
145 | endif | ||
146 | ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-jump,),) | ||
147 | $(error only binutils >= 2.20.2 have needed option -mfix-loongson2f-jump) | ||
148 | else | ||
149 | cflags-$(CONFIG_CPU_JUMP_WORKAROUNDS) += -Wa$(comma)-mfix-loongson2f-jump | ||
150 | endif | ||
151 | endif | ||
139 | 152 | ||
140 | cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ | 153 | cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \ |
141 | -Wa,-mips32 -Wa,--trap | 154 | -Wa,-mips32 -Wa,--trap |
diff --git a/arch/mips/alchemy/devboards/db1200/setup.c b/arch/mips/alchemy/devboards/db1200/setup.c index be7e92ea01f3..887619547553 100644 --- a/arch/mips/alchemy/devboards/db1200/setup.c +++ b/arch/mips/alchemy/devboards/db1200/setup.c | |||
@@ -66,12 +66,16 @@ static int __init db1200_arch_init(void) | |||
66 | set_irq_type(AU1200_GPIO7_INT, IRQF_TRIGGER_LOW); | 66 | set_irq_type(AU1200_GPIO7_INT, IRQF_TRIGGER_LOW); |
67 | bcsr_init_irq(DB1200_INT_BEGIN, DB1200_INT_END, AU1200_GPIO7_INT); | 67 | bcsr_init_irq(DB1200_INT_BEGIN, DB1200_INT_END, AU1200_GPIO7_INT); |
68 | 68 | ||
69 | /* do not autoenable these: CPLD has broken edge int handling, | 69 | /* insert/eject pairs: one of both is always screaming. To avoid |
70 | * and the CD handler setup requires manual enabling to work | 70 | * issues they must not be automatically enabled when initially |
71 | * around that. | 71 | * requested. |
72 | */ | 72 | */ |
73 | irq_to_desc(DB1200_SD0_INSERT_INT)->status |= IRQ_NOAUTOEN; | 73 | irq_to_desc(DB1200_SD0_INSERT_INT)->status |= IRQ_NOAUTOEN; |
74 | irq_to_desc(DB1200_SD0_EJECT_INT)->status |= IRQ_NOAUTOEN; | 74 | irq_to_desc(DB1200_SD0_EJECT_INT)->status |= IRQ_NOAUTOEN; |
75 | irq_to_desc(DB1200_PC0_INSERT_INT)->status |= IRQ_NOAUTOEN; | ||
76 | irq_to_desc(DB1200_PC0_EJECT_INT)->status |= IRQ_NOAUTOEN; | ||
77 | irq_to_desc(DB1200_PC1_INSERT_INT)->status |= IRQ_NOAUTOEN; | ||
78 | irq_to_desc(DB1200_PC1_EJECT_INT)->status |= IRQ_NOAUTOEN; | ||
75 | 79 | ||
76 | return 0; | 80 | return 0; |
77 | } | 81 | } |
diff --git a/arch/mips/configs/bcm63xx_defconfig b/arch/mips/configs/bcm63xx_defconfig index 7fee0273c829..6389ca0fdc6c 100644 --- a/arch/mips/configs/bcm63xx_defconfig +++ b/arch/mips/configs/bcm63xx_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.30-rc6 | 3 | # Linux kernel version: 2.6.34-rc2 |
4 | # Sun May 31 20:17:18 2009 | 4 | # Tue Mar 23 10:36:32 2010 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | 7 | ||
@@ -9,13 +9,14 @@ CONFIG_MIPS=y | |||
9 | # Machine selection | 9 | # Machine selection |
10 | # | 10 | # |
11 | # CONFIG_MACH_ALCHEMY is not set | 11 | # CONFIG_MACH_ALCHEMY is not set |
12 | # CONFIG_AR7 is not set | ||
12 | # CONFIG_BCM47XX is not set | 13 | # CONFIG_BCM47XX is not set |
13 | CONFIG_BCM63XX=y | 14 | CONFIG_BCM63XX=y |
14 | # CONFIG_MIPS_COBALT is not set | 15 | # CONFIG_MIPS_COBALT is not set |
15 | # CONFIG_MACH_DECSTATION is not set | 16 | # CONFIG_MACH_DECSTATION is not set |
16 | # CONFIG_MACH_JAZZ is not set | 17 | # CONFIG_MACH_JAZZ is not set |
17 | # CONFIG_LASAT is not set | 18 | # CONFIG_LASAT is not set |
18 | # CONFIG_LEMOTE_FULONG is not set | 19 | # CONFIG_MACH_LOONGSON is not set |
19 | # CONFIG_MIPS_MALTA is not set | 20 | # CONFIG_MIPS_MALTA is not set |
20 | # CONFIG_MIPS_SIM is not set | 21 | # CONFIG_MIPS_SIM is not set |
21 | # CONFIG_NEC_MARKEINS is not set | 22 | # CONFIG_NEC_MARKEINS is not set |
@@ -26,6 +27,7 @@ CONFIG_BCM63XX=y | |||
26 | # CONFIG_PNX8550_STB810 is not set | 27 | # CONFIG_PNX8550_STB810 is not set |
27 | # CONFIG_PMC_MSP is not set | 28 | # CONFIG_PMC_MSP is not set |
28 | # CONFIG_PMC_YOSEMITE is not set | 29 | # CONFIG_PMC_YOSEMITE is not set |
30 | # CONFIG_POWERTV is not set | ||
29 | # CONFIG_SGI_IP22 is not set | 31 | # CONFIG_SGI_IP22 is not set |
30 | # CONFIG_SGI_IP27 is not set | 32 | # CONFIG_SGI_IP27 is not set |
31 | # CONFIG_SGI_IP28 is not set | 33 | # CONFIG_SGI_IP28 is not set |
@@ -45,13 +47,17 @@ CONFIG_BCM63XX=y | |||
45 | # CONFIG_WR_PPMC is not set | 47 | # CONFIG_WR_PPMC is not set |
46 | # CONFIG_CAVIUM_OCTEON_SIMULATOR is not set | 48 | # CONFIG_CAVIUM_OCTEON_SIMULATOR is not set |
47 | # CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set | 49 | # CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set |
50 | # CONFIG_ALCHEMY_GPIO_INDIRECT is not set | ||
48 | 51 | ||
49 | # | 52 | # |
50 | # CPU support | 53 | # CPU support |
51 | # | 54 | # |
55 | CONFIG_BCM63XX_CPU_6338=y | ||
56 | CONFIG_BCM63XX_CPU_6345=y | ||
52 | CONFIG_BCM63XX_CPU_6348=y | 57 | CONFIG_BCM63XX_CPU_6348=y |
53 | CONFIG_BCM63XX_CPU_6358=y | 58 | CONFIG_BCM63XX_CPU_6358=y |
54 | CONFIG_BOARD_BCM963XX=y | 59 | CONFIG_BOARD_BCM963XX=y |
60 | CONFIG_LOONGSON_UART_BASE=y | ||
55 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 61 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
56 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 62 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
57 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 63 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
@@ -69,10 +75,8 @@ CONFIG_CEVT_R4K=y | |||
69 | CONFIG_CSRC_R4K_LIB=y | 75 | CONFIG_CSRC_R4K_LIB=y |
70 | CONFIG_CSRC_R4K=y | 76 | CONFIG_CSRC_R4K=y |
71 | CONFIG_DMA_NONCOHERENT=y | 77 | CONFIG_DMA_NONCOHERENT=y |
72 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | 78 | CONFIG_NEED_DMA_MAP_STATE=y |
73 | CONFIG_EARLY_PRINTK=y | ||
74 | CONFIG_SYS_HAS_EARLY_PRINTK=y | 79 | CONFIG_SYS_HAS_EARLY_PRINTK=y |
75 | # CONFIG_HOTPLUG_CPU is not set | ||
76 | # CONFIG_NO_IOPORT is not set | 80 | # CONFIG_NO_IOPORT is not set |
77 | CONFIG_GENERIC_GPIO=y | 81 | CONFIG_GENERIC_GPIO=y |
78 | CONFIG_CPU_BIG_ENDIAN=y | 82 | CONFIG_CPU_BIG_ENDIAN=y |
@@ -85,7 +89,8 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 | |||
85 | # | 89 | # |
86 | # CPU selection | 90 | # CPU selection |
87 | # | 91 | # |
88 | # CONFIG_CPU_LOONGSON2 is not set | 92 | # CONFIG_CPU_LOONGSON2E is not set |
93 | # CONFIG_CPU_LOONGSON2F is not set | ||
89 | CONFIG_CPU_MIPS32_R1=y | 94 | CONFIG_CPU_MIPS32_R1=y |
90 | # CONFIG_CPU_MIPS32_R2 is not set | 95 | # CONFIG_CPU_MIPS32_R2 is not set |
91 | # CONFIG_CPU_MIPS64_R1 is not set | 96 | # CONFIG_CPU_MIPS64_R1 is not set |
@@ -128,7 +133,7 @@ CONFIG_CPU_HAS_PREFETCH=y | |||
128 | CONFIG_MIPS_MT_DISABLED=y | 133 | CONFIG_MIPS_MT_DISABLED=y |
129 | # CONFIG_MIPS_MT_SMP is not set | 134 | # CONFIG_MIPS_MT_SMP is not set |
130 | # CONFIG_MIPS_MT_SMTC is not set | 135 | # CONFIG_MIPS_MT_SMTC is not set |
131 | CONFIG_CPU_HAS_LLSC=y | 136 | # CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set |
132 | CONFIG_CPU_HAS_SYNC=y | 137 | CONFIG_CPU_HAS_SYNC=y |
133 | CONFIG_GENERIC_HARDIRQS=y | 138 | CONFIG_GENERIC_HARDIRQS=y |
134 | CONFIG_GENERIC_IRQ_PROBE=y | 139 | CONFIG_GENERIC_IRQ_PROBE=y |
@@ -146,9 +151,8 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
146 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 151 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
147 | CONFIG_ZONE_DMA_FLAG=0 | 152 | CONFIG_ZONE_DMA_FLAG=0 |
148 | CONFIG_VIRT_TO_BUS=y | 153 | CONFIG_VIRT_TO_BUS=y |
149 | CONFIG_UNEVICTABLE_LRU=y | 154 | # CONFIG_KSM is not set |
150 | CONFIG_HAVE_MLOCK=y | 155 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 |
151 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
152 | CONFIG_TICK_ONESHOT=y | 156 | CONFIG_TICK_ONESHOT=y |
153 | CONFIG_NO_HZ=y | 157 | CONFIG_NO_HZ=y |
154 | # CONFIG_HIGH_RES_TIMERS is not set | 158 | # CONFIG_HIGH_RES_TIMERS is not set |
@@ -170,6 +174,7 @@ CONFIG_PREEMPT_NONE=y | |||
170 | CONFIG_LOCKDEP_SUPPORT=y | 174 | CONFIG_LOCKDEP_SUPPORT=y |
171 | CONFIG_STACKTRACE_SUPPORT=y | 175 | CONFIG_STACKTRACE_SUPPORT=y |
172 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 176 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
177 | CONFIG_CONSTRUCTORS=y | ||
173 | 178 | ||
174 | # | 179 | # |
175 | # General setup | 180 | # General setup |
@@ -189,15 +194,12 @@ CONFIG_LOCALVERSION="" | |||
189 | # | 194 | # |
190 | # RCU Subsystem | 195 | # RCU Subsystem |
191 | # | 196 | # |
192 | CONFIG_CLASSIC_RCU=y | ||
193 | # CONFIG_TREE_RCU is not set | 197 | # CONFIG_TREE_RCU is not set |
194 | # CONFIG_PREEMPT_RCU is not set | 198 | # CONFIG_TREE_PREEMPT_RCU is not set |
199 | CONFIG_TINY_RCU=y | ||
195 | # CONFIG_TREE_RCU_TRACE is not set | 200 | # CONFIG_TREE_RCU_TRACE is not set |
196 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
197 | # CONFIG_IKCONFIG is not set | 201 | # CONFIG_IKCONFIG is not set |
198 | CONFIG_LOG_BUF_SHIFT=17 | 202 | CONFIG_LOG_BUF_SHIFT=17 |
199 | # CONFIG_GROUP_SCHED is not set | ||
200 | # CONFIG_CGROUPS is not set | ||
201 | CONFIG_SYSFS_DEPRECATED=y | 203 | CONFIG_SYSFS_DEPRECATED=y |
202 | CONFIG_SYSFS_DEPRECATED_V2=y | 204 | CONFIG_SYSFS_DEPRECATED_V2=y |
203 | # CONFIG_RELAY is not set | 205 | # CONFIG_RELAY is not set |
@@ -205,11 +207,11 @@ CONFIG_SYSFS_DEPRECATED_V2=y | |||
205 | # CONFIG_BLK_DEV_INITRD is not set | 207 | # CONFIG_BLK_DEV_INITRD is not set |
206 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 208 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
207 | CONFIG_SYSCTL=y | 209 | CONFIG_SYSCTL=y |
210 | CONFIG_ANON_INODES=y | ||
208 | CONFIG_EMBEDDED=y | 211 | CONFIG_EMBEDDED=y |
209 | CONFIG_SYSCTL_SYSCALL=y | 212 | CONFIG_SYSCTL_SYSCALL=y |
210 | CONFIG_KALLSYMS=y | 213 | CONFIG_KALLSYMS=y |
211 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 214 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
212 | # CONFIG_STRIP_ASM_SYMS is not set | ||
213 | CONFIG_HOTPLUG=y | 215 | CONFIG_HOTPLUG=y |
214 | CONFIG_PRINTK=y | 216 | CONFIG_PRINTK=y |
215 | CONFIG_BUG=y | 217 | CONFIG_BUG=y |
@@ -223,6 +225,10 @@ CONFIG_BASE_FULL=y | |||
223 | # CONFIG_EVENTFD is not set | 225 | # CONFIG_EVENTFD is not set |
224 | # CONFIG_SHMEM is not set | 226 | # CONFIG_SHMEM is not set |
225 | # CONFIG_AIO is not set | 227 | # CONFIG_AIO is not set |
228 | |||
229 | # | ||
230 | # Kernel Performance Events And Counters | ||
231 | # | ||
226 | # CONFIG_VM_EVENT_COUNTERS is not set | 232 | # CONFIG_VM_EVENT_COUNTERS is not set |
227 | CONFIG_PCI_QUIRKS=y | 233 | CONFIG_PCI_QUIRKS=y |
228 | # CONFIG_SLUB_DEBUG is not set | 234 | # CONFIG_SLUB_DEBUG is not set |
@@ -231,14 +237,17 @@ CONFIG_COMPAT_BRK=y | |||
231 | CONFIG_SLUB=y | 237 | CONFIG_SLUB=y |
232 | # CONFIG_SLOB is not set | 238 | # CONFIG_SLOB is not set |
233 | # CONFIG_PROFILING is not set | 239 | # CONFIG_PROFILING is not set |
234 | # CONFIG_MARKERS is not set | ||
235 | CONFIG_HAVE_OPROFILE=y | 240 | CONFIG_HAVE_OPROFILE=y |
241 | |||
242 | # | ||
243 | # GCOV-based kernel profiling | ||
244 | # | ||
236 | # CONFIG_SLOW_WORK is not set | 245 | # CONFIG_SLOW_WORK is not set |
237 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 246 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y |
238 | CONFIG_BASE_SMALL=0 | 247 | CONFIG_BASE_SMALL=0 |
239 | # CONFIG_MODULES is not set | 248 | # CONFIG_MODULES is not set |
240 | CONFIG_BLOCK=y | 249 | CONFIG_BLOCK=y |
241 | # CONFIG_LBD is not set | 250 | CONFIG_LBDAF=y |
242 | # CONFIG_BLK_DEV_BSG is not set | 251 | # CONFIG_BLK_DEV_BSG is not set |
243 | # CONFIG_BLK_DEV_INTEGRITY is not set | 252 | # CONFIG_BLK_DEV_INTEGRITY is not set |
244 | 253 | ||
@@ -246,14 +255,41 @@ CONFIG_BLOCK=y | |||
246 | # IO Schedulers | 255 | # IO Schedulers |
247 | # | 256 | # |
248 | CONFIG_IOSCHED_NOOP=y | 257 | CONFIG_IOSCHED_NOOP=y |
249 | # CONFIG_IOSCHED_AS is not set | ||
250 | # CONFIG_IOSCHED_DEADLINE is not set | 258 | # CONFIG_IOSCHED_DEADLINE is not set |
251 | # CONFIG_IOSCHED_CFQ is not set | 259 | # CONFIG_IOSCHED_CFQ is not set |
252 | # CONFIG_DEFAULT_AS is not set | ||
253 | # CONFIG_DEFAULT_DEADLINE is not set | 260 | # CONFIG_DEFAULT_DEADLINE is not set |
254 | # CONFIG_DEFAULT_CFQ is not set | 261 | # CONFIG_DEFAULT_CFQ is not set |
255 | CONFIG_DEFAULT_NOOP=y | 262 | CONFIG_DEFAULT_NOOP=y |
256 | CONFIG_DEFAULT_IOSCHED="noop" | 263 | CONFIG_DEFAULT_IOSCHED="noop" |
264 | # CONFIG_INLINE_SPIN_TRYLOCK is not set | ||
265 | # CONFIG_INLINE_SPIN_TRYLOCK_BH is not set | ||
266 | # CONFIG_INLINE_SPIN_LOCK is not set | ||
267 | # CONFIG_INLINE_SPIN_LOCK_BH is not set | ||
268 | # CONFIG_INLINE_SPIN_LOCK_IRQ is not set | ||
269 | # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set | ||
270 | CONFIG_INLINE_SPIN_UNLOCK=y | ||
271 | # CONFIG_INLINE_SPIN_UNLOCK_BH is not set | ||
272 | CONFIG_INLINE_SPIN_UNLOCK_IRQ=y | ||
273 | # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set | ||
274 | # CONFIG_INLINE_READ_TRYLOCK is not set | ||
275 | # CONFIG_INLINE_READ_LOCK is not set | ||
276 | # CONFIG_INLINE_READ_LOCK_BH is not set | ||
277 | # CONFIG_INLINE_READ_LOCK_IRQ is not set | ||
278 | # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set | ||
279 | CONFIG_INLINE_READ_UNLOCK=y | ||
280 | # CONFIG_INLINE_READ_UNLOCK_BH is not set | ||
281 | CONFIG_INLINE_READ_UNLOCK_IRQ=y | ||
282 | # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set | ||
283 | # CONFIG_INLINE_WRITE_TRYLOCK is not set | ||
284 | # CONFIG_INLINE_WRITE_LOCK is not set | ||
285 | # CONFIG_INLINE_WRITE_LOCK_BH is not set | ||
286 | # CONFIG_INLINE_WRITE_LOCK_IRQ is not set | ||
287 | # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set | ||
288 | CONFIG_INLINE_WRITE_UNLOCK=y | ||
289 | # CONFIG_INLINE_WRITE_UNLOCK_BH is not set | ||
290 | CONFIG_INLINE_WRITE_UNLOCK_IRQ=y | ||
291 | # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set | ||
292 | # CONFIG_MUTEX_SPIN_ON_OWNER is not set | ||
257 | # CONFIG_FREEZER is not set | 293 | # CONFIG_FREEZER is not set |
258 | 294 | ||
259 | # | 295 | # |
@@ -263,15 +299,12 @@ CONFIG_HW_HAS_PCI=y | |||
263 | CONFIG_PCI=y | 299 | CONFIG_PCI=y |
264 | CONFIG_PCI_DOMAINS=y | 300 | CONFIG_PCI_DOMAINS=y |
265 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 301 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
266 | # CONFIG_PCI_LEGACY is not set | ||
267 | # CONFIG_PCI_STUB is not set | 302 | # CONFIG_PCI_STUB is not set |
268 | # CONFIG_PCI_IOV is not set | 303 | # CONFIG_PCI_IOV is not set |
269 | CONFIG_MMU=y | 304 | CONFIG_MMU=y |
270 | CONFIG_PCCARD=y | 305 | CONFIG_PCCARD=y |
271 | # CONFIG_PCMCIA_DEBUG is not set | ||
272 | CONFIG_PCMCIA=y | 306 | CONFIG_PCMCIA=y |
273 | CONFIG_PCMCIA_LOAD_CIS=y | 307 | CONFIG_PCMCIA_LOAD_CIS=y |
274 | CONFIG_PCMCIA_IOCTL=y | ||
275 | CONFIG_CARDBUS=y | 308 | CONFIG_CARDBUS=y |
276 | 309 | ||
277 | # | 310 | # |
@@ -295,6 +328,7 @@ CONFIG_TRAD_SIGNALS=y | |||
295 | # | 328 | # |
296 | # Power management options | 329 | # Power management options |
297 | # | 330 | # |
331 | CONFIG_ARCH_HIBERNATION_POSSIBLE=y | ||
298 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | 332 | CONFIG_ARCH_SUSPEND_POSSIBLE=y |
299 | # CONFIG_PM is not set | 333 | # CONFIG_PM is not set |
300 | CONFIG_NET=y | 334 | CONFIG_NET=y |
@@ -333,6 +367,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
333 | # CONFIG_NETFILTER is not set | 367 | # CONFIG_NETFILTER is not set |
334 | # CONFIG_IP_DCCP is not set | 368 | # CONFIG_IP_DCCP is not set |
335 | # CONFIG_IP_SCTP is not set | 369 | # CONFIG_IP_SCTP is not set |
370 | # CONFIG_RDS is not set | ||
336 | # CONFIG_TIPC is not set | 371 | # CONFIG_TIPC is not set |
337 | # CONFIG_ATM is not set | 372 | # CONFIG_ATM is not set |
338 | # CONFIG_BRIDGE is not set | 373 | # CONFIG_BRIDGE is not set |
@@ -347,6 +382,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
347 | # CONFIG_ECONET is not set | 382 | # CONFIG_ECONET is not set |
348 | # CONFIG_WAN_ROUTER is not set | 383 | # CONFIG_WAN_ROUTER is not set |
349 | # CONFIG_PHONET is not set | 384 | # CONFIG_PHONET is not set |
385 | # CONFIG_IEEE802154 is not set | ||
350 | # CONFIG_NET_SCHED is not set | 386 | # CONFIG_NET_SCHED is not set |
351 | # CONFIG_DCB is not set | 387 | # CONFIG_DCB is not set |
352 | 388 | ||
@@ -359,7 +395,27 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
359 | # CONFIG_IRDA is not set | 395 | # CONFIG_IRDA is not set |
360 | # CONFIG_BT is not set | 396 | # CONFIG_BT is not set |
361 | # CONFIG_AF_RXRPC is not set | 397 | # CONFIG_AF_RXRPC is not set |
362 | # CONFIG_WIRELESS is not set | 398 | CONFIG_WIRELESS=y |
399 | CONFIG_WEXT_CORE=y | ||
400 | CONFIG_WEXT_PROC=y | ||
401 | CONFIG_CFG80211=y | ||
402 | CONFIG_NL80211_TESTMODE=y | ||
403 | # CONFIG_CFG80211_DEVELOPER_WARNINGS is not set | ||
404 | # CONFIG_CFG80211_REG_DEBUG is not set | ||
405 | CONFIG_CFG80211_DEFAULT_PS=y | ||
406 | # CONFIG_CFG80211_INTERNAL_REGDB is not set | ||
407 | CONFIG_CFG80211_WEXT=y | ||
408 | CONFIG_WIRELESS_EXT_SYSFS=y | ||
409 | # CONFIG_LIB80211 is not set | ||
410 | CONFIG_MAC80211=y | ||
411 | # CONFIG_MAC80211_RC_PID is not set | ||
412 | CONFIG_MAC80211_RC_MINSTREL=y | ||
413 | # CONFIG_MAC80211_RC_DEFAULT_PID is not set | ||
414 | CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y | ||
415 | CONFIG_MAC80211_RC_DEFAULT="minstrel" | ||
416 | # CONFIG_MAC80211_MESH is not set | ||
417 | CONFIG_MAC80211_LEDS=y | ||
418 | # CONFIG_MAC80211_DEBUG_MENU is not set | ||
363 | # CONFIG_WIMAX is not set | 419 | # CONFIG_WIMAX is not set |
364 | # CONFIG_RFKILL is not set | 420 | # CONFIG_RFKILL is not set |
365 | # CONFIG_NET_9P is not set | 421 | # CONFIG_NET_9P is not set |
@@ -471,6 +527,7 @@ CONFIG_HAVE_IDE=y | |||
471 | # | 527 | # |
472 | # SCSI device support | 528 | # SCSI device support |
473 | # | 529 | # |
530 | CONFIG_SCSI_MOD=y | ||
474 | # CONFIG_RAID_ATTRS is not set | 531 | # CONFIG_RAID_ATTRS is not set |
475 | # CONFIG_SCSI is not set | 532 | # CONFIG_SCSI is not set |
476 | # CONFIG_SCSI_DMA is not set | 533 | # CONFIG_SCSI_DMA is not set |
@@ -484,13 +541,16 @@ CONFIG_HAVE_IDE=y | |||
484 | # | 541 | # |
485 | 542 | ||
486 | # | 543 | # |
487 | # Enable only one of the two stacks, unless you know what you are doing | 544 | # You can enable one or both FireWire driver stacks. |
545 | # | ||
546 | |||
547 | # | ||
548 | # The newer stack is recommended. | ||
488 | # | 549 | # |
489 | # CONFIG_FIREWIRE is not set | 550 | # CONFIG_FIREWIRE is not set |
490 | # CONFIG_IEEE1394 is not set | 551 | # CONFIG_IEEE1394 is not set |
491 | # CONFIG_I2O is not set | 552 | # CONFIG_I2O is not set |
492 | CONFIG_NETDEVICES=y | 553 | CONFIG_NETDEVICES=y |
493 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
494 | # CONFIG_DUMMY is not set | 554 | # CONFIG_DUMMY is not set |
495 | # CONFIG_BONDING is not set | 555 | # CONFIG_BONDING is not set |
496 | # CONFIG_MACVLAN is not set | 556 | # CONFIG_MACVLAN is not set |
@@ -529,6 +589,7 @@ CONFIG_MII=y | |||
529 | # CONFIG_SMC91X is not set | 589 | # CONFIG_SMC91X is not set |
530 | # CONFIG_DM9000 is not set | 590 | # CONFIG_DM9000 is not set |
531 | # CONFIG_ETHOC is not set | 591 | # CONFIG_ETHOC is not set |
592 | # CONFIG_SMSC911X is not set | ||
532 | # CONFIG_DNET is not set | 593 | # CONFIG_DNET is not set |
533 | # CONFIG_NET_TULIP is not set | 594 | # CONFIG_NET_TULIP is not set |
534 | # CONFIG_HP100 is not set | 595 | # CONFIG_HP100 is not set |
@@ -541,17 +602,48 @@ CONFIG_MII=y | |||
541 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 602 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
542 | # CONFIG_NET_PCI is not set | 603 | # CONFIG_NET_PCI is not set |
543 | # CONFIG_B44 is not set | 604 | # CONFIG_B44 is not set |
605 | # CONFIG_KS8842 is not set | ||
606 | # CONFIG_KS8851_MLL is not set | ||
544 | # CONFIG_ATL2 is not set | 607 | # CONFIG_ATL2 is not set |
545 | CONFIG_BCM63XX_ENET=y | 608 | CONFIG_BCM63XX_ENET=y |
546 | # CONFIG_NETDEV_1000 is not set | 609 | # CONFIG_NETDEV_1000 is not set |
547 | # CONFIG_NETDEV_10000 is not set | 610 | # CONFIG_NETDEV_10000 is not set |
548 | # CONFIG_TR is not set | 611 | # CONFIG_TR is not set |
549 | 612 | CONFIG_WLAN=y | |
550 | # | 613 | # CONFIG_PCMCIA_RAYCS is not set |
551 | # Wireless LAN | 614 | # CONFIG_LIBERTAS_THINFIRM is not set |
552 | # | 615 | # CONFIG_ATMEL is not set |
553 | # CONFIG_WLAN_PRE80211 is not set | 616 | # CONFIG_AT76C50X_USB is not set |
554 | # CONFIG_WLAN_80211 is not set | 617 | # CONFIG_AIRO_CS is not set |
618 | # CONFIG_PCMCIA_WL3501 is not set | ||
619 | # CONFIG_PRISM54 is not set | ||
620 | # CONFIG_USB_ZD1201 is not set | ||
621 | # CONFIG_USB_NET_RNDIS_WLAN is not set | ||
622 | # CONFIG_RTL8180 is not set | ||
623 | # CONFIG_RTL8187 is not set | ||
624 | # CONFIG_ADM8211 is not set | ||
625 | # CONFIG_MAC80211_HWSIM is not set | ||
626 | # CONFIG_MWL8K is not set | ||
627 | # CONFIG_ATH_COMMON is not set | ||
628 | CONFIG_B43=y | ||
629 | CONFIG_B43_PCI_AUTOSELECT=y | ||
630 | CONFIG_B43_PCICORE_AUTOSELECT=y | ||
631 | # CONFIG_B43_PCMCIA is not set | ||
632 | CONFIG_B43_PIO=y | ||
633 | # CONFIG_B43_PHY_LP is not set | ||
634 | CONFIG_B43_LEDS=y | ||
635 | # CONFIG_B43_DEBUG is not set | ||
636 | # CONFIG_B43LEGACY is not set | ||
637 | # CONFIG_HOSTAP is not set | ||
638 | # CONFIG_IPW2100 is not set | ||
639 | # CONFIG_IPW2200 is not set | ||
640 | # CONFIG_IWLWIFI is not set | ||
641 | # CONFIG_LIBERTAS is not set | ||
642 | # CONFIG_HERMES is not set | ||
643 | # CONFIG_P54_COMMON is not set | ||
644 | # CONFIG_RT2X00 is not set | ||
645 | # CONFIG_WL12XX is not set | ||
646 | # CONFIG_ZD1211RW is not set | ||
555 | 647 | ||
556 | # | 648 | # |
557 | # Enable WiMAX (Networking options) to see the WiMAX drivers | 649 | # Enable WiMAX (Networking options) to see the WiMAX drivers |
@@ -574,6 +666,7 @@ CONFIG_BCM63XX_ENET=y | |||
574 | # CONFIG_NETCONSOLE is not set | 666 | # CONFIG_NETCONSOLE is not set |
575 | # CONFIG_NETPOLL is not set | 667 | # CONFIG_NETPOLL is not set |
576 | # CONFIG_NET_POLL_CONTROLLER is not set | 668 | # CONFIG_NET_POLL_CONTROLLER is not set |
669 | # CONFIG_VMXNET3 is not set | ||
577 | # CONFIG_ISDN is not set | 670 | # CONFIG_ISDN is not set |
578 | # CONFIG_PHONE is not set | 671 | # CONFIG_PHONE is not set |
579 | 672 | ||
@@ -607,6 +700,7 @@ CONFIG_BCM63XX_ENET=y | |||
607 | CONFIG_SERIAL_CORE=y | 700 | CONFIG_SERIAL_CORE=y |
608 | CONFIG_SERIAL_CORE_CONSOLE=y | 701 | CONFIG_SERIAL_CORE_CONSOLE=y |
609 | # CONFIG_SERIAL_JSM is not set | 702 | # CONFIG_SERIAL_JSM is not set |
703 | # CONFIG_SERIAL_TIMBERDALE is not set | ||
610 | CONFIG_SERIAL_BCM63XX=y | 704 | CONFIG_SERIAL_BCM63XX=y |
611 | CONFIG_SERIAL_BCM63XX_CONSOLE=y | 705 | CONFIG_SERIAL_BCM63XX_CONSOLE=y |
612 | # CONFIG_UNIX98_PTYS is not set | 706 | # CONFIG_UNIX98_PTYS is not set |
@@ -629,6 +723,11 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
629 | CONFIG_DEVPORT=y | 723 | CONFIG_DEVPORT=y |
630 | # CONFIG_I2C is not set | 724 | # CONFIG_I2C is not set |
631 | # CONFIG_SPI is not set | 725 | # CONFIG_SPI is not set |
726 | |||
727 | # | ||
728 | # PPS support | ||
729 | # | ||
730 | # CONFIG_PPS is not set | ||
632 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | 731 | CONFIG_ARCH_REQUIRE_GPIOLIB=y |
633 | CONFIG_GPIOLIB=y | 732 | CONFIG_GPIOLIB=y |
634 | # CONFIG_GPIO_SYSFS is not set | 733 | # CONFIG_GPIO_SYSFS is not set |
@@ -636,6 +735,8 @@ CONFIG_GPIOLIB=y | |||
636 | # | 735 | # |
637 | # Memory mapped GPIO expanders: | 736 | # Memory mapped GPIO expanders: |
638 | # | 737 | # |
738 | # CONFIG_GPIO_IT8761E is not set | ||
739 | # CONFIG_GPIO_SCH is not set | ||
639 | 740 | ||
640 | # | 741 | # |
641 | # I2C GPIO expanders: | 742 | # I2C GPIO expanders: |
@@ -644,16 +745,21 @@ CONFIG_GPIOLIB=y | |||
644 | # | 745 | # |
645 | # PCI GPIO expanders: | 746 | # PCI GPIO expanders: |
646 | # | 747 | # |
748 | # CONFIG_GPIO_CS5535 is not set | ||
647 | # CONFIG_GPIO_BT8XX is not set | 749 | # CONFIG_GPIO_BT8XX is not set |
750 | # CONFIG_GPIO_LANGWELL is not set | ||
648 | 751 | ||
649 | # | 752 | # |
650 | # SPI GPIO expanders: | 753 | # SPI GPIO expanders: |
651 | # | 754 | # |
755 | |||
756 | # | ||
757 | # AC97 GPIO expanders: | ||
758 | # | ||
652 | # CONFIG_W1 is not set | 759 | # CONFIG_W1 is not set |
653 | # CONFIG_POWER_SUPPLY is not set | 760 | # CONFIG_POWER_SUPPLY is not set |
654 | # CONFIG_HWMON is not set | 761 | # CONFIG_HWMON is not set |
655 | # CONFIG_THERMAL is not set | 762 | # CONFIG_THERMAL is not set |
656 | # CONFIG_THERMAL_HWMON is not set | ||
657 | # CONFIG_WATCHDOG is not set | 763 | # CONFIG_WATCHDOG is not set |
658 | CONFIG_SSB_POSSIBLE=y | 764 | CONFIG_SSB_POSSIBLE=y |
659 | 765 | ||
@@ -662,15 +768,16 @@ CONFIG_SSB_POSSIBLE=y | |||
662 | # | 768 | # |
663 | CONFIG_SSB=y | 769 | CONFIG_SSB=y |
664 | CONFIG_SSB_SPROM=y | 770 | CONFIG_SSB_SPROM=y |
771 | CONFIG_SSB_BLOCKIO=y | ||
665 | CONFIG_SSB_PCIHOST_POSSIBLE=y | 772 | CONFIG_SSB_PCIHOST_POSSIBLE=y |
666 | CONFIG_SSB_PCIHOST=y | 773 | CONFIG_SSB_PCIHOST=y |
667 | # CONFIG_SSB_B43_PCI_BRIDGE is not set | 774 | CONFIG_SSB_B43_PCI_BRIDGE=y |
668 | CONFIG_SSB_PCMCIAHOST_POSSIBLE=y | 775 | CONFIG_SSB_PCMCIAHOST_POSSIBLE=y |
669 | # CONFIG_SSB_PCMCIAHOST is not set | 776 | # CONFIG_SSB_PCMCIAHOST is not set |
670 | # CONFIG_SSB_SILENT is not set | 777 | # CONFIG_SSB_SILENT is not set |
671 | # CONFIG_SSB_DEBUG is not set | 778 | # CONFIG_SSB_DEBUG is not set |
672 | CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y | 779 | CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y |
673 | # CONFIG_SSB_DRIVER_PCICORE is not set | 780 | CONFIG_SSB_DRIVER_PCICORE=y |
674 | # CONFIG_SSB_DRIVER_MIPS is not set | 781 | # CONFIG_SSB_DRIVER_MIPS is not set |
675 | 782 | ||
676 | # | 783 | # |
@@ -680,27 +787,15 @@ CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y | |||
680 | # CONFIG_MFD_SM501 is not set | 787 | # CONFIG_MFD_SM501 is not set |
681 | # CONFIG_HTC_PASIC3 is not set | 788 | # CONFIG_HTC_PASIC3 is not set |
682 | # CONFIG_MFD_TMIO is not set | 789 | # CONFIG_MFD_TMIO is not set |
790 | # CONFIG_MFD_TIMBERDALE is not set | ||
791 | # CONFIG_LPC_SCH is not set | ||
683 | # CONFIG_REGULATOR is not set | 792 | # CONFIG_REGULATOR is not set |
684 | 793 | # CONFIG_MEDIA_SUPPORT is not set | |
685 | # | ||
686 | # Multimedia devices | ||
687 | # | ||
688 | |||
689 | # | ||
690 | # Multimedia core support | ||
691 | # | ||
692 | # CONFIG_VIDEO_DEV is not set | ||
693 | # CONFIG_DVB_CORE is not set | ||
694 | # CONFIG_VIDEO_MEDIA is not set | ||
695 | |||
696 | # | ||
697 | # Multimedia drivers | ||
698 | # | ||
699 | # CONFIG_DAB is not set | ||
700 | 794 | ||
701 | # | 795 | # |
702 | # Graphics support | 796 | # Graphics support |
703 | # | 797 | # |
798 | # CONFIG_VGA_ARB is not set | ||
704 | # CONFIG_DRM is not set | 799 | # CONFIG_DRM is not set |
705 | # CONFIG_VGASTATE is not set | 800 | # CONFIG_VGASTATE is not set |
706 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | 801 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set |
@@ -710,11 +805,7 @@ CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y | |||
710 | # | 805 | # |
711 | # Display device support | 806 | # Display device support |
712 | # | 807 | # |
713 | CONFIG_DISPLAY_SUPPORT=y | 808 | # CONFIG_DISPLAY_SUPPORT is not set |
714 | |||
715 | # | ||
716 | # Display hardware drivers | ||
717 | # | ||
718 | # CONFIG_SOUND is not set | 809 | # CONFIG_SOUND is not set |
719 | CONFIG_USB_SUPPORT=y | 810 | CONFIG_USB_SUPPORT=y |
720 | CONFIG_USB_ARCH_HAS_HCD=y | 811 | CONFIG_USB_ARCH_HAS_HCD=y |
@@ -741,13 +832,14 @@ CONFIG_USB=y | |||
741 | # USB Host Controller Drivers | 832 | # USB Host Controller Drivers |
742 | # | 833 | # |
743 | # CONFIG_USB_C67X00_HCD is not set | 834 | # CONFIG_USB_C67X00_HCD is not set |
835 | # CONFIG_USB_XHCI_HCD is not set | ||
744 | CONFIG_USB_EHCI_HCD=y | 836 | CONFIG_USB_EHCI_HCD=y |
745 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 837 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
746 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 838 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
747 | CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y | ||
748 | # CONFIG_USB_OXU210HP_HCD is not set | 839 | # CONFIG_USB_OXU210HP_HCD is not set |
749 | # CONFIG_USB_ISP116X_HCD is not set | 840 | # CONFIG_USB_ISP116X_HCD is not set |
750 | # CONFIG_USB_ISP1760_HCD is not set | 841 | # CONFIG_USB_ISP1760_HCD is not set |
842 | # CONFIG_USB_ISP1362_HCD is not set | ||
751 | CONFIG_USB_OHCI_HCD=y | 843 | CONFIG_USB_OHCI_HCD=y |
752 | # CONFIG_USB_OHCI_HCD_SSB is not set | 844 | # CONFIG_USB_OHCI_HCD_SSB is not set |
753 | CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y | 845 | CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y |
@@ -796,7 +888,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
796 | # CONFIG_USB_RIO500 is not set | 888 | # CONFIG_USB_RIO500 is not set |
797 | # CONFIG_USB_LEGOTOWER is not set | 889 | # CONFIG_USB_LEGOTOWER is not set |
798 | # CONFIG_USB_LCD is not set | 890 | # CONFIG_USB_LCD is not set |
799 | # CONFIG_USB_BERRY_CHARGE is not set | ||
800 | # CONFIG_USB_LED is not set | 891 | # CONFIG_USB_LED is not set |
801 | # CONFIG_USB_CYPRESS_CY7C63 is not set | 892 | # CONFIG_USB_CYPRESS_CY7C63 is not set |
802 | # CONFIG_USB_CYTHERM is not set | 893 | # CONFIG_USB_CYTHERM is not set |
@@ -807,8 +898,8 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
807 | # CONFIG_USB_LD is not set | 898 | # CONFIG_USB_LD is not set |
808 | # CONFIG_USB_TRANCEVIBRATOR is not set | 899 | # CONFIG_USB_TRANCEVIBRATOR is not set |
809 | # CONFIG_USB_IOWARRIOR is not set | 900 | # CONFIG_USB_IOWARRIOR is not set |
901 | # CONFIG_USB_TEST is not set | ||
810 | # CONFIG_USB_ISIGHTFW is not set | 902 | # CONFIG_USB_ISIGHTFW is not set |
811 | # CONFIG_USB_VST is not set | ||
812 | # CONFIG_USB_GADGET is not set | 903 | # CONFIG_USB_GADGET is not set |
813 | 904 | ||
814 | # | 905 | # |
@@ -819,7 +910,29 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
819 | # CONFIG_UWB is not set | 910 | # CONFIG_UWB is not set |
820 | # CONFIG_MMC is not set | 911 | # CONFIG_MMC is not set |
821 | # CONFIG_MEMSTICK is not set | 912 | # CONFIG_MEMSTICK is not set |
822 | # CONFIG_NEW_LEDS is not set | 913 | CONFIG_NEW_LEDS=y |
914 | CONFIG_LEDS_CLASS=y | ||
915 | |||
916 | # | ||
917 | # LED drivers | ||
918 | # | ||
919 | CONFIG_LEDS_GPIO=y | ||
920 | CONFIG_LEDS_GPIO_PLATFORM=y | ||
921 | # CONFIG_LEDS_LT3593 is not set | ||
922 | CONFIG_LEDS_TRIGGERS=y | ||
923 | |||
924 | # | ||
925 | # LED Triggers | ||
926 | # | ||
927 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
928 | # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set | ||
929 | # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set | ||
930 | CONFIG_LEDS_TRIGGER_GPIO=y | ||
931 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
932 | |||
933 | # | ||
934 | # iptables trigger is under Netfilter config (LED target) | ||
935 | # | ||
823 | # CONFIG_ACCESSIBILITY is not set | 936 | # CONFIG_ACCESSIBILITY is not set |
824 | # CONFIG_INFINIBAND is not set | 937 | # CONFIG_INFINIBAND is not set |
825 | CONFIG_RTC_LIB=y | 938 | CONFIG_RTC_LIB=y |
@@ -827,6 +940,10 @@ CONFIG_RTC_LIB=y | |||
827 | # CONFIG_DMADEVICES is not set | 940 | # CONFIG_DMADEVICES is not set |
828 | # CONFIG_AUXDISPLAY is not set | 941 | # CONFIG_AUXDISPLAY is not set |
829 | # CONFIG_UIO is not set | 942 | # CONFIG_UIO is not set |
943 | |||
944 | # | ||
945 | # TI VLYNQ | ||
946 | # | ||
830 | # CONFIG_STAGING is not set | 947 | # CONFIG_STAGING is not set |
831 | 948 | ||
832 | # | 949 | # |
@@ -838,12 +955,16 @@ CONFIG_RTC_LIB=y | |||
838 | # CONFIG_REISERFS_FS is not set | 955 | # CONFIG_REISERFS_FS is not set |
839 | # CONFIG_JFS_FS is not set | 956 | # CONFIG_JFS_FS is not set |
840 | # CONFIG_FS_POSIX_ACL is not set | 957 | # CONFIG_FS_POSIX_ACL is not set |
841 | # CONFIG_FILE_LOCKING is not set | ||
842 | # CONFIG_XFS_FS is not set | 958 | # CONFIG_XFS_FS is not set |
959 | # CONFIG_GFS2_FS is not set | ||
843 | # CONFIG_OCFS2_FS is not set | 960 | # CONFIG_OCFS2_FS is not set |
844 | # CONFIG_BTRFS_FS is not set | 961 | # CONFIG_BTRFS_FS is not set |
962 | # CONFIG_NILFS2_FS is not set | ||
963 | # CONFIG_FILE_LOCKING is not set | ||
964 | CONFIG_FSNOTIFY=y | ||
845 | # CONFIG_DNOTIFY is not set | 965 | # CONFIG_DNOTIFY is not set |
846 | # CONFIG_INOTIFY is not set | 966 | # CONFIG_INOTIFY is not set |
967 | CONFIG_INOTIFY_USER=y | ||
847 | # CONFIG_QUOTA is not set | 968 | # CONFIG_QUOTA is not set |
848 | # CONFIG_AUTOFS_FS is not set | 969 | # CONFIG_AUTOFS_FS is not set |
849 | # CONFIG_AUTOFS4_FS is not set | 970 | # CONFIG_AUTOFS4_FS is not set |
@@ -875,8 +996,6 @@ CONFIG_PROC_KCORE=y | |||
875 | CONFIG_PROC_SYSCTL=y | 996 | CONFIG_PROC_SYSCTL=y |
876 | CONFIG_PROC_PAGE_MONITOR=y | 997 | CONFIG_PROC_PAGE_MONITOR=y |
877 | CONFIG_SYSFS=y | 998 | CONFIG_SYSFS=y |
878 | CONFIG_TMPFS=y | ||
879 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
880 | # CONFIG_HUGETLB_PAGE is not set | 999 | # CONFIG_HUGETLB_PAGE is not set |
881 | # CONFIG_CONFIGFS_FS is not set | 1000 | # CONFIG_CONFIGFS_FS is not set |
882 | CONFIG_MISC_FILESYSTEMS=y | 1001 | CONFIG_MISC_FILESYSTEMS=y |
@@ -888,6 +1007,7 @@ CONFIG_MISC_FILESYSTEMS=y | |||
888 | # CONFIG_BFS_FS is not set | 1007 | # CONFIG_BFS_FS is not set |
889 | # CONFIG_EFS_FS is not set | 1008 | # CONFIG_EFS_FS is not set |
890 | # CONFIG_JFFS2_FS is not set | 1009 | # CONFIG_JFFS2_FS is not set |
1010 | # CONFIG_LOGFS is not set | ||
891 | # CONFIG_CRAMFS is not set | 1011 | # CONFIG_CRAMFS is not set |
892 | # CONFIG_SQUASHFS is not set | 1012 | # CONFIG_SQUASHFS is not set |
893 | # CONFIG_VXFS_FS is not set | 1013 | # CONFIG_VXFS_FS is not set |
@@ -898,7 +1018,6 @@ CONFIG_MISC_FILESYSTEMS=y | |||
898 | # CONFIG_ROMFS_FS is not set | 1018 | # CONFIG_ROMFS_FS is not set |
899 | # CONFIG_SYSV_FS is not set | 1019 | # CONFIG_SYSV_FS is not set |
900 | # CONFIG_UFS_FS is not set | 1020 | # CONFIG_UFS_FS is not set |
901 | # CONFIG_NILFS2_FS is not set | ||
902 | # CONFIG_NETWORK_FILESYSTEMS is not set | 1021 | # CONFIG_NETWORK_FILESYSTEMS is not set |
903 | 1022 | ||
904 | # | 1023 | # |
@@ -906,7 +1025,46 @@ CONFIG_MISC_FILESYSTEMS=y | |||
906 | # | 1025 | # |
907 | # CONFIG_PARTITION_ADVANCED is not set | 1026 | # CONFIG_PARTITION_ADVANCED is not set |
908 | CONFIG_MSDOS_PARTITION=y | 1027 | CONFIG_MSDOS_PARTITION=y |
909 | # CONFIG_NLS is not set | 1028 | CONFIG_NLS=y |
1029 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1030 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
1031 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1032 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1033 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1034 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1035 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1036 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1037 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1038 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1039 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1040 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1041 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1042 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1043 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1044 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1045 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1046 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1047 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1048 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1049 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1050 | # CONFIG_NLS_ISO8859_8 is not set | ||
1051 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1052 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1053 | # CONFIG_NLS_ASCII is not set | ||
1054 | # CONFIG_NLS_ISO8859_1 is not set | ||
1055 | # CONFIG_NLS_ISO8859_2 is not set | ||
1056 | # CONFIG_NLS_ISO8859_3 is not set | ||
1057 | # CONFIG_NLS_ISO8859_4 is not set | ||
1058 | # CONFIG_NLS_ISO8859_5 is not set | ||
1059 | # CONFIG_NLS_ISO8859_6 is not set | ||
1060 | # CONFIG_NLS_ISO8859_7 is not set | ||
1061 | # CONFIG_NLS_ISO8859_9 is not set | ||
1062 | # CONFIG_NLS_ISO8859_13 is not set | ||
1063 | # CONFIG_NLS_ISO8859_14 is not set | ||
1064 | # CONFIG_NLS_ISO8859_15 is not set | ||
1065 | # CONFIG_NLS_KOI8_R is not set | ||
1066 | # CONFIG_NLS_KOI8_U is not set | ||
1067 | # CONFIG_NLS_UTF8 is not set | ||
910 | # CONFIG_DLM is not set | 1068 | # CONFIG_DLM is not set |
911 | 1069 | ||
912 | # | 1070 | # |
@@ -918,29 +1076,23 @@ CONFIG_ENABLE_WARN_DEPRECATED=y | |||
918 | CONFIG_ENABLE_MUST_CHECK=y | 1076 | CONFIG_ENABLE_MUST_CHECK=y |
919 | CONFIG_FRAME_WARN=1024 | 1077 | CONFIG_FRAME_WARN=1024 |
920 | CONFIG_MAGIC_SYSRQ=y | 1078 | CONFIG_MAGIC_SYSRQ=y |
1079 | # CONFIG_STRIP_ASM_SYMS is not set | ||
921 | # CONFIG_UNUSED_SYMBOLS is not set | 1080 | # CONFIG_UNUSED_SYMBOLS is not set |
922 | # CONFIG_DEBUG_FS is not set | 1081 | # CONFIG_DEBUG_FS is not set |
923 | # CONFIG_HEADERS_CHECK is not set | 1082 | # CONFIG_HEADERS_CHECK is not set |
924 | # CONFIG_DEBUG_KERNEL is not set | 1083 | # CONFIG_DEBUG_KERNEL is not set |
925 | # CONFIG_DEBUG_MEMORY_INIT is not set | 1084 | # CONFIG_DEBUG_MEMORY_INIT is not set |
926 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
927 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 1085 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
1086 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
1087 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
1088 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y | ||
1089 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1090 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
928 | CONFIG_TRACING_SUPPORT=y | 1091 | CONFIG_TRACING_SUPPORT=y |
929 | 1092 | # CONFIG_FTRACE is not set | |
930 | # | ||
931 | # Tracers | ||
932 | # | ||
933 | # CONFIG_IRQSOFF_TRACER is not set | ||
934 | # CONFIG_SCHED_TRACER is not set | ||
935 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
936 | # CONFIG_EVENT_TRACER is not set | ||
937 | # CONFIG_BOOT_TRACER is not set | ||
938 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
939 | # CONFIG_KMEMTRACE is not set | ||
940 | # CONFIG_WORKQUEUE_TRACER is not set | ||
941 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
942 | # CONFIG_SAMPLES is not set | 1093 | # CONFIG_SAMPLES is not set |
943 | CONFIG_HAVE_ARCH_KGDB=y | 1094 | CONFIG_HAVE_ARCH_KGDB=y |
1095 | CONFIG_EARLY_PRINTK=y | ||
944 | CONFIG_CMDLINE_BOOL=y | 1096 | CONFIG_CMDLINE_BOOL=y |
945 | CONFIG_CMDLINE="console=ttyS0,115200" | 1097 | CONFIG_CMDLINE="console=ttyS0,115200" |
946 | # CONFIG_CMDLINE_OVERRIDE is not set | 1098 | # CONFIG_CMDLINE_OVERRIDE is not set |
@@ -951,8 +1103,108 @@ CONFIG_CMDLINE="console=ttyS0,115200" | |||
951 | # CONFIG_KEYS is not set | 1103 | # CONFIG_KEYS is not set |
952 | # CONFIG_SECURITY is not set | 1104 | # CONFIG_SECURITY is not set |
953 | # CONFIG_SECURITYFS is not set | 1105 | # CONFIG_SECURITYFS is not set |
954 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1106 | # CONFIG_DEFAULT_SECURITY_SELINUX is not set |
955 | # CONFIG_CRYPTO is not set | 1107 | # CONFIG_DEFAULT_SECURITY_SMACK is not set |
1108 | # CONFIG_DEFAULT_SECURITY_TOMOYO is not set | ||
1109 | CONFIG_DEFAULT_SECURITY_DAC=y | ||
1110 | CONFIG_DEFAULT_SECURITY="" | ||
1111 | CONFIG_CRYPTO=y | ||
1112 | |||
1113 | # | ||
1114 | # Crypto core or helper | ||
1115 | # | ||
1116 | # CONFIG_CRYPTO_FIPS is not set | ||
1117 | CONFIG_CRYPTO_ALGAPI=y | ||
1118 | CONFIG_CRYPTO_ALGAPI2=y | ||
1119 | CONFIG_CRYPTO_AEAD2=y | ||
1120 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1121 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
1122 | CONFIG_CRYPTO_HASH2=y | ||
1123 | CONFIG_CRYPTO_RNG=y | ||
1124 | CONFIG_CRYPTO_RNG2=y | ||
1125 | CONFIG_CRYPTO_PCOMP=y | ||
1126 | CONFIG_CRYPTO_MANAGER=y | ||
1127 | CONFIG_CRYPTO_MANAGER2=y | ||
1128 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1129 | # CONFIG_CRYPTO_NULL is not set | ||
1130 | CONFIG_CRYPTO_WORKQUEUE=y | ||
1131 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1132 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1133 | |||
1134 | # | ||
1135 | # Authenticated Encryption with Associated Data | ||
1136 | # | ||
1137 | # CONFIG_CRYPTO_CCM is not set | ||
1138 | # CONFIG_CRYPTO_GCM is not set | ||
1139 | # CONFIG_CRYPTO_SEQIV is not set | ||
1140 | |||
1141 | # | ||
1142 | # Block modes | ||
1143 | # | ||
1144 | # CONFIG_CRYPTO_CBC is not set | ||
1145 | # CONFIG_CRYPTO_CTR is not set | ||
1146 | # CONFIG_CRYPTO_CTS is not set | ||
1147 | CONFIG_CRYPTO_ECB=y | ||
1148 | # CONFIG_CRYPTO_LRW is not set | ||
1149 | # CONFIG_CRYPTO_PCBC is not set | ||
1150 | # CONFIG_CRYPTO_XTS is not set | ||
1151 | |||
1152 | # | ||
1153 | # Hash modes | ||
1154 | # | ||
1155 | # CONFIG_CRYPTO_HMAC is not set | ||
1156 | # CONFIG_CRYPTO_XCBC is not set | ||
1157 | # CONFIG_CRYPTO_VMAC is not set | ||
1158 | |||
1159 | # | ||
1160 | # Digest | ||
1161 | # | ||
1162 | # CONFIG_CRYPTO_CRC32C is not set | ||
1163 | # CONFIG_CRYPTO_GHASH is not set | ||
1164 | # CONFIG_CRYPTO_MD4 is not set | ||
1165 | # CONFIG_CRYPTO_MD5 is not set | ||
1166 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1167 | # CONFIG_CRYPTO_RMD128 is not set | ||
1168 | # CONFIG_CRYPTO_RMD160 is not set | ||
1169 | # CONFIG_CRYPTO_RMD256 is not set | ||
1170 | # CONFIG_CRYPTO_RMD320 is not set | ||
1171 | # CONFIG_CRYPTO_SHA1 is not set | ||
1172 | # CONFIG_CRYPTO_SHA256 is not set | ||
1173 | # CONFIG_CRYPTO_SHA512 is not set | ||
1174 | # CONFIG_CRYPTO_TGR192 is not set | ||
1175 | # CONFIG_CRYPTO_WP512 is not set | ||
1176 | |||
1177 | # | ||
1178 | # Ciphers | ||
1179 | # | ||
1180 | CONFIG_CRYPTO_AES=y | ||
1181 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1182 | CONFIG_CRYPTO_ARC4=y | ||
1183 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1184 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1185 | # CONFIG_CRYPTO_CAST5 is not set | ||
1186 | # CONFIG_CRYPTO_CAST6 is not set | ||
1187 | # CONFIG_CRYPTO_DES is not set | ||
1188 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1189 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1190 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1191 | # CONFIG_CRYPTO_SEED is not set | ||
1192 | # CONFIG_CRYPTO_SERPENT is not set | ||
1193 | # CONFIG_CRYPTO_TEA is not set | ||
1194 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1195 | |||
1196 | # | ||
1197 | # Compression | ||
1198 | # | ||
1199 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1200 | # CONFIG_CRYPTO_ZLIB is not set | ||
1201 | # CONFIG_CRYPTO_LZO is not set | ||
1202 | |||
1203 | # | ||
1204 | # Random Number Generation | ||
1205 | # | ||
1206 | CONFIG_CRYPTO_ANSI_CPRNG=y | ||
1207 | # CONFIG_CRYPTO_HW is not set | ||
956 | # CONFIG_BINARY_PRINTF is not set | 1208 | # CONFIG_BINARY_PRINTF is not set |
957 | 1209 | ||
958 | # | 1210 | # |
diff --git a/arch/mips/include/asm/cmpxchg.h b/arch/mips/include/asm/cmpxchg.h index ed9aaaaf0749..2d28017e95d0 100644 --- a/arch/mips/include/asm/cmpxchg.h +++ b/arch/mips/include/asm/cmpxchg.h | |||
@@ -16,7 +16,7 @@ | |||
16 | ({ \ | 16 | ({ \ |
17 | __typeof(*(m)) __ret; \ | 17 | __typeof(*(m)) __ret; \ |
18 | \ | 18 | \ |
19 | if (kernel_uses_llsc && R10000_LLSC_WAR) { \ | 19 | if (kernel_uses_llsc && R10000_LLSC_WAR) { \ |
20 | __asm__ __volatile__( \ | 20 | __asm__ __volatile__( \ |
21 | " .set push \n" \ | 21 | " .set push \n" \ |
22 | " .set noat \n" \ | 22 | " .set noat \n" \ |
diff --git a/arch/mips/include/asm/mach-loongson/loongson.h b/arch/mips/include/asm/mach-loongson/loongson.h index 1cf7b1401ee4..fcdbe3a4ce1f 100644 --- a/arch/mips/include/asm/mach-loongson/loongson.h +++ b/arch/mips/include/asm/mach-loongson/loongson.h | |||
@@ -307,7 +307,7 @@ extern unsigned long _loongson_addrwincfg_base; | |||
307 | */ | 307 | */ |
308 | #define LOONGSON_ADDRWIN_CFG(s, d, w, src, dst, size) do {\ | 308 | #define LOONGSON_ADDRWIN_CFG(s, d, w, src, dst, size) do {\ |
309 | s##_WIN##w##_BASE = (src); \ | 309 | s##_WIN##w##_BASE = (src); \ |
310 | s##_WIN##w##_MMAP = (src) | ADDRWIN_MAP_DST_##d; \ | 310 | s##_WIN##w##_MMAP = (dst) | ADDRWIN_MAP_DST_##d; \ |
311 | s##_WIN##w##_MASK = ~(size-1); \ | 311 | s##_WIN##w##_MASK = ~(size-1); \ |
312 | } while (0) | 312 | } while (0) |
313 | 313 | ||
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index 26dc69d792a6..1be4b0fa30da 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h | |||
@@ -120,9 +120,14 @@ | |||
120 | #endif | 120 | #endif |
121 | #define FIRST_USER_ADDRESS 0UL | 121 | #define FIRST_USER_ADDRESS 0UL |
122 | 122 | ||
123 | #define VMALLOC_START MAP_BASE | 123 | /* |
124 | * TLB refill handlers also map the vmalloc area into xuseg. Avoid | ||
125 | * the first couple of pages so NULL pointer dereferences will still | ||
126 | * reliably trap. | ||
127 | */ | ||
128 | #define VMALLOC_START (MAP_BASE + (2 * PAGE_SIZE)) | ||
124 | #define VMALLOC_END \ | 129 | #define VMALLOC_END \ |
125 | (VMALLOC_START + \ | 130 | (MAP_BASE + \ |
126 | min(PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE, \ | 131 | min(PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE, \ |
127 | (1UL << cpu_vmbits)) - (1UL << 32)) | 132 | (1UL << cpu_vmbits)) - (1UL << 32)) |
128 | 133 | ||
diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h index ce47118e52b7..cdc6a46efd98 100644 --- a/arch/mips/include/asm/ptrace.h +++ b/arch/mips/include/asm/ptrace.h | |||
@@ -142,9 +142,9 @@ extern int ptrace_set_watch_regs(struct task_struct *child, | |||
142 | 142 | ||
143 | extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit); | 143 | extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit); |
144 | 144 | ||
145 | extern NORET_TYPE void die(const char *, const struct pt_regs *) ATTRIB_NORET; | 145 | extern NORET_TYPE void die(const char *, struct pt_regs *) ATTRIB_NORET; |
146 | 146 | ||
147 | static inline void die_if_kernel(const char *str, const struct pt_regs *regs) | 147 | static inline void die_if_kernel(const char *str, struct pt_regs *regs) |
148 | { | 148 | { |
149 | if (unlikely(!user_mode(regs))) | 149 | if (unlikely(!user_mode(regs))) |
150 | die(str, regs); | 150 | die(str, regs); |
diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h index c8419129e770..58730c5ce4bf 100644 --- a/arch/mips/include/asm/stackframe.h +++ b/arch/mips/include/asm/stackframe.h | |||
@@ -121,7 +121,7 @@ | |||
121 | .endm | 121 | .endm |
122 | #else | 122 | #else |
123 | .macro get_saved_sp /* Uniprocessor variation */ | 123 | .macro get_saved_sp /* Uniprocessor variation */ |
124 | #ifdef CONFIG_CPU_LOONGSON2F | 124 | #ifdef CONFIG_CPU_JUMP_WORKAROUNDS |
125 | /* | 125 | /* |
126 | * Clear BTB (branch target buffer), forbid RAS (return address | 126 | * Clear BTB (branch target buffer), forbid RAS (return address |
127 | * stack) to workaround the Out-of-order Issue in Loongson2F | 127 | * stack) to workaround the Out-of-order Issue in Loongson2F |
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h index 11a8b5252549..697e40c06497 100644 --- a/arch/mips/include/asm/uasm.h +++ b/arch/mips/include/asm/uasm.h | |||
@@ -167,6 +167,24 @@ static inline void __cpuinit uasm_l##lb(struct uasm_label **lab, u32 *addr) \ | |||
167 | #define uasm_i_ssnop(buf) uasm_i_sll(buf, 0, 0, 1) | 167 | #define uasm_i_ssnop(buf) uasm_i_sll(buf, 0, 0, 1) |
168 | #define uasm_i_ehb(buf) uasm_i_sll(buf, 0, 0, 3) | 168 | #define uasm_i_ehb(buf) uasm_i_sll(buf, 0, 0, 3) |
169 | 169 | ||
170 | static inline void uasm_i_dsrl_safe(u32 **p, unsigned int a1, | ||
171 | unsigned int a2, unsigned int a3) | ||
172 | { | ||
173 | if (a3 < 32) | ||
174 | uasm_i_dsrl(p, a1, a2, a3); | ||
175 | else | ||
176 | uasm_i_dsrl32(p, a1, a2, a3 - 32); | ||
177 | } | ||
178 | |||
179 | static inline void uasm_i_dsll_safe(u32 **p, unsigned int a1, | ||
180 | unsigned int a2, unsigned int a3) | ||
181 | { | ||
182 | if (a3 < 32) | ||
183 | uasm_i_dsll(p, a1, a2, a3); | ||
184 | else | ||
185 | uasm_i_dsll32(p, a1, a2, a3 - 32); | ||
186 | } | ||
187 | |||
170 | /* Handle relocations. */ | 188 | /* Handle relocations. */ |
171 | struct uasm_reloc { | 189 | struct uasm_reloc { |
172 | u32 *addr; | 190 | u32 *addr; |
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c index 7043f6b9ff3c..0d0f054a02f4 100644 --- a/arch/mips/jazz/setup.c +++ b/arch/mips/jazz/setup.c | |||
@@ -76,15 +76,9 @@ void __init plat_mem_setup(void) | |||
76 | 76 | ||
77 | #ifdef CONFIG_VT | 77 | #ifdef CONFIG_VT |
78 | screen_info = (struct screen_info) { | 78 | screen_info = (struct screen_info) { |
79 | 0, 0, /* orig-x, orig-y */ | 79 | .orig_video_cols = 160, |
80 | 0, /* unused */ | 80 | .orig_video_lines = 64, |
81 | 0, /* orig_video_page */ | 81 | .orig_video_points = 16, |
82 | 0, /* orig_video_mode */ | ||
83 | 160, /* orig_video_cols */ | ||
84 | 0, 0, 0, /* unused, ega_bx, unused */ | ||
85 | 64, /* orig_video_lines */ | ||
86 | 0, /* orig_video_isVGA */ | ||
87 | 16 /* orig_video_points */ | ||
88 | }; | 82 | }; |
89 | #endif | 83 | #endif |
90 | 84 | ||
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 1a4dd657ccb9..d612c6dcb746 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -352,9 +352,10 @@ void show_registers(const struct pt_regs *regs) | |||
352 | 352 | ||
353 | static DEFINE_SPINLOCK(die_lock); | 353 | static DEFINE_SPINLOCK(die_lock); |
354 | 354 | ||
355 | void __noreturn die(const char * str, const struct pt_regs * regs) | 355 | void __noreturn die(const char * str, struct pt_regs * regs) |
356 | { | 356 | { |
357 | static int die_counter; | 357 | static int die_counter; |
358 | int sig = SIGSEGV; | ||
358 | #ifdef CONFIG_MIPS_MT_SMTC | 359 | #ifdef CONFIG_MIPS_MT_SMTC |
359 | unsigned long dvpret = dvpe(); | 360 | unsigned long dvpret = dvpe(); |
360 | #endif /* CONFIG_MIPS_MT_SMTC */ | 361 | #endif /* CONFIG_MIPS_MT_SMTC */ |
@@ -365,6 +366,10 @@ void __noreturn die(const char * str, const struct pt_regs * regs) | |||
365 | #ifdef CONFIG_MIPS_MT_SMTC | 366 | #ifdef CONFIG_MIPS_MT_SMTC |
366 | mips_mt_regdump(dvpret); | 367 | mips_mt_regdump(dvpret); |
367 | #endif /* CONFIG_MIPS_MT_SMTC */ | 368 | #endif /* CONFIG_MIPS_MT_SMTC */ |
369 | |||
370 | if (notify_die(DIE_OOPS, str, regs, 0, current->thread.trap_no, SIGSEGV) == NOTIFY_STOP) | ||
371 | sig = 0; | ||
372 | |||
368 | printk("%s[#%d]:\n", str, ++die_counter); | 373 | printk("%s[#%d]:\n", str, ++die_counter); |
369 | show_registers(regs); | 374 | show_registers(regs); |
370 | add_taint(TAINT_DIE); | 375 | add_taint(TAINT_DIE); |
@@ -379,7 +384,7 @@ void __noreturn die(const char * str, const struct pt_regs * regs) | |||
379 | panic("Fatal exception"); | 384 | panic("Fatal exception"); |
380 | } | 385 | } |
381 | 386 | ||
382 | do_exit(SIGSEGV); | 387 | do_exit(sig); |
383 | } | 388 | } |
384 | 389 | ||
385 | extern struct exception_table_entry __start___dbe_table[]; | 390 | extern struct exception_table_entry __start___dbe_table[]; |
@@ -1557,12 +1562,7 @@ static char panic_null_cerr[] __cpuinitdata = | |||
1557 | void __cpuinit set_uncached_handler(unsigned long offset, void *addr, | 1562 | void __cpuinit set_uncached_handler(unsigned long offset, void *addr, |
1558 | unsigned long size) | 1563 | unsigned long size) |
1559 | { | 1564 | { |
1560 | #ifdef CONFIG_32BIT | 1565 | unsigned long uncached_ebase = CKSEG1ADDR(ebase); |
1561 | unsigned long uncached_ebase = KSEG1ADDR(ebase); | ||
1562 | #endif | ||
1563 | #ifdef CONFIG_64BIT | ||
1564 | unsigned long uncached_ebase = TO_UNCAC(ebase); | ||
1565 | #endif | ||
1566 | 1566 | ||
1567 | if (!addr) | 1567 | if (!addr) |
1568 | panic(panic_null_cerr); | 1568 | panic(panic_null_cerr); |
diff --git a/arch/mips/loongson/common/machtype.c b/arch/mips/loongson/common/machtype.c index 853f184b793e..81fbe6b73f91 100644 --- a/arch/mips/loongson/common/machtype.c +++ b/arch/mips/loongson/common/machtype.c | |||
@@ -24,7 +24,7 @@ static const char *system_types[] = { | |||
24 | [MACH_LEMOTE_FL2F] "lemote-fuloong-2f-box", | 24 | [MACH_LEMOTE_FL2F] "lemote-fuloong-2f-box", |
25 | [MACH_LEMOTE_ML2F7] "lemote-mengloong-2f-7inches", | 25 | [MACH_LEMOTE_ML2F7] "lemote-mengloong-2f-7inches", |
26 | [MACH_LEMOTE_YL2F89] "lemote-yeeloong-2f-8.9inches", | 26 | [MACH_LEMOTE_YL2F89] "lemote-yeeloong-2f-8.9inches", |
27 | [MACH_DEXXON_GDIUM2F10] "dexxon-gidum-2f-10inches", | 27 | [MACH_DEXXON_GDIUM2F10] "dexxon-gdium-2f", |
28 | [MACH_LEMOTE_NAS] "lemote-nas-2f", | 28 | [MACH_LEMOTE_NAS] "lemote-nas-2f", |
29 | [MACH_LEMOTE_LL2F] "lemote-lynloong-2f", | 29 | [MACH_LEMOTE_LL2F] "lemote-lynloong-2f", |
30 | [MACH_LOONGSON_END] NULL, | 30 | [MACH_LOONGSON_END] NULL, |
diff --git a/arch/mips/loongson/common/mem.c b/arch/mips/loongson/common/mem.c index ec2f7964a0b0..30eba6001205 100644 --- a/arch/mips/loongson/common/mem.c +++ b/arch/mips/loongson/common/mem.c | |||
@@ -75,7 +75,7 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | |||
75 | unsigned long end = offset + size; | 75 | unsigned long end = offset + size; |
76 | 76 | ||
77 | if (__uncached_access(file, offset)) { | 77 | if (__uncached_access(file, offset)) { |
78 | if (((uca_start && offset) >= uca_start) && | 78 | if (uca_start && (offset >= uca_start) && |
79 | (end <= uca_end)) | 79 | (end <= uca_end)) |
80 | return __pgprot((pgprot_val(vma_prot) & | 80 | return __pgprot((pgprot_val(vma_prot) & |
81 | ~_CACHE_MASK) | | 81 | ~_CACHE_MASK) | |
@@ -96,7 +96,7 @@ static int __init find_vga_mem_init(void) | |||
96 | return 0; | 96 | return 0; |
97 | 97 | ||
98 | for_each_pci_dev(dev) { | 98 | for_each_pci_dev(dev) { |
99 | if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) { | 99 | if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { |
100 | for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) { | 100 | for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) { |
101 | r = &dev->resource[idx]; | 101 | r = &dev->resource[idx]; |
102 | if (!r->start && r->end) | 102 | if (!r->start && r->end) |
diff --git a/arch/mips/loongson/common/reset.c b/arch/mips/loongson/common/reset.c index 4bd9c18b07a5..9e10d6225d9b 100644 --- a/arch/mips/loongson/common/reset.c +++ b/arch/mips/loongson/common/reset.c | |||
@@ -16,13 +16,31 @@ | |||
16 | 16 | ||
17 | #include <loongson.h> | 17 | #include <loongson.h> |
18 | 18 | ||
19 | static inline void loongson_reboot(void) | ||
20 | { | ||
21 | #ifndef CONFIG_CPU_JUMP_WORKAROUNDS | ||
22 | ((void (*)(void))ioremap_nocache(LOONGSON_BOOT_BASE, 4)) (); | ||
23 | #else | ||
24 | void (*func)(void); | ||
25 | |||
26 | func = (void *)ioremap_nocache(LOONGSON_BOOT_BASE, 4); | ||
27 | |||
28 | __asm__ __volatile__( | ||
29 | " .set noat \n" | ||
30 | " jr %[func] \n" | ||
31 | " .set at \n" | ||
32 | : /* No outputs */ | ||
33 | : [func] "r" (func)); | ||
34 | #endif | ||
35 | } | ||
36 | |||
19 | static void loongson_restart(char *command) | 37 | static void loongson_restart(char *command) |
20 | { | 38 | { |
21 | /* do preparation for reboot */ | 39 | /* do preparation for reboot */ |
22 | mach_prepare_reboot(); | 40 | mach_prepare_reboot(); |
23 | 41 | ||
24 | /* reboot via jumping to boot base address */ | 42 | /* reboot via jumping to boot base address */ |
25 | ((void (*)(void))ioremap_nocache(LOONGSON_BOOT_BASE, 4)) (); | 43 | loongson_reboot(); |
26 | } | 44 | } |
27 | 45 | ||
28 | static void loongson_poweroff(void) | 46 | static void loongson_poweroff(void) |
diff --git a/arch/mips/loongson/common/setup.c b/arch/mips/loongson/common/setup.c index 4cd2aa9a342c..27d826bc7103 100644 --- a/arch/mips/loongson/common/setup.c +++ b/arch/mips/loongson/common/setup.c | |||
@@ -41,15 +41,12 @@ void __init plat_mem_setup(void) | |||
41 | conswitchp = &vga_con; | 41 | conswitchp = &vga_con; |
42 | 42 | ||
43 | screen_info = (struct screen_info) { | 43 | screen_info = (struct screen_info) { |
44 | 0, 25, /* orig-x, orig-y */ | 44 | .orig_x = 0, |
45 | 0, /* unused */ | 45 | .orig_y = 25, |
46 | 0, /* orig-video-page */ | 46 | .orig_video_cols = 80, |
47 | 0, /* orig-video-mode */ | 47 | .orig_video_lines = 25, |
48 | 80, /* orig-video-cols */ | 48 | .orig_video_isVGA = VIDEO_TYPE_VGAC, |
49 | 0, 0, 0, /* ega_ax, ega_bx, ega_cx */ | 49 | .orig_video_points = 16, |
50 | 25, /* orig-video-lines */ | ||
51 | VIDEO_TYPE_VGAC, /* orig-video-isVGA */ | ||
52 | 16 /* orig-video-points */ | ||
53 | }; | 50 | }; |
54 | #elif defined(CONFIG_DUMMY_CONSOLE) | 51 | #elif defined(CONFIG_DUMMY_CONSOLE) |
55 | conswitchp = &dummy_con; | 52 | conswitchp = &dummy_con; |
diff --git a/arch/mips/loongson/lemote-2f/irq.c b/arch/mips/loongson/lemote-2f/irq.c index 882dfcd42c00..1d8b4d28a058 100644 --- a/arch/mips/loongson/lemote-2f/irq.c +++ b/arch/mips/loongson/lemote-2f/irq.c | |||
@@ -79,7 +79,7 @@ void mach_irq_dispatch(unsigned int pending) | |||
79 | if (pending & CAUSEF_IP7) | 79 | if (pending & CAUSEF_IP7) |
80 | do_IRQ(LOONGSON_TIMER_IRQ); | 80 | do_IRQ(LOONGSON_TIMER_IRQ); |
81 | else if (pending & CAUSEF_IP6) { /* North Bridge, Perf counter */ | 81 | else if (pending & CAUSEF_IP6) { /* North Bridge, Perf counter */ |
82 | #ifdef CONFIG_OPROFILE | 82 | #if defined(CONFIG_OPROFILE) || defined(CONFIG_OPROFILE_MODULE) |
83 | do_IRQ(LOONGSON2_PERFCNT_IRQ); | 83 | do_IRQ(LOONGSON2_PERFCNT_IRQ); |
84 | #endif | 84 | #endif |
85 | bonito_irqdispatch(); | 85 | bonito_irqdispatch(); |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index d1f68aadbc4c..86f004dc8355 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -31,6 +31,16 @@ | |||
31 | #include <asm/war.h> | 31 | #include <asm/war.h> |
32 | #include <asm/uasm.h> | 32 | #include <asm/uasm.h> |
33 | 33 | ||
34 | /* | ||
35 | * TLB load/store/modify handlers. | ||
36 | * | ||
37 | * Only the fastpath gets synthesized at runtime, the slowpath for | ||
38 | * do_page_fault remains normal asm. | ||
39 | */ | ||
40 | extern void tlb_do_page_fault_0(void); | ||
41 | extern void tlb_do_page_fault_1(void); | ||
42 | |||
43 | |||
34 | static inline int r45k_bvahwbug(void) | 44 | static inline int r45k_bvahwbug(void) |
35 | { | 45 | { |
36 | /* XXX: We should probe for the presence of this bug, but we don't. */ | 46 | /* XXX: We should probe for the presence of this bug, but we don't. */ |
@@ -83,6 +93,7 @@ enum label_id { | |||
83 | label_nopage_tlbm, | 93 | label_nopage_tlbm, |
84 | label_smp_pgtable_change, | 94 | label_smp_pgtable_change, |
85 | label_r3000_write_probe_fail, | 95 | label_r3000_write_probe_fail, |
96 | label_large_segbits_fault, | ||
86 | #ifdef CONFIG_HUGETLB_PAGE | 97 | #ifdef CONFIG_HUGETLB_PAGE |
87 | label_tlb_huge_update, | 98 | label_tlb_huge_update, |
88 | #endif | 99 | #endif |
@@ -101,6 +112,7 @@ UASM_L_LA(_nopage_tlbs) | |||
101 | UASM_L_LA(_nopage_tlbm) | 112 | UASM_L_LA(_nopage_tlbm) |
102 | UASM_L_LA(_smp_pgtable_change) | 113 | UASM_L_LA(_smp_pgtable_change) |
103 | UASM_L_LA(_r3000_write_probe_fail) | 114 | UASM_L_LA(_r3000_write_probe_fail) |
115 | UASM_L_LA(_large_segbits_fault) | ||
104 | #ifdef CONFIG_HUGETLB_PAGE | 116 | #ifdef CONFIG_HUGETLB_PAGE |
105 | UASM_L_LA(_tlb_huge_update) | 117 | UASM_L_LA(_tlb_huge_update) |
106 | #endif | 118 | #endif |
@@ -157,6 +169,10 @@ static u32 tlb_handler[128] __cpuinitdata; | |||
157 | static struct uasm_label labels[128] __cpuinitdata; | 169 | static struct uasm_label labels[128] __cpuinitdata; |
158 | static struct uasm_reloc relocs[128] __cpuinitdata; | 170 | static struct uasm_reloc relocs[128] __cpuinitdata; |
159 | 171 | ||
172 | #ifdef CONFIG_64BIT | ||
173 | static int check_for_high_segbits __cpuinitdata; | ||
174 | #endif | ||
175 | |||
160 | #ifndef CONFIG_MIPS_PGD_C0_CONTEXT | 176 | #ifndef CONFIG_MIPS_PGD_C0_CONTEXT |
161 | /* | 177 | /* |
162 | * CONFIG_MIPS_PGD_C0_CONTEXT implies 64 bit and lack of pgd_current, | 178 | * CONFIG_MIPS_PGD_C0_CONTEXT implies 64 bit and lack of pgd_current, |
@@ -408,7 +424,7 @@ static __cpuinit __maybe_unused void build_convert_pte_to_entrylo(u32 **p, | |||
408 | UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); | 424 | UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); |
409 | } else { | 425 | } else { |
410 | #ifdef CONFIG_64BIT_PHYS_ADDR | 426 | #ifdef CONFIG_64BIT_PHYS_ADDR |
411 | uasm_i_dsrl(p, reg, reg, ilog2(_PAGE_GLOBAL)); | 427 | uasm_i_dsrl_safe(p, reg, reg, ilog2(_PAGE_GLOBAL)); |
412 | #else | 428 | #else |
413 | UASM_i_SRL(p, reg, reg, ilog2(_PAGE_GLOBAL)); | 429 | UASM_i_SRL(p, reg, reg, ilog2(_PAGE_GLOBAL)); |
414 | #endif | 430 | #endif |
@@ -532,7 +548,24 @@ build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
532 | * The vmalloc handling is not in the hotpath. | 548 | * The vmalloc handling is not in the hotpath. |
533 | */ | 549 | */ |
534 | uasm_i_dmfc0(p, tmp, C0_BADVADDR); | 550 | uasm_i_dmfc0(p, tmp, C0_BADVADDR); |
535 | uasm_il_bltz(p, r, tmp, label_vmalloc); | 551 | |
552 | if (check_for_high_segbits) { | ||
553 | /* | ||
554 | * The kernel currently implicitely assumes that the | ||
555 | * MIPS SEGBITS parameter for the processor is | ||
556 | * (PGDIR_SHIFT+PGDIR_BITS) or less, and will never | ||
557 | * allocate virtual addresses outside the maximum | ||
558 | * range for SEGBITS = (PGDIR_SHIFT+PGDIR_BITS). But | ||
559 | * that doesn't prevent user code from accessing the | ||
560 | * higher xuseg addresses. Here, we make sure that | ||
561 | * everything but the lower xuseg addresses goes down | ||
562 | * the module_alloc/vmalloc path. | ||
563 | */ | ||
564 | uasm_i_dsrl_safe(p, ptr, tmp, PGDIR_SHIFT + PGD_ORDER + PAGE_SHIFT - 3); | ||
565 | uasm_il_bnez(p, r, ptr, label_vmalloc); | ||
566 | } else { | ||
567 | uasm_il_bltz(p, r, tmp, label_vmalloc); | ||
568 | } | ||
536 | /* No uasm_i_nop needed here, since the next insn doesn't touch TMP. */ | 569 | /* No uasm_i_nop needed here, since the next insn doesn't touch TMP. */ |
537 | 570 | ||
538 | #ifdef CONFIG_MIPS_PGD_C0_CONTEXT | 571 | #ifdef CONFIG_MIPS_PGD_C0_CONTEXT |
@@ -549,14 +582,14 @@ build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
549 | * SMTC uses TCBind value as "CPU" index | 582 | * SMTC uses TCBind value as "CPU" index |
550 | */ | 583 | */ |
551 | uasm_i_mfc0(p, ptr, C0_TCBIND); | 584 | uasm_i_mfc0(p, ptr, C0_TCBIND); |
552 | uasm_i_dsrl(p, ptr, ptr, 19); | 585 | uasm_i_dsrl_safe(p, ptr, ptr, 19); |
553 | # else | 586 | # else |
554 | /* | 587 | /* |
555 | * 64 bit SMP running in XKPHYS has smp_processor_id() << 3 | 588 | * 64 bit SMP running in XKPHYS has smp_processor_id() << 3 |
556 | * stored in CONTEXT. | 589 | * stored in CONTEXT. |
557 | */ | 590 | */ |
558 | uasm_i_dmfc0(p, ptr, C0_CONTEXT); | 591 | uasm_i_dmfc0(p, ptr, C0_CONTEXT); |
559 | uasm_i_dsrl(p, ptr, ptr, 23); | 592 | uasm_i_dsrl_safe(p, ptr, ptr, 23); |
560 | # endif | 593 | # endif |
561 | UASM_i_LA_mostly(p, tmp, pgdc); | 594 | UASM_i_LA_mostly(p, tmp, pgdc); |
562 | uasm_i_daddu(p, ptr, ptr, tmp); | 595 | uasm_i_daddu(p, ptr, ptr, tmp); |
@@ -569,44 +602,78 @@ build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
569 | 602 | ||
570 | uasm_l_vmalloc_done(l, *p); | 603 | uasm_l_vmalloc_done(l, *p); |
571 | 604 | ||
572 | if (PGDIR_SHIFT - 3 < 32) /* get pgd offset in bytes */ | 605 | /* get pgd offset in bytes */ |
573 | uasm_i_dsrl(p, tmp, tmp, PGDIR_SHIFT-3); | 606 | uasm_i_dsrl_safe(p, tmp, tmp, PGDIR_SHIFT - 3); |
574 | else | ||
575 | uasm_i_dsrl32(p, tmp, tmp, PGDIR_SHIFT - 3 - 32); | ||
576 | 607 | ||
577 | uasm_i_andi(p, tmp, tmp, (PTRS_PER_PGD - 1)<<3); | 608 | uasm_i_andi(p, tmp, tmp, (PTRS_PER_PGD - 1)<<3); |
578 | uasm_i_daddu(p, ptr, ptr, tmp); /* add in pgd offset */ | 609 | uasm_i_daddu(p, ptr, ptr, tmp); /* add in pgd offset */ |
579 | #ifndef __PAGETABLE_PMD_FOLDED | 610 | #ifndef __PAGETABLE_PMD_FOLDED |
580 | uasm_i_dmfc0(p, tmp, C0_BADVADDR); /* get faulting address */ | 611 | uasm_i_dmfc0(p, tmp, C0_BADVADDR); /* get faulting address */ |
581 | uasm_i_ld(p, ptr, 0, ptr); /* get pmd pointer */ | 612 | uasm_i_ld(p, ptr, 0, ptr); /* get pmd pointer */ |
582 | uasm_i_dsrl(p, tmp, tmp, PMD_SHIFT-3); /* get pmd offset in bytes */ | 613 | uasm_i_dsrl_safe(p, tmp, tmp, PMD_SHIFT-3); /* get pmd offset in bytes */ |
583 | uasm_i_andi(p, tmp, tmp, (PTRS_PER_PMD - 1)<<3); | 614 | uasm_i_andi(p, tmp, tmp, (PTRS_PER_PMD - 1)<<3); |
584 | uasm_i_daddu(p, ptr, ptr, tmp); /* add in pmd offset */ | 615 | uasm_i_daddu(p, ptr, ptr, tmp); /* add in pmd offset */ |
585 | #endif | 616 | #endif |
586 | } | 617 | } |
587 | 618 | ||
619 | enum vmalloc64_mode {not_refill, refill}; | ||
588 | /* | 620 | /* |
589 | * BVADDR is the faulting address, PTR is scratch. | 621 | * BVADDR is the faulting address, PTR is scratch. |
590 | * PTR will hold the pgd for vmalloc. | 622 | * PTR will hold the pgd for vmalloc. |
591 | */ | 623 | */ |
592 | static void __cpuinit | 624 | static void __cpuinit |
593 | build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | 625 | build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, |
594 | unsigned int bvaddr, unsigned int ptr) | 626 | unsigned int bvaddr, unsigned int ptr, |
627 | enum vmalloc64_mode mode) | ||
595 | { | 628 | { |
596 | long swpd = (long)swapper_pg_dir; | 629 | long swpd = (long)swapper_pg_dir; |
630 | int single_insn_swpd; | ||
631 | int did_vmalloc_branch = 0; | ||
632 | |||
633 | single_insn_swpd = uasm_in_compat_space_p(swpd) && !uasm_rel_lo(swpd); | ||
597 | 634 | ||
598 | uasm_l_vmalloc(l, *p); | 635 | uasm_l_vmalloc(l, *p); |
599 | 636 | ||
600 | if (uasm_in_compat_space_p(swpd) && !uasm_rel_lo(swpd)) { | 637 | if (mode == refill && check_for_high_segbits) { |
601 | uasm_il_b(p, r, label_vmalloc_done); | 638 | if (single_insn_swpd) { |
602 | uasm_i_lui(p, ptr, uasm_rel_hi(swpd)); | 639 | uasm_il_bltz(p, r, bvaddr, label_vmalloc_done); |
603 | } else { | 640 | uasm_i_lui(p, ptr, uasm_rel_hi(swpd)); |
604 | UASM_i_LA_mostly(p, ptr, swpd); | 641 | did_vmalloc_branch = 1; |
605 | uasm_il_b(p, r, label_vmalloc_done); | 642 | /* fall through */ |
606 | if (uasm_in_compat_space_p(swpd)) | 643 | } else { |
607 | uasm_i_addiu(p, ptr, ptr, uasm_rel_lo(swpd)); | 644 | uasm_il_bgez(p, r, bvaddr, label_large_segbits_fault); |
608 | else | 645 | } |
609 | uasm_i_daddiu(p, ptr, ptr, uasm_rel_lo(swpd)); | 646 | } |
647 | if (!did_vmalloc_branch) { | ||
648 | if (uasm_in_compat_space_p(swpd) && !uasm_rel_lo(swpd)) { | ||
649 | uasm_il_b(p, r, label_vmalloc_done); | ||
650 | uasm_i_lui(p, ptr, uasm_rel_hi(swpd)); | ||
651 | } else { | ||
652 | UASM_i_LA_mostly(p, ptr, swpd); | ||
653 | uasm_il_b(p, r, label_vmalloc_done); | ||
654 | if (uasm_in_compat_space_p(swpd)) | ||
655 | uasm_i_addiu(p, ptr, ptr, uasm_rel_lo(swpd)); | ||
656 | else | ||
657 | uasm_i_daddiu(p, ptr, ptr, uasm_rel_lo(swpd)); | ||
658 | } | ||
659 | } | ||
660 | if (mode == refill && check_for_high_segbits) { | ||
661 | uasm_l_large_segbits_fault(l, *p); | ||
662 | /* | ||
663 | * We get here if we are an xsseg address, or if we are | ||
664 | * an xuseg address above (PGDIR_SHIFT+PGDIR_BITS) boundary. | ||
665 | * | ||
666 | * Ignoring xsseg (assume disabled so would generate | ||
667 | * (address errors?), the only remaining possibility | ||
668 | * is the upper xuseg addresses. On processors with | ||
669 | * TLB_SEGBITS <= PGDIR_SHIFT+PGDIR_BITS, these | ||
670 | * addresses would have taken an address error. We try | ||
671 | * to mimic that here by taking a load/istream page | ||
672 | * fault. | ||
673 | */ | ||
674 | UASM_i_LA(p, ptr, (unsigned long)tlb_do_page_fault_0); | ||
675 | uasm_i_jr(p, ptr); | ||
676 | uasm_i_nop(p); | ||
610 | } | 677 | } |
611 | } | 678 | } |
612 | 679 | ||
@@ -720,9 +787,9 @@ static void __cpuinit build_update_entries(u32 **p, unsigned int tmp, | |||
720 | UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */ | 787 | UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */ |
721 | UASM_i_ROTR(p, ptep, ptep, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); | 788 | UASM_i_ROTR(p, ptep, ptep, ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); |
722 | } else { | 789 | } else { |
723 | uasm_i_dsrl(p, tmp, tmp, ilog2(_PAGE_GLOBAL)); /* convert to entrylo0 */ | 790 | uasm_i_dsrl_safe(p, tmp, tmp, ilog2(_PAGE_GLOBAL)); /* convert to entrylo0 */ |
724 | UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */ | 791 | UASM_i_MTC0(p, tmp, C0_ENTRYLO0); /* load it */ |
725 | uasm_i_dsrl(p, ptep, ptep, ilog2(_PAGE_GLOBAL)); /* convert to entrylo1 */ | 792 | uasm_i_dsrl_safe(p, ptep, ptep, ilog2(_PAGE_GLOBAL)); /* convert to entrylo1 */ |
726 | } | 793 | } |
727 | UASM_i_MTC0(p, ptep, C0_ENTRYLO1); /* load it */ | 794 | UASM_i_MTC0(p, ptep, C0_ENTRYLO1); /* load it */ |
728 | } else { | 795 | } else { |
@@ -793,9 +860,9 @@ static void __cpuinit build_r4000_tlb_refill_handler(void) | |||
793 | uasm_i_dmfc0(&p, K0, C0_BADVADDR); | 860 | uasm_i_dmfc0(&p, K0, C0_BADVADDR); |
794 | uasm_i_dmfc0(&p, K1, C0_ENTRYHI); | 861 | uasm_i_dmfc0(&p, K1, C0_ENTRYHI); |
795 | uasm_i_xor(&p, K0, K0, K1); | 862 | uasm_i_xor(&p, K0, K0, K1); |
796 | uasm_i_dsrl32(&p, K1, K0, 62 - 32); | 863 | uasm_i_dsrl_safe(&p, K1, K0, 62); |
797 | uasm_i_dsrl(&p, K0, K0, 12 + 1); | 864 | uasm_i_dsrl_safe(&p, K0, K0, 12 + 1); |
798 | uasm_i_dsll32(&p, K0, K0, 64 + 12 + 1 - segbits - 32); | 865 | uasm_i_dsll_safe(&p, K0, K0, 64 + 12 + 1 - segbits); |
799 | uasm_i_or(&p, K0, K0, K1); | 866 | uasm_i_or(&p, K0, K0, K1); |
800 | uasm_il_bnez(&p, &r, K0, label_leave); | 867 | uasm_il_bnez(&p, &r, K0, label_leave); |
801 | /* No need for uasm_i_nop */ | 868 | /* No need for uasm_i_nop */ |
@@ -825,7 +892,7 @@ static void __cpuinit build_r4000_tlb_refill_handler(void) | |||
825 | #endif | 892 | #endif |
826 | 893 | ||
827 | #ifdef CONFIG_64BIT | 894 | #ifdef CONFIG_64BIT |
828 | build_get_pgd_vmalloc64(&p, &l, &r, K0, K1); | 895 | build_get_pgd_vmalloc64(&p, &l, &r, K0, K1, refill); |
829 | #endif | 896 | #endif |
830 | 897 | ||
831 | /* | 898 | /* |
@@ -935,15 +1002,6 @@ static void __cpuinit build_r4000_tlb_refill_handler(void) | |||
935 | } | 1002 | } |
936 | 1003 | ||
937 | /* | 1004 | /* |
938 | * TLB load/store/modify handlers. | ||
939 | * | ||
940 | * Only the fastpath gets synthesized at runtime, the slowpath for | ||
941 | * do_page_fault remains normal asm. | ||
942 | */ | ||
943 | extern void tlb_do_page_fault_0(void); | ||
944 | extern void tlb_do_page_fault_1(void); | ||
945 | |||
946 | /* | ||
947 | * 128 instructions for the fastpath handler is generous and should | 1005 | * 128 instructions for the fastpath handler is generous and should |
948 | * never be exceeded. | 1006 | * never be exceeded. |
949 | */ | 1007 | */ |
@@ -1302,7 +1360,7 @@ build_r4000_tlbchange_handler_tail(u32 **p, struct uasm_label **l, | |||
1302 | uasm_i_eret(p); /* return from trap */ | 1360 | uasm_i_eret(p); /* return from trap */ |
1303 | 1361 | ||
1304 | #ifdef CONFIG_64BIT | 1362 | #ifdef CONFIG_64BIT |
1305 | build_get_pgd_vmalloc64(p, l, r, tmp, ptr); | 1363 | build_get_pgd_vmalloc64(p, l, r, tmp, ptr, not_refill); |
1306 | #endif | 1364 | #endif |
1307 | } | 1365 | } |
1308 | 1366 | ||
@@ -1322,9 +1380,9 @@ static void __cpuinit build_r4000_tlb_load_handler(void) | |||
1322 | uasm_i_dmfc0(&p, K0, C0_BADVADDR); | 1380 | uasm_i_dmfc0(&p, K0, C0_BADVADDR); |
1323 | uasm_i_dmfc0(&p, K1, C0_ENTRYHI); | 1381 | uasm_i_dmfc0(&p, K1, C0_ENTRYHI); |
1324 | uasm_i_xor(&p, K0, K0, K1); | 1382 | uasm_i_xor(&p, K0, K0, K1); |
1325 | uasm_i_dsrl32(&p, K1, K0, 62 - 32); | 1383 | uasm_i_dsrl_safe(&p, K1, K0, 62); |
1326 | uasm_i_dsrl(&p, K0, K0, 12 + 1); | 1384 | uasm_i_dsrl_safe(&p, K0, K0, 12 + 1); |
1327 | uasm_i_dsll32(&p, K0, K0, 64 + 12 + 1 - segbits - 32); | 1385 | uasm_i_dsll_safe(&p, K0, K0, 64 + 12 + 1 - segbits); |
1328 | uasm_i_or(&p, K0, K0, K1); | 1386 | uasm_i_or(&p, K0, K0, K1); |
1329 | uasm_il_bnez(&p, &r, K0, label_leave); | 1387 | uasm_il_bnez(&p, &r, K0, label_leave); |
1330 | /* No need for uasm_i_nop */ | 1388 | /* No need for uasm_i_nop */ |
@@ -1526,6 +1584,10 @@ void __cpuinit build_tlb_refill_handler(void) | |||
1526 | */ | 1584 | */ |
1527 | static int run_once = 0; | 1585 | static int run_once = 0; |
1528 | 1586 | ||
1587 | #ifdef CONFIG_64BIT | ||
1588 | check_for_high_segbits = current_cpu_data.vmbits > (PGDIR_SHIFT + PGD_ORDER + PAGE_SHIFT - 3); | ||
1589 | #endif | ||
1590 | |||
1529 | switch (current_cpu_type()) { | 1591 | switch (current_cpu_type()) { |
1530 | case CPU_R2000: | 1592 | case CPU_R2000: |
1531 | case CPU_R3000: | 1593 | case CPU_R3000: |
diff --git a/arch/mips/nxp/pnx8550/common/reset.c b/arch/mips/nxp/pnx8550/common/reset.c index 76bc3ec634ee..fadd8744a6bc 100644 --- a/arch/mips/nxp/pnx8550/common/reset.c +++ b/arch/mips/nxp/pnx8550/common/reset.c | |||
@@ -20,6 +20,8 @@ | |||
20 | * Reset the PNX8550 board. | 20 | * Reset the PNX8550 board. |
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | #include <linux/kernel.h> | ||
24 | |||
23 | #include <asm/reboot.h> | 25 | #include <asm/reboot.h> |
24 | #include <glb.h> | 26 | #include <glb.h> |
25 | 27 | ||
diff --git a/arch/mips/pci/pci-sb1250.c b/arch/mips/pci/pci-sb1250.c index ada24e6f951f..1711e8e101bc 100644 --- a/arch/mips/pci/pci-sb1250.c +++ b/arch/mips/pci/pci-sb1250.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/mm.h> | 37 | #include <linux/mm.h> |
38 | #include <linux/console.h> | 38 | #include <linux/console.h> |
39 | #include <linux/tty.h> | 39 | #include <linux/tty.h> |
40 | #include <linux/vt.h> | ||
40 | 41 | ||
41 | #include <asm/io.h> | 42 | #include <asm/io.h> |
42 | 43 | ||
@@ -254,7 +255,7 @@ static int __init sb1250_pcibios_init(void) | |||
254 | * XXX ehs: Should this happen in PCI Device mode? | 255 | * XXX ehs: Should this happen in PCI Device mode? |
255 | */ | 256 | */ |
256 | io_map_base = ioremap(A_PHYS_LDTPCI_IO_MATCH_BYTES, 1024 * 1024); | 257 | io_map_base = ioremap(A_PHYS_LDTPCI_IO_MATCH_BYTES, 1024 * 1024); |
257 | sb1250_controller.io_map_base = io_map_base; | 258 | sb1250_controller.io_map_base = (unsigned long)io_map_base; |
258 | set_io_port_base((unsigned long)io_map_base); | 259 | set_io_port_base((unsigned long)io_map_base); |
259 | 260 | ||
260 | #ifdef CONFIG_SIBYTE_HAS_LDT | 261 | #ifdef CONFIG_SIBYTE_HAS_LDT |
diff --git a/arch/mips/sgi-ip22/ip22-berr.c b/arch/mips/sgi-ip22/ip22-berr.c index de6a0cc32fea..911d3999c0c7 100644 --- a/arch/mips/sgi-ip22/ip22-berr.c +++ b/arch/mips/sgi-ip22/ip22-berr.c | |||
@@ -89,7 +89,7 @@ static void print_buserr(void) | |||
89 | void ip22_be_interrupt(int irq) | 89 | void ip22_be_interrupt(int irq) |
90 | { | 90 | { |
91 | const int field = 2 * sizeof(unsigned long); | 91 | const int field = 2 * sizeof(unsigned long); |
92 | const struct pt_regs *regs = get_irq_regs(); | 92 | struct pt_regs *regs = get_irq_regs(); |
93 | 93 | ||
94 | save_and_clear_buserr(); | 94 | save_and_clear_buserr(); |
95 | print_buserr(); | 95 | print_buserr(); |
diff --git a/arch/mips/sgi-ip22/ip28-berr.c b/arch/mips/sgi-ip22/ip28-berr.c index 30e12e2ec4b5..88c684e05a3d 100644 --- a/arch/mips/sgi-ip22/ip28-berr.c +++ b/arch/mips/sgi-ip22/ip28-berr.c | |||
@@ -453,7 +453,7 @@ mips_be_fatal: | |||
453 | 453 | ||
454 | void ip22_be_interrupt(int irq) | 454 | void ip22_be_interrupt(int irq) |
455 | { | 455 | { |
456 | const struct pt_regs *regs = get_irq_regs(); | 456 | struct pt_regs *regs = get_irq_regs(); |
457 | 457 | ||
458 | count_be_interrupt++; | 458 | count_be_interrupt++; |
459 | 459 | ||
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c index 5277aac96b0f..c308989fc464 100644 --- a/arch/mips/sibyte/swarm/setup.c +++ b/arch/mips/sibyte/swarm/setup.c | |||
@@ -145,15 +145,14 @@ void __init plat_mem_setup(void) | |||
145 | 145 | ||
146 | #ifdef CONFIG_VT | 146 | #ifdef CONFIG_VT |
147 | screen_info = (struct screen_info) { | 147 | screen_info = (struct screen_info) { |
148 | 0, 0, /* orig-x, orig-y */ | 148 | .orig_video_page = 52, |
149 | 0, /* unused */ | 149 | .orig_video_mode = 3, |
150 | 52, /* orig_video_page */ | 150 | .orig_video_cols = 80, |
151 | 3, /* orig_video_mode */ | 151 | .flags = 12, |
152 | 80, /* orig_video_cols */ | 152 | .orig_video_ega_bx = 3, |
153 | 4626, 3, 9, /* unused, ega_bx, unused */ | 153 | .orig_video_lines = 25, |
154 | 25, /* orig_video_lines */ | 154 | .orig_video_isVGA = 0x22, |
155 | 0x22, /* orig_video_isVGA */ | 155 | .orig_video_points = 16, |
156 | 16 /* orig_video_points */ | ||
157 | }; | 156 | }; |
158 | /* XXXKW for CFE, get lines/cols from environment */ | 157 | /* XXXKW for CFE, get lines/cols from environment */ |
159 | #endif | 158 | #endif |
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index a1dcfa3ab17d..30a3e9776123 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h | |||
@@ -347,6 +347,7 @@ extern void __iomem *early_ioremap(resource_size_t phys_addr, | |||
347 | extern void __iomem *early_memremap(resource_size_t phys_addr, | 347 | extern void __iomem *early_memremap(resource_size_t phys_addr, |
348 | unsigned long size); | 348 | unsigned long size); |
349 | extern void early_iounmap(void __iomem *addr, unsigned long size); | 349 | extern void early_iounmap(void __iomem *addr, unsigned long size); |
350 | extern void fixup_early_ioremap(void); | ||
350 | 351 | ||
351 | #define IO_SPACE_LIMIT 0xffff | 352 | #define IO_SPACE_LIMIT 0xffff |
352 | 353 | ||
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 127b8718abfb..eb2789c3f721 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -2545,6 +2545,9 @@ void irq_force_complete_move(int irq) | |||
2545 | struct irq_desc *desc = irq_to_desc(irq); | 2545 | struct irq_desc *desc = irq_to_desc(irq); |
2546 | struct irq_cfg *cfg = desc->chip_data; | 2546 | struct irq_cfg *cfg = desc->chip_data; |
2547 | 2547 | ||
2548 | if (!cfg) | ||
2549 | return; | ||
2550 | |||
2548 | __irq_complete_move(&desc, cfg->vector); | 2551 | __irq_complete_move(&desc, cfg->vector); |
2549 | } | 2552 | } |
2550 | #else | 2553 | #else |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index d360b56e9825..b6215b9798e2 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -929,7 +929,8 @@ static int fill_powernow_table_pstate(struct powernow_k8_data *data, | |||
929 | powernow_table[i].index = index; | 929 | powernow_table[i].index = index; |
930 | 930 | ||
931 | /* Frequency may be rounded for these */ | 931 | /* Frequency may be rounded for these */ |
932 | if (boot_cpu_data.x86 == 0x10 || boot_cpu_data.x86 == 0x11) { | 932 | if ((boot_cpu_data.x86 == 0x10 && boot_cpu_data.x86_model < 10) |
933 | || boot_cpu_data.x86 == 0x11) { | ||
933 | powernow_table[i].frequency = | 934 | powernow_table[i].frequency = |
934 | freq_from_fid_did(lo & 0x3f, (lo >> 6) & 7); | 935 | freq_from_fid_did(lo & 0x3f, (lo >> 6) & 7); |
935 | } else | 936 | } else |
diff --git a/arch/x86/lib/rwsem_64.S b/arch/x86/lib/rwsem_64.S index 15acecf0d7aa..41fcf00e49df 100644 --- a/arch/x86/lib/rwsem_64.S +++ b/arch/x86/lib/rwsem_64.S | |||
@@ -60,7 +60,7 @@ ENTRY(call_rwsem_down_write_failed) | |||
60 | ENDPROC(call_rwsem_down_write_failed) | 60 | ENDPROC(call_rwsem_down_write_failed) |
61 | 61 | ||
62 | ENTRY(call_rwsem_wake) | 62 | ENTRY(call_rwsem_wake) |
63 | decw %dx /* do nothing if still outstanding active readers */ | 63 | decl %edx /* do nothing if still outstanding active readers */ |
64 | jnz 1f | 64 | jnz 1f |
65 | save_common_regs | 65 | save_common_regs |
66 | movq %rax,%rdi | 66 | movq %rax,%rdi |
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 5eb1ba74a3a9..12e4d2d3c110 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -448,6 +448,20 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx) | |||
448 | static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initdata; | 448 | static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initdata; |
449 | static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata; | 449 | static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata; |
450 | 450 | ||
451 | void __init fixup_early_ioremap(void) | ||
452 | { | ||
453 | int i; | ||
454 | |||
455 | for (i = 0; i < FIX_BTMAPS_SLOTS; i++) { | ||
456 | if (prev_map[i]) { | ||
457 | WARN_ON(1); | ||
458 | break; | ||
459 | } | ||
460 | } | ||
461 | |||
462 | early_ioremap_init(); | ||
463 | } | ||
464 | |||
451 | static int __init check_early_ioremap_leak(void) | 465 | static int __init check_early_ioremap_leak(void) |
452 | { | 466 | { |
453 | int count = 0; | 467 | int count = 0; |
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index 1a8faf09afed..792854003ed3 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/e820.h> | 18 | #include <asm/e820.h> |
19 | #include <asm/tlb.h> | 19 | #include <asm/tlb.h> |
20 | #include <asm/tlbflush.h> | 20 | #include <asm/tlbflush.h> |
21 | #include <asm/io.h> | ||
21 | 22 | ||
22 | unsigned int __VMALLOC_RESERVE = 128 << 20; | 23 | unsigned int __VMALLOC_RESERVE = 128 << 20; |
23 | 24 | ||
@@ -128,6 +129,7 @@ static int __init parse_reservetop(char *arg) | |||
128 | 129 | ||
129 | address = memparse(arg, &arg); | 130 | address = memparse(arg, &arg); |
130 | reserve_top_address(address); | 131 | reserve_top_address(address); |
132 | fixup_early_ioremap(); | ||
131 | return 0; | 133 | return 0; |
132 | } | 134 | } |
133 | early_param("reservetop", parse_reservetop); | 135 | early_param("reservetop", parse_reservetop); |
diff --git a/crypto/async_tx/async_raid6_recov.c b/crypto/async_tx/async_raid6_recov.c index 943f2abac9b4..ce038d861eb9 100644 --- a/crypto/async_tx/async_raid6_recov.c +++ b/crypto/async_tx/async_raid6_recov.c | |||
@@ -324,6 +324,7 @@ struct dma_async_tx_descriptor * | |||
324 | async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb, | 324 | async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb, |
325 | struct page **blocks, struct async_submit_ctl *submit) | 325 | struct page **blocks, struct async_submit_ctl *submit) |
326 | { | 326 | { |
327 | void *scribble = submit->scribble; | ||
327 | int non_zero_srcs, i; | 328 | int non_zero_srcs, i; |
328 | 329 | ||
329 | BUG_ON(faila == failb); | 330 | BUG_ON(faila == failb); |
@@ -332,11 +333,13 @@ async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb, | |||
332 | 333 | ||
333 | pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); | 334 | pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); |
334 | 335 | ||
335 | /* we need to preserve the contents of 'blocks' for the async | 336 | /* if a dma resource is not available or a scribble buffer is not |
336 | * case, so punt to synchronous if a scribble buffer is not available | 337 | * available punt to the synchronous path. In the 'dma not |
338 | * available' case be sure to use the scribble buffer to | ||
339 | * preserve the content of 'blocks' as the caller intended. | ||
337 | */ | 340 | */ |
338 | if (!submit->scribble) { | 341 | if (!async_dma_find_channel(DMA_PQ) || !scribble) { |
339 | void **ptrs = (void **) blocks; | 342 | void **ptrs = scribble ? scribble : (void **) blocks; |
340 | 343 | ||
341 | async_tx_quiesce(&submit->depend_tx); | 344 | async_tx_quiesce(&submit->depend_tx); |
342 | for (i = 0; i < disks; i++) | 345 | for (i = 0; i < disks; i++) |
@@ -406,11 +409,13 @@ async_raid6_datap_recov(int disks, size_t bytes, int faila, | |||
406 | 409 | ||
407 | pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); | 410 | pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); |
408 | 411 | ||
409 | /* we need to preserve the contents of 'blocks' for the async | 412 | /* if a dma resource is not available or a scribble buffer is not |
410 | * case, so punt to synchronous if a scribble buffer is not available | 413 | * available punt to the synchronous path. In the 'dma not |
414 | * available' case be sure to use the scribble buffer to | ||
415 | * preserve the content of 'blocks' as the caller intended. | ||
411 | */ | 416 | */ |
412 | if (!scribble) { | 417 | if (!async_dma_find_channel(DMA_PQ) || !scribble) { |
413 | void **ptrs = (void **) blocks; | 418 | void **ptrs = scribble ? scribble : (void **) blocks; |
414 | 419 | ||
415 | async_tx_quiesce(&submit->depend_tx); | 420 | async_tx_quiesce(&submit->depend_tx); |
416 | for (i = 0; i < disks; i++) | 421 | for (i = 0; i < disks; i++) |
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 4164dd244dd0..d94b8f0bd743 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
@@ -424,7 +424,7 @@ static struct pcmcia_device_id pcmcia_devices[] = { | |||
424 | PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420), | 424 | PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420), |
425 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), | 425 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), |
426 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), | 426 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), |
427 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x3e520e17), | 427 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x55d5bffb), |
428 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10), | 428 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10), |
429 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), | 429 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), |
430 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), | 430 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), |
@@ -446,7 +446,7 @@ static struct pcmcia_device_id pcmcia_devices[] = { | |||
446 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), | 446 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), |
447 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), | 447 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), |
448 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), | 448 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), |
449 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x9351e59d), | 449 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x7558f133), |
450 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47), | 450 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47), |
451 | PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), | 451 | PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), |
452 | PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918), | 452 | PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918), |
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 0fa2e4a0835d..c1ab303455cf 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -879,8 +879,8 @@ static int isicom_open(struct tty_struct *tty, struct file *filp) | |||
879 | if (tport == NULL) | 879 | if (tport == NULL) |
880 | return -ENODEV; | 880 | return -ENODEV; |
881 | port = container_of(tport, struct isi_port, port); | 881 | port = container_of(tport, struct isi_port, port); |
882 | card = &isi_card[BOARD(tty->index)]; | ||
883 | 882 | ||
883 | tty->driver_data = port; | ||
884 | return tty_port_open(tport, tty, filp); | 884 | return tty_port_open(tport, tty, filp); |
885 | } | 885 | } |
886 | 886 | ||
@@ -936,7 +936,12 @@ static void isicom_shutdown(struct tty_port *port) | |||
936 | static void isicom_close(struct tty_struct *tty, struct file *filp) | 936 | static void isicom_close(struct tty_struct *tty, struct file *filp) |
937 | { | 937 | { |
938 | struct isi_port *ip = tty->driver_data; | 938 | struct isi_port *ip = tty->driver_data; |
939 | struct tty_port *port = &ip->port; | 939 | struct tty_port *port; |
940 | |||
941 | if (ip == NULL) | ||
942 | return; | ||
943 | |||
944 | port = &ip->port; | ||
940 | if (isicom_paranoia_check(ip, tty->name, "isicom_close")) | 945 | if (isicom_paranoia_check(ip, tty->name, "isicom_close")) |
941 | return; | 946 | return; |
942 | tty_port_close(port, tty, filp); | 947 | tty_port_close(port, tty, filp); |
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 4cd6c527ee41..4e395c956a09 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c | |||
@@ -827,6 +827,8 @@ static int stli_open(struct tty_struct *tty, struct file *filp) | |||
827 | return -ENODEV; | 827 | return -ENODEV; |
828 | if (portp->devnr < 1) | 828 | if (portp->devnr < 1) |
829 | return -ENODEV; | 829 | return -ENODEV; |
830 | |||
831 | tty->driver_data = portp; | ||
830 | return tty_port_open(&portp->port, tty, filp); | 832 | return tty_port_open(&portp->port, tty, filp); |
831 | } | 833 | } |
832 | 834 | ||
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 47023053ee85..d2692d443f7b 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c | |||
@@ -1011,6 +1011,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) | |||
1011 | if (!info->ioaddr) | 1011 | if (!info->ioaddr) |
1012 | return -ENODEV; | 1012 | return -ENODEV; |
1013 | 1013 | ||
1014 | tty->driver_data = info; | ||
1014 | return tty_port_open(&info->port, tty, filp); | 1015 | return tty_port_open(&info->port, tty, filp); |
1015 | } | 1016 | } |
1016 | 1017 | ||
@@ -1074,7 +1075,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp) | |||
1074 | struct mxser_port *info = tty->driver_data; | 1075 | struct mxser_port *info = tty->driver_data; |
1075 | struct tty_port *port = &info->port; | 1076 | struct tty_port *port = &info->port; |
1076 | 1077 | ||
1077 | if (tty->index == MXSER_PORTS) | 1078 | if (tty->index == MXSER_PORTS || info == NULL) |
1078 | return; | 1079 | return; |
1079 | if (tty_port_close_start(port, tty, filp) == 0) | 1080 | if (tty_port_close_start(port, tty, filp) == 0) |
1080 | return; | 1081 | return; |
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index 0a8d1e56c993..b02332a5412f 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c | |||
@@ -909,6 +909,7 @@ static int rc_open(struct tty_struct *tty, struct file *filp) | |||
909 | if (error) | 909 | if (error) |
910 | return error; | 910 | return error; |
911 | 911 | ||
912 | tty->driver_data = port; | ||
912 | return tty_port_open(&port->port, tty, filp); | 913 | return tty_port_open(&port->port, tty, filp); |
913 | } | 914 | } |
914 | 915 | ||
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 0e511d61f544..6049fd731924 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c | |||
@@ -724,7 +724,6 @@ static int stl_open(struct tty_struct *tty, struct file *filp) | |||
724 | { | 724 | { |
725 | struct stlport *portp; | 725 | struct stlport *portp; |
726 | struct stlbrd *brdp; | 726 | struct stlbrd *brdp; |
727 | struct tty_port *port; | ||
728 | unsigned int minordev, brdnr, panelnr; | 727 | unsigned int minordev, brdnr, panelnr; |
729 | int portnr; | 728 | int portnr; |
730 | 729 | ||
@@ -754,7 +753,8 @@ static int stl_open(struct tty_struct *tty, struct file *filp) | |||
754 | portp = brdp->panels[panelnr]->ports[portnr]; | 753 | portp = brdp->panels[panelnr]->ports[portnr]; |
755 | if (portp == NULL) | 754 | if (portp == NULL) |
756 | return -ENODEV; | 755 | return -ENODEV; |
757 | port = &portp->port; | 756 | |
757 | tty->driver_data = portp; | ||
758 | return tty_port_open(&portp->port, tty, filp); | 758 | return tty_port_open(&portp->port, tty, filp); |
759 | 759 | ||
760 | } | 760 | } |
@@ -841,7 +841,8 @@ static void stl_close(struct tty_struct *tty, struct file *filp) | |||
841 | pr_debug("stl_close(tty=%p,filp=%p)\n", tty, filp); | 841 | pr_debug("stl_close(tty=%p,filp=%p)\n", tty, filp); |
842 | 842 | ||
843 | portp = tty->driver_data; | 843 | portp = tty->driver_data; |
844 | BUG_ON(portp == NULL); | 844 | if(portp == NULL) |
845 | return; | ||
845 | tty_port_close(&portp->port, tty, filp); | 846 | tty_port_close(&portp->port, tty, filp); |
846 | } | 847 | } |
847 | 848 | ||
diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c index 3ebc61067e54..75fcf1ac8bb7 100644 --- a/drivers/dma/txx9dmac.c +++ b/drivers/dma/txx9dmac.c | |||
@@ -1359,3 +1359,5 @@ module_exit(txx9dmac_exit); | |||
1359 | MODULE_LICENSE("GPL"); | 1359 | MODULE_LICENSE("GPL"); |
1360 | MODULE_DESCRIPTION("TXx9 DMA Controller driver"); | 1360 | MODULE_DESCRIPTION("TXx9 DMA Controller driver"); |
1361 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); | 1361 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); |
1362 | MODULE_ALIAS("platform:txx9dmac"); | ||
1363 | MODULE_ALIAS("platform:txx9dmac-chan"); | ||
diff --git a/drivers/edac/edac_mce_amd.c b/drivers/edac/edac_mce_amd.c index f5b6d9fe4def..97e64bcdbc06 100644 --- a/drivers/edac/edac_mce_amd.c +++ b/drivers/edac/edac_mce_amd.c | |||
@@ -294,7 +294,6 @@ wrong_ls_mce: | |||
294 | void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors) | 294 | void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors) |
295 | { | 295 | { |
296 | u32 ec = ERROR_CODE(regs->nbsl); | 296 | u32 ec = ERROR_CODE(regs->nbsl); |
297 | u32 xec = EXT_ERROR_CODE(regs->nbsl); | ||
298 | 297 | ||
299 | if (!handle_errors) | 298 | if (!handle_errors) |
300 | return; | 299 | return; |
@@ -324,7 +323,7 @@ void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors) | |||
324 | pr_cont("\n"); | 323 | pr_cont("\n"); |
325 | } | 324 | } |
326 | 325 | ||
327 | pr_emerg("%s.\n", EXT_ERR_MSG(xec)); | 326 | pr_emerg("%s.\n", EXT_ERR_MSG(regs->nbsl)); |
328 | 327 | ||
329 | if (BUS_ERROR(ec) && nb_bus_decoder) | 328 | if (BUS_ERROR(ec) && nb_bus_decoder) |
330 | nb_bus_decoder(node_id, regs); | 329 | nb_bus_decoder(node_id, regs); |
@@ -374,7 +373,7 @@ static int amd_decode_mce(struct notifier_block *nb, unsigned long val, | |||
374 | ((m->status & MCI_STATUS_PCC) ? "yes" : "no")); | 373 | ((m->status & MCI_STATUS_PCC) ? "yes" : "no")); |
375 | 374 | ||
376 | /* do the two bits[14:13] together */ | 375 | /* do the two bits[14:13] together */ |
377 | ecc = m->status & (3ULL << 45); | 376 | ecc = (m->status >> 45) & 0x3; |
378 | if (ecc) | 377 | if (ecc) |
379 | pr_cont(", %sECC Error", ((ecc == 2) ? "C" : "U")); | 378 | pr_cont(", %sECC Error", ((ecc == 2) ? "C" : "U")); |
380 | 379 | ||
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 76be229c814d..eb0c3fe44b29 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
@@ -416,7 +416,8 @@ static int gpio_setup_irq(struct gpio_desc *desc, struct device *dev, | |||
416 | return 0; | 416 | return 0; |
417 | 417 | ||
418 | free_sd: | 418 | free_sd: |
419 | sysfs_put(pdesc->value_sd); | 419 | if (pdesc) |
420 | sysfs_put(pdesc->value_sd); | ||
420 | free_id: | 421 | free_id: |
421 | idr_remove(&pdesc_idr, id); | 422 | idr_remove(&pdesc_idr, id); |
422 | desc->flags &= GPIO_FLAGS_MASK; | 423 | desc->flags &= GPIO_FLAGS_MASK; |
diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index e4865f99989c..7732268eced2 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c | |||
@@ -77,7 +77,7 @@ static void *agp_remap(unsigned long offset, unsigned long size, | |||
77 | && (agpmem->bound + (agpmem->pages << PAGE_SHIFT)) >= | 77 | && (agpmem->bound + (agpmem->pages << PAGE_SHIFT)) >= |
78 | (offset + size)) | 78 | (offset + size)) |
79 | break; | 79 | break; |
80 | if (!agpmem) | 80 | if (&agpmem->head == &dev->agp->memory) |
81 | return NULL; | 81 | return NULL; |
82 | 82 | ||
83 | /* | 83 | /* |
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index 1a1825b29f5f..25bbd30ed7af 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c | |||
@@ -354,7 +354,10 @@ static struct bin_attribute edid_attr = { | |||
354 | int drm_sysfs_connector_add(struct drm_connector *connector) | 354 | int drm_sysfs_connector_add(struct drm_connector *connector) |
355 | { | 355 | { |
356 | struct drm_device *dev = connector->dev; | 356 | struct drm_device *dev = connector->dev; |
357 | int ret = 0, i, j; | 357 | int attr_cnt = 0; |
358 | int opt_cnt = 0; | ||
359 | int i; | ||
360 | int ret = 0; | ||
358 | 361 | ||
359 | /* We shouldn't get called more than once for the same connector */ | 362 | /* We shouldn't get called more than once for the same connector */ |
360 | BUG_ON(device_is_registered(&connector->kdev)); | 363 | BUG_ON(device_is_registered(&connector->kdev)); |
@@ -377,8 +380,8 @@ int drm_sysfs_connector_add(struct drm_connector *connector) | |||
377 | 380 | ||
378 | /* Standard attributes */ | 381 | /* Standard attributes */ |
379 | 382 | ||
380 | for (i = 0; i < ARRAY_SIZE(connector_attrs); i++) { | 383 | for (attr_cnt = 0; attr_cnt < ARRAY_SIZE(connector_attrs); attr_cnt++) { |
381 | ret = device_create_file(&connector->kdev, &connector_attrs[i]); | 384 | ret = device_create_file(&connector->kdev, &connector_attrs[attr_cnt]); |
382 | if (ret) | 385 | if (ret) |
383 | goto err_out_files; | 386 | goto err_out_files; |
384 | } | 387 | } |
@@ -394,8 +397,8 @@ int drm_sysfs_connector_add(struct drm_connector *connector) | |||
394 | case DRM_MODE_CONNECTOR_SVIDEO: | 397 | case DRM_MODE_CONNECTOR_SVIDEO: |
395 | case DRM_MODE_CONNECTOR_Component: | 398 | case DRM_MODE_CONNECTOR_Component: |
396 | case DRM_MODE_CONNECTOR_TV: | 399 | case DRM_MODE_CONNECTOR_TV: |
397 | for (i = 0; i < ARRAY_SIZE(connector_attrs_opt1); i++) { | 400 | for (opt_cnt = 0; opt_cnt < ARRAY_SIZE(connector_attrs_opt1); opt_cnt++) { |
398 | ret = device_create_file(&connector->kdev, &connector_attrs_opt1[i]); | 401 | ret = device_create_file(&connector->kdev, &connector_attrs_opt1[opt_cnt]); |
399 | if (ret) | 402 | if (ret) |
400 | goto err_out_files; | 403 | goto err_out_files; |
401 | } | 404 | } |
@@ -414,10 +417,10 @@ int drm_sysfs_connector_add(struct drm_connector *connector) | |||
414 | return 0; | 417 | return 0; |
415 | 418 | ||
416 | err_out_files: | 419 | err_out_files: |
417 | if (i > 0) | 420 | for (i = 0; i < opt_cnt; i++) |
418 | for (j = 0; j < i; j++) | 421 | device_remove_file(&connector->kdev, &connector_attrs_opt1[i]); |
419 | device_remove_file(&connector->kdev, | 422 | for (i = 0; i < attr_cnt; i++) |
420 | &connector_attrs[i]); | 423 | device_remove_file(&connector->kdev, &connector_attrs[i]); |
421 | device_unregister(&connector->kdev); | 424 | device_unregister(&connector->kdev); |
422 | 425 | ||
423 | out: | 426 | out: |
diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h index 6732b5dd8ff4..27e2c715be11 100644 --- a/drivers/gpu/drm/radeon/atombios.h +++ b/drivers/gpu/drm/radeon/atombios.h | |||
@@ -2912,7 +2912,7 @@ typedef struct _ATOM_ANALOG_TV_INFO_V1_2 | |||
2912 | UCHAR ucTV_BootUpDefaultStandard; | 2912 | UCHAR ucTV_BootUpDefaultStandard; |
2913 | UCHAR ucExt_TV_ASIC_ID; | 2913 | UCHAR ucExt_TV_ASIC_ID; |
2914 | UCHAR ucExt_TV_ASIC_SlaveAddr; | 2914 | UCHAR ucExt_TV_ASIC_SlaveAddr; |
2915 | ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING]; | 2915 | ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING_V1_2]; |
2916 | }ATOM_ANALOG_TV_INFO_V1_2; | 2916 | }ATOM_ANALOG_TV_INFO_V1_2; |
2917 | 2917 | ||
2918 | typedef struct _ATOM_DPCD_INFO | 2918 | typedef struct _ATOM_DPCD_INFO |
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index d7388fdb6d0b..cf60c0b3ef15 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -2975,7 +2975,7 @@ int r100_cs_track_check(struct radeon_device *rdev, struct r100_cs_track *track) | |||
2975 | 2975 | ||
2976 | for (i = 0; i < track->num_cb; i++) { | 2976 | for (i = 0; i < track->num_cb; i++) { |
2977 | if (track->cb[i].robj == NULL) { | 2977 | if (track->cb[i].robj == NULL) { |
2978 | if (!(track->fastfill || track->color_channel_mask || | 2978 | if (!(track->zb_cb_clear || track->color_channel_mask || |
2979 | track->blend_read_enable)) { | 2979 | track->blend_read_enable)) { |
2980 | continue; | 2980 | continue; |
2981 | } | 2981 | } |
diff --git a/drivers/gpu/drm/radeon/r100_track.h b/drivers/gpu/drm/radeon/r100_track.h index fadfe68de9cc..f47cdca1c004 100644 --- a/drivers/gpu/drm/radeon/r100_track.h +++ b/drivers/gpu/drm/radeon/r100_track.h | |||
@@ -75,7 +75,7 @@ struct r100_cs_track { | |||
75 | struct r100_cs_track_texture textures[R300_TRACK_MAX_TEXTURE]; | 75 | struct r100_cs_track_texture textures[R300_TRACK_MAX_TEXTURE]; |
76 | bool z_enabled; | 76 | bool z_enabled; |
77 | bool separate_cube; | 77 | bool separate_cube; |
78 | bool fastfill; | 78 | bool zb_cb_clear; |
79 | bool blend_read_enable; | 79 | bool blend_read_enable; |
80 | }; | 80 | }; |
81 | 81 | ||
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index eaf1f6bc44f1..a5ff8076b423 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -1044,7 +1044,7 @@ static int r300_packet0_check(struct radeon_cs_parser *p, | |||
1044 | break; | 1044 | break; |
1045 | case 0x4d1c: | 1045 | case 0x4d1c: |
1046 | /* ZB_BW_CNTL */ | 1046 | /* ZB_BW_CNTL */ |
1047 | track->fastfill = !!(idx_value & (1 << 2)); | 1047 | track->zb_cb_clear = !!(idx_value & (1 << 5)); |
1048 | break; | 1048 | break; |
1049 | case 0x4e04: | 1049 | case 0x4e04: |
1050 | /* RB3D_BLENDCNTL */ | 1050 | /* RB3D_BLENDCNTL */ |
diff --git a/drivers/gpu/drm/radeon/radeon_agp.c b/drivers/gpu/drm/radeon/radeon_agp.c index c4457791dff1..28e473f1f56f 100644 --- a/drivers/gpu/drm/radeon/radeon_agp.c +++ b/drivers/gpu/drm/radeon/radeon_agp.c | |||
@@ -134,12 +134,10 @@ int radeon_agp_init(struct radeon_device *rdev) | |||
134 | int ret; | 134 | int ret; |
135 | 135 | ||
136 | /* Acquire AGP. */ | 136 | /* Acquire AGP. */ |
137 | if (!rdev->ddev->agp->acquired) { | 137 | ret = drm_agp_acquire(rdev->ddev); |
138 | ret = drm_agp_acquire(rdev->ddev); | 138 | if (ret) { |
139 | if (ret) { | 139 | DRM_ERROR("Unable to acquire AGP: %d\n", ret); |
140 | DRM_ERROR("Unable to acquire AGP: %d\n", ret); | 140 | return ret; |
141 | return ret; | ||
142 | } | ||
143 | } | 141 | } |
144 | 142 | ||
145 | ret = drm_agp_info(rdev->ddev, &info); | 143 | ret = drm_agp_info(rdev->ddev, &info); |
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 5673665ff216..9916d825401c 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -1264,7 +1264,7 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, | |||
1264 | switch (crev) { | 1264 | switch (crev) { |
1265 | case 1: | 1265 | case 1: |
1266 | tv_info = (ATOM_ANALOG_TV_INFO *)(mode_info->atom_context->bios + data_offset); | 1266 | tv_info = (ATOM_ANALOG_TV_INFO *)(mode_info->atom_context->bios + data_offset); |
1267 | if (index > MAX_SUPPORTED_TV_TIMING) | 1267 | if (index >= MAX_SUPPORTED_TV_TIMING) |
1268 | return false; | 1268 | return false; |
1269 | 1269 | ||
1270 | mode->crtc_htotal = le16_to_cpu(tv_info->aModeTimings[index].usCRTC_H_Total); | 1270 | mode->crtc_htotal = le16_to_cpu(tv_info->aModeTimings[index].usCRTC_H_Total); |
@@ -1302,7 +1302,7 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index, | |||
1302 | break; | 1302 | break; |
1303 | case 2: | 1303 | case 2: |
1304 | tv_info_v1_2 = (ATOM_ANALOG_TV_INFO_V1_2 *)(mode_info->atom_context->bios + data_offset); | 1304 | tv_info_v1_2 = (ATOM_ANALOG_TV_INFO_V1_2 *)(mode_info->atom_context->bios + data_offset); |
1305 | if (index > MAX_SUPPORTED_TV_TIMING_V1_2) | 1305 | if (index >= MAX_SUPPORTED_TV_TIMING_V1_2) |
1306 | return false; | 1306 | return false; |
1307 | 1307 | ||
1308 | dtd_timings = &tv_info_v1_2->aModeTimings[index]; | 1308 | dtd_timings = &tv_info_v1_2->aModeTimings[index]; |
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 1331351c5178..4559a53d5e57 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -1316,6 +1316,8 @@ radeon_add_legacy_connector(struct drm_device *dev, | |||
1316 | radeon_connector->ddc_bus = radeon_i2c_create(dev, i2c_bus, "DVI"); | 1316 | radeon_connector->ddc_bus = radeon_i2c_create(dev, i2c_bus, "DVI"); |
1317 | if (!radeon_connector->ddc_bus) | 1317 | if (!radeon_connector->ddc_bus) |
1318 | goto failed; | 1318 | goto failed; |
1319 | } | ||
1320 | if (connector_type == DRM_MODE_CONNECTOR_DVII) { | ||
1319 | radeon_connector->dac_load_detect = true; | 1321 | radeon_connector->dac_load_detect = true; |
1320 | drm_connector_attach_property(&radeon_connector->base, | 1322 | drm_connector_attach_property(&radeon_connector->base, |
1321 | rdev->mode_info.load_detect_property, | 1323 | rdev->mode_info.load_detect_property, |
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index fed7b8084779..c5ddaf58563a 100644 --- a/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_encoders.c | |||
@@ -254,6 +254,53 @@ radeon_get_atom_connector_priv_from_encoder(struct drm_encoder *encoder) | |||
254 | return dig_connector; | 254 | return dig_connector; |
255 | } | 255 | } |
256 | 256 | ||
257 | void radeon_panel_mode_fixup(struct drm_encoder *encoder, | ||
258 | struct drm_display_mode *adjusted_mode) | ||
259 | { | ||
260 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | ||
261 | struct drm_device *dev = encoder->dev; | ||
262 | struct radeon_device *rdev = dev->dev_private; | ||
263 | struct drm_display_mode *native_mode = &radeon_encoder->native_mode; | ||
264 | unsigned hblank = native_mode->htotal - native_mode->hdisplay; | ||
265 | unsigned vblank = native_mode->vtotal - native_mode->vdisplay; | ||
266 | unsigned hover = native_mode->hsync_start - native_mode->hdisplay; | ||
267 | unsigned vover = native_mode->vsync_start - native_mode->vdisplay; | ||
268 | unsigned hsync_width = native_mode->hsync_end - native_mode->hsync_start; | ||
269 | unsigned vsync_width = native_mode->vsync_end - native_mode->vsync_start; | ||
270 | |||
271 | adjusted_mode->clock = native_mode->clock; | ||
272 | adjusted_mode->flags = native_mode->flags; | ||
273 | |||
274 | if (ASIC_IS_AVIVO(rdev)) { | ||
275 | adjusted_mode->hdisplay = native_mode->hdisplay; | ||
276 | adjusted_mode->vdisplay = native_mode->vdisplay; | ||
277 | } | ||
278 | |||
279 | adjusted_mode->htotal = native_mode->hdisplay + hblank; | ||
280 | adjusted_mode->hsync_start = native_mode->hdisplay + hover; | ||
281 | adjusted_mode->hsync_end = adjusted_mode->hsync_start + hsync_width; | ||
282 | |||
283 | adjusted_mode->vtotal = native_mode->vdisplay + vblank; | ||
284 | adjusted_mode->vsync_start = native_mode->vdisplay + vover; | ||
285 | adjusted_mode->vsync_end = adjusted_mode->vsync_start + vsync_width; | ||
286 | |||
287 | drm_mode_set_crtcinfo(adjusted_mode, CRTC_INTERLACE_HALVE_V); | ||
288 | |||
289 | if (ASIC_IS_AVIVO(rdev)) { | ||
290 | adjusted_mode->crtc_hdisplay = native_mode->hdisplay; | ||
291 | adjusted_mode->crtc_vdisplay = native_mode->vdisplay; | ||
292 | } | ||
293 | |||
294 | adjusted_mode->crtc_htotal = adjusted_mode->crtc_hdisplay + hblank; | ||
295 | adjusted_mode->crtc_hsync_start = adjusted_mode->crtc_hdisplay + hover; | ||
296 | adjusted_mode->crtc_hsync_end = adjusted_mode->crtc_hsync_start + hsync_width; | ||
297 | |||
298 | adjusted_mode->crtc_vtotal = adjusted_mode->crtc_vdisplay + vblank; | ||
299 | adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + vover; | ||
300 | adjusted_mode->crtc_vsync_end = adjusted_mode->crtc_vsync_start + vsync_width; | ||
301 | |||
302 | } | ||
303 | |||
257 | static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, | 304 | static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, |
258 | struct drm_display_mode *mode, | 305 | struct drm_display_mode *mode, |
259 | struct drm_display_mode *adjusted_mode) | 306 | struct drm_display_mode *adjusted_mode) |
@@ -275,18 +322,8 @@ static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, | |||
275 | adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + 2; | 322 | adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + 2; |
276 | 323 | ||
277 | /* get the native mode for LVDS */ | 324 | /* get the native mode for LVDS */ |
278 | if (radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT)) { | 325 | if (radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT)) |
279 | struct drm_display_mode *native_mode = &radeon_encoder->native_mode; | 326 | radeon_panel_mode_fixup(encoder, adjusted_mode); |
280 | int mode_id = adjusted_mode->base.id; | ||
281 | *adjusted_mode = *native_mode; | ||
282 | if (!ASIC_IS_AVIVO(rdev)) { | ||
283 | adjusted_mode->hdisplay = mode->hdisplay; | ||
284 | adjusted_mode->vdisplay = mode->vdisplay; | ||
285 | adjusted_mode->crtc_hdisplay = mode->hdisplay; | ||
286 | adjusted_mode->crtc_vdisplay = mode->vdisplay; | ||
287 | } | ||
288 | adjusted_mode->base.id = mode_id; | ||
289 | } | ||
290 | 327 | ||
291 | /* get the native mode for TV */ | 328 | /* get the native mode for TV */ |
292 | if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) { | 329 | if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT)) { |
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index 2441cca7d775..0274abe17ad9 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c | |||
@@ -228,16 +228,8 @@ static bool radeon_legacy_mode_fixup(struct drm_encoder *encoder, | |||
228 | drm_mode_set_crtcinfo(adjusted_mode, 0); | 228 | drm_mode_set_crtcinfo(adjusted_mode, 0); |
229 | 229 | ||
230 | /* get the native mode for LVDS */ | 230 | /* get the native mode for LVDS */ |
231 | if (radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT)) { | 231 | if (radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT)) |
232 | struct drm_display_mode *native_mode = &radeon_encoder->native_mode; | 232 | radeon_panel_mode_fixup(encoder, adjusted_mode); |
233 | int mode_id = adjusted_mode->base.id; | ||
234 | *adjusted_mode = *native_mode; | ||
235 | adjusted_mode->hdisplay = mode->hdisplay; | ||
236 | adjusted_mode->vdisplay = mode->vdisplay; | ||
237 | adjusted_mode->crtc_hdisplay = mode->hdisplay; | ||
238 | adjusted_mode->crtc_vdisplay = mode->vdisplay; | ||
239 | adjusted_mode->base.id = mode_id; | ||
240 | } | ||
241 | 233 | ||
242 | return true; | 234 | return true; |
243 | } | 235 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index 0b8e32776b10..5413fcd63086 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h | |||
@@ -558,6 +558,8 @@ extern int radeon_static_clocks_init(struct drm_device *dev); | |||
558 | bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc, | 558 | bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc, |
559 | struct drm_display_mode *mode, | 559 | struct drm_display_mode *mode, |
560 | struct drm_display_mode *adjusted_mode); | 560 | struct drm_display_mode *adjusted_mode); |
561 | void radeon_panel_mode_fixup(struct drm_encoder *encoder, | ||
562 | struct drm_display_mode *adjusted_mode); | ||
561 | void atom_rv515_force_tv_scaler(struct radeon_device *rdev, struct radeon_crtc *radeon_crtc); | 563 | void atom_rv515_force_tv_scaler(struct radeon_device *rdev, struct radeon_crtc *radeon_crtc); |
562 | 564 | ||
563 | /* legacy tv */ | 565 | /* legacy tv */ |
diff --git a/drivers/gpu/drm/via/via_video.c b/drivers/gpu/drm/via/via_video.c index 6ec04ac12459..6efac8117c93 100644 --- a/drivers/gpu/drm/via/via_video.c +++ b/drivers/gpu/drm/via/via_video.c | |||
@@ -75,7 +75,7 @@ int via_decoder_futex(struct drm_device *dev, void *data, struct drm_file *file_ | |||
75 | 75 | ||
76 | DRM_DEBUG("\n"); | 76 | DRM_DEBUG("\n"); |
77 | 77 | ||
78 | if (fx->lock > VIA_NR_XVMC_LOCKS) | 78 | if (fx->lock >= VIA_NR_XVMC_LOCKS) |
79 | return -EFAULT; | 79 | return -EFAULT; |
80 | 80 | ||
81 | lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx->lock); | 81 | lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx->lock); |
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index d6d1149d525d..c8768f38511e 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c | |||
@@ -276,8 +276,10 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf, | |||
276 | 276 | ||
277 | mutex_lock(&vgasr_mutex); | 277 | mutex_lock(&vgasr_mutex); |
278 | 278 | ||
279 | if (!vgasr_priv.active) | 279 | if (!vgasr_priv.active) { |
280 | return -EINVAL; | 280 | cnt = -EINVAL; |
281 | goto out; | ||
282 | } | ||
281 | 283 | ||
282 | /* pwr off the device not in use */ | 284 | /* pwr off the device not in use */ |
283 | if (strncmp(usercmd, "OFF", 3) == 0) { | 285 | if (strncmp(usercmd, "OFF", 3) == 0) { |
diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c index a2481f40ea1c..0e9f85d0a835 100644 --- a/drivers/i2c/busses/i2c-octeon.c +++ b/drivers/i2c/busses/i2c-octeon.c | |||
@@ -447,7 +447,7 @@ static struct i2c_adapter octeon_i2c_ops = { | |||
447 | /** | 447 | /** |
448 | * octeon_i2c_setclock - Calculate and set clock divisors. | 448 | * octeon_i2c_setclock - Calculate and set clock divisors. |
449 | */ | 449 | */ |
450 | static int __init octeon_i2c_setclock(struct octeon_i2c *i2c) | 450 | static int __devinit octeon_i2c_setclock(struct octeon_i2c *i2c) |
451 | { | 451 | { |
452 | int tclk, thp_base, inc, thp_idx, mdiv_idx, ndiv_idx, foscl, diff; | 452 | int tclk, thp_base, inc, thp_idx, mdiv_idx, ndiv_idx, foscl, diff; |
453 | int thp = 0x18, mdiv = 2, ndiv = 0, delta_hz = 1000000; | 453 | int thp = 0x18, mdiv = 2, ndiv = 0, delta_hz = 1000000; |
@@ -490,7 +490,7 @@ static int __init octeon_i2c_setclock(struct octeon_i2c *i2c) | |||
490 | return 0; | 490 | return 0; |
491 | } | 491 | } |
492 | 492 | ||
493 | static int __init octeon_i2c_initlowlevel(struct octeon_i2c *i2c) | 493 | static int __devinit octeon_i2c_initlowlevel(struct octeon_i2c *i2c) |
494 | { | 494 | { |
495 | u8 status; | 495 | u8 status; |
496 | int tries; | 496 | int tries; |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 3202a86f420e..c2258a51fe0c 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -40,12 +40,11 @@ | |||
40 | #include "i2c-core.h" | 40 | #include "i2c-core.h" |
41 | 41 | ||
42 | 42 | ||
43 | /* core_lock protects i2c_adapter_idr, userspace_devices, and guarantees | 43 | /* core_lock protects i2c_adapter_idr, and guarantees |
44 | that device detection, deletion of detected devices, and attach_adapter | 44 | that device detection, deletion of detected devices, and attach_adapter |
45 | and detach_adapter calls are serialized */ | 45 | and detach_adapter calls are serialized */ |
46 | static DEFINE_MUTEX(core_lock); | 46 | static DEFINE_MUTEX(core_lock); |
47 | static DEFINE_IDR(i2c_adapter_idr); | 47 | static DEFINE_IDR(i2c_adapter_idr); |
48 | static LIST_HEAD(userspace_devices); | ||
49 | 48 | ||
50 | static struct device_type i2c_client_type; | 49 | static struct device_type i2c_client_type; |
51 | static int i2c_check_addr(struct i2c_adapter *adapter, int addr); | 50 | static int i2c_check_addr(struct i2c_adapter *adapter, int addr); |
@@ -117,8 +116,10 @@ static int i2c_device_probe(struct device *dev) | |||
117 | dev_dbg(dev, "probe\n"); | 116 | dev_dbg(dev, "probe\n"); |
118 | 117 | ||
119 | status = driver->probe(client, i2c_match_id(driver->id_table, client)); | 118 | status = driver->probe(client, i2c_match_id(driver->id_table, client)); |
120 | if (status) | 119 | if (status) { |
121 | client->driver = NULL; | 120 | client->driver = NULL; |
121 | i2c_set_clientdata(client, NULL); | ||
122 | } | ||
122 | return status; | 123 | return status; |
123 | } | 124 | } |
124 | 125 | ||
@@ -139,8 +140,10 @@ static int i2c_device_remove(struct device *dev) | |||
139 | dev->driver = NULL; | 140 | dev->driver = NULL; |
140 | status = 0; | 141 | status = 0; |
141 | } | 142 | } |
142 | if (status == 0) | 143 | if (status == 0) { |
143 | client->driver = NULL; | 144 | client->driver = NULL; |
145 | i2c_set_clientdata(client, NULL); | ||
146 | } | ||
144 | return status; | 147 | return status; |
145 | } | 148 | } |
146 | 149 | ||
@@ -538,9 +541,9 @@ i2c_sysfs_new_device(struct device *dev, struct device_attribute *attr, | |||
538 | return -EEXIST; | 541 | return -EEXIST; |
539 | 542 | ||
540 | /* Keep track of the added device */ | 543 | /* Keep track of the added device */ |
541 | mutex_lock(&core_lock); | 544 | i2c_lock_adapter(adap); |
542 | list_add_tail(&client->detected, &userspace_devices); | 545 | list_add_tail(&client->detected, &adap->userspace_clients); |
543 | mutex_unlock(&core_lock); | 546 | i2c_unlock_adapter(adap); |
544 | dev_info(dev, "%s: Instantiated device %s at 0x%02hx\n", "new_device", | 547 | dev_info(dev, "%s: Instantiated device %s at 0x%02hx\n", "new_device", |
545 | info.type, info.addr); | 548 | info.type, info.addr); |
546 | 549 | ||
@@ -579,9 +582,10 @@ i2c_sysfs_delete_device(struct device *dev, struct device_attribute *attr, | |||
579 | 582 | ||
580 | /* Make sure the device was added through sysfs */ | 583 | /* Make sure the device was added through sysfs */ |
581 | res = -ENOENT; | 584 | res = -ENOENT; |
582 | mutex_lock(&core_lock); | 585 | i2c_lock_adapter(adap); |
583 | list_for_each_entry_safe(client, next, &userspace_devices, detected) { | 586 | list_for_each_entry_safe(client, next, &adap->userspace_clients, |
584 | if (client->addr == addr && client->adapter == adap) { | 587 | detected) { |
588 | if (client->addr == addr) { | ||
585 | dev_info(dev, "%s: Deleting device %s at 0x%02hx\n", | 589 | dev_info(dev, "%s: Deleting device %s at 0x%02hx\n", |
586 | "delete_device", client->name, client->addr); | 590 | "delete_device", client->name, client->addr); |
587 | 591 | ||
@@ -591,7 +595,7 @@ i2c_sysfs_delete_device(struct device *dev, struct device_attribute *attr, | |||
591 | break; | 595 | break; |
592 | } | 596 | } |
593 | } | 597 | } |
594 | mutex_unlock(&core_lock); | 598 | i2c_unlock_adapter(adap); |
595 | 599 | ||
596 | if (res < 0) | 600 | if (res < 0) |
597 | dev_err(dev, "%s: Can't find device in list\n", | 601 | dev_err(dev, "%s: Can't find device in list\n", |
@@ -673,6 +677,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap) | |||
673 | } | 677 | } |
674 | 678 | ||
675 | rt_mutex_init(&adap->bus_lock); | 679 | rt_mutex_init(&adap->bus_lock); |
680 | INIT_LIST_HEAD(&adap->userspace_clients); | ||
676 | 681 | ||
677 | /* Set default timeout to 1 second if not already set */ | 682 | /* Set default timeout to 1 second if not already set */ |
678 | if (adap->timeout == 0) | 683 | if (adap->timeout == 0) |
@@ -875,14 +880,15 @@ int i2c_del_adapter(struct i2c_adapter *adap) | |||
875 | return res; | 880 | return res; |
876 | 881 | ||
877 | /* Remove devices instantiated from sysfs */ | 882 | /* Remove devices instantiated from sysfs */ |
878 | list_for_each_entry_safe(client, next, &userspace_devices, detected) { | 883 | i2c_lock_adapter(adap); |
879 | if (client->adapter == adap) { | 884 | list_for_each_entry_safe(client, next, &adap->userspace_clients, |
880 | dev_dbg(&adap->dev, "Removing %s at 0x%x\n", | 885 | detected) { |
881 | client->name, client->addr); | 886 | dev_dbg(&adap->dev, "Removing %s at 0x%x\n", client->name, |
882 | list_del(&client->detected); | 887 | client->addr); |
883 | i2c_unregister_device(client); | 888 | list_del(&client->detected); |
884 | } | 889 | i2c_unregister_device(client); |
885 | } | 890 | } |
891 | i2c_unlock_adapter(adap); | ||
886 | 892 | ||
887 | /* Detach any active clients. This can't fail, thus we do not | 893 | /* Detach any active clients. This can't fail, thus we do not |
888 | checking the returned value. */ | 894 | checking the returned value. */ |
@@ -1260,12 +1266,23 @@ static int i2c_detect_address(struct i2c_client *temp_client, | |||
1260 | return 0; | 1266 | return 0; |
1261 | 1267 | ||
1262 | /* Make sure there is something at this address */ | 1268 | /* Make sure there is something at this address */ |
1263 | if (i2c_smbus_xfer(adapter, addr, 0, 0, 0, I2C_SMBUS_QUICK, NULL) < 0) | 1269 | if (addr == 0x73 && (adapter->class & I2C_CLASS_HWMON)) { |
1264 | return 0; | 1270 | /* Special probe for FSC hwmon chips */ |
1271 | union i2c_smbus_data dummy; | ||
1265 | 1272 | ||
1266 | /* Prevent 24RF08 corruption */ | 1273 | if (i2c_smbus_xfer(adapter, addr, 0, I2C_SMBUS_READ, 0, |
1267 | if ((addr & ~0x0f) == 0x50) | 1274 | I2C_SMBUS_BYTE_DATA, &dummy) < 0) |
1268 | i2c_smbus_xfer(adapter, addr, 0, 0, 0, I2C_SMBUS_QUICK, NULL); | 1275 | return 0; |
1276 | } else { | ||
1277 | if (i2c_smbus_xfer(adapter, addr, 0, I2C_SMBUS_WRITE, 0, | ||
1278 | I2C_SMBUS_QUICK, NULL) < 0) | ||
1279 | return 0; | ||
1280 | |||
1281 | /* Prevent 24RF08 corruption */ | ||
1282 | if ((addr & ~0x0f) == 0x50) | ||
1283 | i2c_smbus_xfer(adapter, addr, 0, I2C_SMBUS_WRITE, 0, | ||
1284 | I2C_SMBUS_QUICK, NULL); | ||
1285 | } | ||
1269 | 1286 | ||
1270 | /* Finally call the custom detection function */ | 1287 | /* Finally call the custom detection function */ |
1271 | memset(&info, 0, sizeof(struct i2c_board_info)); | 1288 | memset(&info, 0, sizeof(struct i2c_board_info)); |
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c index defce2877eef..b85450865ff0 100644 --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c | |||
@@ -409,7 +409,7 @@ static struct pcmcia_device_id ide_ids[] = { | |||
409 | PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420), | 409 | PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420), |
410 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), | 410 | PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178), |
411 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), | 411 | PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753), |
412 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x3e520e17), | 412 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x55d5bffb), |
413 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10), | 413 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10), |
414 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), | 414 | PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e), |
415 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), | 415 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b), |
@@ -431,7 +431,7 @@ static struct pcmcia_device_id ide_ids[] = { | |||
431 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), | 431 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), |
432 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), | 432 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), |
433 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), | 433 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), |
434 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x9351e59d), | 434 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x7558f133), |
435 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47), | 435 | PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47), |
436 | PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), | 436 | PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), |
437 | PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918), | 437 | PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918), |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index c52bec4d0530..423e0e6031ab 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -929,6 +929,24 @@ static const struct input_device_id joydev_ids[] = { | |||
929 | .evbit = { BIT_MASK(EV_ABS) }, | 929 | .evbit = { BIT_MASK(EV_ABS) }, |
930 | .absbit = { BIT_MASK(ABS_THROTTLE) }, | 930 | .absbit = { BIT_MASK(ABS_THROTTLE) }, |
931 | }, | 931 | }, |
932 | { | ||
933 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | ||
934 | INPUT_DEVICE_ID_MATCH_KEYBIT, | ||
935 | .evbit = { BIT_MASK(EV_KEY) }, | ||
936 | .keybit = {[BIT_WORD(BTN_JOYSTICK)] = BIT_MASK(BTN_JOYSTICK) }, | ||
937 | }, | ||
938 | { | ||
939 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | ||
940 | INPUT_DEVICE_ID_MATCH_KEYBIT, | ||
941 | .evbit = { BIT_MASK(EV_KEY) }, | ||
942 | .keybit = { [BIT_WORD(BTN_GAMEPAD)] = BIT_MASK(BTN_GAMEPAD) }, | ||
943 | }, | ||
944 | { | ||
945 | .flags = INPUT_DEVICE_ID_MATCH_EVBIT | | ||
946 | INPUT_DEVICE_ID_MATCH_KEYBIT, | ||
947 | .evbit = { BIT_MASK(EV_KEY) }, | ||
948 | .keybit = { [BIT_WORD(BTN_TRIGGER_HAPPY)] = BIT_MASK(BTN_TRIGGER_HAPPY) }, | ||
949 | }, | ||
932 | { } /* Terminating entry */ | 950 | { } /* Terminating entry */ |
933 | }; | 951 | }; |
934 | 952 | ||
diff --git a/drivers/input/misc/ati_remote.c b/drivers/input/misc/ati_remote.c index 614b65d78fe9..e8bbc619f6df 100644 --- a/drivers/input/misc/ati_remote.c +++ b/drivers/input/misc/ati_remote.c | |||
@@ -98,10 +98,12 @@ | |||
98 | * Module and Version Information, Module Parameters | 98 | * Module and Version Information, Module Parameters |
99 | */ | 99 | */ |
100 | 100 | ||
101 | #define ATI_REMOTE_VENDOR_ID 0x0bc7 | 101 | #define ATI_REMOTE_VENDOR_ID 0x0bc7 |
102 | #define ATI_REMOTE_PRODUCT_ID 0x004 | 102 | #define LOLA_REMOTE_PRODUCT_ID 0x0002 |
103 | #define LOLA_REMOTE_PRODUCT_ID 0x002 | 103 | #define LOLA2_REMOTE_PRODUCT_ID 0x0003 |
104 | #define MEDION_REMOTE_PRODUCT_ID 0x006 | 104 | #define ATI_REMOTE_PRODUCT_ID 0x0004 |
105 | #define NVIDIA_REMOTE_PRODUCT_ID 0x0005 | ||
106 | #define MEDION_REMOTE_PRODUCT_ID 0x0006 | ||
105 | 107 | ||
106 | #define DRIVER_VERSION "2.2.1" | 108 | #define DRIVER_VERSION "2.2.1" |
107 | #define DRIVER_AUTHOR "Torrey Hoffman <thoffman@arnor.net>" | 109 | #define DRIVER_AUTHOR "Torrey Hoffman <thoffman@arnor.net>" |
@@ -142,8 +144,10 @@ MODULE_PARM_DESC(repeat_delay, "Delay before sending repeats, default = 500 msec | |||
142 | #define err(format, arg...) printk(KERN_ERR format , ## arg) | 144 | #define err(format, arg...) printk(KERN_ERR format , ## arg) |
143 | 145 | ||
144 | static struct usb_device_id ati_remote_table[] = { | 146 | static struct usb_device_id ati_remote_table[] = { |
145 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, ATI_REMOTE_PRODUCT_ID) }, | ||
146 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA_REMOTE_PRODUCT_ID) }, | 147 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA_REMOTE_PRODUCT_ID) }, |
148 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA2_REMOTE_PRODUCT_ID) }, | ||
149 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, ATI_REMOTE_PRODUCT_ID) }, | ||
150 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, NVIDIA_REMOTE_PRODUCT_ID) }, | ||
147 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, MEDION_REMOTE_PRODUCT_ID) }, | 151 | { USB_DEVICE(ATI_REMOTE_VENDOR_ID, MEDION_REMOTE_PRODUCT_ID) }, |
148 | {} /* Terminating entry */ | 152 | {} /* Terminating entry */ |
149 | }; | 153 | }; |
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 0d22cb9ce42e..99d58764ef03 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -64,7 +64,6 @@ static const struct alps_model_info alps_model_data[] = { | |||
64 | { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, | 64 | { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, |
65 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, | 65 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, |
66 | { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ | 66 | { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ |
67 | { { 0x73, 0x02, 0x64 }, 0xf8, 0xf8, 0 }, /* HP Pavilion dm3 */ | ||
68 | { { 0x52, 0x01, 0x14 }, 0xff, 0xff, | 67 | { { 0x52, 0x01, 0x14 }, 0xff, 0xff, |
69 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ | 68 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ |
70 | }; | 69 | }; |
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index a138b5da79f9..0520c2e19927 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c | |||
@@ -25,6 +25,10 @@ | |||
25 | printk(KERN_DEBUG format, ##arg); \ | 25 | printk(KERN_DEBUG format, ##arg); \ |
26 | } while (0) | 26 | } while (0) |
27 | 27 | ||
28 | static bool force_elantech; | ||
29 | module_param_named(force_elantech, force_elantech, bool, 0644); | ||
30 | MODULE_PARM_DESC(force_elantech, "Force the Elantech PS/2 protocol extension to be used, 1 = enabled, 0 = disabled (default)."); | ||
31 | |||
28 | /* | 32 | /* |
29 | * Send a Synaptics style sliced query command | 33 | * Send a Synaptics style sliced query command |
30 | */ | 34 | */ |
@@ -182,13 +186,17 @@ static void elantech_report_absolute_v1(struct psmouse *psmouse) | |||
182 | static int old_fingers; | 186 | static int old_fingers; |
183 | 187 | ||
184 | if (etd->fw_version_maj == 0x01) { | 188 | if (etd->fw_version_maj == 0x01) { |
185 | /* byte 0: D U p1 p2 1 p3 R L | 189 | /* |
186 | byte 1: f 0 th tw x9 x8 y9 y8 */ | 190 | * byte 0: D U p1 p2 1 p3 R L |
191 | * byte 1: f 0 th tw x9 x8 y9 y8 | ||
192 | */ | ||
187 | fingers = ((packet[1] & 0x80) >> 7) + | 193 | fingers = ((packet[1] & 0x80) >> 7) + |
188 | ((packet[1] & 0x30) >> 4); | 194 | ((packet[1] & 0x30) >> 4); |
189 | } else { | 195 | } else { |
190 | /* byte 0: n1 n0 p2 p1 1 p3 R L | 196 | /* |
191 | byte 1: 0 0 0 0 x9 x8 y9 y8 */ | 197 | * byte 0: n1 n0 p2 p1 1 p3 R L |
198 | * byte 1: 0 0 0 0 x9 x8 y9 y8 | ||
199 | */ | ||
192 | fingers = (packet[0] & 0xc0) >> 6; | 200 | fingers = (packet[0] & 0xc0) >> 6; |
193 | } | 201 | } |
194 | 202 | ||
@@ -202,13 +210,15 @@ static void elantech_report_absolute_v1(struct psmouse *psmouse) | |||
202 | 210 | ||
203 | input_report_key(dev, BTN_TOUCH, fingers != 0); | 211 | input_report_key(dev, BTN_TOUCH, fingers != 0); |
204 | 212 | ||
205 | /* byte 2: x7 x6 x5 x4 x3 x2 x1 x0 | 213 | /* |
206 | byte 3: y7 y6 y5 y4 y3 y2 y1 y0 */ | 214 | * byte 2: x7 x6 x5 x4 x3 x2 x1 x0 |
215 | * byte 3: y7 y6 y5 y4 y3 y2 y1 y0 | ||
216 | */ | ||
207 | if (fingers) { | 217 | if (fingers) { |
208 | input_report_abs(dev, ABS_X, | 218 | input_report_abs(dev, ABS_X, |
209 | ((packet[1] & 0x0c) << 6) | packet[2]); | 219 | ((packet[1] & 0x0c) << 6) | packet[2]); |
210 | input_report_abs(dev, ABS_Y, ETP_YMAX_V1 - | 220 | input_report_abs(dev, ABS_Y, |
211 | (((packet[1] & 0x03) << 8) | packet[3])); | 221 | ETP_YMAX_V1 - (((packet[1] & 0x03) << 8) | packet[3])); |
212 | } | 222 | } |
213 | 223 | ||
214 | input_report_key(dev, BTN_TOOL_FINGER, fingers == 1); | 224 | input_report_key(dev, BTN_TOOL_FINGER, fingers == 1); |
@@ -247,34 +257,47 @@ static void elantech_report_absolute_v2(struct psmouse *psmouse) | |||
247 | 257 | ||
248 | switch (fingers) { | 258 | switch (fingers) { |
249 | case 1: | 259 | case 1: |
250 | /* byte 1: x15 x14 x13 x12 x11 x10 x9 x8 | 260 | /* |
251 | byte 2: x7 x6 x5 x4 x4 x2 x1 x0 */ | 261 | * byte 1: . . . . . x10 x9 x8 |
252 | input_report_abs(dev, ABS_X, (packet[1] << 8) | packet[2]); | 262 | * byte 2: x7 x6 x5 x4 x4 x2 x1 x0 |
253 | /* byte 4: y15 y14 y13 y12 y11 y10 y8 y8 | 263 | */ |
254 | byte 5: y7 y6 y5 y4 y3 y2 y1 y0 */ | 264 | input_report_abs(dev, ABS_X, |
255 | input_report_abs(dev, ABS_Y, ETP_YMAX_V2 - | 265 | ((packet[1] & 0x07) << 8) | packet[2]); |
256 | ((packet[4] << 8) | packet[5])); | 266 | /* |
267 | * byte 4: . . . . . . y9 y8 | ||
268 | * byte 5: y7 y6 y5 y4 y3 y2 y1 y0 | ||
269 | */ | ||
270 | input_report_abs(dev, ABS_Y, | ||
271 | ETP_YMAX_V2 - (((packet[4] & 0x03) << 8) | packet[5])); | ||
257 | break; | 272 | break; |
258 | 273 | ||
259 | case 2: | 274 | case 2: |
260 | /* The coordinate of each finger is reported separately with | 275 | /* |
261 | a lower resolution for two finger touches */ | 276 | * The coordinate of each finger is reported separately |
262 | /* byte 0: . . ay8 ax8 . . . . | 277 | * with a lower resolution for two finger touches: |
263 | byte 1: ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0 */ | 278 | * byte 0: . . ay8 ax8 . . . . |
279 | * byte 1: ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0 | ||
280 | */ | ||
264 | x1 = ((packet[0] & 0x10) << 4) | packet[1]; | 281 | x1 = ((packet[0] & 0x10) << 4) | packet[1]; |
265 | /* byte 2: ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0 */ | 282 | /* byte 2: ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0 */ |
266 | y1 = ETP_2FT_YMAX - (((packet[0] & 0x20) << 3) | packet[2]); | 283 | y1 = ETP_2FT_YMAX - (((packet[0] & 0x20) << 3) | packet[2]); |
267 | /* byte 3: . . by8 bx8 . . . . | 284 | /* |
268 | byte 4: bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0 */ | 285 | * byte 3: . . by8 bx8 . . . . |
286 | * byte 4: bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0 | ||
287 | */ | ||
269 | x2 = ((packet[3] & 0x10) << 4) | packet[4]; | 288 | x2 = ((packet[3] & 0x10) << 4) | packet[4]; |
270 | /* byte 5: by7 by8 by5 by4 by3 by2 by1 by0 */ | 289 | /* byte 5: by7 by8 by5 by4 by3 by2 by1 by0 */ |
271 | y2 = ETP_2FT_YMAX - (((packet[3] & 0x20) << 3) | packet[5]); | 290 | y2 = ETP_2FT_YMAX - (((packet[3] & 0x20) << 3) | packet[5]); |
272 | /* For compatibility with the X Synaptics driver scale up one | 291 | /* |
273 | coordinate and report as ordinary mouse movent */ | 292 | * For compatibility with the X Synaptics driver scale up |
293 | * one coordinate and report as ordinary mouse movent | ||
294 | */ | ||
274 | input_report_abs(dev, ABS_X, x1 << 2); | 295 | input_report_abs(dev, ABS_X, x1 << 2); |
275 | input_report_abs(dev, ABS_Y, y1 << 2); | 296 | input_report_abs(dev, ABS_Y, y1 << 2); |
276 | /* For compatibility with the proprietary X Elantech driver | 297 | /* |
277 | report both coordinates as hat coordinates */ | 298 | * For compatibility with the proprietary X Elantech driver |
299 | * report both coordinates as hat coordinates | ||
300 | */ | ||
278 | input_report_abs(dev, ABS_HAT0X, x1); | 301 | input_report_abs(dev, ABS_HAT0X, x1); |
279 | input_report_abs(dev, ABS_HAT0Y, y1); | 302 | input_report_abs(dev, ABS_HAT0Y, y1); |
280 | input_report_abs(dev, ABS_HAT1X, x2); | 303 | input_report_abs(dev, ABS_HAT1X, x2); |
@@ -596,8 +619,12 @@ int elantech_detect(struct psmouse *psmouse, bool set_properties) | |||
596 | param[0], param[1], param[2]); | 619 | param[0], param[1], param[2]); |
597 | 620 | ||
598 | if (param[0] == 0 || param[1] != 0) { | 621 | if (param[0] == 0 || param[1] != 0) { |
599 | pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n"); | 622 | if (!force_elantech) { |
600 | return -1; | 623 | pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n"); |
624 | return -1; | ||
625 | } | ||
626 | |||
627 | pr_debug("elantech.c: Probably not a real Elantech touchpad. Enabling anyway due to force_elantech.\n"); | ||
601 | } | 628 | } |
602 | 629 | ||
603 | if (set_properties) { | 630 | if (set_properties) { |
@@ -666,7 +693,8 @@ int elantech_init(struct psmouse *psmouse) | |||
666 | * Assume every version greater than this is new EeePC style | 693 | * Assume every version greater than this is new EeePC style |
667 | * hardware with 6 byte packets | 694 | * hardware with 6 byte packets |
668 | */ | 695 | */ |
669 | if (etd->fw_version_maj >= 0x02 && etd->fw_version_min >= 0x30) { | 696 | if ((etd->fw_version_maj == 0x02 && etd->fw_version_min >= 0x30) || |
697 | etd->fw_version_maj > 0x02) { | ||
670 | etd->hw_version = 2; | 698 | etd->hw_version = 2; |
671 | /* For now show extra debug information */ | 699 | /* For now show extra debug information */ |
672 | etd->debug = 1; | 700 | etd->debug = 1; |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index d8c0c8d6992c..cbc807264940 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -110,6 +110,7 @@ static struct workqueue_struct *kpsmoused_wq; | |||
110 | struct psmouse_protocol { | 110 | struct psmouse_protocol { |
111 | enum psmouse_type type; | 111 | enum psmouse_type type; |
112 | bool maxproto; | 112 | bool maxproto; |
113 | bool ignore_parity; /* Protocol should ignore parity errors from KBC */ | ||
113 | const char *name; | 114 | const char *name; |
114 | const char *alias; | 115 | const char *alias; |
115 | int (*detect)(struct psmouse *, bool); | 116 | int (*detect)(struct psmouse *, bool); |
@@ -288,7 +289,9 @@ static irqreturn_t psmouse_interrupt(struct serio *serio, | |||
288 | if (psmouse->state == PSMOUSE_IGNORE) | 289 | if (psmouse->state == PSMOUSE_IGNORE) |
289 | goto out; | 290 | goto out; |
290 | 291 | ||
291 | if (flags & (SERIO_PARITY|SERIO_TIMEOUT)) { | 292 | if (unlikely((flags & SERIO_TIMEOUT) || |
293 | ((flags & SERIO_PARITY) && !psmouse->ignore_parity))) { | ||
294 | |||
292 | if (psmouse->state == PSMOUSE_ACTIVATED) | 295 | if (psmouse->state == PSMOUSE_ACTIVATED) |
293 | printk(KERN_WARNING "psmouse.c: bad data from KBC -%s%s\n", | 296 | printk(KERN_WARNING "psmouse.c: bad data from KBC -%s%s\n", |
294 | flags & SERIO_TIMEOUT ? " timeout" : "", | 297 | flags & SERIO_TIMEOUT ? " timeout" : "", |
@@ -759,6 +762,7 @@ static const struct psmouse_protocol psmouse_protocols[] = { | |||
759 | .name = "PS/2", | 762 | .name = "PS/2", |
760 | .alias = "bare", | 763 | .alias = "bare", |
761 | .maxproto = true, | 764 | .maxproto = true, |
765 | .ignore_parity = true, | ||
762 | .detect = ps2bare_detect, | 766 | .detect = ps2bare_detect, |
763 | }, | 767 | }, |
764 | #ifdef CONFIG_MOUSE_PS2_LOGIPS2PP | 768 | #ifdef CONFIG_MOUSE_PS2_LOGIPS2PP |
@@ -786,6 +790,7 @@ static const struct psmouse_protocol psmouse_protocols[] = { | |||
786 | .name = "ImPS/2", | 790 | .name = "ImPS/2", |
787 | .alias = "imps", | 791 | .alias = "imps", |
788 | .maxproto = true, | 792 | .maxproto = true, |
793 | .ignore_parity = true, | ||
789 | .detect = intellimouse_detect, | 794 | .detect = intellimouse_detect, |
790 | }, | 795 | }, |
791 | { | 796 | { |
@@ -793,6 +798,7 @@ static const struct psmouse_protocol psmouse_protocols[] = { | |||
793 | .name = "ImExPS/2", | 798 | .name = "ImExPS/2", |
794 | .alias = "exps", | 799 | .alias = "exps", |
795 | .maxproto = true, | 800 | .maxproto = true, |
801 | .ignore_parity = true, | ||
796 | .detect = im_explorer_detect, | 802 | .detect = im_explorer_detect, |
797 | }, | 803 | }, |
798 | #ifdef CONFIG_MOUSE_PS2_SYNAPTICS | 804 | #ifdef CONFIG_MOUSE_PS2_SYNAPTICS |
@@ -1222,6 +1228,7 @@ static void psmouse_disconnect(struct serio *serio) | |||
1222 | static int psmouse_switch_protocol(struct psmouse *psmouse, | 1228 | static int psmouse_switch_protocol(struct psmouse *psmouse, |
1223 | const struct psmouse_protocol *proto) | 1229 | const struct psmouse_protocol *proto) |
1224 | { | 1230 | { |
1231 | const struct psmouse_protocol *selected_proto; | ||
1225 | struct input_dev *input_dev = psmouse->dev; | 1232 | struct input_dev *input_dev = psmouse->dev; |
1226 | 1233 | ||
1227 | input_dev->dev.parent = &psmouse->ps2dev.serio->dev; | 1234 | input_dev->dev.parent = &psmouse->ps2dev.serio->dev; |
@@ -1245,9 +1252,14 @@ static int psmouse_switch_protocol(struct psmouse *psmouse, | |||
1245 | return -1; | 1252 | return -1; |
1246 | 1253 | ||
1247 | psmouse->type = proto->type; | 1254 | psmouse->type = proto->type; |
1248 | } else | 1255 | selected_proto = proto; |
1256 | } else { | ||
1249 | psmouse->type = psmouse_extensions(psmouse, | 1257 | psmouse->type = psmouse_extensions(psmouse, |
1250 | psmouse_max_proto, true); | 1258 | psmouse_max_proto, true); |
1259 | selected_proto = psmouse_protocol_by_type(psmouse->type); | ||
1260 | } | ||
1261 | |||
1262 | psmouse->ignore_parity = selected_proto->ignore_parity; | ||
1251 | 1263 | ||
1252 | /* | 1264 | /* |
1253 | * If mouse's packet size is 3 there is no point in polling the | 1265 | * If mouse's packet size is 3 there is no point in polling the |
@@ -1267,7 +1279,7 @@ static int psmouse_switch_protocol(struct psmouse *psmouse, | |||
1267 | psmouse->resync_time = 0; | 1279 | psmouse->resync_time = 0; |
1268 | 1280 | ||
1269 | snprintf(psmouse->devname, sizeof(psmouse->devname), "%s %s %s", | 1281 | snprintf(psmouse->devname, sizeof(psmouse->devname), "%s %s %s", |
1270 | psmouse_protocol_by_type(psmouse->type)->name, psmouse->vendor, psmouse->name); | 1282 | selected_proto->name, psmouse->vendor, psmouse->name); |
1271 | 1283 | ||
1272 | input_dev->name = psmouse->devname; | 1284 | input_dev->name = psmouse->devname; |
1273 | input_dev->phys = psmouse->phys; | 1285 | input_dev->phys = psmouse->phys; |
diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h index e053bdd137ff..593e910bfc7a 100644 --- a/drivers/input/mouse/psmouse.h +++ b/drivers/input/mouse/psmouse.h | |||
@@ -47,6 +47,7 @@ struct psmouse { | |||
47 | unsigned char pktcnt; | 47 | unsigned char pktcnt; |
48 | unsigned char pktsize; | 48 | unsigned char pktsize; |
49 | unsigned char type; | 49 | unsigned char type; |
50 | bool ignore_parity; | ||
50 | bool acks_disable_command; | 51 | bool acks_disable_command; |
51 | unsigned int model; | 52 | unsigned int model; |
52 | unsigned long last; | 53 | unsigned long last; |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 026df6010161..ebd7a99efeae 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -137,7 +137,8 @@ static int synaptics_capability(struct psmouse *psmouse) | |||
137 | if (synaptics_send_cmd(psmouse, SYN_QUE_CAPABILITIES, cap)) | 137 | if (synaptics_send_cmd(psmouse, SYN_QUE_CAPABILITIES, cap)) |
138 | return -1; | 138 | return -1; |
139 | priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2]; | 139 | priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2]; |
140 | priv->ext_cap = 0; | 140 | priv->ext_cap = priv->ext_cap_0c = 0; |
141 | |||
141 | if (!SYN_CAP_VALID(priv->capabilities)) | 142 | if (!SYN_CAP_VALID(priv->capabilities)) |
142 | return -1; | 143 | return -1; |
143 | 144 | ||
@@ -150,7 +151,7 @@ static int synaptics_capability(struct psmouse *psmouse) | |||
150 | if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 1) { | 151 | if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 1) { |
151 | if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_CAPAB, cap)) { | 152 | if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_CAPAB, cap)) { |
152 | printk(KERN_ERR "Synaptics claims to have extended capabilities," | 153 | printk(KERN_ERR "Synaptics claims to have extended capabilities," |
153 | " but I'm not able to read them."); | 154 | " but I'm not able to read them.\n"); |
154 | } else { | 155 | } else { |
155 | priv->ext_cap = (cap[0] << 16) | (cap[1] << 8) | cap[2]; | 156 | priv->ext_cap = (cap[0] << 16) | (cap[1] << 8) | cap[2]; |
156 | 157 | ||
@@ -162,6 +163,16 @@ static int synaptics_capability(struct psmouse *psmouse) | |||
162 | priv->ext_cap &= 0xff0fff; | 163 | priv->ext_cap &= 0xff0fff; |
163 | } | 164 | } |
164 | } | 165 | } |
166 | |||
167 | if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 4) { | ||
168 | if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_CAPAB_0C, cap)) { | ||
169 | printk(KERN_ERR "Synaptics claims to have extended capability 0x0c," | ||
170 | " but I'm not able to read it.\n"); | ||
171 | } else { | ||
172 | priv->ext_cap_0c = (cap[0] << 16) | (cap[1] << 8) | cap[2]; | ||
173 | } | ||
174 | } | ||
175 | |||
165 | return 0; | 176 | return 0; |
166 | } | 177 | } |
167 | 178 | ||
@@ -348,7 +359,15 @@ static void synaptics_parse_hw_state(unsigned char buf[], struct synaptics_data | |||
348 | hw->left = (buf[0] & 0x01) ? 1 : 0; | 359 | hw->left = (buf[0] & 0x01) ? 1 : 0; |
349 | hw->right = (buf[0] & 0x02) ? 1 : 0; | 360 | hw->right = (buf[0] & 0x02) ? 1 : 0; |
350 | 361 | ||
351 | if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities)) { | 362 | if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { |
363 | /* | ||
364 | * Clickpad's button is transmitted as middle button, | ||
365 | * however, since it is primary button, we will report | ||
366 | * it as BTN_LEFT. | ||
367 | */ | ||
368 | hw->left = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0; | ||
369 | |||
370 | } else if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities)) { | ||
352 | hw->middle = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0; | 371 | hw->middle = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0; |
353 | if (hw->w == 2) | 372 | if (hw->w == 2) |
354 | hw->scroll = (signed char)(buf[1]); | 373 | hw->scroll = (signed char)(buf[1]); |
@@ -593,6 +612,12 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv) | |||
593 | 612 | ||
594 | dev->absres[ABS_X] = priv->x_res; | 613 | dev->absres[ABS_X] = priv->x_res; |
595 | dev->absres[ABS_Y] = priv->y_res; | 614 | dev->absres[ABS_Y] = priv->y_res; |
615 | |||
616 | if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { | ||
617 | /* Clickpads report only left button */ | ||
618 | __clear_bit(BTN_RIGHT, dev->keybit); | ||
619 | __clear_bit(BTN_MIDDLE, dev->keybit); | ||
620 | } | ||
596 | } | 621 | } |
597 | 622 | ||
598 | static void synaptics_disconnect(struct psmouse *psmouse) | 623 | static void synaptics_disconnect(struct psmouse *psmouse) |
@@ -697,10 +722,10 @@ int synaptics_init(struct psmouse *psmouse) | |||
697 | 722 | ||
698 | priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS; | 723 | priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS; |
699 | 724 | ||
700 | printk(KERN_INFO "Synaptics Touchpad, model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx\n", | 725 | printk(KERN_INFO "Synaptics Touchpad, model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx/%#lx\n", |
701 | SYN_ID_MODEL(priv->identity), | 726 | SYN_ID_MODEL(priv->identity), |
702 | SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity), | 727 | SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity), |
703 | priv->model_id, priv->capabilities, priv->ext_cap); | 728 | priv->model_id, priv->capabilities, priv->ext_cap, priv->ext_cap_0c); |
704 | 729 | ||
705 | set_input_params(psmouse->dev, priv); | 730 | set_input_params(psmouse->dev, priv); |
706 | 731 | ||
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h index f0f40a331dc8..ae37c5d162a4 100644 --- a/drivers/input/mouse/synaptics.h +++ b/drivers/input/mouse/synaptics.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define SYN_QUE_SERIAL_NUMBER_SUFFIX 0x07 | 18 | #define SYN_QUE_SERIAL_NUMBER_SUFFIX 0x07 |
19 | #define SYN_QUE_RESOLUTION 0x08 | 19 | #define SYN_QUE_RESOLUTION 0x08 |
20 | #define SYN_QUE_EXT_CAPAB 0x09 | 20 | #define SYN_QUE_EXT_CAPAB 0x09 |
21 | #define SYN_QUE_EXT_CAPAB_0C 0x0c | ||
21 | 22 | ||
22 | /* synatics modes */ | 23 | /* synatics modes */ |
23 | #define SYN_BIT_ABSOLUTE_MODE (1 << 7) | 24 | #define SYN_BIT_ABSOLUTE_MODE (1 << 7) |
@@ -48,6 +49,8 @@ | |||
48 | #define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47) | 49 | #define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47) |
49 | #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) | 50 | #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) |
50 | #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) | 51 | #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) |
52 | #define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16) | ||
53 | #define SYN_CAP_CLICKPAD(ex0c) ((ex0c) & 0x100100) | ||
51 | 54 | ||
52 | /* synaptics modes query bits */ | 55 | /* synaptics modes query bits */ |
53 | #define SYN_MODE_ABSOLUTE(m) ((m) & (1 << 7)) | 56 | #define SYN_MODE_ABSOLUTE(m) ((m) & (1 << 7)) |
@@ -96,6 +99,7 @@ struct synaptics_data { | |||
96 | unsigned long int model_id; /* Model-ID */ | 99 | unsigned long int model_id; /* Model-ID */ |
97 | unsigned long int capabilities; /* Capabilities */ | 100 | unsigned long int capabilities; /* Capabilities */ |
98 | unsigned long int ext_cap; /* Extended Capabilities */ | 101 | unsigned long int ext_cap; /* Extended Capabilities */ |
102 | unsigned long int ext_cap_0c; /* Ext Caps from 0x0c query */ | ||
99 | unsigned long int identity; /* Identification */ | 103 | unsigned long int identity; /* Identification */ |
100 | int x_res; /* X resolution in units/mm */ | 104 | int x_res; /* X resolution in units/mm */ |
101 | int y_res; /* Y resolution in units/mm */ | 105 | int y_res; /* Y resolution in units/mm */ |
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index 204b8a1a601c..75f8b73010fa 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c | |||
@@ -124,14 +124,25 @@ static irqreturn_t eeti_ts_isr(int irq, void *dev_id) | |||
124 | return IRQ_HANDLED; | 124 | return IRQ_HANDLED; |
125 | } | 125 | } |
126 | 126 | ||
127 | static int eeti_ts_open(struct input_dev *dev) | 127 | static void eeti_ts_start(struct eeti_ts_priv *priv) |
128 | { | 128 | { |
129 | struct eeti_ts_priv *priv = input_get_drvdata(dev); | ||
130 | |||
131 | enable_irq(priv->irq); | 129 | enable_irq(priv->irq); |
132 | 130 | ||
133 | /* Read the events once to arm the IRQ */ | 131 | /* Read the events once to arm the IRQ */ |
134 | eeti_ts_read(&priv->work); | 132 | eeti_ts_read(&priv->work); |
133 | } | ||
134 | |||
135 | static void eeti_ts_stop(struct eeti_ts_priv *priv) | ||
136 | { | ||
137 | disable_irq(priv->irq); | ||
138 | cancel_work_sync(&priv->work); | ||
139 | } | ||
140 | |||
141 | static int eeti_ts_open(struct input_dev *dev) | ||
142 | { | ||
143 | struct eeti_ts_priv *priv = input_get_drvdata(dev); | ||
144 | |||
145 | eeti_ts_start(priv); | ||
135 | 146 | ||
136 | return 0; | 147 | return 0; |
137 | } | 148 | } |
@@ -140,8 +151,7 @@ static void eeti_ts_close(struct input_dev *dev) | |||
140 | { | 151 | { |
141 | struct eeti_ts_priv *priv = input_get_drvdata(dev); | 152 | struct eeti_ts_priv *priv = input_get_drvdata(dev); |
142 | 153 | ||
143 | disable_irq(priv->irq); | 154 | eeti_ts_stop(priv); |
144 | cancel_work_sync(&priv->work); | ||
145 | } | 155 | } |
146 | 156 | ||
147 | static int __devinit eeti_ts_probe(struct i2c_client *client, | 157 | static int __devinit eeti_ts_probe(struct i2c_client *client, |
@@ -153,10 +163,12 @@ static int __devinit eeti_ts_probe(struct i2c_client *client, | |||
153 | unsigned int irq_flags; | 163 | unsigned int irq_flags; |
154 | int err = -ENOMEM; | 164 | int err = -ENOMEM; |
155 | 165 | ||
156 | /* In contrast to what's described in the datasheet, there seems | 166 | /* |
167 | * In contrast to what's described in the datasheet, there seems | ||
157 | * to be no way of probing the presence of that device using I2C | 168 | * to be no way of probing the presence of that device using I2C |
158 | * commands. So we need to blindly believe it is there, and wait | 169 | * commands. So we need to blindly believe it is there, and wait |
159 | * for interrupts to occur. */ | 170 | * for interrupts to occur. |
171 | */ | ||
160 | 172 | ||
161 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 173 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
162 | if (!priv) { | 174 | if (!priv) { |
@@ -212,9 +224,11 @@ static int __devinit eeti_ts_probe(struct i2c_client *client, | |||
212 | goto err2; | 224 | goto err2; |
213 | } | 225 | } |
214 | 226 | ||
215 | /* Disable the irq for now. It will be enabled once the input device | 227 | /* |
216 | * is opened. */ | 228 | * Disable the device for now. It will be enabled once the |
217 | disable_irq(priv->irq); | 229 | * input device is opened. |
230 | */ | ||
231 | eeti_ts_stop(priv); | ||
218 | 232 | ||
219 | device_init_wakeup(&client->dev, 0); | 233 | device_init_wakeup(&client->dev, 0); |
220 | return 0; | 234 | return 0; |
@@ -235,6 +249,12 @@ static int __devexit eeti_ts_remove(struct i2c_client *client) | |||
235 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); | 249 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); |
236 | 250 | ||
237 | free_irq(priv->irq, priv); | 251 | free_irq(priv->irq, priv); |
252 | /* | ||
253 | * eeti_ts_stop() leaves IRQ disabled. We need to re-enable it | ||
254 | * so that device still works if we reload the driver. | ||
255 | */ | ||
256 | enable_irq(priv->irq); | ||
257 | |||
238 | input_unregister_device(priv->input); | 258 | input_unregister_device(priv->input); |
239 | i2c_set_clientdata(client, NULL); | 259 | i2c_set_clientdata(client, NULL); |
240 | kfree(priv); | 260 | kfree(priv); |
@@ -246,6 +266,14 @@ static int __devexit eeti_ts_remove(struct i2c_client *client) | |||
246 | static int eeti_ts_suspend(struct i2c_client *client, pm_message_t mesg) | 266 | static int eeti_ts_suspend(struct i2c_client *client, pm_message_t mesg) |
247 | { | 267 | { |
248 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); | 268 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); |
269 | struct input_dev *input_dev = priv->input; | ||
270 | |||
271 | mutex_lock(&input_dev->mutex); | ||
272 | |||
273 | if (input_dev->users) | ||
274 | eeti_ts_stop(priv); | ||
275 | |||
276 | mutex_unlock(&input_dev->mutex); | ||
249 | 277 | ||
250 | if (device_may_wakeup(&client->dev)) | 278 | if (device_may_wakeup(&client->dev)) |
251 | enable_irq_wake(priv->irq); | 279 | enable_irq_wake(priv->irq); |
@@ -256,10 +284,18 @@ static int eeti_ts_suspend(struct i2c_client *client, pm_message_t mesg) | |||
256 | static int eeti_ts_resume(struct i2c_client *client) | 284 | static int eeti_ts_resume(struct i2c_client *client) |
257 | { | 285 | { |
258 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); | 286 | struct eeti_ts_priv *priv = i2c_get_clientdata(client); |
287 | struct input_dev *input_dev = priv->input; | ||
259 | 288 | ||
260 | if (device_may_wakeup(&client->dev)) | 289 | if (device_may_wakeup(&client->dev)) |
261 | disable_irq_wake(priv->irq); | 290 | disable_irq_wake(priv->irq); |
262 | 291 | ||
292 | mutex_lock(&input_dev->mutex); | ||
293 | |||
294 | if (input_dev->users) | ||
295 | eeti_ts_start(priv); | ||
296 | |||
297 | mutex_unlock(&input_dev->mutex); | ||
298 | |||
263 | return 0; | 299 | return 0; |
264 | } | 300 | } |
265 | #else | 301 | #else |
diff --git a/drivers/mtd/internal.h b/drivers/mtd/internal.h deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/drivers/mtd/internal.h +++ /dev/null | |||
diff --git a/drivers/mtd/mtdbdi.c b/drivers/mtd/mtdbdi.c deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/drivers/mtd/mtdbdi.c +++ /dev/null | |||
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index 6995169d285a..cd17d09f385c 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c | |||
@@ -311,11 +311,6 @@ err: | |||
311 | processed++; | 311 | processed++; |
312 | } | 312 | } |
313 | 313 | ||
314 | if (processed) { | ||
315 | wrw(ep, REG_RXDENQ, processed); | ||
316 | wrw(ep, REG_RXSTSENQ, processed); | ||
317 | } | ||
318 | |||
319 | return processed; | 314 | return processed; |
320 | } | 315 | } |
321 | 316 | ||
@@ -350,6 +345,11 @@ poll_some_more: | |||
350 | goto poll_some_more; | 345 | goto poll_some_more; |
351 | } | 346 | } |
352 | 347 | ||
348 | if (rx) { | ||
349 | wrw(ep, REG_RXDENQ, rx); | ||
350 | wrw(ep, REG_RXSTSENQ, rx); | ||
351 | } | ||
352 | |||
353 | return rx; | 353 | return rx; |
354 | } | 354 | } |
355 | 355 | ||
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index fb8fc7d1b50d..dbf81788bb40 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -4633,6 +4633,9 @@ static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state) | |||
4633 | reg16 &= ~state; | 4633 | reg16 &= ~state; |
4634 | pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16); | 4634 | pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16); |
4635 | 4635 | ||
4636 | if (!pdev->bus->self) | ||
4637 | return; | ||
4638 | |||
4636 | pos = pci_pcie_cap(pdev->bus->self); | 4639 | pos = pci_pcie_cap(pdev->bus->self); |
4637 | pci_read_config_word(pdev->bus->self, pos + PCI_EXP_LNKCTL, ®16); | 4640 | pci_read_config_word(pdev->bus->self, pos + PCI_EXP_LNKCTL, ®16); |
4638 | reg16 &= ~state; | 4641 | reg16 &= ~state; |
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 9f98c1c4a344..9b4e8f797a7a 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
@@ -1653,7 +1653,7 @@ fec_set_mac_address(struct net_device *dev, void *p) | |||
1653 | (dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24), | 1653 | (dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24), |
1654 | fep->hwp + FEC_ADDR_LOW); | 1654 | fep->hwp + FEC_ADDR_LOW); |
1655 | writel((dev->dev_addr[5] << 16) | (dev->dev_addr[4] << 24), | 1655 | writel((dev->dev_addr[5] << 16) | (dev->dev_addr[4] << 24), |
1656 | fep + FEC_ADDR_HIGH); | 1656 | fep->hwp + FEC_ADDR_HIGH); |
1657 | return 0; | 1657 | return 0; |
1658 | } | 1658 | } |
1659 | 1659 | ||
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index fc5938ba3d78..a527e37728cd 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig | |||
@@ -88,6 +88,11 @@ config LSI_ET1011C_PHY | |||
88 | ---help--- | 88 | ---help--- |
89 | Supports the LSI ET1011C PHY. | 89 | Supports the LSI ET1011C PHY. |
90 | 90 | ||
91 | config MICREL_PHY | ||
92 | tristate "Driver for Micrel PHYs" | ||
93 | ---help--- | ||
94 | Supports the KSZ9021, VSC8201, KS8001 PHYs. | ||
95 | |||
91 | config FIXED_PHY | 96 | config FIXED_PHY |
92 | bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" | 97 | bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" |
93 | depends on PHYLIB=y | 98 | depends on PHYLIB=y |
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile index 1342585af381..13bebab65d02 100644 --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile | |||
@@ -20,4 +20,5 @@ obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o | |||
20 | obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o | 20 | obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o |
21 | obj-$(CONFIG_NATIONAL_PHY) += national.o | 21 | obj-$(CONFIG_NATIONAL_PHY) += national.o |
22 | obj-$(CONFIG_STE10XP) += ste10Xp.o | 22 | obj-$(CONFIG_STE10XP) += ste10Xp.o |
23 | obj-$(CONFIG_MICREL_PHY) += micrel.o | ||
23 | obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o | 24 | obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o |
diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c index a872aea4ed74..f443d43edd80 100644 --- a/drivers/net/phy/mdio-octeon.c +++ b/drivers/net/phy/mdio-octeon.c | |||
@@ -88,6 +88,7 @@ static int octeon_mdiobus_write(struct mii_bus *bus, int phy_id, | |||
88 | static int __init octeon_mdiobus_probe(struct platform_device *pdev) | 88 | static int __init octeon_mdiobus_probe(struct platform_device *pdev) |
89 | { | 89 | { |
90 | struct octeon_mdiobus *bus; | 90 | struct octeon_mdiobus *bus; |
91 | union cvmx_smix_en smi_en; | ||
91 | int i; | 92 | int i; |
92 | int err = -ENOENT; | 93 | int err = -ENOENT; |
93 | 94 | ||
@@ -103,6 +104,10 @@ static int __init octeon_mdiobus_probe(struct platform_device *pdev) | |||
103 | if (!bus->mii_bus) | 104 | if (!bus->mii_bus) |
104 | goto err; | 105 | goto err; |
105 | 106 | ||
107 | smi_en.u64 = 0; | ||
108 | smi_en.s.en = 1; | ||
109 | cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64); | ||
110 | |||
106 | /* | 111 | /* |
107 | * Standard Octeon evaluation boards don't support phy | 112 | * Standard Octeon evaluation boards don't support phy |
108 | * interrupts, we need to poll. | 113 | * interrupts, we need to poll. |
@@ -133,17 +138,22 @@ err_register: | |||
133 | 138 | ||
134 | err: | 139 | err: |
135 | devm_kfree(&pdev->dev, bus); | 140 | devm_kfree(&pdev->dev, bus); |
141 | smi_en.u64 = 0; | ||
142 | cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64); | ||
136 | return err; | 143 | return err; |
137 | } | 144 | } |
138 | 145 | ||
139 | static int __exit octeon_mdiobus_remove(struct platform_device *pdev) | 146 | static int __exit octeon_mdiobus_remove(struct platform_device *pdev) |
140 | { | 147 | { |
141 | struct octeon_mdiobus *bus; | 148 | struct octeon_mdiobus *bus; |
149 | union cvmx_smix_en smi_en; | ||
142 | 150 | ||
143 | bus = dev_get_drvdata(&pdev->dev); | 151 | bus = dev_get_drvdata(&pdev->dev); |
144 | 152 | ||
145 | mdiobus_unregister(bus->mii_bus); | 153 | mdiobus_unregister(bus->mii_bus); |
146 | mdiobus_free(bus->mii_bus); | 154 | mdiobus_free(bus->mii_bus); |
155 | smi_en.u64 = 0; | ||
156 | cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64); | ||
147 | return 0; | 157 | return 0; |
148 | } | 158 | } |
149 | 159 | ||
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c new file mode 100644 index 000000000000..0cd80e4d71d9 --- /dev/null +++ b/drivers/net/phy/micrel.c | |||
@@ -0,0 +1,104 @@ | |||
1 | /* | ||
2 | * drivers/net/phy/micrel.c | ||
3 | * | ||
4 | * Driver for Micrel PHYs | ||
5 | * | ||
6 | * Author: David J. Choi | ||
7 | * | ||
8 | * Copyright (c) 2010 Micrel, Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | * Support : ksz9021 , vsc8201, ks8001 | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/module.h> | ||
20 | #include <linux/phy.h> | ||
21 | |||
22 | #define PHY_ID_KSZ9021 0x00221611 | ||
23 | #define PHY_ID_VSC8201 0x000FC413 | ||
24 | #define PHY_ID_KS8001 0x0022161A | ||
25 | |||
26 | |||
27 | static int kszphy_config_init(struct phy_device *phydev) | ||
28 | { | ||
29 | return 0; | ||
30 | } | ||
31 | |||
32 | |||
33 | static struct phy_driver ks8001_driver = { | ||
34 | .phy_id = PHY_ID_KS8001, | ||
35 | .phy_id_mask = 0x00fffff0, | ||
36 | .features = PHY_BASIC_FEATURES, | ||
37 | .flags = PHY_POLL, | ||
38 | .config_init = kszphy_config_init, | ||
39 | .config_aneg = genphy_config_aneg, | ||
40 | .read_status = genphy_read_status, | ||
41 | .driver = { .owner = THIS_MODULE,}, | ||
42 | }; | ||
43 | |||
44 | static struct phy_driver vsc8201_driver = { | ||
45 | .phy_id = PHY_ID_VSC8201, | ||
46 | .name = "Micrel VSC8201", | ||
47 | .phy_id_mask = 0x00fffff0, | ||
48 | .features = PHY_BASIC_FEATURES, | ||
49 | .flags = PHY_POLL, | ||
50 | .config_init = kszphy_config_init, | ||
51 | .config_aneg = genphy_config_aneg, | ||
52 | .read_status = genphy_read_status, | ||
53 | .driver = { .owner = THIS_MODULE,}, | ||
54 | }; | ||
55 | |||
56 | static struct phy_driver ksz9021_driver = { | ||
57 | .phy_id = PHY_ID_KSZ9021, | ||
58 | .phy_id_mask = 0x000fff10, | ||
59 | .name = "Micrel KSZ9021 Gigabit PHY", | ||
60 | .features = PHY_GBIT_FEATURES | SUPPORTED_Pause, | ||
61 | .flags = PHY_POLL, | ||
62 | .config_init = kszphy_config_init, | ||
63 | .config_aneg = genphy_config_aneg, | ||
64 | .read_status = genphy_read_status, | ||
65 | .driver = { .owner = THIS_MODULE, }, | ||
66 | }; | ||
67 | |||
68 | static int __init ksphy_init(void) | ||
69 | { | ||
70 | int ret; | ||
71 | |||
72 | ret = phy_driver_register(&ks8001_driver); | ||
73 | if (ret) | ||
74 | goto err1; | ||
75 | ret = phy_driver_register(&vsc8201_driver); | ||
76 | if (ret) | ||
77 | goto err2; | ||
78 | |||
79 | ret = phy_driver_register(&ksz9021_driver); | ||
80 | if (ret) | ||
81 | goto err3; | ||
82 | return 0; | ||
83 | |||
84 | err3: | ||
85 | phy_driver_unregister(&vsc8201_driver); | ||
86 | err2: | ||
87 | phy_driver_unregister(&ks8001_driver); | ||
88 | err1: | ||
89 | return ret; | ||
90 | } | ||
91 | |||
92 | static void __exit ksphy_exit(void) | ||
93 | { | ||
94 | phy_driver_unregister(&ks8001_driver); | ||
95 | phy_driver_unregister(&vsc8201_driver); | ||
96 | phy_driver_unregister(&ksz9021_driver); | ||
97 | } | ||
98 | |||
99 | module_init(ksphy_init); | ||
100 | module_exit(ksphy_exit); | ||
101 | |||
102 | MODULE_DESCRIPTION("Micrel PHY driver"); | ||
103 | MODULE_AUTHOR("David J. Choi"); | ||
104 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 6e281bc825e5..8518a2e58e53 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -405,6 +405,7 @@ static ssize_t ppp_read(struct file *file, char __user *buf, | |||
405 | DECLARE_WAITQUEUE(wait, current); | 405 | DECLARE_WAITQUEUE(wait, current); |
406 | ssize_t ret; | 406 | ssize_t ret; |
407 | struct sk_buff *skb = NULL; | 407 | struct sk_buff *skb = NULL; |
408 | struct iovec iov; | ||
408 | 409 | ||
409 | ret = count; | 410 | ret = count; |
410 | 411 | ||
@@ -448,7 +449,9 @@ static ssize_t ppp_read(struct file *file, char __user *buf, | |||
448 | if (skb->len > count) | 449 | if (skb->len > count) |
449 | goto outf; | 450 | goto outf; |
450 | ret = -EFAULT; | 451 | ret = -EFAULT; |
451 | if (copy_to_user(buf, skb->data, skb->len)) | 452 | iov.iov_base = buf; |
453 | iov.iov_len = count; | ||
454 | if (skb_copy_datagram_iovec(skb, 0, &iov, skb->len)) | ||
452 | goto outf; | 455 | goto outf; |
453 | ret = skb->len; | 456 | ret = skb->len; |
454 | 457 | ||
@@ -1567,13 +1570,22 @@ ppp_input(struct ppp_channel *chan, struct sk_buff *skb) | |||
1567 | struct channel *pch = chan->ppp; | 1570 | struct channel *pch = chan->ppp; |
1568 | int proto; | 1571 | int proto; |
1569 | 1572 | ||
1570 | if (!pch || skb->len == 0) { | 1573 | if (!pch) { |
1571 | kfree_skb(skb); | 1574 | kfree_skb(skb); |
1572 | return; | 1575 | return; |
1573 | } | 1576 | } |
1574 | 1577 | ||
1575 | proto = PPP_PROTO(skb); | ||
1576 | read_lock_bh(&pch->upl); | 1578 | read_lock_bh(&pch->upl); |
1579 | if (!pskb_may_pull(skb, 2)) { | ||
1580 | kfree_skb(skb); | ||
1581 | if (pch->ppp) { | ||
1582 | ++pch->ppp->dev->stats.rx_length_errors; | ||
1583 | ppp_receive_error(pch->ppp); | ||
1584 | } | ||
1585 | goto done; | ||
1586 | } | ||
1587 | |||
1588 | proto = PPP_PROTO(skb); | ||
1577 | if (!pch->ppp || proto >= 0xc000 || proto == PPP_CCPFRAG) { | 1589 | if (!pch->ppp || proto >= 0xc000 || proto == PPP_CCPFRAG) { |
1578 | /* put it on the channel queue */ | 1590 | /* put it on the channel queue */ |
1579 | skb_queue_tail(&pch->file.rq, skb); | 1591 | skb_queue_tail(&pch->file.rq, skb); |
@@ -1585,6 +1597,8 @@ ppp_input(struct ppp_channel *chan, struct sk_buff *skb) | |||
1585 | } else { | 1597 | } else { |
1586 | ppp_do_recv(pch->ppp, skb, pch); | 1598 | ppp_do_recv(pch->ppp, skb, pch); |
1587 | } | 1599 | } |
1600 | |||
1601 | done: | ||
1588 | read_unlock_bh(&pch->upl); | 1602 | read_unlock_bh(&pch->upl); |
1589 | } | 1603 | } |
1590 | 1604 | ||
@@ -1617,7 +1631,8 @@ ppp_input_error(struct ppp_channel *chan, int code) | |||
1617 | static void | 1631 | static void |
1618 | ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) | 1632 | ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) |
1619 | { | 1633 | { |
1620 | if (pskb_may_pull(skb, 2)) { | 1634 | /* note: a 0-length skb is used as an error indication */ |
1635 | if (skb->len > 0) { | ||
1621 | #ifdef CONFIG_PPP_MULTILINK | 1636 | #ifdef CONFIG_PPP_MULTILINK |
1622 | /* XXX do channel-level decompression here */ | 1637 | /* XXX do channel-level decompression here */ |
1623 | if (PPP_PROTO(skb) == PPP_MP) | 1638 | if (PPP_PROTO(skb) == PPP_MP) |
@@ -1625,15 +1640,10 @@ ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) | |||
1625 | else | 1640 | else |
1626 | #endif /* CONFIG_PPP_MULTILINK */ | 1641 | #endif /* CONFIG_PPP_MULTILINK */ |
1627 | ppp_receive_nonmp_frame(ppp, skb); | 1642 | ppp_receive_nonmp_frame(ppp, skb); |
1628 | return; | 1643 | } else { |
1644 | kfree_skb(skb); | ||
1645 | ppp_receive_error(ppp); | ||
1629 | } | 1646 | } |
1630 | |||
1631 | if (skb->len > 0) | ||
1632 | /* note: a 0-length skb is used as an error indication */ | ||
1633 | ++ppp->dev->stats.rx_length_errors; | ||
1634 | |||
1635 | kfree_skb(skb); | ||
1636 | ppp_receive_error(ppp); | ||
1637 | } | 1647 | } |
1638 | 1648 | ||
1639 | static void | 1649 | static void |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 4748c21eb72e..dd8106ff35aa 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -1042,14 +1042,14 @@ static void rtl8169_vlan_rx_register(struct net_device *dev, | |||
1042 | } | 1042 | } |
1043 | 1043 | ||
1044 | static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, | 1044 | static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, |
1045 | struct sk_buff *skb) | 1045 | struct sk_buff *skb, int polling) |
1046 | { | 1046 | { |
1047 | u32 opts2 = le32_to_cpu(desc->opts2); | 1047 | u32 opts2 = le32_to_cpu(desc->opts2); |
1048 | struct vlan_group *vlgrp = tp->vlgrp; | 1048 | struct vlan_group *vlgrp = tp->vlgrp; |
1049 | int ret; | 1049 | int ret; |
1050 | 1050 | ||
1051 | if (vlgrp && (opts2 & RxVlanTag)) { | 1051 | if (vlgrp && (opts2 & RxVlanTag)) { |
1052 | vlan_hwaccel_receive_skb(skb, vlgrp, swab16(opts2 & 0xffff)); | 1052 | __vlan_hwaccel_rx(skb, vlgrp, swab16(opts2 & 0xffff), polling); |
1053 | ret = 0; | 1053 | ret = 0; |
1054 | } else | 1054 | } else |
1055 | ret = -1; | 1055 | ret = -1; |
@@ -1066,7 +1066,7 @@ static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp, | |||
1066 | } | 1066 | } |
1067 | 1067 | ||
1068 | static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, | 1068 | static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, |
1069 | struct sk_buff *skb) | 1069 | struct sk_buff *skb, int polling) |
1070 | { | 1070 | { |
1071 | return -1; | 1071 | return -1; |
1072 | } | 1072 | } |
@@ -4445,12 +4445,20 @@ out: | |||
4445 | return done; | 4445 | return done; |
4446 | } | 4446 | } |
4447 | 4447 | ||
4448 | /* | ||
4449 | * Warning : rtl8169_rx_interrupt() might be called : | ||
4450 | * 1) from NAPI (softirq) context | ||
4451 | * (polling = 1 : we should call netif_receive_skb()) | ||
4452 | * 2) from process context (rtl8169_reset_task()) | ||
4453 | * (polling = 0 : we must call netif_rx() instead) | ||
4454 | */ | ||
4448 | static int rtl8169_rx_interrupt(struct net_device *dev, | 4455 | static int rtl8169_rx_interrupt(struct net_device *dev, |
4449 | struct rtl8169_private *tp, | 4456 | struct rtl8169_private *tp, |
4450 | void __iomem *ioaddr, u32 budget) | 4457 | void __iomem *ioaddr, u32 budget) |
4451 | { | 4458 | { |
4452 | unsigned int cur_rx, rx_left; | 4459 | unsigned int cur_rx, rx_left; |
4453 | unsigned int delta, count; | 4460 | unsigned int delta, count; |
4461 | int polling = (budget != ~(u32)0) ? 1 : 0; | ||
4454 | 4462 | ||
4455 | cur_rx = tp->cur_rx; | 4463 | cur_rx = tp->cur_rx; |
4456 | rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; | 4464 | rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; |
@@ -4512,8 +4520,12 @@ static int rtl8169_rx_interrupt(struct net_device *dev, | |||
4512 | skb_put(skb, pkt_size); | 4520 | skb_put(skb, pkt_size); |
4513 | skb->protocol = eth_type_trans(skb, dev); | 4521 | skb->protocol = eth_type_trans(skb, dev); |
4514 | 4522 | ||
4515 | if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0) | 4523 | if (rtl8169_rx_vlan_skb(tp, desc, skb, polling) < 0) { |
4516 | netif_receive_skb(skb); | 4524 | if (likely(polling)) |
4525 | netif_receive_skb(skb); | ||
4526 | else | ||
4527 | netif_rx(skb); | ||
4528 | } | ||
4517 | 4529 | ||
4518 | dev->stats.rx_bytes += pkt_size; | 4530 | dev->stats.rx_bytes += pkt_size; |
4519 | dev->stats.rx_packets++; | 4531 | dev->stats.rx_packets++; |
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index 9944e5d662c0..04efc0c1bda9 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
@@ -2353,17 +2353,36 @@ static int sbmac_init(struct platform_device *pldev, long long base) | |||
2353 | 2353 | ||
2354 | sc->mii_bus = mdiobus_alloc(); | 2354 | sc->mii_bus = mdiobus_alloc(); |
2355 | if (sc->mii_bus == NULL) { | 2355 | if (sc->mii_bus == NULL) { |
2356 | sbmac_uninitctx(sc); | 2356 | err = -ENOMEM; |
2357 | return -ENOMEM; | 2357 | goto uninit_ctx; |
2358 | } | 2358 | } |
2359 | 2359 | ||
2360 | sc->mii_bus->name = sbmac_mdio_string; | ||
2361 | snprintf(sc->mii_bus->id, MII_BUS_ID_SIZE, "%x", idx); | ||
2362 | sc->mii_bus->priv = sc; | ||
2363 | sc->mii_bus->read = sbmac_mii_read; | ||
2364 | sc->mii_bus->write = sbmac_mii_write; | ||
2365 | sc->mii_bus->irq = sc->phy_irq; | ||
2366 | for (i = 0; i < PHY_MAX_ADDR; ++i) | ||
2367 | sc->mii_bus->irq[i] = SBMAC_PHY_INT; | ||
2368 | |||
2369 | sc->mii_bus->parent = &pldev->dev; | ||
2370 | /* | ||
2371 | * Probe PHY address | ||
2372 | */ | ||
2373 | err = mdiobus_register(sc->mii_bus); | ||
2374 | if (err) { | ||
2375 | printk(KERN_ERR "%s: unable to register MDIO bus\n", | ||
2376 | dev->name); | ||
2377 | goto free_mdio; | ||
2378 | } | ||
2379 | dev_set_drvdata(&pldev->dev, sc->mii_bus); | ||
2380 | |||
2360 | err = register_netdev(dev); | 2381 | err = register_netdev(dev); |
2361 | if (err) { | 2382 | if (err) { |
2362 | printk(KERN_ERR "%s.%d: unable to register netdev\n", | 2383 | printk(KERN_ERR "%s.%d: unable to register netdev\n", |
2363 | sbmac_string, idx); | 2384 | sbmac_string, idx); |
2364 | mdiobus_free(sc->mii_bus); | 2385 | goto unreg_mdio; |
2365 | sbmac_uninitctx(sc); | ||
2366 | return err; | ||
2367 | } | 2386 | } |
2368 | 2387 | ||
2369 | pr_info("%s.%d: registered as %s\n", sbmac_string, idx, dev->name); | 2388 | pr_info("%s.%d: registered as %s\n", sbmac_string, idx, dev->name); |
@@ -2379,19 +2398,15 @@ static int sbmac_init(struct platform_device *pldev, long long base) | |||
2379 | pr_info("%s: SiByte Ethernet at 0x%08Lx, address: %pM\n", | 2398 | pr_info("%s: SiByte Ethernet at 0x%08Lx, address: %pM\n", |
2380 | dev->name, base, eaddr); | 2399 | dev->name, base, eaddr); |
2381 | 2400 | ||
2382 | sc->mii_bus->name = sbmac_mdio_string; | ||
2383 | snprintf(sc->mii_bus->id, MII_BUS_ID_SIZE, "%x", idx); | ||
2384 | sc->mii_bus->priv = sc; | ||
2385 | sc->mii_bus->read = sbmac_mii_read; | ||
2386 | sc->mii_bus->write = sbmac_mii_write; | ||
2387 | sc->mii_bus->irq = sc->phy_irq; | ||
2388 | for (i = 0; i < PHY_MAX_ADDR; ++i) | ||
2389 | sc->mii_bus->irq[i] = SBMAC_PHY_INT; | ||
2390 | |||
2391 | sc->mii_bus->parent = &pldev->dev; | ||
2392 | dev_set_drvdata(&pldev->dev, sc->mii_bus); | ||
2393 | |||
2394 | return 0; | 2401 | return 0; |
2402 | unreg_mdio: | ||
2403 | mdiobus_unregister(sc->mii_bus); | ||
2404 | dev_set_drvdata(&pldev->dev, NULL); | ||
2405 | free_mdio: | ||
2406 | mdiobus_free(sc->mii_bus); | ||
2407 | uninit_ctx: | ||
2408 | sbmac_uninitctx(sc); | ||
2409 | return err; | ||
2395 | } | 2410 | } |
2396 | 2411 | ||
2397 | 2412 | ||
@@ -2417,16 +2432,6 @@ static int sbmac_open(struct net_device *dev) | |||
2417 | goto out_err; | 2432 | goto out_err; |
2418 | } | 2433 | } |
2419 | 2434 | ||
2420 | /* | ||
2421 | * Probe PHY address | ||
2422 | */ | ||
2423 | err = mdiobus_register(sc->mii_bus); | ||
2424 | if (err) { | ||
2425 | printk(KERN_ERR "%s: unable to register MDIO bus\n", | ||
2426 | dev->name); | ||
2427 | goto out_unirq; | ||
2428 | } | ||
2429 | |||
2430 | sc->sbm_speed = sbmac_speed_none; | 2435 | sc->sbm_speed = sbmac_speed_none; |
2431 | sc->sbm_duplex = sbmac_duplex_none; | 2436 | sc->sbm_duplex = sbmac_duplex_none; |
2432 | sc->sbm_fc = sbmac_fc_none; | 2437 | sc->sbm_fc = sbmac_fc_none; |
@@ -2457,11 +2462,7 @@ static int sbmac_open(struct net_device *dev) | |||
2457 | return 0; | 2462 | return 0; |
2458 | 2463 | ||
2459 | out_unregister: | 2464 | out_unregister: |
2460 | mdiobus_unregister(sc->mii_bus); | ||
2461 | |||
2462 | out_unirq: | ||
2463 | free_irq(dev->irq, dev); | 2465 | free_irq(dev->irq, dev); |
2464 | |||
2465 | out_err: | 2466 | out_err: |
2466 | return err; | 2467 | return err; |
2467 | } | 2468 | } |
@@ -2650,9 +2651,6 @@ static int sbmac_close(struct net_device *dev) | |||
2650 | 2651 | ||
2651 | phy_disconnect(sc->phy_dev); | 2652 | phy_disconnect(sc->phy_dev); |
2652 | sc->phy_dev = NULL; | 2653 | sc->phy_dev = NULL; |
2653 | |||
2654 | mdiobus_unregister(sc->mii_bus); | ||
2655 | |||
2656 | free_irq(dev->irq, dev); | 2654 | free_irq(dev->irq, dev); |
2657 | 2655 | ||
2658 | sbdma_emptyring(&(sc->sbm_txdma)); | 2656 | sbdma_emptyring(&(sc->sbm_txdma)); |
@@ -2760,6 +2758,7 @@ static int __exit sbmac_remove(struct platform_device *pldev) | |||
2760 | 2758 | ||
2761 | unregister_netdev(dev); | 2759 | unregister_netdev(dev); |
2762 | sbmac_uninitctx(sc); | 2760 | sbmac_uninitctx(sc); |
2761 | mdiobus_unregister(sc->mii_bus); | ||
2763 | mdiobus_free(sc->mii_bus); | 2762 | mdiobus_free(sc->mii_bus); |
2764 | iounmap(sc->sbm_base); | 2763 | iounmap(sc->sbm_base); |
2765 | free_netdev(dev); | 2764 | free_netdev(dev); |
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index 5d58abc224f4..d7b7018a1de1 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig | |||
@@ -400,7 +400,6 @@ config USB_IPHETH | |||
400 | config USB_SIERRA_NET | 400 | config USB_SIERRA_NET |
401 | tristate "USB-to-WWAN Driver for Sierra Wireless modems" | 401 | tristate "USB-to-WWAN Driver for Sierra Wireless modems" |
402 | depends on USB_USBNET | 402 | depends on USB_USBNET |
403 | default y | ||
404 | help | 403 | help |
405 | Choose this option if you have a Sierra Wireless USB-to-WWAN device. | 404 | Choose this option if you have a Sierra Wireless USB-to-WWAN device. |
406 | 405 | ||
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 04b281002a76..5dfed9297b22 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -240,7 +240,7 @@ static int dm_write_shared_word(struct usbnet *dev, int phy, u8 reg, __le16 valu | |||
240 | goto out; | 240 | goto out; |
241 | 241 | ||
242 | dm_write_reg(dev, DM_SHARED_ADDR, phy ? (reg | 0x40) : reg); | 242 | dm_write_reg(dev, DM_SHARED_ADDR, phy ? (reg | 0x40) : reg); |
243 | dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0x1c : 0x14); | 243 | dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0x1a : 0x12); |
244 | 244 | ||
245 | for (i = 0; i < DM_TIMEOUT; i++) { | 245 | for (i = 0; i < DM_TIMEOUT; i++) { |
246 | u8 tmp; | 246 | u8 tmp; |
diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c index a44f9e0ea098..f1942d69a0d5 100644 --- a/drivers/net/usb/sierra_net.c +++ b/drivers/net/usb/sierra_net.c | |||
@@ -789,6 +789,9 @@ static int sierra_net_bind(struct usbnet *dev, struct usb_interface *intf) | |||
789 | /* prepare sync message from template */ | 789 | /* prepare sync message from template */ |
790 | memcpy(priv->sync_msg, sync_tmplate, sizeof(priv->sync_msg)); | 790 | memcpy(priv->sync_msg, sync_tmplate, sizeof(priv->sync_msg)); |
791 | 791 | ||
792 | /* initiate the sync sequence */ | ||
793 | sierra_net_dosync(dev); | ||
794 | |||
792 | return 0; | 795 | return 0; |
793 | } | 796 | } |
794 | 797 | ||
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c index 269fda362836..c24067f1a0cb 100644 --- a/drivers/net/wireless/p54/p54pci.c +++ b/drivers/net/wireless/p54/p54pci.c | |||
@@ -246,7 +246,7 @@ static void p54p_check_tx_ring(struct ieee80211_hw *dev, u32 *index, | |||
246 | u32 idx, i; | 246 | u32 idx, i; |
247 | 247 | ||
248 | i = (*index) % ring_limit; | 248 | i = (*index) % ring_limit; |
249 | (*index) = idx = le32_to_cpu(ring_control->device_idx[1]); | 249 | (*index) = idx = le32_to_cpu(ring_control->device_idx[ring_index]); |
250 | idx %= ring_limit; | 250 | idx %= ring_limit; |
251 | 251 | ||
252 | while (i != idx) { | 252 | while (i != idx) { |
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index 18ecae4a4375..b4748337223b 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c | |||
@@ -69,7 +69,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | phy = get_phy_device(mdio, be32_to_cpup(addr)); | 71 | phy = get_phy_device(mdio, be32_to_cpup(addr)); |
72 | if (!phy) { | 72 | if (!phy || IS_ERR(phy)) { |
73 | dev_err(&mdio->dev, "error probing PHY at address %i\n", | 73 | dev_err(&mdio->dev, "error probing PHY at address %i\n", |
74 | *addr); | 74 | *addr); |
75 | continue; | 75 | continue; |
diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c index 2d48196a48cd..0f4cc3f00028 100644 --- a/drivers/pcmcia/db1xxx_ss.c +++ b/drivers/pcmcia/db1xxx_ss.c | |||
@@ -146,7 +146,6 @@ static irqreturn_t db1200_pcmcia_cdirq(int irq, void *data) | |||
146 | static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock) | 146 | static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock) |
147 | { | 147 | { |
148 | int ret; | 148 | int ret; |
149 | unsigned long flags; | ||
150 | 149 | ||
151 | if (sock->stschg_irq != -1) { | 150 | if (sock->stschg_irq != -1) { |
152 | ret = request_irq(sock->stschg_irq, db1000_pcmcia_stschgirq, | 151 | ret = request_irq(sock->stschg_irq, db1000_pcmcia_stschgirq, |
@@ -162,30 +161,23 @@ static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock) | |||
162 | * active one disabled. | 161 | * active one disabled. |
163 | */ | 162 | */ |
164 | if (sock->board_type == BOARD_TYPE_DB1200) { | 163 | if (sock->board_type == BOARD_TYPE_DB1200) { |
165 | local_irq_save(flags); | ||
166 | |||
167 | ret = request_irq(sock->insert_irq, db1200_pcmcia_cdirq, | 164 | ret = request_irq(sock->insert_irq, db1200_pcmcia_cdirq, |
168 | IRQF_DISABLED, "pcmcia_insert", sock); | 165 | IRQF_DISABLED, "pcmcia_insert", sock); |
169 | if (ret) { | 166 | if (ret) |
170 | local_irq_restore(flags); | ||
171 | goto out1; | 167 | goto out1; |
172 | } | ||
173 | 168 | ||
174 | ret = request_irq(sock->eject_irq, db1200_pcmcia_cdirq, | 169 | ret = request_irq(sock->eject_irq, db1200_pcmcia_cdirq, |
175 | IRQF_DISABLED, "pcmcia_eject", sock); | 170 | IRQF_DISABLED, "pcmcia_eject", sock); |
176 | if (ret) { | 171 | if (ret) { |
177 | free_irq(sock->insert_irq, sock); | 172 | free_irq(sock->insert_irq, sock); |
178 | local_irq_restore(flags); | ||
179 | goto out1; | 173 | goto out1; |
180 | } | 174 | } |
181 | 175 | ||
182 | /* disable the currently active one */ | 176 | /* enable the currently silent one */ |
183 | if (db1200_card_inserted(sock)) | 177 | if (db1200_card_inserted(sock)) |
184 | disable_irq_nosync(sock->insert_irq); | 178 | enable_irq(sock->eject_irq); |
185 | else | 179 | else |
186 | disable_irq_nosync(sock->eject_irq); | 180 | enable_irq(sock->insert_irq); |
187 | |||
188 | local_irq_restore(flags); | ||
189 | } else { | 181 | } else { |
190 | /* all other (older) Db1x00 boards use a GPIO to show | 182 | /* all other (older) Db1x00 boards use a GPIO to show |
191 | * card detection status: use both-edge triggers. | 183 | * card detection status: use both-edge triggers. |
diff --git a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c index 24485cc62ff8..4822cb50cd0f 100644 --- a/drivers/serial/8250_pnp.c +++ b/drivers/serial/8250_pnp.c | |||
@@ -348,6 +348,8 @@ static const struct pnp_device_id pnp_dev_table[] = { | |||
348 | { "FUJ02E6", 0 }, | 348 | { "FUJ02E6", 0 }, |
349 | /* Fujitsu Wacom 2FGT Tablet PC device */ | 349 | /* Fujitsu Wacom 2FGT Tablet PC device */ |
350 | { "FUJ02E7", 0 }, | 350 | { "FUJ02E7", 0 }, |
351 | /* Fujitsu Wacom 1FGT Tablet PC device */ | ||
352 | { "FUJ02E9", 0 }, | ||
351 | /* | 353 | /* |
352 | * LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in | 354 | * LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in |
353 | * disguise) | 355 | * disguise) |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 3119fddaedb5..a176ab4bd65b 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -29,39 +29,6 @@ | |||
29 | * kind, whether express or implied. | 29 | * kind, whether express or implied. |
30 | */ | 30 | */ |
31 | 31 | ||
32 | /* Platform device Usage : | ||
33 | * | ||
34 | * Since PSCs can have multiple function, the correct driver for each one | ||
35 | * is selected by calling mpc52xx_match_psc_function(...). The function | ||
36 | * handled by this driver is "uart". | ||
37 | * | ||
38 | * The driver init all necessary registers to place the PSC in uart mode without | ||
39 | * DCD. However, the pin multiplexing aren't changed and should be set either | ||
40 | * by the bootloader or in the platform init code. | ||
41 | * | ||
42 | * The idx field must be equal to the PSC index (e.g. 0 for PSC1, 1 for PSC2, | ||
43 | * and so on). So the PSC1 is mapped to /dev/ttyPSC0, PSC2 to /dev/ttyPSC1 and | ||
44 | * so on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly | ||
45 | * fpr the console code : without this 1:1 mapping, at early boot time, when we | ||
46 | * are parsing the kernel args console=ttyPSC?, we wouldn't know which PSC it | ||
47 | * will be mapped to. | ||
48 | */ | ||
49 | |||
50 | /* OF Platform device Usage : | ||
51 | * | ||
52 | * This driver is only used for PSCs configured in uart mode. The device | ||
53 | * tree will have a node for each PSC with "mpc52xx-psc-uart" in the compatible | ||
54 | * list. | ||
55 | * | ||
56 | * By default, PSC devices are enumerated in the order they are found. However | ||
57 | * a particular PSC number can be forces by adding 'device_no = <port#>' | ||
58 | * to the device node. | ||
59 | * | ||
60 | * The driver init all necessary registers to place the PSC in uart mode without | ||
61 | * DCD. However, the pin multiplexing aren't changed and should be set either | ||
62 | * by the bootloader or in the platform init code. | ||
63 | */ | ||
64 | |||
65 | #undef DEBUG | 32 | #undef DEBUG |
66 | 33 | ||
67 | #include <linux/device.h> | 34 | #include <linux/device.h> |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 4eaa043ca2a8..700e10833bf9 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -752,8 +752,10 @@ static void pmz_break_ctl(struct uart_port *port, int break_state) | |||
752 | uap->curregs[R5] = new_reg; | 752 | uap->curregs[R5] = new_reg; |
753 | 753 | ||
754 | /* NOTE: Not subject to 'transmitter active' rule. */ | 754 | /* NOTE: Not subject to 'transmitter active' rule. */ |
755 | if (ZS_IS_ASLEEP(uap)) | 755 | if (ZS_IS_ASLEEP(uap)) { |
756 | spin_unlock_irqrestore(&port->lock, flags); | ||
756 | return; | 757 | return; |
758 | } | ||
757 | write_zsreg(uap, R5, uap->curregs[R5]); | 759 | write_zsreg(uap, R5, uap->curregs[R5]); |
758 | } | 760 | } |
759 | 761 | ||
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index d8356af118a8..e0de0d0eedea 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c | |||
@@ -204,6 +204,7 @@ static inline void mcspi_write_chconf0(const struct spi_device *spi, u32 val) | |||
204 | 204 | ||
205 | cs->chconf0 = val; | 205 | cs->chconf0 = val; |
206 | mcspi_write_cs_reg(spi, OMAP2_MCSPI_CHCONF0, val); | 206 | mcspi_write_cs_reg(spi, OMAP2_MCSPI_CHCONF0, val); |
207 | mcspi_read_cs_reg(spi, OMAP2_MCSPI_CHCONF0); | ||
207 | } | 208 | } |
208 | 209 | ||
209 | static void omap2_mcspi_set_dma_req(const struct spi_device *spi, | 210 | static void omap2_mcspi_set_dma_req(const struct spi_device *spi, |
@@ -532,7 +533,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer) | |||
532 | goto out; | 533 | goto out; |
533 | } | 534 | } |
534 | #ifdef VERBOSE | 535 | #ifdef VERBOSE |
535 | dev_dbg(&spi->dev, "write-%d %04x\n", | 536 | dev_dbg(&spi->dev, "write-%d %08x\n", |
536 | word_len, *tx); | 537 | word_len, *tx); |
537 | #endif | 538 | #endif |
538 | __raw_writel(*tx++, tx_reg); | 539 | __raw_writel(*tx++, tx_reg); |
@@ -550,7 +551,7 @@ omap2_mcspi_txrx_pio(struct spi_device *spi, struct spi_transfer *xfer) | |||
550 | mcspi_write_chconf0(spi, l); | 551 | mcspi_write_chconf0(spi, l); |
551 | *rx++ = __raw_readl(rx_reg); | 552 | *rx++ = __raw_readl(rx_reg); |
552 | #ifdef VERBOSE | 553 | #ifdef VERBOSE |
553 | dev_dbg(&spi->dev, "read-%d %04x\n", | 554 | dev_dbg(&spi->dev, "read-%d %08x\n", |
554 | word_len, *(rx - 1)); | 555 | word_len, *(rx - 1)); |
555 | #endif | 556 | #endif |
556 | } | 557 | } |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 9ffb0fdbd6fe..b3a1f9259b62 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -41,7 +41,7 @@ static void spidev_release(struct device *dev) | |||
41 | spi->master->cleanup(spi); | 41 | spi->master->cleanup(spi); |
42 | 42 | ||
43 | spi_master_put(spi->master); | 43 | spi_master_put(spi->master); |
44 | kfree(dev); | 44 | kfree(spi); |
45 | } | 45 | } |
46 | 46 | ||
47 | static ssize_t | 47 | static ssize_t |
@@ -257,6 +257,7 @@ int spi_add_device(struct spi_device *spi) | |||
257 | { | 257 | { |
258 | static DEFINE_MUTEX(spi_add_lock); | 258 | static DEFINE_MUTEX(spi_add_lock); |
259 | struct device *dev = spi->master->dev.parent; | 259 | struct device *dev = spi->master->dev.parent; |
260 | struct device *d; | ||
260 | int status; | 261 | int status; |
261 | 262 | ||
262 | /* Chipselects are numbered 0..max; validate. */ | 263 | /* Chipselects are numbered 0..max; validate. */ |
@@ -278,10 +279,11 @@ int spi_add_device(struct spi_device *spi) | |||
278 | */ | 279 | */ |
279 | mutex_lock(&spi_add_lock); | 280 | mutex_lock(&spi_add_lock); |
280 | 281 | ||
281 | if (bus_find_device_by_name(&spi_bus_type, NULL, dev_name(&spi->dev)) | 282 | d = bus_find_device_by_name(&spi_bus_type, NULL, dev_name(&spi->dev)); |
282 | != NULL) { | 283 | if (d != NULL) { |
283 | dev_err(dev, "chipselect %d already in use\n", | 284 | dev_err(dev, "chipselect %d already in use\n", |
284 | spi->chip_select); | 285 | spi->chip_select); |
286 | put_device(d); | ||
285 | status = -EBUSY; | 287 | status = -EBUSY; |
286 | goto done; | 288 | goto done; |
287 | } | 289 | } |
diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c index e2c44ec6fc45..7ac2c6d8e9a3 100644 --- a/drivers/staging/dt3155/dt3155_drv.c +++ b/drivers/staging/dt3155/dt3155_drv.c | |||
@@ -464,9 +464,9 @@ static void dt3155_init_isr(int minor) | |||
464 | /* 50/60 Hz should be set before this point but let's make sure it is */ | 464 | /* 50/60 Hz should be set before this point but let's make sure it is */ |
465 | /* right anyway */ | 465 | /* right anyway */ |
466 | 466 | ||
467 | ReadI2C(dt3155_lbase[ minor ], CONFIG, &i2c_csr2.reg); | 467 | ReadI2C(dt3155_lbase[ minor ], CSR2, &i2c_csr2.reg); |
468 | i2c_csr2.fld.HZ50 = FORMAT50HZ; | 468 | i2c_csr2.fld.HZ50 = FORMAT50HZ; |
469 | WriteI2C(dt3155_lbase[ minor ], CONFIG, i2c_config.reg); | 469 | WriteI2C(dt3155_lbase[ minor ], CSR2, i2c_csr2.reg); |
470 | 470 | ||
471 | /* enable busmaster chip, clear flags */ | 471 | /* enable busmaster chip, clear flags */ |
472 | 472 | ||
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c index 5d53889fb4a4..3a1112d29aeb 100644 --- a/drivers/staging/hv/Hv.c +++ b/drivers/staging/hv/Hv.c | |||
@@ -306,9 +306,9 @@ void HvCleanup(void) | |||
306 | DPRINT_ENTER(VMBUS); | 306 | DPRINT_ENTER(VMBUS); |
307 | 307 | ||
308 | if (gHvContext.SignalEventBuffer) { | 308 | if (gHvContext.SignalEventBuffer) { |
309 | kfree(gHvContext.SignalEventBuffer); | ||
309 | gHvContext.SignalEventBuffer = NULL; | 310 | gHvContext.SignalEventBuffer = NULL; |
310 | gHvContext.SignalEventParam = NULL; | 311 | gHvContext.SignalEventParam = NULL; |
311 | kfree(gHvContext.SignalEventBuffer); | ||
312 | } | 312 | } |
313 | 313 | ||
314 | if (gHvContext.HypercallPage) { | 314 | if (gHvContext.HypercallPage) { |
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c index cd2930de2176..6704f64c93f0 100644 --- a/drivers/staging/hv/RndisFilter.c +++ b/drivers/staging/hv/RndisFilter.c | |||
@@ -751,6 +751,7 @@ static int RndisFilterOpenDevice(struct rndis_device *Device) | |||
751 | 751 | ||
752 | ret = RndisFilterSetPacketFilter(Device, | 752 | ret = RndisFilterSetPacketFilter(Device, |
753 | NDIS_PACKET_TYPE_BROADCAST | | 753 | NDIS_PACKET_TYPE_BROADCAST | |
754 | NDIS_PACKET_TYPE_ALL_MULTICAST | | ||
754 | NDIS_PACKET_TYPE_DIRECTED); | 755 | NDIS_PACKET_TYPE_DIRECTED); |
755 | if (ret == 0) | 756 | if (ret == 0) |
756 | Device->State = RNDIS_DEV_DATAINITIALIZED; | 757 | Device->State = RNDIS_DEV_DATAINITIALIZED; |
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 2ccb6b93fe47..ab27d9a4446d 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c | |||
@@ -403,8 +403,7 @@ static int netvsc_probe(struct device *device) | |||
403 | if (!net_drv_obj->Base.OnDeviceAdd) | 403 | if (!net_drv_obj->Base.OnDeviceAdd) |
404 | return -1; | 404 | return -1; |
405 | 405 | ||
406 | net = alloc_netdev(sizeof(struct net_device_context), "seth%d", | 406 | net = alloc_etherdev(sizeof(struct net_device_context)); |
407 | ether_setup); | ||
408 | if (!net) | 407 | if (!net) |
409 | return -1; | 408 | return -1; |
410 | 409 | ||
diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c index ea76902797bb..82e43588e8a5 100644 --- a/drivers/staging/iio/accel/lis3l02dq_core.c +++ b/drivers/staging/iio/accel/lis3l02dq_core.c | |||
@@ -618,7 +618,7 @@ static int lis3l02dq_thresh_handler_th(struct iio_dev *dev_info, | |||
618 | static void lis3l02dq_thresh_handler_bh_no_check(struct work_struct *work_s) | 618 | static void lis3l02dq_thresh_handler_bh_no_check(struct work_struct *work_s) |
619 | { | 619 | { |
620 | struct iio_work_cont *wc | 620 | struct iio_work_cont *wc |
621 | = container_of(work_s, struct iio_work_cont, ws_nocheck); | 621 | = container_of(work_s, struct iio_work_cont, ws); |
622 | struct lis3l02dq_state *st = wc->st; | 622 | struct lis3l02dq_state *st = wc->st; |
623 | u8 t; | 623 | u8 t; |
624 | 624 | ||
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index 93712430e579..a4d97ea0df3d 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c | |||
@@ -493,6 +493,9 @@ int lis3l02dq_probe_trigger(struct iio_dev *indio_dev) | |||
493 | struct lis3l02dq_state *state = indio_dev->dev_data; | 493 | struct lis3l02dq_state *state = indio_dev->dev_data; |
494 | 494 | ||
495 | state->trig = iio_allocate_trigger(); | 495 | state->trig = iio_allocate_trigger(); |
496 | if (!state->trig) | ||
497 | return -ENOMEM; | ||
498 | |||
496 | state->trig->name = kmalloc(IIO_TRIGGER_NAME_LENGTH, GFP_KERNEL); | 499 | state->trig->name = kmalloc(IIO_TRIGGER_NAME_LENGTH, GFP_KERNEL); |
497 | if (!state->trig->name) { | 500 | if (!state->trig->name) { |
498 | ret = -ENOMEM; | 501 | ret = -ENOMEM; |
diff --git a/drivers/staging/iio/adc/max1363_core.c b/drivers/staging/iio/adc/max1363_core.c index 790d1cc9cdc3..773f1d1d9c6e 100644 --- a/drivers/staging/iio/adc/max1363_core.c +++ b/drivers/staging/iio/adc/max1363_core.c | |||
@@ -557,6 +557,7 @@ error_put_reg: | |||
557 | if (!IS_ERR(st->reg)) | 557 | if (!IS_ERR(st->reg)) |
558 | regulator_put(st->reg); | 558 | regulator_put(st->reg); |
559 | error_free_st: | 559 | error_free_st: |
560 | i2c_set_clientdata(client, NULL); | ||
560 | kfree(st); | 561 | kfree(st); |
561 | 562 | ||
562 | error_ret: | 563 | error_ret: |
@@ -574,6 +575,7 @@ static int max1363_remove(struct i2c_client *client) | |||
574 | regulator_disable(st->reg); | 575 | regulator_disable(st->reg); |
575 | regulator_put(st->reg); | 576 | regulator_put(st->reg); |
576 | } | 577 | } |
578 | i2c_set_clientdata(client, NULL); | ||
577 | kfree(st); | 579 | kfree(st); |
578 | 580 | ||
579 | return 0; | 581 | return 0; |
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index 37f58f66e491..1d77082c8531 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c | |||
@@ -537,6 +537,7 @@ static void iio_device_unregister_sysfs(struct iio_dev *dev_info) | |||
537 | sysfs_remove_group(&dev_info->dev.kobj, dev_info->attrs); | 537 | sysfs_remove_group(&dev_info->dev.kobj, dev_info->attrs); |
538 | } | 538 | } |
539 | 539 | ||
540 | /* Return a negative errno on failure */ | ||
540 | int iio_get_new_idr_val(struct idr *this_idr) | 541 | int iio_get_new_idr_val(struct idr *this_idr) |
541 | { | 542 | { |
542 | int ret; | 543 | int ret; |
@@ -660,7 +661,7 @@ static int iio_device_register_eventset(struct iio_dev *dev_info) | |||
660 | for (i = 0; i < dev_info->num_interrupt_lines; i++) { | 661 | for (i = 0; i < dev_info->num_interrupt_lines; i++) { |
661 | dev_info->event_interfaces[i].owner = dev_info->driver_module; | 662 | dev_info->event_interfaces[i].owner = dev_info->driver_module; |
662 | ret = iio_get_new_idr_val(&iio_event_idr); | 663 | ret = iio_get_new_idr_val(&iio_event_idr); |
663 | if (ret) | 664 | if (ret < 0) |
664 | goto error_free_setup_ev_ints; | 665 | goto error_free_setup_ev_ints; |
665 | else | 666 | else |
666 | dev_info->event_interfaces[i].id = ret; | 667 | dev_info->event_interfaces[i].id = ret; |
diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c index 1ba4aa392f6e..8770a00e3652 100644 --- a/drivers/staging/iio/light/tsl2563.c +++ b/drivers/staging/iio/light/tsl2563.c | |||
@@ -682,6 +682,7 @@ static int __devinit tsl2563_probe(struct i2c_client *client, | |||
682 | fail2: | 682 | fail2: |
683 | iio_device_unregister(chip->indio_dev); | 683 | iio_device_unregister(chip->indio_dev); |
684 | fail1: | 684 | fail1: |
685 | i2c_set_clientdata(client, NULL); | ||
685 | kfree(chip); | 686 | kfree(chip); |
686 | return err; | 687 | return err; |
687 | } | 688 | } |
@@ -692,6 +693,7 @@ static int tsl2563_remove(struct i2c_client *client) | |||
692 | 693 | ||
693 | iio_device_unregister(chip->indio_dev); | 694 | iio_device_unregister(chip->indio_dev); |
694 | 695 | ||
696 | i2c_set_clientdata(client, NULL); | ||
695 | kfree(chip); | 697 | kfree(chip); |
696 | return 0; | 698 | return 0; |
697 | } | 699 | } |
diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index b104c3d9c35e..cf22c091668c 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c | |||
@@ -293,7 +293,7 @@ again: | |||
293 | return -EAGAIN; | 293 | return -EAGAIN; |
294 | memcpy(data, last_written_p_copy, ring->buf.bpd); | 294 | memcpy(data, last_written_p_copy, ring->buf.bpd); |
295 | 295 | ||
296 | if (unlikely(ring->last_written_p >= last_written_p_copy)) | 296 | if (unlikely(ring->last_written_p != last_written_p_copy)) |
297 | goto again; | 297 | goto again; |
298 | 298 | ||
299 | iio_unmark_sw_rb_in_use(&ring->buf); | 299 | iio_unmark_sw_rb_in_use(&ring->buf); |
diff --git a/drivers/staging/octeon/cvmx-helper-board.c b/drivers/staging/octeon/cvmx-helper-board.c index 3085e38a6f99..00a555b83354 100644 --- a/drivers/staging/octeon/cvmx-helper-board.c +++ b/drivers/staging/octeon/cvmx-helper-board.c | |||
@@ -153,6 +153,14 @@ int cvmx_helper_board_get_mii_address(int ipd_port) | |||
153 | * through switch. | 153 | * through switch. |
154 | */ | 154 | */ |
155 | return -1; | 155 | return -1; |
156 | |||
157 | case CVMX_BOARD_TYPE_CUST_WSX16: | ||
158 | if (ipd_port >= 0 && ipd_port <= 3) | ||
159 | return ipd_port; | ||
160 | else if (ipd_port >= 16 && ipd_port <= 19) | ||
161 | return ipd_port - 16 + 4; | ||
162 | else | ||
163 | return -1; | ||
156 | } | 164 | } |
157 | 165 | ||
158 | /* Some unknown board. Somebody forgot to update this function... */ | 166 | /* Some unknown board. Somebody forgot to update this function... */ |
diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c index 1873a79bb033..740db0c1ac01 100644 --- a/drivers/staging/rt2860/usb_main_dev.c +++ b/drivers/staging/rt2860/usb_main_dev.c | |||
@@ -63,6 +63,7 @@ struct usb_device_id rtusb_usb_id[] = { | |||
63 | {USB_DEVICE(0x07D1, 0x3C11)}, /* D-Link */ | 63 | {USB_DEVICE(0x07D1, 0x3C11)}, /* D-Link */ |
64 | {USB_DEVICE(0x14B2, 0x3C07)}, /* AL */ | 64 | {USB_DEVICE(0x14B2, 0x3C07)}, /* AL */ |
65 | {USB_DEVICE(0x050D, 0x8053)}, /* Belkin */ | 65 | {USB_DEVICE(0x050D, 0x8053)}, /* Belkin */ |
66 | {USB_DEVICE(0x050D, 0x825B)}, /* Belkin */ | ||
66 | {USB_DEVICE(0x14B2, 0x3C23)}, /* Airlink */ | 67 | {USB_DEVICE(0x14B2, 0x3C23)}, /* Airlink */ |
67 | {USB_DEVICE(0x14B2, 0x3C27)}, /* Airlink */ | 68 | {USB_DEVICE(0x14B2, 0x3C27)}, /* Airlink */ |
68 | {USB_DEVICE(0x07AA, 0x002F)}, /* Corega */ | 69 | {USB_DEVICE(0x07AA, 0x002F)}, /* Corega */ |
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index e16256fe595a..04d9b85f3d4c 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c | |||
@@ -113,14 +113,17 @@ u32 rt_global_debug_component = \ | |||
113 | 113 | ||
114 | static const struct usb_device_id rtl8192_usb_id_tbl[] = { | 114 | static const struct usb_device_id rtl8192_usb_id_tbl[] = { |
115 | /* Realtek */ | 115 | /* Realtek */ |
116 | {USB_DEVICE(0x0bda, 0x8171)}, | ||
116 | {USB_DEVICE(0x0bda, 0x8192)}, | 117 | {USB_DEVICE(0x0bda, 0x8192)}, |
117 | {USB_DEVICE(0x0bda, 0x8709)}, | 118 | {USB_DEVICE(0x0bda, 0x8709)}, |
118 | /* Corega */ | 119 | /* Corega */ |
119 | {USB_DEVICE(0x07aa, 0x0043)}, | 120 | {USB_DEVICE(0x07aa, 0x0043)}, |
120 | /* Belkin */ | 121 | /* Belkin */ |
121 | {USB_DEVICE(0x050d, 0x805E)}, | 122 | {USB_DEVICE(0x050d, 0x805E)}, |
123 | {USB_DEVICE(0x050d, 0x815F)}, /* Belkin F5D8053 v6 */ | ||
122 | /* Sitecom */ | 124 | /* Sitecom */ |
123 | {USB_DEVICE(0x0df6, 0x0031)}, | 125 | {USB_DEVICE(0x0df6, 0x0031)}, |
126 | {USB_DEVICE(0x0df6, 0x004b)}, /* WL-349 */ | ||
124 | /* EnGenius */ | 127 | /* EnGenius */ |
125 | {USB_DEVICE(0x1740, 0x9201)}, | 128 | {USB_DEVICE(0x1740, 0x9201)}, |
126 | /* Dlink */ | 129 | /* Dlink */ |
diff --git a/drivers/staging/usbip/usbip_event.c b/drivers/staging/usbip/usbip_event.c index 6da1021e8a65..a2566f1075d5 100644 --- a/drivers/staging/usbip/usbip_event.c +++ b/drivers/staging/usbip/usbip_event.c | |||
@@ -117,6 +117,9 @@ void usbip_stop_eh(struct usbip_device *ud) | |||
117 | { | 117 | { |
118 | struct usbip_task *eh = &ud->eh; | 118 | struct usbip_task *eh = &ud->eh; |
119 | 119 | ||
120 | if (eh->thread == current) | ||
121 | return; /* do not wait for myself */ | ||
122 | |||
120 | wait_for_completion(&eh->thread_done); | 123 | wait_for_completion(&eh->thread_done); |
121 | usbip_dbg_eh("usbip_eh has finished\n"); | 124 | usbip_dbg_eh("usbip_eh has finished\n"); |
122 | } | 125 | } |
diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index 68f24425977f..783051f59f19 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c | |||
@@ -2455,9 +2455,10 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2455 | dev_info(&pdev->dev, "VME Write and flush and error check is %s\n", | 2455 | dev_info(&pdev->dev, "VME Write and flush and error check is %s\n", |
2456 | err_chk ? "enabled" : "disabled"); | 2456 | err_chk ? "enabled" : "disabled"); |
2457 | 2457 | ||
2458 | if (tsi148_crcsr_init(tsi148_bridge, pdev)) | 2458 | if (tsi148_crcsr_init(tsi148_bridge, pdev)) { |
2459 | dev_err(&pdev->dev, "CR/CSR configuration failed.\n"); | 2459 | dev_err(&pdev->dev, "CR/CSR configuration failed.\n"); |
2460 | goto err_crcsr; | 2460 | goto err_crcsr; |
2461 | } | ||
2461 | 2462 | ||
2462 | retval = vme_register_bridge(tsi148_bridge); | 2463 | retval = vme_register_bridge(tsi148_bridge); |
2463 | if (retval != 0) { | 2464 | if (retval != 0) { |
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index be6331e2c276..5e1a253b08a0 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -1542,6 +1542,9 @@ static const struct usb_device_id acm_ids[] = { | |||
1542 | { USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */ | 1542 | { USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */ |
1543 | .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ | 1543 | .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ |
1544 | }, | 1544 | }, |
1545 | { USB_DEVICE(0x1576, 0x03b1), /* Maretron USB100 */ | ||
1546 | .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ | ||
1547 | }, | ||
1545 | 1548 | ||
1546 | /* Nokia S60 phones expose two ACM channels. The first is | 1549 | /* Nokia S60 phones expose two ACM channels. The first is |
1547 | * a modem and is picked up by the standard AT-command | 1550 | * a modem and is picked up by the standard AT-command |
diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig index 97a819c23ef3..7e594449600e 100644 --- a/drivers/usb/core/Kconfig +++ b/drivers/usb/core/Kconfig | |||
@@ -109,7 +109,7 @@ config USB_SUSPEND | |||
109 | config USB_OTG | 109 | config USB_OTG |
110 | bool | 110 | bool |
111 | depends on USB && EXPERIMENTAL | 111 | depends on USB && EXPERIMENTAL |
112 | select USB_SUSPEND | 112 | depends on USB_SUSPEND |
113 | default n | 113 | default n |
114 | 114 | ||
115 | 115 | ||
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c index bdf87a8414a1..2c95153c0f24 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c | |||
@@ -120,7 +120,7 @@ int usb_choose_configuration(struct usb_device *udev) | |||
120 | * than a vendor-specific driver. */ | 120 | * than a vendor-specific driver. */ |
121 | else if (udev->descriptor.bDeviceClass != | 121 | else if (udev->descriptor.bDeviceClass != |
122 | USB_CLASS_VENDOR_SPEC && | 122 | USB_CLASS_VENDOR_SPEC && |
123 | (!desc || desc->bInterfaceClass != | 123 | (desc && desc->bInterfaceClass != |
124 | USB_CLASS_VENDOR_SPEC)) { | 124 | USB_CLASS_VENDOR_SPEC)) { |
125 | best = c; | 125 | best = c; |
126 | break; | 126 | break; |
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c index 97b40ce133f0..4a6366a42129 100644 --- a/drivers/usb/core/inode.c +++ b/drivers/usb/core/inode.c | |||
@@ -515,13 +515,13 @@ static int fs_create_by_name (const char *name, mode_t mode, | |||
515 | *dentry = NULL; | 515 | *dentry = NULL; |
516 | mutex_lock(&parent->d_inode->i_mutex); | 516 | mutex_lock(&parent->d_inode->i_mutex); |
517 | *dentry = lookup_one_len(name, parent, strlen(name)); | 517 | *dentry = lookup_one_len(name, parent, strlen(name)); |
518 | if (!IS_ERR(dentry)) { | 518 | if (!IS_ERR(*dentry)) { |
519 | if ((mode & S_IFMT) == S_IFDIR) | 519 | if ((mode & S_IFMT) == S_IFDIR) |
520 | error = usbfs_mkdir (parent->d_inode, *dentry, mode); | 520 | error = usbfs_mkdir (parent->d_inode, *dentry, mode); |
521 | else | 521 | else |
522 | error = usbfs_create (parent->d_inode, *dentry, mode); | 522 | error = usbfs_create (parent->d_inode, *dentry, mode); |
523 | } else | 523 | } else |
524 | error = PTR_ERR(dentry); | 524 | error = PTR_ERR(*dentry); |
525 | mutex_unlock(&parent->d_inode->i_mutex); | 525 | mutex_unlock(&parent->d_inode->i_mutex); |
526 | 526 | ||
527 | return error; | 527 | return error; |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 1297e9b16a51..0561430f2ede 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -718,7 +718,7 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size, | |||
718 | EXPORT_SYMBOL_GPL(__usb_get_extra_descriptor); | 718 | EXPORT_SYMBOL_GPL(__usb_get_extra_descriptor); |
719 | 719 | ||
720 | /** | 720 | /** |
721 | * usb_buffer_alloc - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP | 721 | * usb_alloc_coherent - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP |
722 | * @dev: device the buffer will be used with | 722 | * @dev: device the buffer will be used with |
723 | * @size: requested buffer size | 723 | * @size: requested buffer size |
724 | * @mem_flags: affect whether allocation may block | 724 | * @mem_flags: affect whether allocation may block |
@@ -737,30 +737,30 @@ EXPORT_SYMBOL_GPL(__usb_get_extra_descriptor); | |||
737 | * architectures where CPU caches are not DMA-coherent. On systems without | 737 | * architectures where CPU caches are not DMA-coherent. On systems without |
738 | * bus-snooping caches, these buffers are uncached. | 738 | * bus-snooping caches, these buffers are uncached. |
739 | * | 739 | * |
740 | * When the buffer is no longer used, free it with usb_buffer_free(). | 740 | * When the buffer is no longer used, free it with usb_free_coherent(). |
741 | */ | 741 | */ |
742 | void *usb_buffer_alloc(struct usb_device *dev, size_t size, gfp_t mem_flags, | 742 | void *usb_alloc_coherent(struct usb_device *dev, size_t size, gfp_t mem_flags, |
743 | dma_addr_t *dma) | 743 | dma_addr_t *dma) |
744 | { | 744 | { |
745 | if (!dev || !dev->bus) | 745 | if (!dev || !dev->bus) |
746 | return NULL; | 746 | return NULL; |
747 | return hcd_buffer_alloc(dev->bus, size, mem_flags, dma); | 747 | return hcd_buffer_alloc(dev->bus, size, mem_flags, dma); |
748 | } | 748 | } |
749 | EXPORT_SYMBOL_GPL(usb_buffer_alloc); | 749 | EXPORT_SYMBOL_GPL(usb_alloc_coherent); |
750 | 750 | ||
751 | /** | 751 | /** |
752 | * usb_buffer_free - free memory allocated with usb_buffer_alloc() | 752 | * usb_free_coherent - free memory allocated with usb_alloc_coherent() |
753 | * @dev: device the buffer was used with | 753 | * @dev: device the buffer was used with |
754 | * @size: requested buffer size | 754 | * @size: requested buffer size |
755 | * @addr: CPU address of buffer | 755 | * @addr: CPU address of buffer |
756 | * @dma: DMA address of buffer | 756 | * @dma: DMA address of buffer |
757 | * | 757 | * |
758 | * This reclaims an I/O buffer, letting it be reused. The memory must have | 758 | * This reclaims an I/O buffer, letting it be reused. The memory must have |
759 | * been allocated using usb_buffer_alloc(), and the parameters must match | 759 | * been allocated using usb_alloc_coherent(), and the parameters must match |
760 | * those provided in that allocation request. | 760 | * those provided in that allocation request. |
761 | */ | 761 | */ |
762 | void usb_buffer_free(struct usb_device *dev, size_t size, void *addr, | 762 | void usb_free_coherent(struct usb_device *dev, size_t size, void *addr, |
763 | dma_addr_t dma) | 763 | dma_addr_t dma) |
764 | { | 764 | { |
765 | if (!dev || !dev->bus) | 765 | if (!dev || !dev->bus) |
766 | return; | 766 | return; |
@@ -768,7 +768,7 @@ void usb_buffer_free(struct usb_device *dev, size_t size, void *addr, | |||
768 | return; | 768 | return; |
769 | hcd_buffer_free(dev->bus, size, addr, dma); | 769 | hcd_buffer_free(dev->bus, size, addr, dma); |
770 | } | 770 | } |
771 | EXPORT_SYMBOL_GPL(usb_buffer_free); | 771 | EXPORT_SYMBOL_GPL(usb_free_coherent); |
772 | 772 | ||
773 | /** | 773 | /** |
774 | * usb_buffer_map - create DMA mapping(s) for an urb | 774 | * usb_buffer_map - create DMA mapping(s) for an urb |
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 124a8ccfdcda..1f73b485732d 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
@@ -2145,6 +2145,7 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep, | |||
2145 | u32 epctrl; | 2145 | u32 epctrl; |
2146 | u32 mps; | 2146 | u32 mps; |
2147 | int dir_in; | 2147 | int dir_in; |
2148 | int ret = 0; | ||
2148 | 2149 | ||
2149 | dev_dbg(hsotg->dev, | 2150 | dev_dbg(hsotg->dev, |
2150 | "%s: ep %s: a 0x%02x, attr 0x%02x, mps 0x%04x, intr %d\n", | 2151 | "%s: ep %s: a 0x%02x, attr 0x%02x, mps 0x%04x, intr %d\n", |
@@ -2196,7 +2197,8 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep, | |||
2196 | switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { | 2197 | switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { |
2197 | case USB_ENDPOINT_XFER_ISOC: | 2198 | case USB_ENDPOINT_XFER_ISOC: |
2198 | dev_err(hsotg->dev, "no current ISOC support\n"); | 2199 | dev_err(hsotg->dev, "no current ISOC support\n"); |
2199 | return -EINVAL; | 2200 | ret = -EINVAL; |
2201 | goto out; | ||
2200 | 2202 | ||
2201 | case USB_ENDPOINT_XFER_BULK: | 2203 | case USB_ENDPOINT_XFER_BULK: |
2202 | epctrl |= S3C_DxEPCTL_EPType_Bulk; | 2204 | epctrl |= S3C_DxEPCTL_EPType_Bulk; |
@@ -2235,8 +2237,9 @@ static int s3c_hsotg_ep_enable(struct usb_ep *ep, | |||
2235 | /* enable the endpoint interrupt */ | 2237 | /* enable the endpoint interrupt */ |
2236 | s3c_hsotg_ctrl_epint(hsotg, index, dir_in, 1); | 2238 | s3c_hsotg_ctrl_epint(hsotg, index, dir_in, 1); |
2237 | 2239 | ||
2240 | out: | ||
2238 | spin_unlock_irqrestore(&hs_ep->lock, flags); | 2241 | spin_unlock_irqrestore(&hs_ep->lock, flags); |
2239 | return 0; | 2242 | return ret; |
2240 | } | 2243 | } |
2241 | 2244 | ||
2242 | static int s3c_hsotg_ep_disable(struct usb_ep *ep) | 2245 | static int s3c_hsotg_ep_disable(struct usb_ep *ep) |
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 68b83ab70719..944291e10f97 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c | |||
@@ -331,6 +331,8 @@ ohci_hcd_at91_drv_suspend(struct platform_device *pdev, pm_message_t mesg) | |||
331 | */ | 331 | */ |
332 | if (at91_suspend_entering_slow_clock()) { | 332 | if (at91_suspend_entering_slow_clock()) { |
333 | ohci_usb_reset (ohci); | 333 | ohci_usb_reset (ohci); |
334 | /* flush the writes */ | ||
335 | (void) ohci_readl (ohci, &ohci->regs->control); | ||
334 | at91_stop_clock(); | 336 | at91_stop_clock(); |
335 | } | 337 | } |
336 | 338 | ||
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index 32bbce9718f0..65cac8cc8921 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c | |||
@@ -697,7 +697,7 @@ static int ohci_hub_control ( | |||
697 | u16 wLength | 697 | u16 wLength |
698 | ) { | 698 | ) { |
699 | struct ohci_hcd *ohci = hcd_to_ohci (hcd); | 699 | struct ohci_hcd *ohci = hcd_to_ohci (hcd); |
700 | int ports = hcd_to_bus (hcd)->root_hub->maxchild; | 700 | int ports = ohci->num_ports; |
701 | u32 temp; | 701 | u32 temp; |
702 | int retval = 0; | 702 | int retval = 0; |
703 | 703 | ||
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c index 50f57f468836..e62b30b3e429 100644 --- a/drivers/usb/host/oxu210hp-hcd.c +++ b/drivers/usb/host/oxu210hp-hcd.c | |||
@@ -660,13 +660,13 @@ static struct ehci_qh *oxu_qh_alloc(struct oxu_hcd *oxu) | |||
660 | if (qh->dummy == NULL) { | 660 | if (qh->dummy == NULL) { |
661 | oxu_dbg(oxu, "no dummy td\n"); | 661 | oxu_dbg(oxu, "no dummy td\n"); |
662 | oxu->qh_used[i] = 0; | 662 | oxu->qh_used[i] = 0; |
663 | 663 | qh = NULL; | |
664 | return NULL; | 664 | goto unlock; |
665 | } | 665 | } |
666 | 666 | ||
667 | oxu->qh_used[i] = 1; | 667 | oxu->qh_used[i] = 1; |
668 | } | 668 | } |
669 | 669 | unlock: | |
670 | spin_unlock(&oxu->mem_lock); | 670 | spin_unlock(&oxu->mem_lock); |
671 | 671 | ||
672 | return qh; | 672 | return qh; |
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index e11cc3aa4b82..3b867a8af7b2 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -720,10 +720,10 @@ retry: | |||
720 | /* port status seems weird until after reset, so | 720 | /* port status seems weird until after reset, so |
721 | * force the reset and make khubd clean up later. | 721 | * force the reset and make khubd clean up later. |
722 | */ | 722 | */ |
723 | if (sl811->stat_insrmv & 1) | 723 | if (irqstat & SL11H_INTMASK_RD) |
724 | sl811->port1 |= 1 << USB_PORT_FEAT_CONNECTION; | ||
725 | else | ||
726 | sl811->port1 &= ~(1 << USB_PORT_FEAT_CONNECTION); | 724 | sl811->port1 &= ~(1 << USB_PORT_FEAT_CONNECTION); |
725 | else | ||
726 | sl811->port1 |= 1 << USB_PORT_FEAT_CONNECTION; | ||
727 | 727 | ||
728 | sl811->port1 |= 1 << USB_PORT_FEAT_C_CONNECTION; | 728 | sl811->port1 |= 1 << USB_PORT_FEAT_C_CONNECTION; |
729 | 729 | ||
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index c09539bad1ee..d64f5724bfc4 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -582,6 +582,19 @@ static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev, | |||
582 | return EP_INTERVAL(interval); | 582 | return EP_INTERVAL(interval); |
583 | } | 583 | } |
584 | 584 | ||
585 | /* The "Mult" field in the endpoint context is only set for SuperSpeed devices. | ||
586 | * High speed endpoint descriptors can define "the number of additional | ||
587 | * transaction opportunities per microframe", but that goes in the Max Burst | ||
588 | * endpoint context field. | ||
589 | */ | ||
590 | static inline u32 xhci_get_endpoint_mult(struct usb_device *udev, | ||
591 | struct usb_host_endpoint *ep) | ||
592 | { | ||
593 | if (udev->speed != USB_SPEED_SUPER || !ep->ss_ep_comp) | ||
594 | return 0; | ||
595 | return ep->ss_ep_comp->desc.bmAttributes; | ||
596 | } | ||
597 | |||
585 | static inline u32 xhci_get_endpoint_type(struct usb_device *udev, | 598 | static inline u32 xhci_get_endpoint_type(struct usb_device *udev, |
586 | struct usb_host_endpoint *ep) | 599 | struct usb_host_endpoint *ep) |
587 | { | 600 | { |
@@ -612,6 +625,36 @@ static inline u32 xhci_get_endpoint_type(struct usb_device *udev, | |||
612 | return type; | 625 | return type; |
613 | } | 626 | } |
614 | 627 | ||
628 | /* Return the maximum endpoint service interval time (ESIT) payload. | ||
629 | * Basically, this is the maxpacket size, multiplied by the burst size | ||
630 | * and mult size. | ||
631 | */ | ||
632 | static inline u32 xhci_get_max_esit_payload(struct xhci_hcd *xhci, | ||
633 | struct usb_device *udev, | ||
634 | struct usb_host_endpoint *ep) | ||
635 | { | ||
636 | int max_burst; | ||
637 | int max_packet; | ||
638 | |||
639 | /* Only applies for interrupt or isochronous endpoints */ | ||
640 | if (usb_endpoint_xfer_control(&ep->desc) || | ||
641 | usb_endpoint_xfer_bulk(&ep->desc)) | ||
642 | return 0; | ||
643 | |||
644 | if (udev->speed == USB_SPEED_SUPER) { | ||
645 | if (ep->ss_ep_comp) | ||
646 | return ep->ss_ep_comp->desc.wBytesPerInterval; | ||
647 | xhci_warn(xhci, "WARN no SS endpoint companion descriptor.\n"); | ||
648 | /* Assume no bursts, no multiple opportunities to send. */ | ||
649 | return ep->desc.wMaxPacketSize; | ||
650 | } | ||
651 | |||
652 | max_packet = ep->desc.wMaxPacketSize & 0x3ff; | ||
653 | max_burst = (ep->desc.wMaxPacketSize & 0x1800) >> 11; | ||
654 | /* A 0 in max burst means 1 transfer per ESIT */ | ||
655 | return max_packet * (max_burst + 1); | ||
656 | } | ||
657 | |||
615 | int xhci_endpoint_init(struct xhci_hcd *xhci, | 658 | int xhci_endpoint_init(struct xhci_hcd *xhci, |
616 | struct xhci_virt_device *virt_dev, | 659 | struct xhci_virt_device *virt_dev, |
617 | struct usb_device *udev, | 660 | struct usb_device *udev, |
@@ -623,6 +666,7 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
623 | struct xhci_ring *ep_ring; | 666 | struct xhci_ring *ep_ring; |
624 | unsigned int max_packet; | 667 | unsigned int max_packet; |
625 | unsigned int max_burst; | 668 | unsigned int max_burst; |
669 | u32 max_esit_payload; | ||
626 | 670 | ||
627 | ep_index = xhci_get_endpoint_index(&ep->desc); | 671 | ep_index = xhci_get_endpoint_index(&ep->desc); |
628 | ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); | 672 | ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); |
@@ -644,6 +688,7 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
644 | ep_ctx->deq = ep_ring->first_seg->dma | ep_ring->cycle_state; | 688 | ep_ctx->deq = ep_ring->first_seg->dma | ep_ring->cycle_state; |
645 | 689 | ||
646 | ep_ctx->ep_info = xhci_get_endpoint_interval(udev, ep); | 690 | ep_ctx->ep_info = xhci_get_endpoint_interval(udev, ep); |
691 | ep_ctx->ep_info |= EP_MULT(xhci_get_endpoint_mult(udev, ep)); | ||
647 | 692 | ||
648 | /* FIXME dig Mult and streams info out of ep companion desc */ | 693 | /* FIXME dig Mult and streams info out of ep companion desc */ |
649 | 694 | ||
@@ -689,6 +734,26 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
689 | default: | 734 | default: |
690 | BUG(); | 735 | BUG(); |
691 | } | 736 | } |
737 | max_esit_payload = xhci_get_max_esit_payload(xhci, udev, ep); | ||
738 | ep_ctx->tx_info = MAX_ESIT_PAYLOAD_FOR_EP(max_esit_payload); | ||
739 | |||
740 | /* | ||
741 | * XXX no idea how to calculate the average TRB buffer length for bulk | ||
742 | * endpoints, as the driver gives us no clue how big each scatter gather | ||
743 | * list entry (or buffer) is going to be. | ||
744 | * | ||
745 | * For isochronous and interrupt endpoints, we set it to the max | ||
746 | * available, until we have new API in the USB core to allow drivers to | ||
747 | * declare how much bandwidth they actually need. | ||
748 | * | ||
749 | * Normally, it would be calculated by taking the total of the buffer | ||
750 | * lengths in the TD and then dividing by the number of TRBs in a TD, | ||
751 | * including link TRBs, No-op TRBs, and Event data TRBs. Since we don't | ||
752 | * use Event Data TRBs, and we don't chain in a link TRB on short | ||
753 | * transfers, we're basically dividing by 1. | ||
754 | */ | ||
755 | ep_ctx->tx_info |= AVG_TRB_LENGTH_FOR_EP(max_esit_payload); | ||
756 | |||
692 | /* FIXME Debug endpoint context */ | 757 | /* FIXME Debug endpoint context */ |
693 | return 0; | 758 | return 0; |
694 | } | 759 | } |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index e5eb09b2f38e..ea389e9a4931 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -609,6 +609,10 @@ struct xhci_ep_ctx { | |||
609 | #define MAX_PACKET_MASK (0xffff << 16) | 609 | #define MAX_PACKET_MASK (0xffff << 16) |
610 | #define MAX_PACKET_DECODED(p) (((p) >> 16) & 0xffff) | 610 | #define MAX_PACKET_DECODED(p) (((p) >> 16) & 0xffff) |
611 | 611 | ||
612 | /* tx_info bitmasks */ | ||
613 | #define AVG_TRB_LENGTH_FOR_EP(p) ((p) & 0xffff) | ||
614 | #define MAX_ESIT_PAYLOAD_FOR_EP(p) (((p) & 0xffff) << 16) | ||
615 | |||
612 | 616 | ||
613 | /** | 617 | /** |
614 | * struct xhci_input_control_context | 618 | * struct xhci_input_control_context |
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index b4c783c284ba..07fe490b44d8 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig | |||
@@ -42,7 +42,7 @@ config USB_MUSB_SOC | |||
42 | default y if (BF52x && !BF522 && !BF523) | 42 | default y if (BF52x && !BF522 && !BF523) |
43 | 43 | ||
44 | comment "DaVinci 35x and 644x USB support" | 44 | comment "DaVinci 35x and 644x USB support" |
45 | depends on USB_MUSB_HDRC && ARCH_DAVINCI | 45 | depends on USB_MUSB_HDRC && ARCH_DAVINCI_DMx |
46 | 46 | ||
47 | comment "OMAP 243x high speed USB support" | 47 | comment "OMAP 243x high speed USB support" |
48 | depends on USB_MUSB_HDRC && ARCH_OMAP2430 | 48 | depends on USB_MUSB_HDRC && ARCH_OMAP2430 |
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile index 85710ccc1887..3a485dabebbb 100644 --- a/drivers/usb/musb/Makefile +++ b/drivers/usb/musb/Makefile | |||
@@ -6,7 +6,7 @@ musb_hdrc-objs := musb_core.o | |||
6 | 6 | ||
7 | obj-$(CONFIG_USB_MUSB_HDRC) += musb_hdrc.o | 7 | obj-$(CONFIG_USB_MUSB_HDRC) += musb_hdrc.o |
8 | 8 | ||
9 | ifeq ($(CONFIG_ARCH_DAVINCI),y) | 9 | ifeq ($(CONFIG_ARCH_DAVINCI_DMx),y) |
10 | musb_hdrc-objs += davinci.o | 10 | musb_hdrc-objs += davinci.o |
11 | endif | 11 | endif |
12 | 12 | ||
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index 719a22d664ef..ec8d324237f6 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c | |||
@@ -172,13 +172,7 @@ static irqreturn_t blackfin_interrupt(int irq, void *__hci) | |||
172 | 172 | ||
173 | spin_unlock_irqrestore(&musb->lock, flags); | 173 | spin_unlock_irqrestore(&musb->lock, flags); |
174 | 174 | ||
175 | /* REVISIT we sometimes get spurious IRQs on g_ep0 | 175 | return retval; |
176 | * not clear why... fall in BF54x too. | ||
177 | */ | ||
178 | if (retval != IRQ_HANDLED) | ||
179 | DBG(5, "spurious?\n"); | ||
180 | |||
181 | return IRQ_HANDLED; | ||
182 | } | 176 | } |
183 | 177 | ||
184 | static void musb_conn_timer_handler(unsigned long _musb) | 178 | static void musb_conn_timer_handler(unsigned long _musb) |
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index 29bce5c0fd10..ce2e16fee0df 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c | |||
@@ -444,6 +444,8 @@ int __init musb_platform_init(struct musb *musb) | |||
444 | return 0; | 444 | return 0; |
445 | 445 | ||
446 | fail: | 446 | fail: |
447 | clk_disable(musb->clock); | ||
448 | |||
447 | usb_nop_xceiv_unregister(); | 449 | usb_nop_xceiv_unregister(); |
448 | return -ENODEV; | 450 | return -ENODEV; |
449 | } | 451 | } |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 0e8b8ab1d168..705cc4ad8737 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -965,10 +965,8 @@ static void musb_shutdown(struct platform_device *pdev) | |||
965 | spin_lock_irqsave(&musb->lock, flags); | 965 | spin_lock_irqsave(&musb->lock, flags); |
966 | musb_platform_disable(musb); | 966 | musb_platform_disable(musb); |
967 | musb_generic_disable(musb); | 967 | musb_generic_disable(musb); |
968 | if (musb->clock) { | 968 | if (musb->clock) |
969 | clk_put(musb->clock); | 969 | clk_put(musb->clock); |
970 | musb->clock = NULL; | ||
971 | } | ||
972 | spin_unlock_irqrestore(&musb->lock, flags); | 970 | spin_unlock_irqrestore(&musb->lock, flags); |
973 | 971 | ||
974 | /* FIXME power down */ | 972 | /* FIXME power down */ |
@@ -1853,15 +1851,6 @@ static void musb_free(struct musb *musb) | |||
1853 | put_device(musb->xceiv->dev); | 1851 | put_device(musb->xceiv->dev); |
1854 | #endif | 1852 | #endif |
1855 | 1853 | ||
1856 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | ||
1857 | musb_platform_exit(musb); | ||
1858 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | ||
1859 | |||
1860 | if (musb->clock) { | ||
1861 | clk_disable(musb->clock); | ||
1862 | clk_put(musb->clock); | ||
1863 | } | ||
1864 | |||
1865 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | 1854 | #ifdef CONFIG_USB_MUSB_HDRC_HCD |
1866 | usb_put_hcd(musb_to_hcd(musb)); | 1855 | usb_put_hcd(musb_to_hcd(musb)); |
1867 | #else | 1856 | #else |
@@ -1889,8 +1878,10 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
1889 | */ | 1878 | */ |
1890 | if (!plat) { | 1879 | if (!plat) { |
1891 | dev_dbg(dev, "no platform_data?\n"); | 1880 | dev_dbg(dev, "no platform_data?\n"); |
1892 | return -ENODEV; | 1881 | status = -ENODEV; |
1882 | goto fail0; | ||
1893 | } | 1883 | } |
1884 | |||
1894 | switch (plat->mode) { | 1885 | switch (plat->mode) { |
1895 | case MUSB_HOST: | 1886 | case MUSB_HOST: |
1896 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | 1887 | #ifdef CONFIG_USB_MUSB_HDRC_HCD |
@@ -1912,13 +1903,16 @@ bad_config: | |||
1912 | #endif | 1903 | #endif |
1913 | default: | 1904 | default: |
1914 | dev_err(dev, "incompatible Kconfig role setting\n"); | 1905 | dev_err(dev, "incompatible Kconfig role setting\n"); |
1915 | return -EINVAL; | 1906 | status = -EINVAL; |
1907 | goto fail0; | ||
1916 | } | 1908 | } |
1917 | 1909 | ||
1918 | /* allocate */ | 1910 | /* allocate */ |
1919 | musb = allocate_instance(dev, plat->config, ctrl); | 1911 | musb = allocate_instance(dev, plat->config, ctrl); |
1920 | if (!musb) | 1912 | if (!musb) { |
1921 | return -ENOMEM; | 1913 | status = -ENOMEM; |
1914 | goto fail0; | ||
1915 | } | ||
1922 | 1916 | ||
1923 | spin_lock_init(&musb->lock); | 1917 | spin_lock_init(&musb->lock); |
1924 | musb->board_mode = plat->mode; | 1918 | musb->board_mode = plat->mode; |
@@ -1936,7 +1930,7 @@ bad_config: | |||
1936 | if (IS_ERR(musb->clock)) { | 1930 | if (IS_ERR(musb->clock)) { |
1937 | status = PTR_ERR(musb->clock); | 1931 | status = PTR_ERR(musb->clock); |
1938 | musb->clock = NULL; | 1932 | musb->clock = NULL; |
1939 | goto fail; | 1933 | goto fail1; |
1940 | } | 1934 | } |
1941 | } | 1935 | } |
1942 | 1936 | ||
@@ -1955,12 +1949,12 @@ bad_config: | |||
1955 | */ | 1949 | */ |
1956 | musb->isr = generic_interrupt; | 1950 | musb->isr = generic_interrupt; |
1957 | status = musb_platform_init(musb); | 1951 | status = musb_platform_init(musb); |
1958 | |||
1959 | if (status < 0) | 1952 | if (status < 0) |
1960 | goto fail; | 1953 | goto fail2; |
1954 | |||
1961 | if (!musb->isr) { | 1955 | if (!musb->isr) { |
1962 | status = -ENODEV; | 1956 | status = -ENODEV; |
1963 | goto fail2; | 1957 | goto fail3; |
1964 | } | 1958 | } |
1965 | 1959 | ||
1966 | #ifndef CONFIG_MUSB_PIO_ONLY | 1960 | #ifndef CONFIG_MUSB_PIO_ONLY |
@@ -1986,7 +1980,7 @@ bad_config: | |||
1986 | ? MUSB_CONTROLLER_MHDRC | 1980 | ? MUSB_CONTROLLER_MHDRC |
1987 | : MUSB_CONTROLLER_HDRC, musb); | 1981 | : MUSB_CONTROLLER_HDRC, musb); |
1988 | if (status < 0) | 1982 | if (status < 0) |
1989 | goto fail2; | 1983 | goto fail3; |
1990 | 1984 | ||
1991 | #ifdef CONFIG_USB_MUSB_OTG | 1985 | #ifdef CONFIG_USB_MUSB_OTG |
1992 | setup_timer(&musb->otg_timer, musb_otg_timer_func, (unsigned long) musb); | 1986 | setup_timer(&musb->otg_timer, musb_otg_timer_func, (unsigned long) musb); |
@@ -1999,7 +1993,7 @@ bad_config: | |||
1999 | if (request_irq(nIrq, musb->isr, 0, dev_name(dev), musb)) { | 1993 | if (request_irq(nIrq, musb->isr, 0, dev_name(dev), musb)) { |
2000 | dev_err(dev, "request_irq %d failed!\n", nIrq); | 1994 | dev_err(dev, "request_irq %d failed!\n", nIrq); |
2001 | status = -ENODEV; | 1995 | status = -ENODEV; |
2002 | goto fail2; | 1996 | goto fail3; |
2003 | } | 1997 | } |
2004 | musb->nIrq = nIrq; | 1998 | musb->nIrq = nIrq; |
2005 | /* FIXME this handles wakeup irqs wrong */ | 1999 | /* FIXME this handles wakeup irqs wrong */ |
@@ -2039,8 +2033,6 @@ bad_config: | |||
2039 | musb->xceiv->state = OTG_STATE_A_IDLE; | 2033 | musb->xceiv->state = OTG_STATE_A_IDLE; |
2040 | 2034 | ||
2041 | status = usb_add_hcd(musb_to_hcd(musb), -1, 0); | 2035 | status = usb_add_hcd(musb_to_hcd(musb), -1, 0); |
2042 | if (status) | ||
2043 | goto fail; | ||
2044 | 2036 | ||
2045 | DBG(1, "%s mode, status %d, devctl %02x %c\n", | 2037 | DBG(1, "%s mode, status %d, devctl %02x %c\n", |
2046 | "HOST", status, | 2038 | "HOST", status, |
@@ -2055,8 +2047,6 @@ bad_config: | |||
2055 | musb->xceiv->state = OTG_STATE_B_IDLE; | 2047 | musb->xceiv->state = OTG_STATE_B_IDLE; |
2056 | 2048 | ||
2057 | status = musb_gadget_setup(musb); | 2049 | status = musb_gadget_setup(musb); |
2058 | if (status) | ||
2059 | goto fail; | ||
2060 | 2050 | ||
2061 | DBG(1, "%s mode, status %d, dev%02x\n", | 2051 | DBG(1, "%s mode, status %d, dev%02x\n", |
2062 | is_otg_enabled(musb) ? "OTG" : "PERIPHERAL", | 2052 | is_otg_enabled(musb) ? "OTG" : "PERIPHERAL", |
@@ -2064,12 +2054,14 @@ bad_config: | |||
2064 | musb_readb(musb->mregs, MUSB_DEVCTL)); | 2054 | musb_readb(musb->mregs, MUSB_DEVCTL)); |
2065 | 2055 | ||
2066 | } | 2056 | } |
2057 | if (status < 0) | ||
2058 | goto fail3; | ||
2067 | 2059 | ||
2068 | #ifdef CONFIG_SYSFS | 2060 | #ifdef CONFIG_SYSFS |
2069 | status = sysfs_create_group(&musb->controller->kobj, &musb_attr_group); | 2061 | status = sysfs_create_group(&musb->controller->kobj, &musb_attr_group); |
2070 | #endif | ||
2071 | if (status) | 2062 | if (status) |
2072 | goto fail2; | 2063 | goto fail4; |
2064 | #endif | ||
2073 | 2065 | ||
2074 | dev_info(dev, "USB %s mode controller at %p using %s, IRQ %d\n", | 2066 | dev_info(dev, "USB %s mode controller at %p using %s, IRQ %d\n", |
2075 | ({char *s; | 2067 | ({char *s; |
@@ -2085,17 +2077,29 @@ bad_config: | |||
2085 | 2077 | ||
2086 | return 0; | 2078 | return 0; |
2087 | 2079 | ||
2088 | fail2: | 2080 | fail4: |
2081 | if (!is_otg_enabled(musb) && is_host_enabled(musb)) | ||
2082 | usb_remove_hcd(musb_to_hcd(musb)); | ||
2083 | else | ||
2084 | musb_gadget_cleanup(musb); | ||
2085 | |||
2086 | fail3: | ||
2087 | if (musb->irq_wake) | ||
2088 | device_init_wakeup(dev, 0); | ||
2089 | musb_platform_exit(musb); | 2089 | musb_platform_exit(musb); |
2090 | fail: | ||
2091 | dev_err(musb->controller, | ||
2092 | "musb_init_controller failed with status %d\n", status); | ||
2093 | 2090 | ||
2091 | fail2: | ||
2094 | if (musb->clock) | 2092 | if (musb->clock) |
2095 | clk_put(musb->clock); | 2093 | clk_put(musb->clock); |
2096 | device_init_wakeup(dev, 0); | 2094 | |
2095 | fail1: | ||
2096 | dev_err(musb->controller, | ||
2097 | "musb_init_controller failed with status %d\n", status); | ||
2098 | |||
2097 | musb_free(musb); | 2099 | musb_free(musb); |
2098 | 2100 | ||
2101 | fail0: | ||
2102 | |||
2099 | return status; | 2103 | return status; |
2100 | 2104 | ||
2101 | } | 2105 | } |
@@ -2132,7 +2136,6 @@ static int __init musb_probe(struct platform_device *pdev) | |||
2132 | /* clobbered by use_dma=n */ | 2136 | /* clobbered by use_dma=n */ |
2133 | orig_dma_mask = dev->dma_mask; | 2137 | orig_dma_mask = dev->dma_mask; |
2134 | #endif | 2138 | #endif |
2135 | |||
2136 | status = musb_init_controller(dev, irq, base); | 2139 | status = musb_init_controller(dev, irq, base); |
2137 | if (status < 0) | 2140 | if (status < 0) |
2138 | iounmap(base); | 2141 | iounmap(base); |
@@ -2155,6 +2158,10 @@ static int __exit musb_remove(struct platform_device *pdev) | |||
2155 | if (musb->board_mode == MUSB_HOST) | 2158 | if (musb->board_mode == MUSB_HOST) |
2156 | usb_remove_hcd(musb_to_hcd(musb)); | 2159 | usb_remove_hcd(musb_to_hcd(musb)); |
2157 | #endif | 2160 | #endif |
2161 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | ||
2162 | musb_platform_exit(musb); | ||
2163 | musb_writeb(musb->mregs, MUSB_DEVCTL, 0); | ||
2164 | |||
2158 | musb_free(musb); | 2165 | musb_free(musb); |
2159 | iounmap(ctrl_base); | 2166 | iounmap(ctrl_base); |
2160 | device_init_wakeup(&pdev->dev, 0); | 2167 | device_init_wakeup(&pdev->dev, 0); |
@@ -2176,6 +2183,7 @@ void musb_save_context(struct musb *musb) | |||
2176 | if (is_host_enabled(musb)) { | 2183 | if (is_host_enabled(musb)) { |
2177 | musb_context.frame = musb_readw(musb_base, MUSB_FRAME); | 2184 | musb_context.frame = musb_readw(musb_base, MUSB_FRAME); |
2178 | musb_context.testmode = musb_readb(musb_base, MUSB_TESTMODE); | 2185 | musb_context.testmode = musb_readb(musb_base, MUSB_TESTMODE); |
2186 | musb_context.busctl = musb_read_ulpi_buscontrol(musb->mregs); | ||
2179 | } | 2187 | } |
2180 | musb_context.power = musb_readb(musb_base, MUSB_POWER); | 2188 | musb_context.power = musb_readb(musb_base, MUSB_POWER); |
2181 | musb_context.intrtxe = musb_readw(musb_base, MUSB_INTRTXE); | 2189 | musb_context.intrtxe = musb_readw(musb_base, MUSB_INTRTXE); |
@@ -2247,6 +2255,7 @@ void musb_restore_context(struct musb *musb) | |||
2247 | if (is_host_enabled(musb)) { | 2255 | if (is_host_enabled(musb)) { |
2248 | musb_writew(musb_base, MUSB_FRAME, musb_context.frame); | 2256 | musb_writew(musb_base, MUSB_FRAME, musb_context.frame); |
2249 | musb_writeb(musb_base, MUSB_TESTMODE, musb_context.testmode); | 2257 | musb_writeb(musb_base, MUSB_TESTMODE, musb_context.testmode); |
2258 | musb_write_ulpi_buscontrol(musb->mregs, musb_context.busctl); | ||
2250 | } | 2259 | } |
2251 | musb_writeb(musb_base, MUSB_POWER, musb_context.power); | 2260 | musb_writeb(musb_base, MUSB_POWER, musb_context.power); |
2252 | musb_writew(musb_base, MUSB_INTRTXE, musb_context.intrtxe); | 2261 | musb_writew(musb_base, MUSB_INTRTXE, musb_context.intrtxe); |
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index cd9f4a9a06c6..ac17b004909b 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h | |||
@@ -478,7 +478,7 @@ struct musb_context_registers { | |||
478 | u16 frame; | 478 | u16 frame; |
479 | u8 index, testmode; | 479 | u8 index, testmode; |
480 | 480 | ||
481 | u8 devctl, misc; | 481 | u8 devctl, busctl, misc; |
482 | 482 | ||
483 | struct musb_csr_regs index_regs[MUSB_C_NUM_EPS]; | 483 | struct musb_csr_regs index_regs[MUSB_C_NUM_EPS]; |
484 | }; | 484 | }; |
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index dec896e888db..877d20b1dff9 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c | |||
@@ -2042,6 +2042,7 @@ static int musb_urb_enqueue( | |||
2042 | * odd, rare, error prone, but legal. | 2042 | * odd, rare, error prone, but legal. |
2043 | */ | 2043 | */ |
2044 | kfree(qh); | 2044 | kfree(qh); |
2045 | qh = NULL; | ||
2045 | ret = 0; | 2046 | ret = 0; |
2046 | } else | 2047 | } else |
2047 | ret = musb_schedule(musb, qh, | 2048 | ret = musb_schedule(musb, qh, |
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 490cdf15ccb6..82592633502f 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -331,8 +331,5 @@ int musb_platform_exit(struct musb *musb) | |||
331 | 331 | ||
332 | musb_platform_suspend(musb); | 332 | musb_platform_suspend(musb); |
333 | 333 | ||
334 | clk_put(musb->clock); | ||
335 | musb->clock = NULL; | ||
336 | |||
337 | return 0; | 334 | return 0; |
338 | } | 335 | } |
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index ab776a8d98ca..60d3938cafcf 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c | |||
@@ -29,6 +29,19 @@ static void tusb_source_power(struct musb *musb, int is_on); | |||
29 | #define TUSB_REV_MAJOR(reg_val) ((reg_val >> 4) & 0xf) | 29 | #define TUSB_REV_MAJOR(reg_val) ((reg_val >> 4) & 0xf) |
30 | #define TUSB_REV_MINOR(reg_val) (reg_val & 0xf) | 30 | #define TUSB_REV_MINOR(reg_val) (reg_val & 0xf) |
31 | 31 | ||
32 | #ifdef CONFIG_PM | ||
33 | /* REVISIT: These should be only needed if somebody implements off idle */ | ||
34 | void musb_platform_save_context(struct musb *musb, | ||
35 | struct musb_context_registers *musb_context) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | void musb_platform_restore_context(struct musb *musb, | ||
40 | struct musb_context_registers *musb_context) | ||
41 | { | ||
42 | } | ||
43 | #endif | ||
44 | |||
32 | /* | 45 | /* |
33 | * Checks the revision. We need to use the DMA register as 3.0 does not | 46 | * Checks the revision. We need to use the DMA register as 3.0 does not |
34 | * have correct versions for TUSB_PRCM_REV or TUSB_INT_CTRL_REV. | 47 | * have correct versions for TUSB_PRCM_REV or TUSB_INT_CTRL_REV. |
diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index 5afa070d7dc9..c061a88f2b0f 100644 --- a/drivers/usb/musb/tusb6010_omap.c +++ b/drivers/usb/musb/tusb6010_omap.c | |||
@@ -39,7 +39,7 @@ struct tusb_omap_dma_ch { | |||
39 | 39 | ||
40 | struct tusb_omap_dma *tusb_dma; | 40 | struct tusb_omap_dma *tusb_dma; |
41 | 41 | ||
42 | void __iomem *dma_addr; | 42 | dma_addr_t dma_addr; |
43 | 43 | ||
44 | u32 len; | 44 | u32 len; |
45 | u16 packet_sz; | 45 | u16 packet_sz; |
@@ -126,6 +126,7 @@ static void tusb_omap_dma_cb(int lch, u16 ch_status, void *data) | |||
126 | struct tusb_omap_dma_ch *chdat = to_chdat(channel); | 126 | struct tusb_omap_dma_ch *chdat = to_chdat(channel); |
127 | struct tusb_omap_dma *tusb_dma = chdat->tusb_dma; | 127 | struct tusb_omap_dma *tusb_dma = chdat->tusb_dma; |
128 | struct musb *musb = chdat->musb; | 128 | struct musb *musb = chdat->musb; |
129 | struct device *dev = musb->controller; | ||
129 | struct musb_hw_ep *hw_ep = chdat->hw_ep; | 130 | struct musb_hw_ep *hw_ep = chdat->hw_ep; |
130 | void __iomem *ep_conf = hw_ep->conf; | 131 | void __iomem *ep_conf = hw_ep->conf; |
131 | void __iomem *mbase = musb->mregs; | 132 | void __iomem *mbase = musb->mregs; |
@@ -173,13 +174,15 @@ static void tusb_omap_dma_cb(int lch, u16 ch_status, void *data) | |||
173 | DBG(3, "Using PIO for remaining %lu bytes\n", pio); | 174 | DBG(3, "Using PIO for remaining %lu bytes\n", pio); |
174 | buf = phys_to_virt((u32)chdat->dma_addr) + chdat->transfer_len; | 175 | buf = phys_to_virt((u32)chdat->dma_addr) + chdat->transfer_len; |
175 | if (chdat->tx) { | 176 | if (chdat->tx) { |
176 | dma_cache_maint(phys_to_virt((u32)chdat->dma_addr), | 177 | dma_unmap_single(dev, chdat->dma_addr, |
177 | chdat->transfer_len, DMA_TO_DEVICE); | 178 | chdat->transfer_len, |
179 | DMA_TO_DEVICE); | ||
178 | musb_write_fifo(hw_ep, pio, buf); | 180 | musb_write_fifo(hw_ep, pio, buf); |
179 | } else { | 181 | } else { |
182 | dma_unmap_single(dev, chdat->dma_addr, | ||
183 | chdat->transfer_len, | ||
184 | DMA_FROM_DEVICE); | ||
180 | musb_read_fifo(hw_ep, pio, buf); | 185 | musb_read_fifo(hw_ep, pio, buf); |
181 | dma_cache_maint(phys_to_virt((u32)chdat->dma_addr), | ||
182 | chdat->transfer_len, DMA_FROM_DEVICE); | ||
183 | } | 186 | } |
184 | channel->actual_len += pio; | 187 | channel->actual_len += pio; |
185 | } | 188 | } |
@@ -224,6 +227,7 @@ static int tusb_omap_dma_program(struct dma_channel *channel, u16 packet_sz, | |||
224 | struct tusb_omap_dma_ch *chdat = to_chdat(channel); | 227 | struct tusb_omap_dma_ch *chdat = to_chdat(channel); |
225 | struct tusb_omap_dma *tusb_dma = chdat->tusb_dma; | 228 | struct tusb_omap_dma *tusb_dma = chdat->tusb_dma; |
226 | struct musb *musb = chdat->musb; | 229 | struct musb *musb = chdat->musb; |
230 | struct device *dev = musb->controller; | ||
227 | struct musb_hw_ep *hw_ep = chdat->hw_ep; | 231 | struct musb_hw_ep *hw_ep = chdat->hw_ep; |
228 | void __iomem *mbase = musb->mregs; | 232 | void __iomem *mbase = musb->mregs; |
229 | void __iomem *ep_conf = hw_ep->conf; | 233 | void __iomem *ep_conf = hw_ep->conf; |
@@ -299,14 +303,16 @@ static int tusb_omap_dma_program(struct dma_channel *channel, u16 packet_sz, | |||
299 | chdat->packet_sz = packet_sz; | 303 | chdat->packet_sz = packet_sz; |
300 | chdat->len = len; | 304 | chdat->len = len; |
301 | channel->actual_len = 0; | 305 | channel->actual_len = 0; |
302 | chdat->dma_addr = (void __iomem *)dma_addr; | 306 | chdat->dma_addr = dma_addr; |
303 | channel->status = MUSB_DMA_STATUS_BUSY; | 307 | channel->status = MUSB_DMA_STATUS_BUSY; |
304 | 308 | ||
305 | /* Since we're recycling dma areas, we need to clean or invalidate */ | 309 | /* Since we're recycling dma areas, we need to clean or invalidate */ |
306 | if (chdat->tx) | 310 | if (chdat->tx) |
307 | dma_cache_maint(phys_to_virt(dma_addr), len, DMA_TO_DEVICE); | 311 | dma_map_single(dev, phys_to_virt(dma_addr), len, |
312 | DMA_TO_DEVICE); | ||
308 | else | 313 | else |
309 | dma_cache_maint(phys_to_virt(dma_addr), len, DMA_FROM_DEVICE); | 314 | dma_map_single(dev, phys_to_virt(dma_addr), len, |
315 | DMA_FROM_DEVICE); | ||
310 | 316 | ||
311 | /* Use 16-bit transfer if dma_addr is not 32-bit aligned */ | 317 | /* Use 16-bit transfer if dma_addr is not 32-bit aligned */ |
312 | if ((dma_addr & 0x3) == 0) { | 318 | if ((dma_addr & 0x3) == 0) { |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index ca9d866672aa..84d0edad8e4f 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -305,6 +305,11 @@ static int option_resume(struct usb_serial *serial); | |||
305 | #define ZTE_PRODUCT_CDMA_TECH 0xfffe | 305 | #define ZTE_PRODUCT_CDMA_TECH 0xfffe |
306 | #define ZTE_PRODUCT_AC8710 0xfff1 | 306 | #define ZTE_PRODUCT_AC8710 0xfff1 |
307 | #define ZTE_PRODUCT_AC2726 0xfff5 | 307 | #define ZTE_PRODUCT_AC2726 0xfff5 |
308 | #define ZTE_PRODUCT_AC8710T 0xffff | ||
309 | |||
310 | /* ZTE PRODUCTS -- alternate vendor ID */ | ||
311 | #define ZTE_VENDOR_ID2 0x1d6b | ||
312 | #define ZTE_PRODUCT_MF_330 0x0002 | ||
308 | 313 | ||
309 | #define BENQ_VENDOR_ID 0x04a5 | 314 | #define BENQ_VENDOR_ID 0x04a5 |
310 | #define BENQ_PRODUCT_H10 0x4068 | 315 | #define BENQ_PRODUCT_H10 0x4068 |
@@ -373,6 +378,8 @@ static int option_resume(struct usb_serial *serial); | |||
373 | #define HAIER_VENDOR_ID 0x201e | 378 | #define HAIER_VENDOR_ID 0x201e |
374 | #define HAIER_PRODUCT_CE100 0x2009 | 379 | #define HAIER_PRODUCT_CE100 0x2009 |
375 | 380 | ||
381 | #define CINTERION_VENDOR_ID 0x0681 | ||
382 | |||
376 | /* some devices interfaces need special handling due to a number of reasons */ | 383 | /* some devices interfaces need special handling due to a number of reasons */ |
377 | enum option_blacklist_reason { | 384 | enum option_blacklist_reason { |
378 | OPTION_BLACKLIST_NONE = 0, | 385 | OPTION_BLACKLIST_NONE = 0, |
@@ -679,6 +686,8 @@ static const struct usb_device_id option_ids[] = { | |||
679 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, | 686 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, |
680 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, | 687 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, |
681 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, | 688 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, |
689 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) }, | ||
690 | { USB_DEVICE(ZTE_VENDOR_ID2, ZTE_PRODUCT_MF_330) }, | ||
682 | { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, | 691 | { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, |
683 | { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, | 692 | { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, |
684 | { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ | 693 | { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ |
@@ -716,6 +725,7 @@ static const struct usb_device_id option_ids[] = { | |||
716 | { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)}, | 725 | { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)}, |
717 | { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)}, | 726 | { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)}, |
718 | 727 | ||
728 | { USB_DEVICE(CINTERION_VENDOR_ID, 0x0047) }, | ||
719 | { } /* Terminating entry */ | 729 | { } /* Terminating entry */ |
720 | }; | 730 | }; |
721 | MODULE_DEVICE_TABLE(usb, option_ids); | 731 | MODULE_DEVICE_TABLE(usb, option_ids); |
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index c97a0bb5b6db..c28b1607eacc 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -59,6 +59,7 @@ static const struct usb_device_id id_table[] = { | |||
59 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, | 59 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, |
60 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) }, | 60 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) }, |
61 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) }, | 61 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) }, |
62 | { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) }, | ||
62 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, | 63 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, |
63 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, | 64 | { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, |
64 | { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, | 65 | { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, |
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h index a352d5f3a59c..23c09b38b9ec 100644 --- a/drivers/usb/serial/pl2303.h +++ b/drivers/usb/serial/pl2303.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #define PL2303_PRODUCT_ID_ALDIGA 0x0611 | 20 | #define PL2303_PRODUCT_ID_ALDIGA 0x0611 |
21 | #define PL2303_PRODUCT_ID_MMX 0x0612 | 21 | #define PL2303_PRODUCT_ID_MMX 0x0612 |
22 | #define PL2303_PRODUCT_ID_GPRS 0x0609 | 22 | #define PL2303_PRODUCT_ID_GPRS 0x0609 |
23 | #define PL2303_PRODUCT_ID_HCR331 0x331a | ||
23 | 24 | ||
24 | #define ATEN_VENDOR_ID 0x0557 | 25 | #define ATEN_VENDOR_ID 0x0557 |
25 | #define ATEN_VENDOR_ID2 0x0547 | 26 | #define ATEN_VENDOR_ID2 0x0547 |
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 880e990abb07..e1bfda33f5b9 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -1735,7 +1735,7 @@ static int ti_download_firmware(struct ti_device *tdev) | |||
1735 | return -ENOENT; | 1735 | return -ENOENT; |
1736 | } | 1736 | } |
1737 | if (fw_p->size > TI_FIRMWARE_BUF_SIZE) { | 1737 | if (fw_p->size > TI_FIRMWARE_BUF_SIZE) { |
1738 | dev_err(&dev->dev, "%s - firmware too large %d \n", __func__, fw_p->size); | 1738 | dev_err(&dev->dev, "%s - firmware too large %zu\n", __func__, fw_p->size); |
1739 | return -ENOENT; | 1739 | return -ENOENT; |
1740 | } | 1740 | } |
1741 | 1741 | ||
diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c index 88ed54e50f74..59359c9a5e01 100644 --- a/drivers/watchdog/ep93xx_wdt.c +++ b/drivers/watchdog/ep93xx_wdt.c | |||
@@ -244,7 +244,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); | |||
244 | module_param(timeout, int, 0); | 244 | module_param(timeout, int, 0); |
245 | MODULE_PARM_DESC(timeout, | 245 | MODULE_PARM_DESC(timeout, |
246 | "Watchdog timeout in seconds. (1<=timeout<=3600, default=" | 246 | "Watchdog timeout in seconds. (1<=timeout<=3600, default=" |
247 | __MODULE_STRING(WATCHDOG_TIMEOUT) ")"); | 247 | __MODULE_STRING(WDT_TIMEOUT) ")"); |
248 | 248 | ||
249 | MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>," | 249 | MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>," |
250 | "Alessandro Zummo <a.zummo@towertech.it>"); | 250 | "Alessandro Zummo <a.zummo@towertech.it>"); |
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 412593703d1e..4b42c2bb603f 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -509,7 +509,7 @@ static void writepages_finish(struct ceph_osd_request *req, | |||
509 | u64 bytes = 0; | 509 | u64 bytes = 0; |
510 | struct ceph_client *client = ceph_inode_to_client(inode); | 510 | struct ceph_client *client = ceph_inode_to_client(inode); |
511 | long writeback_stat; | 511 | long writeback_stat; |
512 | unsigned issued = __ceph_caps_issued(ci, NULL); | 512 | unsigned issued = ceph_caps_issued(ci); |
513 | 513 | ||
514 | /* parse reply */ | 514 | /* parse reply */ |
515 | replyhead = msg->front.iov_base; | 515 | replyhead = msg->front.iov_base; |
diff --git a/fs/ceph/auth.c b/fs/ceph/auth.c index f6394b94b866..818afe72e6c7 100644 --- a/fs/ceph/auth.c +++ b/fs/ceph/auth.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/slab.h> | 4 | #include <linux/slab.h> |
5 | #include <linux/err.h> | 5 | #include <linux/err.h> |
6 | #include <linux/slab.h> | ||
6 | 7 | ||
7 | #include "types.h" | 8 | #include "types.h" |
8 | #include "auth_none.h" | 9 | #include "auth_none.h" |
diff --git a/fs/ceph/auth_none.h b/fs/ceph/auth_none.h index 56c05533a31c..8164df1a08be 100644 --- a/fs/ceph/auth_none.h +++ b/fs/ceph/auth_none.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _FS_CEPH_AUTH_NONE_H | 1 | #ifndef _FS_CEPH_AUTH_NONE_H |
2 | #define _FS_CEPH_AUTH_NONE_H | 2 | #define _FS_CEPH_AUTH_NONE_H |
3 | 3 | ||
4 | #include <linux/slab.h> | ||
5 | |||
4 | #include "auth.h" | 6 | #include "auth.h" |
5 | 7 | ||
6 | /* | 8 | /* |
diff --git a/fs/ceph/auth_x.c b/fs/ceph/auth_x.c index d9001a4dc8cc..fee5a08da881 100644 --- a/fs/ceph/auth_x.c +++ b/fs/ceph/auth_x.c | |||
@@ -12,8 +12,6 @@ | |||
12 | #include "auth.h" | 12 | #include "auth.h" |
13 | #include "decode.h" | 13 | #include "decode.h" |
14 | 14 | ||
15 | struct kmem_cache *ceph_x_ticketbuf_cachep; | ||
16 | |||
17 | #define TEMP_TICKET_BUF_LEN 256 | 15 | #define TEMP_TICKET_BUF_LEN 256 |
18 | 16 | ||
19 | static void ceph_x_validate_tickets(struct ceph_auth_client *ac, int *pneed); | 17 | static void ceph_x_validate_tickets(struct ceph_auth_client *ac, int *pneed); |
@@ -131,13 +129,12 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac, | |||
131 | char *ticket_buf; | 129 | char *ticket_buf; |
132 | u8 struct_v; | 130 | u8 struct_v; |
133 | 131 | ||
134 | dbuf = kmem_cache_alloc(ceph_x_ticketbuf_cachep, GFP_NOFS | GFP_ATOMIC); | 132 | dbuf = kmalloc(TEMP_TICKET_BUF_LEN, GFP_NOFS); |
135 | if (!dbuf) | 133 | if (!dbuf) |
136 | return -ENOMEM; | 134 | return -ENOMEM; |
137 | 135 | ||
138 | ret = -ENOMEM; | 136 | ret = -ENOMEM; |
139 | ticket_buf = kmem_cache_alloc(ceph_x_ticketbuf_cachep, | 137 | ticket_buf = kmalloc(TEMP_TICKET_BUF_LEN, GFP_NOFS); |
140 | GFP_NOFS | GFP_ATOMIC); | ||
141 | if (!ticket_buf) | 138 | if (!ticket_buf) |
142 | goto out_dbuf; | 139 | goto out_dbuf; |
143 | 140 | ||
@@ -251,9 +248,9 @@ static int ceph_x_proc_ticket_reply(struct ceph_auth_client *ac, | |||
251 | 248 | ||
252 | ret = 0; | 249 | ret = 0; |
253 | out: | 250 | out: |
254 | kmem_cache_free(ceph_x_ticketbuf_cachep, ticket_buf); | 251 | kfree(ticket_buf); |
255 | out_dbuf: | 252 | out_dbuf: |
256 | kmem_cache_free(ceph_x_ticketbuf_cachep, dbuf); | 253 | kfree(dbuf); |
257 | return ret; | 254 | return ret; |
258 | 255 | ||
259 | bad: | 256 | bad: |
@@ -605,8 +602,6 @@ static void ceph_x_destroy(struct ceph_auth_client *ac) | |||
605 | remove_ticket_handler(ac, th); | 602 | remove_ticket_handler(ac, th); |
606 | } | 603 | } |
607 | 604 | ||
608 | kmem_cache_destroy(ceph_x_ticketbuf_cachep); | ||
609 | |||
610 | kfree(ac->private); | 605 | kfree(ac->private); |
611 | ac->private = NULL; | 606 | ac->private = NULL; |
612 | } | 607 | } |
@@ -641,26 +636,20 @@ int ceph_x_init(struct ceph_auth_client *ac) | |||
641 | int ret; | 636 | int ret; |
642 | 637 | ||
643 | dout("ceph_x_init %p\n", ac); | 638 | dout("ceph_x_init %p\n", ac); |
639 | ret = -ENOMEM; | ||
644 | xi = kzalloc(sizeof(*xi), GFP_NOFS); | 640 | xi = kzalloc(sizeof(*xi), GFP_NOFS); |
645 | if (!xi) | 641 | if (!xi) |
646 | return -ENOMEM; | 642 | goto out; |
647 | 643 | ||
648 | ret = -ENOMEM; | ||
649 | ceph_x_ticketbuf_cachep = kmem_cache_create("ceph_x_ticketbuf", | ||
650 | TEMP_TICKET_BUF_LEN, 8, | ||
651 | (SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD), | ||
652 | NULL); | ||
653 | if (!ceph_x_ticketbuf_cachep) | ||
654 | goto done_nomem; | ||
655 | ret = -EINVAL; | 644 | ret = -EINVAL; |
656 | if (!ac->secret) { | 645 | if (!ac->secret) { |
657 | pr_err("no secret set (for auth_x protocol)\n"); | 646 | pr_err("no secret set (for auth_x protocol)\n"); |
658 | goto done_nomem; | 647 | goto out_nomem; |
659 | } | 648 | } |
660 | 649 | ||
661 | ret = ceph_crypto_key_unarmor(&xi->secret, ac->secret); | 650 | ret = ceph_crypto_key_unarmor(&xi->secret, ac->secret); |
662 | if (ret) | 651 | if (ret) |
663 | goto done_nomem; | 652 | goto out_nomem; |
664 | 653 | ||
665 | xi->starting = true; | 654 | xi->starting = true; |
666 | xi->ticket_handlers = RB_ROOT; | 655 | xi->ticket_handlers = RB_ROOT; |
@@ -670,10 +659,9 @@ int ceph_x_init(struct ceph_auth_client *ac) | |||
670 | ac->ops = &ceph_x_ops; | 659 | ac->ops = &ceph_x_ops; |
671 | return 0; | 660 | return 0; |
672 | 661 | ||
673 | done_nomem: | 662 | out_nomem: |
674 | kfree(xi); | 663 | kfree(xi); |
675 | if (ceph_x_ticketbuf_cachep) | 664 | out: |
676 | kmem_cache_destroy(ceph_x_ticketbuf_cachep); | ||
677 | return ret; | 665 | return ret; |
678 | } | 666 | } |
679 | 667 | ||
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index aa2239fa9a3b..0c1681806867 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -1861,8 +1861,8 @@ static void kick_flushing_capsnaps(struct ceph_mds_client *mdsc, | |||
1861 | } else { | 1861 | } else { |
1862 | pr_err("%p auth cap %p not mds%d ???\n", inode, | 1862 | pr_err("%p auth cap %p not mds%d ???\n", inode, |
1863 | cap, session->s_mds); | 1863 | cap, session->s_mds); |
1864 | spin_unlock(&inode->i_lock); | ||
1865 | } | 1864 | } |
1865 | spin_unlock(&inode->i_lock); | ||
1866 | } | 1866 | } |
1867 | } | 1867 | } |
1868 | 1868 | ||
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index ea8ee2e526aa..650d2db5ed26 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -880,7 +880,16 @@ static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
880 | * do_request, above). If there is no trace, we need | 880 | * do_request, above). If there is no trace, we need |
881 | * to do it here. | 881 | * to do it here. |
882 | */ | 882 | */ |
883 | |||
884 | /* d_move screws up d_subdirs order */ | ||
885 | ceph_i_clear(new_dir, CEPH_I_COMPLETE); | ||
886 | |||
883 | d_move(old_dentry, new_dentry); | 887 | d_move(old_dentry, new_dentry); |
888 | |||
889 | /* ensure target dentry is invalidated, despite | ||
890 | rehashing bug in vfs_rename_dir */ | ||
891 | new_dentry->d_time = jiffies; | ||
892 | ceph_dentry(new_dentry)->lease_shared_gen = 0; | ||
884 | } | 893 | } |
885 | ceph_mdsc_put_request(req); | 894 | ceph_mdsc_put_request(req); |
886 | return err; | 895 | return err; |
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 4add3d5da2c1..ed6f19721d6e 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
@@ -665,7 +665,8 @@ more: | |||
665 | * throw out any page cache pages in this range. this | 665 | * throw out any page cache pages in this range. this |
666 | * may block. | 666 | * may block. |
667 | */ | 667 | */ |
668 | truncate_inode_pages_range(inode->i_mapping, pos, pos+len); | 668 | truncate_inode_pages_range(inode->i_mapping, pos, |
669 | (pos+len) | (PAGE_CACHE_SIZE-1)); | ||
669 | } else { | 670 | } else { |
670 | pages = alloc_page_vector(num_pages); | 671 | pages = alloc_page_vector(num_pages); |
671 | if (IS_ERR(pages)) { | 672 | if (IS_ERR(pages)) { |
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 26f883c275e8..261f3e6c0bcf 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -997,6 +997,10 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req, | |||
997 | dn, dn->d_name.len, dn->d_name.name); | 997 | dn, dn->d_name.len, dn->d_name.name); |
998 | dout("fill_trace doing d_move %p -> %p\n", | 998 | dout("fill_trace doing d_move %p -> %p\n", |
999 | req->r_old_dentry, dn); | 999 | req->r_old_dentry, dn); |
1000 | |||
1001 | /* d_move screws up d_subdirs order */ | ||
1002 | ceph_i_clear(dir, CEPH_I_COMPLETE); | ||
1003 | |||
1000 | d_move(req->r_old_dentry, dn); | 1004 | d_move(req->r_old_dentry, dn); |
1001 | dout(" src %p '%.*s' dst %p '%.*s'\n", | 1005 | dout(" src %p '%.*s' dst %p '%.*s'\n", |
1002 | req->r_old_dentry, | 1006 | req->r_old_dentry, |
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index cdaaa131add3..509f57d9ccb3 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c | |||
@@ -1334,6 +1334,7 @@ static int read_partial_message(struct ceph_connection *con) | |||
1334 | unsigned front_len, middle_len, data_len, data_off; | 1334 | unsigned front_len, middle_len, data_len, data_off; |
1335 | int datacrc = con->msgr->nocrc; | 1335 | int datacrc = con->msgr->nocrc; |
1336 | int skip; | 1336 | int skip; |
1337 | u64 seq; | ||
1337 | 1338 | ||
1338 | dout("read_partial_message con %p msg %p\n", con, m); | 1339 | dout("read_partial_message con %p msg %p\n", con, m); |
1339 | 1340 | ||
@@ -1368,6 +1369,25 @@ static int read_partial_message(struct ceph_connection *con) | |||
1368 | return -EIO; | 1369 | return -EIO; |
1369 | data_off = le16_to_cpu(con->in_hdr.data_off); | 1370 | data_off = le16_to_cpu(con->in_hdr.data_off); |
1370 | 1371 | ||
1372 | /* verify seq# */ | ||
1373 | seq = le64_to_cpu(con->in_hdr.seq); | ||
1374 | if ((s64)seq - (s64)con->in_seq < 1) { | ||
1375 | pr_info("skipping %s%lld %s seq %lld, expected %lld\n", | ||
1376 | ENTITY_NAME(con->peer_name), | ||
1377 | pr_addr(&con->peer_addr.in_addr), | ||
1378 | seq, con->in_seq + 1); | ||
1379 | con->in_base_pos = -front_len - middle_len - data_len - | ||
1380 | sizeof(m->footer); | ||
1381 | con->in_tag = CEPH_MSGR_TAG_READY; | ||
1382 | con->in_seq++; | ||
1383 | return 0; | ||
1384 | } else if ((s64)seq - (s64)con->in_seq > 1) { | ||
1385 | pr_err("read_partial_message bad seq %lld expected %lld\n", | ||
1386 | seq, con->in_seq + 1); | ||
1387 | con->error_msg = "bad message sequence # for incoming message"; | ||
1388 | return -EBADMSG; | ||
1389 | } | ||
1390 | |||
1371 | /* allocate message? */ | 1391 | /* allocate message? */ |
1372 | if (!con->in_msg) { | 1392 | if (!con->in_msg) { |
1373 | dout("got hdr type %d front %d data %d\n", con->in_hdr.type, | 1393 | dout("got hdr type %d front %d data %d\n", con->in_hdr.type, |
@@ -1379,6 +1399,7 @@ static int read_partial_message(struct ceph_connection *con) | |||
1379 | con->in_base_pos = -front_len - middle_len - data_len - | 1399 | con->in_base_pos = -front_len - middle_len - data_len - |
1380 | sizeof(m->footer); | 1400 | sizeof(m->footer); |
1381 | con->in_tag = CEPH_MSGR_TAG_READY; | 1401 | con->in_tag = CEPH_MSGR_TAG_READY; |
1402 | con->in_seq++; | ||
1382 | return 0; | 1403 | return 0; |
1383 | } | 1404 | } |
1384 | if (IS_ERR(con->in_msg)) { | 1405 | if (IS_ERR(con->in_msg)) { |
@@ -2030,6 +2051,7 @@ void ceph_con_revoke_message(struct ceph_connection *con, struct ceph_msg *msg) | |||
2030 | ceph_msg_put(con->in_msg); | 2051 | ceph_msg_put(con->in_msg); |
2031 | con->in_msg = NULL; | 2052 | con->in_msg = NULL; |
2032 | con->in_tag = CEPH_MSGR_TAG_READY; | 2053 | con->in_tag = CEPH_MSGR_TAG_READY; |
2054 | con->in_seq++; | ||
2033 | } else { | 2055 | } else { |
2034 | dout("con_revoke_pages %p msg %p pages %p no-op\n", | 2056 | dout("con_revoke_pages %p msg %p pages %p no-op\n", |
2035 | con, con->in_msg, msg); | 2057 | con, con->in_msg, msg); |
diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index 2b881262ef67..d5114db70453 100644 --- a/fs/ceph/snap.c +++ b/fs/ceph/snap.c | |||
@@ -869,16 +869,20 @@ skip_inode: | |||
869 | continue; | 869 | continue; |
870 | ci = ceph_inode(inode); | 870 | ci = ceph_inode(inode); |
871 | spin_lock(&inode->i_lock); | 871 | spin_lock(&inode->i_lock); |
872 | if (!ci->i_snap_realm) | 872 | if (list_empty(&ci->i_snap_realm_item)) { |
873 | goto split_skip_inode; | 873 | struct ceph_snap_realm *oldrealm = |
874 | ceph_put_snap_realm(mdsc, ci->i_snap_realm); | 874 | ci->i_snap_realm; |
875 | spin_lock(&realm->inodes_with_caps_lock); | 875 | |
876 | list_add(&ci->i_snap_realm_item, | 876 | dout(" moving %p to split realm %llx %p\n", |
877 | &realm->inodes_with_caps); | 877 | inode, realm->ino, realm); |
878 | ci->i_snap_realm = realm; | 878 | spin_lock(&realm->inodes_with_caps_lock); |
879 | spin_unlock(&realm->inodes_with_caps_lock); | 879 | list_add(&ci->i_snap_realm_item, |
880 | ceph_get_snap_realm(mdsc, realm); | 880 | &realm->inodes_with_caps); |
881 | split_skip_inode: | 881 | ci->i_snap_realm = realm; |
882 | spin_unlock(&realm->inodes_with_caps_lock); | ||
883 | ceph_get_snap_realm(mdsc, realm); | ||
884 | ceph_put_snap_realm(mdsc, oldrealm); | ||
885 | } | ||
882 | spin_unlock(&inode->i_lock); | 886 | spin_unlock(&inode->i_lock); |
883 | iput(inode); | 887 | iput(inode); |
884 | } | 888 | } |
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 75d02eaa1279..f888cf487b7c 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
@@ -996,9 +996,10 @@ static int __init init_ceph(void) | |||
996 | if (ret) | 996 | if (ret) |
997 | goto out_icache; | 997 | goto out_icache; |
998 | 998 | ||
999 | pr_info("loaded %d.%d.%d (mon/mds/osd proto %d/%d/%d)\n", | 999 | pr_info("loaded (mon/mds/osd proto %d/%d/%d, osdmap %d/%d %d/%d)\n", |
1000 | CEPH_VERSION_MAJOR, CEPH_VERSION_MINOR, CEPH_VERSION_PATCH, | 1000 | CEPH_MONC_PROTOCOL, CEPH_MDSC_PROTOCOL, CEPH_OSDC_PROTOCOL, |
1001 | CEPH_MONC_PROTOCOL, CEPH_MDSC_PROTOCOL, CEPH_OSDC_PROTOCOL); | 1001 | CEPH_OSDMAP_VERSION, CEPH_OSDMAP_VERSION_EXT, |
1002 | CEPH_OSDMAP_INC_VERSION, CEPH_OSDMAP_INC_VERSION_EXT); | ||
1002 | return 0; | 1003 | return 0; |
1003 | 1004 | ||
1004 | out_icache: | 1005 | out_icache: |
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index e30dfbb056c3..13513b80d87f 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
11 | #include <linux/mempool.h> | 11 | #include <linux/mempool.h> |
12 | #include <linux/pagemap.h> | 12 | #include <linux/pagemap.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/wait.h> | 14 | #include <linux/wait.h> |
14 | #include <linux/writeback.h> | 15 | #include <linux/writeback.h> |
15 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 0cdbc5e7655a..48145f505a6a 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c | |||
@@ -749,6 +749,7 @@ nilfs_fill_super(struct super_block *sb, void *data, int silent, | |||
749 | sb->s_export_op = &nilfs_export_ops; | 749 | sb->s_export_op = &nilfs_export_ops; |
750 | sb->s_root = NULL; | 750 | sb->s_root = NULL; |
751 | sb->s_time_gran = 1; | 751 | sb->s_time_gran = 1; |
752 | sb->s_bdi = nilfs->ns_bdi; | ||
752 | 753 | ||
753 | err = load_nilfs(nilfs, sbi); | 754 | err = load_nilfs(nilfs, sbi); |
754 | if (err) | 755 | if (err) |
diff --git a/fs/notify/inotify/Kconfig b/fs/notify/inotify/Kconfig index 3e56dbffe729..b3a159b21cfd 100644 --- a/fs/notify/inotify/Kconfig +++ b/fs/notify/inotify/Kconfig | |||
@@ -15,6 +15,7 @@ config INOTIFY | |||
15 | 15 | ||
16 | config INOTIFY_USER | 16 | config INOTIFY_USER |
17 | bool "Inotify support for userspace" | 17 | bool "Inotify support for userspace" |
18 | select ANON_INODES | ||
18 | select FSNOTIFY | 19 | select FSNOTIFY |
19 | default y | 20 | default y |
20 | ---help--- | 21 | ---help--- |
diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c index ecebb2276790..f9d5d3ffc75a 100644 --- a/fs/ocfs2/buffer_head_io.c +++ b/fs/ocfs2/buffer_head_io.c | |||
@@ -406,6 +406,7 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb, | |||
406 | struct buffer_head *bh) | 406 | struct buffer_head *bh) |
407 | { | 407 | { |
408 | int ret = 0; | 408 | int ret = 0; |
409 | struct ocfs2_dinode *di = (struct ocfs2_dinode *)bh->b_data; | ||
409 | 410 | ||
410 | mlog_entry_void(); | 411 | mlog_entry_void(); |
411 | 412 | ||
@@ -425,6 +426,7 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb, | |||
425 | 426 | ||
426 | get_bh(bh); /* for end_buffer_write_sync() */ | 427 | get_bh(bh); /* for end_buffer_write_sync() */ |
427 | bh->b_end_io = end_buffer_write_sync; | 428 | bh->b_end_io = end_buffer_write_sync; |
429 | ocfs2_compute_meta_ecc(osb->sb, bh->b_data, &di->i_check); | ||
428 | submit_bh(WRITE, bh); | 430 | submit_bh(WRITE, bh); |
429 | 431 | ||
430 | wait_on_buffer(bh); | 432 | wait_on_buffer(bh); |
diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index a795eb91f4ea..12d5eb78a11a 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c | |||
@@ -184,9 +184,8 @@ static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, | |||
184 | BUG_ON(!lksb); | 184 | BUG_ON(!lksb); |
185 | 185 | ||
186 | /* only updates if this node masters the lockres */ | 186 | /* only updates if this node masters the lockres */ |
187 | spin_lock(&res->spinlock); | ||
187 | if (res->owner == dlm->node_num) { | 188 | if (res->owner == dlm->node_num) { |
188 | |||
189 | spin_lock(&res->spinlock); | ||
190 | /* check the lksb flags for the direction */ | 189 | /* check the lksb flags for the direction */ |
191 | if (lksb->flags & DLM_LKSB_GET_LVB) { | 190 | if (lksb->flags & DLM_LKSB_GET_LVB) { |
192 | mlog(0, "getting lvb from lockres for %s node\n", | 191 | mlog(0, "getting lvb from lockres for %s node\n", |
@@ -201,8 +200,8 @@ static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res, | |||
201 | * here. In the future we might want to clear it at the time | 200 | * here. In the future we might want to clear it at the time |
202 | * the put is actually done. | 201 | * the put is actually done. |
203 | */ | 202 | */ |
204 | spin_unlock(&res->spinlock); | ||
205 | } | 203 | } |
204 | spin_unlock(&res->spinlock); | ||
206 | 205 | ||
207 | /* reset any lvb flags on the lksb */ | 206 | /* reset any lvb flags on the lksb */ |
208 | lksb->flags &= ~(DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB); | 207 | lksb->flags &= ~(DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB); |
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index 1b0de157a08c..b83d6107a1f5 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c | |||
@@ -112,20 +112,20 @@ MODULE_PARM_DESC(capabilities, DLMFS_CAPABILITIES); | |||
112 | * O_RDONLY -> PRMODE level | 112 | * O_RDONLY -> PRMODE level |
113 | * O_WRONLY -> EXMODE level | 113 | * O_WRONLY -> EXMODE level |
114 | * | 114 | * |
115 | * O_NONBLOCK -> LKM_NOQUEUE | 115 | * O_NONBLOCK -> NOQUEUE |
116 | */ | 116 | */ |
117 | static int dlmfs_decode_open_flags(int open_flags, | 117 | static int dlmfs_decode_open_flags(int open_flags, |
118 | int *level, | 118 | int *level, |
119 | int *flags) | 119 | int *flags) |
120 | { | 120 | { |
121 | if (open_flags & (O_WRONLY|O_RDWR)) | 121 | if (open_flags & (O_WRONLY|O_RDWR)) |
122 | *level = LKM_EXMODE; | 122 | *level = DLM_LOCK_EX; |
123 | else | 123 | else |
124 | *level = LKM_PRMODE; | 124 | *level = DLM_LOCK_PR; |
125 | 125 | ||
126 | *flags = 0; | 126 | *flags = 0; |
127 | if (open_flags & O_NONBLOCK) | 127 | if (open_flags & O_NONBLOCK) |
128 | *flags |= LKM_NOQUEUE; | 128 | *flags |= DLM_LKF_NOQUEUE; |
129 | 129 | ||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
@@ -166,7 +166,7 @@ static int dlmfs_file_open(struct inode *inode, | |||
166 | * to be able userspace to be able to distinguish a | 166 | * to be able userspace to be able to distinguish a |
167 | * valid lock request from one that simply couldn't be | 167 | * valid lock request from one that simply couldn't be |
168 | * granted. */ | 168 | * granted. */ |
169 | if (flags & LKM_NOQUEUE && status == -EAGAIN) | 169 | if (flags & DLM_LKF_NOQUEUE && status == -EAGAIN) |
170 | status = -ETXTBSY; | 170 | status = -ETXTBSY; |
171 | kfree(fp); | 171 | kfree(fp); |
172 | goto bail; | 172 | goto bail; |
@@ -193,7 +193,7 @@ static int dlmfs_file_release(struct inode *inode, | |||
193 | status = 0; | 193 | status = 0; |
194 | if (fp) { | 194 | if (fp) { |
195 | level = fp->fp_lock_level; | 195 | level = fp->fp_lock_level; |
196 | if (level != LKM_IVMODE) | 196 | if (level != DLM_LOCK_IV) |
197 | user_dlm_cluster_unlock(&ip->ip_lockres, level); | 197 | user_dlm_cluster_unlock(&ip->ip_lockres, level); |
198 | 198 | ||
199 | kfree(fp); | 199 | kfree(fp); |
@@ -262,7 +262,7 @@ static ssize_t dlmfs_file_read(struct file *filp, | |||
262 | if ((count + *ppos) > i_size_read(inode)) | 262 | if ((count + *ppos) > i_size_read(inode)) |
263 | readlen = i_size_read(inode) - *ppos; | 263 | readlen = i_size_read(inode) - *ppos; |
264 | else | 264 | else |
265 | readlen = count - *ppos; | 265 | readlen = count; |
266 | 266 | ||
267 | lvb_buf = kmalloc(readlen, GFP_NOFS); | 267 | lvb_buf = kmalloc(readlen, GFP_NOFS); |
268 | if (!lvb_buf) | 268 | if (!lvb_buf) |
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 17947dc8341e..a5fbd9cea968 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -684,6 +684,7 @@ restarted_transaction: | |||
684 | if (why == RESTART_META) { | 684 | if (why == RESTART_META) { |
685 | mlog(0, "restarting function.\n"); | 685 | mlog(0, "restarting function.\n"); |
686 | restart_func = 1; | 686 | restart_func = 1; |
687 | status = 0; | ||
687 | } else { | 688 | } else { |
688 | BUG_ON(why != RESTART_TRANS); | 689 | BUG_ON(why != RESTART_TRANS); |
689 | 690 | ||
@@ -1981,18 +1982,18 @@ relock: | |||
1981 | /* communicate with ocfs2_dio_end_io */ | 1982 | /* communicate with ocfs2_dio_end_io */ |
1982 | ocfs2_iocb_set_rw_locked(iocb, rw_level); | 1983 | ocfs2_iocb_set_rw_locked(iocb, rw_level); |
1983 | 1984 | ||
1984 | if (direct_io) { | 1985 | ret = generic_segment_checks(iov, &nr_segs, &ocount, |
1985 | ret = generic_segment_checks(iov, &nr_segs, &ocount, | 1986 | VERIFY_READ); |
1986 | VERIFY_READ); | 1987 | if (ret) |
1987 | if (ret) | 1988 | goto out_dio; |
1988 | goto out_dio; | ||
1989 | 1989 | ||
1990 | count = ocount; | 1990 | count = ocount; |
1991 | ret = generic_write_checks(file, ppos, &count, | 1991 | ret = generic_write_checks(file, ppos, &count, |
1992 | S_ISBLK(inode->i_mode)); | 1992 | S_ISBLK(inode->i_mode)); |
1993 | if (ret) | 1993 | if (ret) |
1994 | goto out_dio; | 1994 | goto out_dio; |
1995 | 1995 | ||
1996 | if (direct_io) { | ||
1996 | written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos, | 1997 | written = generic_file_direct_write(iocb, iov, &nr_segs, *ppos, |
1997 | ppos, count, ocount); | 1998 | ppos, count, ocount); |
1998 | if (written < 0) { | 1999 | if (written < 0) { |
@@ -2007,7 +2008,10 @@ relock: | |||
2007 | goto out_dio; | 2008 | goto out_dio; |
2008 | } | 2009 | } |
2009 | } else { | 2010 | } else { |
2010 | written = __generic_file_aio_write(iocb, iov, nr_segs, ppos); | 2011 | current->backing_dev_info = file->f_mapping->backing_dev_info; |
2012 | written = generic_file_buffered_write(iocb, iov, nr_segs, *ppos, | ||
2013 | ppos, count, 0); | ||
2014 | current->backing_dev_info = NULL; | ||
2011 | } | 2015 | } |
2012 | 2016 | ||
2013 | out_dio: | 2017 | out_dio: |
@@ -2021,9 +2025,9 @@ out_dio: | |||
2021 | if (ret < 0) | 2025 | if (ret < 0) |
2022 | written = ret; | 2026 | written = ret; |
2023 | 2027 | ||
2024 | if (!ret && (old_size != i_size_read(inode) || | 2028 | if (!ret && ((old_size != i_size_read(inode)) || |
2025 | old_clusters != OCFS2_I(inode)->ip_clusters || | 2029 | (old_clusters != OCFS2_I(inode)->ip_clusters) || |
2026 | has_refcount)) { | 2030 | has_refcount)) { |
2027 | ret = jbd2_journal_force_commit(osb->journal->j_journal); | 2031 | ret = jbd2_journal_force_commit(osb->journal->j_journal); |
2028 | if (ret < 0) | 2032 | if (ret < 0) |
2029 | written = ret; | 2033 | written = ret; |
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 07cc8bb68b6d..af189887201c 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -558,6 +558,7 @@ static int ocfs2_truncate_for_delete(struct ocfs2_super *osb, | |||
558 | handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); | 558 | handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); |
559 | if (IS_ERR(handle)) { | 559 | if (IS_ERR(handle)) { |
560 | status = PTR_ERR(handle); | 560 | status = PTR_ERR(handle); |
561 | handle = NULL; | ||
561 | mlog_errno(status); | 562 | mlog_errno(status); |
562 | goto out; | 563 | goto out; |
563 | } | 564 | } |
@@ -639,11 +640,13 @@ static int ocfs2_remove_inode(struct inode *inode, | |||
639 | goto bail_unlock; | 640 | goto bail_unlock; |
640 | } | 641 | } |
641 | 642 | ||
642 | status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode, | 643 | if (!(OCFS2_I(inode)->ip_flags & OCFS2_INODE_SKIP_ORPHAN_DIR)) { |
643 | orphan_dir_bh); | 644 | status = ocfs2_orphan_del(osb, handle, orphan_dir_inode, inode, |
644 | if (status < 0) { | 645 | orphan_dir_bh); |
645 | mlog_errno(status); | 646 | if (status < 0) { |
646 | goto bail_commit; | 647 | mlog_errno(status); |
648 | goto bail_commit; | ||
649 | } | ||
647 | } | 650 | } |
648 | 651 | ||
649 | /* set the inodes dtime */ | 652 | /* set the inodes dtime */ |
@@ -722,38 +725,39 @@ static void ocfs2_signal_wipe_completion(struct ocfs2_super *osb, | |||
722 | static int ocfs2_wipe_inode(struct inode *inode, | 725 | static int ocfs2_wipe_inode(struct inode *inode, |
723 | struct buffer_head *di_bh) | 726 | struct buffer_head *di_bh) |
724 | { | 727 | { |
725 | int status, orphaned_slot; | 728 | int status, orphaned_slot = -1; |
726 | struct inode *orphan_dir_inode = NULL; | 729 | struct inode *orphan_dir_inode = NULL; |
727 | struct buffer_head *orphan_dir_bh = NULL; | 730 | struct buffer_head *orphan_dir_bh = NULL; |
728 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 731 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
729 | struct ocfs2_dinode *di; | 732 | struct ocfs2_dinode *di = (struct ocfs2_dinode *) di_bh->b_data; |
730 | 733 | ||
731 | di = (struct ocfs2_dinode *) di_bh->b_data; | 734 | if (!(OCFS2_I(inode)->ip_flags & OCFS2_INODE_SKIP_ORPHAN_DIR)) { |
732 | orphaned_slot = le16_to_cpu(di->i_orphaned_slot); | 735 | orphaned_slot = le16_to_cpu(di->i_orphaned_slot); |
733 | 736 | ||
734 | status = ocfs2_check_orphan_recovery_state(osb, orphaned_slot); | 737 | status = ocfs2_check_orphan_recovery_state(osb, orphaned_slot); |
735 | if (status) | 738 | if (status) |
736 | return status; | 739 | return status; |
737 | 740 | ||
738 | orphan_dir_inode = ocfs2_get_system_file_inode(osb, | 741 | orphan_dir_inode = ocfs2_get_system_file_inode(osb, |
739 | ORPHAN_DIR_SYSTEM_INODE, | 742 | ORPHAN_DIR_SYSTEM_INODE, |
740 | orphaned_slot); | 743 | orphaned_slot); |
741 | if (!orphan_dir_inode) { | 744 | if (!orphan_dir_inode) { |
742 | status = -EEXIST; | 745 | status = -EEXIST; |
743 | mlog_errno(status); | 746 | mlog_errno(status); |
744 | goto bail; | 747 | goto bail; |
745 | } | 748 | } |
746 | 749 | ||
747 | /* Lock the orphan dir. The lock will be held for the entire | 750 | /* Lock the orphan dir. The lock will be held for the entire |
748 | * delete_inode operation. We do this now to avoid races with | 751 | * delete_inode operation. We do this now to avoid races with |
749 | * recovery completion on other nodes. */ | 752 | * recovery completion on other nodes. */ |
750 | mutex_lock(&orphan_dir_inode->i_mutex); | 753 | mutex_lock(&orphan_dir_inode->i_mutex); |
751 | status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); | 754 | status = ocfs2_inode_lock(orphan_dir_inode, &orphan_dir_bh, 1); |
752 | if (status < 0) { | 755 | if (status < 0) { |
753 | mutex_unlock(&orphan_dir_inode->i_mutex); | 756 | mutex_unlock(&orphan_dir_inode->i_mutex); |
754 | 757 | ||
755 | mlog_errno(status); | 758 | mlog_errno(status); |
756 | goto bail; | 759 | goto bail; |
760 | } | ||
757 | } | 761 | } |
758 | 762 | ||
759 | /* we do this while holding the orphan dir lock because we | 763 | /* we do this while holding the orphan dir lock because we |
@@ -794,6 +798,9 @@ static int ocfs2_wipe_inode(struct inode *inode, | |||
794 | mlog_errno(status); | 798 | mlog_errno(status); |
795 | 799 | ||
796 | bail_unlock_dir: | 800 | bail_unlock_dir: |
801 | if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_SKIP_ORPHAN_DIR) | ||
802 | return status; | ||
803 | |||
797 | ocfs2_inode_unlock(orphan_dir_inode, 1); | 804 | ocfs2_inode_unlock(orphan_dir_inode, 1); |
798 | mutex_unlock(&orphan_dir_inode->i_mutex); | 805 | mutex_unlock(&orphan_dir_inode->i_mutex); |
799 | brelse(orphan_dir_bh); | 806 | brelse(orphan_dir_bh); |
@@ -889,7 +896,8 @@ static int ocfs2_query_inode_wipe(struct inode *inode, | |||
889 | 896 | ||
890 | /* Do some basic inode verification... */ | 897 | /* Do some basic inode verification... */ |
891 | di = (struct ocfs2_dinode *) di_bh->b_data; | 898 | di = (struct ocfs2_dinode *) di_bh->b_data; |
892 | if (!(di->i_flags & cpu_to_le32(OCFS2_ORPHANED_FL))) { | 899 | if (!(di->i_flags & cpu_to_le32(OCFS2_ORPHANED_FL)) && |
900 | !(oi->ip_flags & OCFS2_INODE_SKIP_ORPHAN_DIR)) { | ||
893 | /* | 901 | /* |
894 | * Inodes in the orphan dir must have ORPHANED_FL. The only | 902 | * Inodes in the orphan dir must have ORPHANED_FL. The only |
895 | * inodes that come back out of the orphan dir are reflink | 903 | * inodes that come back out of the orphan dir are reflink |
diff --git a/fs/ocfs2/inode.h b/fs/ocfs2/inode.h index ba4fe07b293c..0b28e1921a39 100644 --- a/fs/ocfs2/inode.h +++ b/fs/ocfs2/inode.h | |||
@@ -100,6 +100,8 @@ struct ocfs2_inode_info | |||
100 | #define OCFS2_INODE_MAYBE_ORPHANED 0x00000020 | 100 | #define OCFS2_INODE_MAYBE_ORPHANED 0x00000020 |
101 | /* Does someone have the file open O_DIRECT */ | 101 | /* Does someone have the file open O_DIRECT */ |
102 | #define OCFS2_INODE_OPEN_DIRECT 0x00000040 | 102 | #define OCFS2_INODE_OPEN_DIRECT 0x00000040 |
103 | /* Tell the inode wipe code it's not in orphan dir */ | ||
104 | #define OCFS2_INODE_SKIP_ORPHAN_DIR 0x00000080 | ||
103 | 105 | ||
104 | static inline struct ocfs2_inode_info *OCFS2_I(struct inode *inode) | 106 | static inline struct ocfs2_inode_info *OCFS2_I(struct inode *inode) |
105 | { | 107 | { |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index b1eb50ae4097..4cbb18f26c5f 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -408,23 +408,28 @@ static int ocfs2_mknod(struct inode *dir, | |||
408 | } | 408 | } |
409 | } | 409 | } |
410 | 410 | ||
411 | status = ocfs2_add_entry(handle, dentry, inode, | 411 | /* |
412 | OCFS2_I(inode)->ip_blkno, parent_fe_bh, | 412 | * Do this before adding the entry to the directory. We add |
413 | &lookup); | 413 | * also set d_op after success so that ->d_iput() will cleanup |
414 | if (status < 0) { | 414 | * the dentry lock even if ocfs2_add_entry() fails below. |
415 | */ | ||
416 | status = ocfs2_dentry_attach_lock(dentry, inode, | ||
417 | OCFS2_I(dir)->ip_blkno); | ||
418 | if (status) { | ||
415 | mlog_errno(status); | 419 | mlog_errno(status); |
416 | goto leave; | 420 | goto leave; |
417 | } | 421 | } |
422 | dentry->d_op = &ocfs2_dentry_ops; | ||
418 | 423 | ||
419 | status = ocfs2_dentry_attach_lock(dentry, inode, | 424 | status = ocfs2_add_entry(handle, dentry, inode, |
420 | OCFS2_I(dir)->ip_blkno); | 425 | OCFS2_I(inode)->ip_blkno, parent_fe_bh, |
421 | if (status) { | 426 | &lookup); |
427 | if (status < 0) { | ||
422 | mlog_errno(status); | 428 | mlog_errno(status); |
423 | goto leave; | 429 | goto leave; |
424 | } | 430 | } |
425 | 431 | ||
426 | insert_inode_hash(inode); | 432 | insert_inode_hash(inode); |
427 | dentry->d_op = &ocfs2_dentry_ops; | ||
428 | d_instantiate(dentry, inode); | 433 | d_instantiate(dentry, inode); |
429 | status = 0; | 434 | status = 0; |
430 | leave: | 435 | leave: |
@@ -445,11 +450,6 @@ leave: | |||
445 | 450 | ||
446 | ocfs2_free_dir_lookup_result(&lookup); | 451 | ocfs2_free_dir_lookup_result(&lookup); |
447 | 452 | ||
448 | if ((status < 0) && inode) { | ||
449 | clear_nlink(inode); | ||
450 | iput(inode); | ||
451 | } | ||
452 | |||
453 | if (inode_ac) | 453 | if (inode_ac) |
454 | ocfs2_free_alloc_context(inode_ac); | 454 | ocfs2_free_alloc_context(inode_ac); |
455 | 455 | ||
@@ -459,6 +459,17 @@ leave: | |||
459 | if (meta_ac) | 459 | if (meta_ac) |
460 | ocfs2_free_alloc_context(meta_ac); | 460 | ocfs2_free_alloc_context(meta_ac); |
461 | 461 | ||
462 | /* | ||
463 | * We should call iput after the i_mutex of the bitmap been | ||
464 | * unlocked in ocfs2_free_alloc_context, or the | ||
465 | * ocfs2_delete_inode will mutex_lock again. | ||
466 | */ | ||
467 | if ((status < 0) && inode) { | ||
468 | OCFS2_I(inode)->ip_flags |= OCFS2_INODE_SKIP_ORPHAN_DIR; | ||
469 | clear_nlink(inode); | ||
470 | iput(inode); | ||
471 | } | ||
472 | |||
462 | mlog_exit(status); | 473 | mlog_exit(status); |
463 | 474 | ||
464 | return status; | 475 | return status; |
@@ -1771,22 +1782,27 @@ static int ocfs2_symlink(struct inode *dir, | |||
1771 | } | 1782 | } |
1772 | } | 1783 | } |
1773 | 1784 | ||
1774 | status = ocfs2_add_entry(handle, dentry, inode, | 1785 | /* |
1775 | le64_to_cpu(fe->i_blkno), parent_fe_bh, | 1786 | * Do this before adding the entry to the directory. We add |
1776 | &lookup); | 1787 | * also set d_op after success so that ->d_iput() will cleanup |
1777 | if (status < 0) { | 1788 | * the dentry lock even if ocfs2_add_entry() fails below. |
1789 | */ | ||
1790 | status = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(dir)->ip_blkno); | ||
1791 | if (status) { | ||
1778 | mlog_errno(status); | 1792 | mlog_errno(status); |
1779 | goto bail; | 1793 | goto bail; |
1780 | } | 1794 | } |
1795 | dentry->d_op = &ocfs2_dentry_ops; | ||
1781 | 1796 | ||
1782 | status = ocfs2_dentry_attach_lock(dentry, inode, OCFS2_I(dir)->ip_blkno); | 1797 | status = ocfs2_add_entry(handle, dentry, inode, |
1783 | if (status) { | 1798 | le64_to_cpu(fe->i_blkno), parent_fe_bh, |
1799 | &lookup); | ||
1800 | if (status < 0) { | ||
1784 | mlog_errno(status); | 1801 | mlog_errno(status); |
1785 | goto bail; | 1802 | goto bail; |
1786 | } | 1803 | } |
1787 | 1804 | ||
1788 | insert_inode_hash(inode); | 1805 | insert_inode_hash(inode); |
1789 | dentry->d_op = &ocfs2_dentry_ops; | ||
1790 | d_instantiate(dentry, inode); | 1806 | d_instantiate(dentry, inode); |
1791 | bail: | 1807 | bail: |
1792 | if (status < 0 && did_quota) | 1808 | if (status < 0 && did_quota) |
@@ -1811,6 +1827,7 @@ bail: | |||
1811 | if (xattr_ac) | 1827 | if (xattr_ac) |
1812 | ocfs2_free_alloc_context(xattr_ac); | 1828 | ocfs2_free_alloc_context(xattr_ac); |
1813 | if ((status < 0) && inode) { | 1829 | if ((status < 0) && inode) { |
1830 | OCFS2_I(inode)->ip_flags |= OCFS2_INODE_SKIP_ORPHAN_DIR; | ||
1814 | clear_nlink(inode); | 1831 | clear_nlink(inode); |
1815 | iput(inode); | 1832 | iput(inode); |
1816 | } | 1833 | } |
@@ -1976,6 +1993,7 @@ static int ocfs2_orphan_add(struct ocfs2_super *osb, | |||
1976 | } | 1993 | } |
1977 | 1994 | ||
1978 | le32_add_cpu(&fe->i_flags, OCFS2_ORPHANED_FL); | 1995 | le32_add_cpu(&fe->i_flags, OCFS2_ORPHANED_FL); |
1996 | OCFS2_I(inode)->ip_flags &= ~OCFS2_INODE_SKIP_ORPHAN_DIR; | ||
1979 | 1997 | ||
1980 | /* Record which orphan dir our inode now resides | 1998 | /* Record which orphan dir our inode now resides |
1981 | * in. delete_inode will use this to determine which orphan | 1999 | * in. delete_inode will use this to determine which orphan |
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index bd96f6c7877e..5cbcd0f008fc 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c | |||
@@ -4083,6 +4083,9 @@ static int ocfs2_complete_reflink(struct inode *s_inode, | |||
4083 | di->i_attr = s_di->i_attr; | 4083 | di->i_attr = s_di->i_attr; |
4084 | 4084 | ||
4085 | if (preserve) { | 4085 | if (preserve) { |
4086 | t_inode->i_uid = s_inode->i_uid; | ||
4087 | t_inode->i_gid = s_inode->i_gid; | ||
4088 | t_inode->i_mode = s_inode->i_mode; | ||
4086 | di->i_uid = s_di->i_uid; | 4089 | di->i_uid = s_di->i_uid; |
4087 | di->i_gid = s_di->i_gid; | 4090 | di->i_gid = s_di->i_gid; |
4088 | di->i_mode = s_di->i_mode; | 4091 | di->i_mode = s_di->i_mode; |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 0a5da639b327..6ed1d59bfb1e 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -355,6 +355,8 @@ struct i2c_adapter { | |||
355 | int nr; | 355 | int nr; |
356 | char name[48]; | 356 | char name[48]; |
357 | struct completion dev_released; | 357 | struct completion dev_released; |
358 | |||
359 | struct list_head userspace_clients; | ||
358 | }; | 360 | }; |
359 | #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) | 361 | #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) |
360 | 362 | ||
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index ace31fbac513..6be4a0f9137c 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -548,6 +548,7 @@ struct pmu { | |||
548 | * enum perf_event_active_state - the states of a event | 548 | * enum perf_event_active_state - the states of a event |
549 | */ | 549 | */ |
550 | enum perf_event_active_state { | 550 | enum perf_event_active_state { |
551 | PERF_EVENT_STATE_FREE = -3, | ||
551 | PERF_EVENT_STATE_ERROR = -2, | 552 | PERF_EVENT_STATE_ERROR = -2, |
552 | PERF_EVENT_STATE_OFF = -1, | 553 | PERF_EVENT_STATE_OFF = -1, |
553 | PERF_EVENT_STATE_INACTIVE = 0, | 554 | PERF_EVENT_STATE_INACTIVE = 0, |
diff --git a/include/linux/usb.h b/include/linux/usb.h index ce1323c4e47c..739f1fd1cc15 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -1085,7 +1085,7 @@ typedef void (*usb_complete_t)(struct urb *); | |||
1085 | * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags, | 1085 | * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags, |
1086 | * which tell the host controller driver that no such mapping is needed since | 1086 | * which tell the host controller driver that no such mapping is needed since |
1087 | * the device driver is DMA-aware. For example, a device driver might | 1087 | * the device driver is DMA-aware. For example, a device driver might |
1088 | * allocate a DMA buffer with usb_buffer_alloc() or call usb_buffer_map(). | 1088 | * allocate a DMA buffer with usb_alloc_coherent() or call usb_buffer_map(). |
1089 | * When these transfer flags are provided, host controller drivers will | 1089 | * When these transfer flags are provided, host controller drivers will |
1090 | * attempt to use the dma addresses found in the transfer_dma and/or | 1090 | * attempt to use the dma addresses found in the transfer_dma and/or |
1091 | * setup_dma fields rather than determining a dma address themselves. | 1091 | * setup_dma fields rather than determining a dma address themselves. |
@@ -1366,11 +1366,23 @@ static inline int usb_urb_dir_out(struct urb *urb) | |||
1366 | return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT; | 1366 | return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT; |
1367 | } | 1367 | } |
1368 | 1368 | ||
1369 | void *usb_buffer_alloc(struct usb_device *dev, size_t size, | 1369 | void *usb_alloc_coherent(struct usb_device *dev, size_t size, |
1370 | gfp_t mem_flags, dma_addr_t *dma); | 1370 | gfp_t mem_flags, dma_addr_t *dma); |
1371 | void usb_buffer_free(struct usb_device *dev, size_t size, | 1371 | void usb_free_coherent(struct usb_device *dev, size_t size, |
1372 | void *addr, dma_addr_t dma); | 1372 | void *addr, dma_addr_t dma); |
1373 | 1373 | ||
1374 | /* Compatible macros while we switch over */ | ||
1375 | static inline void *usb_buffer_alloc(struct usb_device *dev, size_t size, | ||
1376 | gfp_t mem_flags, dma_addr_t *dma) | ||
1377 | { | ||
1378 | return usb_alloc_coherent(dev, size, mem_flags, dma); | ||
1379 | } | ||
1380 | static inline void usb_buffer_free(struct usb_device *dev, size_t size, | ||
1381 | void *addr, dma_addr_t dma) | ||
1382 | { | ||
1383 | return usb_free_coherent(dev, size, addr, dma); | ||
1384 | } | ||
1385 | |||
1374 | #if 0 | 1386 | #if 0 |
1375 | struct urb *usb_buffer_map(struct urb *urb); | 1387 | struct urb *usb_buffer_map(struct urb *urb); |
1376 | void usb_buffer_dmasync(struct urb *urb); | 1388 | void usb_buffer_dmasync(struct urb *urb); |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index ff3017744711..597f8e27aaf6 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -778,6 +778,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len, | |||
778 | struct iovec *data); | 778 | struct iovec *data); |
779 | void sctp_chunk_free(struct sctp_chunk *); | 779 | void sctp_chunk_free(struct sctp_chunk *); |
780 | void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); | 780 | void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); |
781 | void *sctp_addto_chunk_fixed(struct sctp_chunk *, int len, const void *data); | ||
781 | struct sctp_chunk *sctp_chunkify(struct sk_buff *, | 782 | struct sctp_chunk *sctp_chunkify(struct sk_buff *, |
782 | const struct sctp_association *, | 783 | const struct sctp_association *, |
783 | struct sock *); | 784 | struct sock *); |
diff --git a/include/net/sock.h b/include/net/sock.h index b4603cd54fcd..1ad6435f252e 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -74,7 +74,7 @@ | |||
74 | printk(KERN_DEBUG msg); } while (0) | 74 | printk(KERN_DEBUG msg); } while (0) |
75 | #else | 75 | #else |
76 | /* Validate arguments and do nothing */ | 76 | /* Validate arguments and do nothing */ |
77 | static void inline int __attribute__ ((format (printf, 2, 3))) | 77 | static inline void __attribute__ ((format (printf, 2, 3))) |
78 | SOCK_DEBUG(struct sock *sk, const char *msg, ...) | 78 | SOCK_DEBUG(struct sock *sk, const char *msg, ...) |
79 | { | 79 | { |
80 | } | 80 | } |
diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c index da5e13975531..e5c0244962b0 100644 --- a/kernel/cgroup_freezer.c +++ b/kernel/cgroup_freezer.c | |||
@@ -205,9 +205,12 @@ static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task) | |||
205 | * No lock is needed, since the task isn't on tasklist yet, | 205 | * No lock is needed, since the task isn't on tasklist yet, |
206 | * so it can't be moved to another cgroup, which means the | 206 | * so it can't be moved to another cgroup, which means the |
207 | * freezer won't be removed and will be valid during this | 207 | * freezer won't be removed and will be valid during this |
208 | * function call. | 208 | * function call. Nevertheless, apply RCU read-side critical |
209 | * section to suppress RCU lockdep false positives. | ||
209 | */ | 210 | */ |
211 | rcu_read_lock(); | ||
210 | freezer = task_freezer(task); | 212 | freezer = task_freezer(task); |
213 | rcu_read_unlock(); | ||
211 | 214 | ||
212 | /* | 215 | /* |
213 | * The root cgroup is non-freezable, so we can skip the | 216 | * The root cgroup is non-freezable, so we can skip the |
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 9dbe8cdaf145..49d8be5a45e3 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -342,6 +342,9 @@ list_del_event(struct perf_event *event, struct perf_event_context *ctx) | |||
342 | if (event->state > PERF_EVENT_STATE_OFF) | 342 | if (event->state > PERF_EVENT_STATE_OFF) |
343 | event->state = PERF_EVENT_STATE_OFF; | 343 | event->state = PERF_EVENT_STATE_OFF; |
344 | 344 | ||
345 | if (event->state > PERF_EVENT_STATE_FREE) | ||
346 | return; | ||
347 | |||
345 | /* | 348 | /* |
346 | * If this was a group event with sibling events then | 349 | * If this was a group event with sibling events then |
347 | * upgrade the siblings to singleton events by adding them | 350 | * upgrade the siblings to singleton events by adding them |
@@ -1861,6 +1864,8 @@ int perf_event_release_kernel(struct perf_event *event) | |||
1861 | { | 1864 | { |
1862 | struct perf_event_context *ctx = event->ctx; | 1865 | struct perf_event_context *ctx = event->ctx; |
1863 | 1866 | ||
1867 | event->state = PERF_EVENT_STATE_FREE; | ||
1868 | |||
1864 | WARN_ON_ONCE(ctx->parent_ctx); | 1869 | WARN_ON_ONCE(ctx->parent_ctx); |
1865 | mutex_lock(&ctx->mutex); | 1870 | mutex_lock(&ctx->mutex); |
1866 | perf_event_remove_from_context(event); | 1871 | perf_event_remove_from_context(event); |
@@ -5021,7 +5026,7 @@ err_fput_free_put_context: | |||
5021 | 5026 | ||
5022 | err_free_put_context: | 5027 | err_free_put_context: |
5023 | if (err < 0) | 5028 | if (err < 0) |
5024 | kfree(event); | 5029 | free_event(event); |
5025 | 5030 | ||
5026 | err_put_context: | 5031 | err_put_context: |
5027 | if (err < 0) | 5032 | if (err < 0) |
diff --git a/kernel/sched.c b/kernel/sched.c index b0bbadc24955..b11b80a3eed3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -323,6 +323,15 @@ static inline struct task_group *task_group(struct task_struct *p) | |||
323 | /* Change a task's cfs_rq and parent entity if it moves across CPUs/groups */ | 323 | /* Change a task's cfs_rq and parent entity if it moves across CPUs/groups */ |
324 | static inline void set_task_rq(struct task_struct *p, unsigned int cpu) | 324 | static inline void set_task_rq(struct task_struct *p, unsigned int cpu) |
325 | { | 325 | { |
326 | /* | ||
327 | * Strictly speaking this rcu_read_lock() is not needed since the | ||
328 | * task_group is tied to the cgroup, which in turn can never go away | ||
329 | * as long as there are tasks attached to it. | ||
330 | * | ||
331 | * However since task_group() uses task_subsys_state() which is an | ||
332 | * rcu_dereference() user, this quiets CONFIG_PROVE_RCU. | ||
333 | */ | ||
334 | rcu_read_lock(); | ||
326 | #ifdef CONFIG_FAIR_GROUP_SCHED | 335 | #ifdef CONFIG_FAIR_GROUP_SCHED |
327 | p->se.cfs_rq = task_group(p)->cfs_rq[cpu]; | 336 | p->se.cfs_rq = task_group(p)->cfs_rq[cpu]; |
328 | p->se.parent = task_group(p)->se[cpu]; | 337 | p->se.parent = task_group(p)->se[cpu]; |
@@ -332,6 +341,7 @@ static inline void set_task_rq(struct task_struct *p, unsigned int cpu) | |||
332 | p->rt.rt_rq = task_group(p)->rt_rq[cpu]; | 341 | p->rt.rt_rq = task_group(p)->rt_rq[cpu]; |
333 | p->rt.parent = task_group(p)->rt_se[cpu]; | 342 | p->rt.parent = task_group(p)->rt_se[cpu]; |
334 | #endif | 343 | #endif |
344 | rcu_read_unlock(); | ||
335 | } | 345 | } |
336 | 346 | ||
337 | #else | 347 | #else |
@@ -3737,7 +3747,7 @@ int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner) | |||
3737 | * the mutex owner just released it and exited. | 3747 | * the mutex owner just released it and exited. |
3738 | */ | 3748 | */ |
3739 | if (probe_kernel_address(&owner->cpu, cpu)) | 3749 | if (probe_kernel_address(&owner->cpu, cpu)) |
3740 | goto out; | 3750 | return 0; |
3741 | #else | 3751 | #else |
3742 | cpu = owner->cpu; | 3752 | cpu = owner->cpu; |
3743 | #endif | 3753 | #endif |
@@ -3747,14 +3757,14 @@ int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner) | |||
3747 | * the cpu field may no longer be valid. | 3757 | * the cpu field may no longer be valid. |
3748 | */ | 3758 | */ |
3749 | if (cpu >= nr_cpumask_bits) | 3759 | if (cpu >= nr_cpumask_bits) |
3750 | goto out; | 3760 | return 0; |
3751 | 3761 | ||
3752 | /* | 3762 | /* |
3753 | * We need to validate that we can do a | 3763 | * We need to validate that we can do a |
3754 | * get_cpu() and that we have the percpu area. | 3764 | * get_cpu() and that we have the percpu area. |
3755 | */ | 3765 | */ |
3756 | if (!cpu_online(cpu)) | 3766 | if (!cpu_online(cpu)) |
3757 | goto out; | 3767 | return 0; |
3758 | 3768 | ||
3759 | rq = cpu_rq(cpu); | 3769 | rq = cpu_rq(cpu); |
3760 | 3770 | ||
@@ -3773,7 +3783,7 @@ int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner) | |||
3773 | 3783 | ||
3774 | cpu_relax(); | 3784 | cpu_relax(); |
3775 | } | 3785 | } |
3776 | out: | 3786 | |
3777 | return 1; | 3787 | return 1; |
3778 | } | 3788 | } |
3779 | #endif | 3789 | #endif |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index dee48658805c..5bfb213984b2 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -774,7 +774,7 @@ void flush_delayed_work(struct delayed_work *dwork) | |||
774 | { | 774 | { |
775 | if (del_timer_sync(&dwork->timer)) { | 775 | if (del_timer_sync(&dwork->timer)) { |
776 | struct cpu_workqueue_struct *cwq; | 776 | struct cpu_workqueue_struct *cwq; |
777 | cwq = wq_per_cpu(keventd_wq, get_cpu()); | 777 | cwq = wq_per_cpu(get_wq_data(&dwork->work)->wq, get_cpu()); |
778 | __queue_work(cwq, &dwork->work); | 778 | __queue_work(cwq, &dwork->work); |
779 | put_cpu(); | 779 | put_cpu(); |
780 | } | 780 | } |
@@ -2153,7 +2153,7 @@ static int init_kmem_cache_nodes(struct kmem_cache *s, gfp_t gfpflags) | |||
2153 | int local_node; | 2153 | int local_node; |
2154 | 2154 | ||
2155 | if (slab_state >= UP && (s < kmalloc_caches || | 2155 | if (slab_state >= UP && (s < kmalloc_caches || |
2156 | s > kmalloc_caches + KMALLOC_CACHES)) | 2156 | s >= kmalloc_caches + KMALLOC_CACHES)) |
2157 | local_node = page_to_nid(virt_to_page(s)); | 2157 | local_node = page_to_nid(virt_to_page(s)); |
2158 | else | 2158 | else |
2159 | local_node = 0; | 2159 | local_node = 0; |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 3192aa02ba5d..3f9e86b15e0d 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -200,7 +200,7 @@ lookup_protocol: | |||
200 | 200 | ||
201 | inet_sk(sk)->pinet6 = np = inet6_sk_generic(sk); | 201 | inet_sk(sk)->pinet6 = np = inet6_sk_generic(sk); |
202 | np->hop_limit = -1; | 202 | np->hop_limit = -1; |
203 | np->mcast_hops = -1; | 203 | np->mcast_hops = IPV6_DEFAULT_MCASTHOPS; |
204 | np->mc_loop = 1; | 204 | np->mc_loop = 1; |
205 | np->pmtudisc = IPV6_PMTUDISC_WANT; | 205 | np->pmtudisc = IPV6_PMTUDISC_WANT; |
206 | np->ipv6only = net->ipv6.sysctl.bindv6only; | 206 | np->ipv6only = net->ipv6.sysctl.bindv6only; |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 0fd5b4c88358..30c1767186b8 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -108,7 +108,7 @@ static const struct sctp_paramhdr prsctp_param = { | |||
108 | cpu_to_be16(sizeof(struct sctp_paramhdr)), | 108 | cpu_to_be16(sizeof(struct sctp_paramhdr)), |
109 | }; | 109 | }; |
110 | 110 | ||
111 | /* A helper to initialize to initialize an op error inside a | 111 | /* A helper to initialize an op error inside a |
112 | * provided chunk, as most cause codes will be embedded inside an | 112 | * provided chunk, as most cause codes will be embedded inside an |
113 | * abort chunk. | 113 | * abort chunk. |
114 | */ | 114 | */ |
@@ -125,6 +125,29 @@ void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code, | |||
125 | chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err); | 125 | chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err); |
126 | } | 126 | } |
127 | 127 | ||
128 | /* A helper to initialize an op error inside a | ||
129 | * provided chunk, as most cause codes will be embedded inside an | ||
130 | * abort chunk. Differs from sctp_init_cause in that it won't oops | ||
131 | * if there isn't enough space in the op error chunk | ||
132 | */ | ||
133 | int sctp_init_cause_fixed(struct sctp_chunk *chunk, __be16 cause_code, | ||
134 | size_t paylen) | ||
135 | { | ||
136 | sctp_errhdr_t err; | ||
137 | __u16 len; | ||
138 | |||
139 | /* Cause code constants are now defined in network order. */ | ||
140 | err.cause = cause_code; | ||
141 | len = sizeof(sctp_errhdr_t) + paylen; | ||
142 | err.length = htons(len); | ||
143 | |||
144 | if (skb_tailroom(chunk->skb) > len) | ||
145 | return -ENOSPC; | ||
146 | chunk->subh.err_hdr = sctp_addto_chunk_fixed(chunk, | ||
147 | sizeof(sctp_errhdr_t), | ||
148 | &err); | ||
149 | return 0; | ||
150 | } | ||
128 | /* 3.3.2 Initiation (INIT) (1) | 151 | /* 3.3.2 Initiation (INIT) (1) |
129 | * | 152 | * |
130 | * This chunk is used to initiate a SCTP association between two | 153 | * This chunk is used to initiate a SCTP association between two |
@@ -1132,6 +1155,24 @@ nodata: | |||
1132 | return retval; | 1155 | return retval; |
1133 | } | 1156 | } |
1134 | 1157 | ||
1158 | /* Create an Operation Error chunk of a fixed size, | ||
1159 | * specifically, max(asoc->pathmtu, SCTP_DEFAULT_MAXSEGMENT) | ||
1160 | * This is a helper function to allocate an error chunk for | ||
1161 | * for those invalid parameter codes in which we may not want | ||
1162 | * to report all the errors, if the incomming chunk is large | ||
1163 | */ | ||
1164 | static inline struct sctp_chunk *sctp_make_op_error_fixed( | ||
1165 | const struct sctp_association *asoc, | ||
1166 | const struct sctp_chunk *chunk) | ||
1167 | { | ||
1168 | size_t size = asoc ? asoc->pathmtu : 0; | ||
1169 | |||
1170 | if (!size) | ||
1171 | size = SCTP_DEFAULT_MAXSEGMENT; | ||
1172 | |||
1173 | return sctp_make_op_error_space(asoc, chunk, size); | ||
1174 | } | ||
1175 | |||
1135 | /* Create an Operation Error chunk. */ | 1176 | /* Create an Operation Error chunk. */ |
1136 | struct sctp_chunk *sctp_make_op_error(const struct sctp_association *asoc, | 1177 | struct sctp_chunk *sctp_make_op_error(const struct sctp_association *asoc, |
1137 | const struct sctp_chunk *chunk, | 1178 | const struct sctp_chunk *chunk, |
@@ -1374,6 +1415,18 @@ void *sctp_addto_chunk(struct sctp_chunk *chunk, int len, const void *data) | |||
1374 | return target; | 1415 | return target; |
1375 | } | 1416 | } |
1376 | 1417 | ||
1418 | /* Append bytes to the end of a chunk. Returns NULL if there isn't sufficient | ||
1419 | * space in the chunk | ||
1420 | */ | ||
1421 | void *sctp_addto_chunk_fixed(struct sctp_chunk *chunk, | ||
1422 | int len, const void *data) | ||
1423 | { | ||
1424 | if (skb_tailroom(chunk->skb) > len) | ||
1425 | return sctp_addto_chunk(chunk, len, data); | ||
1426 | else | ||
1427 | return NULL; | ||
1428 | } | ||
1429 | |||
1377 | /* Append bytes from user space to the end of a chunk. Will panic if | 1430 | /* Append bytes from user space to the end of a chunk. Will panic if |
1378 | * chunk is not big enough. | 1431 | * chunk is not big enough. |
1379 | * Returns a kernel err value. | 1432 | * Returns a kernel err value. |
@@ -1977,13 +2030,12 @@ static sctp_ierror_t sctp_process_unk_param(const struct sctp_association *asoc, | |||
1977 | * returning multiple unknown parameters. | 2030 | * returning multiple unknown parameters. |
1978 | */ | 2031 | */ |
1979 | if (NULL == *errp) | 2032 | if (NULL == *errp) |
1980 | *errp = sctp_make_op_error_space(asoc, chunk, | 2033 | *errp = sctp_make_op_error_fixed(asoc, chunk); |
1981 | ntohs(chunk->chunk_hdr->length)); | ||
1982 | 2034 | ||
1983 | if (*errp) { | 2035 | if (*errp) { |
1984 | sctp_init_cause(*errp, SCTP_ERROR_UNKNOWN_PARAM, | 2036 | sctp_init_cause_fixed(*errp, SCTP_ERROR_UNKNOWN_PARAM, |
1985 | WORD_ROUND(ntohs(param.p->length))); | 2037 | WORD_ROUND(ntohs(param.p->length))); |
1986 | sctp_addto_chunk(*errp, | 2038 | sctp_addto_chunk_fixed(*errp, |
1987 | WORD_ROUND(ntohs(param.p->length)), | 2039 | WORD_ROUND(ntohs(param.p->length)), |
1988 | param.v); | 2040 | param.v); |
1989 | } else { | 2041 | } else { |
diff --git a/security/keys/gc.c b/security/keys/gc.c index 19902319d097..a46e825cbf02 100644 --- a/security/keys/gc.c +++ b/security/keys/gc.c | |||
@@ -77,10 +77,10 @@ static bool key_gc_keyring(struct key *keyring, time_t limit) | |||
77 | goto dont_gc; | 77 | goto dont_gc; |
78 | 78 | ||
79 | /* scan the keyring looking for dead keys */ | 79 | /* scan the keyring looking for dead keys */ |
80 | klist = rcu_dereference_check(keyring->payload.subscriptions, | 80 | rcu_read_lock(); |
81 | lockdep_is_held(&key_serial_lock)); | 81 | klist = rcu_dereference(keyring->payload.subscriptions); |
82 | if (!klist) | 82 | if (!klist) |
83 | goto dont_gc; | 83 | goto unlock_dont_gc; |
84 | 84 | ||
85 | for (loop = klist->nkeys - 1; loop >= 0; loop--) { | 85 | for (loop = klist->nkeys - 1; loop >= 0; loop--) { |
86 | key = klist->keys[loop]; | 86 | key = klist->keys[loop]; |
@@ -89,11 +89,14 @@ static bool key_gc_keyring(struct key *keyring, time_t limit) | |||
89 | goto do_gc; | 89 | goto do_gc; |
90 | } | 90 | } |
91 | 91 | ||
92 | unlock_dont_gc: | ||
93 | rcu_read_unlock(); | ||
92 | dont_gc: | 94 | dont_gc: |
93 | kleave(" = false"); | 95 | kleave(" = false"); |
94 | return false; | 96 | return false; |
95 | 97 | ||
96 | do_gc: | 98 | do_gc: |
99 | rcu_read_unlock(); | ||
97 | key_gc_cursor = keyring->serial; | 100 | key_gc_cursor = keyring->serial; |
98 | key_get(keyring); | 101 | key_get(keyring); |
99 | spin_unlock(&key_serial_lock); | 102 | spin_unlock(&key_serial_lock); |
diff --git a/security/keys/keyring.c b/security/keys/keyring.c index dd7cd0f8e13c..1e4b0037935c 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c | |||
@@ -20,6 +20,11 @@ | |||
20 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
21 | #include "internal.h" | 21 | #include "internal.h" |
22 | 22 | ||
23 | #define rcu_dereference_locked_keyring(keyring) \ | ||
24 | (rcu_dereference_protected( \ | ||
25 | (keyring)->payload.subscriptions, \ | ||
26 | rwsem_is_locked((struct rw_semaphore *)&(keyring)->sem))) | ||
27 | |||
23 | /* | 28 | /* |
24 | * when plumbing the depths of the key tree, this sets a hard limit set on how | 29 | * when plumbing the depths of the key tree, this sets a hard limit set on how |
25 | * deep we're willing to go | 30 | * deep we're willing to go |
@@ -201,8 +206,7 @@ static long keyring_read(const struct key *keyring, | |||
201 | int loop, ret; | 206 | int loop, ret; |
202 | 207 | ||
203 | ret = 0; | 208 | ret = 0; |
204 | klist = keyring->payload.subscriptions; | 209 | klist = rcu_dereference_locked_keyring(keyring); |
205 | |||
206 | if (klist) { | 210 | if (klist) { |
207 | /* calculate how much data we could return */ | 211 | /* calculate how much data we could return */ |
208 | qty = klist->nkeys * sizeof(key_serial_t); | 212 | qty = klist->nkeys * sizeof(key_serial_t); |
@@ -526,9 +530,8 @@ struct key *find_keyring_by_name(const char *name, bool skip_perm_check) | |||
526 | struct key *keyring; | 530 | struct key *keyring; |
527 | int bucket; | 531 | int bucket; |
528 | 532 | ||
529 | keyring = ERR_PTR(-EINVAL); | ||
530 | if (!name) | 533 | if (!name) |
531 | goto error; | 534 | return ERR_PTR(-EINVAL); |
532 | 535 | ||
533 | bucket = keyring_hash(name); | 536 | bucket = keyring_hash(name); |
534 | 537 | ||
@@ -555,17 +558,18 @@ struct key *find_keyring_by_name(const char *name, bool skip_perm_check) | |||
555 | KEY_SEARCH) < 0) | 558 | KEY_SEARCH) < 0) |
556 | continue; | 559 | continue; |
557 | 560 | ||
558 | /* we've got a match */ | 561 | /* we've got a match but we might end up racing with |
559 | atomic_inc(&keyring->usage); | 562 | * key_cleanup() if the keyring is currently 'dead' |
560 | read_unlock(&keyring_name_lock); | 563 | * (ie. it has a zero usage count) */ |
561 | goto error; | 564 | if (!atomic_inc_not_zero(&keyring->usage)) |
565 | continue; | ||
566 | goto out; | ||
562 | } | 567 | } |
563 | } | 568 | } |
564 | 569 | ||
565 | read_unlock(&keyring_name_lock); | ||
566 | keyring = ERR_PTR(-ENOKEY); | 570 | keyring = ERR_PTR(-ENOKEY); |
567 | 571 | out: | |
568 | error: | 572 | read_unlock(&keyring_name_lock); |
569 | return keyring; | 573 | return keyring; |
570 | 574 | ||
571 | } /* end find_keyring_by_name() */ | 575 | } /* end find_keyring_by_name() */ |
@@ -720,8 +724,7 @@ int __key_link(struct key *keyring, struct key *key) | |||
720 | } | 724 | } |
721 | 725 | ||
722 | /* see if there's a matching key we can displace */ | 726 | /* see if there's a matching key we can displace */ |
723 | klist = keyring->payload.subscriptions; | 727 | klist = rcu_dereference_locked_keyring(keyring); |
724 | |||
725 | if (klist && klist->nkeys > 0) { | 728 | if (klist && klist->nkeys > 0) { |
726 | struct key_type *type = key->type; | 729 | struct key_type *type = key->type; |
727 | 730 | ||
@@ -765,8 +768,6 @@ int __key_link(struct key *keyring, struct key *key) | |||
765 | if (ret < 0) | 768 | if (ret < 0) |
766 | goto error2; | 769 | goto error2; |
767 | 770 | ||
768 | klist = keyring->payload.subscriptions; | ||
769 | |||
770 | if (klist && klist->nkeys < klist->maxkeys) { | 771 | if (klist && klist->nkeys < klist->maxkeys) { |
771 | /* there's sufficient slack space to add directly */ | 772 | /* there's sufficient slack space to add directly */ |
772 | atomic_inc(&key->usage); | 773 | atomic_inc(&key->usage); |
@@ -868,7 +869,7 @@ int key_unlink(struct key *keyring, struct key *key) | |||
868 | 869 | ||
869 | down_write(&keyring->sem); | 870 | down_write(&keyring->sem); |
870 | 871 | ||
871 | klist = keyring->payload.subscriptions; | 872 | klist = rcu_dereference_locked_keyring(keyring); |
872 | if (klist) { | 873 | if (klist) { |
873 | /* search the keyring for the key */ | 874 | /* search the keyring for the key */ |
874 | for (loop = 0; loop < klist->nkeys; loop++) | 875 | for (loop = 0; loop < klist->nkeys; loop++) |
@@ -959,7 +960,7 @@ int keyring_clear(struct key *keyring) | |||
959 | /* detach the pointer block with the locks held */ | 960 | /* detach the pointer block with the locks held */ |
960 | down_write(&keyring->sem); | 961 | down_write(&keyring->sem); |
961 | 962 | ||
962 | klist = keyring->payload.subscriptions; | 963 | klist = rcu_dereference_locked_keyring(keyring); |
963 | if (klist) { | 964 | if (klist) { |
964 | /* adjust the quota */ | 965 | /* adjust the quota */ |
965 | key_payload_reserve(keyring, | 966 | key_payload_reserve(keyring, |
@@ -991,7 +992,9 @@ EXPORT_SYMBOL(keyring_clear); | |||
991 | */ | 992 | */ |
992 | static void keyring_revoke(struct key *keyring) | 993 | static void keyring_revoke(struct key *keyring) |
993 | { | 994 | { |
994 | struct keyring_list *klist = keyring->payload.subscriptions; | 995 | struct keyring_list *klist; |
996 | |||
997 | klist = rcu_dereference_locked_keyring(keyring); | ||
995 | 998 | ||
996 | /* adjust the quota */ | 999 | /* adjust the quota */ |
997 | key_payload_reserve(keyring, 0); | 1000 | key_payload_reserve(keyring, 0); |
@@ -1025,7 +1028,7 @@ void keyring_gc(struct key *keyring, time_t limit) | |||
1025 | 1028 | ||
1026 | down_write(&keyring->sem); | 1029 | down_write(&keyring->sem); |
1027 | 1030 | ||
1028 | klist = keyring->payload.subscriptions; | 1031 | klist = rcu_dereference_locked_keyring(keyring); |
1029 | if (!klist) | 1032 | if (!klist) |
1030 | goto no_klist; | 1033 | goto no_klist; |
1031 | 1034 | ||
diff --git a/security/keys/request_key.c b/security/keys/request_key.c index d737cea5347c..d8c1a6a0fb08 100644 --- a/security/keys/request_key.c +++ b/security/keys/request_key.c | |||
@@ -94,7 +94,7 @@ static int call_sbin_request_key(struct key_construction *cons, | |||
94 | } | 94 | } |
95 | 95 | ||
96 | /* attach the auth key to the session keyring */ | 96 | /* attach the auth key to the session keyring */ |
97 | ret = __key_link(keyring, authkey); | 97 | ret = key_link(keyring, authkey); |
98 | if (ret < 0) | 98 | if (ret < 0) |
99 | goto error_link; | 99 | goto error_link; |
100 | 100 | ||
diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c index 7c687d568221..e9aa07929656 100644 --- a/security/keys/user_defined.c +++ b/security/keys/user_defined.c | |||
@@ -199,7 +199,8 @@ long user_read(const struct key *key, char __user *buffer, size_t buflen) | |||
199 | struct user_key_payload *upayload; | 199 | struct user_key_payload *upayload; |
200 | long ret; | 200 | long ret; |
201 | 201 | ||
202 | upayload = rcu_dereference(key->payload.data); | 202 | upayload = rcu_dereference_protected( |
203 | key->payload.data, rwsem_is_locked(&((struct key *)key)->sem)); | ||
203 | ret = upayload->datalen; | 204 | ret = upayload->datalen; |
204 | 205 | ||
205 | /* we can return the data as is */ | 206 | /* we can return the data as is */ |
diff --git a/sound/core/timer.c b/sound/core/timer.c index 73943651caed..5040c7b862fe 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c | |||
@@ -1160,6 +1160,7 @@ static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, | |||
1160 | { | 1160 | { |
1161 | struct snd_timer_user *tu = timeri->callback_data; | 1161 | struct snd_timer_user *tu = timeri->callback_data; |
1162 | struct snd_timer_tread r1; | 1162 | struct snd_timer_tread r1; |
1163 | unsigned long flags; | ||
1163 | 1164 | ||
1164 | if (event >= SNDRV_TIMER_EVENT_START && | 1165 | if (event >= SNDRV_TIMER_EVENT_START && |
1165 | event <= SNDRV_TIMER_EVENT_PAUSE) | 1166 | event <= SNDRV_TIMER_EVENT_PAUSE) |
@@ -1169,9 +1170,9 @@ static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, | |||
1169 | r1.event = event; | 1170 | r1.event = event; |
1170 | r1.tstamp = *tstamp; | 1171 | r1.tstamp = *tstamp; |
1171 | r1.val = resolution; | 1172 | r1.val = resolution; |
1172 | spin_lock(&tu->qlock); | 1173 | spin_lock_irqsave(&tu->qlock, flags); |
1173 | snd_timer_user_append_to_tqueue(tu, &r1); | 1174 | snd_timer_user_append_to_tqueue(tu, &r1); |
1174 | spin_unlock(&tu->qlock); | 1175 | spin_unlock_irqrestore(&tu->qlock, flags); |
1175 | kill_fasync(&tu->fasync, SIGIO, POLL_IN); | 1176 | kill_fasync(&tu->fasync, SIGIO, POLL_IN); |
1176 | wake_up(&tu->qchange_sleep); | 1177 | wake_up(&tu->qchange_sleep); |
1177 | } | 1178 | } |
diff --git a/sound/isa/sb/es968.c b/sound/isa/sb/es968.c index cafc3a7316a8..ff18286fef9d 100644 --- a/sound/isa/sb/es968.c +++ b/sound/isa/sb/es968.c | |||
@@ -93,7 +93,7 @@ static int __devinit snd_card_es968_pnp(int dev, struct snd_card_es968 *acard, | |||
93 | return err; | 93 | return err; |
94 | } | 94 | } |
95 | port[dev] = pnp_port_start(pdev, 0); | 95 | port[dev] = pnp_port_start(pdev, 0); |
96 | dma8[dev] = pnp_dma(pdev, 1); | 96 | dma8[dev] = pnp_dma(pdev, 0); |
97 | irq[dev] = pnp_irq(pdev, 0); | 97 | irq[dev] = pnp_irq(pdev, 0); |
98 | 98 | ||
99 | return 0; | 99 | return 0; |
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 7de782a5b8f4..350ee8ac4153 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -766,7 +766,7 @@ static int build_input(struct hda_codec *codec) | |||
766 | for (n = 0; n < AUTO_PIN_LAST; n++) { | 766 | for (n = 0; n < AUTO_PIN_LAST; n++) { |
767 | if (!spec->adc_nid[n]) | 767 | if (!spec->adc_nid[n]) |
768 | continue; | 768 | continue; |
769 | err = snd_hda_add_nid(codec, kctl, 0, spec->adc_nid[i]); | 769 | err = snd_hda_add_nid(codec, kctl, 0, spec->adc_nid[n]); |
770 | if (err < 0) | 770 | if (err < 0) |
771 | return err; | 771 | return err; |
772 | } | 772 | } |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 61682e1d09da..56e52071c769 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -1195,9 +1195,10 @@ static int patch_cxt5045(struct hda_codec *codec) | |||
1195 | 1195 | ||
1196 | switch (codec->subsystem_id >> 16) { | 1196 | switch (codec->subsystem_id >> 16) { |
1197 | case 0x103c: | 1197 | case 0x103c: |
1198 | case 0x1631: | ||
1198 | case 0x1734: | 1199 | case 0x1734: |
1199 | /* HP & Fujitsu-Siemens laptops have really bad sound over 0dB | 1200 | /* HP, Packard Bell, & Fujitsu-Siemens laptops have really bad |
1200 | * on NID 0x17. Fix max PCM level to 0 dB | 1201 | * sound over 0dB on NID 0x17. Fix max PCM level to 0 dB |
1201 | * (originally it has 0x2b steps with 0dB offset 0x14) | 1202 | * (originally it has 0x2b steps with 0dB offset 0x14) |
1202 | */ | 1203 | */ |
1203 | snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT, | 1204 | snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT, |
@@ -2842,6 +2843,9 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = { | |||
2842 | CXT5066_DELL_LAPTOP), | 2843 | CXT5066_DELL_LAPTOP), |
2843 | SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5), | 2844 | SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5), |
2844 | SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTO), | 2845 | SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTO), |
2846 | SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), | ||
2847 | SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5), | ||
2848 | SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5), | ||
2845 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "ideapad", CXT5066_IDEAPAD), | 2849 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "ideapad", CXT5066_IDEAPAD), |
2846 | {} | 2850 | {} |
2847 | }; | 2851 | }; |
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c index 612e18b4bf4e..0ec20b68e8cb 100644 --- a/sound/soc/txx9/txx9aclc-ac97.c +++ b/sound/soc/txx9/txx9aclc-ac97.c | |||
@@ -254,3 +254,4 @@ module_exit(txx9aclc_ac97_exit); | |||
254 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); | 254 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); |
255 | MODULE_DESCRIPTION("TXx9 ACLC AC97 driver"); | 255 | MODULE_DESCRIPTION("TXx9 ACLC AC97 driver"); |
256 | MODULE_LICENSE("GPL"); | 256 | MODULE_LICENSE("GPL"); |
257 | MODULE_ALIAS("platform:txx9aclc-ac97"); | ||
diff --git a/sound/soc/txx9/txx9aclc-generic.c b/sound/soc/txx9/txx9aclc-generic.c index 3175de9a92cb..95b17f731aec 100644 --- a/sound/soc/txx9/txx9aclc-generic.c +++ b/sound/soc/txx9/txx9aclc-generic.c | |||
@@ -96,3 +96,4 @@ module_exit(txx9aclc_generic_exit); | |||
96 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); | 96 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); |
97 | MODULE_DESCRIPTION("Generic TXx9 ACLC ALSA SoC audio driver"); | 97 | MODULE_DESCRIPTION("Generic TXx9 ACLC ALSA SoC audio driver"); |
98 | MODULE_LICENSE("GPL"); | 98 | MODULE_LICENSE("GPL"); |
99 | MODULE_ALIAS("platform:txx9aclc-generic"); | ||