aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2012-02-08driver-core: cpu: fix kobject warning when hotplugging a cpuGreg Kroah-Hartman1-0/+1
Due to the sysdev conversion to struct device, the cpu objects get reused when adding a cpu after offlining it, which causes a big warning that the kobject portion is not properly initialized. So clear out the object before we register it again, so all is quiet. Reported-by: Konrad Rzeszutek Wilk <[email protected]> Tested-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08ACPI: remove duplicated lines of merging problems with acpi_processor_addYinghai Lu1-7/+0
Those lines have two copies. Not sure how it could happen, looks like git problem. Signed-off-by: Yinghai Lu <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Thomas Renninger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08m32r: relocate drivers back out of 8250 dirPaul Gortmaker3-0/+0
Commit 9bef3d4197379a995fa80f81950bbbf8d32e9e8b "serial: group all the 8250 related code together" inadvertently swept up the m32r driver in the move, because it had comments mentioning 8250 registers within it. However these are only there by nature of the driver being based off the 8250 source code -- the hardware itself does not actually have any relation to the original 8250 style UARTs. Reported-by: Jiri Slaby <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: android/ram_console: Don't build on arches w/o ioremapAnton Vorontsov1-0/+1
This patch fixes UML build: CC drivers/staging/android/ram_console.o drivers/staging/android/ram_console.c: In function 'ram_console_driver_probe': drivers/staging/android/ram_console.c:358:2: error: implicit declaration of function 'ioremap' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make[3]: *** [drivers/staging/android/ram_console.o] Error 1 Signed-off-by: Anton Vorontsov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: r8712u: Use asynchronous firmware loadingLarry Finger5-25/+68
In https://bugs.archlinux.org/task/27996, failure of driver r8712u is reported, with a timeout during module loading due to synchronous loading of the firmware. The code now uses request_firmware_nowait(). Signed-off-by: Larry Finger <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: usbip: fix to prevent potentially using uninitialized spinlockBart Westgeest1-2/+2
The stub_probe function can be called as soon as the stub_driver is registered. This can lead to the busid_table_lock being used before it is initialized. Moved calling the init_busid_table function (which initalizes this spinlock) to be called earlier in the init function to prevent this from happening. Signed-off-by: Bart Westgeest <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: r8712u: Fix problem when CONFIG_R8712_AP is setLarry Finger1-0/+1
When this driver was upgraded to the vendor 20100831 version in commit 93c55dda092c7 et al,, one listhead initialization was missed. This broke complete operation of the driver whenever AP mode was enabled. This patch fixes https://bugs.archlinux.org/task/27996. Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: tidspbridge: fix incorrect free to drv_datapOmar Ramirez Luna2-2/+3
This structure is still used after it has been freed, since it is being allocated in probe, calls to free it have been moved to module's remove routine. This should fix the follwoing messages when attempting to remove the module: drv_get_first_dev_extension: Failed to retrieve the object handle drv_get_first_dev_extension: Failed to retrieve the object handle drv_destroy: Failed to store DRV object mgr_destroy: Failed to store MGR object Signed-off-by: Omar Ramirez Luna <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: tidspbridge: fix bridge_open memory leaksOmar Ramirez Luna1-23/+32
There are two members of pr_ctxt allocated during bridge_open that are never freed resulting in memory leaks, these are stream_id and node_id, they are now freed on release of the handle (bridge_release) right before freeing pr_ctxt. Error path for bridge_open was also fixed since the same variables could result in memory leaking due to missing handling of failure scenarios. While at it, the indentation changes were introduced to avoid interleaved goto statements inside big if blocks. Signed-off-by: Omar Ramirez Luna <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: android: lowmemorykiller: Don't wait more than one second for a ↵Arve Hjønnevåg1-1/+4
process to die If a process forked and the child process was killed by the lowmemorykiller, the lowmemory killer would be disabled until the parent process reaped the child or it died itself. Signed-off-by: Arve Hjønnevåg <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: zcache: fix serialization bug in zv statsSeth Jennings1-7/+7
In a multithreaded workload, the zv_curr_dist_counts and zv_cumul_dist_counts statistics are being corrupted because the increments and decrements in zv_create and zv_free are not atomic. This patch converts these statistics and their corresponding increments/decrements/reads to atomic operations. Signed-off-by: Seth Jennings <[email protected]> Acked-by: Dan Magenheimer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: fix go7007-usb licenseRandy Dunlap1-0/+1
Add MODULE_LICENSE() for this source module to fix build warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/staging/media/go7007/go7007-usb.o see include/linux/module.h for more information Signed-off-by: Randy Dunlap <[email protected]> Cc: Ross Cohen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08Staging: android: binder: Fix crashes when sharing a binder file between ↵Arve Hjønnevåg1-1/+11
processes Opening the binder driver and sharing the file returned with other processes (e.g. by calling fork) can crash the kernel. Prevent these crashes with the following changes: - Add a mutex to protect against two processes mmapping the same binder_proc. - After locking mmap_sem, check that the vma we want to access (still) points to the same mm_struct. - Use proc->tsk instead of current to get the files struct since this is where we get the rlimit from. Signed-off-by: Arve Hjønnevåg <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08Staging: android: Remove pmem driverShuah Khan4-1443/+0
Addroid pmem driver is no longer used in any of the Android products. This patch removes pmem driver from Android staging area Reference: https://lkml.org/lkml/2012/1/23/183 Signed-off-by: Shuah Khan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08Staging: asus_oled: fix NULL-ptr crash on unloadingPekka Paalanen1-2/+1
Asus_oled triggers the following bug on module unloading: usbcore: deregistering interface driver asus-oled BUG: unable to handle kernel NULL pointer dereference at 0000000000000038 IP: [<ffffffff8111292b>] sysfs_delete_link+0x30/0x66 Call Trace: [<ffffffff81225373>] device_remove_class_symlinks+0x6b/0x70 [<ffffffff812256a8>] device_del+0x9f/0x1ab [<ffffffff812257c5>] device_unregister+0x11/0x1e [<ffffffffa000cb82>] asus_oled_disconnect+0x4f/0x9e [asus_oled] [<ffffffff81277430>] usb_unbind_interface+0x54/0x103 [<ffffffff812276c4>] __device_release_driver+0xa2/0xeb [<ffffffff81227794>] driver_detach+0x87/0xad [<ffffffff812269e9>] bus_remove_driver+0x91/0xc1 [<ffffffff81227fb4>] driver_unregister+0x66/0x6e [<ffffffff812771ed>] usb_deregister+0xbb/0xc4 [<ffffffffa000ce87>] asus_oled_exit+0x2f/0x31 [asus_oled] [<ffffffff81068365>] sys_delete_module+0x1b8/0x21b [<ffffffff810ae3de>] ? do_munmap+0x2ef/0x313 [<ffffffff813699bb>] system_call_fastpath+0x16/0x1b This is due to an incorrect destruction sequence in asus_oled_exit(). Fix the order, fixes the bug. Tested on an Asus G50V laptop only. Cc: Jakub Schmidtke <[email protected]> Signed-off-by: Pekka Paalanen <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08Staging: asus_oled: fix image processingPekka Paalanen1-2/+8
Programming an image was broken, because odev->buf_offs was not advanced for val == 0 in append_values(). This regression was introduced in: commit 1ff12a4aa354bed093a0240d5e6347b1e27601bc Author: Kevin A. Granade <[email protected]> Date: Sat Sep 5 01:03:39 2009 -0500 Staging: asus_oled: Cleaned up checkpatch issues. Fix the image processing by special-casing val == 0. I have tested this change on an Asus G50V laptop only. Cc: Jakub Schmidtke <[email protected]> Cc: Kevin A. Granade <[email protected]> Signed-off-by: Pekka Paalanen <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08Staging: android: binder: Don't call dump_stack in binder_vma_openArve Hjønnevåg1-1/+0
If user-space partially unmaps the driver, binder_vma_open would dump the kernel stack. This is not a kernel bug however and will be treated as if the whole area was unmapped once binder_vma_close gets called. Signed-off-by: Arve Hjønnevåg <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: r8712u: Add new Sitecom UsB IDLarry Finger1-0/+1
Add USB ID for SITECOM WLA-1000 V1 001 WLAN Reported-and-tested-by: Roland Gruber <[email protected]> Reported-and-tested-by: Dario Lucia <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08zcache: Set SWIZ_BITS to 8 to reduce tmem bucket lock contention.Dan Magenheimer1-2/+2
SWIZ_BITS > 8 results in a much larger number of "tmem_obj" allocations, likely one per page-placed-in-frontswap. The tmem_obj is not huge (roughly 100 bytes), but it is large enough to add a not-insignificant memory overhead to zcache. The SWIZ_BITS=8 will get roughly the same lock contention without the space wastage. The effect of SWIZ_BITS can be thought of as "2^SWIZ_BITS is the number of unique oids that be generated" (This concept is limited to frontswap's use of tmem). Acked-by: Seth Jennings <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08zcache: fix deadlock conditionDan Magenheimer1-4/+3
I discovered this deadlock condition awhile ago working on RAMster but it affects zcache as well. The list spinlock must be locked prior to the page spinlock and released after. As a result, the page copy must also be done while the locks are held. Applies to 3.2. Konrad, please push (via GregKH?)... this is definitely a bug fix so need not be pushed during a -rc0 window. Signed-off-by: Dan Magenheimer <[email protected]> Acked-by: Konrad Rzeszutek Wilk <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: drm/omap: fix locking issueRob Clark1-4/+14
The create/free mmap offset code must be synchronized. Yet only some callers of omap_gem_mmap_offset() held struct_mutex. Leading to various crashes around drm_mm_insert_helper_range(). (In the free-object path, which is currently the only place we drm_gem_free_mmap_offset(), struct_mutex is already held.) Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08drivers/staging/omapdrm/omap_fbdev.c: move free after usesJulia Lawall1-2/+2
Move the free after the final uses. The semantic patch that makes this report is available in scripts/coccinelle/free/kfree.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: drm/omap: fix minimum width/heightRob Clark1-2/+2
Fix minimum width/height so planes could be used to implement hw mouse cursor. Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: drm/omap: updates for DSS fifomerge API changesRob Clark3-10/+31
Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: drm/omap: multiplanar and YUV supportRob Clark5-68/+149
Add support in framebuffer objects for other color formats and multi- planar YUV (NV12). Since this requires changing the API between the plane and fb for getting scanout information (paddr, etc), take advantage of the opportunity and put in place a way to allow fb's to be unpinned when they are not being scanned out. Now, before start of scanout the plane calls omap_framebuffer_pin() which takes care to pin all the backing bo's, then omap_framebuffer_update_scanout() however many times to update the scanout address(es), etc, and then when finished omap_framebuffer_unpin(). Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: drm/omap: add drm_plane supportRob Clark6-168/+403
Because framebuffer layer and overlay scanout video pipes are basically thing in OMAP display subsystem (the only difference being that the first video pipe does not support scaling or YUV formats), much of the CRTC code is pulled into the plane implementation, and a private plane object is used by the CRTC object. This avoids code duplication between the plane and CRTC. Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: drm/omap: drm API update: addfb2Rob Clark3-45/+143
Update to reflect changes in: "drm: add an fb creation ioctl that takes a pixel format v5" Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: drm/omap: drm API update: make fops struct constRob Clark1-11/+13
Update to reflect changes in: "Make the per-driver file_operations struct const" Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08staging: delete gma500 driverGreg Kroah-Hartman78-30778/+0
It's now "properly" merged into the DRM tree in the kernel, so delete the staging version of the driver as it is far obsolete and broken. Requested-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-02-08drm/i915: fixup interlaced bits clearing in PIPECONF on PCH_SPLIT (v2)Keith Packard1-2/+4
An identical patch has been merged for i9xx_crtc_mode_set: Commit 59df7b1771c150163e522f33c638096ab0efbf42 Author: Christian Schmidt <[email protected]> Date: Mon Dec 19 20:03:33 2011 +0100 drm/intel: Fix initialization if startup happens in interlaced mode [v2] But that one neglected to fix up the ironlake+ path. This should fix the issue reported by Alfonso Fiore where booting with only a HDMI cable connected to his TV failed to display anything. The issue is that the bios set up things for 1080i and used the pannel fitter to scale up the lower progressive resolutions. We failed to clear the interlace bit in the PIPEACONF register, resulting in havoc. v2: Be more paranoid and just unconditionally clear the field before setting new values. Cc: Peter Ross <[email protected]> Cc: Alfonso Fiore <[email protected]> Signed-Off-by: Daniel Vetter <[email protected]> Signed-off-by: Keith Packard <[email protected]>
2012-02-08loop: zero fill bio instead of return -EIO for partial readDave Young1-11/+13
commit 8268f5a741 ("deny partial write for loop dev fd") tried to fix the loop device partial read information leak problem. But it changed the semantics of read behavior. When we read beyond the end of the device we should get 0 bytes, which is normal behavior, we should not just return -EIO Instead of returning -EIO, zero out the bio to avoid information leak in case of partail read. Signed-off-by: Dave Young <[email protected]> Reviewed-by: Jeff Moyer <[email protected]> Tested-by: Jeff Moyer <[email protected]> Cc: Dmitry Monakhov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2012-02-08Merge branch 'master' of ↵John W. Linville9-16/+45
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
2012-02-08floppy: Fix a crash during rmmodVivek Goyal1-0/+9
floppy driver does not call add_disk() on all the drives hence we don't take gendisk reference on request queue for these drives. Don't call put_disk() with disk->queue set, otherwise we try to put the reference we never took. Reported-and-tested-by: Dirk Gouders <[email protected]> Signed-off-by: Vivek Goyal<[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2012-02-08floppy: Cleanup disk->queue before caling put_disk() if add_disk() was never ↵Vivek Goyal1-1/+7
called add_disk() takes gendisk reference on request queue. If driver failed during initialization and never called add_disk() then that extra reference is not taken. That reference is put in put_disk(). floppy driver allocates the disk, allocates queue, sets disk->queue and then relizes that floppy controller is not present. It tries to tear down everything and tries to put a reference down in put_disk() which was never taken. In such error cases cleanup disk->queue before calling put_disk() so that we never try to put down a reference which was never taken in first place. Reported-and-tested-by: Suresh Jayaraman <[email protected]> Tested-by: Dirk Gouders <[email protected]> Signed-off-by: Vivek Goyal <[email protected]> Acked-by: Tejun Heo <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2012-02-08cdrom: move shared static to cdrom_device_infoPaolo Bonzini1-7/+5
The keeplocked variable in the cdrom driver is shared across multiple drives, but set in per-device ioctls. Move it to the per-device struct, avoiding that the setting on one drive affects the driver's behavior when closing another. [ Impact: limit udev's confusion to one drive when a CD burning program unlocks the CD door at the end of burning. ] Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2012-02-08drm/i915: no lvds quirk for AOpen MP45Daniel Vetter1-0/+8
According to a bug report, it doesn't have one. Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44263 Acked-by: Chris Wilson <[email protected]> Signed-Off-by: Daniel Vetter <[email protected]> Signed-off-by: Keith Packard <[email protected]>
2012-02-07Merge tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6Linus Torvalds11-14/+80
fbdev fixes for 3.3 It includes: - compile fix for fsl-diu-fb - fix for a suspend/resume issue in atmel_lcdfb - fix for a suspend/resume issue in OMAP - workaround for a hardware bug to avoid physical damage in OMAP - really trivial dead code removal in intelfb * tag 'fbdev-fixes-for-3.3-1' of git://github.com/schandinat/linux-2.6: atmel_lcdfb: fix usage of CONTRAST_CTR in suspend/resume intelfb: remove some dead code drivers/video: compile fixes for fsl-diu-fb.c OMAPDSS: HDMI: PHY burnout fix OMAP: 4430SDP/Panda: add HDMI HPD gpio OMAP: 4430SDP/Panda: setup HDMI GPIO muxes OMAPDSS: remove wrong HDMI HPD muxing OMAP: 4430SDP/Panda: rename HPD GPIO to CT_CP_HPD OMAP: 4430SDP/Panda: use gpio_free_array to free HDMI gpios OMAPDSS: use sync versions of pm_runtime_put
2012-02-07Merge tag 'ib-srpt-fixes' of ↵Linus Torvalds2-11/+7
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband Cleanups and error path fixes for the new SRP (SCSI RDMA protocol) target. * tag 'ib-srpt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/srpt: Don't return freed pointer from srpt_alloc_ioctx_ring() IB/srpt: Fix ERR_PTR() vs. NULL checking confusion IB/srpt: Remove unneeded <linux/version.h> include IB/srpt: Use ARRAY_SIZE() instead of open-coding IB/srpt: Use DEFINE_SPINLOCK()/LIST_HEAD()
2012-02-07ACPI: remove duplicated lines of merging problems with acpi_processor_addYinghai Lu1-7/+0
Those lines have two copies. Signed-off-by: Yinghai Lu <[email protected]> Cc: Thomas Renninger <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-02-07Merge branch 'upstream-fixes' of ↵Linus Torvalds4-7/+9
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: wiimote: fix invalid power_supply_powers call HID: wacom: Fix invalid power_supply_powers calls HID: hyperv: Properly disconnect the input device HID: usbhid: fix dead lock between open and disconect
2012-02-07Merge branch 'for-linus' of ↵Linus Torvalds1-51/+77
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: mfd: Avoid twl6040-codec PLL reconfiguration when not needed mfd: Store twl6040-codec mclk configuration
2012-02-07zd1211rw: firmware needs duration_id set to zero for non-pspoll framesTomas Vanek1-0/+8
Some devices (iwl5100) cannot connect to zd1211rw based AP. It appears that zd1211 firmware messes up duration_id field if it is not set to zero by driver. Sniffing traffic shows that zd1211 is transmitting frames with duration_id bits 14 and 15 set and other bits appearing random. Setting duration_id at driver to zero results zd1211 outputting sane duration_id. This means that firmware is setting correct values itself and expects duration_id to be zero in first place. Looking at vendor driver shows that only PSPoll frames have duration_id set by driver, for other frames duration_id left zero. Original bug-report and attached patch at: http://sourceforge.net/mailarchive/message.php?msg_id=28759111 Reported-by: Tomas Vanek <[email protected]> [modified original patch from bug-report, added check for pspoll frame] Signed-off-by: Jussi Kivilinna <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-07net: enable TC35815 for MIPS againAtsushi Nemoto1-1/+1
8<---------------------------------------------------------------------- From: Ralf Roesch <[email protected]> Date: Wed, 16 Nov 2011 09:33:50 +0100 Subject: [PATCH] net: enable TC35815 for MIPS again TX493[8,9] MIPS SoCs support 2 Ethernet channels of type TC35815 which are connected to the internal PCI controller. And JMR3927 MIPS board has a TC35815 chip on board. These dependencies were lost on movement to drivers/net/ethernet/toshiba. Signed-off-by: Ralf Roesch <[email protected]> Signed-off-by: Atsushi Nemoto <[email protected]> CC: [email protected] [3.2+] Signed-off-by: David S. Miller <[email protected]>
2012-02-07net: sh_eth: fix skb_over_panic happenYoshihiro Shimoda2-4/+3
When this GETHER controller received a large frame (about 1800 bytes or more), skb_over_panic() happened. This is because the previous driver set the RFLR to 0x1000 (4096 bytes) and the skb allocate size is smaller than 4096 bytes. So, the controller accepted such a frame. The controller can discard a large frame by the RFLR setting. So, the patch modifies the value of RFLR to mtu + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN. Signed-off-by: Yoshihiro Shimoda <[email protected]> Cc: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-07bnx2x: Fix mem leak in bnx2x_tpa_stop() if build_skb() fails.Jesper Juhl1-2/+1
We allocate memory for 'new_data' with kmalloc(). If we get the memory we then try to build_skb() and if that should fail (which it can) we do not enter 'if (likely(skb)) {' and actually use 'new_data' but instead fall through to the 'drop:' label and end up returning from the function without ever assigning 'new'data' to anything or freeing it. That leaks the memory allocated to 'new_data'. This patch fixes the memory leak by doing a kfree(new_data) in the case where build_skb() fails (or where allocation of 'new_data' itself fails, but in taht case it's just a harmless kfree(NULL)). Signed-off-by: Jesper Juhl <[email protected]> Acked-by: Eric Dumazet <[email protected]> Acked-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-07CONFIG_TR/CONFIG_LLC: work around the problem with selectAl Viro1-1/+4
As it is, with PCI/ISA/MCA/CCW all set to n and PCMCIA set to m setting TR to y will set LLC to m, with very unpleasant results - net/802/psnap gets picked into obj-y, resulting in the kernel that won't link - psnap calls functions from llc. The cause, AFAICS, is that kconfig gets rev_dep for LLC containing || TR && (deps for TR) and even though TR is boolean, both LLC and PCMCIA are tristate and that thing becomes || y && (n || m), i.e. || m. The reason for dependency on PCMCIA is that when none of PCI, ISA, MCA, CCW or PCMCIA is set there'll be no tokenring drivers, so there's no point building tokenring core. Proper fix probably belongs in kconfig (we need strict and, such that y <strict_and> m would be y, so that rev_deps added for tristate selected by bool would use that instead of &&; we'd have || TR <strict_and> (deps for TR) in this case), but it's a rather intrusive change. There's an easy workaround in case of TR -> LLC select, namely to have a def_bool y symbol sitting under if TR and have that symbol selecting LLC. Kudos to johill for suggesting that one... Signed-off-by: Al Viro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-07Revert "skge: check for PCI dma mapping errors"stephen hemminger1-58/+13
As reported by several people... The code in rx_clean was panic'ing so revert commit d0249e44432aa0ffcf710b64449b8eaa3722547e. Will redo DMA mapping checks as new patches for a later release. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-07HID: wiimote: fix invalid power_supply_powers callJiri Kosina1-2/+2
Analogically to d7cb3dbd1 ("HID: wacom: Fix invalid power_supply_powers calls"), fix also the same occurence in wiimote driver. Reported-by: [email protected] Signed-off-by: Jiri Kosina <[email protected]>
2012-02-07mtip32xx: removed the irrelevant argument of mtip_hw_submit_io() and the ↵Asai Thambi S P2-11/+5
unused member of struct driver_data Removed the following: * irrelevant argument 'barrier' of mtip_hw_submit_io() * unused member 'eh_active' of struct driver_data Signed-off-by: Asai Thambi S P <[email protected]> Signed-off-by: Sam Bradshaw <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2012-02-07target: Fix unsupported WRITE_SAME sense payloadMartin Svec1-3/+3
This patch fixes a bug in target-core where unsupported WRITE_SAME ops from a target_check_write_same_discard() failure was incorrectly returning CHECK_CONDITION w/ TCM_INVALID_CDB_FIELD sense data. This was causing some clients to not properly fall back, so go ahead and use the correct TCM_UNSUPPORTED_SCSI_OPCODE sense for this case. Reported-by: Martin Svec <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>