id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
3deee42088ddcf5b23021aa089b53444797e565d
Analyze and fix the following issue in the Linux kernel code: [SCSI] tgt: fix warning
Problem Details: Using scsi_tgt_lib in a new target module, we were getting the following warning and a stack traceback on every I/O completion: WARNING: at block/blk-core.c:1108 Which is claiming we may be leaking a bio. We don't leak bios (blk_rq_unmap_user should free them). Set rq->bio to NULL before calling scs...
```diff diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c index 66241dd525ae..c399be979921 100644 --- a/drivers/scsi/scsi_tgt_lib.c +++ b/drivers/scsi/scsi_tgt_lib.c @@ -185,6 +185,7 @@ static void scsi_tgt_cmd_destroy(struct work_struct *work) dprintk("cmd %p %d %u\n", cmd, cmd->sc_data_directio...
66a362a2aa8ffa72670259fa15e2a77a01cc2217
Analyze and fix the following issue in the Linux kernel code: isofs: Fix lseek() to position beyond 4 GB
Problem Details: isofs supports files larger than 4 GB by using multi-extent files. However an lseek() to a position beyond 4 GB in such a file will fail with EINVAL, because s_maxbytes in the isofs superblock is initialized to 2^32-1, and generic_file_llseek() checks against that value. I therefore suggest increasing...
```diff diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 6b4dcd4f2943..5a44811b5027 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c @@ -722,7 +722,12 @@ root_found: } s->s_magic = ISOFS_SUPER_MAGIC; - s->s_maxbytes = 0xffffffff; /* We can handle files up to 4 GB */ + + /* + * With multi-extent files, ...
f2eb6575d5beba1e98d400463007d77555d1fc35
Analyze and fix the following issue in the Linux kernel code: vfs: add prepend_path() helper
Problem Details: Split off prepend_path() from __d_path(). This new helper takes an end-of-buffer pointer and buffer-length pointer just like the other prepend_* functions. Move the " (deleted)" postfix out to __d_path(). This patch doesn't change any functionality but paves the way for the following patches. Signe...
```diff diff --git a/fs/dcache.c b/fs/dcache.c index f1809e6b9fda..d09d93819b4d 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1905,48 +1905,30 @@ static int prepend_name(char **buffer, int *buflen, struct qstr *name) } /** - * __d_path - return the path of a dentry + * Prepend path string to a buffer + * * @path...
98dc568bc2ebefe4c0cb315a7fb7eff8bbb43176
Analyze and fix the following issue in the Linux kernel code: vfs: __d_path: dont prepend the name of the root dentry
Problem Details: In the old times pseudo-filesystems set the name of theroot dentry to some prefix like "pipe:" and the name of the child dentry to "[123]" and relied on a hack in __d_path() to replace the preceding slash with the root's name to get "pipe:[123]". Then the d_dname() dentry operation was introduced whic...
```diff diff --git a/fs/dcache.c b/fs/dcache.c index 995d08069d26..f1809e6b9fda 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1970,9 +1970,15 @@ out: return retval; global_root: - retval += 1; /* hit the slash */ - if (prepend_name(&retval, &buflen, &dentry->d_name) != 0) - goto Elong; + /* + * Filesystems need...
6d0b5456e14ec19edae7c18de4d355c58b133bd6
Analyze and fix the following issue in the Linux kernel code: fs/sysv/super.c: add support for non-PDP11 v7 filesystems
Problem Details: This adds byte order autodetection (of PDP-11 and LE filesystems). No attempt is made to detect big-endian filesystems -- were there any? Tested with PDP-11 v7 filesystems and PC-IX maintenance floppy. [akpm@linux-foundation.org: coding-style fixes] [AV: parser.h inclusion was a rudiment of discarded...
```diff diff --git a/fs/sysv/super.c b/fs/sysv/super.c index 5c0aab0b7e18..a0b0cda6927e 100644 --- a/fs/sysv/super.c +++ b/fs/sysv/super.c @@ -434,12 +434,46 @@ Ebadsize: goto failed; } -static int v7_fill_super(struct super_block *sb, void *data, int silent) +static int v7_sanity_check(struct super_block *sb, str...
98a21ef0abb666eeb12cf67e60203befb07e4210
Analyze and fix the following issue in the Linux kernel code: caif-spi: Bugfix SPI_DATA_POS settings were inverted.
Problem Details: The setting of SPI_DATA_POS depending on CONFIG_CAIF_SPI_SYNC where inverted. Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/caif/caif_spi_slave.c b/drivers/net/caif/caif_spi_slave.c index 077ccf840edf..2111dbfea6fe 100644 --- a/drivers/net/caif/caif_spi_slave.c +++ b/drivers/net/caif/caif_spi_slave.c @@ -22,13 +22,13 @@ #include <net/caif/caif_spi.h> #ifndef CONFIG_CAIF_SPI_SYNC -#define SPI_DATA_POS SPI...
24e263adba5fea744a3965ab1ca44620b74cb9c8
Analyze and fix the following issue in the Linux kernel code: caif: Bugfix - Increase default headroom size for control channel.
Problem Details: Headroom size for control channel must be at least 48 bytes in some scenarios. Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/caif/cfpkt_skbuff.c b/net/caif/cfpkt_skbuff.c index 01f238ff2346..c49a6695793a 100644 --- a/net/caif/cfpkt_skbuff.c +++ b/net/caif/cfpkt_skbuff.c @@ -9,7 +9,7 @@ #include <linux/hardirq.h> #include <net/caif/cfpkt.h> -#define PKT_PREFIX 16 +#define PKT_PREFIX 48 #define PKT_POSTFIX 2 #d...
db9ebb7cd0b6329c46ba3cc326d6414647fcfe6b
Analyze and fix the following issue in the Linux kernel code: mtd/nand_base: fix kernel-doc warnings & typos
Problem Details: Fix mtd/nand_base.c kernel-doc warnings and typos. Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'mtd' Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'ofs' Warning(drivers/mtd/nand/nand_base.c:893): No description found for parameter 'len'...
```diff diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 16a1714df008..a3c7473dd409 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -889,17 +889,17 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip) } /** - * __nand_unlock - [REPLACABL...
7cfffac06ca0d45040db228ce1835f5cf8623916
Analyze and fix the following issue in the Linux kernel code: nand/denali: use dev_xx debug function to replace nand_dbg_print and some printk
Problem Details: Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index e4462c0740b2..f59dd03f36d4 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -119,9 +119,6 @@ static const uint32_t reset_complete[4] = {INTR_STATUS0__RST_COMP, INTR_STATUS2__RST_COMP, INTR_STATUS3__...
24c3fa36dedd12616c273bfa4adfed3bb652637f
Analyze and fix the following issue in the Linux kernel code: nand/denali: use iowrite32() to replace denali_write32()
Problem Details: denali_write32() just implements a debug function for iowrite32(), only print out the write value. Remove this function since it's useless Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index ab960efb67f0..4ab9d89eae56 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -132,20 +132,6 @@ static uint32_t read_interrupt_status(struct denali_nand_info *denali); #define DEBUG_DENALI 0 -/* This is a wrappe...
21e2ecfe19df8f28408b5a607fef8704f51fa7f8
Analyze and fix the following issue in the Linux kernel code: i2c-pxa: fix compiler warning, due to missing const
Problem Details: This patch adds the missing const to "struct platform_device_id" to fix this warning: /home/frogger/pengutronix/linux/linux-2.6/drivers/i2c/busses/i2c-pxa.c: In function 'i2c_pxa_probe': /home/frogger/pengutronix/linux/linux-2.6/drivers/i2c/busses/i2c-pxa.c:1004: warning: initialization discards quali...
```diff diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 020ff23d762f..c94e51b2651e 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -1001,7 +1001,7 @@ static int i2c_pxa_probe(struct platform_device *dev) struct pxa_i2c *i2c; struct resource *res; stru...
8cbd84f2dd4e52a8771b191030c374ba3e56d291
Analyze and fix the following issue in the Linux kernel code: x86: fix up system call numbering nit
Problem Details: As pointed out by Jiri Slaby: when I resolved the the 32-bit x85 system call entry tables for prlimit (due to the conflict with fanotify), I forgot to add the numbering in comments that we do for every fifth entry. Reported-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-...
```diff diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 91dc4bb13032..b86feabed69b 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S @@ -844,5 +844,5 @@ ia32_sys_call_table: .quad compat_sys_recvmmsg .quad sys_fanotify_init .quad sys32_fanotify_mark - .quad sys_prlimi...
72d2e9f9f90ccafdce1f0a4a9eaabfb031f86def
Analyze and fix the following issue in the Linux kernel code: i2c.h: fix kernel-doc warnings
Problem Details: Fix kernel-doc warnings in linux/i2c.h: Warning(include/linux/i2c.h:176): No description found for parameter 'alert' Warning(include/linux/i2c.h:259): No description found for parameter 'of_node' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-f...
```diff diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 21067b418536..38dd4025aa4e 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -108,6 +108,7 @@ extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, * @shutdown: Callback for device shutdown * @suspend: Callback for devic...
0caa621065b2cc05d4e53655a34fd989f500b040
Analyze and fix the following issue in the Linux kernel code: kernel/timer.c: fix kernel-doc function parameter warning
Problem Details: Fix kernel-doc warning, add @timer description: Warning(kernel/timer.c:335): No description found for parameter 'timer' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/timer.c b/kernel/timer.c index f1b8afe1ad86..97bf05baade7 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -326,6 +326,7 @@ EXPORT_SYMBOL_GPL(round_jiffies_up_relative); /** * set_timer_slack - set the allowed slack for a timer + * @timer: the timer to be modified * @slack_hz: the ...
3d2be54bab7efd97b642838b9c883869ca5b98be
Analyze and fix the following issue in the Linux kernel code: docbook: fix fatal error from libata
Problem Details: 'make htmldocs' has a fatal error when processing libata.xml, as seen below. The string "Example patterns:" (or any string with "example.*:" in it AFAIK) causes some part of the doc generation tool chain to try to produce an <informalexample> block without a beginning <para>, but there is an ending </...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 4972fdf4bd31..7ef7c4f216fa 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -4281,7 +4281,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { * The special characters ?, [, -, or *, can be ma...
aca0fa34bdaba39bfddddba8ca70dba4782e8fe6
Analyze and fix the following issue in the Linux kernel code: jfs: don't allow os2 xattr namespace overlap with others
Problem Details: It's currently possible to bypass xattr namespace access rules by prefixing valid xattr names with "os2.", since the os2 namespace stores extended attributes in a legacy format with no prefix. This patch adds checking to deny access to any valid namespace prefix following "os2.". Signed-off-by: Dave ...
```diff diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index fa96bbb26343..2d7f165d0f1d 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c @@ -86,46 +86,25 @@ struct ea_buffer { #define EA_MALLOC 0x0008 +static int is_known_namespace(const char *name) +{ + if (strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN...
8436b410806d9a9a8ebfa1b924d8a96da893561a
Analyze and fix the following issue in the Linux kernel code: ARM: 6324/1: cam60: move cam60_spi_devices to .init.data
Problem Details: cam60_spi_devices is passed to at91_add_device_spi which calls spi_register_board_info. The latter makes a copy of it, so living in .init.data is OK. This fixes the following warning in cam60_defconfig: WARNING: vmlinux.o(.data+0x2a00): Section mismatch in reference from the variable cam60_spi_devic...
```diff diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index 02138af631e7..05c70728f041 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c @@ -98,14 +98,14 @@ static struct mtd_partition __initdata cam60_spi_partitions[] = { }, }; -static struct f...
b58af4066d240b18b43f202e07b9ec7461d90b17
Analyze and fix the following issue in the Linux kernel code: USB: serial: fix stalled writes
Problem Details: As David VomLehn points out, it was possible to receive an interrupt before clearing the free-urb flag which could lead to the urb being incorrectly marked as busy. For the same reason, move tx_bytes accounting so that it will never be negative. Note that the free-flags set and clear operations do no...
```diff diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index a817ced82835..ca92f67747cc 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -208,18 +208,23 @@ retry: urb->transfer_buffer_length = count; usb_serial_debug_data(debug, &port->dev, __func__, count, ...
b3e670443b7fb8a2d29831b62b44a039c283e351
Analyze and fix the following issue in the Linux kernel code: USB: fix thread-unsafe anchor utiliy routines
Problem Details: This patch fixes a race condition in two utility routines related to the removal/unlinking of urbs from an anchor. If two threads are concurrently accessing the same anchor, both could end up with the same urb - thinking they are the exclusive owner. Alan Stern pointed out a related issue in usb_unli...
```diff diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index 7c0555548ac8..419e6b34e2fe 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -137,6 +137,16 @@ void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor) } EXPORT_SYMBOL_GPL(usb_anchor_urb); +/* Callers must hold ancho...
e10e1bec8e6654de4591ef45ddd6a6d1e5b2591c
Analyze and fix the following issue in the Linux kernel code: USB: usbtest: avoid to free coherent buffer in atomic context
Problem Details: This patch fixes the warning below: [30753.755998] ------------[ cut here ]------------ [30753.755998] WARNING: at /home/tom/git/linux-2.6/linux-2.6-next/arch/x86/include/asm/dma-mapping.h:155 hcd_buffer_free+0xb1/0xd4 [usbcore]() [30753.755998] Hardware name: 6475EK2 [30753.755998] Modules linked in: ...
```diff diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 0cfbd789ddf2..d92b7ec9a230 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -1378,7 +1378,6 @@ static void iso_callback (struct urb *urb) break; } } - simple_free_urb (urb); ctx->pending--; if (c...
c6ba1c2af2da31ffb57949edbd1dba34f97d1d4b
Analyze and fix the following issue in the Linux kernel code: USB:: fix linux/usb.h kernel-doc warnings
Problem Details: Fix kernel-doc warnings in linux/usb.h: Warning(include/linux/usb.h:185): No description found for parameter 'resetting_device' Warning(include/linux/usb.h:1212): No description found for parameter 'stream_id' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gr...
```diff diff --git a/include/linux/usb.h b/include/linux/usb.h index e6cbc34901f4..35fe6ab222bb 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -127,6 +127,8 @@ enum usb_interface_condition { * queued reset so that usb_cancel_queued_reset() doesn't try to * remove from the workqueue when run...
185c9bcfde628f1d71aefd34517252cce4c4a57a
Analyze and fix the following issue in the Linux kernel code: USB: ehci: fix remove of ehci debugfs dir
Problem Details: The patch below on gregkh tree only creates 'lpm' file under ehci->debug_dir, but not removes it when unloading module, USB: EHCI: EHCI 1.1 addendum: preparation which can make loading of ehci-hcd module failed after unloading it. This patch replaces debugfs_remove with debugfs_remove_recursive to...
```diff diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 4498efb49b95..76b7fd2d838a 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -1049,49 +1049,33 @@ static inline void create_debug_files (struct ehci_hcd *ehci) ehci->debug_dir = debugfs_create_dir(bus->b...
4d47166c975382f5e95086e8a88d4a39d27b34b5
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsotg: fix compilation problem
Problem Details: drivers/usb/gadget/s3c-hsotg.c: In function ‘s3c_hsotg_otgreset’: drivers/usb/gadget/s3c-hsotg.c:2816: error: ‘MHZ’ undeclared (first use in this function) drivers/usb/gadget/s3c-hsotg.c:2816: error: (Each undeclared identifier is reported only once drivers/usb/gadget/s3c-hsotg.c:2816: error: for each ...
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index a4e0b0fa0191..ce272b4d79c4 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -36,6 +36,7 @@ #include <plat/regs-usb-hsotg.h> #include <mach/regs-sys.h> #include <plat/udc-hs.h> +#include <plat...
a33e7136e9652374f7d54ded3cff8062d8e1e84f
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsotg: Fix OUT packet request retry
Problem Details: If there is more data in the request than we could fit into a single hardware request, then check when the OutDone event is received if we have more data, and if so, schedule the new data instead of trying to complete the request (and in the case of EP0, sending a 0 packet in the middle of a transfer)....
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 552ec899500a..825b6ca62941 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -1383,6 +1383,9 @@ static void s3c_hsotg_rx_data(struct s3c_hsotg *hsotg, int ep_idx, int size) read_ptr = hs_req->r...
b05ca580c39314c8527e2e1c36a823970cc01683
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsotg: Fix the OUT EP0 limit
Problem Details: The EP0 out limit is the same as the IN limit, so make them the same. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 1020006ecfc1..552ec899500a 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -611,11 +611,10 @@ static unsigned get_ep_limit(struct s3c_hsotg_ep *hs_ep) maxsize = S3C_DxEPTSIZ_XferSize_LIMIT +...
6cd68de741d5b05482cab369978663fdf78c407c
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsotg: Fix max EP0 IN request length
Problem Details: The maximum length for any EP0 IN request on EP0 is 127 bytes, not 128 as the driver currently has it. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 10aeee145eea..1020006ecfc1 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -612,8 +612,7 @@ static unsigned get_ep_limit(struct s3c_hsotg_ep *hs_ep) maxpkt = S3C_DxEPTSIZ_PktCnt_LIMIT + 1; ...
c9a64ea884b8b40d70077ffe1e93081f2190f072
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsotg: Check for new request before enqueing new setup
Problem Details: Before trying a new setup transaction after getting an EP0 in complete interrupt, check that the driver did not try and send more EP0 IN data before enqueing a new setup transaction. This fixes a bug where we cannot send all of the IN data in one go so split the transfer, but then fail to send all the...
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index df6a39d6270f..10aeee145eea 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -1790,7 +1790,7 @@ static void s3c_hsotg_epint(struct s3c_hsotg *hsotg, unsigned int idx, if (dir_in) { s3c_hso...
10aebc772a10c95e30dff0779cb0f879b8f1554f
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsotg: Add initial detection and setup for dedicated FIFO mode
Problem Details: Add support for the dedicated FIFO mode on newer SoCs such as the S5PV210 partly to improve support and to fix the bug where any non-EP0 IN endpoint requires its own FIFO allocation. To fix this, we ensure that any non-zero IN endpoint is given a TXFIFO using the same allocation method as the periodic...
```diff diff --git a/arch/arm/plat-samsung/include/plat/regs-usb-hsotg.h b/arch/arm/plat-samsung/include/plat/regs-usb-hsotg.h index 8d18d9d4d148..dc90f5ede88f 100644 --- a/arch/arm/plat-samsung/include/plat/regs-usb-hsotg.h +++ b/arch/arm/plat-samsung/include/plat/regs-usb-hsotg.h @@ -226,6 +226,7 @@ #define S3C_DI...
e7a9ff54271bf0ddbf641e5a0bde3ebda35808be
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsotg: Avoid overwriting contents of perodic in 'fifo'
Problem Details: In shared fifo mode (used on older SoCs) the periodic in fifo beahves much more like a packet buffer, discarding old data when writing new data. Avoid this by ensuring that we do not load new transactions in when there is data sitting already in the FIFO. Note, this may not be an observed bug, we are ...
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 4a251458c61d..354fd456f8cc 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -91,7 +91,9 @@ struct s3c_hsotg_req; * For periodic IN endpoints, we have fifo_size and fifo_load to try * and kee...
679f9b7c7c7d3c746792138e9d7d76578ef52c41
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsotg: The NPTX/PTX FIFO sizes are in words, not bytes
Problem Details: Fix a problem where we have been underestimating the space available in the IN PTX/NPTX FIFOs by assuming that they where simply word aligned instead of in number-of-words. This means all length calculations need to be multiplied-by-4. Note, we do not change the information about fifo size or start ad...
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 81f62da26f36..4a251458c61d 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -505,6 +505,7 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg, } can_write = S3C_GNPTXSTS_NPTxFSpcA...
6d091ee761992f804a1dcd411836ad0abb71be10
Analyze and fix the following issue in the Linux kernel code: USB: s3c-hsotg: Increase TX fifo limit
Problem Details: Up the FIFO size for the TX to 1024 entries, as this now seems to work with all the cores. This fixes a problem when using large packets on a core with MPS set to 512 can hang due to insufficient space for the writes. The hang arises due to getting the non-periodic FIFO empty IRQ but not being able to...
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 26193eceb323..81f62da26f36 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -310,11 +310,11 @@ static void s3c_hsotg_init_fifo(struct s3c_hsotg *hsotg) hsotg->regs + S3C_GNPTXFSIZ); */ - ...
ffda080353979273e8aa69fc1e6134f20643ae56
Analyze and fix the following issue in the Linux kernel code: USB: EHCI: add missing frame -> microframe conversion
Problem Details: This patch (as1407) fixes a bug in ehci-hcd's isochronous scheduler. All its calculations should be done in terms of microframes, but for full-speed devices, sched->span is stored in frames. It needs to be converted. This fix is liable to expose problems in other drivers. The old code would accept U...
```diff diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 2e704fa3cedf..34a928d3b7d2 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -79,7 +79,13 @@ static const char hcd_name [] = "ehci_hcd"; #define EHCI_TUNE_RL_TT 0 #define EHCI_TUNE_MULT_HS 1 /* 1-3 transa...
ae68a83bdc1971cb02fefc7a686ba6d077065e71
Analyze and fix the following issue in the Linux kernel code: USB: EHCI: remove PCI assumption
Problem Details: This patch (as1405) fixes a small bug in ehci-hcd's isochronous scheduler. Not all EHCI controllers are PCI, and the code shouldn't assume that they are. Instead, introduce a special flag for controllers which need to delay iso scheduling for full-speed devices beyond the scheduling threshold. Signe...
```diff diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index f555e4f35a04..58b72d741d93 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -114,6 +114,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd) break; case PCI_VENDOR_ID_INTEL: ehci->need_io_watchdog = ...
fa345d0109ac8c8e388196b1db29d1a570239d3b
Analyze and fix the following issue in the Linux kernel code: USB: otg/ulpi.c : fix register write
Problem Details: ulpi_set_vbus and ulpi_set_flags are using ULPI_SET(register) to write to the PHY's registers, which means we can only set bits in the PHY's register and not clear them. By directly using the address of the register without any offset, we now get the expected behaviour for these functions. Signed-off-...
```diff diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c index d331b222ad21..10a1df628f8c 100644 --- a/drivers/usb/otg/ulpi.c +++ b/drivers/usb/otg/ulpi.c @@ -54,7 +54,7 @@ static int ulpi_set_flags(struct otg_transceiver *otg) if (otg->flags & USB_OTG_EXT_VBUS_INDICATOR) flags |= ULPI_OTG_CTRL_EXTVBUS...
d0390d92bf548a903a48e1a2b3a12eff8a9d838b
Analyze and fix the following issue in the Linux kernel code: USB: musb: forward debug mode feature to gadget
Problem Details: This is a patch for the musb usb controller. It allows forwarding of the debug mode feature to its gadget in order to be able to act as an ehci debug device. This patch has been tested on an IGEPv2 board running a 2.6.35-rc1 kernel. Signed-off-by: Stephane Duverger <stephane.duverger@gmail.com> Cc: ...
```diff diff --git a/drivers/usb/musb/musb_gadget_ep0.c b/drivers/usb/musb/musb_gadget_ep0.c index 21b9788d0243..59bef8f3a358 100644 --- a/drivers/usb/musb/musb_gadget_ep0.c +++ b/drivers/usb/musb/musb_gadget_ep0.c @@ -402,6 +402,9 @@ __acquires(musb->lock) musb->g.a_alt_hnp_support = 1; break; #endif + ...
f6c826a90055dd05905982f7a3f60e0bcaa0434e
Analyze and fix the following issue in the Linux kernel code: USB: EHCI Debug Port Device Gadget
Problem Details: This is a patch that implements an USB EHCI Debug Device using the Gadget API. This patch applies to a 2.6.35-rc3 kernel. The gadget needs a compliant usb controller that forwards the USB_DEVICE_DEBUG_MODE feature to its gadget. The gadget provides two configuration modes, one that only printk() the ...
```diff diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index dd3b25101858..cd27f9bde2c8 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -915,6 +915,34 @@ config USB_G_HID Say "y" to link the driver statically, or "m" to build a dynamically linked module called "...
5aa4af2ce6a0643f32d47f21614817792b85298d
Analyze and fix the following issue in the Linux kernel code: USB: ehci_omap: fix device detect issue with modules
Problem Details: Currently devices don't get detected automatically if the ehci module is inserted 2nd time onward. We need to disconnect and reconnect the device for it to get detected and enumerated. Resetting the USB PHY using PHY reset comamnd over ULPI fixes this issue. Tested on OMAP3EVM. Signed-off-by: Ajay Ku...
```diff diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 5450e628157f..116ae280053a 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -38,6 +38,7 @@ #include <linux/gpio.h> #include <linux/regulator/consumer.h> #include <linux/slab.h> +#include <linux/usb/u...
5128993b6f5f38bc567f3c246248ca29fd599132
Analyze and fix the following issue in the Linux kernel code: USB: ulpi: fix compilation warning
Problem Details: Fixes below compilation warning from ulpi.h include/linux/usb/ulpi.h:145: warning: 'struct otg_io_access_ops' declared inside parameter list include/linux/usb/ulpi.h:145: warning: its scope is only this definition or declaration, which is probably not what you want Signed-of...
```diff diff --git a/include/linux/usb/ulpi.h b/include/linux/usb/ulpi.h index 2369d07c3c87..900d97b7096a 100644 --- a/include/linux/usb/ulpi.h +++ b/include/linux/usb/ulpi.h @@ -11,6 +11,7 @@ #ifndef __LINUX_USB_ULPI_H #define __LINUX_USB_ULPI_H +#include <linux/usb/otg.h> /*--------------------------------------...
d709d22eea927e42c911ac0ad151b56aeafd1b76
Analyze and fix the following issue in the Linux kernel code: USB: musb: fix compilation warning in host only mode
Problem Details: Fixes below compilation warning when host only configuration is selected. drivers/usb/musb/musb_core.c: In function 'musb_stage0_irq': drivers/usb/musb/musb_core.c:711: warning: unused variable 'mbase' Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> ...
```diff diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 3b795c56221f..540c766c4f86 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -704,7 +704,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, #ifdef CONFIG_USB_MUSB_HDRC_HCD if (int_...
4307a28eb0128417d9a2b9d858d2bce70ee5b383
Analyze and fix the following issue in the Linux kernel code: USB: EHCI: fix NULL pointer dererence in HCDs that use HCD_LOCAL_MEM
Problem Details: If we use the HCD_LOCAL_MEM flag and dma_declare_coherent_memory() to enforce the host controller's local memory utilization we also need to disable native scatter-gather support, otherwise hcd_alloc_coherent() in map_urb_for_dma() is called with urb->transfer_buffer == NULL, that triggers a NULL point...
```diff diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 0358c05e6e8a..c5753c797735 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -1218,6 +1218,11 @@ static int hcd_alloc_coherent(struct usb_bus *bus, { unsigned char *vaddr; + if (*vaddr_handle == NULL) { + WARN_ON_ONCE(1);...
ff2f07874362d34684296f2bd5547a099f33c6d4
Analyze and fix the following issue in the Linux kernel code: USB: fix race between root-hub wakeup & controller suspend
Problem Details: This patch (as1395) adds code to hcd_pci_suspend() for handling wakeup races. This is another general race pattern, similar to the "open vs. unregister" race we're all familiar with. Here, the race is between suspending a device and receiving a wakeup request from one of the device's suspended childr...
```diff diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index e387e394f876..352577baa53d 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -388,8 +388,20 @@ static int hcd_pci_suspend(struct device *dev) if (hcd->driver->pci_suspend) { bool do_wakeup = device_may_wake...
89ba85d4015b7fa738b35bcc228075c117a9a578
Analyze and fix the following issue in the Linux kernel code: USB: gadget: section mismatch warning fixed
Problem Details: In may gadgets bind and bind like functions were in a init section as they were only run during initialisation. However, being callback functions they were referenced from structures in “normal” sections. Changing the tag from “__init” to “__ref” fixes the warnings. Signed-off-by: Michal Nazarewicz ...
```diff diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c index a62af7b59094..b744ccd0f34d 100644 --- a/drivers/usb/gadget/audio.c +++ b/drivers/usb/gadget/audio.c @@ -89,7 +89,7 @@ static const struct usb_descriptor_header *otg_desc[] = { /*--------------------------------------------------------...
248720529cb50c6b6cf2ec01748049c6b532a8cc
Analyze and fix the following issue in the Linux kernel code: USB: gadget: f_mass_storage: dead code removed
Problem Details: The ep0req_name was never used in f_mass_storage hence it may be safely removed from the code. It was a leftover from File Storage Gadget which used it for debug messages. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: G...
```diff diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 8a95ebc7e3d3..fa86b946dcd6 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -333,7 +333,6 @@ struct fsg_common { struct usb_ep *ep0; /* Copy of gadget->ep0 */ struct us...
00b81fb23a4937a24cb010f41ac173a786eb4c55
Analyze and fix the following issue in the Linux kernel code: USB-BKL: Remove BKL use in uhci-debug
Problem Details: BKL was not really needed, just came from earlier push downs. The only part that's a bit dodgy is the lseek function. Would need another lock or atomic access to fpos on 32bit? Better to have a libfs lseek Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Alan Stern...
```diff diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c index 98cf0b26b968..c168999722d1 100644 --- a/drivers/usb/host/uhci-debug.c +++ b/drivers/usb/host/uhci-debug.c @@ -495,18 +495,16 @@ static int uhci_debug_open(struct inode *inode, struct file *file) { struct uhci_hcd *uhci = inode->...
aa4d8342988d0c1a79ff19b2ede1e81dfbb16ea5
Analyze and fix the following issue in the Linux kernel code: USB: EHCI: EHCI 1.1 addendum: preparation
Problem Details: EHCI 1.1 addendum introduced several energy efficiency extensions for EHCI USB host controllers: 1. LPM (link power management) 2. Per-port change 3. Shorter periodic frame list 4. Hardware prefetching This patch is intended to define the HW bits and debug interface for EHCI 1.1 addendum. The LPM and ...
```diff diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 874d2000bf92..df5546bb8367 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -98,13 +98,18 @@ static void dbg_hcc_params (struct ehci_hcd *ehci, char *label) HCC_64BIT_ADDR(params) ? " 64 bit addr" : "")...
6e1c3b467ffd9d6eb725dda544f6fd10e471ea71
Analyze and fix the following issue in the Linux kernel code: USB: otg.h: Fix the mixup in parameters order.
Problem Details: otg_io_write() function does not follow the declaration of struct otg_io_access_ops. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index f8302d036a76..54b2c5e48b9d 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h @@ -146,10 +146,10 @@ static inline int otg_io_read(struct otg_transceiver *otg, u32 reg) return -EINVAL; } -static inline int otg_io_write(stru...
cd62aced31dee9a9a8e63da7bd564911891b3665
Analyze and fix the following issue in the Linux kernel code: USB: core endpoint: Fix Coding Styles
Problem Details: Fixed coding styles in the core usb endpoint. Signed-off-by: Carlos Sánchez Acosta <csanchez@neurowork.net> Signed-off-by: Alejandro Sánchez Acosta <asanchez@neurowork.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c index 4f84a41ee7a8..3788e738e265 100644 --- a/drivers/usb/core/endpoint.c +++ b/drivers/usb/core/endpoint.c @@ -96,16 +96,21 @@ static ssize_t show_ep_interval(struct device *dev, switch (usb_endpoint_type(ep->desc)) { case USB_ENDPOIN...
16be57259f4e664e4e423caa896963de1b7b8d14
Analyze and fix the following issue in the Linux kernel code: USB: core driver: Fix Coding Styles
Problem Details: Fixed coding styles in the core usb driver. Signed-off-by: Carlos Sánchez Acosta <csanchez@neurowork.net> Signed-off-by: Alejandro Sánchez Acosta <asanchez@neurowork.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index a6bd53ace035..880f65baf581 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -1742,9 +1742,8 @@ static int usb_runtime_suspend(struct device *dev) } /* Prevent the parent from suspending immediately after */...
89b54397909dd1d76737b65f682d2aae0781a33c
Analyze and fix the following issue in the Linux kernel code: USB: iuu_phoenix: Add support for different baud rates.
Problem Details: Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index 74551cb2e8ee..efc72113216b 100644 --- a/drivers/usb/serial/iuu_phoenix.c +++ b/drivers/usb/serial/iuu_phoenix.c @@ -1,6 +1,8 @@ /* * Infinity Unlimited USB Phoenix driver * + * Copyright (C) 2010 James Courtier-Dutton (J...
ba297edde4dd7376832bafb23e032a40d5928b56
Analyze and fix the following issue in the Linux kernel code: USB: UHCI: acquire spinlock before calling start_rh()
Problem Details: This patch (as1392) fixes a bug in uhci-hcd: The start_rh() routine is supposed to be called with the private spinlock held. If an IRQ comes in at just the wrong time, the driver will think the controller has died when in fact it simply hasn't start yet. The patch also addresses some issues that may ...
```diff diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 6637e52736dd..d1dce2166eff 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c @@ -691,7 +691,9 @@ static int uhci_start(struct usb_hcd *hcd) configure_hc(uhci); uhci->is_initialized = 1; + spin_lock_irq(&u...
c548795abe0d3520b74e18f23ca0a0d72deddab9
Analyze and fix the following issue in the Linux kernel code: USB: add check to detect host controller hardware removal
Problem Details: This patch (as1391) fixes a problem that can occur when USB host controller hardware is hot-unplugged. If no interrupts are generated by the unplug then the HCD may not realize that the controller is gone, and the subsequent unbind may hang waiting for interrupts that never arrive. The solution (for ...
```diff diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 1cf2d1e79a5c..7e2d5271b0c9 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -292,6 +292,14 @@ void usb_hcd_pci_remove(struct pci_dev *dev) if (!hcd) return; + /* Fake an interrupt request in order to giv...
6d88e6792574497bfac9a81403cc47712040636f
Analyze and fix the following issue in the Linux kernel code: USB: don't stop root-hub status polls too soon
Problem Details: This patch (as1390) fixes a problem that crops up when a UHCI host controller is unbound from uhci-hcd while there are still some active URBs. The URBs have to be unlinked when the root hub is unregistered, and uhci-hcd relies upon root-hub status polls as part of its unlinking procedure. But usb_hcd...
```diff diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index caae4625a1f1..53f14c82ff2e 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -667,7 +667,7 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd) unsigned long flags; char buffer[6]; /* Any root hubs with > 31 ports? */ - i...
96e077ae347912dfce0e93f5958efc3ed6f311f4
Analyze and fix the following issue in the Linux kernel code: USB: fix failure path in usb_add_hcd()
Problem Details: This patch (as1389) fixes some errors in the failure pathway of usb_add_hcd(). The actions it takes ought to be exactly the same as those taken by usb_remove_hcd(), but they aren't. In one case (removal of the usb_bus_attr_group), the two routines are brought into agreement by changing usb_remove_hcd...
```diff diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 12742f152f43..caae4625a1f1 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2229,7 +2229,7 @@ int usb_add_hcd(struct usb_hcd *hcd, rhdev->speed = USB_SPEED_SUPER; break; default: - goto err_allocate_root_hub; + goto...
9b00c64318cc337846a7a08a5678f5f19aeff188
Analyze and fix the following issue in the Linux kernel code: nfs: Add "lookupcache" to displayed mount options
Problem Details: Running "cat /proc/mounts" fails to display the "lookupcache" option. This oversight cost me a bunch of wasted time recently. The following simple patch fixes it. CC: stable <stable@kernel.org> Signed-off-by: Patrick LoPresti <lopresti@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp...
```diff diff --git a/fs/nfs/super.c b/fs/nfs/super.c index f1ae39f6cb02..3d0d63c00304 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -655,6 +655,13 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss, if (nfss->options & NFS_OPTION_FSCACHE) seq_printf(m, ",fsc"); + + if (nfss->...
4df772d76d2f9be2f3207ad154452e349b04a972
Analyze and fix the following issue in the Linux kernel code: ARM: 6322/1: imx/pca100: Fix name of spi platform data
Problem Details: Commit 7536cf9 (ARM: imx: dynamically register spi_imx devices (imx27)) introduced a variable named "pca100_spi0_data" but passed "&pca100_spi_0_data" to imx27_add_spi_imx0. This wasn't noticed earlier because both SPI_IMX and MACH_PCA100 are not enabled in mx27_defconfig. This fixes a build failu...
```diff diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 6c92deaf468f..a389d1148f18 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c @@ -408,7 +408,7 @@ static void __init pca100_init(void) mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_IN); sp...
ce45947b5687918dc6ce8e31938fbfd4059bf89e
Analyze and fix the following issue in the Linux kernel code: ARM: 6321/1: fix syntax error in main Kconfig file
Problem Details: This fixes: scripts/kconfig/mconf arch/arm/Kconfig arch/arm/Kconfig:1187: invalid option make[1]: *** [menuconfig] Error 1 make: *** [menuconfig] Error 2 which was introduced by 1cea732 ([ARM] tegra: SMP support) Cc: Tanmay Upadhyay <tanmay.upadhyay@einfochips.com> Cc: xsecute@googlemail.com C...
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e3956042892c..05fc7cf6711d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1196,7 +1196,7 @@ config LOCAL_TIMERS REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_TEGRA) default y - select HA...
379aae5d6c3d8d9751d85a8022e68a90df13a7ae
Analyze and fix the following issue in the Linux kernel code: ARM: 6295/1: fix U300 apb_pclk split
Problem Details: This fixes a regression due to the new apb_pclk stuff in the U300 platform, makes it run by splitting the apb clock off the single UART clocks. For the MMCI and PL022 clocks we don't split them: these are actually hardwired to the same clock terminal and will thus simply have a double reference count a...
```diff diff --git a/arch/arm/mach-u300/clock.c b/arch/arm/mach-u300/clock.c index 5d12d547789e..7836de35893c 100644 --- a/arch/arm/mach-u300/clock.c +++ b/arch/arm/mach-u300/clock.c @@ -947,6 +947,10 @@ static struct clk fast_clk = { .lock = __SPIN_LOCK_UNLOCKED(fast_clk.lock), }; +/* + * The MMCI apb_pclk ...
c2fab1242a16f8e66b680d664322c3811e7b003d
Analyze and fix the following issue in the Linux kernel code: ARM: 6306/1: fix inverted MMC card detect in U300
Problem Details: This converts the U300 to uninverted logic for MMCI card detect, fixing a regression in the current tree. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c index 88506d030596..de1ac9ad2213 100644 --- a/arch/arm/mach-u300/mmc.c +++ b/arch/arm/mach-u300/mmc.c @@ -74,16 +74,16 @@ static void _mmci_callback(struct work_struct *ws) mdelay(20); - mmci_card->mmc_inserted = !!gpio_get_value(U300_GPIO_P...
77754410fb8ecd7cf307bcd75d60f3b22b8c3cd2
Analyze and fix the following issue in the Linux kernel code: ARM: 6286/1: fix Thumb-2 decompressor broken by "Auto calculate ZRELADDR"
Problem Details: "ARM: Auto calculate ZRELADDR and provide option for exceptions" broke the Thumb-2 decompressor because it removed an entry in the LC0 table but didn't adjust the offset the Thumb-2 code uses to load the SP from that table. Fix it, and also change the ARM code to use the separate SP-load since ARM ins...
```diff diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index abf4d65acf62..6af9907c3b5c 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -170,9 +170,8 @@ not_angel: .text adr r0, LC0 - ARM( ldmia r0, {r1, r2, r3, r5, r6, r11, ip, sp}) - THUMB...
81ef806163ebfd4775fc3154e031aad6feaaa192
Analyze and fix the following issue in the Linux kernel code: ARM: 6281/1: video/imxfb.c: allow usage without BACKLIGHT_CLASS_DEVICE
Problem Details: From: Eric Bénard <eric@eukrea.com> This fixes the following build failure: drivers/built-in.o: In function `imxfb_probe': mxcmmc.c:(.init.text+0xd04): undefined reference to `backlight_device_register' drivers/built-in.o: In function `imxfb_remove': mxcmmc.c:(.devexit.text+0x44): undefined referen...
```diff diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index 43f0639b1c10..5c363d026f64 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c @@ -40,6 +40,12 @@ */ #define DEBUG_VAR 1 +#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || \ + (defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) && \ + defi...
868003ca7ad17ac6c1606dc36101f10a7825b399
Analyze and fix the following issue in the Linux kernel code: ARM: 6280/1: imx: Fix build failure when including <mach/gpio.h> without <linux/spinlock.h>
Problem Details: This is a follow up to 14cb0de (arm/imx/gpio: add spinlock protection) and fixes the following build failure: CC arch/arm/mach-imx/pcm970-baseboard.o In file included from arch/arm/include/asm/gpio.h:6, from include/linux/gpio.h:8, from arch/arm/mach-imx/pcm970-baseboard.c:20: arc...
```diff diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h index 661fbc605759..af33b74f569e 100644 --- a/arch/arm/plat-mxc/include/mach/gpio.h +++ b/arch/arm/plat-mxc/include/mach/gpio.h @@ -19,6 +19,7 @@ #ifndef __ASM_ARCH_MXC_GPIO_H__ #define __ASM_ARCH_MXC_GPIO_H__ +#inclu...
bf9c1fca9ae9a79ed209e7ab2c10b3862f3f6f72
Analyze and fix the following issue in the Linux kernel code: Char: nozomi, set tty->driver_data appropriately
Problem Details: Sorry, one more fix, this one depends on the other, so this is rather 2/2. -- tty->driver_data is used all over the code, but never set. This results in oopses like: BUG: unable to handle kernel NULL pointer dereference at 0000000000000130 IP: [<ffffffff814a0040>] mutex_lock+0x10/0x40 ... Pid: 2157, c...
```diff diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c index 21ae1b158b3b..18af923093c3 100644 --- a/drivers/char/nozomi.c +++ b/drivers/char/nozomi.c @@ -1612,6 +1612,7 @@ static int ntty_install(struct tty_driver *driver, struct tty_struct *tty) if (ret == 0) { tty_driver_kref_get(driver); tty->co...
ee78bb95b7bea08b7774a02073ea2bb45611a9e1
Analyze and fix the following issue in the Linux kernel code: Char: nozomi, fix tty->count counting
Problem Details: Currently ntty_install omits to increment tty count and we get the following warnings: Warning: dev (noz2) tty->count(0) != #fd's(1) in tty_open So to fix that, add one tty->count++ there. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@linux.intel.com> Cc: stable <stable@kernel.org> [....
```diff diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c index a6638003f530..21ae1b158b3b 100644 --- a/drivers/char/nozomi.c +++ b/drivers/char/nozomi.c @@ -1611,6 +1611,7 @@ static int ntty_install(struct tty_driver *driver, struct tty_struct *tty) ret = tty_init_termios(tty); if (ret == 0) { tty_driv...
e38018be3e7c03dd7e8f4ab0e1d55407cebbf89d
Analyze and fix the following issue in the Linux kernel code: serial: max3107: Fix gpiolib support
Problem Details: Because of the way gpiolib works we actually need to ifdef this in our header file Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/serial/max3107.h b/drivers/serial/max3107.h index 72b30415f417..7ab632392502 100644 --- a/drivers/serial/max3107.h +++ b/drivers/serial/max3107.h @@ -368,8 +368,10 @@ struct max3107_port { /* SPI device structure */ struct spi_device *spi; +#if defined(CONFIG_GPIOLIB) /* GPIO chip s...
669b7a0938e759097c150400cd36bd49befaf5bb
Analyze and fix the following issue in the Linux kernel code: hsu: add a periodic timer to check dma rx channel
Problem Details: A general problem for uart rx dma channel is you never know when and how much data will be received, so usually preset it a DMA descriptor with a big size, and rely on DMA RX timeout IRQ to know there is some data in rx channel. For a RX data size of multiple of MOTSR, there will be no timeout IRQ iss...
```diff diff --git a/drivers/serial/mfd.c b/drivers/serial/mfd.c index 300dcb134e07..ed2bf6b14a4a 100644 --- a/drivers/serial/mfd.c +++ b/drivers/serial/mfd.c @@ -64,6 +64,8 @@ #define mfd_readl(obj, offset) readl(obj->reg + offset) #define mfd_writel(obj, offset, val) writel(val, obj->reg + offset) +#define HSU_D...
1917ac76e023339c73844bec775375b147f57ac7
Analyze and fix the following issue in the Linux kernel code: serial: MMIO32 support for 8250_early.c
Problem Details: Provide MMIO32 support in 8250_early (aka earlycon) [randy.dunlap@oracle.com: fix printk format warnings] [akpm@linux-foundation.org: fix printk args some more] Signed-off-by: Samium Gromoff <_deepfire@feelingofgreen.ru> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: KOSAKI Motohiro <kosaki...
```diff diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 44f6b19c50bb..d529b1363e95 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -681,8 +681,11 @@ and is between 256 and 4096 characters. It is defined in the file earlycon= [K...
1b6331848b69d1ed165a6bdc75c4046d68767563
Analyze and fix the following issue in the Linux kernel code: serial: general fixes in the serial_rs485 structure
Problem Details: Fix several issues related to the RS485 interface: - It adds the flag SER_RS485_RTS_BEFORE_SEND that was missing from the serial_rs485 structure (even if "delay_rts_before_send" was existing) - It adds a further "delay_rts_after_send" field for those drivers that can have a delay after send (...
```diff diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index a182def7007d..3892666b5fbd 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c @@ -217,7 +217,8 @@ void atmel_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf) if (rs485conf->flags & ...
93e3d58284626ff6466f9c3dac8800cd6f8079c6
Analyze and fix the following issue in the Linux kernel code: serial: fix missing bit coverage of ASYNC_FLAGS
Problem Details: It seems that currently ASYNC_FLAGS is one bit short of covering all the bits of the ASYNC user flags. In particular it does not cover the ASYNC_AUTOPROBE bit. ASYNCB_LAST_USER and ASYNCB_AUTOPROBE are both equal to 15. Therefore: ASYNC_AUTOPROBE = 1000 0000 0000 0000 ASYNC_FLAGS = 0111 1111 111...
```diff diff --git a/include/linux/serial.h b/include/linux/serial.h index c8613c3ff9d3..c3b45add494d 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h @@ -151,7 +151,7 @@ struct serial_uart_config { #define ASYNC_BUGGY_UART (1U << ASYNCB_BUGGY_UART) #define ASYNC_AUTOPROBE (1U << ASYNCB_AUTOPROBE) ...
e8dd4757a6cf0a8909148a61b89fa3a6d4f9b3ee
Analyze and fix the following issue in the Linux kernel code: serial: "altera_uart: simplify altera_uart_console_putc()" checkpatch fixes
Problem Details: ERROR: code indent should use tabs where possible #32: FILE: drivers/serial/altera_uart.c:397: +^I ALTERA_UART_STATUS_TRDY_MSK))$ total: 1 errors, 0 warnings, 39 lines checked ./patches/altera_uart-simplify-altera_uart_console_putc.patch has style problems, please review. If any of these err...
```diff diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index 0f1189605d21..f8d8a00554da 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c @@ -394,7 +394,7 @@ int __init early_altera_uart_setup(struct altera_uart_platform_uart *platp) static void altera_uart_console_...
75e0b946cf2fef14236ff999b6d7eacbae2034b0
Analyze and fix the following issue in the Linux kernel code: vt: Fix warning: statement with no effect due to vt_kern.h
Problem Details: Using: gcc (GCC) 4.5.0 20100610 (prerelease) with CONFIG_CONSOLE_TRANSLATIONS=n, the following warnings are seen: drivers/char/vt_ioctl.c: In function ‘vt_ioctl’: drivers/char/vt_ioctl.c:1309:4: warning: statement with no effect drivers/char/vt.c: In function ‘vc_allocate’: drivers/char/vt.c:77...
```diff diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 56cce345aa8d..6625cc1ab758 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h @@ -76,17 +76,52 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); #define vc_translate(vc, c) ((vc)->vc_translate[(c) | \ ...
11dbf203922dc70a340417c895c95fb96f6b7068
Analyze and fix the following issue in the Linux kernel code: tty: avoid recursive BTM in pty_close
Problem Details: When the console has been redirected, a hangup of the tty will cause tty_release to be called under the big tty_mutex, which leads to a deadlock because hangup is also called under the BTM. This moves the BTM deeper into the tty_hangup function so we can close the redirected tty without holding the BT...
```diff diff --git a/drivers/char/pty.c b/drivers/char/pty.c index f2d7a76fab54..ad46eae1f9bb 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -62,7 +62,9 @@ static void pty_close(struct tty_struct *tty, struct file *filp) if (tty->driver == ptm_driver) devpts_pty_kill(tty->link); #endif - tty_vhang...
a0821df6e57c8af0053963d0d08c8d5198ea077d
Analyze and fix the following issue in the Linux kernel code: 8250: fix set_ldisc operation
Problem Details: The ldisc number now gets passed into ->set_ldisc. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index bc8ed4be9073..355148dc085e 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -2404,14 +2404,9 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios, } static void -serial8250_set_ldisc(struct uart_port *por...
60af22d2ed490554cc92c8d0fed0b5b9cf687568
Analyze and fix the following issue in the Linux kernel code: tty: reorder ldisc locking
Problem Details: We need to release the BTM in paste_selection() when sleeping in tty_ldisc_ref_wait to avoid deadlocks with tty_ldisc_enable. In tty_set_ldisc, we now always grab the BTM before taking the ldisc_mutex in order to avoid AB-BA deadlocks between the two. tty_ldisc_halt potentially blocks on a workqueue ...
```diff diff --git a/drivers/char/selection.c b/drivers/char/selection.c index 85211a3a5811..75889cd9375f 100644 --- a/drivers/char/selection.c +++ b/drivers/char/selection.c @@ -319,8 +319,13 @@ int paste_selection(struct tty_struct *tty) poke_blanked_console(); release_console_sem(); - ld = tty_ldisc_ref_wait(t...
4e608671674b62e97166f903830d5553e37970e8
Analyze and fix the following issue in the Linux kernel code: cdc-acm: remove dead code
Problem Details: The wait_event_interruptible_timeout in acm_port_down is never reached. Remove it to avoid possible deadlocks with the big tty mutex if someone were to start using the blocking version of acm_port_down. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 89d260d6b031..1833b3a71515 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -636,19 +636,13 @@ static void acm_tty_unregister(struct acm *acm) static int acm_tty_chars_in_buffer(struct tty_struct *tty); ...
83ceb67d7dfe6aedf0e47dd6887b7b3c753542b2
Analyze and fix the following issue in the Linux kernel code: tty: fix console_sem lock order
Problem Details: vgacon_do_font_op releases and reacquires the BTM while holding console_sem. This violates the rule that BTM has to be the outer lock whenever we hold both. There does not seem to be any reason to give up the BTM here, so just stop doing that. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Alan Cox...
```diff diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 71970057c118..54e32c513610 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -1108,7 +1108,6 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512) charmap += 4 * ...
3f582b8c11014e4ce310d9839fb335164195333f
Analyze and fix the following issue in the Linux kernel code: serial: fix termios settings in open
Problem Details: Move termios initialization in open into uart_dtr_rts to make sure it always gets called when necessary. Based on a suggestion from Alan Cox. Alan writes: Ok this sort of makes sense. Something isn't getting initialised and both getty and minicom will do a termios set which is sorting it out. This is ...
```diff diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index a55751a12c38..3d2acc2265f7 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -1520,8 +1520,16 @@ static void uart_dtr_rts(struct tty_port *port, int onoff) struct uart_state *state = container_of(port,...
d87d9b7d19f04b16c4406d3c0feeca10090e0ada
Analyze and fix the following issue in the Linux kernel code: tty: serial - fix tty referencing in set_ldisc
Problem Details: Pass down the ldisc number so that the drivers don't have to peek into the tty object themselves. This lets us get rid of another case of back referencing port to tty which we don't want (because of races versus hangup/close). Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Arnd Bergmann <arnd@arnd...
```diff diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index 511cbf687877..a9eff2b18eab 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c @@ -957,15 +957,12 @@ bfin_serial_verify_port(struct uart_port *port, struct serial_struct *ser) * Enable the IrDA function if tty->ldisc.n...
eab4f5af6b07009d1fc48bac5f3215c0cbfb2fc3
Analyze and fix the following issue in the Linux kernel code: tty: serial - fix tty back references in termios
Problem Details: One or two drivers go poking back into the tty from the termios setting routine in unsafe ways. We don't need to pass the tty down because the [ab]users are just using it to get at things they can get at anyway. This leaves low_latency setting to sort out along with set_ldisc use. Signed-off-by: Alan...
```diff diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c index 8681f1345056..d89aa38c5cf0 100644 --- a/drivers/serial/21285.c +++ b/drivers/serial/21285.c @@ -216,7 +216,7 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios, struct ktermios *old) { unsigned long flags; - unsig...
192251352f912bccfb942ea35801d2357f11f592
Analyze and fix the following issue in the Linux kernel code: tty: serial - fix various misuses/mishandlings of port->tty
Problem Details: Make it robust against hang up events. In most cases we can do this simply by passing the right things in the first place. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 7f2830709512..12ee7e0f99ce 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -58,7 +58,7 @@ static struct lock_class_key port_lock_key; #define uart_console(port) (0) #endif -static void uart_change_...
a360fae67bc173942f620d44d1b23cfb5ccaaf96
Analyze and fix the following issue in the Linux kernel code: synclink: reworking locking a bit
Problem Details: Use the port mutex and port lock to fix the various races. The locking still isn't totally consistent but its better than before. Wants switching to the port helpers. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index 3c7ac6a3ff80..5a602eb7cd2d 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c @@ -675,12 +675,14 @@ static int open(struct tty_struct *tty, struct file *filp) goto cleanup; } + mutex_lock(&info->port.mutex); ...
4287341d4dba27ef8048f589e3c0bc683c9f2017
Analyze and fix the following issue in the Linux kernel code: tty: Fix the digi acceleport driver NULL checks
Problem Details: This now refcounts but doesn't actually check the reference was obtained in all the places it should. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index fd35f73b5721..b92070c103cd 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c @@ -609,8 +609,10 @@ static void digi_wakeup_write_lock(struct work_struct *work) static void di...
417b6e0e146ba38eec5d79777433e38c73d4feb1
Analyze and fix the following issue in the Linux kernel code: rocket: kill BKL
Problem Details: We can use the port mutex for this and also for the hangup path so removing the problematic use of the hangup mutex in this driver. Fix up the locking on the various port flags while we are at it. Ultimately this driver needs to be using tty_port_ helpers which would sort this out far better. Signed-...
```diff diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 0e29a23ec4c5..79c3bc69165a 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c @@ -73,7 +73,6 @@ #include <linux/tty_driver.h> #include <linux/tty_flip.h> #include <linux/serial.h> -#include <linux/smp_lock.h> #include <linux/string...
ec82db129e94c7896e732d21f2bb9ab8e7312fe0
Analyze and fix the following issue in the Linux kernel code: isicom: kill off the BKL
Problem Details: As with the others we can use the port mutex to get the needed locking properties and fix the race with open. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 98310e1aae30..c27e9d21fea9 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -124,7 +124,6 @@ #include <linux/fs.h> #include <linux/sched.h> #include <linux/serial.h> -#include <linux/smp_lock.h> #include <linux/mm.h> #include...
d6e679b474c096f1125087e789e7af8886de39d3
Analyze and fix the following issue in the Linux kernel code: serial: fix wakup races in the mrst_max3110 driver
Problem Details: The mrst_max3110 driver had a set of unsafe wakeup sequences along the following line: if (!atomic_read(&foo)) { atomic_set(&foo, 1); wake_up(worker_thread); } and the worker thread would do if (atomic_read(&foo)) { do_work(); atomic_set(&foo, 0); } which can result in various missed wakups ...
```diff diff --git a/drivers/serial/mrst_max3110.c b/drivers/serial/mrst_max3110.c index 0341853e0c28..f6ad1ecbff79 100644 --- a/drivers/serial/mrst_max3110.c +++ b/drivers/serial/mrst_max3110.c @@ -48,6 +48,10 @@ #define PR_FMT "mrst_max3110: " +#define UART_TX_NEEDED 1 +#define CON_TX_NEEDED 2 +#define BIT_IRQ_...
99dd3f6b7e2ef5179f67503a401a99141708687a
Analyze and fix the following issue in the Linux kernel code: max3110 sanity check a register
Problem Details: MAX3111 is the SPI/UART IC installed on the MRST SPI Port Card as a serial debug goal, and the SPI Port Card will be frequently mounted and unmounted from the main board by developers depending whether debug serial is required or not. As the MAX3111 has no subvendor or product id registers available, ...
```diff diff --git a/drivers/serial/mrst_max3110.c b/drivers/serial/mrst_max3110.c index 273e7cbe74cd..f9c01aeb6f80 100644 --- a/drivers/serial/mrst_max3110.c +++ b/drivers/serial/mrst_max3110.c @@ -721,7 +721,7 @@ static int serial_m3110_probe(struct spi_device *spi) struct uart_max3110 *max; int ret; unsigned c...
f1b50760a7e3d69ef5d62f294e51300dd206ea05
Analyze and fix the following issue in the Linux kernel code: Input: cy8ctmg100_ts - signedness bug
Problem Details: "ret" should be signed here or the error handling doesn't work. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c index 4eb7df0b7f87..5ec0946938fe 100644 --- a/drivers/input/touchscreen/cy8ctmg110_ts.c +++ b/drivers/input/touchscreen/cy8ctmg110_ts.c @@ -75,7 +75,7 @@ static int cy8ctmg110_write_regs(struct cy8ctmg110 *tsc, un...
669502ff31d7dba1849aec7ee2450a3c61f57d39
Analyze and fix the following issue in the Linux kernel code: SUNRPC: fix NFS client over TCP hangs due to packet loss (Bug 16494)
Problem Details: When reusing a TCP connection, ensure that it's aborted if a previous shutdown attempt has been made on that connection so that the RPC over TCP recovery mechanism succeeds. Signed-off-by: Andy Chittenden <andyc.bluearc@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 7ca65c7005ea..66d136984d57 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -1305,10 +1305,11 @@ static void xs_tcp_state_change(struct sock *sk) if (!(xprt = xprt_from_sock(sk))) goto out; dprintk("RPC: xs_tcp_state_...
429d646d9aeafdb57717dab75c807215f5cce9c2
Analyze and fix the following issue in the Linux kernel code: Doc: Fix spelling
Problem Details: Legned -> Legend mainatined -> maintained Legend is now Lenovo, so more fixes (text and url) would be possible, too. Cc: Jiri Kosina <trivial@kernel.org> Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Jiri Kosina <jkosin...
```diff diff --git a/Documentation/arm/SA1100/FreeBird b/Documentation/arm/SA1100/FreeBird index fb23b770aaf4..ab9193663b2b 100644 --- a/Documentation/arm/SA1100/FreeBird +++ b/Documentation/arm/SA1100/FreeBird @@ -1,6 +1,6 @@ -Freebird-1.1 is produced by Legned(C) ,Inc. +Freebird-1.1 is produced by Legend(C), Inc. ht...
cff70fae111efba80c27023772ce5265797fb514
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix incorrect setting of remote_tx_win for L2CAP ERTM
Problem Details: remote_tx_win is intended to be set on receipt of an L2CAP configuration request. The value is used to determine the size of the transmit window on the remote side of an ERTM connection, so L2CAP can stop sending frames when that remote window is full. An incorrect remote_tx_win value will cause the ...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 9d1f1544d9d3..fadf26b4ed7c 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -2807,7 +2807,6 @@ static int l2cap_parse_conf_rsp(struct sock *sk, void *rsp, int len, void *data, if (*result == L2CAP_CONF_SUCCESS) { switch (rfc....
86b1b26326279299c93ddb11ab4782d3896bf84c
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix endianness issue with L2CAP MPS configuration
Problem Details: Incoming configuration values must be converted to native CPU order before use. This fixes a bug where a little-endian MPS value is compared to a native CPU value. On big-endian processors, this can cause ERTM and streaming mode segmentation to produce PDUs that are larger than the remote stack is ex...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 3e3cd9d4e52c..9d1f1544d9d3 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -2705,8 +2705,9 @@ done: case L2CAP_MODE_ERTM: pi->remote_tx_win = rfc.txwin_size; pi->remote_max_tx = rfc.max_transmit; - if (rfc.max_pdu_si...
235caa235cb6f88fd04bc58a288f45463e5361c7
Analyze and fix the following issue in the Linux kernel code: Fix CONFIG_CROSS_COMPILE issue in .config
Problem Details: Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/Makefile b/Makefile index 968ac2af763b..f78450e299a2 100644 --- a/Makefile +++ b/Makefile @@ -189,7 +189,6 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile export KBUILD_BUILDHOST := $(SUBARCH) ARC...
f59f5bcb605f40d418aceb6f6047069435ffac72
Analyze and fix the following issue in the Linux kernel code: intel_mid_battery: Fix battery scaling
Problem Details: There are 3600 seconds per not 3600 hours per second. Correcting this along with the previous fix gives sensible numbers. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
```diff diff --git a/drivers/power/intel_mid_battery.c b/drivers/power/intel_mid_battery.c index 6430a7bb637b..c61ffec2ff10 100644 --- a/drivers/power/intel_mid_battery.c +++ b/drivers/power/intel_mid_battery.c @@ -427,7 +427,7 @@ static int pmic_usb_get_property(struct power_supply *psy, static inline unsigned long m...
08a9e07e3fcfcd8df23b57edef8c6876f51020a1
Analyze and fix the following issue in the Linux kernel code: intel_mid_battery: Fix the argument order to intel_scu_ipc_command
Problem Details: The arguments to intel_scu_ipc_command are "command, subcommand" the battery driver got this the wrong way around. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
```diff diff --git a/drivers/power/intel_mid_battery.c b/drivers/power/intel_mid_battery.c index 46730f579d7f..6430a7bb637b 100644 --- a/drivers/power/intel_mid_battery.c +++ b/drivers/power/intel_mid_battery.c @@ -168,7 +168,7 @@ struct battery_property { */ static int pmic_scu_ipc_battery_cc_read(u32 *value) { - ...
4f0ed9a51bc8ef16c2589112fdb110479e4b0df1
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix inverted mute controls for WM8580
Problem Details: Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Cc: stable@kernel.org
```diff diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index c3571ee5c11b..72deeabef4fe 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c @@ -269,9 +269,9 @@ SOC_DOUBLE("DAC2 Invert Switch", WM8580_DAC_CONTROL4, 2, 3, 1, 0), SOC_DOUBLE("DAC3 Invert Switch", WM8580_DAC_CONTROL4...
00c7d9202a19091d1873954ba158375d2efd5a64
Analyze and fix the following issue in the Linux kernel code: phy.c: fix kernel-doc warnings
Problem Details: Fix phy.c kernel-doc notation: Warning(drivers/net/phy/phy.c:313): No description found for parameter 'ifr' Warning(drivers/net/phy/phy.c:313): Excess function parameter 'mii_data' description in 'phy_mii_ioctl' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <dav...
```diff diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 5130db8f5c4e..1bb16cb79433 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -301,7 +301,7 @@ EXPORT_SYMBOL(phy_ethtool_gset); /** * phy_mii_ioctl - generic PHY MII ioctl interface * @phydev: the phy_device struct - * @mii_dat...
7ed24e8da75615418cbf3417e421053e53a5f5b3
Analyze and fix the following issue in the Linux kernel code: etherdevice.h: fix kernel-doc typo
Problem Details: Fix etherdevice.h parameter name typo in kernel-doc: Warning(include/linux/etherdevice.h:138): No description found for parameter 'hwaddr' Warning(include/linux/etherdevice.h:138): Excess function parameter 'addr' description in 'dev_hw_addr_random' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.co...
```diff diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 848480bc2bf9..2308fbb4523a 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h @@ -129,7 +129,7 @@ static inline void random_ether_addr(u8 *addr) /** * dev_hw_addr_random - Create random MAC and set device fla...
5d337d6f64d150b6577972cc23f709ee85f66881
Analyze and fix the following issue in the Linux kernel code: farsync: Fix compile warnings.
Problem Details: drivers/net/wan/farsync.c: In function 'fst_intr_rx': drivers/net/wan/farsync.c:1312: warning: cast to pointer from integer of different size drivers/net/wan/farsync.c: In function 'do_bottom_half_tx': drivers/net/wan/farsync.c:1407: warning: cast to pointer from integer of different size The "skb" an...
```diff diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index ad7719fe6d0a..e050bd65e037 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c @@ -885,20 +885,21 @@ fst_rx_dma_complete(struct fst_card_info *card, struct fst_port_info *port, * Receive a frame through the DMA ...
02f0777a0d6560eb995aade34a1b82f95c0452da
Analyze and fix the following issue in the Linux kernel code: drivers/char/vt.c: fix vc->vc_origin on take_over_console()
Problem Details: kernel will die on some platform when switch from vga mode to framebuffer mode. The reason of this bug is that bind_con_driver reset vc->vc_origin to (unsigned long)vc->vc_screenbuf. On vgacon vc->vc_origin is not releated to vc->vc_screenbuf,if set vc->vc_origin to vc->vc_screenbuf,kernel will die o...
```diff diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 4a9eb3044e52..cff1d4bce21d 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -3065,7 +3065,8 @@ static int bind_con_driver(const struct consw *csw, int first, int last, old_was_color = vc->vc_can_do_color; vc->vc_sw->con_deinit(vc); - vc-...
0dca94baeab4a1a514841b0a4c8e3a51dfb4d5ae
Analyze and fix the following issue in the Linux kernel code: hwmon: coretemp: update hotplug condition check
Problem Details: Fix two errors in hotplug. One is for hotplug notifier. The other is unnecessary driver unregister. Because even none of online cpus supports coretemp, we can't assume new onlined cpu doesn't support it either. If related driver is unregistered there we have no chance to use coretemp from then on. ...
```diff diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 05344af50734..c05dc91ff419 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -502,10 +502,13 @@ static int __cpuinit coretemp_cpu_callback(struct notifier_block *nfb, switch (action) { case CPU_ONLINE: + case CPU_...
4453d7364d3b1f92475f104d4625abee36a7733d
Analyze and fix the following issue in the Linux kernel code: hwmon: add support for JEDEC JC 42.4 compliant temperature sensors
Problem Details: [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Mort...
```diff diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42 new file mode 100644 index 000000000000..0e76ef12e4c6 --- /dev/null +++ b/Documentation/hwmon/jc42 @@ -0,0 +1,97 @@ +Kernel driver jc42 +================== + +Supported chips: + * Analog Devices ADT7408 + Prefix: 'adt7408' + Addresses scann...