`comedi_alloc_board_minor()` is called for both reserved "legacy"
devices created during module initialization, and for dynamically
created devices (via `comedi_auto_config()`). All the minor device
numbers from 0 to `comedi_num_legacy_minors - 1` are for legacy devices
and all those from `comedi_num_legacy_minors` to
`COMEDI_NUM_BOARD_MINORS - 1` are for dynamically created devices.
`comedi_release_hardware_device()` is called (via
`comedi_auto_unconfig()`) when a dynamically created device is being
removed. It needs to search the table of minor device numbers to see
which one is associated with the hardware device. It currently starts
the search at minor device number 0. Change it to start from
`comedi_num_legacy_minors` to skip over those belonging to legacy
devices. Also change `comedi_alloc_board_minor()` to skip the legacy
devices when searching for a free minor device number for the
dynamically created device. (The validity of the `hardware_device`
parameter is used to distinguish the legacy devices from the dynamically
created ones.)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 4 Apr 2013 13:58:51 +0000 (14:58 +0100)]
staging: comedi: pre-lock mutex on creation of comedi device
Return from `comedi_alloc_board_minor()` with the mutex of the created
`struct comedi_device` pre-locked. This allows further initialization
by the caller without the worry of something getting in there first.
`comedi_auto_config()` no longer needs to check if the device is already
"attached" since whatever was trying to attach the device would need to
have locked the mutex first.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 4 Apr 2013 13:58:50 +0000 (14:58 +0100)]
staging: comedi: change comedi_alloc_board_minor() to return pointer
Change `comedi_alloc_board_minor()` to return a pointer to the allocated
`struct comedi_device` instead of a minor device number. Return an
`ERR_PTR()` value on error instead of a negative error number. This
saves a call to `comedi_dev_from_minor()` in `comedi_auto_config()`.
Also change it to use a local variable `dev` to hold the pointer to the
`struct comedi_device` instead of using `info->device` all the time.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 4 Apr 2013 13:58:48 +0000 (14:58 +0100)]
staging: comedi: call comedi_release_hardware_device() on error
If `comedi_auto_config()` fails after allocating the minor device, call
`comedi_release_hardware_device()` instead of
`comedi_free_board_minor()` to free the minor device. That's the same
call that `comedi_auto_unconfig()` uses, and is slightly safer as it
checks the minor device number is still tied to the same hardware
device.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add `comedi_release_hardware_device()` as a replacement for the call
sequence `comedi_find_board_minor()`, `comedi_free_board_minor()`. This
is slightly safer as we can make sure nothing funny happens to the found
`comedi_file_info_table[]` entry in the middle of the sequence. Change
`comedi_auto_unconfig()` to call the new function instead of the old
sequence. Remove `comedi_find_board_minor()` as it has no other
callers.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Split out the part of `comedi_free_board_minor()` that clears the
`comedi_file_info_table[]` element into new function
`comedi_clear_minor()`. Split out the remainder of the original
function into new function `comedi_free_board_file_info()`.
Also re-use a call to `comedi_clear_minor()` in
`comedi_free_subdevice_minor()` instead of doing the same thing inline.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 4 Apr 2013 13:58:45 +0000 (14:58 +0100)]
staging: comedi: adjust module count on device cleanup
`comedi_device_cleanup()` is called just before freeing a comedi device.
It is possible for the device to still be open in which case the module
reference counts for the core comedi module and possibly the low-level
driver module will remain out of whack because `comedi_close()` will not
find the comedi device and so will not decrement the module counts.
This really needs to be handled better, but for now decrement the module
counts in `comedi_device_cleanup()` according to the number of
outstanding opens.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 4 Apr 2013 13:58:44 +0000 (14:58 +0100)]
staging: comedi: remove memset() call from comedi_device_init()
`comedi_device_init()` is only called from one place
(`comedi_alloc_board_minor()`) and the `struct comedi_device` has
already been zeroed out by `kzalloc()`. Don't bother zeroing it out
again with `memset()`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Thu, 4 Apr 2013 13:58:43 +0000 (14:58 +0100)]
staging: comedi: no need to zero out comedi_file_info_table[]
In the comedi core module, `comedi_file_info_table[]` is tentatively
defined in the .bss section, so will already be zeroed out on
initialization. Don't bother zeroing it out again in the module
initialization function `comedi_init()`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: dgrp: implement error handling in dgrp_create_class_sysfs_files()
There is no any error handling in dgrp_create_class_sysfs_files().
The patch adds code to check return values and propagate them to dgrp_init_module().
Found by Linux Driver Verification project (linuxtesting.org).
Kurt Kanzenbach [Thu, 4 Apr 2013 14:03:16 +0000 (16:03 +0200)]
staging: usbip: userspace: show product name in `list -l' command
The `usbip list -l' command shows your local usb-devices.
Example:
$ usbip list -l
$ Local USB devices
$ =================
$ - busid 1-1 (13fe:1d00)
$ 1-1:1.0 -> usb-storage
$
$ - busid 1-2 (0409:55aa)
$ 1-2:1.0 -> hub
However this list command doesn't show which device is connected
to this busid. Therefore you have to use another tool e.g. lsusb
to determine that.
This patches adds the possibility to see which device that is.
Example:
$ usbip list -l
$ Local USB devices
$ =================
$ - busid 1-1 (13fe:1d00)
$ Kingston Technology Company Inc. : DataTraveler 2.0 1GB/4GB Flash Drive / Patriot Xporter 4GB Flash
$ 1-1:1.0 -> usb-storage
$
$ - busid 1-2 (0409:55aa)
$ NEC Corp. : Hub (0409:55aa)
$ 1-2:1.0 -> hub
If parsable is specified the info will be not printed.
Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de> Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kurt Kanzenbach [Thu, 4 Apr 2013 14:03:15 +0000 (16:03 +0200)]
staging: usbip: userspace: unified command line arguments
The command `usbip attach' uses --host for specifing
the remote host, while `usbip list' uses --remote.
This is confusing and this patch adapts this.
In Addition changed the manpage and README accordingly.
Since the names.c/names.h are taken from another project, some
functions which names.c provides aren't used by usbipd.
This patch fixes:
- removed useless comments
- unified debug/error messages by using the macros
provided by usbip_common.h
- removed unnused code
The code cleanup includes:
- remove unused data structures
- remove code to create them
- remove code to access them
The file names.c is used to parse the `usb.ids' file. The parser
stores a lot of information about usb devices that is never used.
The `usb.ids' file has several sections. Some variables (like
`lasthut') store the ID of the current section, and those variables
are used to decide which section is currently being parsed (i.e. in
which data structure the current line will be stored).
We removed the code to read those IDs because they are never used
anyway. We replaced them by the pseudo-ID `1' (instead of reading the
ID from the file) to indicate that the parser is in a section that
can be ignored. If the parser is in such a section, the current line
(which contains sub-items for this section) is discarded.
Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de> Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kurt Kanzenbach [Thu, 4 Apr 2013 14:03:11 +0000 (16:03 +0200)]
staging: usbip: simplified cleanup function
This patch simplified "stub_device_free" cleanup function:
- changed return type to void, since the return value is
not checked anywhere
- kfree is NULL-safe, so removed if statement
- deleted debug-message
Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de> Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kurt Kanzenbach [Thu, 4 Apr 2013 14:03:08 +0000 (16:03 +0200)]
staging: usbip: simplified errorhandling
In each errorcase spin_unlock_irq is called and -EINVAL is returned.
To simplify that I created a label called "err" doing that.
On Success count will be returned.
Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de> Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan Reif [Thu, 4 Apr 2013 14:03:02 +0000 (16:03 +0200)]
staging: usbip: userspace: libsrc: replace numbers by ascii
replace numbers in code by ascii text constants as suggested
by Dan Carpenter:
http://driverdev.linuxdriverproject.org/pipermail/devel/2013-February/035907.html
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Thu, 4 Apr 2013 06:31:24 +0000 (09:31 +0300)]
staging: csr: info leak in unifi_cfg_get_info()
"cfg_ap_config" has a number of fields which are not cleared before we
copy them to the user. I've added a memset() at the beginning to set
everything to zero.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rename the CamelCase struct rtdBoard to rtd_boardinfo. Also, rename the
range10Start and rangeUniStart variables in the struct to range_bip10
and range_uni10.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add a local variable to make this function a bit cleaner and
remove the unnecessary comments.
The comedi core expects this function to return the number of
data parameters used. Change the return from '1' to 'insn->n'
to make this more apparent.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wanpeng Li [Wed, 3 Apr 2013 10:16:21 +0000 (18:16 +0800)]
staging: zcache: fix static variables defined in debug.h but used in mutiple C files
After commit 95bdaee214 ("zcache: Move debugfs code out of zcache-main.c file")
be merged, most of knods in zcache debugfs just export zero since these variables
are defined in debug.h but are in use in multiple C files zcache-main.c and debug.c,
in this case variables can't be treated as shared variables.
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wanpeng Li [Tue, 2 Apr 2013 02:46:17 +0000 (10:46 +0800)]
staging: zcache: fix zcache writeback in debugfs
commit 9c0ad59ef ("zcache/debug: Use an array to initialize/use debugfs attributes")
use an array to initialize/use debugfs attributes, .name = #x, .val = &zcache_##x.
For zcache writeback, this commit set .name = zcache_outstanding_writeback_pages and
.name = zcache_writtenback_pages seperately, however, corresponding .val =
&zcache_zcache_outstanding_writeback_pages and .val = &zcache_zcache_writtenback_pages,
which are not correct.
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wanpeng Li [Tue, 2 Apr 2013 02:46:16 +0000 (10:46 +0800)]
staging: zcache: fix pers_pageframes|_max aren't exported in debugfs
Before commit 9c0ad59ef ("zcache/debug: Use an array to initialize/use
debugfs attributes"), pers_pageframes|_max are exported in debugfs, but
this commit forgot use array export pers_pageframes|_max. This patch add
pers_pageframes|_max back.
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wanpeng Li [Tue, 2 Apr 2013 02:46:15 +0000 (10:46 +0800)]
staging: zcache: handle zcache_[eph|pers]_zpages for zero-filled page
Increment/decrement zcache_[eph|pers]_zpages for zero-filled pages,
the main point of the counters for zpages and pageframes is to be
able to calculate density == zpages/pageframes. A zero-filled page
becomes a zpage that "compresses" to zero bytes and, as a result,
requires zero pageframes for storage. So the zpages counter should
be increased but the pageframes counter should not.
[Dan Magenheimer <dan.magenheimer@oracle.com>: patch description] Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wanpeng Li [Tue, 2 Apr 2013 02:46:14 +0000 (10:46 +0800)]
staging: zcache: zero-filled pages awareness
Compression of zero-filled pages can unneccessarily cause internal
fragmentation, and thus waste memory. This special case can be
optimized.
This patch captures zero-filled pages, and marks their corresponding
zcache backing page entry as zero-filled. Whenever such zero-filled
page is retrieved, we fill the page frame with zero.
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bob Liu [Tue, 2 Apr 2013 02:47:43 +0000 (10:47 +0800)]
drivers: staging: zcache: fix compile warning
Fix below compile warning:
staging/zcache/zcache-main.c: In function ‘zcache_autocreate_pool’:
staging/zcache/zcache-main.c:1393:13: warning: ‘cli’ may be used uninitialized
in this function [-Wuninitialized]
Signed-off-by: Bob Liu <bob.liu@oracle.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bob Liu [Tue, 2 Apr 2013 02:47:42 +0000 (10:47 +0800)]
drivers: staging: zcache: fix compile error
Because 'ramster_debugfs_init' is not defined if !CONFIG_DEBUG_FS, there is
compile error:
$ make drivers/staging/zcache/
staging/zcache/ramster/ramster.c: In function ‘ramster_init’:
staging/zcache/ramster/ramster.c:981:2: error: implicit declaration of
function ‘ramster_debugfs_init’ [-Werror=implicit-function-declaration]
This patch fix it and reduce some #ifdef CONFIG_DEBUG_FS in .c files the same
way.
Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Bob Liu <bob.liu@oracle.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Merge tag 'iio-for-3.10c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Third round of IIO cleanups, graduations and new stuff for the 3.10 cycle.
A small set including 3 things.
1) A short cleanup series for the ak8975.
2) Graduation of ak8975 out of staging.
3) Some additional bits for the at91 adc driver to cover low resolution
modes, sleep and a little bit of missing documentation.
On the at91_adc a minimal Sample and Hold Time is necessary for the ADC to
guarantee the best converted final value between two channels selection.
This time has to be programmed through the bitfield SHTIM in the
Mode Register ADC_MR.
at91 adc offers the choice between two resolutions: low and high.
The low and high resolution values depends on adc IP version, as many IP
properties have been exposed through device tree, these settings have also
been added to the dt bindings.
Jonathan Cameron [Sun, 24 Mar 2013 16:58:00 +0000 (16:58 +0000)]
staging:iio:magnetometer:ak8975 use standard i2c_smbus read functions.
Now the mysterious NOSTART flag is gone from the read, we can use the
i2c_smbus_read_byte/word/i2c_block_data functions instead of the
local reimplementation of these standard functions.
Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Jonathan Cameron [Sun, 24 Mar 2013 16:58:00 +0000 (16:58 +0000)]
staging:iio:magnetometer:ak8975 drop I2C_M_NOSTART flag in read_data
This flag makes no sense whatsoever where it is.
Documentation/i2c/i2c-protocol states:
If you set the I2C_M_NOSTART variable for the first partial message,
we do not generate Addr, but we do generate the startbit S. This will
probably confuse all other clients on your bus, so don't try this.
This is exactly what is going on here. Likelihood given that the
driver never checked for this protocol mangling being available is that
it wasn't present on the test boards and hence this flag was simply
ignored. No indication of why it would be necessary has been found in
the datasheets.
Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
staging: ti-soc-thermal:Introduce ti_bandgap_get_trend function for OMAP5
The patch adds ti_bandgap_get_trend function. This is specific
to OMAP5 for now it computes the trend from the temp values stored
in the hardware history buffer.
Formula: (T1 - T2) / P.
Where:
T1: Last read valid temperature.
T2: Last but one read valid temperature.
P: Update Interval.
staging: ti-soc-thermal: Modify update_interval r/w functions to incorporate the OMAP5 feature of COUNTER_DELAY.
Update ti_bandgap_write_update_interval and ti_bandgap_read_update_interval
functions to incorporate the OMAP5 feature of COUNTER_DELAY. The way we
program the delay between two successive temperature conversions
is different for OMAP5 as when compared with OMAP4. Incorporating
the changes required to program the delay for OMAP5.
staging: ti-soc-thermal: report alert events on OMAP5 devices
OMAP5430 devices have the capability to generate
alert temperature. Thus, whenever a T_ALERT IRQ is served,
the ti-bandgap will call .report_temperature to notify the
thermal framework about thermal zone update request.
This patch allows OMAP5430 devices to notify
the thermal framework about T_ALERT events.
staging: ti-soc-thermal: report alert events on OMAP4 devices
OMAP4460 and OMAP4470 devices have the capability to generate
alert temperature. Thus, whenever a T_ALERT IRQ is served,
the ti-bandgap will call .report_temperature to notify the
thermal framework about thermal zone update request.
This patch allows OMAP4460 and OMAP4470 devices to notify
the thermal framework about T_ALERT events.
Whenever a sensor has an alert to be reported to the thermal framework,
it can use the report ti_thermal_report_temperature helper. This patch
expose this function so that bandgap data config declarations could use it.
Linus Torvalds [Sun, 31 Mar 2013 18:41:47 +0000 (11:41 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dmaengine fixes from Vinod Koul:
"Two fixes for slave-dmaengine.
The first one is for making slave_id value correct for dw_dmac and
the other one fixes the endieness in DT parsing"
* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
dw_dmac: adjust slave_id accordingly to request line base
dmaengine: dw_dma: fix endianess for DT xlate function
Linus Torvalds [Sun, 31 Mar 2013 18:40:33 +0000 (11:40 -0700)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
"For a some fixes for Kernel 3.9:
- subsystem build fix when VIDEO_DEV=y, VIDEO_V4L2=m and I2C=m
- compilation fix for arm multiarch preventing IR_RX51 to be selected
- regression fix at bttv crop logic
- s5p-mfc/m5mols/exynos: a few fixes for cameras on exynos hardware"
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] [REGRESSION] bt8xx: Fix too large height in cropcap
[media] fix compilation with both V4L2 and I2C as 'm'
[media] m5mols: Fix bug in stream on handler
[media] s5p-fimc: Do not attempt to disable not enabled media pipeline
[media] s5p-mfc: Fix encoder control 15 issue
[media] s5p-mfc: Fix frame skip bug
[media] s5p-fimc: send valid m2m ctx to fimc_m2m_job_finish
[media] exynos-gsc: send valid m2m ctx to gsc_m2m_job_finish
[media] fimc-lite: Fix the variable type to avoid possible crash
[media] fimc-lite: Initialize 'step' field in fimc_lite_ctrl structure
[media] ir: IR_RX51 only works on OMAP2
Linus Torvalds [Sun, 31 Mar 2013 18:38:59 +0000 (11:38 -0700)]
Merge tag 'for-linus-20130331' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
"Alright, this time from 10K up in the air.
Collection of fixes that have been queued up since the merge window
opened, hence postponed until later in the cycle. The pull request
contains:
- A bunch of fixes for the xen blk front/back driver.
- A round of fixes for the new IBM RamSan driver, fixing various
nasty issues.
- Fixes for multiple drives from Wei Yongjun, bad handling of return
values and wrong pointer math.
- A fix for loop properly killing partitions when being detached."
* tag 'for-linus-20130331' of git://git.kernel.dk/linux-block: (25 commits)
mg_disk: fix error return code in mg_probe()
rsxx: remove unused variable
rsxx: enable error return of rsxx_eeh_save_issued_dmas()
block: removes dynamic allocation on stack
Block: blk-flush: Fixed indent code style
cciss: fix invalid use of sizeof in cciss_find_cfgtables()
loop: cleanup partitions when detaching loop device
loop: fix error return code in loop_add()
mtip32xx: fix error return code in mtip_pci_probe()
xen-blkfront: remove frame list from blk_shadow
xen-blkfront: pre-allocate pages for requests
xen-blkback: don't store dev_bus_addr
xen-blkfront: switch from llist to list
xen-blkback: fix foreach_grant_safe to handle empty lists
xen-blkfront: replace kmalloc and then memcpy with kmemdup
xen-blkback: fix dispatch_rw_block_io() error path
rsxx: fix missing unlock on error return in rsxx_eeh_remap_dmas()
Adding in EEH support to the IBM FlashSystem 70/80 device driver
block: IBM RamSan 70/80 error message bug fix.
block: IBM RamSan 70/80 branding changes.
...
Commit 6aa9707099c4 ("lockdep: check that no locks held at freeze time")
causes problems with NFS root filesystems. The failures were noticed on
OMAP2 and 3 boards during kernel init:
[ BUG: swapper/0/1 still has locks held! ] 3.9.0-rc3-00344-ga937536 #1 Not tainted
-------------------------------------
1 lock held by swapper/0/1:
#0: (&type->s_umount_key#13/1){+.+.+.}, at: [<c011e84c>] sget+0x248/0x574
Pull SCSI target fixes from Nicholas Bellinger:
"This includes the bug-fix for a >= v3.8-rc1 regression specific to
iscsi-target persistent reservation conflict handling (CC'ed to
stable), and a tcm_vhost patch to drop VIRTIO_RING_F_EVENT_IDX usage
so that in-flight qemu vhost-scsi-pci device code can detect the
proper vhost feature bits.
Also, there are two more tcm_vhost patches still being discussed by
MST and Asias for v3.9 that will be required for the in-flight qemu
vhost-scsi-pci device patch to function properly, and that should
(hopefully) be the last target fixes for this round."
* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case
tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit
Andy Shevchenko [Wed, 20 Feb 2013 11:52:17 +0000 (13:52 +0200)]
dw_dmac: adjust slave_id accordingly to request line base
On some hardware configurations we have got the request line with the offset.
The patch introduces convert_slave_id() helper for that cases. The request line
base is came from the driver data provided by the platform_device_id table.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Arnd Bergmann [Sun, 3 Mar 2013 20:51:28 +0000 (20:51 +0000)]
dmaengine: dw_dma: fix endianess for DT xlate function
As reported by Wu Fengguang's build robot tracking sparse warnings, the
dma_spec arguments in the dw_dma_xlate are already byte swapped on
little-endian platforms and must not get swapped again. This code is
currently not used anywhere, but will be used in Linux 3.10 when the
ARM SPEAr platform starts using the generic DMA DT binding.
The Adam Belay's e-mail address in MAINTAINERS under PNP SUPPORT
is not valid any more and I started to maintain that code in the
meantime as a matter of fact, so list myself as a maintainer of it
along with Bjorn and remove the Adam's entry from it.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alex Elder [Wed, 27 Mar 2013 14:16:30 +0000 (09:16 -0500)]
rbd: don't zero-fill non-image object requests
A result of ENOENT from a read request for an object that's part of
an rbd image indicates that there is a hole in that portion of the
image. Similarly, a short read for such an object indicates that
the remainder of the read should be interpreted a full read with
zeros filling out the end of the request.
This behavior is not correct for objects that are not backing rbd
image data. Currently rbd_img_obj_request_callback() assumes it
should be done for all objects.
Change rbd_img_obj_request_callback() so it only does this zeroing
for image objects. Encapsulate that special handling in its own
function. Add an assertion that the image object request is a bio
request, since we assume that (and we currently don't support any
other types).
This resolves a problem identified here:
http://tracker.ceph.com/issues/4559
Linus Torvalds [Fri, 29 Mar 2013 18:13:25 +0000 (11:13 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
"We've had a busy two weeks of bug fixing. The biggest patches in here
are some long standing early-enospc problems (Josef) and a very old
race where compression and mmap combine forces to lose writes (me).
I'm fairly sure the mmap bug goes all the way back to the introduction
of the compression code, which is proof that fsx doesn't trigger every
possible mmap corner after all.
I'm sure you'll notice one of these is from this morning, it's a small
and isolated use-after-free fix in our scrub error reporting. I
double checked it here."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: don't drop path when printing out tree errors in scrub
Btrfs: fix wrong return value of btrfs_lookup_csum()
Btrfs: fix wrong reservation of csums
Btrfs: fix double free in the btrfs_qgroup_account_ref()
Btrfs: limit the global reserve to 512mb
Btrfs: hold the ordered operations mutex when waiting on ordered extents
Btrfs: fix space accounting for unlink and rename
Btrfs: fix space leak when we fail to reserve metadata space
Btrfs: fix EIO from btrfs send in is_extent_unchanged for punched holes
Btrfs: fix race between mmap writes and compression
Btrfs: fix memory leak in btrfs_create_tree()
Btrfs: fix locking on ROOT_REPLACE operations in tree mod log
Btrfs: fix missing qgroup reservation before fallocating
Btrfs: handle a bogus chunk tree nicely
Btrfs: update to use fs_state bit
Len Brown [Fri, 29 Mar 2013 18:02:30 +0000 (11:02 -0700)]
ia64 idle: delete stale (*idle)() function pointer
Commit 3e7fc708eb41 ("ia64 idle: delete pm_idle") in 3.9-rc1 didn't
finish the job, leaving an un-initialized reference to (*idle)().
[ Haven't seen a crash from this - but seems like we are just being
lucky that "idle" is zero so it does get initialized before we jump to
randomland - Len ]
Reported-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>