]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
8 years agostaging: gdm724x: Replace semaphore netlink with mutex
Binoy Jayan [Wed, 15 Jun 2016 05:40:03 +0000 (11:10 +0530)]
staging: gdm724x: Replace semaphore netlink with mutex

Replace semaphore netlink_mutex with mutex. Semaphores are
going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: gdm724x: gdm_usb: Remove ignored value
Luis de Bethencourt [Tue, 31 May 2016 14:39:13 +0000 (15:39 +0100)]
staging: gdm724x: gdm_usb: Remove ignored value

The value assigned to ret will be overwritten before it could be read in a
future iteration of the loop. Removing the unnecessary assignment.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agonet: ethernet: octeon: use phy_ethtool_{get|set}_link_ksettings
Philippe Reynes [Fri, 15 Jul 2016 23:13:35 +0000 (01:13 +0200)]
net: ethernet: octeon: use phy_ethtool_{get|set}_link_ksettings

There are two generics functions phy_ethtool_{get|set}_link_ksettings,
so we can use them instead of defining the same code in the driver.

There was a check on CAP_NET_ADMIN in cvm_oct_set_settings, but this
check is already done in dev_ethtool, so no need to repeat it before
calling the generic function.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agonet: ethernet: octeon: use phydev from struct net_device
Philippe Reynes [Fri, 15 Jul 2016 23:13:34 +0000 (01:13 +0200)]
net: ethernet: octeon: use phydev from struct net_device

The private structure contain a pointer to phydev, but the structure
net_device already contain such pointer. So we can remove the pointer
phydev in the private structure, and update the driver to use the
one contained in struct net_device.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon: delete redundant log message
Aaro Koskinen [Wed, 29 Jun 2016 12:20:46 +0000 (15:20 +0300)]
staging: octeon: delete redundant log message

There will be a separate banner message after pow0 is set up (or an
error message if it failed).

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon: check for pow0 before calling interface helper
Aaro Koskinen [Wed, 29 Jun 2016 12:20:45 +0000 (15:20 +0300)]
staging: octeon: check for pow0 before calling interface helper

Check for pow0 port first before calling the interface helper. This
avoids the following error log when setting up pow0 interface:

cvmx_helper_get_interface_num: Illegal IPD port number

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon: validate interface before calling INDEX
Aaro Koskinen [Wed, 29 Jun 2016 12:20:44 +0000 (15:20 +0300)]
staging: octeon: validate interface before calling INDEX

Some helper functions call INDEX before checking if the interface is
valid. Since pow0 is not a real interface, we get the following errors:

cvmx_helper_get_interface_index_num: Illegal IPD port number

Fix by using INDEX only when needed with real interfaces.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: simplify struct for statistics
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:19 +0000 (23:09 +0200)]
staging: slicoss: simplify struct for statistics

Merge several structures for statistics to one structure and remove
unnecessary union nesting.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: improve implementation concerning the shared memory
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:18 +0000 (23:09 +0200)]
staging: slicoss: improve implementation concerning the shared memory

Remove the volatile specifiers of struct slic_shmem. Furthermore store the
bus addresses for the isr pointer, link status and statistics separately
and access the upper and lower word of these addresses by means of
[lower|upper]_32_bits(). By doing this take the endianness into account.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: dont use a structure but offsets for register accesses
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:17 +0000 (23:09 +0200)]
staging: slicoss: dont use a structure but offsets for register accesses

Use the new register accessors that use offsets instead of the slic_regs
structure to read/write registers. Since not longer needed remove the
structure completley.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: avoid PCI write posting
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:16 +0000 (23:09 +0200)]
staging: slicoss: avoid PCI write posting

Introduce the function slic_flush_write() which reads from the HOSTID
register and can be used to avoid PCI write posting. Use the function at
several critical places in the code.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: introduce register accessors that use register offsets
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:15 +0000 (23:09 +0200)]
staging: slicoss: introduce register accessors that use register offsets

Introduce accessor functions that read and write registers by using a
register offset.
This is in preparation to replace the register addressing by means of the
slic_regs struct with an addressing by means of offsets.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: start tx queue when interface is brought up
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:14 +0000 (23:09 +0200)]
staging: slicoss: start tx queue when interface is brought up

There is no reason to delay tx queue activation until a link is detected.
So start the queue when the interface is brought up and stop it when the
interface is brought down.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: ensure mapping of io-memory is uncached
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:13 +0000 (23:09 +0200)]
staging: slicoss: ensure mapping of io-memory is uncached

Writes to registers should be done uncached for various reasons. Ensure
this by replacing ioremap() with ioremap_nocache().

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: notifiy network stack about change in link state
Lino Sanfilippo [Fri, 22 Jul 2016 21:09:12 +0000 (23:09 +0200)]
staging: slicoss: notifiy network stack about change in link state

Notify the network stack about link states via netif_carrier_[off|on]().
Also set the link state off initially and when the interface is brought
down.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: slicoss: handle allocation failure in slic_init_adapter
Lino Sanfilippo [Thu, 14 Jul 2016 22:13:56 +0000 (00:13 +0200)]
staging: slicoss: handle allocation failure in slic_init_adapter

The memory allocation in slic_init_adapter() can fail. Return an error in
this case and unwind properly. Also make sure that the allocated memory is
properly freed in case of an error in the calling probe() function.
By doing this also replace the alloc() followed by memset to zero the
memory with a zalloc() version.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: fix 'line over 80 characters'
Anson Jacob [Tue, 16 Aug 2016 18:56:12 +0000 (14:56 -0400)]
staging: dgnc: fix 'line over 80 characters'

fix checkpatch.pl warning about 'line over 80 characters'.

Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: This patch fixes the checkpatch.pl warning
Prit Raj [Sun, 31 Jul 2016 03:05:16 +0000 (08:35 +0530)]
staging: fbtft: This patch fixes the checkpatch.pl warning

WARNING: Statements should start on a tabstop

Signed-off-by: Prit Raj <prit.adra@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: fbtft: fixed unsigned type warnings
Ming Yang [Mon, 18 Jul 2016 02:13:18 +0000 (19:13 -0700)]
Staging: fbtft: fixed unsigned type warnings

Replace unsigned by unsigned int in fbtft driver.  Issue found by
checkpatch.

Signed-off-by: Ming Yang <minos.future@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fbtft: do not allocate huge txbuf
Michal Suchanek [Thu, 9 Jun 2016 15:08:42 +0000 (15:08 +0000)]
staging: fbtft: do not allocate huge txbuf

txbuflen can be set to arbitrary value by user and it is also set
automagically to the maximum transfer size of the SPI master controller.

Do not allocate the buffer when larger than vmem. When my SPI master
controller reports maximum transfer size 16M the probe of fbtft fails.

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ion: remove __GFP_NOWARN when use low order gfp flags
Chen Feng [Sat, 30 Jul 2016 02:09:11 +0000 (10:09 +0800)]
staging: ion: remove __GFP_NOWARN when use low order gfp flags

It's useful to show the current memory in detail when alloc failed.

And, there may be a lot of high order alloc failed, just show memory
when an order 0 alloc failed.

Signed-off-by: Chen Feng <puck.chen@hisilicon.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoION: Sys_heap: Add cached pool to spead up cached buffer alloc
Chen Feng [Thu, 19 May 2016 03:03:16 +0000 (11:03 +0800)]
ION: Sys_heap: Add cached pool to spead up cached buffer alloc

Add ion cached pool in system heap. This patch add a cached pool
in system heap. It has a great improvement of alloc for cached
buffer.

With memory pressue alloc test 800MB in userspace used iontest.
The result avg is 577ms. Without patch it's avg is about 883ms.

v1: Makes the cached buffer zeroed before going to pool
v2: Add cached param in pool to distinguish wheather need to flush
    cache at a fresh alloc.
    Rework the shrink function.

Signed-off-by: Chen Feng <puck.chen@hisilicon.com>
Signed-off-by: Xia Qing <saberlily.xia@hisilicon.com>
Reviewed-by: Fu Jun <oliver.fu@hisilicon.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: fix comparison to NULL issue.
Kevin McKinney [Thu, 26 May 2016 03:22:07 +0000 (23:22 -0400)]
Staging: wlan-ng: fix comparison to NULL issue.

This patch fixes comparison to NULL could be written "wlandev" found
by checkpatch.pl tool.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: fix unnecessary parentheses.
Kevin McKinney [Thu, 26 May 2016 03:22:06 +0000 (23:22 -0400)]
Staging: wlan-ng: fix unnecessary parentheses.

This patch fixes Unnecessary parentheses around interface->dev found
by checkpatch.pl tool.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: fix alignment not matching.
Kevin McKinney [Thu, 26 May 2016 03:22:05 +0000 (23:22 -0400)]
Staging: wlan-ng: fix alignment not matching.

This patch fixes alignment should match open parenthesis found by
checkpatch.pl tool in prism2usb.c.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: Fix trailing */ in block comments.
YU Bo [Wed, 11 May 2016 14:29:44 +0000 (22:29 +0800)]
Staging: wlan-ng: Fix trailing */ in block comments.

Fix checkpatch.pl warning:

WARNING: Block comments use a trailing */ on a separate line.

Signed-off-by: Bo Yu <tsu.yubo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: fix error handling in wilc_debugfs_init()
Luis de Bethencourt [Mon, 27 Jun 2016 13:00:20 +0000 (14:00 +0100)]
staging: wilc1000: fix error handling in wilc_debugfs_init()

We can just ignore the return value from debugfs_create_dir() and
debugfs_create_file(). The second one already interanlly checks the dentry
created by the first before creating the file.

debugfs was written so it would be easy to use, no need for error checking.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers: wilc1000: remove references to semaphores
Joshua Houghton [Mon, 1 Aug 2016 19:17:25 +0000 (19:17 +0000)]
drivers: wilc1000: remove references to semaphores

* Update the comments that refer to semaphores
* Remove redundant includes to semphore.h

Signed-off-by: Joshua Houghton <josh@awful.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: Reformat braces around else
Anthony Sheldon [Fri, 19 Aug 2016 15:42:13 +0000 (16:42 +0100)]
staging: i4l: Reformat braces around else

As suggested by Documentation/CodingStyle move braces onto same line as else.

Signed-off-by: Anthony Sheldon <sheldon.anthony.sheldon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: icn: remove braces
Sudip Mukherjee [Sat, 11 Jun 2016 21:10:53 +0000 (22:10 +0100)]
staging: i4l: icn: remove braces

Braces are not required in a single statement block.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: icn: donot assign in if statement
Sudip Mukherjee [Sat, 11 Jun 2016 21:10:51 +0000 (22:10 +0100)]
staging: i4l: icn: donot assign in if statement

It is not the kernel coding style to make assignments in the if
statement and checkpatch was warning us about it.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: icn: do not use return as a function
Sudip Mukherjee [Sat, 11 Jun 2016 21:10:50 +0000 (22:10 +0100)]
staging: i4l: icn: do not use return as a function

return is not a function so no need to use the parenthesis.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: icn: use setup_timer() and mod_timer().
Muhammad Falak R Wani [Wed, 11 May 2016 13:29:53 +0000 (18:59 +0530)]
staging: i4l: icn: use setup_timer() and mod_timer().

Use setup_timer() instead of init_timer(), being the preferred/standard
way to set a timer up.

Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
   active timer (if the timer is inactive it will be activated).

Use setup_timer and mod_timer to setup and arm a timer, to make the code
cleaner and easier to read.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: pcbit: layer2: use setup_timer() and mod_timer().
Muhammad Falak R Wani [Wed, 11 May 2016 13:55:01 +0000 (19:25 +0530)]
staging: i4l: pcbit: layer2: use setup_timer() and mod_timer().

Use setup_timer() instead of init_timer(), being the preferred/standard
way to set a timer up.

Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
   active timer (if the timer is inactive it will be activated).

Use setup_timer and mod_timer to setup and arm a timer, to make the code
cleaner and easier to read.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: pcbit: edss1: use setup_timer() and mod_timer().
Muhammad Falak R Wani [Wed, 11 May 2016 13:55:00 +0000 (19:25 +0530)]
staging: i4l: pcbit: edss1: use setup_timer() and mod_timer().

Use setup_timer() instead of init_timer(), being the preferred/standard
way to set a timer up.

Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
   active timer (if the timer is inactive it will be activated).

Use setup_timer and mod_timer to setup and arm a timer, to make the code
cleaner and easier to read.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: i4l: pcbit: drv: use setup_timer() and mod_timer().
Muhammad Falak R Wani [Wed, 11 May 2016 13:54:59 +0000 (19:24 +0530)]
staging: i4l: pcbit: drv: use setup_timer() and mod_timer().

Use setup_timer() instead of init_timer(), being the preferred/standard
way to set a timer up.

Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
   active timer (if the timer is inactive it will be activated).

Use setup_timer and mod_timer to setup and arm a timer, to make the code
cleaner and easier to read.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: s626: fix line over 80 characters issue
Ravishankar Karkala Mallikarjunayya [Tue, 21 Jun 2016 06:44:44 +0000 (12:14 +0530)]
Staging: comedi: s626: fix line over 80 characters issue

This fixes up a line over 80 characters issues found by
the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: replace le16_to_cpu() with usb_endpoint_maxp()
Cheah Kok Cheong [Fri, 22 Jul 2016 15:29:39 +0000 (23:29 +0800)]
staging: comedi: drivers: replace le16_to_cpu() with usb_endpoint_maxp()

Use macro introduced in commit 939f325f4a0f
("usb: add usb_endpoint_maxp() macro")

Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi/drivers: Fixed sparse warnings
Nayeemahmed Badebade [Sat, 30 Jul 2016 16:38:15 +0000 (22:08 +0530)]
staging: comedi/drivers: Fixed sparse warnings

Fixed below sparse warnings in dt2811.c
 warning: symbol 'dt2811_clk_dividers' was not declared. Should it be static?
 warning: symbol 'dt2811_clk_multipliers' was not declared. Should it be static?

Signed-off-by: Nayeemahmed Badebade <itachi.opsrc@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: ni_at_a2150: fix block comments
H Hartley Sweeten [Mon, 20 Jun 2016 18:39:36 +0000 (11:39 -0700)]
staging: comedi: ni_at_a2150: fix block comments

Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line

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>
8 years agostaging: comedi: ni_pcidio: fix block comments
H Hartley Sweeten [Mon, 20 Jun 2016 18:39:35 +0000 (11:39 -0700)]
staging: comedi: ni_pcidio: fix block comments

Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line

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>
8 years agostaging: comedi: ni_atmio16d: fix block comments
H Hartley Sweeten [Mon, 20 Jun 2016 18:39:34 +0000 (11:39 -0700)]
staging: comedi: ni_atmio16d: fix block comments

Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines

Move the configuration options comment into the comedi driver comment
block. That's were they typically are listed.

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>
8 years agostaging: comedi: ni_atmio: fix block comments
H Hartley Sweeten [Mon, 20 Jun 2016 18:39:33 +0000 (11:39 -0700)]
staging: comedi: ni_atmio: fix block comments

Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines

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>
8 years agostaging: comedi: ni_daq_dio24: fix block comments
H Hartley Sweeten [Mon, 20 Jun 2016 18:39:32 +0000 (11:39 -0700)]
staging: comedi: ni_daq_dio24: fix block comments

Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines

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>
8 years agostaging: comedi: ni_mio_cs: fix block comments
H Hartley Sweeten [Mon, 20 Jun 2016 18:39:31 +0000 (11:39 -0700)]
staging: comedi: ni_mio_cs: fix block comments

Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines

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>
8 years agostaging: comedi: ni_pcimio: fix block comments
H Hartley Sweeten [Mon, 20 Jun 2016 18:39:30 +0000 (11:39 -0700)]
staging: comedi: ni_pcimio: fix block comments

Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines

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>
8 years agostaging: comedi: ni_670x: fix block comment issues
H Hartley Sweeten [Mon, 20 Jun 2016 18:39:29 +0000 (11:39 -0700)]
staging: comedi: ni_670x: fix block comment issues

Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines

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>
8 years agostaging: comedi: das08_cs: fix block comments
H Hartley Sweeten [Mon, 20 Jun 2016 18:39:28 +0000 (11:39 -0700)]
staging: comedi: das08_cs: fix block comments

Fix the checkpatch.pl issue:
WARNING: Block comments use * on subsequent lines

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>
8 years agostaging: comedi: addi_apci_3501: add a comedi driver comment block
H Hartley Sweeten [Mon, 20 Jun 2016 18:12:33 +0000 (11:12 -0700)]
staging: comedi: addi_apci_3501: add a comedi driver comment block

This comment block is used to automatically generate documentation in
Comedi and Comedilib.

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>
8 years agostaging: comedi: addi_apci_3501: remove timer/counter subdevice support
H Hartley Sweeten [Mon, 20 Jun 2016 18:12:32 +0000 (11:12 -0700)]
staging: comedi: addi_apci_3501: remove timer/counter subdevice support

This driver is for a simple 4/8 channel analog output board with 2 isolated
digital inputs and 2 isolated digital outputs. Support for these subdevices
is provided by the driver.

The boards also has a watchdog timer that can be used to reset the analog
outputs. It can also be used as a general purpose 12-bit timer when the
watchdog function is not necessary. The current support code for this
subdevice is broken. It does not follow the comedi API and requires some
out-of-tree patches in order to even work.

Remove the subdevice support. If a proper register map can be located for
this board we can add support back later.

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>
8 years agostaging: comedi: plx9080.h: rename some macros for consistency
Ian Abbott [Mon, 20 Jun 2016 13:05:49 +0000 (14:05 +0100)]
staging: comedi: plx9080.h: rename some macros for consistency

Most of the macros in "plx9080.h" that define register values are
single-bits flags of the form `PLX_<REG>_<FLAG>`, or are constant,
multi-bit values of the form `PLX_<REG>_<FIELD>_<VAL>`, or are
non-constant, function-like macros of the form `PLX_<REG>_<FIELD>(x)`.
Some of the macros for constant, multi-bit values do not currently
fit the pattern, so rename them for consistency.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: plx9080.h: define PLX_<REG>_TO_<FIELD>(r) macros
Ian Abbott [Mon, 20 Jun 2016 13:05:48 +0000 (14:05 +0100)]
staging: comedi: plx9080.h: define PLX_<REG>_TO_<FIELD>(r) macros

Various macros in "plx9080.h" take the form `PLX_<REG>_<FIELD>(x)`,
where `<REG>` is a register name, `<FIELD>` is a field within the
register, and `x` is a value for the field specified by the caller.  The
macros construct a partial register register with the specified field
value placed in the appropriate bits of the register value, and other
bits of the register value zeroed.  Add corresponding macros of the form
`PLX_<REG>_TO_<FIELD>(r)` that extract a field value from a specified
register values.  Remove macros of the form `PLX_<REG>_<FIELD>_SHIFT`
that specified the bit position of a field within a register value as
they are no longer useful.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: add support for new USB gadget
Christian Gromm [Fri, 19 Aug 2016 09:13:01 +0000 (11:13 +0200)]
staging: most: hdm-usb: add support for new USB gadget

This patch is needed to make the driver support Microchip's OS81210 USB
MOST network interface controller. It simply adds the gadget's product
ID to the driver's ID table.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: remove unnecessary status assignment
Christian Gromm [Fri, 19 Aug 2016 09:13:00 +0000 (11:13 +0200)]
staging: most: hdm-usb: remove unnecessary status assignment

The USB completion callbacks set the status field of an MBO object before
scheduling the clear_work. This patch removes this redundant assignment as
the work_struct does the same for all MBOs.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: init variables at declaration time
Christian Gromm [Fri, 19 Aug 2016 09:12:59 +0000 (11:12 +0200)]
staging: most: hdm-usb: init variables at declaration time

This patch initializes variables by the time they are declared.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: remove redundant parenthesis
Christian Gromm [Fri, 19 Aug 2016 09:12:58 +0000 (11:12 +0200)]
staging: most: hdm-usb: remove redundant parenthesis

This patch removes unnecessary parenthesis in boolean expressions.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: remove completion object
Christian Gromm [Fri, 19 Aug 2016 09:12:57 +0000 (11:12 +0200)]
staging: most: hdm-usb: remove completion object

Waiting for the urb_compl object to complete evaluates always as false.
This patch removes this unnecessary completion object.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: synchronize release of struct buf_anchor
Christian Gromm [Fri, 19 Aug 2016 09:12:56 +0000 (11:12 +0200)]
staging: most: hdm-usb: synchronize release of struct buf_anchor

In case a channel that is going to be destroyed has been tagged as not
"healthy" by the function hdm_poison_channel() while the functions
hdm_write_completion() or hdm_read_completion() are being executed, they
race for destruction of buf_anchor.

This patch fixes the problem.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: assign spinlock to local variable
Christian Gromm [Fri, 19 Aug 2016 09:12:55 +0000 (11:12 +0200)]
staging: most: hdm-usb: assign spinlock to local variable

This patch assigns the spinlock of struct mdev to local spinlock_t
variable to get rid of all the ugly dereferencing.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: fix race between enqueue and most_stop_enqueue
Christian Gromm [Fri, 19 Aug 2016 09:12:54 +0000 (11:12 +0200)]
staging: most: hdm-usb: fix race between enqueue and most_stop_enqueue

The "broken in pipe" handler of the USB-HDM calls most_stop_enqueue() to
stop the MBO traffic before returning all MBOs back to the Mostcore.  As
the enqueue() call from the Mostcore may run in parallel with the
most_stop_enqueue(), the HDM may run into the inconsistent state and
crash the kernel.

This patch synchronizes enqueue(), most_stop_enqueue() and
most_resume_enqueue() with a mutex, hence avoiding the race condition.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: simplify initialization of mbo->status.
Christian Gromm [Fri, 19 Aug 2016 09:12:53 +0000 (11:12 +0200)]
staging: most: hdm-usb: simplify initialization of mbo->status.

This patch simplifies the code that initializes mbo->status.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: remove redundant conditions
Christian Gromm [Fri, 19 Aug 2016 09:12:52 +0000 (11:12 +0200)]
staging: most: hdm-usb: remove redundant conditions

This patch removes the duplication of the expression
(urb->status == -ENOENT || urb->status == -ECONNRESET).

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: make use of is_channel_healthy flag
Christian Gromm [Fri, 19 Aug 2016 09:12:51 +0000 (11:12 +0200)]
staging: most: hdm-usb: make use of is_channel_healthy flag

This patch makes the write completion handler use the is_channel_healthy
flag to prevent the hdm from scheduling a second clear_halt workqueue in
case an endpoint reported a STALL condition.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: rename ID_INIC for consistency
Christian Gromm [Fri, 19 Aug 2016 09:12:50 +0000 (11:12 +0200)]
staging: most: hdm-usb: rename ID_INIC for consistency

In order to have a consistent naming convention this patch renames
USB_DEV_ID_INIC to USB_DEV_ID_OS81118.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: add USB product id
Christian Gromm [Fri, 19 Aug 2016 09:12:49 +0000 (11:12 +0200)]
staging: most: hdm-usb: add USB product id

This patch adds support for the OS81119 MOST network interface controller
to the driver.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: stop core from submitting buffers in case of broken pipe
Christian Gromm [Fri, 19 Aug 2016 09:12:48 +0000 (11:12 +0200)]
staging: most: hdm-usb: stop core from submitting buffers in case of broken pipe

This patch ensures that no more packets are submitted by the core in
case an USB endpoint has reported a broken pipe (-EPIPE).

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: fix clear halt processing
Christian Gromm [Fri, 19 Aug 2016 09:12:47 +0000 (11:12 +0200)]
staging: most: hdm-usb: fix clear halt processing

This patch is needed to ensure that submitted URBs get unlinked before
the driver calls usb_clear_halt(). Since the halt condition of an USB
endpoint is channel related, the work_struct is moved from a buffer
basis to a channel basis.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: provide MBO status when freeing buffers
Christian Gromm [Fri, 19 Aug 2016 09:12:46 +0000 (11:12 +0200)]
staging: most: hdm-usb: provide MBO status when freeing buffers

This patch adds the additional status parameter to function
free_anchored_buffers. This allows to dispatch further processing based
on this flag.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: hdm-usb: remove unused macro HW_RESYNC
Christian Gromm [Fri, 19 Aug 2016 09:12:45 +0000 (11:12 +0200)]
staging: most: hdm-usb: remove unused macro HW_RESYNC

This patch removes the macro HW_RESYNC that is not used anymore.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: aim-cdev: report error returned by alloc_chrdev_region
Christian Gromm [Fri, 19 Aug 2016 11:09:34 +0000 (13:09 +0200)]
staging: most: aim-cdev: report error returned by alloc_chrdev_region

This patch forwards the error code returned by function
alloc_chrdev_region(). It is needed to stop the module
from hiding the actual cause of failure.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: most: aim-cdev: fix reported error codes
Christian Gromm [Fri, 19 Aug 2016 11:09:33 +0000 (13:09 +0200)]
staging: most: aim-cdev: fix reported error codes

Currently, the aim-cdev is returning different error codes for the same
root cause. This patch is needed to get rid of the module's inconsistency
when reporting errors.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: don't clean in_data again
Shawn Lin [Sun, 21 Aug 2016 02:44:37 +0000 (10:44 +0800)]
staging: lustre: llite: don't clean in_data again

We have got a zero buffer for in_data as we use
kzalloc here. So let's remove it anyway.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: fix checkpatch error
Anson Jacob [Tue, 16 Aug 2016 19:20:00 +0000 (15:20 -0400)]
staging: lustre: fix checkpatch error

convert spaces to tab

fix the following error messages from checkpatch.pl

ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line

Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoAdd James Simmons as another Lustre maintainer
Oleg Drokin [Sat, 20 Aug 2016 21:34:30 +0000 (17:34 -0400)]
Add James Simmons as another Lustre maintainer

James Simmons is also spendign a lot of efforts on
cleaning up staging tree Lustre code and also
helps to sync up all the missing changes from the other tree.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Fix unnecessary parentheses around variables
Emoly Liu [Sat, 20 Aug 2016 21:34:27 +0000 (17:34 -0400)]
staging/lustre: Fix unnecessary parentheses around variables

This patch fixes all checkpatch occurences of
"CHECK: Unnecessary parentheses around xxx"
in Lustre code.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: update version to 2.5.99
James Simmons [Fri, 19 Aug 2016 18:07:31 +0000 (14:07 -0400)]
staging: lustre: update version to 2.5.99

With all but one of the the missing patches from the
lustre 2.6 version merged upstream its time to update
the upstream clients version.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: obd: decruft md_enqueue() and md_intent_lock()
John L. Hammond [Fri, 19 Aug 2016 18:07:30 +0000 (14:07 -0400)]
staging: lustre: obd: decruft md_enqueue() and md_intent_lock()

Remove the lmm and lmmsize parameters from both functions, storing
that data in md_op_data when needed. Remove the unused lookup_flags
parameter from md_intent_lock(), and the unused reqp parameter from
md_enqueue(). Add a union ldlm_policy_data * parameter to
md_enqueue(). Remove the unused function lmv_enqueue_remote().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/10205
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: obd: remove dead code
John L. Hammond [Fri, 19 Aug 2016 18:07:29 +0000 (14:07 -0400)]
staging: lustre: obd: remove dead code

Remove unused OBD functions: oti_alloc_cookies(), oti_free_cookies(),
class_observe_import(), class_unobserve_import(),
md_is_subdir(), md_readpage(), obdo2fid(), fid2obdo().

Remove several unused, get-only, and set-only structure members.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/9784
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: mdt: add OBD_CONNECT_DIR_STRIPE flag
wang di [Fri, 19 Aug 2016 18:07:28 +0000 (14:07 -0400)]
staging: lustre: mdt: add OBD_CONNECT_DIR_STRIPE flag

Add OBD_CONNECT_DIR_STRIPE to tell if the client supports
striped dir, so only new client (>= 2.6) can access striped
directory.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4843
Reviewed-on: http://review.whamcloud.com/10773
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: obd: remove unused lmv_readpages()/mdc_readpage()
Jian Yu [Fri, 19 Aug 2016 18:07:27 +0000 (14:07 -0400)]
staging: lustre: obd: remove unused lmv_readpages()/mdc_readpage()

This patch fixes the following compile error by removing the
dead codes: "error: 'xxx_readpages' defined but not used".
Now that we have md_read_page functionality we can remove
all the *_readpage implementations.

Signed-off-by: Jian Yu <jian.yu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4669
Reviewed-on: http://review.whamcloud.com/9810
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: move dir cache to MDC layer
wang di [Fri, 19 Aug 2016 18:07:26 +0000 (14:07 -0400)]
staging: lustre: llite: move dir cache to MDC layer

Move directory entries cache from llite to MDC, so client
side dir stripe will use independent hash function(in LMV),
which does not need to be tightly coupled with the backend
storage dir-entry hash function. With striped directory, it
will be 2-tier hash, LMV calculate hash value according to the
name and hash-type in layout, then each MDT will store these
entry in disk by its own hash.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-on: http://review.whamcloud.com/7043
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: implement lmv version of read_page
wang di [Fri, 19 Aug 2016 18:07:25 +0000 (14:07 -0400)]
staging: lustre: lmv: implement lmv version of read_page

All the code needed to implement read_page. This
will eventually replace lmv_readpage.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/10761
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Always return EEXIST on mkdir for existing names
Oleg Drokin [Sat, 20 Aug 2016 21:34:25 +0000 (17:34 -0400)]
staging/lustre: Always return EEXIST on mkdir for existing names

if the name already exists, but we don't have write permissions
in the parent, force talking to the MDS to determine what
more sensical error code to return.
This also happens to fix matlab and other such programs that
assume that EEXIST is the only valid error code for mkdir of
an existing directory.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agolustre: introduce lnet_copy_{k, }iov2iter(), kill lnet_copy_{k, }iov2{k, }iov()
Al Viro [Sat, 20 Aug 2016 21:34:24 +0000 (17:34 -0400)]
lustre: introduce lnet_copy_{k, }iov2iter(), kill lnet_copy_{k, }iov2{k, }iov()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agolustre: pass iov_iter to ->lnd_recv()
Al Viro [Sat, 20 Aug 2016 21:34:23 +0000 (17:34 -0400)]
lustre: pass iov_iter to ->lnd_recv()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agolustre: constify lib-move.c stuff
Al Viro [Sat, 20 Aug 2016 21:34:22 +0000 (17:34 -0400)]
lustre: constify lib-move.c stuff

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agolustre: ->kss_scratch... are unused now
Al Viro [Sat, 20 Aug 2016 21:34:21 +0000 (17:34 -0400)]
lustre: ->kss_scratch... are unused now

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: ksocknal_lib_send_kiov(): sendmsg doesn't bugger iovec...
Al Viro [Sat, 20 Aug 2016 21:34:20 +0000 (17:34 -0400)]
staging: lustre: ksocknal_lib_send_kiov(): sendmsg doesn't bugger iovec...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: ksocknal_lib_send_iov(): sendmsg doesn't bugger iovec...
Al Viro [Sat, 20 Aug 2016 21:34:19 +0000 (17:34 -0400)]
staging: lustre: ksocknal_lib_send_iov(): sendmsg doesn't bugger iovec...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: ksocknal_lib_recv_iov(): recvmsg doesn't bugger iovec anymore...
Al Viro [Sat, 20 Aug 2016 21:34:18 +0000 (17:34 -0400)]
staging: lustre: ksocknal_lib_recv_iov(): recvmsg doesn't bugger iovec anymore...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lnet: Stop Infinite CON RACE Condition
Doug Oucharek [Tue, 16 Aug 2016 20:19:33 +0000 (16:19 -0400)]
staging: lustre: lnet: Stop Infinite CON RACE Condition

In current code, when a CON RACE occurs, the passive side will
let the node with the higher NID value win the race.

We have a field case where a node can have a "stuck"
connection which never goes away and is the trigger of a
never-ending loop of re-connections.

This patch introduces a counter to how many times a
connection in a connecting state has been the cause of a CON RACE
rejection. After 20 times (constant MAX_CONN_RACES_BEFORE_ABORT),
we assume the connection is stuck and let the other side (with
lower NID) win.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7646
Reviewed-on: http://review.whamcloud.com/19430
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lnet: lock improvement for ko2iblnd
Liang Zhen [Tue, 16 Aug 2016 20:19:32 +0000 (16:19 -0400)]
staging: lustre: lnet: lock improvement for ko2iblnd

kiblnd_check_sends() takes conn::ibc_lock at the begin and release
this lock at the end, this is inefficient because most use-case
needs to explicitly release ibc_lock before caling this function.

This patches changes it to kiblnd_check_sends_locked() and avoid
unnecessary lock dances.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7099
Reviewed-on: http://review.whamcloud.com/20322
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lnet: make connection more stable with packet loss
Alexander Boyko [Tue, 16 Aug 2016 20:19:31 +0000 (16:19 -0400)]
staging: lustre: lnet: make connection more stable with packet loss

IB network may lose last connection handshake packet.
This problem isn't Lustre specific and described at
https://oss.oracle.com/pipermail/rds-devel/2007-December/000271.html
for example. Solution is to make conection established if any packet
is received for it.

Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Seagate-bug-id: MRP-2883
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8303
Reviewed-on: http://review.whamcloud.com/20874
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lnet: Correct position of lnet_ni_decref()
Doug Oucharek [Tue, 16 Aug 2016 20:19:30 +0000 (16:19 -0400)]
staging: lustre: lnet: Correct position of lnet_ni_decref()

In fix http://review.whamcloud.com/#/c/19614/, the call
to lnet_ni_decref() should have followed the routines
which are using the NI.  This patch correct that.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8022
Reviewed-on: http://review.whamcloud.com/21001
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lnet: Do not drop message when shutting down LNet
Doug Oucharek [Tue, 16 Aug 2016 20:19:29 +0000 (16:19 -0400)]
staging: lustre: lnet: Do not drop message when shutting down LNet

There is a case in lnet_parse() where we discover that LNet
is shutting down but we continue to use the NI when we drop the
message and end up calling ko2iblnd_check_send_locked() which tries to
allocate from the Tx pool which has been cleaned up already.
This triggers a NULL pointer dereference.

This fix just returns from lnet_parse() when we disover LNet is
shutting down.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8106
Reviewed-on: http://review.whamcloud.com/19993
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: set op_max_pages
wang di [Tue, 16 Aug 2016 20:19:28 +0000 (16:19 -0400)]
staging: lustre: llite: set op_max_pages

Cache the maximum allowed pages supported by the llite
layer. This value will be used in the mdc and lmv layer.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/7043
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: obd: implement md_read_page
wang di [Tue, 16 Aug 2016 20:19:27 +0000 (16:19 -0400)]
staging: lustre: obd: implement md_read_page

This patch adds md_read_page which is a new more
flexiable api that will replace md_readpage.

Signed-off-by: wang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/10761
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: lmv: build error with gcc 4.7.0 20110509
Dmitry Eremin [Tue, 16 Aug 2016 20:19:26 +0000 (16:19 -0400)]
staging: lustre: lmv: build error with gcc 4.7.0 20110509

Fixed comparison between signed and unsigned indexes.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3775
Reviewed-on: http://review.whamcloud.com/7382
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: obd: validate open handle cookies
John L. Hammond [Tue, 16 Aug 2016 20:19:25 +0000 (16:19 -0400)]
staging: lustre: obd: validate open handle cookies

Add a const void *h_owner member to struct portals_handle. Add a const
void *owner parameter to class_handle2object() which must be matched
by the h_owner member of the handle in addition to the cookie.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3233
Reviewed-on: http://review.whamcloud.com/6938
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: lustre: llite: remove assert for acl refcount
James Simmons [Tue, 16 Aug 2016 20:19:24 +0000 (16:19 -0400)]
staging: lustre: llite: remove assert for acl refcount

The purpose of this asssert to was to ensure lustre
was properly managing its posix_acl access. This test
is invalid due to the VFS layer also taking references
on the posix_acl. In reality their is no simple way to
detect this class of mistakes.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>