Frederic Saunier [Thu, 22 Oct 2015 01:52:48 +0000 (21:52 -0400)]
staging: lustre: remove last entry of libcfs_netstrfns[]
Currently NID string handling test for the last entry,
and last entry has .nf_type == (__u32) -1. If we ask
for a non existent LND we hit the last entry which then
calls a strlen on a NULL which causes a error. We can
avoid this problem if we just remove the last entry
since it is not used for anything except as a last
entry marker.
James Simmons [Thu, 22 Oct 2015 01:52:44 +0000 (21:52 -0400)]
staging: lustre: move cfs_ip_addr_* function from kernel libcfs to LNet
Both of cfs_ip_addr_parse and cfs_ip_addr_match which are located in
libcfs kernel module are used only for LNet so move this into the
nidstring handling code where it belongs. Also create user land
versions of these functions in the libcfs user land library.
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/15085 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Thu, 22 Oct 2015 01:52:43 +0000 (21:52 -0400)]
staging: lustre: move struct netstrfns to nidstr.h
The reason struct netstrfns exist in nidstrings.c
was to avoid forward decleration errors. The best
way to handle this instead is to move this structure
to a header file. Since this structure is used in
the userland utilities as well so we place it in
nidstr.h which is exposed to userland.
James Simmons [Thu, 22 Oct 2015 01:52:40 +0000 (21:52 -0400)]
staging: lustre: move nidstring handling to LNet layer
Moved the source file nidstring.c from libcfs to lnet
since that is the only place it is used. With the
move of nidstring to lnet some functions in libcfs
need to be exported. In later patches those functions
that are only used by LNet also will be moved to the
LNet layer. Also add in missing MAX_NUMERIC_VALUE
defination.
Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gregoire Pichon [Thu, 22 Oct 2015 01:52:39 +0000 (21:52 -0400)]
staging: lustre: add a service that prints a nidlist
The libcfs already provides services to parse a string into a nidlist
and to match a nid into a nidlist. This patch implements a service
that prints a nidlist into a buffer.
This is required for instance to print the nosquash_nids parameter
of the MDT procfs component.
Additionally, this patch fixes a bug in return code of
parse_addrange() routine, so that parsing of nids including
a * character works fine ('*@elan' for instance).
Fix lustre/ptlrpc/client.c block comments following the Coding Style
preferred format for multi-line and single-line comments:
/*
* This is the preferred style for multi-line
* comments in the Linux kernel source code.
* Please use it consistently.
*
* Description: A column of asterisks on the left side,
* with beginning and ending almost-blank lines.
*/
Included some minor textual fixes to get some comments on a single line.
Cristina Moraru [Sun, 18 Oct 2015 10:31:57 +0000 (13:31 +0300)]
staging: lustre: Replace aligned packed with packed
Replace __aligned__((packed)) with __packed in order to follow
the best practices and to fix checkpatch.pl warning:
'WARNING: __packed is preferred over __attribute__((packed))'
Glen Lee [Tue, 20 Oct 2015 08:14:03 +0000 (17:14 +0900)]
staging: wilc1000: init_irq: change argument and use netdev private wilc
This patch changes function argument type wilc with net_device and use
netdev private data member wilc instead of p_nic.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:14:02 +0000 (17:14 +0900)]
staging: wilc1000: start_ap: use netdev private data wilc
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:14:01 +0000 (17:14 +0900)]
staging: wilc1000: wilc_mgmt_frame_register: use netdev private wilc
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:14:00 +0000 (17:14 +0900)]
staging: wilc1000: del_key: use netdev private wilc instead of g_linux_wlan
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:59 +0000 (17:13 +0900)]
staging: wilc1000: add_key: use netdev private wilc instead of g_linux_wlan
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:58 +0000 (17:13 +0900)]
staging: wilc1000: CfgConnectResult: use netdev private wilc
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:57 +0000 (17:13 +0900)]
staging: wilc1000: wilc1000_wlan_deinit: change argument and use wilc
This patch changes function argument wilc with net_device and use nic->wilc
instead of global variable g_linux_wlan. The null check codes should be placed
before it is used so move it.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:56 +0000 (17:13 +0900)]
staging: wilc1000: chage_virtual_intf: use netdev private wilc
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:55 +0000 (17:13 +0900)]
staging: wilc1000: mac_close: use netdev private wilc instead of g_linux_wlan
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:54 +0000 (17:13 +0900)]
staging: wilc1000: mac_open: use netdev private wilc
Use netdev private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:53 +0000 (17:13 +0900)]
staging: wilc1000: wlan_init_locks: change parameter and use wilc
This patch changes function parameter type wilc with net_device and use netdev
private data member wilc instead of global variable g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:52 +0000 (17:13 +0900)]
staging: wilc1000: wilc1000_wlan_init: use netdev private wilc
This patch use netdev private data member wilc instead of global variable
g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 20 Oct 2015 08:13:51 +0000 (17:13 +0900)]
staging: wilc1000: add wilc to netdev private data structure
This patch add wilc to struct perInterface_wlan_t which is netdev private
data to access wilc via netdev_priv function. Assign wilc to nic->wilc.
The global variable g_linux_wlan will be replaced with netdev private data
member wilc step by step.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The WID_JOIN_REQ_EXTENDED among WIDs needs two parameters for the request to
be sent to the firmware, which are the SA and the BSSID. For this case, both
is the same bssid in the handle_connect function. So, it's required to be
copied twice.
Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tony Cho [Tue, 20 Oct 2015 05:26:55 +0000 (14:26 +0900)]
staging: wilc1000: introduce struct wilc_sdio for sdio data
This patch introduces struct wilc_sdio for sdio driver data. The wilc_sdio is
allocated and set as driver data when the sdio is probed and deallocated when
the sdio is removed.
Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tony Cho [Tue, 20 Oct 2015 05:26:54 +0000 (14:26 +0900)]
staging: wilc1000: remove COMPLEMENT_BOOT
This patch removes a preprocessor definition, COMPLEMENT_BOOT which is not used
anymore. This is just workaround to avoid weird issue, which is that 11b core
is not ready after the power is givin to the chip. However, this issue happened
only in the unstable hardware a long time ago and no more seen. In addition,
this patch removes _fail_threads_ statement to avoid the build warning after
removing COMPLEMENT_BOOT conditionals.
Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tony Cho [Tue, 20 Oct 2015 05:26:53 +0000 (14:26 +0900)]
staging: wilc1000: rename wilc_firmware in the struct wilc
This patch renames wilc_firmware in the struct wilc to the firmware. In
addition, null assignments to the wl->firmware after release_firmware
are removed because it is not necessary.
Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tony Cho [Tue, 20 Oct 2015 05:26:52 +0000 (14:26 +0900)]
staging: wilc1000: move clean up codes into wl_wlan_cleanup function
This patch moves clean up codes from exit_wilc_driver into the wl_wlan_cleanup
newly introduced in this patch. In addition, it is called by linux_sdio_remove
function.
Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tony Cho [Tue, 20 Oct 2015 05:26:45 +0000 (14:26 +0900)]
staging: wilc1000: change the type of wilc1000_initialized
This patch changes the type of wilc1000_initialized in the struc wilc from int
to bool and also renames it to the initialized. In addition, unnecessary
wilc1000_initialized codes are removed in this patch.
Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Sat, 17 Oct 2015 19:28:54 +0000 (22:28 +0300)]
staging: octeon-ethernet: rgmii: poll link status on open
Get the initial link status already on open instead of postponing
it to the periodic poll task. This unifies the behaviour with
other interfaces types.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
J. German Rivera [Sat, 17 Oct 2015 20:33:15 +0000 (15:33 -0500)]
staging: fsl-mc: Added serialization to mc_send_command()
When the same portal is used to call mc_send_command() from two
different threads or a thread and an interrupt handler, serialization
is required, as the MC only supports one outstanding command per MC
portal. Thus, a new command should not be sent to the MC until the
last command sent has been responded by the MC.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
J. German Rivera [Sat, 17 Oct 2015 20:33:14 +0000 (15:33 -0500)]
staging: fsl-mc:Added support for atomic portals
Refactored mc_send_command() to support two flavors of polling:
- preemptible (for non-atomic portals), which was already supported.
It calls usleep_range() between polling iterations.
- non-preemptible (for atomic portals), which is needed when
mc_send_command() is called with interrupts disabled.
It calls udelay() between polling iterations.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
J. German Rivera [Sat, 17 Oct 2015 16:18:21 +0000 (11:18 -0500)]
staging: fsl-mc: refactored error exit in allocator probe/remove
Replaced error gotos with direct returns in fsl_mc_allocator_probe()
and fsl_mc_allocator_remove(), since the only error handling done
in those functions is to exit.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
J. German Rivera [Sat, 17 Oct 2015 16:18:17 +0000 (11:18 -0500)]
staging: fsl-mc: Changed types of flags, portal size in
Changed these two fields from 32-bit integers to 16-bit integers in
struct fsl_mc_io, as 32 bits is too much for these fields. This
change does not affect other components since fsl_mc_io is an opaque
type.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Before, we were opening and closing a mc_io's dpmcp object
in fsl_mc_portal_reset(), since that was the only function that was
calling dpmcp MC operations. However, it is better for maintainability
to open the dpmcp object when it gets associated with an mc_io object,
and close it when this association is terminated. This way, we are free
to call dpmcp operations on a mc_io's dpmcp object at any time, without
having to check if the dpmcp object is opened or not.
Consequently, the creation/teardown of the association between
an mc_io object and a dpmcp is now encapsulated in two functions:
fsl_mc_io_set_dpmcp()/fsl_mc_io_unset_dpmcp(). Besides, setting
the corresponding pointers for the association, these functions
open and close the dpmcp object respectively.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
J. German Rivera [Sat, 17 Oct 2015 16:18:14 +0000 (11:18 -0500)]
staging: fsl-mc: fsl_mc_io object refactoring
Each fsl_mc_io object is associated with an fsl_mc_device object
of type "dpmcp" representing the MC portal associated with the
fsl_mc_io object. Before, we were representing this association with
an fsl_mc_resource pointer. To enhance code clarity, it is more
straight forward to use an fsl_mc_device pointer instead.
So, this change replaces the 'resource' field in the fsl_mc_io
object with 'dpmcp_dev'. Also, it changes parameter 'resource' of
fsl_create_mc_io() to be an fsl_mc_device pointer instead.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: lustre: include: Move function prototypes
Functions:
struct obd_export *class_export_get(struct obd_export *exp);
void class_export_put(struct obd_export *exp)
are being used in macros that are converted into static inline
functions, therefore move function prototypes to avoid build
error in later patches.
with struct vnt_options and members
rx_descs0 for nRxDescs0
rx_descs1 for nRxDescs1
tx_descs for nTxDescs
int_works
short_retry
long_retry
bbp_type
flags