Mikhail Pershin [Mon, 9 Dec 2013 14:56:56 +0000 (22:56 +0800)]
staging/lustre/target: move OUT to the unified target code
- Move OUT handler to the unified target code, so it can be
used by both MDS and OST.
Lustre-change: http://review.whamcloud.com/6763
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3467 Signed-off-by: Mikhail Pershin <mike.pershin@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
[pick client side of change. target is mostly server side code -- PengTao] Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This change adds a priority parameter to the route module settings.
This paramter can be >= 0. Like hops, the lower the prioirty number
the higher the priority. So lower numbered priorities will be
selected over higher numbers.
Lustre-change: http://review.whamcloud.com/5663
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2934 Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Amir Shehata <amir.shehata@intel.com> Reviewed-by: Isaac Huang <he.huang@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Minchan Kim [Wed, 11 Dec 2013 02:04:36 +0000 (11:04 +0900)]
zsmalloc: add Kconfig for enabling page table method
Zsmalloc has two methods 1) copy-based and 2) pte based to
access objects that span two pages.
You can see history why we supported two approach from [1].
But it was bad choice that adding hard coding to select arch
which want to use pte based method because there are lots of
SoC in an architecure and they can have different cache size,
CPU speed and so on so it would be better to expose it to user
as selectable Kconfig option like Andrew Morton suggested.
[1] https://lkml.org/lkml/2012/7/11/58
Acked-by: Nitin Gupta <ngupta@vflare.org> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
No one seems to be working on it anymore, and it really should be merged
into the already-existing btusb driver. Also, there is not any proper
author attribution on the code (it was copied from the in-kernel
driver...)
If someone wants to pick this back up, we can easily revert this, but
for now, delete the driver.
Cc: Yu-Chen, Cho <acho@suse.com> Cc: Jay Hung <jay.hung@mediatek.com> Cc: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nick Hudson [Fri, 6 Dec 2013 22:01:44 +0000 (14:01 -0800)]
staging: dwc2: don't issue traffic to LS devices in FS mode
I fell over the problem reported in
https://github.com/raspberrypi/linux/pull/390:
"Issuing low-speed packets when the root port is in full-speed mode
causes the root port to stop responding. Explicitly fail when
enqueuing URBs to a LS endpoint on a FS bus."
with my dwc2 testing in NetBSD, so I adapted the change to dwc2.
Signed-off-by: Nick Hudson <skrll@netbsd.org>
[paulz: fixed up the patch to compile under Linux, and tested it] Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabio Estevam [Fri, 29 Nov 2013 10:46:32 +0000 (08:46 -0200)]
imx-drm: Add mx6 hdmi transmitter support
Add mx6 hdmi transmitter support.
Original work has been done by Sascha Hauer and Tony Prisk.
Special thanks to Russell King for his carefully review, many bug fixes and
testing of the mx6 HDMI driver.
Tested on the following boards:
- mx6q sabresd
- mx6dl sabresd
- mx6solo wandboard
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Clean up the local variables, 'sdev_no' and 'asic' are both used in
simple for () loops. Use the local variable 'i' for both cases. The
'n_subdevs' variable is only used in one place, just remove it.
For aesthetics, add some whitespace to the subdevice init and reorder
it to follow the more typical style in comedi drivers.
Remove the unnecessary init of s->len_chanlist for subdevices that do
not support async commands (interrupts). The core will default it to
the correct value.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: pcmuio: document the spinlock_t variables
Add some comments about the two spinlock_t variables in the private
data. Also, add come comments for the functions that do not need to
lock/unlock the spinlock.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: pcmuio: add inline helpers to get the 'iobase', 'asic', and 'port'
To reduce the potential for bugs, and better document the code, introduce
some inline helper functions to consolidate the calculations needed to get
the 'iobase' for a given asic and the 'asic' and 'port' associated with a
given subdevice.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: pcmuio: remove unnecessary mask of triggered channels
The 'triggered' value is read directly from the three trigger id
registers and does not have any extra data that needs masked off.
Remove the 'mytrig' local variable and just use 'triggered' directly.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This dio subdevice (*insn_bits) function does not follow the "norm"
for comedi drivers. It also _appears_ to return the incorrect state
of the channels.
Use the comedi_dio_update_state() helper to handle the boilerplate
for updating the output channel state. Due to the hardware we then
need to invert the state and mask the input channels before updating
the outputs.
Then read the hardware and invert the result to get the current true
state of the dio channels.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: pcmuio: remove subdevice private data
The subdevice private data is only needed for each 'asic' not for each
subdevice. Since the 'asic' can be calculated easily from the subdevice
we can merge the subdevice private data members directly into the
private data.
This removes the need to kcalloc/free the subdevice private data and
saves a bit of space.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: pcmuio: remove 'asic' member from subdevice private data
The 'asic' associated with a subdevice can be easily calculated. The
functions that use this member in the subdevice private data can only
be called by the subdevices that support interrupts. Just calculate
the 'asic' when needed and remove the member variable and sanity checks.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: pcmuio: tidy up pcmuio_handle_asic_interrupt()
Unfortunatly, since there could be two asics, we can't use dev->read_subdev
to get the subdevice. But, the comedi_subdevice associated with the 'asic'
can easily be calculated. This allows removing the for () loop that searched
for the correct subdevice.
Tidy up the function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Currently only the pcmuio_handle_asic_interrupt() function uses the
spinlock in the private data to protect the read of the paged interrupt
id registers. All accesses to the paged registers should be protected
to ensure that the page is not changed until the access is complete.
Move the lock/unlock into the pcmuio_{write,read}() functions to make
sure the access completes correctly. Rename the spinlock to variable
to clarify its use.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Legacy (ISA) interrupts are not sharable so this driver should not
be passing the IRQF_SHARED flag when requesting the interrupts.
This driver supports two board types:
PCM-UIO48 with one asic (one interrupt source)
PCM-UIO96 with two asics (two interrupt sources)
The PCM-UIO96 has a jumper that allows the two interrupt sources to
share an interrupt. This is safe for legacy interrupts as long as
the "shared" interrupt is handled by a single driver.
Modify the request_irq() code in this driver to correctly request the
interrupts. For the PCM-UI048 case (one asic) only one request_irq()
is needed. For the PCM-UIO96 (two asics) there are three cases:
1) irq is shared, one request_irq() call
2) only one asic has an irq, one request_irq() call
3) two irqs, two request_irq() calls
The irq for the first asic (dev->irq) will be requested during the
attach if required. The comedi core will handle the freeing of this
irq during the detach.
The irq for the second asic (devpriv->irq2) will also be requested
during the attach if required. The freeing of this irq will be
handled by the driver during the detach.
Move the board reset and interrupt request code so it occurs early
in the attach. We can then check dev->irq and devpriv->irq2 to see
if the subdevice command support actually needs to be initialized.
This also simplifies the interrupt handler. The irq can be simply
checked against dev->irq and devpriv->irq2 to see which asic caused
the interrupt.
Add a call to pcmuio_reset() in the (*detach) to make sure the
interrupts are disabled before freeing the irqs.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: adv_pci1710: only init async command members when needed
The 'len_chanlist' and 'cancel' members of the comedi_subdevice are
only used with async command support. Only initialize them if the irq
was sucessfully requested.
Also, only init the dev->read_subdev if we have the irq.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: adl_pci9111: the irq is only needed for async command support
An irq is only needed for async command support, modify the attach of
the subdevices so that the command support is only hooked up if the irq
request was successful. Remove the then unnecessary sanity check in
pci9111_ai_do_cmd().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: adl_pci9111: fix incorrect irq passed to request_irq()
The dev->irq passed to request_irq() will always be 0 when the auto_attach
function is called. The pcidev->irq should be used instead to get the correct
irq number.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This driver only needs an irq in order to support async commands.
If the irq is not available the driver will still function for
single analog input reads.
Tidy up the code that does the irq requests so that the driver
will still attach if it is not avaliable.
Remove the noise about the irq during the attach.
Only hook up the async commands support if the irq is available.
Remove the then unnecessary sanity check in das1800_ai_do_cmd().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: ni_at_2150: tidy up irq/dma request
This driver needs both an irq and dma in order to support async
commands. If the irq and dma are not available the driver will
still function for single analog input reads.
Tidy up the code that does the irq and dma requests so that the
driver will still attach if they are not avaliable. The attach
will still fail, with -ENOMEM, if the dma buffer cannot be allocated.
Remove the noise about the irq and dma during the attach.
Only hook up the async commands support if the irq and dma are
available. Remove the then unnecessary sanity check in a2150_ai_cmd().
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mark Einon [Thu, 5 Dec 2013 22:37:41 +0000 (22:37 +0000)]
staging: et131x: Remove unnecessary phydev checks
Several checks for a valid adapter->phydev pointer are made where the
pointer has already been checked previously in the code path.
Remove these redundant checks.
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stephen Warren [Wed, 4 Dec 2013 03:56:05 +0000 (20:56 -0700)]
staging: dwc2: disable uframe_sched on the bcm2835
While Paul said that .uframe_sched should be enabled on the BCM2835,
and doing so works fine with the built-in wired Ethernet, it prevents
my WiFi dongle from operating correctly. Hence, disable the option so
that everything works.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Tue, 3 Dec 2013 17:54:59 +0000 (01:54 +0800)]
staging/lustre: don't compile procfs code when CONFIG_PROC_FS is off
The patch changes to conditionally compile procfs related source files.
This includes lproc_fid.c, lproc_fld.c, lproc_lov.c, lvfs_lib.c, lproc_mdc.c,
lproc_mgc.c, lprocfs_status.c, lproc_osc.c and sec_lproc.c.
There is a checkpatch warning about usage of simple_strtoul() in the patch.
But it needs to be fixed in a separate patch because it is not related to
CONFIG_PROC_FS breakage here.
Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Tue, 3 Dec 2013 17:54:58 +0000 (01:54 +0800)]
staging/lustre: fix undefined reference if CONFIG_PROC_FS is off
When building Lustre with CONFIG_PROC_FS off, we'll get many errors like:
drivers/staging/lustre/lustre/obdclass/llog_test.c:1053: error: implicit declaration of function ‘lprocfs_llog_test_init_vars’
make[3]: *** [drivers/staging/lustre/lustre/obdclass/llog_test.o] Error 1
make[2]: *** [drivers/staging/lustre/lustre/obdclass] Error 2
make[2]: *** Waiting for unfinished jobs....
CC [M] drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.o
drivers/staging/lustre/lustre/ptlrpc/pinger.c: In function ‘ptlrpc_pinger_main’:
drivers/staging/lustre/lustre/ptlrpc/pinger.c:331: error: implicit declaration of function ‘obd_update_maxusage’
The patch defines following symbols when CONFIG_PROC_FS is off:
fld_type_proc_dir, obd_update_maxusage(), obd_max_pages, obd_max_alloc, obd_alloc,
obd_pages, lprocfs_llog_test_init_vars().
Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
It exactly copies generic_segment_checks() except wrongly calling
access_ok(VERIFY_READ) for aio read range. Drop it and just call
generic_segment_checks() instead.
Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Tao [Tue, 3 Dec 2013 17:54:56 +0000 (01:54 +0800)]
staging/lustre: fix build error in ll_setxattr_common
With CONFIG_FS_POSIX_ACL off, we'll get
drivers/staging/lustre/lustre/llite/xattr.c: In function ‘ll_setxattr_common’:
drivers/staging/lustre/lustre/llite/xattr.c:187:7: error: ‘rce’ undeclared (first use in this function)
drivers/staging/lustre/lustre/llite/xattr.c:187:7: note: each undeclared identifier is reported only once for each function it appears in
It was introduced by 7fc1f83 (staging/lustre/llite: extended attribute cache)
that added new reference but didn't take care of CONFIG_FS_POSIX_ACL.
Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: pcl812: only init async command members when needed
The 'len_chanlist' and 'cancel' members of the comedi_subdevice are
only used with async command support. Only initialize them if the irq
was sucessfully requested.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The subdevice 'len_chanlist' member is only used with async command
support. Remove the initialization of this member for the subdevices
that do not support commands. The core will then correctly initialize
it to the default value of '1'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The subdevice 'len_chanlist' member is only used with async command
support. Remove the initialization of this member for the subdevices
that do not support commands. The core will then correctly initialize
it to the default value of '1'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: pcl818: remove 'sub_ai' from private data
This member of the private data is a duplicate of the comedi_device
'read_subdev' member. Remove the private data member and use the
comedi_device member instead.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: pcl818: only init async command members when needed
The 'len_chanlist' and 'cancel' members of the comedi_subdevice are
only used with async command support. Only initialize them if the irq
was sucessfully requested.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: pcl816: remove 'sub_ai' from private data
This member of the private data is a duplicate of the comedi_device
'read_subdev' member. Remove the private data member and use the
comedi_device member instead.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: lustre: reapply an older patch that was reverted
This reapplies part of 9edf0f670bdc8fa8b6676893b0a3bd2bf3 (staging:
lustre: clean up format string usages) as it was reverted in a recent
change to this file.
That proves the big problem of having external trees you have to have
patches flowing back into them from upstream or things break down...
Reported-by: Kees Cook <keescook@chromium.org> Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Peng Tao <bergwolf@gmail.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martyn Welch [Fri, 8 Nov 2013 11:58:35 +0000 (11:58 +0000)]
VME: Rename vme_slot_get to avoid confusion with reference counting
Traditionally the "get" functions increment the reference count of the
object that is returned, which does not happen with vme_slot_get. The
function vme_slot_get returns the physical VME slot associated with a
particular struct vme_dev. Rename vme_slot_num to avoid any confusion.