id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
92ca0dc5ee022e4c0e488177e1d8865a0778c6c2
Analyze and fix the following issue in the Linux kernel code: USB: mct_u232: fix broken close
Problem Details: Fix regression introduced by commit f26788da3b342099d2b02d99ba1cb7f154d6ef7b (USB: serial: refactor generic close) which broke driver close(). This driver uses non-standard semantics for the read urb which makes the generic close function fail to kill it (the read urb is actually an interrupt urb and ...
```diff diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index 7aa01b95b1d4..2849f8c32015 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c @@ -549,9 +549,12 @@ static void mct_u232_close(struct usb_serial_port *port) { dbg("%s port %d", __func__, port->number);...
f34c25ed78df6d1297db2187bf5e58aaf6674183
Analyze and fix the following issue in the Linux kernel code: USB: gadget: amd5536udc.c: fix error path
Problem Details: In function udc_probe() call put_device() when device_register() fails. Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com> Acked-by: Thomas Dahlmann <dahlmann.thomas@arcor.de> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-...
```diff diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c index 2b361500af1e..9034e0344723 100644 --- a/drivers/usb/gadget/amd5536udc.c +++ b/drivers/usb/gadget/amd5536udc.c @@ -3383,8 +3383,10 @@ static int udc_probe(struct udc *dev) udc = dev; retval = device_register(&dev->gadget.d...
e581c8c8a957776db452afe316706242abcc1cdc
Analyze and fix the following issue in the Linux kernel code: USB: imx21-hcd - fix off by one resource size calculation
Problem Details: Signed-off-by: Axel Lin <axel.lin@gmail.com> Tested-by: Jon Povey <Jon.Povey@racelogic.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c index dd132eb7fee7..1dfb2c8f7707 100644 --- a/drivers/usb/host/imx21-hcd.c +++ b/drivers/usb/host/imx21-hcd.c @@ -1906,7 +1906,7 @@ failed_clock_set: failed_clock_get: iounmap(imx21->regs); failed_ioremap: - release_mem_region(res->sta...
bd68826897d328f332d8f98979d9ee95b96fb6f8
Analyze and fix the following issue in the Linux kernel code: usb: gadget: fix Kconfig warning
Problem Details: warning: (USB_MUSB_HDRC_HCD && USB_SUPPORT && USB_MUSB_HDRC && (USB_MUSB_HOST || USB_MUSB_OTG) && USB_GADGET_MUSB_HDRC || USB_MUSB_OTG && <choice> && USB && USB_GADGET && PM && EXPERIMENTAL) selects USB_OTG which has unmet direct dependencies (USB_GADGET_OMAP && ARCH_OMAP_OTG && USB_OHCI_HCD) This doe...
```diff diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 0fe5bc876fa5..b739ca814651 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -210,17 +210,6 @@ config USB_OMAP default USB_GADGET select USB_GADGET_SELECTED -config USB_OTG - boolean "OTG Support" - depend...
69cb1ec4ce4da4bc4c07bb09c4c98b3e25d99fb1
Analyze and fix the following issue in the Linux kernel code: mxc_udc: add workaround for ENGcm09152 for i.MX35
Problem Details: this patch gives the possibility to workaround bug ENGcm09152 on i.MX35 when the hardware workaround is also implemented on the board. It covers the workaround described on page 25 of the following Errata : http://cache.freescale.com/files/dsp/doc/errata/IMX35CE.pdf Signed-off-by: Eric Bénard <eric@eu...
```diff diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c index 2a4f8b781ba4..4d161b3fca65 100644 --- a/arch/arm/mach-mx3/mach-cpuimx35.c +++ b/arch/arm/mach-mx3/mach-cpuimx35.c @@ -155,6 +155,7 @@ static struct mxc_usbh_platform_data usbh1_pdata = { static struct fsl_usb2_platform_dat...
436a389096e1feda2c382cad83b6a8d6de8615a0
Analyze and fix the following issue in the Linux kernel code: usb: Fix linker errors with CONFIG_PM=n
Problem Details: Fix these linker errors when CONFIG_PM=n: ERROR: "xhci_bus_resume" [drivers/usb/host/xhci-hcd.ko] undefined! ERROR: "xhci_bus_suspend" [drivers/usb/host/xhci-hcd.ko] undefined! Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by: Ran...
```diff diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 7f2f63cb6c53..fef5a1f9d483 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -742,9 +742,4 @@ int xhci_bus_resume(struct usb_hcd *hcd) return 0; } -#else - -#define xhci_bus_suspend NULL -#define xhci_b...
b5b5c3ac5123dab047cfeff472053ab737052e9b
Analyze and fix the following issue in the Linux kernel code: USB: xhci: Fix compile error when CONFIG_PM=n
Problem Details: Fix this error when CONFIG_PM is not enabled: drivers/usb/host/xhci.c:675: error: implicit declaration of function 'usb_root_hub_lost_power' Wrap xhci_suspend() and xhci_resume() into an ifdef CONFIG_PM, along with the functions that only they call -- xhci_save_registers() and xhci_restore_registers(...
```diff diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 33d0034d8a6f..9dc5be557d92 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -551,6 +551,7 @@ void xhci_shutdown(struct usb_hcd *hcd) xhci_readl(xhci, &xhci->op_regs->status)); } +#ifdef CONFIG_PM static void xhc...
85f0ff46960c2853fd1436a56798260eae91db86
Analyze and fix the following issue in the Linux kernel code: usb: Fix issue with USB 3.0 devices after system resume
Problem Details: When the system suspends and a host controller's power is lost, the USB core attempts to revive any USB devices that had the persist_enabled flag set. For non-SuperSpeed devices, it will disable the port, and then set the udev->reset_resume flag. This will cause the USB core to reset the device, veri...
```diff diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index f07ab71859dd..7f82c48a0bae 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -758,6 +758,9 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) clear_port_feature(hdev, port1, USB_PORT_...
c6f694af8318a526c639306d9d07ee33cb7c168a
Analyze and fix the following issue in the Linux kernel code: USB: opticon: Whitespace fixes in opticon driver
Problem Details: Signed-off-by: Alon Ziv <alon-git@nolaviz.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index 4fe7c3d9ef98..eda1f9266c4e 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c @@ -108,10 +108,10 @@ static void opticon_bulk_callback(struct urb *urb) else priv->rts = true; } else { - dev_d...
97cd8dc4ca9a1a5efb2cc38758e01492e3b013e2
Analyze and fix the following issue in the Linux kernel code: USB: opticon: Fix long-standing bugs in opticon driver
Problem Details: The bulk-read callback had two bugs: a) The bulk-in packet's leading two zeros were returned (and the two last bytes truncated) b) The wrong URB was transmitted for the second (and later) read requests, causing further reads to return the entire packet (including leading zeros) Signed-off-by:...
```diff diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index ed01f3b2de8c..9ff19c8a122e 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c @@ -96,8 +96,8 @@ static void opticon_bulk_callback(struct urb *urb) /* real data, send it to the tty layer */ tty = tty_...
c19db4c9e49a049054594272d408e101aaf41b27
Analyze and fix the following issue in the Linux kernel code: USB: ftdi_sio: set device latency timeout at port probe
Problem Details: No need to set latency timeout at every open. This also fixes an issue with the read latency being as high as 250ms (instead of 1ms) for the first read after port probe. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 89284df2f8d9..d3e58b56f56d 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1589,6 +1589,7 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) ftdi_set_max_packet_size(port); if (re...
cfb8da8f69b81d367b766888e83ec0483a31bf01
Analyze and fix the following issue in the Linux kernel code: USB: visor: fix initialisation of UX50/TH55 devices
Problem Details: Fix regression introduced by commit 214916f2ec6701e1c9972f26c60b3dc37d3153c6 (USB: visor: reimplement using generic framework) which broke initialisation of UX50/TH55 devices that used re-mapped bulk-out endpoint addresses. Reported-by: Robert Gadsdon <rgadsdon@bayarea.net> Tested-by: Robert Gadsdon <...
```diff diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index eb76aaef4268..15a5d89b7f39 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c @@ -606,6 +606,10 @@ static int treo_attach(struct usb_serial *serial) static int clie_5_attach(struct usb_serial *serial) { + struct...
0a2b8a0d1101179fdebc974a7c72b514aede9d9d
Analyze and fix the following issue in the Linux kernel code: usb: makefile cleanup
Problem Details: For all modules, change <module>-objs to <module>-y; remove if-statements and replace with lists using the kbuild idiom; move flags to the top of the file; and fix alignment while trying to maintain the original scheme in each file. None of the dependencies are modified. Signed-off-by: matt mooney <m...
```diff diff --git a/drivers/usb/atm/Makefile b/drivers/usb/atm/Makefile index d40a126e47a3..a5d792ec3ad5 100644 --- a/drivers/usb/atm/Makefile +++ b/drivers/usb/atm/Makefile @@ -2,10 +2,10 @@ # Makefile for USB ATM/xDSL drivers # +ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG + obj-$(CONFIG_USB_CXACRU) += cxacru.o obj-...
75d87cdf3cefd2744fabd3f2a558c49cdf36238b
Analyze and fix the following issue in the Linux kernel code: usb: gadget: dummy_hcd: Fix error path
Problem Details: In function dummy_udc_probe() call put_device() when device_register() fails. also usb_get_hcd() put before device_register() after review comment from Alan Stern. Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 7bb9d78aac27..1d2a2abbfa80 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c @@ -874,6 +874,8 @@ static int dummy_udc_probe (struct platform_device *pdev) struct dummy *dum = the_controller; int...
7b3a766c7b9bce07875098cb68642df2b8f0b152
Analyze and fix the following issue in the Linux kernel code: usb: core: endpoint: Fix error path
Problem Details: In function usb_create_ep_devs() call put_device() when device_register() fails. Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com> 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 3788e738e265..9da250563027 100644 --- a/drivers/usb/core/endpoint.c +++ b/drivers/usb/core/endpoint.c @@ -202,7 +202,7 @@ int usb_create_ep_devs(struct device *parent, return retval; error_register: - kfree(ep_dev); + put_device(&...
ae38c78a03e1b77ad45248fcf097e4568e740209
Analyze and fix the following issue in the Linux kernel code: usb-storage: add new no_read_disc_info quirk
Problem Details: Appotech ax3003 (the larger brother of the ax203) based devices are even more buggy then the ax203. They will go of into lala land when ever they see a READ_DISC_INFO scsi command. So add a new US_FL which tells the scsi sr driver to not issue any READ_DISC_INFO scsi commands. [akpm@linux-foundation...
```diff diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index e80362d148f3..a1128ff5cc2c 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -253,6 +253,10 @@ static int slave_configure(struct scsi_device *sdev) * or to force 192-byte transfer lengths for...
319feaabb6c7ccd90da6e3207563c265da7d21ae
Analyze and fix the following issue in the Linux kernel code: usb: gadget: goku_udc: Fix error path
Problem Details: This is based on an initial patch by Rahul Ruikar. The goku_remove() function can be called before device_register() so it can call device_unregister() improperly. Also if the call to device_register() fails we need to call put_device(). As I was changing the error handling in goku_probe(), I notice...
```diff diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c index 49fbd4dbeb94..48a760220baf 100644 --- a/drivers/usb/gadget/goku_udc.c +++ b/drivers/usb/gadget/goku_udc.c @@ -1745,7 +1745,8 @@ static void goku_remove(struct pci_dev *pdev) pci_resource_len (pdev, 0)); if (dev->enabled) ...
7a7e7896422baced4757070b813ba28ab24a214a
Analyze and fix the following issue in the Linux kernel code: USB: imx21-hcd: Fix isochronous endpoint idle
Problem Details: Release the hardware resources and reset the internal HCD state associated with an isochronous endpoint when the last URB queued for it completes. Previously this was only done in then endpoint_disable() method causing usbtest 15 and 16 to hang when run twice in succession without a disconnect. Signe...
```diff diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c index 1be144167da4..890a41ccc5cd 100644 --- a/drivers/usb/host/imx21-hcd.c +++ b/drivers/usb/host/imx21-hcd.c @@ -390,15 +390,19 @@ static void schedule_nonisoc_etd(struct imx21 *imx21, struct urb *urb); /* Endpoint now idle - release it'...
80f0cf3947889014d3a3dc0ad60fb87cfda4b12a
Analyze and fix the following issue in the Linux kernel code: USB: disable endpoints after unbinding interfaces, not before
Problem Details: This patch (as1430) fixes a bug in usbcore. When a device configuration change occurs or a device is removed, the endpoints for the old config should be completely disabled. However it turns out they aren't; this is because usb_unbind_interface() calls usb_enable_interface() or usb_set_interface() to...
```diff diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 9f0ce7de0e36..d6e3e410477e 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1140,13 +1140,6 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0) { int i; - dev_dbg(&dev->dev, "%s nuking %s URB...
c8458d59d424fcba2456d6cba5811ce01c3aedb9
Analyze and fix the following issue in the Linux kernel code: usb: langwell_udc: fix big file transfer issue.
Problem Details: This patch fixing the problem with large file transfers failing. Swap the read order to avoid unexpected RX status. Signed-off-by: Christophe Lebouc <christophex.lebouc@intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman ...
```diff diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c index d297f9eb92e4..064306046702 100644 --- a/drivers/usb/gadget/langwell_udc.c +++ b/drivers/usb/gadget/langwell_udc.c @@ -2440,12 +2440,14 @@ static int process_ep_req(struct langwell_udc *dev, int index, dev_vdbg(&dev->pdev-...
f405387435a85a440d1ce16f3ca36e042281643a
Analyze and fix the following issue in the Linux kernel code: USB: MUSB: fix kernel WARNING/oops when unloading module in OTG mode
Problem Details: Since commit 461972d8a4c94bc44f11a13046041c78a7cf18dd (musb_core: don't call musb_platform_exit() twice), unloading the driver module results in a WARNING "kobject: '(null)' (c73de788): is not initialized, yet kobject_put() is being called." (or even kernel oops) on e.g. DaVincis, though only in the OT...
```diff diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index b611420a8050..9733fe9b597a 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c @@ -397,5 +397,6 @@ int musb_platform_exit(struct musb *musb) gpio_free(musb->config->gpio_vrsel); + otg_put_transceiver(musb->...
7893afc035590383a14b176c1497cba984276ef4
Analyze and fix the following issue in the Linux kernel code: USB: cdc-acm: fix code indentation
Problem Details: Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> 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 bc62fae0680f..d6ede989ff22 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -1614,7 +1614,7 @@ static const struct usb_device_id acm_ids[] = { /* Support Lego NXT using pbLua firmware */ { USB_DEVICE(0x...
e0c43476c12db99e20066151d0c49aa76b34e50d
Analyze and fix the following issue in the Linux kernel code: usb: musb: gadget: only enable AUTOCLEAR in double buffered case
Problem Details: commit 633ba7876b96ec339ef685357e2f7c60b5a8ce85 broke g_file_storage functionality by enabling AUTOCLEAR on all cases without caring for all gadget drivers. This patch will only enable AUTOCLEAR if our endpoint's FIFO was configured with double buffering support. Note this is not a complete fix, doubl...
```diff diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 3f1cc5a8381f..5d815049cbaa 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -644,7 +644,8 @@ static void rxstate(struct musb *musb, struct musb_request *req) */ csr |= MUSB_RXCSR_DMAEN...
e7379aaa5ca12f9e011eb5a6bcba88e9bbbfbf87
Analyze and fix the following issue in the Linux kernel code: usb: musb: gadget: fix ZLP sending in musb_g_tx(v1)
Problem Details: This patch fixes the problem reported by Sergei: >how come? we need to send ZLP before giving back the request. >Well, look at the code ionce again. We need to send ZLP *after* >request->actual == request->length, but as the check is inserted >after the ZLP send, ZLP *may* be sent once the first DMA c...
```diff diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 6a8c061b66f1..3f1cc5a8381f 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -477,40 +477,39 @@ void musb_g_tx(struct musb *musb, u8 epnum) epnum, csr, musb_ep->dma->actual_len, request); ...
d613746d8bc3a2904d4585d7efd7f457d9db6fb9
Analyze and fix the following issue in the Linux kernel code: USB: musb: make DBG() calls actually depend on CONFIG_USB_MUSB_DEBUG
Problem Details: Enabling CONFIG_USB_MUSB_DEBUG option causes -DDEBUG to be added to gcc's command line, however the DBG() macro doesn't depend on DEBUG, so that the debugging messages get printed regardless of the option, and I don't think that this was intended. Get rid of otherwise unused xprintk() macro and make DB...
```diff diff --git a/drivers/usb/musb/musb_debug.h b/drivers/usb/musb/musb_debug.h index d73afdbde3ee..94f6973cf8f7 100644 --- a/drivers/usb/musb/musb_debug.h +++ b/drivers/usb/musb/musb_debug.h @@ -42,11 +42,10 @@ #define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args) #define ERR(fmt, args...) yprintk(KERN_ERR,...
e06ea97fa47611992a5a61058729cf8e83bf6fda
Analyze and fix the following issue in the Linux kernel code: USB: yurex: fix memory leak and corrupted messages
Problem Details: This fixes the memory leak on disconnecting the device. In addition, it fixes some messages corrupted by incorrect encoding. Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c index 5f6443bc6142..719c6180b31f 100644 --- a/drivers/usb/misc/yurex.c +++ b/drivers/usb/misc/yurex.c @@ -37,7 +37,7 @@ #define CMD_PADDING 0xff #define YUREX_BUF_SIZE 8 -#define YUREX_WRITE_TIMEOUT (HZ) +#define YUREX_WRITE_TIMEOUT (HZ*2) ...
1b62d2583963d5974974aa923214bada7aa7b5d1
Analyze and fix the following issue in the Linux kernel code: USB: yurex: assign a real minor number to the driver
Problem Details: This assigns the minor number 192 to the yurex driver. We also fix up the previous usb minor number entry, it was wrong. Cc: Tomoki Sekiyama <tomoki.sekiyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/Documentation/devices.txt b/Documentation/devices.txt index d0d1df6cb5de..3cab6b342017 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt @@ -2553,7 +2553,10 @@ Your cooperation is appreciated. 175 = /dev/usb/legousbtower15 16th USB Legotower device 176 = /dev/usb/usbtmc1 ...
115bb1ffa54c3934f3617bdd4e4dfc68b11e1e69
Analyze and fix the following issue in the Linux kernel code: USB: Add UAS driver
Problem Details: USB Attached SCSI is a new protocol specified jointly by the SCSI T10 committee and the USB Implementors Forum. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> [mina86@mina86.com: updated to use new USB_ prefix] Signed-off-by: Michal Nazarewicz <...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index f2a2b8e647c5..8dac57f53d87 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5934,6 +5934,14 @@ S: Maintained F: Documentation/usb/acm.txt F: drivers/usb/class/cdc-acm.* +USB ATTACHED SCSI +M: Matthew Wilcox <willy@linux.intel.com> +M: Sarah Sharp <sarah.a.sharp@lin...
ae6d22fe1812ce8d40add3eb74ede9cfd2eae44f
Analyze and fix the following issue in the Linux kernel code: USB: Move USB Storage definitions to their own header file
Problem Details: The libusual header file is hard to use from code that isn't part of libusual. As the comment suggests, these definitions are moved to their own header file, paralleling other USB classes. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> [mina86@mina86....
```diff diff --git a/include/linux/usb/storage.h b/include/linux/usb/storage.h new file mode 100644 index 000000000000..d7fc910f1dc4 --- /dev/null +++ b/include/linux/usb/storage.h @@ -0,0 +1,48 @@ +#ifndef __LINUX_USB_STORAGE_H +#define __LINUX_USB_STORAGE_H + +/* + * linux/usb/storage.h + * + * Copyright Matthew Wilc...
6195e3c6aa84dbbf80a60731168118824bd58bba
Analyze and fix the following issue in the Linux kernel code: USB: cdc.h: ncm: fix one more typo
Problem Details: In usb_cdc_ncm_dpe32 the fields are 32 bit long and according to usb style (hungarian notation) should be called dwDatagramIndex and dwDatagramLength (see CDC NCM subclass spec, 3.3.2). Actually, they were called wDatagramIndex, wDatagramLength. Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@nokia.co...
```diff diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 2d5b6f296aa3..5e86dc771da4 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h @@ -343,8 +343,8 @@ struct usb_cdc_ncm_ndp16 { /* 32-bit NCM Datagram Pointer Entry */ struct usb_cdc_ncm_dpe32 { - __le32 wDatagramIndex; - __le...
677aeafe19e88c282af74564048243ccabb1c590
Analyze and fix the following issue in the Linux kernel code: USB: ftdi_sio: revert "USB: ftdi_sio: fix DTR/RTS line modes"
Problem Details: This reverts commit 6a1a82df91fa0eb1cc76069a9efe5714d087eccd. RTS and DTR should not be modified based on CRTSCTS when calling set_termios. Modem control lines are raised at port open by the tty layer and should stay raised regardless of whether hardware flow control is enabled or not. This is in co...
```diff diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 6e6b0da59287..42fea29637b3 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -2029,8 +2029,6 @@ static void ftdi_set_termios(struct tty_struct *tty, "urb failed to set to rts/cts flow control\n"...
1f53c0e9bbf654ed93f63deee2bf5c9a1816966e
Analyze and fix the following issue in the Linux kernel code: USB: cdc.h: ncm: typo and style fixes
Problem Details: Some typos were in the initial commit, make the spelling according to the spec. Add some more comments. Also change constant names according to the style of the rest of the file Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index c117a68d04a7..583264abca0c 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h @@ -274,13 +274,13 @@ struct usb_cdc_notification { /* * Class Specific structures and constants * - * CDC NCM parameter structure, CDC NCM subc...
834e2312e7a384877a876b0d34dffc3046c96bcb
Analyze and fix the following issue in the Linux kernel code: USB: teach "devices" file about Wireless and SuperSpeed USB
Problem Details: The /sys/kernel/debug/usb/devices file doesn't know about Wireless or SuperSpeed USB. This patch (as1416b) teaches it, and updates the Documentation/usb/proc_sub_info.txt file accordingly. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Vrabel <david.vrabel@csr.com> CC: Sarah Sharp <s...
```diff diff --git a/Documentation/usb/proc_usb_info.txt b/Documentation/usb/proc_usb_info.txt index fafcd4723260..afe596d5f201 100644 --- a/Documentation/usb/proc_usb_info.txt +++ b/Documentation/usb/proc_usb_info.txt @@ -1,12 +1,17 @@ /proc/bus/usb filesystem output =============================== -(version 2003.05...
e9137c2e44116a1fcb82bb99dc84318e792c150b
Analyze and fix the following issue in the Linux kernel code: USB: isp1362-hcd: Removes CONFIG_USB_OTG dependent code, fix build breakage
Problem Details: In today linux-next I got a compile error on usb/host/isp1362-hcd: drivers/usb/host/isp1362-hcd.c: In function ‘isp1362_hub_control’: drivers/usb/host/isp1362-hcd.c:1680: error: ‘ohci’ undeclared (first use in this function) The problem is when the CONFIG_USB_OTG option is enabled. ohci variable is ...
```diff diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c index 0587ad4ce5c2..ae3044019382 100644 --- a/drivers/usb/host/isp1362-hcd.c +++ b/drivers/usb/host/isp1362-hcd.c @@ -1676,13 +1676,6 @@ static int isp1362_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, switch (wValue) { ...
3df7169e73fc1d71a39cffeacc969f6840cdf52b
Analyze and fix the following issue in the Linux kernel code: OHCI: work around for nVidia shutdown problem
Problem Details: This patch (as1417) fixes a problem affecting some (or all) nVidia chipsets. When the computer is shut down, the OHCI controllers continue to power the USB buses and evidently they drive a Reset signal out all their ports. This prevents attached devices from going to low power. Mouse LEDs stay on, f...
```diff diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index c3f98543caaf..3799573bd385 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -329,8 +329,10 @@ void usb_hcd_pci_shutdown(struct pci_dev *dev) return; if (test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) && -...
92d3489ec58b5897a407b07ad9954497a119d3d0
Analyze and fix the following issue in the Linux kernel code: USB: r8a66597-udc: Initialize uninitialized variable, fix compile warning
Problem Details: In today linux-next I got a compile warning due a possible uninitialized variable This patch solves the issue initializing the variable Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Ma...
```diff diff --git a/drivers/usb/gadget/r8a66597-udc.h b/drivers/usb/gadget/r8a66597-udc.h index f763b5190afa..5fc22e09a0f1 100644 --- a/drivers/usb/gadget/r8a66597-udc.h +++ b/drivers/usb/gadget/r8a66597-udc.h @@ -136,7 +136,7 @@ static inline void r8a66597_read_fifo(struct r8a66597 *r8a66597, int len) { ...
eabf0f5f09b1f1538d22c14aa0a703c11791bd1e
Analyze and fix the following issue in the Linux kernel code: USB: Kconfig: fix typos in USB_FUNCTIONFS* description
Problem Details: It's spelled "Function Filesystem" / "FunctionFS". This patch fixes some typos (FunctioFS->FunctionFS, Funcion->Function, funcion->function, redundant "as") in the Kconfig description of USB_FUNCTIONFS*. Signed-off-by: Michael Prokop <mika@grml.org> Acked-by: Michal Nazarewicz <m.nazarewicz@samsung.co...
```diff diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index cd27f9bde2c8..fab765d387b8 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -716,8 +716,8 @@ config USB_FUNCTIONFS depends on EXPERIMENTAL select USB_FUNCTIONFS_GENERIC if !(USB_FUNCTIONFS_ETH || USB_FUNCTI...
f7dd64916bb6cfae8c96eaa3c754c30b5046586f
Analyze and fix the following issue in the Linux kernel code: USB: output an error message when the pipe type doesn't match the endpoint type
Problem Details: Commit f661c6f8c67bd55e93348f160d590ff9edf08904 adds a check of the pipe type if CONFIG_USB_DEBUG is enabled, but it doesn't output anything if this scenario occurs. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@sus...
```diff diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index 419e6b34e2fe..c14fc082864f 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -401,8 +401,11 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) }; /* Check that the pipe's type matches the endpoint's type */ - if (usb...
c9bfff9c98671ad50e4abbfe1ab606a9957f7539
Analyze and fix the following issue in the Linux kernel code: usb gadget: don't save bind callback in struct usb_configuration
Problem Details: The bind function is most of the time only called at init time so there is no need to save a pointer to it in the configuration structure. This fixes many section mismatches reported by modpost. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [m.nazarewicz@samsung.com: updated for -n...
```diff diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c index 5a65fbb4e20b..93b999e49ef3 100644 --- a/drivers/usb/gadget/audio.c +++ b/drivers/usb/gadget/audio.c @@ -105,7 +105,6 @@ static int __init audio_do_config(struct usb_configuration *c) static struct usb_configuration audio_config_driver...
07a18bd716ed5dea336429404b132568cfaaef95
Analyze and fix the following issue in the Linux kernel code: usb gadget: don't save bind callback in struct usb_composite_driver
Problem Details: The bind function is most of the time only called at init time so there is no need to save a pointer to it in the composite driver structure. This fixes many section mismatches reported by modpost. Signed-off-by: Michał Nazarewicz <m.nazarewicz@samsung.com> Acked-by: Uwe Kleine-König <u.kleine-koenig...
```diff diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c index a62af7b59094..5a65fbb4e20b 100644 --- a/drivers/usb/gadget/audio.c +++ b/drivers/usb/gadget/audio.c @@ -166,13 +166,12 @@ static struct usb_composite_driver audio_driver = { .name = "g_audio", .dev = &device_desc, .strings = audi...
e12995ec8f8d99f2a339541fc28998af2d60af0f
Analyze and fix the following issue in the Linux kernel code: USB: Revert "USB: gadget: section mismatch warning fixed"
Problem Details: This reverts a commit which proposed an invalid solution for a section mismatch. Next 3 commits will fix it correctly. Conflicts: drivers/usb/gadget/mass_storage.c Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c index b744ccd0f34d..a62af7b59094 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[] = { /*--------------------------------------------------------...
fc19de61ef5c17b6e19766052c6ac85cf31de876
Analyze and fix the following issue in the Linux kernel code: USB: gadget: functionfs: code cleanup
Problem Details: This patch removes some of the string registration from the FunctionFS Gadget as composite layer can handle the iManufacturer and iProduct for us. It also removes some of the module parameters which were redundant as well as changes the name of others to better much the module parameter of the composi...
```diff diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c index 3c2f0a43c9c6..52fd3fa0d130 100644 --- a/drivers/usb/gadget/g_ffs.c +++ b/drivers/usb/gadget/g_ffs.c @@ -52,9 +52,8 @@ MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR("Michal Nazarewicz"); MODULE_LICENSE("GPL"); - -static unsigned shor...
ba0534be935d7b24e5fdd6f82c443ee75abc9149
Analyze and fix the following issue in the Linux kernel code: USB: gadget: g_ffs: fixed vendor and product ID
Problem Details: This patch fixes the vendor and product ID the gadget uses by replacing the temporary IDs that were used during development (which should never get into mainline) with proper IDs. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: s...
```diff diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c index a9474f8d5325..3c2f0a43c9c6 100644 --- a/drivers/usb/gadget/g_ffs.c +++ b/drivers/usb/gadget/g_ffs.c @@ -53,8 +53,8 @@ MODULE_AUTHOR("Michal Nazarewicz"); MODULE_LICENSE("GPL"); -static unsigned short gfs_vendor_id = 0x0525; /* XX...
1c6529e92b7682573837e9c9eb7b5ba7a8216a88
Analyze and fix the following issue in the Linux kernel code: USB: gadget: g_multi: fixed vendor and product ID
Problem Details: This patch fixes the vendor and product ID the gadget uses by replacing the temporary IDs that were used during development (which should never get into mainline) with proper IDs. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: s...
```diff diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index 795d76232167..36d67a32abef 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c @@ -74,8 +74,8 @@ MODULE_LICENSE("GPL"); /***************************** Device Descriptor ****************************/ -#define MUL...
3211cbc20b406799423385cf62e1f1879b1ca8cc
Analyze and fix the following issue in the Linux kernel code: USB: langwell: USB Client Remote Wakeup Support
Problem Details: Remote wakeup support in client driver. Made non-debug only this time. Signed-off-by: JiebingLi <jiebing.li@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c index 8b92e2208dad..4b134abb1dbe 100644 --- a/drivers/usb/gadget/langwell_udc.c +++ b/drivers/usb/gadget/langwell_udc.c @@ -1815,6 +1815,36 @@ static ssize_t show_langwell_udc(struct device *_dev, static DEVICE_ATTR(langwell_udc...
7d172bfefb72a8dae56beff326299c5e21f6f6db
Analyze and fix the following issue in the Linux kernel code: Alchemy: Add UART PM methods.
Problem Details: Custom UART PM hook for Alchemy chips: do standard UART pm and additionally en/disable uart block clocks as needed. This allows to get rid of a debug port PM hack in the Alchemy pm code. Tested on Db1200. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.u...
```diff diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c index 1dc55ee2681b..3691630931d6 100644 --- a/arch/mips/alchemy/common/platform.c +++ b/arch/mips/alchemy/common/platform.c @@ -24,6 +24,33 @@ #include <prom.h> +static void alchemy_8250_pm(struct uart_port *port, unsign...
70eebd0b604989705f46697814e48fb4ea1d1bb9
Analyze and fix the following issue in the Linux kernel code: altera_uart: Don't use plain integer as NULL pointer
Problem Details: Fixes sparse warning. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Acked-by: Tobias Klauser <tklauser@distanz.ch>
```diff diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index dfc1ecc40abc..721216292a50 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c @@ -461,7 +461,7 @@ static int __init altera_uart_console_setup(struct console *co, char *options) if (co->index < 0 || co->ind...
5d89a48acfbaae02e7ecf97d4d8cc570a31964c5
Analyze and fix the following issue in the Linux kernel code: altera_uart: Fix missing prototype for registering an early console
Problem Details: Simply add an early_altera_uart_setup() prototype declaration, otherwise platform code have to do it in .c files, which is ugly. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Tobias Klauser <tklauser@distanz.ch> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman ...
```diff diff --git a/include/linux/altera_uart.h b/include/linux/altera_uart.h index c022c82db7ca..a10a90791976 100644 --- a/include/linux/altera_uart.h +++ b/include/linux/altera_uart.h @@ -5,6 +5,8 @@ #ifndef __ALTUART_H #define __ALTUART_H +#include <linux/init.h> + struct altera_uart_platform_uart { unsigned...
99793c660c811309ae4ca94cc9cf1c2f34940197
Analyze and fix the following issue in the Linux kernel code: altera_uart: Make it possible to use Altera UART and 8250 ports together
Problem Details: This fixes tty name, major and minor numbers. The major number 204 is used across many platform-specific serial drivers, so we use that. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Acked-by: Tobias Klauser <tklauser@distanz.ch> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-...
```diff diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index f1985aaf2cbc..fbc8f8e4ffaa 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c @@ -28,6 +28,8 @@ #include <linux/altera_uart.h> #define DRV_NAME "altera_uart" +#define SERIAL_ALTERA_MAJOR 204 +#define SER...
a9e2e06015201c32c43d3615c9bf5e0d4efb4302
Analyze and fix the following issue in the Linux kernel code: tty: Fix warning left over from TIOCGICOUNT changes
Problem Details: 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/ssu100.c b/drivers/usb/serial/ssu100.c index 8bd60e3c8b28..f5312dd3331b 100644 --- a/drivers/usb/serial/ssu100.c +++ b/drivers/usb/serial/ssu100.c @@ -444,8 +444,6 @@ static int ssu100_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) {...
0bca1b913affbd7e2fdaffee62a499659a466eb5
Analyze and fix the following issue in the Linux kernel code: tty: Convert the USB drivers to the new icount interface
Problem Details: Simple pasting job using the new ops function. Also fix a couple of devices directly returning the internal struct (which happens at this point to match for the fields that matter but isn't correct or futureproof) Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh...
```diff diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 1cd752f9a6e1..b8e957249132 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -1645,11 +1645,11 @@ hso_wait_modem_status(struct hso_serial *serial, unsigned long arg) * NB: both 1->0 and 0->1 transitions are counted except for *...
68707539df1e9d12435e5d54ffedc7ded50fcd01
Analyze and fix the following issue in the Linux kernel code: serial: max3107: Fix memory leaks when returning on error
Problem Details: Fix memory leaks in max3107_probe() when returning on error. Signed-off-by: Davidlohr Bueso <dave@gnu.org> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/serial/max3107.c b/drivers/serial/max3107.c index 67283c1a57ff..910870edf708 100644 --- a/drivers/serial/max3107.c +++ b/drivers/serial/max3107.c @@ -986,12 +986,14 @@ int max3107_probe(struct spi_device *spi, struct max3107_plat *pdata) s->rxbuf = kzalloc(sizeof(u16) * (MAX3107_RX_FIFO_S...
ca2e71aa8cfb0056ce720f3fd53f59f5fac4a3e1
Analyze and fix the following issue in the Linux kernel code: serial-core: skip call set_termios/console_start when no_console_suspend
Problem Details: The commit 4547be7 rewrites suspend and resume functions, this introduces a problem on the OMAP3EVM platoform. when the kernel boots with no_console_suspend and we suspend the kernel, then resume it, the serial console will be not usable. This problem should be common for all platforms. The cause for t...
```diff diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index cd8511298bcb..ff21200f94f4 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -2065,7 +2065,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) /* * Re-enable the console devi...
2938ffbd466d2811a6012609684a2298eef35065
Analyze and fix the following issue in the Linux kernel code: Driver core: Add mutex for adding/removing memory blocks
Problem Details: Add a new mutex for use in adding and removing of memory blocks. This is needed to avoid any race conditions in which the same memory block could be added and removed at the same time. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Reviewed-by: Robin Holt <holt@sgi.com> Reviewed-By: KAMEZAWA H...
```diff diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 63c25601572d..5185bcff2de9 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -27,6 +27,8 @@ #include <asm/atomic.h> #include <asm/uaccess.h> +static DEFINE_MUTEX(mem_sysfs_mutex); + #define MEMORY_CLASS_NAME "memory" static...
ead454feb6cbfe0fa6a1eeb30aa9abc338dacf62
Analyze and fix the following issue in the Linux kernel code: driver core: fix build for CONFIG_BLOCK not enabled
Problem Details: Fix build errors when CONFIG_BLOCK is not enabled: drivers/base/core.c: In function 'get_device_parent': drivers/base/core.c:634: error: 'block_class' undeclared (first use in this function) drivers/base/core.c: In function 'device_add_class_symlinks': drivers/base/core.c:723: error: 'block_class' und...
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index f7f906f0a2f2..2cb49a93b1e6 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -630,12 +630,14 @@ static struct kobject *get_device_parent(struct device *dev, struct kobject *parent_kobj; struct kobject *k; +#ifdef CONFIG_BLOCK /*...
5fc6e9cbce3342379719fc0f8294c45bb888f5cc
Analyze and fix the following issue in the Linux kernel code: FW_LOADER: fix kconfig dependency warning on HOTPLUG
Problem Details: Fix kconfig dependency warning for FW_LOADER. Lots of drivers select FW_LOADER without bothering to depend on HOTPLUG and/or without selecting HOTPLUG. A kernel builds fine when FW_LOADER is enabled, whether HOTPLUG is enabled or not, and a kernel config file (make oldconfig) is not changed by this p...
```diff diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index ef38aff737eb..fd96345bc35c 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -71,7 +71,6 @@ config PREVENT_FIRMWARE_BUILD config FW_LOADER tristate "Userspace firmware loading support" if EMBEDDED - depends on HOTPLUG default y ...
3d4f9d76b0641b7984f95982e390927fc5998ad6
Analyze and fix the following issue in the Linux kernel code: uio: Fix lack of locking in init_uio_class
Problem Details: There is no locking in init_uio_class so multiple drivers can race and create multiple uio classes. Fix this by simplifying the code. In particular always register the uio class during module_init and make things simpler. Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Reviewed-by: T...
```diff diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index bff1afbde5a4..bc774cce0a4d 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -45,10 +45,7 @@ static DEFINE_IDR(uio_idr); static const struct file_operations uio_fops; /* UIO class infrastructure */ -static struct uio_class { - struct kref kref...
da0d7f982d538f4a5bcdddb84df4a484a3b1770b
Analyze and fix the following issue in the Linux kernel code: pch_phub: fix build warnings
Problem Details: This patch fixes up all of the build warnings for the pch_phub driver. Cc: Masayuki Ohtake <masa-korg@dsn.okisemi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/misc/pch_phub.c b/drivers/misc/pch_phub.c index ed56e4f91fa0..744b804aca15 100644 --- a/drivers/misc/pch_phub.c +++ b/drivers/misc/pch_phub.c @@ -546,7 +546,7 @@ static int __devinit pch_phub_probe(struct pci_dev *pdev, int retval; int ret; - unsigned int rom_size; + ssize_t rom_size;...
6a5c083de2f5fbf89a4b0a251be2c2205434d7ea
Analyze and fix the following issue in the Linux kernel code: Dynamic Debug: Initialize dynamic debug earlier via arch_initcall
Problem Details: Having the ddebug_query= boot parameter it makes sense to set up dynamic debug as soon as possible. I expect sysfs files cannot be set up via an arch_initcall, because this one is even before fs_initcall. Therefore I splitted the dynamic_debug_init function into an early one and a later one providing ...
```diff diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 44ce66bdb211..a687d902daab 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -748,13 +748,14 @@ static void ddebug_remove_all_tables(void) mutex_unlock(&ddebug_lock); } -static int __init dynamic_debug_init(void) +static __initdata in...
a648ec05bb950fae2f35d0490ddd6cf15010af72
Analyze and fix the following issue in the Linux kernel code: Dynamic Debug: Introduce ddebug_query= boot parameter
Problem Details: Dynamic debug lacks the ability to enable debug messages at boot time. One could patch initramfs or service startup scripts to write to /sys/../dynamic_debug/control, but this sucks. This patch makes it possible to pass a query in the same format one can write to /sys/../dynamic_debug/control via boot...
```diff diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt index 674c5663d346..58ea64a96165 100644 --- a/Documentation/dynamic-debug-howto.txt +++ b/Documentation/dynamic-debug-howto.txt @@ -24,7 +24,7 @@ Dynamic debug has even more useful features: read to display the comple...
fd89cfb8718753459fcea3fe6103d19de5e86c9b
Analyze and fix the following issue in the Linux kernel code: Dynamic Debug: Split out query string parsing/setup from proc_write
Problem Details: The parsing and applying of dynamic debug strings is not only useful for /sys/../dynamic_debug/control write access, but can also be used for boot parameter parsing. The boot parameter is introduced in a follow up patch. Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: jbaron@redhat.com Acked...
```diff diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 02afc2533728..84d103c474e4 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -429,6 +429,27 @@ static int ddebug_parse_flags(const char *str, unsigned int *flagsp, return 0; } +static int ddebug_exec_query(char *query_string) +{ + uns...
297b0c5be3b6e08890cbd7149313408847e81715
Analyze and fix the following issue in the Linux kernel code: drm/i915/ringbuffer: Write the value passed in to the tail register
Problem Details: This should fix the error along the reset path were we tried to clear the tail register by setting it to 0, but were in fact setting it to the current value and complaining when it did not reset to 0. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
```diff diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 0c6eb97d60fd..4b53ca81ea4d 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -119,12 +119,12 @@ render_ring_flush(struct drm_device *dev, } } -static void...
36845d09b93ff04b1c26c47f2c278dd779462468
Analyze and fix the following issue in the Linux kernel code: pcmcia: fix ni_daq_700 compilation
Problem Details: Reported-by: Anca Emanuel <anca.emanuel@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
```diff diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index fc772a8a55c6..6b7372eed90d 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c @@ -496,7 +496,6 @@ static int dio700_pcmcia_config_loop(struct pcmci...
a69a0612c4cb7b08570d1b25b542cef478a2d79a
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ]: x86, cpufreq: Mark longrun_get_policy with __cpuinit.
Problem Details: This patch fixes the following warning. The function longrun_cpu_init() is marked with __cpuinit which calls longrun_get_policy() which is a __init function. So make longrun_get_policy with __cpuinit. WARNING: arch/x86/kernel/cpu/cpufreq/longrun.o(.cpuinit.text+0x4c5): Section mismatch in reference fr...
```diff diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c index 77945bfbded2..d9f51367666b 100644 --- a/arch/x86/kernel/cpu/cpufreq/longrun.c +++ b/arch/x86/kernel/cpu/cpufreq/longrun.c @@ -35,7 +35,7 @@ static unsigned int longrun_low_freq, longrun_high_freq; * Reads the curr...
3f78a9f7fcee0e9b44a15f39ac382664e301fad5
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] add sampling_down_factor tunable to improve ondemand performance
Problem Details: Adds a new global tunable, sampling_down_factor. Set to 1 it makes no changes from existing behavior, but set to greater than 1 (e.g. 100) it acts as a multiplier for the scheduling interval for reevaluating load when the CPU is at its top speed due to high load. This improves performance by reducing...
```diff diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 7b5093664e49..c631f27a3dcc 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -30,6 +30,8 @@ #define DEF_FREQUENCY_DOWN_DIFFERENTIAL (10) #define DEF_FREQUENCY_UP_THRESHOLD (...
b2a33c172890b231444803b0bb38c25ac5a0f274
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] arch/x86/kernel/cpu/cpufreq: Fix unsigned return type
Problem Details: In each case, the function has an unsigned return type, but returns a negative constant to indicate an error condition. Each function is only called once. For nforce2_detect_chipset, the result is only compared to 0, and for longrun_determine_freqs, the result is stored in a variable of type (signed)...
```diff diff --git a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c index 733093d60436..141abebc4516 100644 --- a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c +++ b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c @@ -393,7 +393,7 @@ static struct cpufreq_driver nforce2_driv...
c19483cc5e56ac5e22dd19cf25ba210ab1537773
Analyze and fix the following issue in the Linux kernel code: bluetooth: Fix missing NULL check
Problem Details: Fortunately this is only exploitable on very unusual hardware. [Reported a while ago but nothing happened so just fixing it] Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 998833d93c13..17361bad46dd 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -256,9 +256,16 @@ static int hci_uart_tty_open(struct tty_struct *tty) BT_DBG("tty %p", tty); + /* FIXME: This btw i...
2656c36699677238edc9ec1fea79039f1fddbcb6
Analyze and fix the following issue in the Linux kernel code: genirq: Warn if enable_irq is called before irq is set up
Problem Details: The recent changes in the genirq core unearthed a bug in arch/um which called enable_irq() before the interrupt was set up. Warn and return instead of crashing the machine with a NULL pointer dereference. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Richard Weinberger <richard@nod.at>
```diff diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 644e8d5fa367..5f92acc5f952 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -324,6 +324,10 @@ void enable_irq(unsigned int irq) if (!desc) return; + if (WARN(!desc->irq_data.chip || !desc->irq_data.chip->irq_enable, + KERN_ERR ...
a74ccea51d4314632a81d568d59bf885e5b09d93
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix wrong TLV mute bit for STAC/IDT codecs
Problem Details: The bit value set for TLV mute was wrong in commit de8c85f7840e5e29629de95f5af24297fb325e0b, which resulted in bogus dB ranges that screw up PulseAudio. Corrected with the right constant. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 7d70f8ca3742..7f487ab4dad4 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -32,6 +32,7 @@ #include <sound/core.h> #include <sound/asoundef.h> #include <sound/jack.h> +#include <sound/tlv.h> ...
bc571b8cb930ea78207851dd38b5a435fcb8891c
Analyze and fix the following issue in the Linux kernel code: drbd: fix a misleading printk
Problem Details: This codepath used to be called only for failed kmalloc GFP_ATOMIC, but is now also triggered by other things. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
```diff diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 108d58015cd1..1a2d2f0759b2 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -925,7 +925,7 @@ out: drbd_md_sync(mdev); if (test_and_clear_bit(WRITE_BM_AFTER_RESYNC, &mdev->flags)) {...
6719fb036cea56a5ee9d0ac912ed8c7cabb27f49
Analyze and fix the following issue in the Linux kernel code: drbd: fix potential data divergence after multiple failures
Problem Details: If we get an IO-error during an activity log transaction, if we failed to write the bitmap of the evicted extent, we must not write the transaction itself. If we failed to write the transaction, we must not even submit the corresponding bio, as its extent is not yet marked in the activity log. Otherwi...
```diff diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index ac04ef97eac2..bd925180a2b0 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c @@ -284,18 +284,32 @@ w_al_write_transaction(struct drbd_conf *mdev, struct drbd_work *w, int unused) u32 xor_s...
82f59cc6353889b426cf13b6596d5a3d100fa09e
Analyze and fix the following issue in the Linux kernel code: drbd: fix potential deadlock on detach
Problem Details: If we have contention in drbd_al_begin_iod (heavy randon IO), an administrative request to detach the disk may deadlock for similar reasons as the recently fixed deadlock if detaching because of IO-error. The approach taken here is to either go through the intermediate cleanup state D_FAILED, or first...
```diff diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index e0e0bf6f16a1..03c15e317c37 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -852,7 +852,8 @@ enum { BITMAP_IO, /* suspend application io; once no more io in flight, start bitmap io */ B...
d7842da470f244d258f21c5f72cd8388b3541d04
Analyze and fix the following issue in the Linux kernel code: perf_events: Fix for transaction recovery in group_sched_in()
Problem Details: This new version (see commit 8e5fc1a) is much simpler and ensures that in case of error in group_sched_in() during event_sched_in(), the events up to the failed event go through regular event_sched_out(). But the failed event and the remaining events in the group have their timings adjusted as if they ...
```diff diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 39afdb07d758..517d827f4982 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -691,6 +691,8 @@ group_sched_in(struct perf_event *group_event, { struct perf_event *event, *partial_group = NULL; struct pmu *pmu = group_event->pmu; + u64 ...
9ffcfa6f1f63eeac15555b745c292eb9f59130f6
Analyze and fix the following issue in the Linux kernel code: perf_events: Revert: Fix transaction recovery in group_sched_in()
Problem Details: This patch reverts commit 8e5fc1a (perf_events: Fix transaction recovery in group_sched_in()) because it had one flaw in case the group could never be scheduled. It would cause time_enabled to get negative. Signed-off-by: Stephane Eranian <eranian@google.com> Signed-off-by: Peter Zijlstra <a.p.zijlstr...
```diff diff --git a/kernel/perf_event.c b/kernel/perf_event.c index f309e8014c78..39afdb07d758 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -417,8 +417,8 @@ event_filter_match(struct perf_event *event) return event->cpu == -1 || event->cpu == smp_processor_id(); } -static int -__event_sched_out(s...
878a3c37d36142a192bdf5b6bfcf920832f431d7
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix flushing regression from 9af90d19f
Problem Details: Whilst moving the code around in 9af90d19f, I dropped the or'ing in of new write domains which would zero out the write domain for a render target if later reused as a source later in the batch. This meant that we might drop a required flush before reading from the render target. Bugzilla: https://bug...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index c3398d396419..9290f02215cb 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3349,7 +3349,7 @@ i915_gem_execbuffer_relocate(struct drm_i915_gem_object *obj, } target_obj->pending_rea...
07bd8516a2f967aa67904c68ab97bb896a448b09
Analyze and fix the following issue in the Linux kernel code: x86, asm: Restore parentheses around one pushl_cfi argument
Problem Details: These were (intentionally) stripped by "fix CFI macro invocations to deal with shortcomings in gas" to expose problems with unexpected splitting of arguments by older gas also on newer versions, but as it turns out there is at least one distro (Ubuntu 6.06) where even not having *any* spaces in a macro...
```diff diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index f73a4b881aa9..59e175e89599 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S @@ -395,7 +395,7 @@ sysenter_past_esp: * A tiny bit of offset fixup is necessary - 4*4 means the 4 words * pushed above; +8 corresp...
a22dcdb0032c78c6b443f6897d7ac432a3b5a272
Analyze and fix the following issue in the Linux kernel code: x86, asm: Fix ancient-GAS workaround
Problem Details: It turns out to generate something like this: printk ( ("<3>") "something"); The extra parentheses here break the UML compile. Change the sed-program to add the parentheses only for numbers. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Ac...
```diff diff --git a/Kbuild b/Kbuild index 399593942a9b..431f7ca2404c 100644 --- a/Kbuild +++ b/Kbuild @@ -53,7 +53,8 @@ targets += arch/$(SRCARCH)/kernel/asm-offsets.s # Default sed regexp - multiline due to syntax constraints define sed-y "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#d...
bedeea6e3bdca8ccb455aef11d9db23911af3863
Analyze and fix the following issue in the Linux kernel code: Blackfin: SIC: fix off-by-one error in loop
Problem Details: Make sure we include EMAC_SYSTAT when showing errors. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index eaece5f84e42..0df4fb57f5ba 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c @@ -511,7 +511,7 @@ static void bfin_demux_mac_status_irq(unsigned int int_er...
c5af5451fcf97f38f0c79cbb9f929af2779f234d
Analyze and fix the following issue in the Linux kernel code: Blackfin: boards: fix num_chipselect values for on-chip SPI buses
Problem Details: The num_chipselect field for on-chip Blackfin SPI buses is supposed to be 1 larger than the number of actual CSs available. This is because the hardware starts counting at 1 and not 0. There is a field for "CS0", but it is marked as "reserved" everywhere. Signed-off-by: Mike Frysinger <vapier@gentoo...
```diff diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index 44d6d5299022..46cb5d410b62 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c @@ -312,7 +312,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {...
67d9963bd79b8f861387982ac5c0ff796f12be61
Analyze and fix the following issue in the Linux kernel code: Blackfin: bf537-stamp: fix NAND resources
Problem Details: The NAND platform driver expects the registers to have a "mem" resource type rather than "io". Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 9c83b52ff6bc..62c480e35276 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -418,7 +418,7 @@ static struct platform_nand_data bfin_plat_nand_data = { static ...
657bb918d91d8e291f7c40e4a101c44b53fe25fa
Analyze and fix the following issue in the Linux kernel code: Blackfin: bf561-acvilon: fix NAND resources
Problem Details: The NAND platform driver expects the registers to have a "mem" resource type rather than "io". Signed-off-by: Valentin Yakovenkov <yakovenkov@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c index 35b6d124c1e3..0b1c20f14fe0 100644 --- a/arch/blackfin/mach-bf561/boards/acvilon.c +++ b/arch/blackfin/mach-bf561/boards/acvilon.c @@ -302,7 +302,7 @@ static struct platform_nand_data bfin_plat_nand_data = { ...
b4627321e18582dcbdeb45d77df29d3177107c65
Analyze and fix the following issue in the Linux kernel code: cfq-iosched: Fix a gcc 4.5 warning and put some comments
Problem Details: - Andi encountedred following warning with gcc 4.5 linux/block/cfq-iosched.c: In function ‘cfq_dispatch_requests’: linux/block/cfq-iosched.c:2156:3: warning: array subscript is above array bounds - Warning happens due to following code. slice = group_slice * count / max_t(unsigned, cfqg->b...
```diff diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 86338d5d4d09..dfceb6386bd5 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -157,6 +157,7 @@ enum wl_prio_t { BE_WORKLOAD = 0, RT_WORKLOAD = 1, IDLE_WORKLOAD = 2, + CFQ_PRIO_NR, }; /* @@ -181,10 +182,19 @@ struct cfq_group { /...
22e58f9de5d140116eb3a30d5e54396e3030bed2
Analyze and fix the following issue in the Linux kernel code: m68k: __pa(): cast arg to long
Problem Details: Fixes this: drivers/char/mem.c: In function 'mmap_kmem': drivers/char/mem.c:342: warning: cast to pointer from integer of different size by doing what other archtiectures do. Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Geert U...
```diff diff --git a/arch/m68k/include/asm/page_mm.h b/arch/m68k/include/asm/page_mm.h index 66f0b3938cbb..31d5570d6567 100644 --- a/arch/m68k/include/asm/page_mm.h +++ b/arch/m68k/include/asm/page_mm.h @@ -80,7 +80,7 @@ static inline unsigned long ___pa(void *vaddr) : "0" (vaddr), "i" (m68k_fixup_memoffset)); ret...
10b68799b32d60ff578742d0deebc98afff30dba
Analyze and fix the following issue in the Linux kernel code: zorro: Fix device_register() error handling
Problem Details: If device_register() fails then call put_device(). See comment to device_register. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
```diff diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c index 6455f3a244c5..e0c2807b0970 100644 --- a/drivers/zorro/zorro.c +++ b/drivers/zorro/zorro.c @@ -142,6 +142,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev) error = device_register(&bus->dev); if (error) { pr_err("Zorro: ...
0c37dd7c41b7391698bbe354b81fe9909c281984
Analyze and fix the following issue in the Linux kernel code: fbdev/m68k: Fix section mismatches in q40fb.c
Problem Details: This patch moves the q40_fix and q40_var structures from .init.data to .devinit.data. This is where now the probe function resides, which only uses them. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
```diff diff --git a/drivers/video/q40fb.c b/drivers/video/q40fb.c index fc32c323a381..f5a39f5aa900 100644 --- a/drivers/video/q40fb.c +++ b/drivers/video/q40fb.c @@ -28,7 +28,7 @@ #define Q40_PHYS_SCREEN_ADDR 0xFE800000 -static struct fb_fix_screeninfo q40fb_fix __initdata = { +static struct fb_fix_screeninfo q40...
2c6605def534fc6d3d0635dd95f88d3d87d44d9f
Analyze and fix the following issue in the Linux kernel code: mx35pdk: add debug board support
Problem Details: Enable debug board support for mx35pdk. Signed-off-by: Xiao Jiang <jgq516@gmail.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index f50b489aa109..5000ac1f93e3 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig @@ -143,6 +143,7 @@ config MACH_ARMADILLO5X0 config MACH_MX35_3DS bool "Support MX35PDK platform" select ARCH_MX35 + select MXC_DEBUG_BO...
b843e4ec01991a386a9e0e9030703524446e03da
Analyze and fix the following issue in the Linux kernel code: microblaze: Fix build with make 3.82
Problem Details: When running make headers_install_all on x86_64 and make 3.82 I hit this: arch/microblaze/Makefile:80: *** mixed implicit and normal rules. Stop. make: *** [headers_install_all] Error 2 So split the rules to satisfy make 3.82. Signed-off-by: Thomas Backlund <tmb@mandriva.org> Cc: Stable <stable@ker...
```diff diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 70a3837c9ba8..15f1f1d1840d 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -69,12 +69,16 @@ export MMU DTB all: linux.bin -BOOT_TARGETS = linux.bin linux.bin.gz simpleImage.% +# With make 3.82 we cannot mix norma...
557d58687dcdee6bc00c1a8f1fd4e0eac8fefce9
Analyze and fix the following issue in the Linux kernel code: ACPI battery: support percentage battery remaining capacity
Problem Details: According to the ACPI spec, some kinds of primary battery can report percentage battery remaining capacity directly to OS. In this case, it reports the LastFullChargedCapacity == 100, BatteryPresentRate = 0xFFFFFFFF, and BatteryRemaingCapacity a percentage value, which actually means RemainingBatteryP...
```diff diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 7b8787b490f6..0b2707ee094b 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -95,6 +95,7 @@ enum { * due to bad math. */ ACPI_BATTERY_QUIRK_SIGNED16_CURRENT, + ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY, }; struct acpi_...
7a18e96dcbdec3c96876444ae2c7e36ce458e151
Analyze and fix the following issue in the Linux kernel code: ACPI: Make Embedded Controller command timeout delay configurable
Problem Details: Here and then there show up machines which need higher timeout values. Finding this on affected machines can be cumbersome, because ACPI_EC_DELAY is a compile option -> make it configurable via boot param. This can even be provided writable at runtime via: /sys/modules/acpi/parameters/ec_delay Known ...
```diff diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index f31291ba94d0..372ff80b7b0c 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -83,6 +83,11 @@ enum { EC_FLAGS_BLOCKED, /* Transactions are blocked */ }; +/* ec.c is compiled in acpi namespace so this shows up as acpi.ec_delay param */ +static...
0988c4c7fb5881377ec20a6452f739a722e97c6b
Analyze and fix the following issue in the Linux kernel code: vlan: Calling vlan_hwaccel_do_receive() is always valid.
Problem Details: It is now acceptable to receive vlan tagged packets at any time, even if CONFIG_VLAN_8021Q is not set. This means that calling vlan_hwaccel_do_receive() should not result in BUG() but rather just behave as if there were no vlan devices configured. Reported-by: Vladislav Zolotarov <vladz@broadcom.com>...
```diff diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index a0d9786c202d..c2f3a72712ce 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -168,7 +168,8 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, static inline bool vlan_hwaccel_do_receive(st...
89692c03226a066a017048cf7fbacbaa645f0e79
Analyze and fix the following issue in the Linux kernel code: include/linux/libata.h: fix typo
Problem Details: Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/include/linux/libata.h b/include/linux/libata.h index 15efec05df67..15b77b8dc7e1 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -342,7 +342,7 @@ enum { ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */ ATA_EHI_PRINTINFO = (1 << 18), /* print configuratio...
c0695733d56ea12ad62ee534c2eed91f917548ae
Analyze and fix the following issue in the Linux kernel code: pata_bf54x: fix return type of bfin_set_devctl
Problem Details: The new devctl func added for us to the driver has the wrong return type. Which is to say there shouldn't be any. This fixes compile time warnings as there shouldn't be any runtime difference. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index e1423cd2531f..ec2c777fcdb0 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c @@ -826,7 +826,7 @@ static void bfin_dev_select(struct ata_port *ap, unsigned int device) * @ctl: value to write */ -static u8 bfin_set_dev...
6ad601955315b010a117306b994f2204fae85fdc
Analyze and fix the following issue in the Linux kernel code: libahci: fix result_tf handling after an ATA PIO data-in command
Problem Details: ATA devices don't send D2H Reg FIS after an successful ATA PIO data-in command. The host is supposed to take the TF and E_Status of the preceding PIO Setup FIS. Update ahci_qc_fill_rtf() such that it takes TF + E_Status from PIO Setup FIS after a successful ATA PIO data-in command. Without this patc...
```diff diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 1a2aacfdebc5..329cbbb91284 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -72,6 +72,7 @@ enum { AHCI_CMD_RESET = (1 << 8), AHCI_CMD_CLR_BUSY = (1 << 10), + RX_FIS_PIO_SETUP = 0x20, /* offset of PIO Setup FIS data */ RX_FIS_D2H_REG ...
0c03a1dd5bd8a37932ae1d519156172affef22fd
Analyze and fix the following issue in the Linux kernel code: spi: add spi_tegra driver
Problem Details: v2 changes: from Thierry Reding: * add "select TEGRA_SYSTEM_DMA" to Kconfig from Grant Likely: * add oneline description to header * inline references to DRIVER_NAME * inline references to BUSY_TIMEOUT * open coded bytes_per_word() * spi_readl/writel -> spi_tegra_readl/write...
```diff diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 4b9eec68fad6..78f9fd02c1b2 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -329,6 +329,13 @@ config SPI_STMP3XXX help SPI driver for Freescale STMP37xx/378x SoC SSP interface +config SPI_TEGRA + tristate "Nvidia Tegra SPI control...
2e47b8b3c2dc0f9f0651ee0f20e163da09b20fb9
Analyze and fix the following issue in the Linux kernel code: [ARM] tegra: gpio: Add suspend and wake support
Problem Details: Includes checkpatch fixes and TEGRA_NR_GPIOS changes from Mike Rapoport <mike@compulab.co.il> Signed-off-by: Colin Cross <ccross@android.com>
```diff diff --git a/arch/arm/mach-tegra/gpio.c b/arch/arm/mach-tegra/gpio.c index fe78fba25f3c..0775265e69f5 100644 --- a/arch/arm/mach-tegra/gpio.c +++ b/arch/arm/mach-tegra/gpio.c @@ -19,6 +19,7 @@ #include <linux/init.h> #include <linux/irq.h> +#include <linux/interrupt.h> #include <linux/io.h> #include <li...
338e4fab3d41aa14264e10ce505a7c908633cdad
Analyze and fix the following issue in the Linux kernel code: drivers/char/agp/parisc-agp.c: eliminate memory leak
Problem Details: alloc_pci_dev allocates some memory, so that memory should be freed before leaving the function in an error case. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ local idexpression x; expression E; identifier f1; iterator I; @@ ...
```diff diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c index 1c129211302d..17e380f5f818 100644 --- a/drivers/char/agp/parisc-agp.c +++ b/drivers/char/agp/parisc-agp.c @@ -358,8 +358,12 @@ parisc_agp_setup(void __iomem *ioc_hpa, void __iomem *lba_hpa) bridge->dev = fake_bridge_dev; erro...
9950110cf0f79db91c0103876f3a58c9069243eb
Analyze and fix the following issue in the Linux kernel code: ata_piix: remove SIDPR locking
Problem Details: Now that libata provides proper cross-port EH exclusion. The SIDPR locking added by commit 213373cf (ata_piix: fix locking around SIDPR access) is no longer necessary. Remove it. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 1b40684111c0..2cfc1ae366ea 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -158,7 +158,6 @@ struct piix_map_db { struct piix_host_priv { const int *map; u32 saved_iocfg; - spinlock_t sidpr_lock; /* FIXME: remove once loc...
c0c362b60e259e3480a36ef70280d545818844f0
Analyze and fix the following issue in the Linux kernel code: libata: implement cross-port EH exclusion
Problem Details: In libata, the non-EH code paths should always take and release ap->lock explicitly when accessing hardware or shared data structures. However, once EH is active, it's assumed that the port is owned by EH and EH methods don't explicitly take ap->lock unless race from irq handler or other code paths are...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 42d9ce29f50d..7f77c67d267c 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -1628,8 +1628,14 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, } } + if (ap->ops->error_handler) + ata_eh_release(ap); ...
6b7ae9545ad9875a289f4191c0216b473e313cb9
Analyze and fix the following issue in the Linux kernel code: libata: reimplement link power management
Problem Details: The current LPM implementation has the following issues. * Operation order isn't well thought-out. e.g. HIPM should be configured after IPM in SControl is properly configured. Not the other way around. * Suspend/resume paths call ata_lpm_enable/disable() which must only be called from EH cont...
```diff diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 68f7b4216501..328826381a2d 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1208,9 +1208,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ata_port_pbar_desc(ap, AHCI_PCI_BAR, 0x100 + ap->port_no...
c93b263e0d4fa8ce5fec0142a98196d1a127e845
Analyze and fix the following issue in the Linux kernel code: libata: clean up lpm related symbols and sysfs show/store functions
Problem Details: Link power management related symbols are in confusing state w/ mixed usages of lpm, ipm and pm. This patch cleans up lpm related symbols and sysfs show/store functions as follows. * lpm states - NOT_AVAILABLE, MIN_POWER, MAX_PERFORMANCE and MEDIUM_POWER are renamed to ATA_LPM_UNKNOWN and ATA_LPM...
```diff diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 99d0e5a51148..68f7b4216501 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1209,7 +1209,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 0x100 + ap->port_no * 0x80, "port"); /* set initial li...