id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
11f2a61ab418305167f9a3f3a31a50449222f64b
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix possible negative array index in acpi_ut_validate_exception
Problem Details: Added NULL fields to the exception string arrays to eliminate the -1 subtraction on the SubStatus field. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
```diff diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index 1f057b71db1a..47354d9b0e56 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c @@ -64,7 +64,7 @@ ACPI_MODULE_NAME("utmisc") **********************************************************************...
c91d924e3af08d4f98eab6ebf81f2b8ce132448f
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for hang on GPE method invocation
Problem Details: Fixes problem where the new method argument count validation mechanism will enter an infinite loop when a GPE method is dispatched. Problem fixed be removing the obsolete code that passes GPE block information to the notify handler via the control method parameter pointer. Signed-off-by: Bob Moore <ro...
```diff diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index 2509809a36cf..4613b9ca5792 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c @@ -377,7 +377,6 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, } info->parameter...
d1857056904d5f313f11184fcfa624652ff9620a
Analyze and fix the following issue in the Linux kernel code: ACPI: don't walk tables if ACPI was disabled
Problem Details: Ingo Molnar wrote: > -tip auto-testing started triggering this spinlock corruption message > yesterday: > > [ 3.976213] calling acpi_rtc_init+0x0/0xd3 > [ 3.980213] ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread F7C50000 could not acquire Mutex [3] [20080321] > [ 3.992213] BUG: spinl...
```diff diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 9b227d4dc9c9..6d18ca34b6aa 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -333,6 +333,9 @@ static int __init acpi_rtc_init(void) { struct device *dev = get_rtc_dev(); + if (acpi_disabled) + return 0; + if (acpi_disabled) retu...
47c00d2bc2ef2cf8a608688144fe2093a2aa9507
Analyze and fix the following issue in the Linux kernel code: ACPICA: fix mutex names in debug code.
Problem Details: Reorder the mutex names to match the preceding #defines Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
```diff diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index c5cdc32ac2f8..62d7468ed3f9 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h @@ -98,8 +98,8 @@ union acpi_parse_object; static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = { "ACPI_MTX_Interpreter", - "ACPI_MTX_Tables", "ACP...
e38e8a0743b0e996a8a3fbea8908fe75a84f02c7
Analyze and fix the following issue in the Linux kernel code: Make GPE disable more robust
Problem Details: Implemented another change for the GPE disable. We now perform a read-change-write of the enable register instead of simply writing out the cached enable mask. This will prevent inadvertent enabling of GPEs if a rogue GPE is received during initialization (before GPE handlers are installed.) http://bu...
```diff diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c index 5354be44f876..e0339d4139a4 100644 --- a/drivers/acpi/events/evgpe.c +++ b/drivers/acpi/events/evgpe.c @@ -256,7 +256,7 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) return_ACPI_STATUS(status); } ...
12b2b34e240a24bdbb2fdacf26a54b24ebf1ed81
Analyze and fix the following issue in the Linux kernel code: acpi: fix printk format warning
Problem Details: Fix printk format warning: linux-next-20080617/drivers/acpi/processor_throttling.c:1258: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.i...
```diff diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index 53345dbc5027..0622ace05220 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c @@ -1255,7 +1255,7 @@ static ssize_t acpi_processor_write_throttling(struct file *file, if (state_v...
3d532d5e3882c1387a2722df2a368c4a9224b12f
Analyze and fix the following issue in the Linux kernel code: ACPI: fix processor throttling set error
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=9704 When echo some invalid values to /proc/acpi/processor/*/throttling, there isn't any error info returned, on the contray, it sets throttling value to some T* successfully, obviously, this is incorrect, a correct way should be to let it fail and return err...
```diff diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index 8728782aad3b..53345dbc5027 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c @@ -1232,7 +1232,10 @@ static ssize_t acpi_processor_write_throttling(struct file *file, int result...
6594d87ebd8371f4b67f7ab4b68f172b139b78d6
Analyze and fix the following issue in the Linux kernel code: ACPI: fix acpi fan state set error
Problem Details: Under /proc/acpi, there is a fan control interface, a user can set 0 or 3 to /proc/acpi/fan/*/state, 0 denotes D0 state, 3 denotes D3 state, but in current implementation, a user can set a fan to D1 state by any char excluding '1', '2' and '3'. For example: [root@localhost acpi]# cat /proc/acpi/fan/C...
```diff diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index 6cf10cbc1eee..55c17afbe669 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c @@ -148,7 +148,7 @@ acpi_fan_write_state(struct file *file, const char __user * buffer, int result = 0; struct seq_file *m = file->private_data; struct acpi_device...
74523c901342a773ddd9f14c14539ec3d4197ecf
Analyze and fix the following issue in the Linux kernel code: ACPI: fix checkpatch.pl complaints in scan.c
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=9772 Signed-off-by: Alok N Kataria <akataria@vmware.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
```diff diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 9a84ed250d9f..5b049cd79553 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -6,7 +6,8 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/acpi.h> -#include <asm/signal.h> +#include <linux/signal.h> +#include <linux/kth...
9f1eb99c757939b0b1783f926130993e9c298bae
Analyze and fix the following issue in the Linux kernel code: create sysfs link from acpi device to sysdev for cpu
Problem Details: Sys I/F under acpi device node and sysdev device node are both needed for cpu hot-removal. User space need this link so that they know they are poking the sys I/F for the same cpu. http://bugzilla.kernel.org/show_bug.cgi?id=9772 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <...
```diff diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 1c0008edccda..feddc8ed870a 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -621,7 +621,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device) int result = 0; acpi_status sta...
b62b8ef906cdf7115af579ce7378886ce3e0ce00
Analyze and fix the following issue in the Linux kernel code: force offline the processor during hot-removal
Problem Details: The ACPI device node for the cpu has already been unregistered when acpi_processor_handle_eject is called. Thus we should offline the cpu and continue, rather than a failure here. http://bugzilla.kernel.org/show_bug.cgi?id=9772 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <l...
```diff diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 9dd0fa93b9e1..1c0008edccda 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -1014,9 +1014,9 @@ static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu) static int acpi_proces...
26d46867b7d27f68a446b073dac7817721ae4c8f
Analyze and fix the following issue in the Linux kernel code: fix a deadlock issue when poking "eject" file
Problem Details: "/sys/devices/LNXSYSTM:00/.../eject" is used to evaluate _EJx method and eject a device in user space. But system hangs when poking the "eject" file because that the device hot-removal code invoke the driver .remove method which will try to remove the "eject" file as a result. Queues the hot-removal f...
```diff diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 6d85289f1c12..9a84ed250d9f 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -6,6 +6,7 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/acpi.h> +#include <asm/signal.h> #include <acpi/acpi_drivers.h> #include <ac...
64f097331928b01d704047c1dbc738bb6d2a9bf9
Analyze and fix the following issue in the Linux kernel code: x86 ptrace: unify TIF_SINGLESTEP
Problem Details: This unifies the treatment of TIF_SINGLESTEP on i386 and x86_64. The bit is now excluded from _TIF_WORK_MASK on i386 as it has been on x86_64. This means the do_notify_resume() path using it is never used, so TIF_SINGLESTEP is not cleared on returning to user mode. Both now leave TIF_SINGLESTEP set w...
```diff diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 6bc07f0f1202..0ad987d02b72 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S @@ -383,10 +383,6 @@ syscall_exit: # setting need_resched or sigpending # between sampling and the iret TRACE_IRQS_OFF - te...
6718d0d6da2749d3bff522e6057e97e6aa85e4d1
Analyze and fix the following issue in the Linux kernel code: x86 ptrace: block-step fix
Problem Details: The enable_single_step() logic bails out early if TF is already set. That skips some of the bookkeeping that keeps things straight. This makes PTRACE_SINGLEBLOCK break the behavior of a user task that was already setting TF itself in user mode. Fix the bookkeeping to notice the old TF setting as it sh...
```diff diff --git a/arch/x86/kernel/step.c b/arch/x86/kernel/step.c index 92c20fee6781..0d2cb363ea75 100644 --- a/arch/x86/kernel/step.c +++ b/arch/x86/kernel/step.c @@ -105,6 +105,7 @@ static int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs) static int enable_single_step(struct task_struct *c...
3c3622dcb64c76c9abd2e468f802db9ba523421c
Analyze and fix the following issue in the Linux kernel code: Fix compile issues in fs/compat_ioctl.c when CONFIG_BLOCK is disabled
Problem Details: Fix fs/compat_ioctl.c to handle CONFIG_BLOCK=n, CONFIG_SCSI=n to avoid build errors: In file included from include/scsi/scsi.h:12, from fs/compat_ioctl.c:71: include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_...
```diff diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 97dba0d92348..c54eaab71a19 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -69,9 +69,11 @@ #include <linux/capi.h> #include <linux/gigaset_dev.h> +#ifdef CONFIG_BLOCK #include <scsi/scsi.h> #include <scsi/scsi_ioctl.h> #include <scsi/sg.h...
e3621ee633810be1079d0fa65ac2c904f53b73fa
Analyze and fix the following issue in the Linux kernel code: powerpc/ep8248e: Fix compile problem if !CONFIG_FS_ENET
Problem Details: If we don't enable FS_ENET we get build issues: arch/powerpc/platforms/built-in.o: In function `ep8248e_mdio_probe': arch/powerpc/platforms/82xx/ep8248e.c:129: undefined reference to `alloc_mdio_bitbang' arch/powerpc/platforms/82xx/ep8248e.c:143: undefined reference to `mdiobus_register' Signed-off-b...
```diff diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index d5770fdf7f09..373e993a5ed5 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c @@ -59,6 +59,7 @@ static void __init ep8248e_pic_init(void) of_node_put(np); } +#ifdef C...
bef5b54bd7bf8117c75cb943d64549134c6d9a1f
Analyze and fix the following issue in the Linux kernel code: Fix MIPS cross-compile problem
Problem Details: Crosscompiling on a Fedora 9 machine running gcc 4.3.0 as its host compiler and gcc 3.4.6 for the mips-linux target results in the following build error: $ make malta_defconfig $ make cc1: error: unrecognized command line option "-fno-stack-protector" scripts/kconfig/conf -s arch/mips/Kconfig cc1: err...
```diff diff --git a/Makefile b/Makefile index 8a2a275be304..1564577bdc53 100644 --- a/Makefile +++ b/Makefile @@ -508,6 +508,8 @@ else KBUILD_CFLAGS += -O2 endif +include $(srctree)/arch/$(SRCARCH)/Makefile + ifneq (CONFIG_FRAME_WARN,0) KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN}) ...
79e36a9f54aaf4a52eb2d9520953aa3960e99294
Analyze and fix the following issue in the Linux kernel code: IDE: Fix HDIO_DRIVE_RESET handling
Problem Details: Currently, the code path executing an HDIO_DRIVE_RESET ioctl is broken in various ways. Most importantly, it is treated as an out of band request in an illegal way which may very likely lead to system lock ups. Use the drive's request queue to avoid this problem (and fix a locking issue for free along...
```diff diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 28057747c1f8..2b33c129740b 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -766,6 +766,18 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, return ide_stopped; } +static ide_startstop_t ide_special_rq(ide_drive_t...
47bc7e7425d198ad1f8c4597b0bf28619fcce0fd
Analyze and fix the following issue in the Linux kernel code: rapide: fix rapide_probe() return value
Problem Details: Return -ENOENT on ide_find_port() failure. While at it: - Cleanup rapide_probe() a bit. Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c index bb081ad53f31..43057e0303c8 100644 --- a/drivers/ide/arm/rapide.c +++ b/drivers/ide/arm/rapide.c @@ -48,24 +48,26 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) goto release; } - hwif = ide_find_port(); - if (hwi...
ff23712e791fd80f3b088d5e1c5733c0944cfe64
Analyze and fix the following issue in the Linux kernel code: ide: remove needless includes from setup-pci.c (take 2)
Problem Details: v2: * sparc build fix. (From Stephen Rothwell) Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 4321d20fe874..65fc08b6b6d0 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c @@ -6,19 +6,15 @@ * May be copied or modified under the terms of the GNU General Public License */ -#include <linux/module.h> #include <linux...
ad15e9fc8913b704978ffdda7d1f31c79ed6814d
Analyze and fix the following issue in the Linux kernel code: ide: remove needless includes from ide-taskfile.c (take 2)
Problem Details: v2: On Sunday 15 June 2008, Geert Uytterhoeven wrote: > As ide-taskfile.c uses scatterlists, it should include <linux/scatterlist.h>. (v1 broke IDE build on m68k, thanks to Geert for finding the bug) Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gma...
```diff diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 0d0bf292c418..1fbdb746dc88 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -8,28 +8,18 @@ * The big the bad and the ugly. */ -#include <linux/module.h> #include <linux/types.h> #include <linux/string....
eb3aff5530d22eb4be0a99c9d39c9ffde7b9891a
Analyze and fix the following issue in the Linux kernel code: ide: print message on error in ide_find_port_slot()
Problem Details: * Add DRV_NAME define to ide-h8300.c. * Fix ide-h8300.c, swarm.c and sgiioc4.c to set .name field in struct ide_port_info to DRV_NAME, then convert these host drivers to use ide_find_port_slot() instead of ide_find_port(). * Print message on error in ide_find_port_slot(). Signed-off-by: Bartlomi...
```diff diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c index ff6a98afefb7..c445298f7eb8 100644 --- a/drivers/ide/h8300/ide-h8300.c +++ b/drivers/ide/h8300/ide-h8300.c @@ -8,6 +8,8 @@ #include <asm/io.h> #include <asm/irq.h> +#define DRV_NAME "ide-h8300" + #define bswap(d) \ ({ \ ...
b48c89a9699f451e4e236fa7313461281c00e69b
Analyze and fix the following issue in the Linux kernel code: cmd640: add ->init_dev method
Problem Details: Convert the driver to use ->init_dev method instead of open-coding devices init in cmd640x_init(). While at it: - fix printk()-s to use KERN_INFO level instead of the default KERN_ERR - use DRV_NAME define in printk()-s - set proper ->pio_mask also for CONFIG_BLK_DEV_CMD640_ENHANCED=n There should...
```diff diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index ab7d7274d8b1..1ad1e23e3105 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c @@ -611,11 +611,40 @@ static void cmd640_set_pio_mode(ide_drive_t *drive, const u8 pio) display_clocks(index); } +#endif /* CONFIG_BLK_DEV_C...
a698400a1556cf9f0376d1a41e536973dd5c4747
Analyze and fix the following issue in the Linux kernel code: cmd640: fix warm-plug support for the secondary interface
Problem Details: Register secondary interface also when user requested not to probe devices. While at it: - remove write-only second_port_toggled variable Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index baa26a26709a..ab7d7274d8b1 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c @@ -687,9 +687,6 @@ static int cmd640x_init_one(unsigned long base, unsigned long ctl) */ static int __init cmd640x_init(void) { -#ifdef CONF...
c1da678b5b4d8ce7836ed1ded80109d1db37efe0
Analyze and fix the following issue in the Linux kernel code: ide: tighten checks on PCI BARs in ide_hwif_configure()
Problem Details: Alan has fixed PCI layer handling of PCI IDE in Compatibility mode so PCI BAR 0/1 (and/or 2/3) content reported by kernel should never be zero. Tighten checks on PCI BARs and also fix printk() message while on it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 3dea5a59626e..166211f53f17 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c @@ -319,18 +319,18 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ctl = pci_resource_start(dev, 2*port+1); base = pci_resourc...
f333f92bf9040fb63d13c184295629c7a0ff449f
Analyze and fix the following issue in the Linux kernel code: ide_4drives: use struct ide_port_info
Problem Details: Convert the driver to use struct ide_port_info - as a nice side-effect this fixes hwif->channel initialization. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/legacy/ide-4drives.c b/drivers/ide/legacy/ide-4drives.c index ecae916a3385..5cd6ce537eea 100644 --- a/drivers/ide/legacy/ide-4drives.c +++ b/drivers/ide/legacy/ide-4drives.c @@ -11,6 +11,23 @@ static int probe_4drives; module_param_named(probe, probe_4drives, bool, 0); MODULE_PARM_DES...
256c5f8eef7b9a8c8a85c15c58cda9df455f947e
Analyze and fix the following issue in the Linux kernel code: ide: fix hwif-s initialization
Problem Details: * Add ide_hwifs[] entry initialization to ide_find_port_slot() and remove ide_init_port_data() calls from host drivers. * Unexport ide_init_port_data(). * Remove no longer needed init_ide_data(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c index 9b8a45d2cf17..c79b85b6e4a3 100644 --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c @@ -400,7 +400,6 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) i = hwif->index; - ide_init_po...
9ad540937554a3779c5fe7af13aa390b1d2aeb3e
Analyze and fix the following issue in the Linux kernel code: ide: move PIO blacklist to ide-pio-blacklist.c
Problem Details: Move PIO blacklist to ide-pio-blacklist.c. While at it: - fix comment - fix whitespace damage There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile index cb1350684c9a..8605536ea18f 100644 --- a/drivers/ide/Makefile +++ b/drivers/ide/Makefile @@ -11,7 +11,8 @@ EXTRA_CFLAGS += -Idrivers/ide -ide-core-y += ide.o ide-io.o ide-iops.o ide-lib.o ide-probe.o ide-taskfile.o +ide-core-y += ide.o ide-io...
b96f7384646519da54ad50bfad8d53b915b70cb3
Analyze and fix the following issue in the Linux kernel code: ide-mpc8xx: convert to use ide_timing_find_mode()
Problem Details: Also fix (disabled) debugging code while at it. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c index 236f9c38e519..33bc699814d7 100644 --- a/drivers/ide/ppc/mpc8xx.c +++ b/drivers/ide/ppc/mpc8xx.c @@ -89,7 +89,7 @@ ide_ioport_desc_t ioport_dsc[MAX_HWIFS] = { #endif /* IDE0_BASE_OFFSET */ }; -ide_pio_timings_t ide_pio_clocks[6]; +struct ...
f06ab3402aa2d6de060442c1053ea10b24b65076
Analyze and fix the following issue in the Linux kernel code: ide: convert ide-timing.h to ide-timings.c library (take 2)
Problem Details: * Don't include ide-timing.h in cs5535 and sis5513 host drivers (they don't need it currently). * Convert ide-timing.h to ide-timings.c library and add CONFIG_IDE_TIMINGS config option to be selected by host drivers using the library. While at it: - fix ide_timing_find_mode() placement v2: * Ad...
```diff diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index cd08dba8261b..994b6d39b559 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig @@ -98,6 +98,9 @@ if BLK_DEV_IDE comment "Please see Documentation/ide/ide.txt for help/info on IDE drives" +config IDE_TIMINGS + bool + config IDE_ATAPI boo...
2c139e7a7152f66ff93b173f8770c94ea53a691e
Analyze and fix the following issue in the Linux kernel code: ide: checkpatch.pl fixes for ide-timing.h
Problem Details: Also fix placement of comments in ide_timing_compute() while at it. There should be no functional changes caused by this patch (md5sum was verified to be the same before/after the patch). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-timing.h b/drivers/ide/ide-timing.h index a401d8f82b50..98e05f545450 100644 --- a/drivers/ide/ide-timing.h +++ b/drivers/ide/ide-timing.h @@ -3,9 +3,7 @@ /* * Copyright (c) 1999-2001 Vojtech Pavlik - */ - -/* + * * This program is free software; you can redistribute it and/o...
f0ffc9872e972e9d9fe8f7ae577ff046dbdba51b
Analyze and fix the following issue in the Linux kernel code: ide: remove unused XFER_UDMA_SLOW
Problem Details: Remove unused XFER_UDMA_SLOW from ide_timing[]. While at it: - fix re-defining XFER_PIO_5 (no need to define it in ide-timing.h as it is defined in <linux/ata.h> which is included by <linux/hdreg.h>) - fix whitespace damage There should be no functional changes caused by this patch. Acked-by: Se...
```diff diff --git a/drivers/ide/ide-timing.h b/drivers/ide/ide-timing.h index 2e91c5870b4c..a20c4cbbfcdb 100644 --- a/drivers/ide/ide-timing.h +++ b/drivers/ide/ide-timing.h @@ -28,9 +28,6 @@ #include <linux/kernel.h> #include <linux/hdreg.h> -#define XFER_PIO_5 0x0d -#define XFER_UDMA_SLOW 0x4f - struct ide_ti...
bd4bc3dbded9cd7b2bdca6bba1aecb4251a8039d
Analyze and fix the following issue in the Linux kernel code: i2c: Clear i2c_adapter.dev on adapter removal
Problem Details: Clear i2c_adapter.dev on adapter removal. This makes it possible to re-add the adapter at a later point, which some drivers (i2c-amd756-s4882, i2c-nforce2-s4985) actually do. This fixes a bug reported by John Stultz here: http://lkml.org/lkml/2008/7/15/720 and by Ingo Molar there: http://lkml.org/...
```diff diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c index 2f150e33c74c..72872d1e63ef 100644 --- a/drivers/i2c/busses/i2c-amd756-s4882.c +++ b/drivers/i2c/busses/i2c-amd756-s4882.c @@ -155,6 +155,16 @@ static int __init amd756_s4882_init(void) int i, error; union i2c_sm...
e22146e610bb7aed63282148740ab1d1b91e1d90
Analyze and fix the following issue in the Linux kernel code: x86: fix kernel_physical_mapping_init() for large x86 systems
Problem Details: Fix bug in kernel_physical_mapping_init() that causes kernel page table to be built incorrectly for systems with greater than 512GB of memory. Signed-off-by: Jack Steiner <steiner@sgi.com> Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 27de2435e008..306049edd553 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -644,7 +644,7 @@ static unsigned long __init kernel_physical_mapping_init(unsigned long start, unsigned long pud_phys; pud_t *pud; - next = start...
d25dc7fd4740decf4c66e2f17dbaa288448fabd5
Analyze and fix the following issue in the Linux kernel code: Fix 'make clean' and .gitignore for firmware/ directory.
Problem Details: Provide a .gitignore file, and fix a typo which prevented some of the generated binary files from being removed on 'make clean'. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Reported-and-tested-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-founda...
```diff diff --git a/firmware/.gitignore b/firmware/.gitignore new file mode 100644 index 000000000000..d9c69017bc9a --- /dev/null +++ b/firmware/.gitignore @@ -0,0 +1,6 @@ +*.gen.S +*.fw +*.bin +*.csp +*.dsp +ihex2fw diff --git a/firmware/Makefile b/firmware/Makefile index e4f2fb3d1917..9fe86041f86e 100644 --- a/firmw...
34646bca474142e1424e5f6c4a33cb2ba0930ea1
Analyze and fix the following issue in the Linux kernel code: x86, paravirt-spinlocks: fix boot hang
Problem Details: the paravirt-spinlock patches caused a boot hang with this config: http://redhat.com/~mingo/misc/config-Wed_Jul__9_14_47_04_CEST_2008.bad i have bisected it down to: | commit e17b58c2e85bc2ad2afc07fb8d898017c2b75ed1 | Author: Jeremy Fitzhardinge <jeremy@goop.org> | Date: Mon Jul 7 12:07:53 200...
```diff diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 5112c84f5421..78d52171400b 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -7,10 +7,11 @@ extra-y := head_$(BITS).o head$(BITS).o head.o init_task.o vmlinu CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) i...
9af98578d6af588f52d0dacd64fe42caa405a327
Analyze and fix the following issue in the Linux kernel code: x86: paravirt spinlocks, modular build fix
Problem Details: fix: MODPOST 408 modules ERROR: "pv_lock_ops" [net/dccp/dccp.ko] undefined! ERROR: "pv_lock_ops" [fs/jbd2/jbd2.ko] undefined! ERROR: "pv_lock_ops" [drivers/media/common/saa7146_vv.ko] undefined! Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 6aa8aed06d54..3edfd7af22ae 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c @@ -472,6 +472,7 @@ struct pv_lock_ops pv_lock_ops = { .spin_unlock = __ticket_spin_unlock, #endif }; +EXPORT_SYMBOL_GPL(pv_lock_ops)...
4bb689eee12ceb6d669a0c9a519037c049a8af38
Analyze and fix the following issue in the Linux kernel code: x86: paravirt spinlocks, !CONFIG_SMP build fixes
Problem Details: Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index bba4041bb7ff..6aa8aed06d54 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c @@ -270,11 +270,13 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void) void __init paravirt_use_bytelocks(void) { +#ifdef CONFIG_...
71415c6a0877d5944d5dc3060f3b03513746158d
Analyze and fix the following issue in the Linux kernel code: x86, xen, vdso: fix build error
Problem Details: fix: arch/x86/xen/built-in.o: In function `xen_enable_syscall': (.cpuinit.text+0xdb): undefined reference to `sysctl_vsyscall32' Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 9cce4a92aac0..3e11779755c3 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -144,7 +144,9 @@ void __cpuinit xen_enable_syscall(void) if (ret != 0) { printk(KERN_INFO "Xen: 32-bit syscall not supported: disabling vdso\n"); s...
b3fe124389f9dd97f0bbd954da2910e286648f0f
Analyze and fix the following issue in the Linux kernel code: xen64: fix build error on 32-bit + !HIGHMEM
Problem Details: fix: arch/x86/xen/enlighten.c: In function 'xen_set_fixmap': arch/x86/xen/enlighten.c:1127: error: 'FIX_KMAP_BEGIN' undeclared (first use in this function) arch/x86/xen/enlighten.c:1127: error: (Each undeclared identifier is reported only once arch/x86/xen/enlighten.c:1127: error: for each function it...
```diff diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 776c0fb77d69..3da6acb7eafc 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -1124,7 +1124,9 @@ static void xen_set_fixmap(unsigned idx, unsigned long phys, pgprot_t prot) #ifdef CONFIG_X86_32 case FIX_WP_TEST: cas...
9c8a4420444801bd9d818f542eb4a5be8d5687f0
Analyze and fix the following issue in the Linux kernel code: xen64: fix !HVC_XEN build dependency
Problem Details: fix: arch/x86/xen/built-in.o: In function `set_page_prot': enlighten.c:(.text+0x111d): undefined reference to `xen_raw_printk' arch/x86/xen/built-in.o: In function `xen_start_kernel': : undefined reference to `xen_raw_console_write' arch/x86/xen/built-in.o: In function `xen_start_kernel': : undefined ...
```diff diff --git a/include/xen/hvc-console.h b/include/xen/hvc-console.h index 98b79bc404dd..c3adde32669b 100644 --- a/include/xen/hvc-console.h +++ b/include/xen/hvc-console.h @@ -5,11 +5,12 @@ extern struct console xenboot_console; #ifdef CONFIG_HVC_XEN void xen_console_resume(void); +void xen_raw_console_write...
5deb30d194d28b6bf7dacfb758267a51bf7c5b78
Analyze and fix the following issue in the Linux kernel code: xen: rework pgd_walk to deal with 32/64 bit
Problem Details: Rewrite pgd_walk to deal with 64-bit address spaces. There are two notible features of 64-bit workspaces: 1. The physical address is only 48 bits wide, with the upper 16 bits being sign extension; kernel addresses are negative, and userspace is positive. 2. The Xen hypervisor mapping is at...
```diff diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index eb31ed291b93..046c1f23dd6e 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -44,6 +44,7 @@ #include <asm/pgtable.h> #include <asm/tlbflush.h> +#include <asm/fixmap.h> #include <asm/mmu_context.h> #include <asm/paravirt.h> #include <asm...
ebd879e397f6361727c36267a12d1650710e465a
Analyze and fix the following issue in the Linux kernel code: xen: fix truncation of machine address
Problem Details: arbitrary_virt_to_machine can truncate a machine address if its above 4G. Cast the problem away. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Mark McLoughlin <markmc@redhat.com> Signed-off-by: In...
```diff diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 2579e70cdd08..05d7392a7a4c 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -186,7 +186,7 @@ xmaddr_t arbitrary_virt_to_machine(unsigned long address) BUG_ON(pte == NULL); - return XMADDR((pte_mfn(*pte) << PAGE_SHIFT) + offset); + retur...
e74359028d5489a281fb2c379a47b1d3cb14526e
Analyze and fix the following issue in the Linux kernel code: xen64: fix calls into hypercall page
Problem Details: The 64-bit calling convention for hypercalls uses different registers from 32-bit. Annoyingly, gcc's asm syntax doesn't have a way to specify one of the extra numeric reigisters in a constraint, so we must use explicitly placed register variables. Given that we have to do it for some args, may as wel...
```diff diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h index 0551b9d82ec4..d0c5dedcb001 100644 --- a/include/asm-x86/xen/hypercall.h +++ b/include/asm-x86/xen/hypercall.h @@ -40,83 +40,157 @@ #include <xen/interface/sched.h> #include <xen/interface/physdev.h> +/* + * The hypercall as...
ca15f20f1126f897500ade892a2d598a08da1b56
Analyze and fix the following issue in the Linux kernel code: xen: fix 64-bit hypercall variants
Problem Details: 64-bit guests can pass 64-bit quantities in a single argument, so fix up the hypercalls. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar...
```diff diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h index 2a4f9b41d684..0551b9d82ec4 100644 --- a/include/asm-x86/xen/hypercall.h +++ b/include/asm-x86/xen/hypercall.h @@ -223,12 +223,12 @@ static inline int HYPERVISOR_update_va_mapping(unsigned long va, pte_t new_val, unsig...
1ffb40b8ecdf314edd88dc5550d6bcbebf29970b
Analyze and fix the following issue in the Linux kernel code: xen-netfront: fix xennet_release_tx_bufs()
Problem Details: After restore on ia64 xen domain, kernel panics as follows. This patch fixes it. union skb_entry assumes sizeof(link->skb, pointer) == sizeof(list->link, unsigned). However this isn't true on ia64. So make link type unsigned long. And introduced two accesor. kernel unaligned access to 0xe00000000000...
```diff diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index ef671d1a3bf0..902bbe788215 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -92,7 +92,7 @@ struct netfront_info { */ union skb_entry { struct sk_buff *skb; - unsigned link; + unsigned long link; } t...
cbcd79c2e5b496b84845618cef734b4c40736576
Analyze and fix the following issue in the Linux kernel code: x86: use __page_aligned_data/bss
Problem Details: Update arch/x86's use of page-aligned variables. The change to arch/x86/xen/mmu.c fixes an actual bug, but the rest are cleanups and to set a precedent. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> C...
```diff diff --git a/arch/x86/kernel/cpu/common_64.c b/arch/x86/kernel/cpu/common_64.c index 7b8cc72feb40..15419cd3c5a4 100644 --- a/arch/x86/kernel/cpu/common_64.c +++ b/arch/x86/kernel/cpu/common_64.c @@ -16,6 +16,7 @@ #include <asm/i387.h> #include <asm/msr.h> #include <asm/io.h> +#include <asm/linkage.h> #inclu...
87b935a0ef9a1ddf62f2f0c0fc17b10654ff41cd
Analyze and fix the following issue in the Linux kernel code: x86: clean up formatting of __switch_to
Problem Details: process_64.c:__switch_to has some very old strange formatting, some of it dating back to pre-git. Fix it up. No functional changes. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Mark McLoughlin <...
```diff diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index a8e53626ac9a..e8a8e1b99817 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -537,8 +537,8 @@ static inline void __switch_to_xtra(struct task_struct *prev_p, struct task_struct * __switch_to(struct tas...
d67d1c7bf948341fd8678c8e337ec27f4b46b206
Analyze and fix the following issue in the Linux kernel code: nfs: set correct fl_len in nlmclnt_test()
Problem Details: fcntl(F_GETLK) on an nfs client incorrectly returns the values for the conflicting lock. fl_len value is always 1. If the conflicting lock is (0, 4095) the F_GETLK request for (1024, 10) returns (0, 1), which doesn't even cover the requested range, and is quite confusing. The fix is trivial, set fl_end...
```diff diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index 5df517b81f3f..fd7d4669776e 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -430,7 +430,7 @@ nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl) * Report the conflicting lock back to the application. */ fl->fl_start = r...
166b88d755f925139af7f7b75aa0a1b896ca0670
Analyze and fix the following issue in the Linux kernel code: SUNRPC: Use correct XDR encoding procedure for rpcbind SET/UNSET
Problem Details: The rpcbind versions 3 and 4 SET and UNSET procedures use the same arguments as the GETADDR procedure. While definitely a bug, this hasn't been a problem so far since the kernel hasn't used version 3 or 4 SET and UNSET. But this will change in just a moment. Signed-off-by: Chuck Lever <chuck.lever@o...
```diff diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index 24e93e0a0a22..0021fad464e0 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -426,6 +426,10 @@ static void rpcb_getport_done(struct rpc_task *child, void *data) map->r_status = status; } +/* + * XDR functions for rpcbind +...
3a628b0fd42f7eaf9d052447784d48ceae9ffb8e
Analyze and fix the following issue in the Linux kernel code: Don't crash on IOMMU overflow in A100U2W driver
Problem Details: Handle IOMMU overflow correctly, by retrying. IOMMU errors can happen and drivers must deal with them. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index f5051f4301d7..84bb61628372 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c @@ -840,7 +840,7 @@ static irqreturn_t orc_interrupt(struct orc_host * host) * Build a host adapter control block from the SCSI mid layer command */ ...
a5db33411ae762e597bfcde6bb9d0c8c2ea9c0eb
Analyze and fix the following issue in the Linux kernel code: BUG_ON on kernel misbehavior on A100U2W driver
Problem Details: With broken Sparc64 IOMMU accounting, the kernel submits larger requests then allowed. Better to crash on BUG than corrupt memory. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Linus Torvalds <torvalds@linux-found...
```diff diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index 1e8bdd457834..f5051f4301d7 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c @@ -866,6 +866,7 @@ static void inia100_build_scb(struct orc_host * host, struct orc_scb * scb, stru count_sg = scsi_dma_map(cmd); BUG_ON(count_sg ...
987ff954cda2a206f5e694f267b0ccad869c257c
Analyze and fix the following issue in the Linux kernel code: Fix endianity in A100U2W SCSI driver
Problem Details: Support big endian systems in a100u2w driver. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index ced3eebe252c..1dd0fcfe1d70 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c @@ -389,7 +389,7 @@ static u8 orc_load_firmware(struct orc_host * host) outb(PRGMRST | DOWNLOAD, host->base + ORC_RISCCTL); /* Enable SRAM programmin...
fe1a6875fcaaac2041945008a9875d2c07be1d9b
Analyze and fix the following issue in the Linux kernel code: mm: fix build on non-mmu machines
Problem Details: Commit 1ea0704e0d aka "mm: add a ptep_modify_prot transaction abstraction" caused: | CC init/main.o |In file included from include2/asm/pgtable.h:68, | from /home/bigeasy/git/linux-2.6-m68k/include/linux/mm.h:39, | from include2/asm/uaccess.h:8, | ...
```diff diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 4fce3db2cecc..ef87f889ef62 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -195,7 +195,6 @@ static inline int pmd_none_or_clear_bad(pmd_t *pmd) } return 0; } -#endif /* CONFIG_MMU */ static...
431ceb83f703a343bdd14350480a2224fa4bfedf
Analyze and fix the following issue in the Linux kernel code: x86: fix TSC build error on 32bit
Problem Details: Dave Hansen reported a build error on 32bit which went unnoticed as newer gcc versions seem to optimize unused static functions away before compiling them. Make vread_tsc() depend on CONFIG_X86_64 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 3c36f92160c9..7603c0553909 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -358,6 +358,7 @@ static cycle_t read_tsc(void) ret : clocksource_tsc.cycle_last; } +#ifdef CONFIG_X86_64 static cycle_t __vsyscall_fn vread_tsc(voi...
f6f88e9bfb6ced9871ed65ebe85c371de3c9e4be
Analyze and fix the following issue in the Linux kernel code: generic-ipi: more merge fallout
Problem Details: fix more API change fallout in recently merged upstream changes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index b40df7d2cf44..54759f1669d3 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c @@ -313,7 +313,7 @@ static int __init mipsxx_init(void) if (!cpu_has_mipsmt_pertccounters) c...
b3c9816b9fa9a7b75ab36111eb76eca03e5bab78
Analyze and fix the following issue in the Linux kernel code: generic-ipi: merge fix
Problem Details: fix merge fallout: arch/x86/pci/amd_bus.c: In function ‘enable_pci_io_ecs': arch/x86/pci/amd_bus.c:581: error: too many arguments to function ‘on_each_cpu' Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c index a18141ae3f02..dbf532369711 100644 --- a/arch/x86/pci/amd_bus.c +++ b/arch/x86/pci/amd_bus.c @@ -578,7 +578,7 @@ static int __init enable_pci_io_ecs(void) /* assume all cpus from fam10h have IO ECS */ if (boot_cpu_data.x86 < 0x10) r...
6d7bbbbacc5202eaabbc232681cc325b22a73eeb
Analyze and fix the following issue in the Linux kernel code: lockd: minor svclock.c style fixes
Problem Details: Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
```diff diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index bcf73f6e8226..51a0dea0ae8a 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c @@ -129,9 +129,9 @@ nlmsvc_lookup_block(struct nlm_file *file, struct nlm_lock *lock) static inline int nlm_cookie_match(struct nlm_cookie *a, struct nlm_cookie *b) ...
002b90a1bf5fe9c8de7a8634403a685621841ff3
Analyze and fix the following issue in the Linux kernel code: pcmcia: fix cisinfo_t removal
Problem Details: The cisinfo_t removal patch (c5081d5f4775b2a3f858f91151bbf9163e473075 pcmcia: simplify pccard_validate_cis ) introduced a bug that prevented card detection, for the (info->Chains == MAX_TUPLES) check was replaced by (count), which is always true. Restoring the comparison to MAX_TUPLES makes everybody h...
```diff diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index 9fcff0c33619..65129b54eb09 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c @@ -1490,7 +1490,7 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, unsigned ((tuple->TupleCode > 0x90) && (tuple->Tu...
d93c768e66d8c3970187c179a91a2553b077d9e8
Analyze and fix the following issue in the Linux kernel code: pcmcia: fix return value in cm4000_cs.c
Problem Details: should be -EINVAL, not EINVAL. Found by Peter Stuge. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 59ca35156d81..e4a4fbd37d7a 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -1439,7 +1439,7 @@ static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) DEBUGP(4, dev,...
cbbc4e818de4451cdef75a112b7fc8a523d5d2a0
Analyze and fix the following issue in the Linux kernel code: ide-floppy: fix unfortunate function naming
Problem Details: mv idefloppy_transfer_pc1 idefloppy_start_pc_transfer mv idefloppy_transfer_pc2 idefloppy_transfer_pc which describes their functionality and disambiguates them. There should be no functionality change introduced by this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlo...
```diff diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 0f3602a5efb0..b3689437269f 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c @@ -399,12 +399,8 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive) * service routine. In interrupt mode, the device sends an int...
cdca5c1f3b769eb2cdfc9cadc254cb74ba73c7d6
Analyze and fix the following issue in the Linux kernel code: ide-scsi: add more debugging to idescsi_pc_intr()
Problem Details: Add more debugging to idescsi_pc_intr() to match ide-tape's idetape_pc_intr(). While at it: * Correct the first debug message. This is a preparation for adding generic ide_pc_intr() helper. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index c0b39b9e5c14..ec9a5de2e75e 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -364,7 +364,7 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) u16 bcount; u8 stat, ireason; - debug_log("Reached %s interrupt...
4c93067ea9e5eca9d975bec74dae641228ac1bbe
Analyze and fix the following issue in the Linux kernel code: ide-floppy: add more debugging to idefloppy_pc_intr()
Problem Details: Add more debugging to idefloppy_pc_intr() to match ide-tape's idetape_pc_intr(). While at it: * Correct the first debug message. * Log device name with "DMA finished" message. This is a preparation for adding generic ide_pc_intr() helper. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bar...
```diff diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index b1d6905fd8ea..502ef9dcc5b9 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c @@ -397,7 +397,7 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive) u16 bcount; u8 stat, ireason; - debug_log("Reached %s inte...
3e421d324c003f8f002f402141b15d758adbfaef
Analyze and fix the following issue in the Linux kernel code: ide-tape: always log debug info in idetape_pc_intr() if debugging is enabled
Problem Details: Add DBG_PC_INTR debug level and use it to always log debug info in idetape_pc_intr() if debugging is enabled. While at it: * Use drive->name instead of tape->name. * Log device name with "DMA finished" message. This is a preparation for adding generic ide_pc_intr() helper. Cc: Borislav Petkov <pet...
```diff diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 6801c68ee7da..10f2d3336286 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -56,6 +56,8 @@ enum { DBG_PROCS = (1 << 3), /* buffer alloc info (pc_stack & rq_stack) */ DBG_PCRQ_STACK = (1 << 4), + /* IRQ handler (always l...
81f4938239fea86d0a7529194a37fb81041171e0
Analyze and fix the following issue in the Linux kernel code: ide-floppy: merge callbacks
Problem Details: The appropriate functionality of the callback is established through querying the ATAPI packet command in pc->c[0]. While at it, simplify if (floppy->failed_pc)-branch to be found in the original idefloppy_request_sense_callback(). Bart: - keep handling for blk_pc_request() requests unchanged + add F...
```diff diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index dae1c90d421f..2058a6f3f331 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c @@ -312,50 +312,38 @@ static struct request *idefloppy_next_rq_storage(ide_drive_t *drive) return (&floppy->rq_stack[floppy->rq_stack_index++])...
170ee569bbe1005baebf2e9e4c3f4622d14ec851
Analyze and fix the following issue in the Linux kernel code: ide-tape: remove SIMULATE_ERRORS debug code
Problem Details: Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 41aa8b3ccab3..cc70e759fc8e 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -144,9 +144,6 @@ enum { /*************************** End of tunable parameters ***********************/ -/* Read/Write error simulation */ -#defi...
43a2b5b29385a3e0997a47c86f286d3645e5cb44
Analyze and fix the following issue in the Linux kernel code: ide-scsi: add debug_log() macro
Problem Details: Add debug_log() macro and convert the driver to use it. [ This makes debug messages to be always prefixed with "ide-scsi: " and use KERN_INFO level. ] While at it: * Change "DMA complete" debug message to "DMA finished" to match other ATAPI device drivers. * Use __func__. Cc: Borislav Petkov <...
```diff diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index e9d3dbf596c7..d2dad9039e0d 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -60,6 +60,13 @@ #define IDESCSI_DEBUG_LOG 0 +#if IDESCSI_DEBUG_LOG +#define debug_log(fmt, args...) \ + printk(KERN_INFO "ide-scsi: " fmt, #...
6c60bd8ea7aa536d67830bc8384ef0ebdfb8aad4
Analyze and fix the following issue in the Linux kernel code: ide-scsi: fix Interrupt Reason checking in idescsi_pc_intr()
Problem Details: Set PC_FLAG_WRITING pc flag in idescsi_queue() (if needed) and then fix Interrupt Reason checking in idescsi_pc_intr(). Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index ed92cf7a7682..08807070e083 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -427,7 +427,15 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) printk(KERN_ERR "ide-scsi: CoD != 0 in idescsi_pc_intr\n"); re...
c04bbc812b05b304a9118687d0e0a47e35f00d1d
Analyze and fix the following issue in the Linux kernel code: ide-scsi: fix handling of DMA errors in idescsi_pc_intr()
Problem Details: Check return value of ->dma_end method and if there was a DMA error handle it accordingly (set PC_FLAG_DMA_ERROR pc flag, don't update pc->xferred and increase rq->errors). Also move debug message in the right place while at it. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolni...
```diff diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index e67cf8aa9462..ed92cf7a7682 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -388,11 +388,13 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) return ide_stopped; } if (pc->flags & PC_FLAG_DMA_IN_PROGRES...
e8e25f03e19c2c47834c821511625c0b80567827
Analyze and fix the following issue in the Linux kernel code: ide-scsi: fix DRQ checking for DMA transfers in idescsi_pc_intr()
Problem Details: If DRQ bit of Status Register is not cleared it is an error condition and should be handled accordingly (disable DMA + reset the device). Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 2553ef4d5a91..e67cf8aa9462 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -388,7 +388,6 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive) return ide_stopped; } if (pc->flags & PC_FLAG_DMA_IN_PROGRESS)...
b3d96afccf8b5c67b66a61efb88c53ff029c6611
Analyze and fix the following issue in the Linux kernel code: ide-scsi: fix race in idescsi_transfer_pc()
Problem Details: Start DMA engine before sending content of packet command (otherwise it is possible that IRQ will happen before DMA engine is started). Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 569ffde6d047..2553ef4d5a91 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -494,13 +494,14 @@ static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive) /* Set the interrupt routine */ ide_set_handler(drive, &ides...
e81a3bde13343bc36613aff8f864def7171b376a
Analyze and fix the following issue in the Linux kernel code: ide: fix do_probe() to use SELECT_DRIVE()
Problem Details: Fix one place in do_probe() which used ->OUTB directly instead of calling SELECT_DRIVE() (so ->selectproc method is also used). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 26e68b65b7cf..12513c45d700 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -478,7 +478,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd) printk(KERN_ERR "%s: no response (status = 0x%02x), " "resetting drive...
9a2d43b7566caeeeb414aa628bc2759028897dbb
Analyze and fix the following issue in the Linux kernel code: block: handle blk_pm_resume_request() requests in blk_execute_rq_nowait()
Problem Details: For blk_pm_resume_request() requests (which are used only by IDE subsystem currently) the queue is stopped so we need to call ->request_fn explicitly. Thanks to: - Rafael for reporting/bisecting the bug - Borislav/Rafael for testing the fix This is a preparation for converting IDE to use blk_execute_...
```diff diff --git a/block/blk-exec.c b/block/blk-exec.c index 391dd6224890..4f52f2792059 100644 --- a/block/blk-exec.c +++ b/block/blk-exec.c @@ -58,6 +58,9 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk, spin_lock_irq(q->queue_lock); __elv_add_request(q, rq, where, 1); __generic_...
c6866a6ff571eebebda45bf14b5b62188768893a
Analyze and fix the following issue in the Linux kernel code: ide: use __generic_unplug_device() in ide_do_drive_cmd() (take 2)
Problem Details: * Call __elv_add_request() with 'plug' == 1 (so the device will be plugged) and then use __generic_unplug_device() instead of calling ide_do_request() directly. v2: * For blk_pm_resume_request() requests the queue is stopped so we need to call ->request_fn explicitly. Thanks to: - Rafael fo...
```diff diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 5aed79ed4586..1eb3f5cce556 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -1606,8 +1606,11 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio spin_lock_irqsave(&ide_lock, flags); if (action == id...
8c6e46ddb343004e33653f62f0b09c0721cd8c12
Analyze and fix the following issue in the Linux kernel code: palm_bk3710: fix tRP for UDMA mode 4
Problem Details: Fix tRP timing for UDMA mode 4 according to the ATA specification. Signed-off-by: Mikhail Cherkashin <mcherkhashin@ru.mvista.com> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c index 2f2b4f4cf229..74a05dc6d1e6 100644 --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c @@ -83,7 +83,7 @@ static const struct palm_bk3710_udmatiming palm_bk3710_udmatimings[6] = { {125, 160}, /* UDMA Mode 1 */ ...
14351760e314b8a9720804b11c6bd11d0c0b1258
Analyze and fix the following issue in the Linux kernel code: Fix printk format warning in clocksource/acpi_pm.c
Problem Details: For real, this time. The earlier attempt just moved the warning around. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c index bcd7d0e429e8..5ca1d80de182 100644 --- a/drivers/clocksource/acpi_pm.c +++ b/drivers/clocksource/acpi_pm.c @@ -227,7 +227,7 @@ static int __init parse_pmtmr(char *arg) if (strict_strtoul(arg, 16, &base)) return -EINVAL; - pri...
7b22609442a32050e37cec5f6735376af61e68a1
Analyze and fix the following issue in the Linux kernel code: [MIPS] TXx9: cleanup and fix some sparse warnings
Problem Details: * Do not return void value * Make some functions static * Do not include unnecessary bootinfo.h Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index 452cb9ea12c0..5afc5d5cab03 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c @@ -140,7 +140,7 @@ void __init prom_init(void) strcpy(txx9_system_type, txx9_board_vec->system); - return txx9_boa...
af3e69cfc9644c742a22647a5091779b9dfb9653
Analyze and fix the following issue in the Linux kernel code: [MIPS] Declare some pci variables in header file
Problem Details: Declare pci_probe_only, etc. in asm-mips/pci.h file. This will fix some sparse warnings. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/pci/fixup-vr4133.c b/arch/mips/pci/fixup-vr4133.c index de5e5f6bbf4c..34e651bd2b5e 100644 --- a/arch/mips/pci/fixup-vr4133.c +++ b/arch/mips/pci/fixup-vr4133.c @@ -171,7 +171,6 @@ void i8259_init(void) int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) { - extern i...
94daeb90698c56a85ed219eeb18d4a8cddde7b03
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix asm constraints for 'ins' instructions.
Problem Details: The third operand to 'ins' must be a constant int, not a register. [Ralf: The bug was actually intensional. Some versions used to throw an error under certain circumstances for code like: static inline void f(unsigned nr, unsigned *p) { unsigned short bit = nr & 5; if (__builtin_constant_p(bit)) ...
```diff diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 642724734eba..9a7274ba6a0b 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h @@ -82,7 +82,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) "2: b 1b \n" " .previous \n" : ...
07cdb78436d52416a582e645b9afb6e26f986bc9
Analyze and fix the following issue in the Linux kernel code: [MIPS] fix sparse warning about setup_early_printk()
Problem Details: This patch fixes the following sparse warning: <<<<<<<< arch/mips/kernel/early_printk.c:35:13: warning: symbol 'setup_early_printk' was not declared. Should it be static? <<<<<<<< The fix is to define a prototype of the setup_early_printk() function and to include the appropriate header into arch/m...
```diff diff --git a/arch/mips/kernel/early_printk.c b/arch/mips/kernel/early_printk.c index 9dccfa4752b2..9ae813eb782e 100644 --- a/arch/mips/kernel/early_printk.c +++ b/arch/mips/kernel/early_printk.c @@ -10,6 +10,8 @@ #include <linux/console.h> #include <linux/init.h> +#include <asm/setup.h> + extern void prom_...
e79aec291da55aa322ddb5d8f3bb04cdf69470d5
Analyze and fix the following issue in the Linux kernel code: slab: rename slab_destroy_objs
Problem Details: With the removal of destructors, slab_destroy_objs no longer actually destroys any objects, making the kernel doc incorrect and the function name misleading. In keeping with the other debug functions, rename it to slab_destroy_debugcheck and drop the kernel doc. Signed-off-by: Rabin Vincent <rabin@ra...
```diff diff --git a/mm/slab.c b/mm/slab.c index 046607f05f3e..b4aa4c88250e 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1901,15 +1901,7 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp) #endif #if DEBUG -/** - * slab_destroy_objs - destroy a slab and its objects - * @cachep: cache pointer being ...
19c1d6a34abf73d0baf8e325d018c920fa78dddc
Analyze and fix the following issue in the Linux kernel code: [ARM] S3C24XX: Fix SERIAL_SAMSUNG entry
Problem Details: The SERIAL_SAMSUNG needs SERIAL_CORE but doesn't select it, leading to a build failure. Adding a 'select SERIAL_CORE' cure the trouble. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 5a9754455eed..047c20d35a98 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -451,6 +451,7 @@ config SERIAL_CLPS711X_CONSOLE config SERIAL_SAMSUNG tristate "Samsung SoC serial support" depends on ARM && PLAT_S3C24XX + sele...
fe9233fb6914a0eb20166c967e3020f7f0fba2c9
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_dh: fix kconfig related build errors
Problem Details: Do not automatically "select" SCSI_DH for dm-multipath. If SCSI_DH doesn't exist,just do not allow hardware handlers to be used. Handle SCSI_DH being a module also. Make sure it doesn't allow DM_MULTIPATH to be compiled in when SCSI_DH is a module. [jejb: added comment for Kconfig syntax] Signed-off...
```diff diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig index b4a3c7d1451d..07d92c11b5d8 100644 --- a/drivers/md/Kconfig +++ b/drivers/md/Kconfig @@ -252,7 +252,11 @@ config DM_ZERO config DM_MULTIPATH tristate "Multipath target" depends on BLK_DEV_DM - select SCSI_DH + # nasty syntax but means make DM_MULTIP...
c43d8636971c39da993e94082fd65bfff421618e
Analyze and fix the following issue in the Linux kernel code: sdio_uart: Fix SDIO break control to now return success or an error
Problem Details: This is a consequence of patch 9ea761bfef52c116fed4715d4043392c2503fe6a. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index eeea84c309e6..78ad48718ab0 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c @@ -885,12 +885,14 @@ static void sdio_uart_set_termios(struct tty_struct *tty, struct ktermios *old_t sdio_uart_release_func(p...
ea901300cd8b809285fa5cbced18124f127e0ac6
Analyze and fix the following issue in the Linux kernel code: sdio: sdio_io.c Fix sparse warnings
Problem Details: Unfold nested macros it creates not readable code and sparse warnings sdio_io.c:190:9: warning: symbol '_min1' shadows an earlier one Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c index 0888df64581f..f61fc2d4cd0a 100755 --- a/drivers/mmc/core/sdio_io.c +++ b/drivers/mmc/core/sdio_io.c @@ -187,11 +187,10 @@ EXPORT_SYMBOL_GPL(sdio_set_block_size); */ static inline unsigned int sdio_max_byte_size(struct sdio_func *func)...
62a7573ee9f31d4fdb330b3e68ebf6efaba1d57c
Analyze and fix the following issue in the Linux kernel code: sdio: fix the use of hard coded timeout value.
Problem Details: This adds reading and using of enable_timeout from the CIS Signed-off-by: Benzi Zbit <benzi.zbit@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/core/sdio_cis.c b/drivers/mmc/core/sdio_cis.c index d5e51b1c7b3f..956bd7677502 100644 --- a/drivers/mmc/core/sdio_cis.c +++ b/drivers/mmc/core/sdio_cis.c @@ -129,6 +129,12 @@ static int cistpl_funce_func(struct sdio_func *func, /* TPLFE_MAX_BLK_SIZE */ func->max_blksize = buf[12] | ...
3f1c38723eb467d34d704d0ee6e7b796ba4981ee
Analyze and fix the following issue in the Linux kernel code: x86: Fix compile error with CONFIG_AS_CFI=n
Problem Details: AS arch/x86/lib/csum-copy_64.o arch/x86/lib/csum-copy_64.S: Assembler messages: arch/x86/lib/csum-copy_64.S:48: Error: Macro `ignore' was already defined make[1]: *** [arch/x86/lib/csum-copy_64.o] Error 1 make: *** [arch/x86/lib] Error 2 It appears that csum-copy_64.S and dwarf2.h both define an ...
```diff diff --git a/include/asm-x86/dwarf2.h b/include/asm-x86/dwarf2.h index 0bfe250894f7..738bb9fb3e53 100644 --- a/include/asm-x86/dwarf2.h +++ b/include/asm-x86/dwarf2.h @@ -38,23 +38,23 @@ /* Due to the structure of pre-exisiting code, don't use assembler line comment character # to ignore the arguments. I...
aba3728ce2e8ce85e1e5f6b275131e9332256789
Analyze and fix the following issue in the Linux kernel code: x86: sanitize Kconfig
Problem Details: Set default n for MEMTEST and MTRR_SANITIZER and fix the help texts. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 6958d6bcaf70..2642b4bf41b9 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -447,7 +447,6 @@ config PARAVIRT_DEBUG config MEMTEST bool "Memtest" depends on X86_64 - default y help This option adds a kernel parameter 'memtest', which allows...
c8b3e02eb250ceb661437e9b198757eff0eb6fd2
Analyze and fix the following issue in the Linux kernel code: mmc: fix spares errors of sdhci.c
Problem Details: 1. sdhci_prepare_data: fix shadowing of count variable u8 count int count -> sg_cnt; 2. sdhci_add_host: assignment of integer to pointer dma_mask = 0 -> dma_mask = NULL; Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index d3e4a391e351..13bd681eda29 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -672,14 +672,14 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) host->ioaddr + SDHCI_ADMA_ADDRESS); ...
97067d5581ec831a75a45a52e417bee0f7943dbf
Analyze and fix the following issue in the Linux kernel code: wbsd: fix bad dma_addr_t conversion
Problem Details: DMA addresses are not pointers, so don't treat them as such. Avoids compiler warnings when using 64-bit DMA addresses on a 32-bit system. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index c2b61606c430..f7dcd8ec0d7f 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c @@ -1420,7 +1420,7 @@ kfree: dma_unmap_single(mmc_dev(host->mmc), host->dma_addr, WBSD_DMA_SIZE, DMA_BIDIRECTIONAL); - host->dma_addr = (dma_a...
6d37333163025b46afbcad434ec9a5f2e88e7254
Analyze and fix the following issue in the Linux kernel code: mmc: fix sdio_io sparse errors
Problem Details: This patch fixes sdio_io sparse errors. This fix changes signature of API functions, changing unsigned char -> u8 unsigned short -> u16 unsigned long -> u32 - this was probably a bug in 64 bit platforms Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus....
```diff diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c old mode 100644 new mode 100755 index cc42a41ff6ab..3ccf6919877c --- a/drivers/mmc/core/sdio_io.c +++ b/drivers/mmc/core/sdio_io.c @@ -167,10 +167,8 @@ int sdio_set_block_size(struct sdio_func *func, unsigned blksz) return -EINVAL; if (...
9eeebd22ca757fee8dc10ffe6fa6992f33a3c5ec
Analyze and fix the following issue in the Linux kernel code: mmc: wbsd.c fix shadowing of 'dma' variable
Problem Details: This patch fix warning :shadowing dma variable and made use of module_param_named instead of module_param Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 67e5a9b80f53..c2b61606c430 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c @@ -68,16 +68,16 @@ static const int unlock_codes[] = { 0x83, 0x87 }; static const int valid_ids[] = { 0x7112, - }; +}; #ifdef CONFIG_PNP -st...
ff8c804f1fdecb198c4be57155c61800e0d37bd2
Analyze and fix the following issue in the Linux kernel code: MMC: S3C24XX: Update error debugging.
Problem Details: Add better debugging to show where errors are being generated, as some error codes can come from several different code paths. Also fix the error return path from s3cmci_setup_data() to return the error it returned to the request. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre O...
```diff diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 62d73d3497f0..2b4839536975 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -450,6 +450,7 @@ static irqreturn_t s3cmci_irq(int irq, void *dev_id) } if (mci_csta & S3C2410_SDICMDSTAT_CMDTIMEOUT) { + dbg(host,...
2de5f79d4dfcb1be16f0b873bc77d6ec74b0426d
Analyze and fix the following issue in the Linux kernel code: MMC: S3C24XX: Fix use of msecs where jiffies are needed
Problem Details: mmc_detect_change() takes jiffies, not msecs. Convert the previous value of msecs into jiffies before calling. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index a6224f9b28bc..6f1b474e33b9 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -584,7 +584,7 @@ static irqreturn_t s3cmci_irq_cd(int irq, void *dev_id) dbg(host, dbg_irq, "card detect\n"); - mmc_detect_change(ho...
3886ff5f63f33c801ed3af265ac0df20d3a8dcf5
Analyze and fix the following issue in the Linux kernel code: MMC: S3C24XX: Fix s3c2410_dma_request() return code check.
Problem Details: The driver should be checking for a negative error code from s3c2410_dma_request(), not non-zero. Newer kernels now return the DMA channel number that was allocated by the request. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index aa9a8b44b5ea..8389107d599e 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -1215,7 +1215,7 @@ static int __devinit s3cmci_probe(struct platform_device *pdev, int is2440) s3c2410_gpio_cfgpin(host->pdata->gpio_wp...
7c14450ed6ab4ed453b2bf216ca3aaa7a5402af3
Analyze and fix the following issue in the Linux kernel code: MMC: S3C24XX: Ensure host->mrq->data is valid
Problem Details: Fix a crash if host->mrq->data is NULL on ending a transfer. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 4fd11d8864eb..ffd9269a1874 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -353,7 +353,8 @@ static void pio_tasklet(unsigned long data) (host->pio_active == XFER_READ) ? "read" : "write", host->pio...
d643b5f7e0793ef7828a35a5ea049d675ad2ad8c
Analyze and fix the following issue in the Linux kernel code: MMC: Fix S3C24XX IRQ enable during PIO transfers
Problem Details: Fix Bug #677 - I/O errors on heavy microSD writes for 2.6.22.x. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 8c68b2e0dd6e..774af3d7218f 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -335,6 +335,8 @@ static void pio_tasklet(unsigned long data) struct s3cmci_host *host = (struct s3cmci_host *) data; + disable_irq(h...
bdbc9c3a8f7a7956611c970e262693faa95081a5
Analyze and fix the following issue in the Linux kernel code: Fix the request finalisation by ensuring the controller
Problem Details: is stopped. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Harald Welte <laforge@openmoko.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 6070f36139bd..8c68b2e0dd6e 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -677,7 +677,7 @@ static void finalize_request(struct s3cmci_host *host) /* Cleanup controller */ writel(0, host->base + S3C2410_SDIC...
ceb3ac252519f9ab318050c8ee842e62820d6731
Analyze and fix the following issue in the Linux kernel code: MMC: DMA free fix for S3C24XX SD/MMC driver
Problem Details: Bugfix to ensure DMA channel allocated is freed on exit. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 4db5bd7c0494..6070f36139bd 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -1254,6 +1254,7 @@ static int __devexit s3cmci_remove(struct platform_device *pdev) clk_put(host->clk); tasklet_disable(&host->pio_t...
679f0f8abd7187baaff40a47fe4733ae4c24cc9a
Analyze and fix the following issue in the Linux kernel code: MMC: S3C24XX MMC/SD driver write fixes
Problem Details: This patch is a workaround of some S3C2410 MMC chip bug Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index c6a4d3cadf2b..4db5bd7c0494 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -461,9 +461,19 @@ static irqreturn_t s3cmci_irq(int irq, void *dev_id) if (mci_csta & S3C2410_SDICMDSTAT_CRCFAIL) { if (cmd->flags ...