id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
f7c52fd17a7dda42fc9e88c2b2678403419bfe63
Analyze and fix the following issue in the Linux kernel code: jfs: fix regression preventing coalescing of extents
Problem Details: Commit fec1878fe952b994125a3be7c94b1322db586f3b caused a regression in which contiguous blocks being allocated to the end of an extent were getting a new extent created. This typically results in files entirely made up of 1-block extents even though the blocks are contiguous on disk. Apparently grub ...
```diff diff --git a/fs/jfs/jfs_extent.c b/fs/jfs/jfs_extent.c index bbbd5f202e37..41d6045dbeb0 100644 --- a/fs/jfs/jfs_extent.c +++ b/fs/jfs/jfs_extent.c @@ -391,6 +391,7 @@ int extHint(struct inode *ip, s64 offset, xad_t * xp) } XADaddress(xp, xaddr); XADlength(xp, xlen); + XADoffset(xp, prev); /* * ...
46a50661fc95d4acf5e4c203f7889234238ce642
Analyze and fix the following issue in the Linux kernel code: tty: Fix leaks introduced by the shift to separate ldisc objects
Problem Details: Gold star for the kmemleak detector. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c index 39c8f86dedd4..94b3e06d73ec 100644 --- a/drivers/char/tty_ldisc.c +++ b/drivers/char/tty_ldisc.c @@ -148,8 +148,10 @@ static struct tty_ldisc *tty_ldisc_try_get(int disc) } } spin_unlock_irqrestore(&tty_ldisc_lock, flags); - if (err) +...
9086c7b90abbf4ec29543e8f2424e3ecd14e955d
Analyze and fix the following issue in the Linux kernel code: ring-buffer: have benchmark test handle discarded events
Problem Details: With the addition of commit: c7b0930857e2278f2e7714db6294e94c57f623b0 ring-buffer: prevent adding write in discarded area The ring buffer may now add discarded events when a write passes the end of a buffer page. Before, a discarded event was only added when the tracer deliberately created one. T...
```diff diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c index 8d68e149a8b3..cf6b0f50134e 100644 --- a/kernel/trace/ring_buffer_benchmark.c +++ b/kernel/trace/ring_buffer_benchmark.c @@ -102,8 +102,10 @@ static enum event_status read_page(int cpu) event = (void *)&rpage->data...
303f2d7dc8eddc65de27d97eab0fc1c04ec4d2e1
Analyze and fix the following issue in the Linux kernel code: [ARM] pxa/em-x270: fix type in SND_PXA2XX_LIB_AC97
Problem Details: Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
```diff diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index 5343d1f339d6..63b10d9bb1d3 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c @@ -839,7 +839,7 @@ static void __init em_x270_init_spi(void) static inline void em_x270_init_spi(void) {} #endif -#if defined(CO...
14ebaf81e13ce66bff275380b246796fd16cbfa1
Analyze and fix the following issue in the Linux kernel code: x25: Fix sleep from timer on socket destroy.
Problem Details: If socket destuction gets delayed to a timer, we try to lock_sock() from that timer which won't work. Use bh_lock_sock() in that case. Signed-off-by: David S. Miller <davem@davemloft.net> Tested-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/include/net/x25.h b/include/net/x25.h index fc3f03d976f8..2cda04011568 100644 --- a/include/net/x25.h +++ b/include/net/x25.h @@ -187,7 +187,7 @@ extern int x25_addr_ntoa(unsigned char *, struct x25_address *, extern int x25_addr_aton(unsigned char *, struct x25_address *, struct x25_addre...
0d76cb2606cbb2e21f3832773458bb0241f99c6d
Analyze and fix the following issue in the Linux kernel code: p9100: use standard fields for framebuffer physical address and length
Problem Details: Use standard fields fbinfo.fix.smem_start and fbinfo.fix.smem_len for physical address and length of framebuffer. This also fixes output of the 'fbset -i' command - address and length of the framebuffer are displayed correctly. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: David S...
```diff diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c index 7000f2cd5854..7fa4ab01b0d3 100644 --- a/drivers/video/p9100.c +++ b/drivers/video/p9100.c @@ -134,9 +134,7 @@ struct p9100_par { u32 flags; #define P9100_FLAG_BLANKED 0x00000001 - unsigned long physbase; unsigned long which_io; - unsign...
8803f7afe6370af8cd97991bde0c3b53eca4e8da
Analyze and fix the following issue in the Linux kernel code: leo: use standard fields for framebuffer physical address and length
Problem Details: Use standard fields fbinfo.fix.smem_start and fbinfo.fix.smem_len for physical address and length of framebuffer. This also fixes output of the 'fbset -i' command - address and length of the framebuffer are displayed correctly. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: David S...
```diff diff --git a/drivers/video/leo.c b/drivers/video/leo.c index 7c7e8c2da9d9..e145e2d16fe3 100644 --- a/drivers/video/leo.c +++ b/drivers/video/leo.c @@ -191,9 +191,7 @@ struct leo_par { u32 flags; #define LEO_FLAG_BLANKED 0x00000001 - unsigned long physbase; unsigned long which_io; - unsigned long fbs...
963b916c1cb42450c7a061b13fcce6c9a2cdea28
Analyze and fix the following issue in the Linux kernel code: cg6: use standard fields for framebuffer physical address and length
Problem Details: Use standard fields fbinfo.fix.smem_start and fbinfo.fix.smem_len for physical address and length of framebuffer. This also fixes output of the 'fbset -i' command - address and length of the framebuffer are displayed correctly. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: David S...
```diff diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c index 940ec04f0f1b..0d47c6030e3d 100644 --- a/drivers/video/cg6.c +++ b/drivers/video/cg6.c @@ -263,9 +263,7 @@ struct cg6_par { u32 flags; #define CG6_FLAG_BLANKED 0x00000001 - unsigned long physbase; unsigned long which_io; - unsigned long fbs...
9fbfd4b8a4d8c097bcb0efd14a84a6869c0ac4d5
Analyze and fix the following issue in the Linux kernel code: cg3: use standard fields for framebuffer physical address and length
Problem Details: Use standard fields fbinfo.fix.smem_start and fbinfo.fix.smem_len for physical address and length of framebuffer. This also fixes output of the 'fbset -i' command - address and length of the framebuffer is displayed correctly. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: David S....
```diff diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c index 99f87fb61d05..b2319fa7286f 100644 --- a/drivers/video/cg3.c +++ b/drivers/video/cg3.c @@ -118,9 +118,7 @@ struct cg3_par { #define CG3_FLAG_BLANKED 0x00000001 #define CG3_FLAG_RDI 0x00000002 - unsigned long physbase; unsigned long which_io; -...
de4dc48ee26ccc9dbc6a86b0710f7fd408149056
Analyze and fix the following issue in the Linux kernel code: cg14: use standard fields for framebuffer physical address and length
Problem Details: Use standard fields fbinfo.fix.smem_start and fbinfo.fix.smem_len for physical address and length of framebuffer. This also fixes output of the 'fbset -i' command - address and length of the framebuffer is displayed correctly. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: David S....
```diff diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c index a2d1882791a5..fe45a3b8d0e0 100644 --- a/drivers/video/cg14.c +++ b/drivers/video/cg14.c @@ -196,9 +196,7 @@ struct cg14_par { u32 flags; #define CG14_FLAG_BLANKED 0x00000001 - unsigned long physbase; unsigned long iospace; - unsigned long...
3f06cd29358dd390d62afcde14fde54cec9deef9
Analyze and fix the following issue in the Linux kernel code: bw2: use standard fields for framebuffer physical address and length
Problem Details: Use standard fields fbinfo.fix.smem_start and fbinfo.fix.smem_len for physical address and length of framebuffer. This also fixes output of the 'fbset -i' command - address and length of the framebuffer is displayed correctly. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: David S....
```diff diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c index 1e35ba6f18e0..b0b147cb4cb3 100644 --- a/drivers/video/bw2.c +++ b/drivers/video/bw2.c @@ -111,9 +111,7 @@ struct bw2_par { u32 flags; #define BW2_FLAG_BLANKED 0x00000001 - unsigned long physbase; unsigned long which_io; - unsigned long fbs...
280ff97494e0fef4124bee5c52e39b23a18dd283
Analyze and fix the following issue in the Linux kernel code: sparc64: fix and optimize irq distribution
Problem Details: irq_choose_cpu() should compare the affinity mask against cpu_online_map rather than CPU_MASK_ALL, since irq_select_affinity() sets the interrupt's affinity mask to cpu_online_map "and" CPU_MASK_ALL (which ends up being just cpu_online_map). The mask comparison in irq_choose_cpu() will always fail sin...
```diff diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 54742e58831c..47029c66b17a 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile @@ -54,6 +54,7 @@ obj-$(CONFIG_SPARC64) += sstate.o obj-$(CONFIG_SPARC64) += mdesc.o obj-$(CONFIG_SPARC64) += pcr.o obj-$(CONFIG_S...
c79ee4e466dd12347f112e2af306dca35198458f
Analyze and fix the following issue in the Linux kernel code: dma-debug: fix off-by-one error in overlap function
Problem Details: This patch fixes a bug in the overlap function which returned true if one region ends exactly before the second region begins. This is no overlap but the function returned true in that case. Cc: stable@kernel.org Reported-by: Andrew Randrianasulu <randrik@mail.ru> Signed-off-by: Joerg Roedel <joerg.ro...
```diff diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 3b93129a968c..a9b6b5c9e091 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -862,7 +862,7 @@ static inline bool overlap(void *addr, u64 size, void *start, void *end) return ((addr >= start && addr < end) || (addr2 >= start && addr2 < end) || - ((...
eb73e6221c5013b32647bcf44bcc570232ba2804
Analyze and fix the following issue in the Linux kernel code: [ARM] pxa/palm: various fixes for PalmZ72 (mostly audio asoc and usb)
Problem Details: Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
```diff diff --git a/arch/arm/mach-pxa/include/mach/palmz72.h b/arch/arm/mach-pxa/include/mach/palmz72.h index 5032307ebf7d..2806ef69ba5a 100644 --- a/arch/arm/mach-pxa/include/mach/palmz72.h +++ b/arch/arm/mach-pxa/include/mach/palmz72.h @@ -21,7 +21,7 @@ /* SD/MMC */ #define GPIO_NR_PALMZ72_SD_DETECT_N 14 #define...
7db11a363fc41cec170a94a3542031e5e64bb333
Analyze and fix the following issue in the Linux kernel code: [S390] pm: add kernel_page_present
Problem Details: Fix the following build failure caused by make allyesconfig using CONFIG_HIBERNATION and CONFIG_DEBUG_PAGEALLOC kernel/built-in.o: In function `saveable_page': kernel/power/snapshot.c:897: undefined reference to `kernel_page_present' kernel/built-in.o: In function `safe_copy_page': kernel/power/snapsh...
```diff diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 4ca8e826bf30..565667207985 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -313,3 +313,22 @@ int s390_enable_sie(void) return 0; } EXPORT_SYMBOL_GPL(s390_enable_sie); + +#ifdef CONFIG_DEBUG_PAGEALLOC +#ifdef CONFIG_HIBERN...
fbb704efb784e2c8418e34dc3013af76bdd58101
Analyze and fix the following issue in the Linux kernel code: md: raid0 :Enables chunk size other than powers of 2.
Problem Details: Maintain two flows, one for pow2 chunk sizes (which uses masks and shift), and a flow for the general case (which uses sector_div). This is for the sake of performance. - introduce map_sector and is_io_in_chunk_boundary to encapsulate those two flows better for raid0_make_request - fix blk_mergea...
```diff diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 39936a217f95..7cd2671cc794 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -273,7 +273,12 @@ static int raid0_mergeable_bvec(struct request_queue *q, unsigned int chunk_sectors = mddev->chunk_size >> 9; unsigned int bio_sectors = bvm->bi...
1b9614291eb319fad96de45392eb4452ad39f0ee
Analyze and fix the following issue in the Linux kernel code: md: have raid0 compile with MD_DEBUG on
Problem Details: Because of the removal of the device list from the strips raid0 did not compile with MD_DEBUG flag on Signed-off-by: NeilBrown <neilb@suse.de>
```diff diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 77764dad1bcb..d8692fc17963 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -400,7 +400,7 @@ bad_map: return 0; } -static void raid0_status (struct seq_file *seq, mddev_t *mddev) +static void raid0_status(struct seq_file *seq, mddev_t *m...
fb5ab4b5d6e16fd5006c9f800d0116f3547cb760
Analyze and fix the following issue in the Linux kernel code: md: raid0: Fix a memory leak when stopping a raid0 array.
Problem Details: raid0_stop() removes all references to the raid0 configuration but misses to free the ->devlist buffer. This patch closes this leak, removes a pointless initialization and fixes a coding style issue in raid0_stop(). Signed-off-by: Andre Noll <maan@systemlinux.org> Signed-off-by: NeilBrown <neilb@suse...
```diff diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 99cee51734e5..0d62ad6df212 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -298,16 +298,15 @@ static int raid0_run(mddev_t *mddev) return 0; } -static int raid0_stop (mddev_t *mddev) +static int raid0_stop(mddev_t *mddev) { raid0_con...
6923715ae39ed39ac2fc1993e5061668f4f71ad0
Analyze and fix the following issue in the Linux kernel code: cfq: remove extraneous '\n' in blktrace output
Problem Details: I noticed a blank line in blktrace output. This patch fixes that. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 8447fde95501..833ec18eaa63 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1252,7 +1252,7 @@ static int cfq_forced_dispatch(struct cfq_data *cfqd) BUG_ON(cfqd->busy_queues); - cfq_log(cfqd, "forced_dispatch=%d\n", dispatched); + c...
ad081f1430515d0b727eba99ec435a526c61a599
Analyze and fix the following issue in the Linux kernel code: btrfs: properly register fs backing device
Problem Details: btrfs assigns this bdi to all inodes on that file system, so make sure it's registered. This isn't really important now, but will be when we put dirty inodes there. Even now, we miss the stats when the bdi isn't visible. Also fixes failure to check bdi_init() return value, and bad inherit of ->capabil...
```diff diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 0d50d49d990a..d28d29c95f7c 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -42,6 +42,8 @@ static struct extent_io_ops btree_extent_io_ops; static void end_workqueue_fn(struct btrfs_work *work); +static atomic_t btrfs_bdi_num = ATOMIC_INI...
a4d88302268d1e458f7c6eb7855f1ba4b3a7cffc
Analyze and fix the following issue in the Linux kernel code: USB: xHCI: Fix interrupt moderation.
Problem Details: Mask off the lower 16 bits of the interrupt control register, instead of masking off the upper 16 bits. The interrupt moderation interval field is the lower 16 bytes, and is set to 0x4000 (1ms) by default. The previous code was adding 40 us to the default value, instead of setting it to 40 us. This ...
```diff diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index 59ee61d2a198..489657c853e7 100644 --- a/drivers/usb/host/xhci-hcd.c +++ b/drivers/usb/host/xhci-hcd.c @@ -384,7 +384,7 @@ int xhci_run(struct usb_hcd *hcd) xhci_dbg(xhci, "// Set the interrupt modulation register\n"); temp = xhci...
6071d8363b7b284038069f1795a98372fbc1a48e
Analyze and fix the following issue in the Linux kernel code: usb; xhci: Fix TRB offset calculations.
Problem Details: Greg KH introduced a bug into xhci_trb_virt_to_dma() when he changed the type of offset to dma_addr_t from unsigned int and dropped the casts to unsigned int around the virtual address pointer subtraction. trb and seg->trbs are both valid pointers to virtual addresses, so the compiler will mod the sub...
```diff diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index d42a738cdaa7..02d81985c454 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -74,16 +74,15 @@ dma_addr_t xhci_trb_virt_to_dma(struct xhci_segment *seg, union xhci_trb *trb) { - dma_addr_t offset; + ...
c96a2b81f3747e6924307714666aa2368bc1718b
Analyze and fix the following issue in the Linux kernel code: USB: xhci: Clean up xhci_irq() function.
Problem Details: Drop spinlock in xhci_irq() error path. This fixes the issue reported by Oliver Neukum on this thread: http://marc.info/?l=linux-usb&m=124090924401444&w=2 Remove unnecessary register read reported by Viral Mehta: http://marc.info/?l=linux-usb&m=124091326007398&w=2 Reported-by: Oliver Neukum <oliver...
```diff diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index 94447bcdf19f..57aed12b63d2 100644 --- a/drivers/usb/host/xhci-hcd.c +++ b/drivers/usb/host/xhci-hcd.c @@ -276,11 +276,11 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd) return IRQ_NONE; } - temp = xhci_readl(xhci, &xhci->op_regs->s...
23e3be113f42790736319c049c78e5f9a4394c02
Analyze and fix the following issue in the Linux kernel code: USB: xhci: Avoid global namespace pollution.
Problem Details: Make all globally visible functions start with xhci_ and mark functions as static if they're only called within the same C file. Fix some long lines while we're at it. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c index 264c38059d4a..6473cbf329f9 100644 --- a/drivers/usb/host/xhci-dbg.c +++ b/drivers/usb/host/xhci-dbg.c @@ -55,7 +55,7 @@ void xhci_dbg_regs(struct xhci_hcd *xhci) xhci_dbg(xhci, "// Doorbell array at %p:\n", xhci->dba); } -void xhc...
06e7a1487b61e1ae909c4a4c264b4428c55beb7e
Analyze and fix the following issue in the Linux kernel code: USB: xhci: Fix Link TRB handoff bit twiddling.
Problem Details: Make sure to preserve all bits *except* the TRB_CHAIN bit when giving a Link TRB to the hardware. We need to save things like TRB type and the toggle bit in the control dword. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 9d6874710669..8fb5d52c08c9 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -188,7 +188,7 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring, bool consumer next->link.control &= ...
3841d56ebb9730c786a59bf3207529c35214df26
Analyze and fix the following issue in the Linux kernel code: USB: xhci: Fix register write order.
Problem Details: The 0.95 xHCI spec says that if the xHCI HW support 64-bit addressing, you must write the whole 64-bit address as one atomic operation, or write the low 32 bits, and then the high 32 bits. I had the register writes swapped in some places. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Sig...
```diff diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index 9ffa1fa507cf..13188077387c 100644 --- a/drivers/usb/host/xhci-hcd.c +++ b/drivers/usb/host/xhci-hcd.c @@ -416,11 +416,11 @@ int xhci_run(struct usb_hcd *hcd) xhci_dbg(xhci, "Event ring:\n"); xhci_debug_ring(xhci, xhci->event_ring);...
045f123d9c83b9a18c9d43a9afbf52bf0799640d
Analyze and fix the following issue in the Linux kernel code: USB: xhci: fix some compiler warnings in xhci.h
Problem Details: This fixes the warning: drivers/usb/host/xhci.h:1083: warning: passing argument 1 of ‘xhci_to_hcd’ discards qualifiers from pointer target type drivers/usb/host/xhci.h:1083: warning: passing argument 1 of ‘xhci_to_hcd’ discards qualifiers from pointer target type Reported-by: Stephen Rothwell <sfr@can...
```diff diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index e57a609e381d..13c9166e758a 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1068,12 +1068,13 @@ static inline unsigned int xhci_readl(const struct xhci_hcd *xhci, { return readl(regs); } -static inline void xhci_write...
b7258a4aba2b24d5c27a0f6674795e83e7771969
Analyze and fix the following issue in the Linux kernel code: USB: xhci: use xhci_handle_event instead of handle_event
Problem Details: The former is way to generic for a global symbol. Fixes this build error: drivers/usb/built-in.o: In function `.handle_event': (.text+0x67dd0): multiple definition of `.handle_event' drivers/pcmcia/built-in.o:(.text+0xcfcc): first defined here drivers/usb/built-in.o: In function `handle_event': (.opd...
```diff diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index 36e440ce88e5..197e6bb5b93d 100644 --- a/drivers/usb/host/xhci-hcd.c +++ b/drivers/usb/host/xhci-hcd.c @@ -246,7 +246,7 @@ static void xhci_work(struct xhci_hcd *xhci) xhci_readl(xhci, &xhci->ir_set->irq_pending); /* FIXME this sh...
6b403b020c1f42180b14d28d832da61167cff822
Analyze and fix the following issue in the Linux kernel code: USB: Add SuperSpeed to the list of USB device speeds.
Problem Details: Modify the USB core to handle the new USB 3.0 speed, "SuperSpeed". This is 5.0 Gbps (wire speed). There are probably more places that check for speed that I've missed. SuperSpeed devices have a 512 byte endpoint 0 max packet size. This shows up as a bMaxPacketSize0 set to 0x09 (see table 9-8 of the...
```diff diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 568244c99bdc..e9426acf5682 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -92,6 +92,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum, if (usb_endpoint_xfer_int(d)) { i = 1; swit...
7f84eef0dafb1d318263d8b71c38700aaf2d530d
Analyze and fix the following issue in the Linux kernel code: USB: xhci: No-op command queueing and irq handler.
Problem Details: xHCI host controllers can optionally implement a no-op test. This simple test ensures the OS has correctly setup all basic data structures and can correctly respond to interrupts from the host controller hardware. There are two rings exercised by the no-op test: the command ring, and the event ring....
```diff diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c index 5724683cef16..6dbf7d856f80 100644 --- a/drivers/usb/host/xhci-dbg.c +++ b/drivers/usb/host/xhci-dbg.c @@ -230,6 +230,64 @@ void xhci_print_registers(struct xhci_hcd *xhci) xhci_print_op_regs(xhci); } +void xhci_print_trb_offsets(s...
a92b63e7e4c185b4dd9e87762e2cb716e54482d0
Analyze and fix the following issue in the Linux kernel code: USB: usbtmc: fix switch statment
Problem Details: Steve Holland pointed out that we forgot to call break; in the switch statment. This probably resolves a lot of the bug reports I've gotten for the driver lately. Stupid me... Reported-by: Steve Holland <sdh4@iastate.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse....
```diff diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index c40a9b284cc9..3703789d0d2a 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c @@ -927,21 +927,27 @@ static long usbtmc_ioctl(struct file *file, unsigned int cmd, unsigned long arg) switch (cmd) { case USBTMC_IOC...
3b6c023f831e3179c42bbcff189c73628cd5ea4c
Analyze and fix the following issue in the Linux kernel code: USB: usbtest fix endless loop in unlink tests.
Problem Details: In tests 11 and 12 if the URB completes with an error status (eg babble) the asynchrous unlink entered an endless loop trying to unlink a non resubmitted URB. Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse....
```diff diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 5f1a19d1497d..a9f06d76960f 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -1072,23 +1072,34 @@ static int unlink1 (struct usbtest_dev *dev, int pipe, int size, int async) */ msleep (jiffies % (2 * INTERR...
830d1b188c997c4af094d4e20b194205ddbded13
Analyze and fix the following issue in the Linux kernel code: USB: gadget : Fix RNDIS code to pass USB Compliance tests (USBCV) with g_ether
Problem Details: This patch fixes a bug in the RNDIS code. Due to this bug gether_connect() fails as the port remains un-initialized. As a result following USB Compliance Tests were failing. (1)EndpointDescriptorTest_DeviceConfigured (2)Interface Descriptor Test. (3)Halt Endpoint Test. (4)SetConfigurationTest The fi...
```diff diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 3279a4726042..424a37c5773f 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c @@ -475,7 +475,9 @@ static int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt) if (rndis->port.in_ep->drive...
b18ffd49e86102a9ed0a1cc83fdafe3891e844e5
Analyze and fix the following issue in the Linux kernel code: USB: EHCI: update toggle state for linked QHs
Problem Details: This patch (as1245) fixes a bug in ehci-hcd. When an URB is queued for an endpoint whose QH is already in the LINKED state, the QH doesn't get refreshed. As a result, if usb_clear_halt() was called during the time that the QH was linked but idle, the data toggle value in the QH doesn't get reset. Th...
```diff diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c index bf69f4739107..c3a778bd359c 100644 --- a/drivers/usb/host/ehci-au1xxx.c +++ b/drivers/usb/host/ehci-au1xxx.c @@ -97,6 +97,7 @@ static const struct hc_driver ehci_au1xxx_hc_driver = { .urb_enqueue = ehci_urb_enqueue, .urb_dequ...
be475d9027a07069407a19980d1a4fcb7b18b23c
Analyze and fix the following issue in the Linux kernel code: USB: usb-storage: fix return values from init functions
Problem Details: This patch (as1242) fixes the return values from the special init functions in usb-storage. They are supposed to return 0 for success, not USB_STOR_TRANSPORT_GOOD. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/storage/option_ms.c b/drivers/usb/storage/option_ms.c index 126ea3424c03..0d8853339bb6 100644 --- a/drivers/usb/storage/option_ms.c +++ b/drivers/usb/storage/option_ms.c @@ -96,7 +96,7 @@ int option_ms_init(struct us_data *us) udev->descriptor.bDeviceSubClass != 0 || udev->d...
9a4b5e36ce58febdd2039dd4d129ee7edf4f5536
Analyze and fix the following issue in the Linux kernel code: usb: musb: disable OTG AUTOIDLE only with omap3430
Problem Details: Omap3 MUSB AUTOIDLE functionality configured through OTG_SYSCONFIG register prevents the device from going into retention. This is a workaround (by Richard Woodruff/TI), as his comment : > A new MUSB bug which is a match to data below was identified very > recently (on hardware and in simulation). > Th...
```diff diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 48930f25c450..34875201ee04 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -227,7 +227,12 @@ int __init musb_platform_init(struct musb *musb) l &= ~AUTOIDLE; /* disable auto idle */ l &= ~NOIDLE; /* ...
0b10395ab86c11bef10e882a4323367e6735c9b2
Analyze and fix the following issue in the Linux kernel code: + drivers-usb-serial-sierrac-fix-printk-warning.patch added to -mm tree
Problem Details: drivers/usb/serial/sierra.c: In function 'sierra_write': drivers/usb/serial/sierra.c:375: warning: format '%d' expects type 'int', but argument 5 has type 'size_t' Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Elina Pasheva <epasheva@sierrawireless.com> Cc: Rory Filer <rfiler@SierraWire...
```diff diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index f047ab5fa97b..a88cde950161 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -415,7 +415,7 @@ static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port, portdata = usb_get_serial_port_...
1e0abb7e1844a7cb499321a94d5d04347ef86d68
Analyze and fix the following issue in the Linux kernel code: USB: imx_udc: fix leak in imx_ep_alloc_request()
Problem Details: cppcheck found another leak in drivers/usb/gadget/imx_udc.c Cc: Mike Lee <eemike@gmail.com> Cc: Darius Augulis <augulis.darius@gmail.com> Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg K...
```diff diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index 168658b4b4e2..239bf8ed9f4a 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c @@ -734,9 +734,12 @@ static struct usb_request *imx_ep_alloc_request { struct imx_request *req; + if (!usb_ep) + return NUL...
9636b683769a6c3acfe121314ee9d7e19157f109
Analyze and fix the following issue in the Linux kernel code: USB: serial: sierra driver sierra_calc_num_ports() fix
Problem Details: - Removed potential kernel oops from sierra_calc_num_ports() function. Calling this function twice would likely have caused an oops because the function releases allocated memory after the first call. - Modified sierra_probe() function to reflect the changes in sierra_calc_num_ports(). Signed-of...
```diff diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index bcfe0ac1e221..f047ab5fa97b 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -83,18 +83,22 @@ static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable) static int sierra_calc_num_ports(struct ...
c76a23da8e9a39222c4a7c29b0c5348cd8902a2b
Analyze and fix the following issue in the Linux kernel code: USB: serial: sierra driver interrupt urb resubmit fix
Problem Details: - Fixed a problem when re-submitting urb from interrupt callback in function sierra_instat_callback(). This suppresses also issuing of error messages in /var/log/kern.log - Removed redundant debug message at the beginning of sierra_instat_callback() function - Changed a debug message to be an err...
```diff diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 9d11fe47633b..bcfe0ac1e221 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -556,7 +556,6 @@ static void sierra_instat_callback(struct urb *urb) struct sierra_port_private *portdata = usb_get_serial_port_...
238ebd138c9704e1162030c1e600bc06142cb2c8
Analyze and fix the following issue in the Linux kernel code: USB: serial: sierra driver zero length packet fix
Problem Details: - Fixed a problem with transferring packets with size a multiple of Bulk Xfer size in function sierra_write(). Added transfer flag URB_ZERO_PACKET before submitting the urb to trigger Zero-length data transfer when packet size is a multiple of Bulk Xfer. Signed-off-by: Elina Pasheva <epasheva@si...
```diff diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index f494c5f659e2..9d11fe47633b 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -17,7 +17,7 @@ Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org> */ -#define DRIVER_VERSION "v.1.3.6...
98fcb5f78165b8a3d93870ad7afd4d9ebbb8b43a
Analyze and fix the following issue in the Linux kernel code: USB: serial: usb_debug,usb_generic_serial: implement sysrq and serial break
Problem Details: The usb_debug driver was modified to implement serial break handling by using a "magic" data packet comprised of the sequence: 0x00 0xff 0x01 0xfe 0x00 0xfe 0x01 0xff When the tty layer requests a serial break the usb_debug driver sends the magic packet. On the receiving side the magic pack...
```diff diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index c919686521ff..9fccc26235a2 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -339,6 +339,7 @@ int usb_serial_generic_write(struct tty_struct *tty, /* no bulk out, so return 0 bytes written */ return ...
715b1dc01fe44537e8fce9566e4bb48d6821d84b
Analyze and fix the following issue in the Linux kernel code: USB: usb_debug, usb_generic_serial: implement multi urb write
Problem Details: The usb_debug driver, when used as the console, will always fail to insert the carriage return and new line sequence as well as randomly drop console output. This is a result of only having the single write_urb and that the tty layer will have a lock that prevents the processing of the back to back ur...
```diff diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index be82ea956720..c919686521ff 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -190,6 +190,88 @@ void usb_serial_generic_close(struct usb_serial_port *port) generic_cleanup(port); } +static int usb_se...
b0cda8c5f7b652c6c27bcb3891d174534d2f1a91
Analyze and fix the following issue in the Linux kernel code: USB: serial: sierra driver read path bug fix
Problem Details: This patch fixes a problem in function sierra_indat_callback() which would stop receiving traffic from a modem if a number of URB failures occur. Failed URBs are not resubmitted for the next read and there is only a limited number of URBs allocated for the IN path. After this number of failures, the r...
```diff diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 27f41f95aefb..f494c5f659e2 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -509,10 +509,10 @@ static void sierra_indat_callback(struct urb *urb) unsigned char *data = urb->transfer_buffer; int status =...
5d44b36120d5b67081419d9307a526a0dfd949fc
Analyze and fix the following issue in the Linux kernel code: USB: serial: sierra driver debug info visibility improvement
Problem Details: - Version number set to 1.3.5 - Added "\n" at the end of each string in dev_dbg() code to improve the debug information visibility. Without this change the debug logs are very difficult to read. Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh...
```diff diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 9826c85a812d..f75688416b65 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -14,7 +14,7 @@ Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org> */ -#define DRIVER_VERSION "v.1.3.4...
820d7a253c5e59a786d5b608f6e8d0419fdc2f6e
Analyze and fix the following issue in the Linux kernel code: USB: remove unused usb_host class
Problem Details: The usb_host class isn't used for anything anymore (it was used for debug files, but they have moved to debugfs a few kernel releases ago), so let's delete it before someone accidentally puts a file in it. 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 42b93da1085d..c65d95604028 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -755,23 +755,6 @@ static struct attribute_group usb_bus_attr_group = { /*-------------------------------------------------------------------------*...
905c02acbd89f427c87a6d0a50fed757f6b3001c
Analyze and fix the following issue in the Linux kernel code: nls: utf8_wcstombs: fix buffer overflow
Problem Details: utf8_wcstombs forgot to include one-byte UTF-8 characters when calculating the output buffer size, i.e., theoretically, it was possible to overflow the output buffer with an input string that contains enough ASCII characters. In practice, this was no problem because the only user so far (VFAT) always ...
```diff diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c index 000736d89c95..750abf211e26 100644 --- a/fs/nls/nls_base.c +++ b/fs/nls/nls_base.c @@ -150,6 +150,7 @@ utf8_wcstombs(__u8 *s, const wchar_t *pwcs, int maxlen) } } else { *op++ = (__u8) *ip; + maxlen--; } ip++; } ```
d0f830d30c24175b463fa725ba369a5117fbdd8f
Analyze and fix the following issue in the Linux kernel code: USB: hub.c: fix sparse warnings
Problem Details: Fix sparse warning in drivers/usb/core/hub.c. The following sparse warning is seen when building on ARM due do the macro raw_local_irq_save(): warning: symbol 'temp' shadows an earlier one Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse...
```diff diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index be86ae3f4088..c7a1a1d4bcb1 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -457,13 +457,13 @@ static void hub_tt_kevent (struct work_struct *work) spin_lock_irqsave (&hub->tt.lock, flags); while (--limit && !list_empty ...
96f90a8b0dc84538ee4a31d3a5b80d758916629e
Analyze and fix the following issue in the Linux kernel code: USB: host/ohci-hcd.c: fix sparse warnings
Problem Details: Fix sparse warnings in drivers/usb/host/ohci-hcd.c. Four of the following sparse warning are seen when building on ARM due do the macro raw_local_irq_save(): warning: symbol 'temp' shadows an earlier one Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartm...
```diff diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 25db704f3a2a..7635acf0998c 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -571,7 +571,7 @@ static int ohci_init (struct ohci_hcd *ohci) */ static int ohci_run (struct ohci_hcd *ohci) { - u32 mask, t...
367815eea4e483d9c3630f69ae0a57e1e32a92b0
Analyze and fix the following issue in the Linux kernel code: USB: pxa27x_udc: single-thread setup requests
Problem Details: Since the PXA 27x UDC automatically ACK's some control packets such as SET_INTERFACE, the gadgets may not get a chance to process the request before another control packet is received. The Linux gadgets do not expect to receive setup callbacks out of order. The file storage gadget only saves the "highe...
```diff diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 51790b06b8ca..1937d8c7b433 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c @@ -472,6 +472,23 @@ static inline void udc_clear_mask_UDCCR(struct pxa_udc *udc, int mask) (udccr & UDCCR_MASK_B...
a864e3aa5d8e1278c05aa93c57dba0debbb46858
Analyze and fix the following issue in the Linux kernel code: USB: core/sysfs: fix sparse warnings
Problem Details: Fix 3 sparse warning in drivers/usb/core/sysfs.c. warning: symbol '__mptr' shadows an earlier one Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index c66789197927..b5c72e458943 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c @@ -552,8 +552,8 @@ static struct attribute *dev_string_attrs[] = { static mode_t dev_string_attrs_are_visible(struct kobject *kobj, struct a...
895f28badce96cd903026b0076966e3571b6968e
Analyze and fix the following issue in the Linux kernel code: USB: ftdi_sio: fix hi-speed device packet size calculation
Problem Details: Added a function to set the packet size to be used based on the value from the device endpoint descriptor. The FT2232H and FT4232H hi-speed devices will have wMaxPacketSize of 512 bytes when connected to a USB 2.0 hi-speed host, but will use alternative descriptors with wMaxPacketSize of 64 bytes if c...
```diff diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 80ccfa13e0b3..74cc3c831604 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -95,6 +95,7 @@ struct ftdi_private { unsigned long tx_bytes; unsigned long tx_outstanding_bytes; unsigned long tx_ou...
d1043a2697effee3054451a9293a376bfb013e4b
Analyze and fix the following issue in the Linux kernel code: musb: use dma mode 1 for TX if transfer size equals maxpacket (v2)
Problem Details: Currently, with Inventra DMA, we use Mode 0 if transfer size is less than or equal to the endpoint's maxpacket size. This requires that we explicitly set TXPKTRDY for that transfer. However the musb_g_tx code will not set TXPKTRDY twice if the last transfer is exactly equal to maxpacket, even if requ...
```diff diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 858d005fae6d..8b3c4e2ed7b8 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -310,7 +310,7 @@ static void txstate(struct musb *musb, struct musb_request *req) /* setup DMA, then program endpo...
1de00dae8036dfee44ebea2c38f942fb6072e0b7
Analyze and fix the following issue in the Linux kernel code: musb: make initial HNP roleswitch work (v2)
Problem Details: Minor HNP bugfixes, so the initial role switch works: - A-Device: * disconnect-during-suspend enters A_PERIPHERAL state * kill OTG timer after reset as A_PERIPHERAL ... * ... and also pass that reset to the gadget * once HNP succeeds, clear the "ignore_disconnect" flag * from...
```diff diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 8bd6bb1b04ef..93dd23a7eb6c 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -587,28 +587,23 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, if (devctl & MUSB_DEVCTL_LSDEV) mu...
def6f8b978618d50daaddb92331d398da9e141f1
Analyze and fix the following issue in the Linux kernel code: USB: twl4030-usb: fix minor reporting goofage
Problem Details: Fix a reporting glitch in the twl4030 USB transceiver code. It wasn't properly distinguishing the two types of active USB link: ID grounded, vs not. In the current code that distinction doesn't much matter; in the future this bugfix should help support better USB controller communications. Provide a...
```diff diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index c34e63910acb..9e3e7a5c258b 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c @@ -217,6 +217,7 @@ /* In module TWL4030_MODULE_PM_MASTER */ #define PROTECT_KEY 0x0E +#define STS_HW_CONDITIONS 0x0F ...
22a0d6f1383c85a7a9759cb805fd06c848c9c4d3
Analyze and fix the following issue in the Linux kernel code: musb_host: simplify check for active URB
Problem Details: The existance of the scheduling list shouldn't matter in determining whether there's currectly an URB executing on a hardware endpoint. What should actually matter is the 'in_qh' or 'out_qh' fields of the 'struct musb_hw_ep' -- those are set in musb_start_urb() and cleared in musb_giveback() when the e...
```diff diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 17d14f26bd6c..e0dacbb336d0 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -2089,14 +2089,14 @@ static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) { struct musb *musb = h...
3e5c6dc71146c2c3f21d60d3b4b25dc7755d5339
Analyze and fix the following issue in the Linux kernel code: musb_host: factor out musb_ep_{get|set}_qh()
Problem Details: Factor out the often used code to get/set the active 'qh' pointer for the hardware endpoint. Change the way the case of a shared FIFO is handled by setting *both* 'in_qh' and 'out_qh' fields of 'struct musb_hw_ep'. That seems more consistent and makes getting to the current 'qh' easy when the code kn...
```diff diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index bf194d244533..17d14f26bd6c 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -181,6 +181,19 @@ static inline void musb_h_tx_dma_start(struct musb_hw_ep *ep) musb_writew(ep->regs, MUSB_TXCSR, txcsr); }...
a5073b52833e4df8e16c93dc4cbb7e0c558c74a2
Analyze and fix the following issue in the Linux kernel code: musb_gadget: fix unhandled endpoint 0 IRQs
Problem Details: The gadget EP0 code routinely ignores an interrupt at end of the data phase because of musb_g_ep0_giveback() resetting the state machine to "idle, waiting for SETUP" phase prematurely. The driver also prematurely leaves the status phase on receiving the SetupEnd interrupt. As there were still unhandl...
```diff diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index 10d11ab113ab..898b52fcff5d 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c @@ -372,12 +372,7 @@ static irqreturn_t davinci_interrupt(int irq, void *__hci) spin_unlock_irqrestore(&musb->lock, flags); - /* RE...
acc0e90fbccbc6e4d48184cba0983ea044e131af
Analyze and fix the following issue in the Linux kernel code: driver core: fix gcc 4.3.3 warnings about string literals
Problem Details: This removes the warning: format not a string literal and no format arguments warnings in the driver core that gcc 4.3.3 complains about. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index 7e8576d7822d..4d59975c24a8 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -875,7 +875,7 @@ int device_add(struct device *dev) * the name, and force the use of dev_name() */ if (dev->init_name) { - dev_set_name(dev, dev->init_na...
7fcab099795812a8a08eb3b8c8ddb35c3685045f
Analyze and fix the following issue in the Linux kernel code: driver core: fix documentation of request_firmware_nowait
Problem Details: request_firmware_nowait declares it can be called in non-sleep contexts, but kthead_run called by request_firmware_nowait may sleep. So fix its documentation and comment to make callers clear about it. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/Documentation/firmware_class/README b/Documentation/firmware_class/README index c3480aa66ba8..7eceaff63f5f 100644 --- a/Documentation/firmware_class/README +++ b/Documentation/firmware_class/README @@ -77,7 +77,8 @@ seconds for the whole load operation. - request_firmware_nowait() is also p...
400ced61fa4914457d7e0a38e7c0fc6fd208694b
Analyze and fix the following issue in the Linux kernel code: debugfs: fix docbook error
Problem Details: Fix an error in debugfs_create_blob's docbook description It cannot actually be used to write a binary blob. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
```diff diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index 33a90120f6ad..39a619c222fa 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c @@ -419,7 +419,7 @@ static const struct file_operations fops_blob = { }; /** - * debugfs_create_blob - create a debugfs file that is used to read and write a binary blob...
59a3cd7f9da60ac4ba8ae5a4cddc48fe4a450129
Analyze and fix the following issue in the Linux kernel code: Driver core: fix comment for device_attach()
Problem Details: We are looking for matching drivers, not devices. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/base/dd.c b/drivers/base/dd.c index efd00de183b1..f0106875f01d 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -226,7 +226,7 @@ static int __device_attach(struct device_driver *drv, void *data) * pair is found, break out and return. * * Returns 1 if the device was bound to a...
56a83cc92991ed5bf76e224dd2ad53b5e9c00681
Analyze and fix the following issue in the Linux kernel code: debugfs: dont stop on first failed recursive delete
Problem Details: debugfs: dont stop on first failed recursive delete While running a while loop of removing a module that removes a debugfs directory with debugfs_remove_recursive, and at the same time doing a while loop of cat of a file in that directory, I would hit a point where somehow the cat of the file caused t...
```diff diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 0662ba6de85a..d22438ef7674 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -403,6 +403,7 @@ void debugfs_remove_recursive(struct dentry *dentry) } child = list_entry(parent->d_subdirs.next, struct dentry, d_u.d_child); + next_sibl...
309b7d60a345f402bec3cf9caadb53de4028e2aa
Analyze and fix the following issue in the Linux kernel code: driver core: add BUS_NOTIFY_UNBOUND_DRIVER event
Problem Details: This patch adds a new bus notifier event which is emitted _after_ a device is removed from its driver. This event will be used by the dma-api debug code to check if a driver has released all dma allocations for that device. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Greg Kroah-H...
```diff diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 742cbe6b042b..efd00de183b1 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -320,6 +320,10 @@ static void __device_release_driver(struct device *dev) devres_release_all(dev); dev->driver = NULL; klist_remove(&dev->p->knode_driver); + if...
557411eb2ce61ef5e87bd759a6f86881586df857
Analyze and fix the following issue in the Linux kernel code: Sysfs: fix possible memleak in sysfs_follow_link
Problem Details: There is the possiblity of a memory leak if a page is allocated and if sysfs_getlink() fails in the sysfs_follow_link. Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index a3ba217fbe74..1d897ad808e0 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c @@ -192,8 +192,11 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) { int error = -ENOMEM; unsigned long page = get_zeroed_page(GFP_KER...
2fae0a524b193e200b71778407ad29b22417056a
Analyze and fix the following issue in the Linux kernel code: powerpc: Add memory clobber to mtspr()
Problem Details: Without this clobber, mtspr can be re-ordered by gcc vs. surrounding memory accesses. While this might be ok for some cases, it's not in others and I'm not confident that all callers get it right (In fact I'm sure some of them don't). So for now, let's make mtspr() itself contain a memory clobber unti...
```diff diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index a3c28e46947c..1170267736d3 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h @@ -755,7 +755,8 @@ #define mfspr(rn) ({unsigned long rval; \ asm volatile("mfspr %0," __stringify(rn) \ : "=r"...
48c931125bf228a529b8d05218e9fdda899dfa93
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix invalid construct in our CPU selection Kconfig
Problem Details: commit 5b7c3c918c9c26c50d220b2b50359208cb5a1dbe introduced an invalid construct in our CPU selection. This caused warnings, though it still appeared to do the right thing. This fixes it properly by having separate formal definitions of PPC_BOOK3S_32 and PPC_BOOK3S_64 and one statement defining PPC_BOO...
```diff diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index cca6b4fc719a..c4192542b809 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype @@ -21,7 +21,7 @@ choice If unsure, select 52xx/6xx/7xx/74xx/82xx/83xx/86xx. -con...
e364ca92770a84ab3a917359ba7fed69479a16e3
Analyze and fix the following issue in the Linux kernel code: drivers/hvc: Add missing __devexit_p()
Problem Details: The remove function uses __devexit, so the .remove assignment needs __devexit_p() to fix a build error with hotplug disabled. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c index 449727b6166d..936d05bf37fa 100644 --- a/drivers/char/hvc_iseries.c +++ b/drivers/char/hvc_iseries.c @@ -241,7 +241,7 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev) static struct vio_driver hvc_vio_driver = { .id_table = ...
79290e4b692af8a76273bab38e41a3a385dedc7b
Analyze and fix the following issue in the Linux kernel code: powerpc/warp: Fix ISA_DMA_THRESHOLD default
Problem Details: If no device is passed to __dma_alloc_coherent, it defaults to using ISA_DMA_THRESHOLD for the mask. This patch provides a reasonable default rather than 0. Signed-off-by: Sean MacLennan <smaclennan@pikatech.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c index c5118802a281..42e09a9f77e2 100644 --- a/arch/powerpc/platforms/44x/warp.c +++ b/arch/powerpc/platforms/44x/warp.c @@ -43,7 +43,13 @@ static int __init warp_probe(void) { unsigned long root = of_get_flat_dt_root(); - re...
247608234e944e3e8e4d503c54c19ccb63dd27f2
Analyze and fix the following issue in the Linux kernel code: powerpc/bootwrapper: Custom build options for XPedite52xx targets
Problem Details: Some XPedite52xx boards have a legacy boot loader requiring some special care in the boot wrapper. The use of cuboot-85xx is needed to fix up embedded device trees, and a custom link address is specified to accommodate the boot loader and larger kernel image sizes used on X-ES MPC85xx platforms. Sign...
```diff diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 3ac75aecdb94..4db487d1d2a8 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -225,6 +225,10 @@ asp834x-redboot) platformo="$object/fixed-head.o $object/redboot-83xx.o" binary=y ;; +xpedite52*) + li...
40aa7353355f2d2766b2c960aff2f93e3dac4bfa
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Add nor flash partitions for mpc8569mds
Problem Details: Add 4 partitions in nor flash. Also fix nor flash bank width bug. The flash is capable of x8/x16 width but is configured for x8. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/boot/dts/mpc8569mds.dts b/arch/powerpc/boot/dts/mpc8569mds.dts index 4e95abd02711..a8dcb018c4a5 100644 --- a/arch/powerpc/boot/dts/mpc8569mds.dts +++ b/arch/powerpc/boot/dts/mpc8569mds.dts @@ -72,8 +72,30 @@ #size-cells = <1>; compatible = "cfi-flash"; reg = <0x0 0x0 0x0200...
5f28c52003612cccf12dfcbac4d9f0692bd28e67
Analyze and fix the following issue in the Linux kernel code: rio: warn_unused_result warnings fix
Problem Details: Adding failure path for the following two cases. warning: ignoring return value of 'device_add', declared with attribute warn_unused_result warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by:...
```diff diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index 3b78540288c7..45415096c294 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c @@ -263,15 +263,21 @@ static void rio_route_set_ops(struct rio_dev *rdev) * device to the RIO device list. Creates the generic sysfs n...
7b9edb9d619a1b3ecd35d832d4a93803d4f0ca5f
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: cuboot - Fix up ethernet3 MAC address on MPC85xx
Problem Details: Some MPC85xx platforms do support 4 ethernet ports, so make sure the boot wrapper fixes up all of them in the fdt. Since MAC addresses are at the end of the bd_t structure there is no harm in expanding to support 4 MAC address on older 85xx systems that might not have that many. Signed-off-by: Nate C...
```diff diff --git a/arch/powerpc/boot/cuboot-85xx.c b/arch/powerpc/boot/cuboot-85xx.c index 6776a1a29f13..277ba4a79b5a 100644 --- a/arch/powerpc/boot/cuboot-85xx.c +++ b/arch/powerpc/boot/cuboot-85xx.c @@ -15,6 +15,7 @@ #include "cuboot.h" #define TARGET_85xx +#define TARGET_HAS_ETH3 #include "ppcboot.h" stati...
b7d66c88c968379ebe683a28c4005895497ebbad
Analyze and fix the following issue in the Linux kernel code: powerpc/mpc83xx: Fix usb mux setup for mpc834x
Problem Details: usb0 and usb1 mux settings in the sicrl register were swapped (twice!) in mpc834x_usb_cfg(), leading to various strange issues with fsl-ehci and full speed devices. The USB port config on mpc834x is done using 2 muxes: Port 0 is always used for MPH port 0, and port 1 can either be used for MPH port 1 ...
```diff diff --git a/arch/powerpc/boot/dts/asp834x-redboot.dts b/arch/powerpc/boot/dts/asp834x-redboot.dts index 7da84fd7be93..261d10c4534b 100644 --- a/arch/powerpc/boot/dts/asp834x-redboot.dts +++ b/arch/powerpc/boot/dts/asp834x-redboot.dts @@ -167,7 +167,7 @@ interrupt-parent = <&ipic>; interrupts = <39 0x8>...
c7a7a5b9a27e28ce5f800ead9091ce68d37e8088
Analyze and fix the following issue in the Linux kernel code: powerpc/mpc8272ads: fix device tree for 8 MB flash size
Problem Details: The current device tree for the MPC8272ADS assumes a mapping of 32 MB of NOR flash at 0xFE00.0000, while there are actually only 8 MB on the boards, mapped at 0xFF80.0000. When booting an uImage with such a device tree, the kernel crashes because 0xFE00.0000 is not mapped. Also introduce aliases for s...
```diff diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts index 2a1929acaabd..60f332778e41 100644 --- a/arch/powerpc/boot/dts/mpc8272ads.dts +++ b/arch/powerpc/boot/dts/mpc8272ads.dts @@ -17,6 +17,13 @@ #address-cells = <1>; #size-cells = <1>; + aliases { + ethernet0 = &eth...
59fb30660be3f3ead54b3850c401d462449caaaa
Analyze and fix the following issue in the Linux kernel code: sunrpc: potential memory leak in function rdma_read_xdr
Problem Details: In case the check on ch_count fails the cleanup path is skipped and the previously allocated memory 'rpl_map', 'chl_map' is not freed. Reported by Coverity. Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
```diff diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index 42a6f9f20285..9e884383134f 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c @@ -397,14 +397,14 @@ static int rdma_read_xdr(struct svcxprt_rdma *xprt, if (!ch) ...
9af0b38ff3f4f79c62dd909405b113bf7c1a23aa
Analyze and fix the following issue in the Linux kernel code: ocfs2/net: Use wait_event() in o2net_send_message_vec()
Problem Details: Replace wait_event_interruptible() with wait_event() in o2net_send_message_vec(). This is because this function is called by the dlm that expects signals to be blocked. Fixes oss bugzilla#1126 http://oss.oracle.com/bugzilla/show_bug.cgi?id=1126 Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> ...
```diff diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 9fbe849f6344..334f231a422c 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c @@ -974,7 +974,7 @@ static int o2net_tx_can_proceed(struct o2net_node *nn, int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *caller_vec, ...
6b791bcc8b2ae21daf95d18cff2f1eca7a64c9a5
Analyze and fix the following issue in the Linux kernel code: ocfs2: Adjust rightmost path in ocfs2_add_branch.
Problem Details: In ocfs2_add_branch, we use the rightmost rec of the leaf extent block to generate the e_cpos for the newly added branch. In the most case, it is OK but if the parent extent block's rightmost rec covers more clusters than the leaf does, it will cause kernel panic if we insert some clusters in it. The m...
```diff diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 678a067d9251..9edcde4974aa 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -475,6 +475,12 @@ struct ocfs2_path { #define path_leaf_el(_path) ((_path)->p_node[(_path)->p_tree_depth].el) #define path_num_items(_path) ((_path)->p_tree_depth + 1) +s...
f25f0b9ca48848632f19e6616bd01550e3c0fc0e
Analyze and fix the following issue in the Linux kernel code: s3cmci: fix dma configuration call
Problem Details: This was missed in the DMA changes during the s3c24xx updates in commit 8970ef47d56fd3db28ee798b9d400caf08abd924. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 4eb4f37544ab..8c08cd7efa7f 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -794,7 +794,7 @@ static void s3cmci_dma_setup(struct s3cmci_host *host, host->mem->start + host->sdidata); if (!setup_ok) { ...
39f45d7bc0df52db8a7dd099ac02fef89514b7fc
Analyze and fix the following issue in the Linux kernel code: [ARM] MINI2440: Document the mini2440= kernel parameter
Problem Details: Also explains why the touchscreen support is not present, and were to find a working one... Signed-off-by: Michel Pollet <buserror@gmail.com> [ben-linux@fluff.org: Fix header description] Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 5f66ba295c5d..4b765b7ded9f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1351,6 +1351,27 @@ and is between 256 and 4096 characters. It is defined in the file min_addr=n...
2c7eaa43c3bb7b3b9fe2051d17f308c1f0728c78
Analyze and fix the following issue in the Linux kernel code: ide: BUG() on unknown requests
Problem Details: Unsupported requests should be never handed down to device drivers and the best thing we can do upon discovering such request inside driver's ->do_request method is to just BUG(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index dcd72445b0cd..0b7645b13df1 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -785,12 +785,8 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, /* right now this can only be a reset... */ uptodate ...
5bfb151f1f565e6082304a30e8c81dfb6ed0b0c8
Analyze and fix the following issue in the Linux kernel code: ide: do not access ide_drive_t 'drive_data' field directly
Problem Details: Change ide_drive_t 'drive_data' field from 'unsigned int' type to 'void *' type, allowing a wider range of values/types to be stored in this field. Added 'ide_get_drivedata' and 'ide_set_drivedata' helpers to get and set the 'drive_data' field. Fixed all host drivers to maintain coherency with the ch...
```diff diff --git a/drivers/ide/cmd64x.c b/drivers/ide/cmd64x.c index fd904e923a9f..03c86209446f 100644 --- a/drivers/ide/cmd64x.c +++ b/drivers/ide/cmd64x.c @@ -118,8 +118,9 @@ static void cmd64x_tune_pio(ide_drive_t *drive, const u8 pio) ide_hwif_t *hwif = drive->hwif; struct pci_dev *dev = to_pci_dev(hwif->dev)...
1fa6f4af9f55bc1b753af04276984429d6b5a613
Analyze and fix the following issue in the Linux kernel code: mac80211: fix wext bssid/ssid setting
Problem Details: When changing to a new BSSID or SSID, the code in ieee80211_set_disassoc() needs to have the old data still valid to be able to disconnect and clean up properly. Currently, however, the old data is thrown away before ieee80211_set_disassoc() is ever called, so fix that by calling the function _before_ ...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 84e59b9b493a..aca22b00b6a3 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1102,14 +1102,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, struct sta_info *sta; u32 changed = 0, config_changed = 0; - rcu...
624f0de44afa9fbb4ec8396f88d8d54b96a57a7e
Analyze and fix the following issue in the Linux kernel code: dell-laptop: fix rfkill conversion
Problem Details: A polarity error snuck into the rfkill rewrite's dell-laptop conversion, fix it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Tested-by: Oliver Hartkopp <oliver@hartkopp.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 2faf0e14f05a..74909c4aaeea 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c @@ -177,7 +177,7 @@ dell_send_request(struct calling_interface_buffer *buffer, int class, static int del...
7e9debe9789456426ec8574ead879e33da19ee57
Analyze and fix the following issue in the Linux kernel code: mac80211: disconnect when user changes channel
Problem Details: If we do not disconnect when a channel switch is requested, we end up eventually detection beacon loss from the AP and then disconnecting, without ever really telling the AP, so we might just as well disconnect right away. Additionally, this fixes a problem with iwlwifi where the driver will clear som...
```diff diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index f41fe1f1430c..68eb5052179a 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1101,7 +1101,6 @@ void ieee802_11_parse_elems(u8 *start, size_t len, u32 ieee802_11_parse_elems_crc(u8 *start, size_t len, ...
35edf8aae8f903b154d658b9a7eed0d5c1a4a814
Analyze and fix the following issue in the Linux kernel code: ath5k: fix mesh beaconing
Problem Details: This patch is from Nick Kossifidis but he forgot to send it. It ensures that the beacon queue gets started in mesh mode as well, otherwise ath5k will not beacon in mesh point mode. At this time, we still need to issue a scan before mesh beaconing will work but that appears to be a separate problem. ...
```diff diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c index ec35503f6a40..2942f13c9c4a 100644 --- a/drivers/net/wireless/ath/ath5k/pcu.c +++ b/drivers/net/wireless/ath/ath5k/pcu.c @@ -733,8 +733,9 @@ void ath5k_hw_init_beacon(struct ath5k_hw *ah, u32 next_beacon, u32 interval)...
8a9b99267cb3b51d4e59693c03e1204d86b42445
Analyze and fix the following issue in the Linux kernel code: iwlwifi/iwl3945: fix suspend resume association bug
Problem Details: Patch fixes the following bugs at http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=2005 http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=2007 If we suspend with an association and then resumed, we need to synchronize the active rxon with staging rxon, else we will get an error when...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index a5637c4aa85d..6d1519e1f011 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -2152,7 +2152,6 @@ static int iwl_mac_start(struct ieee80211_hw *hw) /* we should be...
611d3eb72aa7847a1081e6c1ac05fd2012652cde
Analyze and fix the following issue in the Linux kernel code: iwlwifi: check for channel location for 40MHz
Problem Details: for both mixed and pure 40MHz, need to check for valid channel location. if the specified channel not allow the channel location requested (ABOVE, BELOW), then reject the Fat channel access This fixes http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1988 ("iwlwifi: checking for 40MHz mode" ...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index b122eedef369..6ab07165ea28 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c @@ -629,13 +629,9 @@ u8 iwl_is_fat_tx_allowed(struct iwl_priv *priv, if (!sta_ht_i...
d7129e190c3107db8ac11a9e51035641b68d2aa7
Analyze and fix the following issue in the Linux kernel code: iwlwifi: revamp bss_info_changed
Problem Details: My earlier patch, "mac80211: unify config_interface and bss_info_changed" introduced a bug in iwlwifi where it will do some things incorrectly now when reassociating. Revamp iwl_bss_info_changed to fix that issue and make it easier to read. Also, while at it, add comments about things that it should ...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index f9d16ca5b3d9..e05faa004dae 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c @@ -2390,39 +2390,46 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, priv->i...
87e501b351ed9d837e63f6506b7e66331a69ed58
Analyze and fix the following issue in the Linux kernel code: net/libertas: don't recursive spin lock in if_spi_e2h()
Problem Details: |BUG: spinlock recursion on CPU#0, lbs_spi_thread/1030 | lock: dee9a1bc, .magic: dead4ead, .owner: lbs_spi_thread/1030, .owner_cpu: 0 |Call Trace: |[deec3eb0] [c0007220] show_stack+0x4c/0x15c (unreliable) |[deec3ef0] [c0187720] spin_bug+0x9c/0xb0 |[deec3f10] [c0187890] _raw_spin_lock+0x54/0x148 |[deec3...
```diff diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c index dc2a1f6ee36c..923ed58d58e7 100644 --- a/drivers/net/wireless/libertas/if_spi.c +++ b/drivers/net/wireless/libertas/if_spi.c @@ -812,7 +812,6 @@ out: static void if_spi_e2h(struct if_spi_card *card) { int err =...
b3781c74373489fa325ce64efdf72f6c8567b783
Analyze and fix the following issue in the Linux kernel code: libertas: fix IEEE PS mode in GSPI driver
Problem Details: The card firmware does not set the Command Download Ready interrupt bit when IEEE PS mode is enabled, preventing the driver from sending commands (such as the command to exit IEEE PS mode) since there is no indication that the card is ready to accept commands. This patch works around the problem by us...
```diff diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c index f8c2898d82b0..dc2a1f6ee36c 100644 --- a/drivers/net/wireless/libertas/if_spi.c +++ b/drivers/net/wireless/libertas/if_spi.c @@ -875,7 +875,12 @@ static int lbs_spi_thread(void *data) err = if_spi_c2h_data(card...
e1f8a19e6fc4f6d4267f6d3fe465553c3688f28e
Analyze and fix the following issue in the Linux kernel code: sony: fix rfkill code again
Problem Details: When the hard state changes, we shouldn't set the soft state to blocked as well -- we have no such indication from the device in that case so leave it untouched. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=13458. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Reported-by: Reinette Chat...
```diff diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index e48d9a4506ff..dafaa4a92df5 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -1133,8 +1133,9 @@ static void sony_nc_rfkill_update() continue; if (hwblock) { - if (rfkil...
ccae50bcf9b8a2365e8050ccdd20b172db7b9be1
Analyze and fix the following issue in the Linux kernel code: sgiioc4: coding style cleanup
Problem Details: Fix several errors and warnings given by checkpatch.pl: - space between the asterisk and parameter name; - inconsistent spacing between operator and operands; - space between *sizeof* and open parenthesis; - #include <asm/io.h> instead of #include <linux/io.h> - use of *typedef* instead of a struc...
```diff diff --git a/drivers/ide/sgiioc4.c b/drivers/ide/sgiioc4.c index 5f37f168f944..b7d61dc64096 100644 --- a/drivers/ide/sgiioc4.c +++ b/drivers/ide/sgiioc4.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved. - * Copyright (C) 2008 MontaVista Software, Inc. + * Copyright (...
5880b5de7101cc123778c5d17d4f3986351f3122
Analyze and fix the following issue in the Linux kernel code: ide: don't enable IORDY at a probe time
Problem Details: * Add 'unsigned long port_flags' field to ide_hwif_t. * Add IDE_PFLAG_PROBING port flag and keep it set during probing. * Fix ide_pio_need_iordy() to not enable IORDY at a probe time (IORDY may lead to controller lock up on certain controllers if the port is not occupied). Loosely based on the ...
```diff diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index f371b0de314f..fdd04bcd5568 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -1378,6 +1378,9 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d, ide_init_port(hwif, i & 1, d); ide_port_cab...
c9ef59ff01b6bd1c7360a64fcc8556a1193c2ed0
Analyze and fix the following issue in the Linux kernel code: ide: IORDY handling fixes
Problem Details: Add ide_pio_need_iordy() helper and convert host drivers to use it. This fixes it8172, it8213, pdc202xx_old, piix, slc90e66 and siimage host drivers to handle IORDY correctly. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/at91_ide.c b/drivers/ide/at91_ide.c index fc0949a8cfde..dbfeda42b940 100644 --- a/drivers/ide/at91_ide.c +++ b/drivers/ide/at91_ide.c @@ -185,8 +185,7 @@ static void at91_ide_set_pio_mode(ide_drive_t *drive, const u8 pio) timing = ide_timing_find_mode(XFER_PIO_0 + pio); BUG_ON(!timi...
6dae44f9a55f13765c877687602cd2bf1a057cfd
Analyze and fix the following issue in the Linux kernel code: ata: add ata_id_pio_need_iordy() helper (v2)
Problem Details: v2: Minor fixes per Sergei's review. Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/include/linux/ata.h b/include/linux/ata.h index 915da43edee1..9c75921f0c16 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -800,6 +800,20 @@ static inline int ata_id_is_ssd(const u16 *id) return id[ATA_ID_ROT_SPEED] == 0x01; } +static inline int ata_id_pio_need_iordy(const u16 *i...
79ca743f68a94443518f165355d4327bc0f87632
Analyze and fix the following issue in the Linux kernel code: ide-tape: fix build issue
Problem Details: This fixes drivers/ide/ide-tape.c: In function `idetape_chrdev_open': drivers/ide/ide-tape.c:1515: error: implicit declaration of function `idetape_read_position' make[1]: *** [drivers/ide/ide-tape.o] Error 1 Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz...
```diff diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index bb71e1e99dad..3a3f10f3f8fe 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -1512,7 +1512,7 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp) goto out_put_tape; } - idetape_read_position(drive); ...
cd659fd0d7c91b7830d1fea0c76a640e171d2d43
Analyze and fix the following issue in the Linux kernel code: hwmon: Fix more __devexit_p glitches
Problem Details: Make sure __devexit and devexit_p() match in all hwmon drivers. Suggested by a similar fix from Mike Frysinger. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
```diff diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index 5f81ddf71508..4639b2a4b815 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -247,7 +247,7 @@ static struct platform_driver f71882fg_driver = { .name = DRVNAME, }, .probe = f71882fg_probe, - .remove = __devexit...
1dcd775eb302f897865bbab8779ae4165c13cd7e
Analyze and fix the following issue in the Linux kernel code: [IA64] fix compile error in arch/ia64/mm/extable.c
Problem Details: ad6561dffa17f17bb68d7207d422c26c381c4313 ("module: trim exception table on init free.") put a bogus trim_init_extable() function into ia64 which didn't compile. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Tony Luck <tony.luck@intel.com>
```diff diff --git a/arch/ia64/mm/extable.c b/arch/ia64/mm/extable.c index e95d5ad9285d..c99a41e29fe8 100644 --- a/arch/ia64/mm/extable.c +++ b/arch/ia64/mm/extable.c @@ -8,7 +8,7 @@ #include <linux/sort.h> #include <asm/uaccess.h> -#include <asm/module.h> +#include <linux/module.h> static int cmp_ex(const void ...
931db6a32dbfaad627e89d0524979ce9cb894691
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] Clean up convoluted code in arch/x86/kernel/tsc.c:time_cpufreq_notifier()
Problem Details: Christoph Hellwig noticed the following potential uninitialised use: > arch/x86/kernel/tsc.c: In function 'time_cpufreq_notifier': > arch/x86/kernel/tsc.c:634: warning: 'dummy' may be used uninitialized in this function > > where we do have CONFIG_SMP set, freq->flags & CPUFREQ_CONST_LOOPS is > t...
```diff diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 3e1c057e98fe..3fbd3206eccf 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -631,17 +631,15 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data) { struct cpufreq_freqs *freq = data;...