id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
846bb88ae8980b98b11e0298c7ab8cfc9539c3f6
Analyze and fix the following issue in the Linux kernel code: IDE: Coding Style fixes to drivers/ide/setup-pci.c
Problem Details: File is now error free. Compile tested. [bart: minor fixes, md5sum checked] Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 699c72947967..6302010fd8e2 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c @@ -27,13 +27,13 @@ * * We attempt to place the PCI interface into PCI native mode. If * we succeed the BARs are ok and the controller is in PC...
951784b667d78dad52ffea0a958fdbe14da97972
Analyze and fix the following issue in the Linux kernel code: ide: remove IDE_HFLAG_CY82C693 host flag
Problem Details: Sergei suggested that it shouldn't be necessary + it had no effect anyway since ide_id_dma_bug() is called earlier in ide_tune_dma(). Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index d61e5788d310..aaece2c06c9d 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -703,14 +703,8 @@ static int ide_tune_dma(ide_drive_t *drive) speed = ide_max_dma_mode(drive); - if (!speed) { - /* is this really correct/needed?...
cb5528ab19ece76be5299b33746ca7d58c187a26
Analyze and fix the following issue in the Linux kernel code: falconide: fix resources reservation (take 2)
Problem Details: * Tell IDE layer to not manage resources by setting hwif->mmio flag and request resources in falconide_init(). * Use request_mem_region() for resources reservation. * Use driver name for resources reservation. v2: * Fix missing printk() parameter. (Noticed by Geert Uytterhoeven) Cc: Geert Uytterh...
```diff diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c index b88a3c192d84..8c9c9f7f54ca 100644 --- a/drivers/ide/legacy/falconide.c +++ b/drivers/ide/legacy/falconide.c @@ -22,6 +22,7 @@ #include <asm/atariints.h> #include <asm/atari_stdma.h> +#define DRV_NAME "falconide" /* ...
54c05395273678fe23e9169a435fdc15ee17535e
Analyze and fix the following issue in the Linux kernel code: ide-mpc8xx: fix resources reservation
Problem Details: * Tell IDE layer to not manage resources by setting hwif->mmio flag and request resources in m8xx_ide_init_ports(). * Use request_mem_region() for resources reservation. * Use driver name for resources reservation. Cc: Vitaly Bordug <vitb@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewi...
```diff diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c index 3f8539f1ccd3..467656f06ccc 100644 --- a/drivers/ide/ppc/mpc8xx.c +++ b/drivers/ide/ppc/mpc8xx.c @@ -36,6 +36,8 @@ #include <asm/machdep.h> #include <asm/irq.h> +#define DRV_NAME "ide-mpc8xx" + static int identify (volatile u8 *p); sta...
b81c2266e36f6bdf0c7186d21b375e32d8929df8
Analyze and fix the following issue in the Linux kernel code: bast-ide: fix resources reservation
Problem Details: * Tell IDE layer to not manage resources by setting hwif->mmio flag and request resources in bastide_init(). * Use request_mem_region() for resources reservation. * Use driver name for resources reservation. Cc: Ben Dooks <support@simtec.co.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gm...
```diff diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c index 3bd2c6dcd80b..a80b9574865e 100644 --- a/drivers/ide/arm/bast-ide.c +++ b/drivers/ide/arm/bast-ide.c @@ -21,6 +21,8 @@ #include <asm/arch/bast-map.h> #include <asm/arch/bast-irq.h> +#define DRV_NAME "bast-ide" + static int __init bas...
7f6f33c131b34a5eca6350c2bd8a254e55550e92
Analyze and fix the following issue in the Linux kernel code: delkin_cb: fix resources handling
Problem Details: Tell IDE layer to not manage resources by setting hwif->mmio flag. Cc: Mark Lord <mlord@pobox.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/pci/delkin_cb.c b/drivers/ide/pci/delkin_cb.c index 53857f809667..753b86fc6637 100644 --- a/drivers/ide/pci/delkin_cb.c +++ b/drivers/ide/pci/delkin_cb.c @@ -71,7 +71,6 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id) if (setup[i]) outb(setup[i], base + i)...
3e2990eae03c3f998f365824330290d227e4415a
Analyze and fix the following issue in the Linux kernel code: ide_platform: fix resources handling
Problem Details: Tell IDE layer to not manage resources by always setting hwif->mmio flag (resources are handled by a platform device). Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Vitaly Bordug <vitb@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/legacy/ide_platform.c b/drivers/ide/legacy/ide_platform.c index ffa57c1175d0..bf240775531e 100644 --- a/drivers/ide/legacy/ide_platform.c +++ b/drivers/ide/legacy/ide_platform.c @@ -100,11 +100,10 @@ static int __devinit plat_ide_probe(struct platform_device *pdev) hw.dev = &pdev->dev...
9841654949f0a3f1289b6b95b2ab56cd99fb5360
Analyze and fix the following issue in the Linux kernel code: ide-disk: fix issues found by checkpatch.pl
Problem Details: There are no changes to the resulting drivers/ide/ide-disk.o binary file (md5sum-s after and before the patch match). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 4fb5715eb5d5..8e08d083fce9 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -16,8 +16,6 @@ #define IDEDISK_VERSION "1.18" -//#define DEBUG - #include <linux/module.h> #include <linux/types.h> #include <linux/string.h> ...
dc9114e27acecc5a2ce2394a284a07e4e6ae5849
Analyze and fix the following issue in the Linux kernel code: ide-generic: use ide_find_port() (take 3)
Problem Details: There should be no functional changes caused by this patch. v2: * Fix comment (noticed by Sergei Shtylyov). v3: * Fix no initalization of idx in some case. (Johann Felix Soden) Cc: Johann Felix Soden <johfel@users.sourceforge.net> Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Cc: Sergei Shtylyo...
```diff diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c index f3ec02ed4492..19f63e393d18 100644 --- a/drivers/ide/ide-generic.c +++ b/drivers/ide/ide-generic.c @@ -90,11 +90,21 @@ static int __init ide_generic_init(void) int i; for (i = 0; i < MAX_HWIFS; i++) { - ide_hwif_t *hwif = &ide_hwifs[...
e277f91fef8a0ff7726ad33eb79c6f0d0c6229a8
Analyze and fix the following issue in the Linux kernel code: ide: use ide_find_port() in legacy VLB host drivers (take 2)
Problem Details: * Add IDE_HFLAG_QD_2ND_PORT host flag to indicate the need of skipping first ide_hwifs[] slot for the second port of QD65xx controller. * Handle this new host flag in ide_find_port_slot(). * Convert legacy VLB host drivers to use ide_find_port(). While at it: * Fix couple of printk()-s in qd65xx ...
```diff diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index f81793f3f247..875429728021 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -1468,7 +1468,9 @@ ide_hwif_t *ide_find_port_slot(const struct ide_port_info *d) * ports 0x1f0/0x170 (the ide0/ide1 defaults). */ if (boot...
5297a3e522ff77e01fd0e792acc5ff0517822708
Analyze and fix the following issue in the Linux kernel code: ide-pmac: dynamically allocate struct pmac_ide_hwif instances (take 2)
Problem Details: * Dynamically allocate struct pmac_ide_hwif instances in pmac_ide_macio_attach() and pmac_ide_pci_attach(), then remove no longer needed pmac_ide[]. v2: * Build fix from Kamalesh Babulal. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed...
```diff diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 88619b50d9ef..2793e5fe137e 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c @@ -79,8 +79,6 @@ typedef struct pmac_ide_hwif { } pmac_ide_hwif_t; -static pmac_ide_hwif_t pmac_ide[MAX_HWIFS]; - enum { controller_ohare, /* O...
1baccff8a5823b51d7bf2740ef3ef17e06bfa7e2
Analyze and fix the following issue in the Linux kernel code: ide: make ide_pci_check_iomem() actually work
Problem Details: This function didn't actually check if a given BAR is in I/O space because of using the bogus PCI_BASE_ADDRESS_IO_MASK (which equals ~3) to test the resource flags instead of IORESOURCE_IO -- fix this, make ide_hwif_configure() check the results failing if necessary, and move the printk() call to the f...
```diff diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index f7ede0e42881..2dc3835478ec 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c @@ -301,11 +301,12 @@ static int ide_pci_configure(struct pci_dev *dev, const struct ide_port_info *d) * @d: IDE port info * @bar: BAR number *...
938da770c205989945ba4cc5f0b4e255702061a1
Analyze and fix the following issue in the Linux kernel code: ide/Kconfig: BLK_DEV_4DRIVES should be a tristate
Problem Details: The 4drives should be a tristate, the following breakage occurs otherwise: ERROR: "probe_4drives" [drivers/ide/ide-core.ko] undefined! The following (compile tested) patch fixes it for me. Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolni...
```diff diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 87532034d105..3f9e10001e19 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -1031,7 +1031,7 @@ comment "Other IDE chipsets support" comment "Note: most of these also require special kernel boot parameters" config BLK_DEV_4DRIVES - boo...
537166f6fa282c683663d6ac0c631b7456b5be95
Analyze and fix the following issue in the Linux kernel code: fix execve()
Problem Details: Arrgghhh... Sorry about that, I'd been sure I'd folded that one, but it actually got lost. Please apply - that unbreaks execve(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/kernel/fork.c b/kernel/fork.c index efb618fc8ffe..cb46befdd3a0 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1787,7 +1787,7 @@ bad_unshare_out: int unshare_files(struct files_struct **displaced) { struct task_struct *task = current; - struct files_struct *copy; + struct files_struct *copy ...
5afca33a43786408ce74540b54855973dde32bab
Analyze and fix the following issue in the Linux kernel code: x86: section mismatch fixes, #3
Problem Details: This patch fixes section mismatch warnings in unlock_ExtINT_logic(). WARNING: arch/x86/kernel/built-in.o(.text+0x14a92): Section mismatch in reference from the function unlock_ExtINT_logic() to the function .init.text:find_isa_irq_pin() The function unlock_ExtINT_logic() references the function __init...
```diff diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 9ba11d07920f..ef1a8dfcc529 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c @@ -1599,7 +1599,7 @@ static void __init setup_nmi(void) * cycles as some i82489DX-based boards have glue logic that keeps the ...
b6dbf334b0da14fafd4f747791a177ee4c7aae3b
Analyze and fix the following issue in the Linux kernel code: x86: section mismatch fixes, #2
Problem Details: This patch fixes section mismatch warnings in smpboot_setup_io_apic(). WARNING: arch/x86/kernel/built-in.o(.text+0x11781): Section mismatch in reference from the function smpboot_setup_io_apic() to the function .init.text:setup_IO_APIC() The function smpboot_setup_io_apic() references the function __i...
```diff diff --git a/include/asm-x86/mach-default/smpboot_hooks.h b/include/asm-x86/mach-default/smpboot_hooks.h index 3ff2c5bff93a..56d0e1fa0258 100644 --- a/include/asm-x86/mach-default/smpboot_hooks.h +++ b/include/asm-x86/mach-default/smpboot_hooks.h @@ -33,7 +33,7 @@ static inline void smpboot_restore_warm_reset_v...
6d4ce043268451b8016480461717f2aa59b5486c
Analyze and fix the following issue in the Linux kernel code: x86: pgtable_32.h - prototype and section mismatch fixes
Problem Details: This patch adds extern to native_pagetable_setup_[start,done]() protypes and fixes following section mismatch warning: WARNING: arch/x86/mm/built-in.o(.text+0xf2): Section mismatch in reference from the function paravirt_pagetable_setup_start() paravirt_pagetable_setup_[start,done]() is used by __ini...
```diff diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index 168b6447cf18..577ab79c4c27 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h @@ -198,16 +198,16 @@ do { \ */ #define update_mmu_cache(vma, address, pte) do { } while (0) -void native_pagetable_set...
28acf285deb193a1898bd531d778b0d1b1b75f2c
Analyze and fix the following issue in the Linux kernel code: x86: unlock_ExtINT_logic() - fix section mismatch warnings
Problem Details: Fix following warning: WARNING: arch/x86/kernel/built-in.o(.text+0x12cc9): Section mismatch in reference from the function unlock_ExtINT_logic() unlock_ExtINT_logic() is only used by __init check_timer(). Annotate unlock_ExtINT_logic() witch __init. Signed-off-by: Jacek Luczak <luczak.jacek@gmail.com...
```diff diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index 2e2f42074e18..696b8e4e66bb 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c @@ -2068,7 +2068,7 @@ static void __init setup_nmi(void) * cycles as some i82489DX-based boards have glue logic that keeps the ...
991074fd35e9e584d3cc28b4cba2e12743aeaa46
Analyze and fix the following issue in the Linux kernel code: x86: uniq_ioapic_id - fix section mismatch warning
Problem Details: Fix folowing warning: WARNING: arch/x86/kernel/built-in.o(.text+0x10799): Section mismatch in reference from the function uniq_ioapic_id() uniq_ioapic_id() is only used by __init mp_register_ioapic(). Annotate uniq_ioapic_id() with __init. Signed-off-by: Jacek Luczak <luczak.jacek@gmail.com> Signed-o...
```diff diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 23e8432a9826..3e2c54dc8b29 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c @@ -817,7 +817,7 @@ static int mp_find_ioapic(int gsi) return -1; } -static u8 uniq_ioapic_id(u8 id) +static u8 __init uniq_ioapic_id(u8...
4c01f23bdbd34e7edeadbaa920c3018307a541d5
Analyze and fix the following issue in the Linux kernel code: x86: trampoline_32.S - switch to .cpuinit.data
Problem Details: This patch fixes section mismatch warnings of __cpuinit setup_trampoline() on 32-bit host. Signed-off-by: Jacek Luczak <luczak.jacek@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/trampoline_32.S b/arch/x86/kernel/trampoline_32.S index 64580679861e..d8ccc3c6552f 100644 --- a/arch/x86/kernel/trampoline_32.S +++ b/arch/x86/kernel/trampoline_32.S @@ -33,7 +33,7 @@ /* We can free up trampoline after bootup if cpu hotplug is not supported. */ #ifndef CONFIG_HO...
79bf0e0353e0a34dbe0b2ef659a9bdd8056ca524
Analyze and fix the following issue in the Linux kernel code: i386: fix signal type for iret exception
Problem Details: .. since it uses ILL_BADSTK (which is meaningless in the context of SIGSEGV). Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index 471e694d6713..bde6f63e15d5 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c @@ -602,7 +602,7 @@ DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS) DO_ERROR(11, SIGBUS, "segment not present", segment_not_present) ...
86d78f640257344cc90a50da8cd52297ba1c6bdf
Analyze and fix the following issue in the Linux kernel code: x86: fix watchdog ops for CoreDuo
Problem Details: There apparently was an unnoticed conflict between an earlier patch to this file and mine (d1e084746b0e5806e6345ab31c5b370f8dee2b23), which I noticed only now. I suppose a change like the one below (untested) is needed; I didn't get any response on a confirmation request for this from the submitter of ...
```diff diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c index b943e10ad814..f9ae93adffe5 100644 --- a/arch/x86/kernel/cpu/perfctr-watchdog.c +++ b/arch/x86/kernel/cpu/perfctr-watchdog.c @@ -614,16 +614,6 @@ static struct wd_ops intel_arch_wd_ops __read_mostly = { .evntsel ...
b11caa7c7063ea92a0a58115d3fc6d038ed89510
Analyze and fix the following issue in the Linux kernel code: fix asm-x86/{posix_types,unistd}.h
Problem Details: Jeff Chua reported that: Commit e40c0fe6b0b5dd16aec3c0dad311d36b19d78fd9 (x86: cleanup duplicate includes) turned the userspace asm-x86/posix_types.h and asm-x86/unistd.h headers into empty files. This patch reverts these bogus changes. Reported-by: Jeff Chua <jeff.chua.linux@gmail.com> Signed-off-b...
```diff diff --git a/include/asm-x86/posix_types.h b/include/asm-x86/posix_types.h index fe312a5ba204..bb7133dc155d 100644 --- a/include/asm-x86/posix_types.h +++ b/include/asm-x86/posix_types.h @@ -1,5 +1,11 @@ #ifdef __KERNEL__ -# if defined(CONFIG_X86_32) || defined(__i386__) +# ifdef CONFIG_X86_32 +# include "pos...
5065dbafc299507f16731434e95b91dadff03006
Analyze and fix the following issue in the Linux kernel code: i386: fix asm constraint in do_IRQ()
Problem Details: Two prior changes resulted in the "ecx" clobber being lost. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index 6ea67b76a214..00bda7bcda63 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c @@ -134,7 +134,7 @@ unsigned int do_IRQ(struct pt_regs *regs) : "=a" (arg1), "=d" (arg2), "=b" (bx) : "0" (irq), "1" (desc), "2" (isp...
1ebcc654f010d4a63f3ebf8ddd2cab5a709b1824
Analyze and fix the following issue in the Linux kernel code: x86 PAT: tone down debugging messages
Problem Details: Linus reported these excessive debug printouts: > Overlap at 0xe0300000-0xe0400000 > Overlap at 0xe0300000-0xe0380000 > Overlap at 0xe0300000-0xe0400000 > Overlap at 0xe0300000-0xe0400000 > Overlap at 0xe0300000-0xe0400000 > Overlap at 0xe0300000-0xe0400000 > ...
```diff diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index ef8b64b89c7d..9851265e4d65 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c @@ -334,7 +334,7 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type, break; } - printk("Overlap at 0x%Lx-0x%Lx\n", + pr_debug("Overlap at 0x%Lx...
b33d24c4cc14ee40d83a7e1ea0bfb9567d6059aa
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7750): au0828/ cleanups and fixes
Problem Details: This patch contains the following cleanups and fixes: - "debug" is definitely not a good name for a global variable, renamed it to "au0828_debug" this fixes a compile error with some kernel configurations - since the module parameter is int the variable shouldn't be unsigned - remove the {usb,bridg...
```diff diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c index 8ca91f814277..a2a6983444fa 100644 --- a/drivers/media/video/au0828/au0828-cards.c +++ b/drivers/media/video/au0828/au0828-cards.c @@ -36,7 +36,6 @@ struct au0828_board au0828_boards[] = { .name = "DViCO F...
b9ef6bbbbeaf65c6a452fe3c75c196f86e0d984d
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7748): tuner-core: some adjustments at tuner logs, if debug enabled
Problem Details: set_addr log were almost useless: discarded SET_TYPE_ADDR commands weren't reported. This patch changed set_addr printk to print a message only if set_addr is wrong. It also fix printk at set_type, since, if an attach were failing, nothing were reported. With the current code, working or not, a call...
```diff diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 529e00952a8d..2b72e10e6b9f 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -369,19 +369,13 @@ static void set_type(struct i2c_client *c, unsigned int type, break; } case TUNER_TE...
d0d14226b94546a0054ded495157aa1cb41a7259
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7735): Fix compilation for au0828
Problem Details: Encountered this error when testing. Kernel: arch/x86/boot/bzImage is ready (#76) MODPOST 813 modules ERROR: "dvb_dmx_init" [drivers/media/video/au0828/au0828.ko] undefined! ERROR: "dvb_unregister_adapter" [drivers/media/video/au0828/au0828.ko] undefined! ERROR: "dvb_register_frontend" [drivers/med...
```diff diff --git a/drivers/media/video/au0828/Kconfig b/drivers/media/video/au0828/Kconfig index c97c4bd24841..41708267e7a4 100644 --- a/drivers/media/video/au0828/Kconfig +++ b/drivers/media/video/au0828/Kconfig @@ -1,7 +1,7 @@ config VIDEO_AU0828 tristate "Auvitek AU0828 support" - depends on VIDEO_DEV && I2C ...
094f9b4b317b235b8d7fa03b356b9a3f3633b55b
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7734): em28xx: copy and paste error in em28xx_init_isoc
Problem Details: Fixes a copy and paste error in check of kzalloc return value. The check block was copied from the previous allocation but the variable wasn't exchanged. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index f8c41d8c74c4..5d837c16ee22 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c @@ -650,7 +650,7 @@ int em28xx_init_isoc(struct em28xx *dev, int max_packets, ...
63b79cfa05b35973713caa91e290311bd5ebbe1d
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (7732): vivi: fix a warning
Problem Details: some gcc versions complain that fh is used without being defined. The error report is bogus. However, fixing it is trivial. Better to make gcc happy. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index b1e9592acb90..845be1864f68 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -888,7 +888,7 @@ static int vivi_open(struct inode *inode, struct file *file) { int minor = iminor(inode); struct vivi_dev *dev; ...
4ab92bcf773e7b9e1367897047d5fa4d151d9e90
Analyze and fix the following issue in the Linux kernel code: agp: fix shadowed variable warning in amd-k7-agp.c
Problem Details: Introduced between 2.6.25-rc2 and -rc3 drivers/char/agp/amd-k7-agp.c:439:6: warning: symbol 'cap_ptr' shadows an earlier one drivers/char/agp/amd-k7-agp.c:414:5: originally declared here cap_ptr is never used again in this function, don't bother redeclaring. Signed-off-by: Harvey Harrison <harvey.har...
```diff diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index d28669992147..96bdb9296b07 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c @@ -436,8 +436,9 @@ static int __devinit agp_amdk7_probe(struct pci_dev *pdev, system controller may experience noise du...
5ff64611333fd282793ff8997e02138aa2f6aab9
Analyze and fix the following issue in the Linux kernel code: drm: Fix mismerge of non-coherent DMA patch
Problem Details: The patch for supporting non coherent PCI DMA in the DRM was mismerged causing the page protection to be updated for the wrong type of mapping. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c index 945df72a51a9..b20c1e950d3e 100644 --- a/drivers/char/drm/drm_vm.c +++ b/drivers/char/drm/drm_vm.c @@ -640,12 +640,12 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) /* Don't let this area swap. Change when ...
a92910723a5af54f81373875fd95133c88df94bd
Analyze and fix the following issue in the Linux kernel code: mac-hid: fix build after lockdep annotation
Problem Details: Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index f972ff377b63..cc9f27514aef 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -114,8 +114,8 @@ static int emumousebtn_input_register(void) if (!emumousebtn) return -ENOMEM; - lockdep_set_class(emumouse...
3dd7b71ca0f7ff8410a6b8cb15e5f670f90181e4
Analyze and fix the following issue in the Linux kernel code: Export __locks_copy_lock() so modular lockd builds
Problem Details: Commit 1a747ee0 ("locks: don't call ->copy_lock methods on return of conflicting locks") changed fs/lockd/svclock.c to call __locks_copy_lock() instead of locks_copy_lock(), but lockd can be built as a module and __locks_copy_lock() is not exported, which causes a build error ERROR: "__locks_copy_...
```diff diff --git a/fs/locks.c b/fs/locks.c index e1ea2fe03681..44d9a6a7ec50 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -236,6 +236,7 @@ void __locks_copy_lock(struct file_lock *new, const struct file_lock *fl) new->fl_ops = NULL; new->fl_lmops = NULL; } +EXPORT_SYMBOL(__locks_copy_lock); void locks_copy_lock...
b7aa1f1603bea4fdec49a915712dea280cfd07e8
Analyze and fix the following issue in the Linux kernel code: pciehp: Fix command write
Problem Details: Current implementation of pciehp_write_cmd() always enables command completed interrupt. But pciehp_write_cmd() is also used for clearing command completed interrupt enable bit. In this case, we must not set the command completed interrupt enable bit. To fix this bug, this patch add the check to see if...
```diff diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 3efb1296290d..49883c59756e 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -301,7 +301,10 @@ static int pcie_write_cmd(struct controller *ctrl, u16 cmd, u16 mask) } slot_ctrl &= ~...
ef0ff95f136f0f2d035667af5d18b824609de320
Analyze and fix the following issue in the Linux kernel code: shpchp: fix slot name
Problem Details: Current shpchp uses the combination of bus number and slot number as a slot name. But it is not a good idea because bus number is not a physical identifier but a logical identifier. This is against the shpc specification. So remove the bus number from the physical identifier. However, there are some p...
```diff diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index 43816d4b3c43..1648076600fc 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c @@ -39,6 +39,7 @@ int shpchp_debug; int shpchp_poll_mode; int shpchp_poll_time; +int shpchp_slot_with_bus;...
2aeeef11999590d88249fbd086671af8300116f4
Analyze and fix the following issue in the Linux kernel code: pciehp: Clean up pcie_init()
Problem Details: Clean up pciehp_ini(). This patch is trying to - Remove redundant capablity checks that were already done in PCIe port bus driver. - Separate the code only for debugging and make debug information easier to read. - Make the entire code easier to read and understand what it is doing. Sig...
```diff diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index df1266cd6861..5cadcd0654cb 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -221,6 +221,32 @@ static void start_int_poll_timer(struct controller *ctrl, int sec) add_timer(&ctrl->poll_t...
ae416e6b2936fdb70aeee6eb9066115d4521daa6
Analyze and fix the following issue in the Linux kernel code: pciehp: Fix wrong slot capability check
Problem Details: Current pciehp saves only 8bits of Slot Capability registers in ctrl->ctrlcap. But it refers more than 8bit for checking EMI capability. It is clearly a bug and EMI would never work. To fix this problem, this patch saves full Slot Capability contens in ctrl->slot_cap. It also reduce the redundant reads...
```diff diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index 9dd132925ffa..8264a7680435 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h @@ -93,7 +93,7 @@ struct controller { u8 slot_device_offset; u32 first_slot; /* First physical slot number */ /* PCIE only ...
c27fb883dffe11aa4cb35ecea1fa1832ba45d4da
Analyze and fix the following issue in the Linux kernel code: pciehp: Fix wrong slot control register access
Problem Details: Current pciehp implementaion clears hotplug events without waiting for command completion. Because of this, events might not be cleared properly. To prevent this problem, we must use pciehp_write_cmd() to write to Slot Control register. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> S...
```diff diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 19eba2a2f746..7104a15e2661 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -242,13 +242,12 @@ static inline int pcie_wait_cmd(struct controller *ctrl) /** * pcie_write_cmd - Issue ...
2d32a9aed2e335d110fbb11985a9545b1f7219ab
Analyze and fix the following issue in the Linux kernel code: pciehp: Add missing memory barrier
Problem Details: Fix the possible race condition between pcie_isr() and pciehp_write_cmd() because of the lack of memory barrier. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
```diff diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 51a5055f6965..19eba2a2f746 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -279,6 +279,7 @@ static int pcie_write_cmd(struct slot *slot, u16 cmd, u16 mask) slot_ctrl |= ((cmd & mask) ...
c6b069e94601aea8887afbbd922afe20a3580a7d
Analyze and fix the following issue in the Linux kernel code: pciehp: Fix interrupt event handlig
Problem Details: Current pciehp implementation disables and re-enables hotplug interrupts in its interrupt handler. This operation might be intend to guarantee that interrupts for the events newly occured during previous events are being handled will be successfully generated. But current implementaion has the followin...
```diff diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index f14267e197dd..9dd132925ffa 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h @@ -97,7 +97,6 @@ struct controller { u8 cap_base; struct timer_list poll_timer; volatile int cmd_busy; - spinlock_t lock; ...
3800345f723fd130d50434d4717b99d4a9f383c8
Analyze and fix the following issue in the Linux kernel code: pciehp: fix slot name
Problem Details: Current pciehp uses the combination of bus number and slot number as a slot name. But it is not a good idea because bus number is not a physical identifier but a logical identifier. This is against the PCIE specification. So remove the bus number from the physical identifier. However, there are some p...
```diff diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index aee19f013d84..cf36f2355173 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c @@ -41,6 +41,7 @@ int pciehp_debug; int pciehp_poll_mode; int pciehp_poll_time; int pciehp_force; +int pci...
4217516e52949e6550ff01d57f92b9b24ce04be1
Analyze and fix the following issue in the Linux kernel code: kconfig: fix broken target update-po-config
Problem Details: Massimo Maiurana reported: In the latest kernel "make update-po-config" fails because it tries to open arch/Kconfig/Kconfig, since the ls command doesn't distinguish between files and directories. Cc: Massimo Maiurana <maiurana@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 32e8c5a227c3..fa1a7d565903 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -36,10 +36,10 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h --output $(obj)/config.pot $(Q)sed -i s/CHARSET/UTF-8/ $(obj)...
0254da07d9d51044140a904c47affaeeb8b74ae8
Analyze and fix the following issue in the Linux kernel code: kbuild: fix depmod comment
Problem Details: Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Cc: trivial@kernel.org Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/Makefile b/Makefile index c6d331ba140b..fc3411e6f071 100644 --- a/Makefile +++ b/Makefile @@ -1543,7 +1543,6 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) cmd_rmfiles = rm -f $(rm-files) # Run depmod only if we have System.map and depmod is executable...
0206e61b467fde4d7b50f1a64355182a4fd9576b
Analyze and fix the following issue in the Linux kernel code: [CIFS] Fix spelling mistake
Problem Details: Noticed by Joe Perches Signed-off-by: Steve French <sfrench@us.ibm.com>
```diff diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h index 9f49c2f3582c..a0d26b540d4e 100644 --- a/fs/cifs/cifspdu.h +++ b/fs/cifs/cifspdu.h @@ -2050,7 +2050,7 @@ typedef struct { to 0xFFFF00 */ #define CIFS_UNIX_LARGE_WRITE_CAP 0x00000080 #define CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP 0x00000100...
3156fd0529b5216f4f444f4a7752b82dc1bd99c0
Analyze and fix the following issue in the Linux kernel code: kbuild: fix some minor typoes
Problem Details: Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 67fb4530a6ff..277cfe0b7100 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -27,12 +27,12 @@ ccflags-y := cppflags-y := ldflags-y := -# Read .config if it exist, otherwise ignore +# Read auto.conf if it exists, otherwise...
8b132ecbcfea8b1b556a832df7290379df79ad79
Analyze and fix the following issue in the Linux kernel code: x86: fix text_poke()
Problem Details: kernel_text_address returns true even for modules which is not wanted in text_poke. Use core_kernel_text instead. This is a regression introduced in e587cadd8f47e202a30712e2906a65a0606d5865 which caused occasionaly crashes after suspend/resume. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> CC: Math...
```diff diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index df4099dc1c68..7ab3a9774763 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -515,7 +515,7 @@ void *__kprobes text_poke(void *addr, const void *opcode, size_t len) BUG_ON(len > sizeof(long)); BUG...
0fe8a3ce73ef31d1480e82798503948a979e8e52
Analyze and fix the following issue in the Linux kernel code: Various fixes to Documentation/HOWTO
Problem Details: Fix a number of things which have gone somewhat out-of-date over the last few months. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
```diff diff --git a/Documentation/HOWTO b/Documentation/HOWTO index 54835610b3d6..0291ade44c17 100644 --- a/Documentation/HOWTO +++ b/Documentation/HOWTO @@ -249,9 +249,11 @@ process is as follows: release a new -rc kernel every week. - Process continues until the kernel is considered "ready", the process...
5fcc60c3a05bf417229fba715e7aec52bf6717fb
Analyze and fix the following issue in the Linux kernel code: leases: fix a return-value mixup
Problem Details: Fixes a return-value mixup from 85c59580b30c82aa771aa33b37217a6b6851bc14 "locks: Fix potential OOPS in generic_setlease()", in which -ENOMEM replaced what had been intended to stay -EAGAIN in the variable "error". Signed-off-by: David M. Richter <richterd@citi.umich.edu> Signed-off-by: J. Bruce Fields...
```diff diff --git a/fs/locks.c b/fs/locks.c index 592faadbcec1..b9f3a0bed300 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1404,6 +1404,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp) rdlease_count++; } + error = -EAGAIN; if ((arg == F_RDLCK && (wrlease_count > 0)) || (arg...
21f20b69a567ca8971fe643d2ebe5d680c9b43af
Analyze and fix the following issue in the Linux kernel code: ns9xxx: fix sparse warning
Problem Details: The actual warning is arch/arm/mach-ns9xxx/irq.c:65:6: warning: symbol 'handle_prio_irq' was not declared. Should it be static? Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
```diff diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c index 75f2070dec7b..bfd906be754e 100644 --- a/arch/arm/mach-ns9xxx/irq.c +++ b/arch/arm/mach-ns9xxx/irq.c @@ -56,7 +56,7 @@ static struct irq_chip ns9xxx_chip = { #if 0 #define handle_irq handle_level_irq #else -void handle_prio_irq(unsigne...
a13c81952444d032ad3b5b7027b330150dbe2408
Analyze and fix the following issue in the Linux kernel code: ns9xxx: fix handle_prio_irq to unmask irqs with lower priority
Problem Details: When an irq is reported all lower prio irqs are masked until the current irq is acked. So never leave handle_prio_irq without acking. desc->status & IRQ_INPROGRESS should never become true because the current irq is masked until it is acked, too. Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@di...
```diff diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c index 7ddc8fde7748..ba7a9e4888f0 100644 --- a/arch/arm/mach-ns9xxx/irq.c +++ b/arch/arm/mach-ns9xxx/irq.c @@ -64,15 +64,14 @@ void handle_prio_irq(unsigned int irq, struct irq_desc *desc) spin_lock(&desc->lock); - if (unlikely(desc->stat...
78d31a3a87f84cf56004b7bc154831f2ee1186e8
Analyze and fix the following issue in the Linux kernel code: cifs: timeout dfs automounts +little fix.
Problem Details: Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index f53f41ff1665..95024c066d89 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c @@ -25,14 +25,26 @@ static LIST_HEAD(cifs_dfs_automount_list); -/* - * DFS functions -*/ +static void cifs_dfs_expire_automounts(struct work_struct ...
7ff14a36159d947872870e7a3e9dcaebc46b23eb
Analyze and fix the following issue in the Linux kernel code: dm: unplug queues in threads
Problem Details: Remove an avoidable 3ms delay on some dm-raid1 and kcopyd I/O. It is specified that any submitted bio without BIO_RW_SYNC flag may plug the queue (i.e. block the requests from being dispatched to the physical device). The queue is unplugged when the caller calls blk_unplug() function. Usually, the se...
```diff diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index ed9c86cd053e..4789c42d9a3a 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -353,7 +353,7 @@ static int sync_io(struct dm_io_client *client, unsigned int num_regions, { struct io io; - if (num_regions > 1 && rw != WRITE) { + if (num_regi...
08d8757a4d52d21d825b9170af36f2696d1da1a8
Analyze and fix the following issue in the Linux kernel code: dm kcopyd: private mempool
Problem Details: Change the global mempool in kcopyd into a per-device mempool to avoid deadlock possibilities. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
```diff diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c index 3fb6c8334a82..0b2907d59a3f 100644 --- a/drivers/md/kcopyd.c +++ b/drivers/md/kcopyd.c @@ -43,6 +43,8 @@ struct dm_kcopyd_client { wait_queue_head_t destroyq; atomic_t nr_jobs; + mempool_t *job_pool; + struct workqueue_struct *kcopyd_wq; stru...
8c0cbc2f79bb222d21b466422fde71fcc9bd37e3
Analyze and fix the following issue in the Linux kernel code: dm kcopyd: per device
Problem Details: Make one kcopyd thread per device. The original shared kcopyd could deadlock. Configuration:
```diff diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c index 4f2c61acf7c6..3fb6c8334a82 100644 --- a/drivers/md/kcopyd.c +++ b/drivers/md/kcopyd.c @@ -26,14 +26,6 @@ #include "kcopyd.h" #include "dm.h" -static struct workqueue_struct *_kcopyd_wq; -static struct work_struct _kcopyd_work; - -static void wake(...
924362629bf5645aee5f49f8a0d0d5b193e65997
Analyze and fix the following issue in the Linux kernel code: dm snapshot: fix chunksize sector conversion
Problem Details: If a snapshot has a smaller chunksize than the page size the conversion to pages currently returns 0 instead of 1, causing: kernel BUG in mempool_resize. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> ...
```diff diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c index 5bbce29f143a..c7d305bfd838 100644 --- a/drivers/md/dm-exception-store.c +++ b/drivers/md/dm-exception-store.c @@ -131,7 +131,7 @@ struct pstore { static unsigned sectors_to_pages(unsigned sectors) { - return sectors / (PAGE...
2664ef44cf5053d2b7dff01cecac70bc601a5f68
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Wrap SMP IPIs with irq_enter()/irq_exit().
Problem Details: Otherwise all sorts of bad things can happen, including spurious softlockup reports. Other platforms have this same bug, in one form or another, just don't see the issue because they don't sleep as long as sparc64 can in NOHZ. Thanks to some brilliant debugging by Peter Zijlstra. Signed-off-by: Davi...
```diff diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 524b88920947..409dd71f2738 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -866,14 +866,21 @@ void smp_call_function_client(int irq, struct pt_regs *regs) void *info = call_data->info; clear_softint(1 << irq...
020cfb05f2c594c778537159bd45ea5efb0c5e0d
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix args to 64-bit sys_semctl() via sys_ipc().
Problem Details: Second and third arguments were swapped for whatever reason. Reported by Tom Callaway. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index 73ed01ba40dc..8d4761f15fa9 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c @@ -454,8 +454,8 @@ asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second, err = sys_semget(...
653252c2302cdf2dfbca66a7e177f7db783f9efa
Analyze and fix the following issue in the Linux kernel code: net: Fix wrong interpretation of some copy_to_user() results.
Problem Details: I found some places, that erroneously return the value obtained from the copy_to_user() call: if some amount of bytes were not able to get to the user (this is what this one returns) the proper behavior is to return the -EFAULT error, not that number itself. Signed-off-by: Pavel Emelyanov <xemul@openv...
```diff diff --git a/net/can/raw.c b/net/can/raw.c index ead50c7c0d40..201cbfc6b9ec 100644 --- a/net/can/raw.c +++ b/net/can/raw.c @@ -573,7 +573,8 @@ static int raw_getsockopt(struct socket *sock, int level, int optname, int fsize = ro->count * sizeof(struct can_filter); if (len > fsize) len = fsize; - ...
d43fa1499622e3e561380c34e076aade954e2c2c
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] AT91 hardware ECC compile fix for at91sam9263 / at91sam9260
Problem Details: The sam926x docs allegedly don't list an "ECC_PARITY" field, and the header files in the upstream kernel don't have it either. Masking with it was useless anyway, so just remove it. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/nand/at91_nand.c b/drivers/mtd/nand/at91_nand.c index c3eb203a2ad0..09ebcc93ed3b 100644 --- a/drivers/mtd/nand/at91_nand.c +++ b/drivers/mtd/nand/at91_nand.c @@ -199,7 +199,7 @@ static int at91_nand_calculate(struct mtd_info *mtd, unsigned int ecc_value; /* get the first 2 ECC byt...
5b3f129c5592ca35b3fe8916767c58b98710478c
Analyze and fix the following issue in the Linux kernel code: ipv6: Fix typo in net/ipv6/Kconfig
Problem Details: Two is used in the wrong context here, as you are connecting to an IPv6 network over IPv4; not connecting two IPv6 networks to an IPv4 one. Signed-off-by: Michael Beasley <youvegotmoxie@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig index 42814a2ec9d7..b2c9becc02e8 100644 --- a/net/ipv6/Kconfig +++ b/net/ipv6/Kconfig @@ -167,7 +167,7 @@ config IPV6_SIT Tunneling means encapsulating data of one protocol type within another protocol and sending it over a channel that understands the ...
d4f73c8e459d355e10051174d859ffd0ef5764c0
Analyze and fix the following issue in the Linux kernel code: via-velocity: fix vlan receipt
Problem Details: - vlans were using a single CAM register (see mac_set_vlan_cam) - setting the address filtering registers for vlans is not needed when there is no vlan The non-tagged interface is filtered out as soon as a tagged (!= 0) interface is created. Its traffic appears again when an zero-tagged interface is...
```diff diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index ed1afaf683a4..6b8d882d197b 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c @@ -605,7 +605,6 @@ static void __devinit velocity_get_options(struct velocity_opt *opts, int index, static void velocity_init_cam_filte...
78c6146f16d45f52c33ddb6b48c10fc6cfc53659
Analyze and fix the following issue in the Linux kernel code: tg3: sparse cleanup
Problem Details: Fix the following sparse warning : drivers/net/tg3.c:4025:3: warning: context imbalance in 'tg3_restart_hw' - unexpected unlock Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index bc4c62b8e81a..e3f74c9f78bd 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -4017,6 +4017,8 @@ static int tg3_halt(struct tg3 *, int, int); * Invoked with tp->lock held. */ static int tg3_restart_hw(struct tg3 *tp, int reset_phy) + __release...
9f3f7910c67adfb520bbae3d8b16985439a97198
Analyze and fix the following issue in the Linux kernel code: forcedeth: realtek phy crossover detection
Problem Details: This patch fixes an issue seen with the realtek 8201 phy. This phy has a problem with crossover detection and it needs to be disabled. The problem only arises on certain switches. Therefore, a module parameter has been added to allow enabling crossover detection if needed. The default will be set to di...
```diff diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 73d85b31fbdc..35f66d4a4595 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -483,16 +483,22 @@ union ring_type { #define DESC_VER_3 3 /* PHY defines */ -#define PHY_OUI_MARVELL 0x5043 -#define PHY_OUI_CICADA 0x03f1 -#d...
815b97c6b8861f2e539c9ecb44c02b7b8ac11ca4
Analyze and fix the following issue in the Linux kernel code: gianfar: Fix skb allocation strategy
Problem Details: gianfar was unable to handle failed skb allocation for rx buffers, so we were spinning until it succeeded. Actually, it was worse--we were spinning for a long time, and then silently failing. Instead, we take Stephen Hemminger's suggestion to try the allocation earlier, and drop the packet if it fail...
```diff diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index b917616bf6f1..99a4b990939f 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -98,7 +98,6 @@ #include "gianfar_mii.h" #define TX_TIMEOUT (1*HZ) -#define SKB_ALLOC_TIMEOUT 1000000 #undef BRIEF_GFAR_ERRORS #undef VERBOSE_GF...
db2961c5a13562503c82ae306af269fde4fea8f0
Analyze and fix the following issue in the Linux kernel code: smc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt}
Problem Details: When timeout reaches 0 the postfix decrement still subtracts, so the test fails. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundat...
```diff diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 8fbc08b73589..4e2800205189 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -244,7 +244,7 @@ static void smc911x_reset(struct net_device *dev) do { udelay(10); reg = SMC_GET_PMT_CTRL() & PMT_CTRL_READY_; - } while ( ti...
72abb46101fb5c47a9592914adb221b430ff26bd
Analyze and fix the following issue in the Linux kernel code: net drivers: fix platform driver hotplug/coldplug
Problem Details: Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable network platform drivers, to re-enable auto loading. NOTE: didn't change drivers/net/fs_enet/fs_enet-main.c "old binding" support. That looks problematic in the f...
```diff diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c index 0ae0d83e5d22..770226d904d4 100644 --- a/drivers/net/arm/at91_ether.c +++ b/drivers/net/arm/at91_ether.c @@ -1246,3 +1246,4 @@ module_exit(at91ether_exit) MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("AT91RM9200 EMAC Ethernet driver");...
751c2e4755027468a79349f8e9f4885a4518426e
Analyze and fix the following issue in the Linux kernel code: korina: fix misplaced return statement
Problem Details: The driver takes the error unwind path without condition. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/korina.c b/drivers/net/korina.c index 1d24a73a0e1a..305be6242524 100644 --- a/drivers/net/korina.c +++ b/drivers/net/korina.c @@ -1031,6 +1031,8 @@ static int korina_open(struct net_device *dev) dev->name, lp->und_irq); goto err_free_ovr_irq; } +out: + return ret; err_fre...
d753d82405ac3504ed69fb6be4d219d9702b8d64
Analyze and fix the following issue in the Linux kernel code: WAN: Fix confusing insmod error code for C101 too.
Problem Details: Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c index c4c8eab8574f..c2cc42f723d5 100644 --- a/drivers/net/wan/c101.c +++ b/drivers/net/wan/c101.c @@ -402,7 +402,7 @@ static int __init c101_init(void) #ifdef MODULE printk(KERN_INFO "c101: no card initialized\n"); #endif - return -ENOSYS; /* no...
7cda1edf029370d396fb610f7e41fad9a7123164
Analyze and fix the following issue in the Linux kernel code: Removing dead code in drivers/net/wan/hdlc_fr.c
Problem Details: The local variable "prefix" is never used anymore, and the content of this string appears a bit later, directly in a call to "alloc_netdev" after doing exactly the same if/else test. So there seems to be no point keeping those 4 lines anymore. Signed-off-by: Cédric Augonnet <cedric.augonnet@ens-lyon.o...
```diff diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index c4ab0326f911..520bb0b1a9a2 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c @@ -1090,10 +1090,6 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type) pvc_device *pvc = NULL; struct net_dev...
5a0e2cd51145748c4fd44d0c3a06d39eb87e8725
Analyze and fix the following issue in the Linux kernel code: [netdrvr] typhoon: typhoon_resume - remove call to start_queue
Problem Details: While trying to fix http://bugzilla.kernel.org/show_bug.cgi?id=8952 I looked at a few other drivers to figure out what drivers _should_ be doing for suspend/resume. I noticed typhoon driver is likely doing more than it needs to. Patch below is untested since I don't have the HW. Suspend/resume code a...
```diff diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index 333961bb7873..c0dd25ba7a18 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c @@ -2183,7 +2183,6 @@ typhoon_resume(struct pci_dev *pdev) } netif_device_attach(dev); - netif_start_queue(dev); return 0; reset: ```
51d4a1cc2e20e2848c6141989f733f0e6548598b
Analyze and fix the following issue in the Linux kernel code: ibm_newemac: Fix section mismatch warnings
Problem Details: This patch fixes several section mismatch warnings in the ibm_newemac driver similar to: WARNING: vmlinux.o(.devinit.text+0x3a04): Section mismatch in reference from the function emac_probe() to the function .devexit.text:tah_detach() The function __devinit emac_probe() references a function __devexit...
```diff diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index f10c762fd0b2..c30348e402d5 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c @@ -2240,7 +2240,7 @@ static int __devinit emac_of_bus_notify(struct notifier_block *nb, return 0; } -static struct ...
f34ebab68a8e3c80ff4364f4c61734faec5161d4
Analyze and fix the following issue in the Linux kernel code: ibm_newemac: Fix problem with jumbo frame support and EMAC V4.patch
Problem Details: This fixes the jumbo frame support on EMAC V4 systems. Now the correct bit is set depending on the EMAC version configured. Tested on Kilauea (405EX) and Canyonlands (460EX). Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jeff ...
```diff diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 378a23963495..f10c762fd0b2 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c @@ -524,7 +524,10 @@ static int emac_configure(struct emac_instance *dev) rx_size = dev->rx_fifo_size_gige; if (d...
2d9498f369706d6db174abd2e75b37732b9dbbde
Analyze and fix the following issue in the Linux kernel code: e1000e: Fix HW Error on es2lan, ARP capture issue by BMC
Problem Details: Several components to this complex fix. The es2lan cards occasionally gave a "HW Error" especially when forcing speed. Some users also reported that the BMC stole ARP packets. The fixes include setting the proper SW_FW bits to tell the BMC that we're active and not do any un-initialization at all, so ...
```diff diff --git a/drivers/net/e1000e/defines.h b/drivers/net/e1000e/defines.h index 4fb9d8722739..2a53875cddbf 100644 --- a/drivers/net/e1000e/defines.h +++ b/drivers/net/e1000e/defines.h @@ -184,6 +184,7 @@ #define E1000_SWFW_EEP_SM 0x1 #define E1000_SWFW_PHY0_SM 0x2 #define E1000_SWFW_PHY1_SM 0x4 +#define E...
10371b5e6ba22173425877ea6a7040619b005fa1
Analyze and fix the following issue in the Linux kernel code: S2io: Version update for memory leak fix during free_tx_buffers
Problem Details: - Updated version number. Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index ab96aa292b78..81fd7abc27e4 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -86,7 +86,7 @@ #include "s2io.h" #include "s2io-regs.h" -#define DRV_VERSION "2.0.26.20" +#define DRV_VERSION "2.0.26.22" /* S2io Driver name & version. */ st...
b35b3b49fc6750806964048b31799c8782980ef9
Analyze and fix the following issue in the Linux kernel code: S2io: Fix memory leak during free_tx_buffers
Problem Details: - Fix the memory leak during free_tx_buffers. Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index dcbe01b0ca0d..ab96aa292b78 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -2458,7 +2458,7 @@ static void free_tx_buffers(struct s2io_nic *nic) for (i = 0; i < config->tx_fifo_num; i++) { unsigned long flags; spin_lock_irqsave(&mac_c...
f38d1008b034e39397d3da67919e220c851db75e
Analyze and fix the following issue in the Linux kernel code: ucc_geth: Fix sneaky merge conflict regarding bus_id
Problem Details: The patch that changed mdio_bus to a string didn't conflict strongly enough with the patch that added fixed PHY support to UCC. Gather it back into the fold. Fixes this error: ... CC drivers/net/ucc_geth.o 'ucc_geth_probe': /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ucc_geth.c:3935...
```diff diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 29a4d650e8a8..0aac91c3e4e4 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c @@ -3926,7 +3926,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ug_info->uf_info.irq = irq_of_parse_and_map(np, ...
f9d42491723dbb77bdc9b9dc7e096ea57d535992
Analyze and fix the following issue in the Linux kernel code: pata_bf54x: decrease count first.
Problem Details: When count reaches 0 the postfix decrement still subtracts (to -1), so bfin_reset_controller() returns as if the busy flag was cleared while it was not. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Acked-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-...
```diff diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index e4cf73c4b70b..a75de0684c15 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c @@ -1417,7 +1417,7 @@ static int bfin_reset_controller(struct ata_host *host) count = 10000000; do { status = read_atapi_register(base, AT...
a6116c9e60978a6deaa20691c67ffed727e50df1
Analyze and fix the following issue in the Linux kernel code: libata-eh set tf flags in NCQ EH result_tf
Problem Details: Fix mis-reporting of NCQ errors by ensuring that result_tf->flags is properly initialized in libata-eh. This allows ata_gen_ata_sense() to report the failed block number correctly to SCSI after a media error during NCQ. This patch may also be a candidate for backporting to earlier kernels. Without th...
```diff diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index d94359a24d41..61dcd0026c64 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1402,6 +1402,7 @@ static void ata_eh_analyze_ncq_error(struct ata_link *link) /* we've got the perpetrator, condemn it */ qc = __ata_qc_from_...
a0b9f4bc1ec2ea25e47e7958e544fef0d122e012
Analyze and fix the following issue in the Linux kernel code: sata_nv: make hardreset return -EAGAIN on success
Problem Details: sata_nv hardreset can't classify but was left out while unifying follow-up SRST request mechanism[1]. This caused detection failures on those controllers. Fix it. Reported and bisected by Roland Dreier, Petr Vandrovec and Marc Dionne. Thanks guys. [1] 305d2a1ab137d11d573319c315748a87060fe82d Sign...
```diff diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 109b07495721..858f70610eda 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -1591,13 +1591,16 @@ static void nv_mcp55_thaw(struct ata_port *ap) static int nv_hardreset(struct ata_link *link, unsigned int *class, unsigned long...
458622fcdc5b316de8d74efd7e610803f0308c14
Analyze and fix the following issue in the Linux kernel code: ATA/IDE: fix platform driver hotplug/coldplug
Problem Details: Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable ATA and IDE platform drivers, to re-enable auto loading. NOTE: both ata/pata_platform.c and ide/legacy/ide_platform.c claim to provide "the" platform_pata driver,...
```diff diff --git a/drivers/ata/pata_at32.c b/drivers/ata/pata_at32.c index 3e8651d78952..5e104385d6a3 100644 --- a/drivers/ata/pata_at32.c +++ b/drivers/ata/pata_at32.c @@ -381,6 +381,9 @@ static int __exit pata_at32_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_A...
a5b6f60c5a30c494017c7a2d11c4067f90d3d0df
Analyze and fix the following issue in the Linux kernel code: usb serial: more fixes and groundwork for tty changes
Problem Details: - If a termios change fails due to lack of memory we should copy the old settings back over as the device has not changed - Note various locking problems - kl5kusb105 had various remaining tty flag handling problems - Make safe_serial use tty_insert_flip_string not open coded loops - set termios...
```diff diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 9d708b22e955..599ab2e548a7 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c @@ -192,6 +192,7 @@ static void ark3116_set_termios(struct usb_serial_port *port, buf = kmalloc(1, GFP_KERNEL); if (!buf) { ...
aff6d18f95bb81b2d07994372c8edcc2c2b41180
Analyze and fix the following issue in the Linux kernel code: USB: fix compile problems in ehci-hcd
Problem Details: This patch (as1072) fixes some recently-introduced compile problems that show up in ehci-hcd when CONFIG_PM is turned off. PORT_WAKE_BITS needs to be defined always. ehci_port_power() is called during initialization by all the EHCI variants other than the PCI version, in which it is "defined but ...
```diff diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 536b433d24f7..efffef64f59d 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -28,10 +28,10 @@ /*-------------------------------------------------------------------------*/ -#ifdef CONFIG_PM - #define P...
4f6676274fb6303a8e8100d086ea8c2c00c0d8e3
Analyze and fix the following issue in the Linux kernel code: USB: ehci: qh_completions cleanup and bugfix
Problem Details: Simplify processing of completed qtds, and correct handling of short reads, by removing two state variables: - "qtd_status" wasn't needed. The current URB's status is either OK (-EINPROGRESS) or some fault status. Once a fault appears, the queue halts and any later QTDs are immediately remove...
```diff diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 64942ec584c2..315c7c14aaa8 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c @@ -242,7 +242,8 @@ __acquires(ehci->lock) if (unlikely(urb->unlinked)) { COUNT(ehci->stats.unlink); } else { - if (likely(status == ...
c6dbf554bc8a79c9caab3dbf891a33c19068f646
Analyze and fix the following issue in the Linux kernel code: USB: cdc-acm: signedness fix
Problem Details: Fix bogus assignment of "unsigned char *" to "char *": preserve unsignedness. These values are used directly as descriptor lengths when iterating through the buffer, so this *could* cause oddness that potentially includes oopsing. (IMO not likely, except as part of a malicious device...) Fix the bo...
```diff diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index d9b408113921..6d57413ac0f5 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -804,7 +804,7 @@ static int acm_probe (struct usb_interface *intf, { struct usb_cdc_union_desc *union_header = NULL; struct u...
29fab0cd897519be9009ba8c898410ab83b378e9
Analyze and fix the following issue in the Linux kernel code: USB: r8a66597-hcd: fix usb device connection timing
Problem Details: Fix the problem that enumeration of a USB device was slow. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index dac2f7dd69b9..bb48f42bd7ce 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -900,10 +900,19 @@ static void pipe_irq_disable(struct r8a66597 *r8a66597, u16 pipenum) } /* this function mus...
6d8791076c7742c65dd796ae0ac260ab22e85517
Analyze and fix the following issue in the Linux kernel code: USB: r8a66597-hcd: fix interrupt transfer interval
Problem Details: This driver ignored the value of bInterval and revised the problem that performed interrupt transfer. ASIX USB Ethernet adapter comes to work with this host controller by applying this patch. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@su...
```diff diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index b46ff9a80b66..dac2f7dd69b9 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -46,7 +46,7 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Yoshihiro Shimoda"); MODULE_ALIAS("platform:r8a66597_hcd");...
97af0a911bfb1e798c395c6ebabb4731f821736f
Analyze and fix the following issue in the Linux kernel code: USB: oti6858: fix TCFLSH ioctl handling
Problem Details: Removes unimplemented TCFLSH handling from oti6858, because it was preventing TCFLSH handling by upper layer (line discipline) drivers (see drivers/char/tty_io.c line 3450). Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah...
```diff diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index a3847d6c946e..8acc907a3181 100644 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c @@ -814,10 +814,6 @@ static int oti6858_ioctl(struct usb_serial_port *port, struct file *file, __FUNCTION__, port->number, c...
21da84a89312dd8d014ca3352d1ab5c2279ec548
Analyze and fix the following issue in the Linux kernel code: USB: ehci shutdown refactored
Problem Details: This patch refactors some shutdown code so it can be shared between ehci_stop() and ehci_shutdown(). This also fixes a couple potential bugs: - ehci_shutdown() was not locking ehci->lock before halting the HC. - ehci_shutdown() didn't disable the watchdog and IAA timers. - ehci_stop() was resetting...
```diff diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index a02dcff5eb21..369a8a5ea7bb 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -331,17 +331,13 @@ static void ehci_turn_off_all_ports(struct ehci_hcd *ehci) &ehci->regs->port_status[port]); } -/* ehci_...
0e530b45783f75a29bde20bbf9e287c915a4f68b
Analyze and fix the following issue in the Linux kernel code: USB: gadget section fixes
Problem Details: Restore some section annotations: they were switched to "__devinit" while they should have been "__init", because of bogus warnings. The warnings are now fixed, so the runtime footprint of various drivers can now shrink a bit. On ARMv5, it's about 600 bytes except for the Ethernet gadget, where it c...
```diff diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index f9d07108bc30..8bdad221fa91 100644 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c @@ -34,12 +34,12 @@ /* we must assign addresses for configurable endpoints (like net2280) */ -static __devinitda...
0d22f65515307c878ddd20b1305cce925ca9516c
Analyze and fix the following issue in the Linux kernel code: USB: OHCI: fix bug in controller resume
Problem Details: This patch (as1063) fixes a bug in the way ohci-hcd resumes its controllers. It leaves the Master Interrupt Enable bit turned off. If the root hub is resumed immediately this won't matter. But if the root hub is suspended (say because no devices are plugged in), it won't ever wake up by itself. Sig...
```diff diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index d0360f65ebd9..b0e2275755c8 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c @@ -312,11 +312,13 @@ static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) static int ohci_pci_resume (struct u...
9063ff44f081a0297085952f6760dfe1f8ca840e
Analyze and fix the following issue in the Linux kernel code: USB: gadget: dummy_hcd.c: fix nested switch statements
Problem Details: Fix a messed up combination of two nested switch statements in drivers/usb/gadget/dummy_hcd.c. According to the USB spec (section 5.8.3) the maximum packet size for bulk endpoints can be 512 for high-speed devices and 8, 16, 32 or 64 for full-speed devices. Low-speed devices must not have bulk endpoi...
```diff diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index e454775c2ff2..433f8c47cce5 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -365,16 +365,14 @@ dummy_enable (struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) case USB_SPEED_HIG...
73d79aaba9ee21aaa1a6676f568ef7b3bdf993ea
Analyze and fix the following issue in the Linux kernel code: USB: mem leak fixes for AMD 5536 UDC high/full speed USB device controller driver
Problem Details: In drivers/usb/gadget/amd5536udc.c::udc_pci_probe(), sizeof(struct udc) storage is allocated for 'dev'. There are many exit points from the function where 'dev' is not free'd but has also not yet been used for anything. The following patch free's 'dev' at the return points where it has not yet been u...
```diff diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c index b663f23f2642..fc6f3483be44 100644 --- a/drivers/usb/gadget/amd5536udc.c +++ b/drivers/usb/gadget/amd5536udc.c @@ -3248,6 +3248,8 @@ static int udc_pci_probe( /* pci setup */ if (pci_enable_device(pdev) < 0) { + kfree(dev...
cc901bbb2e2a4e4f96da3d70dae332882c10054b
Analyze and fix the following issue in the Linux kernel code: USB: g_printer bugfixes
Problem Details: G_PRINTER: Bug fix for blocking reads and a fix for a memory leak. This fixes bugs in blocking IO calls. When the poll() entry point is called receive transfers will be setup if they have not already been. Another bug fix is that the poll() entry point now checks the current receive buffer for data wh...
```diff diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 2c32bd08ee7d..ecc1410073f4 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c @@ -390,9 +390,12 @@ static void rx_complete(struct usb_ep *ep, struct usb_request *req) /* normal completion */ case 0: - ...
119fc8c9acde650fb92b44c34ea6fc84feb0f6dd
Analyze and fix the following issue in the Linux kernel code: USB: test for NULL return from platform_get_resource() in ohci_hcd_sm501_drv_remove()
Problem Details: platform_get_resource() may return null, so although it seems it will never do so here unless there's a bug elsewhere, it does no harm to be defensive and test. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Magnus Damm <magnus.d...
```diff diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c index ab1e366d7790..54b6ac2e3e4a 100644 --- a/drivers/usb/host/ohci-sm501.c +++ b/drivers/usb/host/ohci-sm501.c @@ -199,7 +199,8 @@ static int ohci_hcd_sm501_drv_remove(struct platform_device *pdev) usb_put_hcd(hcd); dma_release_decl...
44a29fd715a017183e83377b297ab3f792995467
Analyze and fix the following issue in the Linux kernel code: USB: fix comments of 2 functions in hcd.c
Problem Details: Remove useless @type note for rh_string() and @r note for usb_hcd_irq() since this two parameters were removed. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index e52ed1663b3c..f936de75f44e 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -291,7 +291,6 @@ static int ascii2utf (char *s, u8 *utf, int utfmax) * rh_string - provides manufacturer, product and serial strings for root hub ...
69a90f8189960f37cc73f5da6c331b23227e2197
Analyze and fix the following issue in the Linux kernel code: USB: Serial: Sierra: C597 fix
Problem Details: This patch is for the sierra driver and fixes a Compass 597 bug that allows users to access the SD-Card. This targets kernel 2.6.25-rc7 Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 5e55959daaaf..af667a1828b0 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -155,7 +155,7 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ ...
d43a05fdc2b5675efc45c32d427ff987a10b617a
Analyze and fix the following issue in the Linux kernel code: USB: Fix "cut and paste" booboo in usbmon Makefile.
Problem Details: Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/mon/Makefile b/drivers/usb/mon/Makefile index 90c59535778d..0f76ed5e1617 100644 --- a/drivers/usb/mon/Makefile +++ b/drivers/usb/mon/Makefile @@ -1,5 +1,5 @@ # -# Makefile for USB Core files and filesystem +# Makefile for USB monitor # usbmon-objs := mon_main.o mon_stat.o mon_text....
afd0e0f2d499a832c3ef17a6872d6244d65cbe17
Analyze and fix the following issue in the Linux kernel code: USB: Remove EXPERIMENTAL tags from some USB gadget Kconfig entries.
Problem Details: Based on a recent discussion on the Linux USB mailing list, remove the designation of EXPERIMENTAL from some USB gadget entries, and tag some of them as DEVELOPMENT. just for fun, i added a bit of help for gadgetfs, explaining the race condition. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca...
```diff diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index d681bb27fa58..f7b54651dd42 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -44,8 +44,8 @@ menuconfig USB_GADGET if USB_GADGET config USB_GADGET_DEBUG - boolean "Debugging messages" - depends on USB_GADGET ...
e1879b19b0abdb387e4aeb0b935a486cc75042fb
Analyze and fix the following issue in the Linux kernel code: USB: ipaq: fix devices having more than one endpoint
Problem Details: The ipaq module supports devices with one endpoint only. Some devices, e.g. Yakumo Delta 300, have more than one endpoint. This patch fixes support for devices having up to 2 endpoints which used to work on older kernel versions. Signed-off-by: Matthias Geissert <matthias.geissert@web.de> Signed-off...
```diff diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 9b38a08ac83a..17f2a53b8ba4 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c @@ -571,9 +571,9 @@ static struct usb_serial_driver ipaq_device = { .usb_driver = &ipaq_driver, .id_table = ipaq_id_table, .num_inte...