[PATCH] staging: lustre: o2iblnd: replace space indentation with tabs

2016-11-04 Thread Nicholas Hanley
This patch fixes all CODE_INDENT checkpatch errors in o2iblnd.

Signed-off-by: Nicholas Hanley 
---
 .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c|  2 +-
 .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 22 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c 
b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
index 9e88021..13235b0 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
@@ -1637,7 +1637,7 @@ int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, 
struct kib_tx *tx,
 {
__u64 *pages = tx->tx_pages;
bool is_rx = (rd != tx->tx_rd);
-bool tx_pages_mapped = 0;
+   bool tx_pages_mapped = 0;
struct kib_fmr_pool *fpo;
int npages = 0;
__u64 version;
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c 
b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index b27de88..92692a2 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -1912,12 +1912,12 @@ kiblnd_close_conn_locked(struct kib_conn *conn, int 
error)
   libcfs_nid2str(peer->ibp_nid));
} else {
CNETERR("Closing conn to %s: error %d%s%s%s%s%s\n",
-   libcfs_nid2str(peer->ibp_nid), error,
-   list_empty(>ibc_tx_queue) ? "" : "(sending)",
-   list_empty(>ibc_tx_noops) ? "" : 
"(sending_noops)",
-   list_empty(>ibc_tx_queue_rsrvd) ? "" : 
"(sending_rsrvd)",
-   list_empty(>ibc_tx_queue_nocred) ? "" : 
"(sending_nocred)",
-   list_empty(>ibc_active_txs) ? "" : "(waiting)");
+   libcfs_nid2str(peer->ibp_nid), error,
+   list_empty(>ibc_tx_queue) ? "" : "(sending)",
+   list_empty(>ibc_tx_noops) ? "" : 
"(sending_noops)",
+   list_empty(>ibc_tx_queue_rsrvd) ? "" : 
"(sending_rsrvd)",
+   list_empty(>ibc_tx_queue_nocred) ? "" : 
"(sending_nocred)",
+   list_empty(>ibc_active_txs) ? "" : "(waiting)");
}
 
dev = ((struct kib_net *)peer->ibp_ni->ni_data)->ibn_dev;
@@ -2643,7 +2643,7 @@ kiblnd_check_reconnect(struct kib_conn *conn, int version,
if (incarnation)
peer->ibp_incarnation = incarnation;
 out:
-write_unlock_irqrestore(glock, flags);
+   write_unlock_irqrestore(glock, flags);
 
CNETERR("%s: %s (%s), %x, %x, msg_size: %d, queue_depth: %d/%d, 
max_frags: %d/%d\n",
libcfs_nid2str(peer->ibp_nid),
@@ -2651,7 +2651,7 @@ kiblnd_check_reconnect(struct kib_conn *conn, int version,
reason, IBLND_MSG_VERSION, version, msg_size,
conn->ibc_queue_depth, queue_dep,
conn->ibc_max_frags, frag_num);
-/**
+   /**
 * if conn::ibc_reconnect is TRUE, connd will reconnect to the peer
 * while destroying the zombie
 */
@@ -2976,7 +2976,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct 
rdma_cm_event *event)
case RDMA_CM_EVENT_ADDR_ERROR:
peer = (struct kib_peer *)cmid->context;
CNETERR("%s: ADDR ERROR %d\n",
-   libcfs_nid2str(peer->ibp_nid), event->status);
+   libcfs_nid2str(peer->ibp_nid), event->status);
kiblnd_peer_connect_failed(peer, 1, -EHOSTUNREACH);
kiblnd_peer_decref(peer);
return -EHOSTUNREACH;  /* rc destroys cmid */
@@ -3021,7 +3021,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct 
rdma_cm_event *event)
return kiblnd_active_connect(cmid);
 
CNETERR("Can't resolve route for %s: %d\n",
-   libcfs_nid2str(peer->ibp_nid), event->status);
+   libcfs_nid2str(peer->ibp_nid), event->status);
kiblnd_peer_connect_failed(peer, 1, event->status);
kiblnd_peer_decref(peer);
return event->status;  /* rc destroys cmid */
@@ -3031,7 +3031,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct 
rdma_cm_event *event)
LASSERT(conn->ibc_state == IBLND_CONN_ACTIVE_CONNECT ||
conn->ibc_state == IBLND_CONN_PASSIVE_WAIT);
CNETERR("%s: UNREACHABLE %d\n",
-   libcfs_nid2str(conn->ibc_peer->ibp_nid), event->status);
+   libcfs_nid2str(conn->ibc_peer->ibp_nid), event->status);
kiblnd_connreq_done(conn, -ENETDOWN);
kiblnd_conn_decref(conn);
return 0;
-- 
2.10.1

___
devel mailing list
de...@linuxdriverproject.org

RE: [PATCH 8/9] bus: fsl-mc: dpio: add the DPAA2 DPIO object driver

2016-11-04 Thread Ruxandra Ioana Radulescu
> -Original Message-
> From: Stuart Yoder
> Sent: Thursday, November 03, 2016 4:38 PM
> To: Ruxandra Ioana Radulescu 
> Subject: FW: [PATCH 8/9] bus: fsl-mc: dpio: add the DPAA2 DPIO object
> driver
> 
> 
> 
> -Original Message-
> From: Stuart Yoder [mailto:stuart.yo...@nxp.com]
> Sent: Friday, October 21, 2016 9:02 AM
> To: gre...@linuxfoundation.org
> Cc: German Rivera ; de...@driverdev.osuosl.org;
> linux-ker...@vger.kernel.org; ag...@suse.de; a...@arndb.de; Leo Li
> ; Roy Pledge ; Haiying Wang
> ; Stuart Yoder 
> Subject: [PATCH 8/9] bus: fsl-mc: dpio: add the DPAA2 DPIO object driver
> 
> From: Roy Pledge 
> 
> The DPIO driver registers with the fsl-mc bus to handle bus-related
> events for DPIO objects.  Key responsibility is mapping I/O
> regions, setting up interrupt handlers, and calling the DPIO
> service initialization during probe.
> 
> Signed-off-by: Roy Pledge 
> Signed-off-by: Haiying Wang 
> Signed-off-by: Stuart Yoder 
> ---
>  drivers/bus/fsl-mc/dpio/Makefile  |   2 +-
>  drivers/bus/fsl-mc/dpio/dpio-driver.c | 289
> ++
>  2 files changed, 290 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/bus/fsl-mc/dpio/dpio-driver.c
> 
> diff --git a/drivers/bus/fsl-mc/dpio/Makefile b/drivers/bus/fsl-
> mc/dpio/Makefile
> index 0778da7..837d330 100644
> --- a/drivers/bus/fsl-mc/dpio/Makefile
> +++ b/drivers/bus/fsl-mc/dpio/Makefile
> @@ -6,4 +6,4 @@ subdir-ccflags-y := -Werror
> 
>  obj-$(CONFIG_FSL_MC_DPIO) += fsl-mc-dpio.o
> 
> -fsl-mc-dpio-objs := dpio.o qbman-portal.o dpio-service.o
> +fsl-mc-dpio-objs := dpio.o qbman-portal.o dpio-service.o dpio-driver.o
> diff --git a/drivers/bus/fsl-mc/dpio/dpio-driver.c b/drivers/bus/fsl-
> mc/dpio/dpio-driver.c
> new file mode 100644
> index 000..ad04a2c
> --- /dev/null
> +++ b/drivers/bus/fsl-mc/dpio/dpio-driver.c
> @@ -0,0 +1,289 @@
> +/*
> + * Copyright 2014-2016 Freescale Semiconductor Inc.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions are
> met:
> + * * Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * * Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the
> distribution.
> + * * Neither the name of Freescale Semiconductor nor the
> + *names of its contributors may be used to endorse or promote
> products
> + *derived from this software without specific prior written permission.
> + *
> + * ALTERNATIVELY, this software may be distributed under the terms of the
> + * GNU General Public License ("GPL") as published by the Free Software
> + * Foundation, either version 2 of that License or (at your option) any
> + * later version.
> + *
> + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND
> ANY
> + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
> THE IMPLIED
> + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE ARE
> + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR
> ANY
> + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL DAMAGES
> + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
> GOODS OR SERVICES;
> + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> HOWEVER CAUSED AND
> + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
> OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
> THE USE OF THIS
> + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +
> +#include "qbman-portal.h"
> +#include "dpio.h"
> +#include "dpio-cmd.h"
> +
> +MODULE_LICENSE("Dual BSD/GPL");
> +MODULE_AUTHOR("Freescale Semiconductor, Inc");
> +MODULE_DESCRIPTION("DPIO Driver");
> +
> +struct dpio_priv {
> + struct dpaa2_io *io;
> +};
> +
> +static irqreturn_t dpio_irq_handler(int irq_num, void *arg)
> +{
> + struct device *dev = (struct device *)arg;
> + struct dpio_priv *priv = dev_get_drvdata(dev);
> +
> + return dpaa2_io_irq(priv->io);
> +}
> +
> +static void unregister_dpio_irq_handlers(struct fsl_mc_device *dpio_dev)
> +{
> + struct fsl_mc_device_irq *irq;
> +
> + irq = dpio_dev->irqs[0];
> +
> + /* clear the affinity hint */
> + irq_set_affinity_hint(irq->msi_desc->irq, NULL);
> +}
> +
> +static int register_dpio_irq_handlers(struct fsl_mc_device *dpio_dev, int
> cpu)
> +{
> + 

RE: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs

2016-11-04 Thread Ruxandra Ioana Radulescu
> -Original Message-
> From: Stuart Yoder
> Sent: Friday, November 04, 2016 4:32 PM
> To: Ruxandra Ioana Radulescu ;
> gre...@linuxfoundation.org
> Cc: German Rivera ; de...@driverdev.osuosl.org;
> linux-ker...@vger.kernel.org; ag...@suse.de; a...@arndb.de; Leo Li
> ; Roy Pledge 
> Subject: RE: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and
> scatter/gather APIs
> 
>  > +/**
> > > + * dpaa2_fd_set_bpid() - Set the bpid field of frame descriptor
> > > + * @fd: the given frame descriptor
> > > + * @bpid: buffer pool id to be set
> > > + */
> > > +static inline void dpaa2_fd_set_bpid(struct dpaa2_fd *fd, uint16_t bpid)
> > > +{
> > > + fd->simple.bpid = bpid;
> > > +}
> >
> > The setter/getter functions for fd.ctrl are missing.
> 
> Ok, will add those.  Does the ethernet driver use that field?
 
Yes.

> 
> > > +
> > > +/**
> > > + * struct dpaa2_sg_entry - the scatter-gathering structure
> > > + * @addr: address of the sg entry
> > > + * @len: length in this sg entry
> > > + * @bpid: buffer pool id
> > > + * @format_offset: offset in the MS 16 bits, BPID in the LS 16 bits
> >
> > Description of the format_offset field is incorrect, it shouldn't
> > contain the reference to BPID.
> 
> Thanks, will fix.
> 
> > > +/**
> > > + * dpaa2_sg_get_len() - Get the length in SG entry
> > > + * @sg: the given scatter-gathering object
> > > + *
> > > + * Return the length.
> > > + */
> > > +static inline u32 dpaa2_sg_get_len(const struct dpaa2_sg_entry *sg)
> > > +{
> > > + if (dpaa2_sg_short_len(sg))
> > > + return le32_to_cpu(sg->len) & SG_SHORT_LEN_MASK;
> > > +
> > > + return le32_to_cpu(sg->len);
> > > +}
> >
> > We should do this in dpaa2_fd_get_len() as well. Hardware is capable of
> > generating FDs with SL bit set for single frame format too, although in
> > practice I've never actually seen it.
> 
> Any suggestion on how to test this case?

Actually, I stand corrected. Apparently WRIOP _always_ generates short
len frames, it just happens that, for the current default settings, the rest
of the bits in the 32bit word that contains the short length field are always
zero.
For FDs generated on the core both formats are accepted, and we use
long length format for the Ethernet driver TX frames.

Thanks,
Ioana
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs

2016-11-04 Thread Stuart Yoder
 > +/**
> > + * dpaa2_fd_set_bpid() - Set the bpid field of frame descriptor
> > + * @fd: the given frame descriptor
> > + * @bpid: buffer pool id to be set
> > + */
> > +static inline void dpaa2_fd_set_bpid(struct dpaa2_fd *fd, uint16_t bpid)
> > +{
> > +   fd->simple.bpid = bpid;
> > +}
> 
> The setter/getter functions for fd.ctrl are missing.

Ok, will add those.  Does the ethernet driver use that field?

> > +
> > +/**
> > + * struct dpaa2_sg_entry - the scatter-gathering structure
> > + * @addr: address of the sg entry
> > + * @len: length in this sg entry
> > + * @bpid: buffer pool id
> > + * @format_offset: offset in the MS 16 bits, BPID in the LS 16 bits
> 
> Description of the format_offset field is incorrect, it shouldn't
> contain the reference to BPID.

Thanks, will fix.

> > +/**
> > + * dpaa2_sg_get_len() - Get the length in SG entry
> > + * @sg: the given scatter-gathering object
> > + *
> > + * Return the length.
> > + */
> > +static inline u32 dpaa2_sg_get_len(const struct dpaa2_sg_entry *sg)
> > +{
> > +   if (dpaa2_sg_short_len(sg))
> > +   return le32_to_cpu(sg->len) & SG_SHORT_LEN_MASK;
> > +
> > +   return le32_to_cpu(sg->len);
> > +}
> 
> We should do this in dpaa2_fd_get_len() as well. Hardware is capable of
> generating FDs with SL bit set for single frame format too, although in
> practice I've never actually seen it.

Any suggestion on how to test this case?

Thanks,
Stuart
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 7/9] bus: fsl-mc: dpio: add the DPAA2 DPIO service interface

2016-11-04 Thread Ruxandra Ioana Radulescu

> -Original Message-
> From: Stuart Yoder [mailto:stuart.yo...@nxp.com]
> Sent: Friday, October 21, 2016 9:02 AM
> To: gre...@linuxfoundation.org
> Cc: German Rivera ; de...@driverdev.osuosl.org;
> linux-ker...@vger.kernel.org; ag...@suse.de; a...@arndb.de; Leo Li
> ; Roy Pledge ; Roy Pledge
> ; Haiying Wang ; Stuart
> Yoder 
> Subject: [PATCH 7/9] bus: fsl-mc: dpio: add the DPAA2 DPIO service interface
> 
> From: Roy Pledge 
> 
> The DPIO service interface handles initialization of DPIO objects
> and exports APIs to be used by other DPAA2 object drivers to perform
> queuing and buffer management related operations.  The service allows
> registration of callbacks when frames or notifications are received.
> 
> Signed-off-by: Roy Pledge 
> Signed-off-by: Haiying Wang 
> Signed-off-by: Stuart Yoder 
> ---
>  drivers/bus/fsl-mc/dpio/Makefile   |   2 +-
>  drivers/bus/fsl-mc/dpio/dpio-service.c | 614
> +
>  include/linux/fsl/dpaa2-io.h   | 138 
>  3 files changed, 753 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/bus/fsl-mc/dpio/dpio-service.c
>  create mode 100644 include/linux/fsl/dpaa2-io.h
> 
> diff --git a/drivers/bus/fsl-mc/dpio/Makefile b/drivers/bus/fsl-
> mc/dpio/Makefile
> index 6588498..0778da7 100644
> --- a/drivers/bus/fsl-mc/dpio/Makefile
> +++ b/drivers/bus/fsl-mc/dpio/Makefile
> @@ -6,4 +6,4 @@ subdir-ccflags-y := -Werror
> 
>  obj-$(CONFIG_FSL_MC_DPIO) += fsl-mc-dpio.o
> 
> -fsl-mc-dpio-objs := dpio.o qbman-portal.o
> +fsl-mc-dpio-objs := dpio.o qbman-portal.o dpio-service.o
> diff --git a/drivers/bus/fsl-mc/dpio/dpio-service.c b/drivers/bus/fsl-
> mc/dpio/dpio-service.c
> new file mode 100644
> index 000..7a455a7
> --- /dev/null
> +++ b/drivers/bus/fsl-mc/dpio/dpio-service.c
> @@ -0,0 +1,614 @@
> +/*
> + * Copyright 2014-2016 Freescale Semiconductor Inc.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions are
> met:
> + * * Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * * Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the
> distribution.
> + * * Neither the name of Freescale Semiconductor nor the
> + *names of its contributors may be used to endorse or promote
> products
> + *derived from this software without specific prior written permission.
> + *
> + *
> + * ALTERNATIVELY, this software may be distributed under the terms of the
> + * GNU General Public License ("GPL") as published by the Free Software
> + * Foundation, either version 2 of that License or (at your option) any
> + * later version.
> + *
> + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND
> ANY
> + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
> THE IMPLIED
> + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE ARE
> + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR
> ANY
> + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL DAMAGES
> + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
> GOODS OR SERVICES;
> + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> HOWEVER CAUSED AND
> + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
> OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
> THE USE OF THIS
> + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include "dpio.h"
> +#include "qbman-portal.h"
> +
> +struct dpaa2_io {
> + atomic_t refs;
> + struct dpaa2_io_desc dpio_desc;
> + struct qbman_swp_desc swp_desc;
> + struct qbman_swp *swp;
> + struct list_head node;
> + spinlock_t lock_mgmt_cmd;
> + spinlock_t lock_notifications;
> + struct list_head notifications;
> +};
> +
> +struct dpaa2_io_store {
> + unsigned int max;
> + dma_addr_t paddr;
> + struct dpaa2_dq *vaddr;
> + void *alloced_addr;/* unaligned value from kmalloc() */
> + unsigned int idx;  /* position of the next-to-be-returned entry */
> + struct qbman_swp *swp; /* portal used to issue VDQCR */
> + struct device *dev;/* device used for DMA mapping */
> +};
> +
> +/* keep a per cpu array of DPIOs for fast access */
> +static struct dpaa2_io *dpio_by_cpu[NR_CPUS];
> +static struct list_head dpio_list = LIST_HEAD_INIT(dpio_list);
> +static 

RE: [PATCH 3/9] bus: fsl-mc: dpio: add APIs for DPIO objects

2016-11-04 Thread Stuart Yoder


> -Original Message-
> From: Ruxandra Ioana Radulescu
> Sent: Wednesday, November 02, 2016 9:50 AM
> To: Stuart Yoder ; gre...@linuxfoundation.org
> Cc: German Rivera ; de...@driverdev.osuosl.org; 
> linux-ker...@vger.kernel.org;
> ag...@suse.de; a...@arndb.de; Leo Li ; Roy Pledge 
> ; Stuart Yoder
> 
> Subject: RE: [PATCH 3/9] bus: fsl-mc: dpio: add APIs for DPIO objects
> 
> > -Original Message-
> > From: Stuart Yoder [mailto:stuart.yo...@nxp.com]
> > Sent: Friday, October 21, 2016 5:02 PM
> > To: gre...@linuxfoundation.org
> > Cc: German Rivera ; de...@driverdev.osuosl.org;
> > linux-ker...@vger.kernel.org; ag...@suse.de; a...@arndb.de; Leo Li
> > ; Ruxandra Ioana Radulescu
> > ; Roy Pledge ; Stuart
> > Yoder 
> > Subject: [PATCH 3/9] bus: fsl-mc: dpio: add APIs for DPIO objects
> >
> > From: Ioana Radulescu 
> >
> > Add the command build/parse APIs for operating on DPIO objects through
> > the DPAA2 Management Complex.
> >
> > Signed-off-by: Ioana Radulescu 
> > Signed-off-by: Roy Pledge 
> > Signed-off-by: Stuart Yoder 
> > ---
> >  drivers/bus/fsl-mc/Kconfig |  10 ++
> >  drivers/bus/fsl-mc/Makefile|   3 +
> >  drivers/bus/fsl-mc/dpio/Makefile   |   9 ++
> >  drivers/bus/fsl-mc/dpio/dpio-cmd.h | 198
> > 
> >  drivers/bus/fsl-mc/dpio/dpio.c | 229
> > +
> >  drivers/bus/fsl-mc/dpio/dpio.h | 108 +
> >  6 files changed, 557 insertions(+)
> >  create mode 100644 drivers/bus/fsl-mc/dpio/Makefile
> >  create mode 100644 drivers/bus/fsl-mc/dpio/dpio-cmd.h
> >  create mode 100644 drivers/bus/fsl-mc/dpio/dpio.c
> >  create mode 100644 drivers/bus/fsl-mc/dpio/dpio.h
> >
> > diff --git a/drivers/bus/fsl-mc/Kconfig b/drivers/bus/fsl-mc/Kconfig
> > index 5c009ab..a10aaf0 100644
> > --- a/drivers/bus/fsl-mc/Kconfig
> > +++ b/drivers/bus/fsl-mc/Kconfig
> > @@ -15,3 +15,13 @@ config FSL_MC_BUS
> >   architecture.  The fsl-mc bus driver handles discovery of
> >   DPAA2 objects (which are represented as Linux devices) and
> >   binding objects to drivers.
> > +
> > +config FSL_MC_DPIO
> > +tristate "QorIQ DPAA2 DPIO driver"
> > +depends on FSL_MC_BUS
> > +help
> > + Driver for the DPAA2 DPIO object.  A DPIO provides queue and
> > + buffer management facilities for software to interact with
> > + other DPAA2 objects. This driver does not expose the DPIO
> > + objects individually, but groups them under a service layer
> > + API.
> > diff --git a/drivers/bus/fsl-mc/Makefile b/drivers/bus/fsl-mc/Makefile
> > index d56afee..d18df72 100644
> > --- a/drivers/bus/fsl-mc/Makefile
> > +++ b/drivers/bus/fsl-mc/Makefile
> > @@ -17,3 +17,6 @@ mc-bus-driver-objs := fsl-mc-bus.o \
> >   fsl-mc-msi.o \
> >   dpmcp.o \
> >   dpbp.o
> > +
> > +# MC DPIO driver
> > +obj-$(CONFIG_FSL_MC_DPIO) += dpio/
> > diff --git a/drivers/bus/fsl-mc/dpio/Makefile b/drivers/bus/fsl-
> > mc/dpio/Makefile
> > new file mode 100644
> > index 000..128befc
> > --- /dev/null
> > +++ b/drivers/bus/fsl-mc/dpio/Makefile
> > @@ -0,0 +1,9 @@
> > +#
> > +# QorIQ DPAA2 DPIO driver
> > +#
> > +
> > +subdir-ccflags-y := -Werror
> > +
> > +obj-$(CONFIG_FSL_MC_DPIO) += fsl-mc-dpio.o
> > +
> > +fsl-mc-dpio-objs := dpio.o
> > diff --git a/drivers/bus/fsl-mc/dpio/dpio-cmd.h b/drivers/bus/fsl-
> > mc/dpio/dpio-cmd.h
> > new file mode 100644
> > index 000..b25a4cc
> > --- /dev/null
> > +++ b/drivers/bus/fsl-mc/dpio/dpio-cmd.h
> > @@ -0,0 +1,198 @@
> > +/*
> > + * Copyright 2013-2016 Freescale Semiconductor Inc.
> > + *
> > + * Redistribution and use in source and binary forms, with or without
> > + * modification, are permitted provided that the following conditions are
> > met:
> > + * * Redistributions of source code must retain the above copyright
> > + * notice, this list of conditions and the following disclaimer.
> > + * * Redistributions in binary form must reproduce the above copyright
> > + * notice, this list of conditions and the following disclaimer in the
> > + * documentation and/or other materials provided with the distribution.
> > + * * Neither the name of the above-listed copyright holders nor the
> > + * names of any contributors may be used to endorse or promote products
> > + * derived from this software without specific prior written permission.
> > + *
> > + * ALTERNATIVELY, this software may be distributed under the terms of the
> > + * GNU General Public License ("GPL") as published by the Free Software
> > + * Foundation, either version 2 of that License or (at your option) any
> > + * later version.
> 

RE: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs

2016-11-04 Thread Ruxandra Ioana Radulescu
> -Original Message-
> From: Stuart Yoder [mailto:stuart.yo...@nxp.com]
> Sent: Friday, October 21, 2016 9:02 AM
> To: gre...@linuxfoundation.org
> Cc: German Rivera ; de...@driverdev.osuosl.org;
> linux-ker...@vger.kernel.org; ag...@suse.de; a...@arndb.de; Leo Li
> ; Roy Pledge ; Stuart Yoder
> 
> Subject: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and
> scatter/gather APIs
> 
> From: Roy Pledge 
> 
> Add global definitions for DPAA2 frame descriptors and scatter
> gather entries.
> 
> Signed-off-by: Roy Pledge 
> Signed-off-by: Stuart Yoder 
> ---
>  include/linux/fsl/dpaa2-fd.h | 415
> +++
>  1 file changed, 415 insertions(+)
>  create mode 100644 include/linux/fsl/dpaa2-fd.h
> 
> diff --git a/include/linux/fsl/dpaa2-fd.h b/include/linux/fsl/dpaa2-fd.h
> new file mode 100644
> index 000..b3fa9ff
> --- /dev/null
> +++ b/include/linux/fsl/dpaa2-fd.h
> @@ -0,0 +1,415 @@
> +/*
> + * Copyright 2014-2016 Freescale Semiconductor Inc.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions are
> met:
> + * * Redistributions of source code must retain the above copyright
> + *   notice, this list of conditions and the following disclaimer.
> + * * Redistributions in binary form must reproduce the above copyright
> + *   notice, this list of conditions and the following disclaimer in the
> + *   documentation and/or other materials provided with the distribution.
> + * * Neither the name of Freescale Semiconductor nor the
> + *   names of its contributors may be used to endorse or promote
> products
> + *   derived from this software without specific prior written 
> permission.
> + *
> + * ALTERNATIVELY, this software may be distributed under the terms of the
> + * GNU General Public License ("GPL") as published by the Free Software
> + * Foundation, either version 2 of that License or (at your option) any
> + * later version.
> + *
> + * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND
> ANY
> + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
> THE IMPLIED
> + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE ARE
> + * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR
> ANY
> + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL DAMAGES
> + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
> GOODS OR SERVICES;
> + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> HOWEVER CAUSED AND
> + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
> OR TORT
> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
> THE USE OF THIS
> + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +#ifndef __FSL_DPAA2_FD_H
> +#define __FSL_DPAA2_FD_H
> +
> +#include 
> +
> +/**
> + * DOC: DPAA2 FD - Frame Descriptor APIs for DPAA2
> + *
> + * Frame Descriptors (FDs) are used to describe frame data in the DPAA2.
> + * Frames can be enqueued and dequeued to Frame Queues (FQs) which
> are consumed
> + * by the various DPAA accelerators (WRIOP, SEC, PME, DCE)
> + *
> + * There are three types of frames: single, scatter gather, and frame lists.
> + *
> + * The set of APIs in this file must be used to create, manipulate and
> + * query Frame Descriptors.
> + */
> +
> +/**
> + * struct dpaa2_fd - Struct describing FDs
> + * @words: for easier/faster copying the whole FD structure
> + * @addr:  address in the FD
> + * @len:   length in the FD
> + * @bpid:  buffer pool ID
> + * @format_offset: format and offset fields
> + * @frc:   frame context
> + * @ctrl:  control bits...including dd, sc, va, err, etc
> + * @flc:   flow context address
> + *
> + * This structure represents the basic Frame Descriptor used in the system.
> + */
> +struct dpaa2_fd {
> + union {
> + u32 words[8];
> + struct dpaa2_fd_simple {
> + __le64 addr;
> + __le32 len;
> + __le16 bpid;
> + __le16 format_offset;
> + __le32 frc;
> + __le32 ctrl;
> + __le64 flc;
> + } simple;
> + };
> +};
> +
> +#define FD_OFFSET_MASK 0x0FFF
> +#define FD_FORMAT_MASK 0x3
> +#define FD_FORMAT_SHIFT 12
> +#define SG_SHORT_LEN_FLAG_MASK 0x1
> +#define SG_SHORT_LEN_FLAG_SHIFT 14
> +#define SG_SHORT_LEN_MASK 0x1
> +#define SG_OFFSET_MASK 0x0FFF
> +#define SG_FORMAT_MASK 0x3
> +#define SG_FORMAT_SHIFT 12
> +#define SG_BPID_MASK 0x3FFF
> +#define SG_FINAL_FLAG_MASK 0x1
> +#define SG_FINAL_FLAG_SHIFT 15
> +
> +enum dpaa2_fd_format {
> + dpaa2_fd_single = 0,
> + 

Re: [PATCH 1/6] staging: iio: set proper supply name to devm_regulator_get()

2016-11-04 Thread Eva Rachel Retuya
Hello Matt,

On Mon, Oct 31, 2016 at 09:03:57PM -0700, Matt Ranostay wrote:
> On Mon, Oct 31, 2016 at 10:04 AM, Eva Rachel Retuya  
> wrote:
> > The name passed to devm_regulator_get() should match the name of the
> > supply as specified in the device datasheet. This makes it clear what
> > power supply is being referred to in case of presence of other
> > regulators.
> >
> > Currently, the supply name specified on the affected devices is 'vcc'.
> > Use lowercase version of the datasheet name to specify the supply
> > voltage.
> >
> 
> Aren't we possibly breaking current device tree definitions that
> people may have? We should still check the old name after the new
> datasheet name in my opinion.
> 

I was told it was okay to rename those IIO drivers under staging. I also
double-checked if there are available DT bindings for these drivers and
found none.

Thanks,
Eva

> > Suggested-by: Lars-Peter Clausen 
> > Signed-off-by: Eva Rachel Retuya 
> > ---
> >  drivers/staging/iio/adc/ad7192.c| 2 +-
> >  drivers/staging/iio/adc/ad7780.c| 2 +-
> >  drivers/staging/iio/frequency/ad9832.c  | 2 +-
> >  drivers/staging/iio/frequency/ad9834.c  | 2 +-
> >  drivers/staging/iio/impedance-analyzer/ad5933.c | 2 +-
> >  5 files changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/staging/iio/adc/ad7192.c 
> > b/drivers/staging/iio/adc/ad7192.c
> > index bfa12ce..41fb32d 100644
> > --- a/drivers/staging/iio/adc/ad7192.c
> > +++ b/drivers/staging/iio/adc/ad7192.c
> > @@ -633,7 +633,7 @@ static int ad7192_probe(struct spi_device *spi)
> >
> > st = iio_priv(indio_dev);
> >
> > -   st->reg = devm_regulator_get(>dev, "vcc");
> > +   st->reg = devm_regulator_get(>dev, "avdd");
> > if (!IS_ERR(st->reg)) {
> > ret = regulator_enable(st->reg);
> > if (ret)
> > diff --git a/drivers/staging/iio/adc/ad7780.c 
> > b/drivers/staging/iio/adc/ad7780.c
> > index c9a0c2a..a88236e 100644
> > --- a/drivers/staging/iio/adc/ad7780.c
> > +++ b/drivers/staging/iio/adc/ad7780.c
> > @@ -173,7 +173,7 @@ static int ad7780_probe(struct spi_device *spi)
> >
> > ad_sd_init(>sd, indio_dev, spi, _sigma_delta_info);
> >
> > -   st->reg = devm_regulator_get(>dev, "vcc");
> > +   st->reg = devm_regulator_get(>dev, "avdd");
> > if (!IS_ERR(st->reg)) {
> > ret = regulator_enable(st->reg);
> > if (ret)
> > diff --git a/drivers/staging/iio/frequency/ad9832.c 
> > b/drivers/staging/iio/frequency/ad9832.c
> > index 358400b..744c8ee 100644
> > --- a/drivers/staging/iio/frequency/ad9832.c
> > +++ b/drivers/staging/iio/frequency/ad9832.c
> > @@ -212,7 +212,7 @@ static int ad9832_probe(struct spi_device *spi)
> > return -ENODEV;
> > }
> >
> > -   reg = devm_regulator_get(>dev, "vcc");
> > +   reg = devm_regulator_get(>dev, "avdd");
> > if (!IS_ERR(reg)) {
> > ret = regulator_enable(reg);
> > if (ret)
> > diff --git a/drivers/staging/iio/frequency/ad9834.c 
> > b/drivers/staging/iio/frequency/ad9834.c
> > index 6366216..ca3cea6 100644
> > --- a/drivers/staging/iio/frequency/ad9834.c
> > +++ b/drivers/staging/iio/frequency/ad9834.c
> > @@ -329,7 +329,7 @@ static int ad9834_probe(struct spi_device *spi)
> > return -ENODEV;
> > }
> >
> > -   reg = devm_regulator_get(>dev, "vcc");
> > +   reg = devm_regulator_get(>dev, "avdd");
> > if (!IS_ERR(reg)) {
> > ret = regulator_enable(reg);
> > if (ret)
> > diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c 
> > b/drivers/staging/iio/impedance-analyzer/ad5933.c
> > index 5eecf1c..62f61bc 100644
> > --- a/drivers/staging/iio/impedance-analyzer/ad5933.c
> > +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
> > @@ -723,7 +723,7 @@ static int ad5933_probe(struct i2c_client *client,
> > if (!pdata)
> > pdata = _default_pdata;
> >
> > -   st->reg = devm_regulator_get(>dev, "vcc");
> > +   st->reg = devm_regulator_get(>dev, "vdd");
> > if (!IS_ERR(st->reg)) {
> > ret = regulator_enable(st->reg);
> > if (ret)
> > --
> > 2.7.4
> >
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 21/31] staging: comedi: ni_daq_700: remove the #ifdef'ed out irq code

2016-11-04 Thread Jean-François Ferland
666
177666SKIDovocri/méthamphétaminimaladeusedamateauxxxallongeniuosixyZINXEROXYODEATHUITONIUMADMAXIMUMAGGOGLOUVERSHEILDOSHOAHILLUMINATIORONTOCCCYXIMNIVERTIP//mo100%7
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: st-cec: add parentheses around complex macros

2016-11-04 Thread Benjamin Gaignard
Thanks,

Acked-by: Benjamin Gaignard 

2016-11-04 8:58 GMT+01:00 Maninder Singh :
> This patch fixes the following checkpatch.pl error:
> ERROR: Macros with complex values should be enclosed in parentheses
>
> Signed-off-by: Maninder Singh 
> ---
>  drivers/staging/media/st-cec/stih-cec.c |4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/media/st-cec/stih-cec.c 
> b/drivers/staging/media/st-cec/stih-cec.c
> index 2143448..b22394a 100644
> --- a/drivers/staging/media/st-cec/stih-cec.c
> +++ b/drivers/staging/media/st-cec/stih-cec.c
> @@ -108,11 +108,11 @@
>
>  /* Constants for CEC_BIT_TOUT_THRESH register */
>  #define CEC_SBIT_TOUT_47MS BIT(1)
> -#define CEC_SBIT_TOUT_48MS BIT(0) | BIT(1)
> +#define CEC_SBIT_TOUT_48MS (BIT(0) | BIT(1))
>  #define CEC_SBIT_TOUT_50MS BIT(2)
>  #define CEC_DBIT_TOUT_27MS BIT(0)
>  #define CEC_DBIT_TOUT_28MS BIT(1)
> -#define CEC_DBIT_TOUT_29MS BIT(0) | BIT(1)
> +#define CEC_DBIT_TOUT_29MS (BIT(0) | BIT(1))
>
>  /* Constants for CEC_BIT_PULSE_THRESH register */
>  #define CEC_BIT_LPULSE_03MS BIT(1)
> --
> 1.7.9.5
>



-- 
Benjamin Gaignard

Graphic Study Group

Linaro.org │ Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: st-cec: add parentheses around complex macros

2016-11-04 Thread Maninder Singh
This patch fixes the following checkpatch.pl error:
ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Maninder Singh 
---
 drivers/staging/media/st-cec/stih-cec.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/st-cec/stih-cec.c 
b/drivers/staging/media/st-cec/stih-cec.c
index 2143448..b22394a 100644
--- a/drivers/staging/media/st-cec/stih-cec.c
+++ b/drivers/staging/media/st-cec/stih-cec.c
@@ -108,11 +108,11 @@
 
 /* Constants for CEC_BIT_TOUT_THRESH register */
 #define CEC_SBIT_TOUT_47MS BIT(1)
-#define CEC_SBIT_TOUT_48MS BIT(0) | BIT(1)
+#define CEC_SBIT_TOUT_48MS (BIT(0) | BIT(1))
 #define CEC_SBIT_TOUT_50MS BIT(2)
 #define CEC_DBIT_TOUT_27MS BIT(0)
 #define CEC_DBIT_TOUT_28MS BIT(1)
-#define CEC_DBIT_TOUT_29MS BIT(0) | BIT(1)
+#define CEC_DBIT_TOUT_29MS (BIT(0) | BIT(1))
 
 /* Constants for CEC_BIT_PULSE_THRESH register */
 #define CEC_BIT_LPULSE_03MS BIT(1)
-- 
1.7.9.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel