Re: [PATCH] ion: scatterlist offset not used for buffer map

2016-04-11 Thread John Einar Reitan
> I don't think this is right.  A compound_page still has a page struct
> for every page, you should be passing the page struct where your data
> starts.  Using an offset > PAGE_SIZE is going to break lots of places,
> for example anywhere that uses kmap(sg_page(sg)).

Was kind-of expecting that response. Will update, thanks.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/3] staging: comedi: das1800: fix possible NULL dereference

2016-04-11 Thread Ian Abbott

On 08/04/16 18:14, H Hartley Sweeten wrote:

DMA is optional with this driver. If it was not enabled the devpriv->dma
pointer will be NULL.

Fix the possible NULL pointer dereference when trying to disable the DMA
channels in das1800_ai_cancel() and tidy up the comments to fix the
checkpatch.pl issues:
WARNING: line over 80 characters

It's probably harmless in das1800_ai_setup_dma() because the 'desc' pointer
will not be used if DMA is disabled but fix it there also.

Fixes: 99dfc3357e98 ("staging: comedi: das1800: remove depends on ISA_DMA_API 
limitation")
Cc:  # 4.0+
Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---
  drivers/staging/comedi/drivers/das1800.c | 22 +-
  1 file changed, 13 insertions(+), 9 deletions(-)



Thanks!

Reviewed-by: Ian Abbott 

(I've already reviewed the other two.)

--
-=( Ian Abbott @ MEV Ltd.E-mail:  )=-
-=(  Web: http://www.mev.co.uk/  )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 00/37] staging: comedi: das1800: tidy up driver

2016-04-11 Thread Ian Abbott

On 08/04/16 20:41, H Hartley Sweeten wrote:

Tidy up this driver and fix all the checkpatch.pl issues.

This series applies after the bug fix series:
   [PATCH v2 0/3] staging: comedi: das1800: bug fixes

v2 changes:
   * refactor based on the bug fix series
   * reorder the series to tidy up das1800_probe() early and then
 use the board 'id' to set various subdevice info instead of
 adding additional bit-field flags to the boardinfo
   * leave the number of analog input channels as-is, at the request
 of Ian Abbott
   * clarify step 4 of the analog input (*do_cmdtest)
   * allow setting the external trigger polarity

H Hartley Sweeten (37):
   staging: comedi: das1800: tidy up digital output subdevice init
   staging: comedi: das1800: tidy up digital input subdevice init
   staging: comedi: das1800: tidy up analog output subdevice init
   staging: comedi: das1800: tidy up analog input subdevice init
   staging: comedi: das1800: tidy up boardinfo
   staging: comedi: das1800: tidy up das1800_probe()
   staging: comedi: das1800: remove 'common' boardinfo member
   staging: comedi: das1800: use comedi_offset_munge() for analog output
   staging: comedi: das1800: remove 'resolution' boardinfo
   staging: comedi: das1800: remove 'do_n_chan' boardinfo
   staging: comedi: das1800: initialize all analog outputs
   staging: comedi: das1800: tidy up das1800_ao_insn_write()
   staging: comedi: das1800: remove 'ao_n_chan' boardinfo
   staging: comedi: das1800: remove 'ao_ability' boardinfo
   staging: comedi: das1800: refactor 'range_ai' boardinfo
   staging: comedi: das1800: remove 'qram_len' boardinfo
   staging: comedi: das1800: change type of 'ai_speed' boardinfo
   staging: comedi: das1800: add analog output readback
   staging: comedi: das1800: introduce das1800_ai_chanspec_bits()
   staging: comedi: das1800: absorb control_c_bits()
   staging: comedi: das1800: refactor program_chanlist()
   staging: comedi: das1800: use comedi_timeout()
   staging: comedi: das1800: absorb control_a_bits()
   staging: comedi: das1800: document the spinlock
   staging: comedi: das1800: cleanup copyright and comedi comment blocks
   staging: comedi: das1800: change type of private data 'fifo_buf'
   staging: comedi: das1800: move comment about max conversion speeds
   staging: comedi: das1800: remove the private data member comments
   staging: comedi: das1800: clarify step 4 of the ai (*do_cmdtest)
   staging: comedi: das1800: remove the function comments
   staging: comedi: das1800: fix comments in das1800_ai_cmd()
   staging: comedi: das1800: fix comments in das1800_ai_handler()
   staging: comedi: das1800: fix lines over 80 characters
   staging: comedi: das1800: fix comments about the 'ao' board range
   staging: comedi: das1800: clarify the analog input cmd triggers
   staging: comedi: das1800: allow setting the external trigger polarity
   staging: comedi: das1800: update the MODULE_DESCRIPTION

  drivers/staging/comedi/drivers/das1800.c | 1305 ++
  1 file changed, 614 insertions(+), 691 deletions(-)



Thanks!

Reviewed-by: Ian Abbott 

--
-=( Ian Abbott @ MEV Ltd.E-mail:  )=-
-=(  Web: http://www.mev.co.uk/  )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RFC][PATCH] MAINTAINERS: Add Android Ion as a separate entry

2016-04-11 Thread Dan Carpenter
On Mon, Apr 11, 2016 at 09:18:24AM +0300, Dan Carpenter wrote:
> No one objects to this.
> 
> Resend it, but without the RFC in the subject.  Greg has a no RFC rule,
> probably he has to edit the subject.

Apparently Greg already applied it.

regards,
dan carpenter

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


Re: [PATCH] staging: wilc1000: move initialization of the config values

2016-04-11 Thread Dan Carpenter
That may work, but I think it would be simpler to do this next to the
kzalloc() before we do the wilc->vif[i]->hif_drv = hif_drv; assignment.

regards,
dan carpenter

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


Re: [RFC][PATCH] MAINTAINERS: Add Android Ion as a separate entry

2016-04-11 Thread Greg Kroah-Hartman
On Mon, Apr 11, 2016 at 02:57:05PM +0300, Dan Carpenter wrote:
> On Mon, Apr 11, 2016 at 09:18:24AM +0300, Dan Carpenter wrote:
> > No one objects to this.
> > 
> > Resend it, but without the RFC in the subject.  Greg has a no RFC rule,
> > probably he has to edit the subject.
> 
> Apparently Greg already applied it.

Nope, not applied yet :)

Laura, please resend without the RFC mark, I missed that as I only
briefly looked at this before putting it in my "to-review" queue.

thanks,

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


[PATCH 12/14] staging: fsl-mc: add dpmcp version check

2016-04-11 Thread Stuart Yoder
From: Itai Katz 

The dpmcp driver supports dpmcp version 3.0 and above.
This patch adds the code to check the version.

Signed-off-by: Itai Katz 
Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/dpmcp-cmd.h|6 +++---
 drivers/staging/fsl-mc/bus/mc-allocator.c |   11 +++
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h 
b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
index c6f4ec0..c9b52dd 100644
--- a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
+++ b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
@@ -32,9 +32,9 @@
 #ifndef _FSL_DPMCP_CMD_H
 #define _FSL_DPMCP_CMD_H
 
-/* DPMCP Version */
-#define DPMCP_VER_MAJOR3
-#define DPMCP_VER_MINOR0
+/* Minimal supported DPMCP Version */
+#define DPMCP_MIN_VER_MAJOR3
+#define DPMCP_MIN_VER_MINOR0
 
 /* Command IDs */
 #define DPMCP_CMDID_CLOSE  0x800
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c 
b/drivers/staging/fsl-mc/bus/mc-allocator.c
index 52b16f7..4676ba1 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -310,6 +310,17 @@ int __must_check fsl_mc_portal_allocate(struct 
fsl_mc_device *mc_dev,
if (WARN_ON(!dpmcp_dev))
goto error_cleanup_resource;
 
+   if (dpmcp_dev->obj_desc.ver_major < DPMCP_MIN_VER_MAJOR ||
+   (dpmcp_dev->obj_desc.ver_major == DPMCP_MIN_VER_MAJOR &&
+dpmcp_dev->obj_desc.ver_minor < DPMCP_MIN_VER_MINOR)) {
+   dev_err(&dpmcp_dev->dev,
+   "ERROR: Version %d.%d of DPMCP not supported.\n",
+   dpmcp_dev->obj_desc.ver_major,
+   dpmcp_dev->obj_desc.ver_minor);
+   error = -ENOTSUPP;
+   goto error_cleanup_resource;
+   }
+
if (WARN_ON(dpmcp_dev->obj_desc.region_count == 0))
goto error_cleanup_resource;
 
-- 
1.7.9.5

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


[PATCH 13/14] staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures

2016-04-11 Thread Stuart Yoder
From: Horia Geantă 

There are some error paths that allow for a NULL new_mc_io and err = 0
return code. Return -EINVAL instead.

Signed-off-by: Horia Geantă 
Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/mc-allocator.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c 
b/drivers/staging/fsl-mc/bus/mc-allocator.c
index 4676ba1..7ee71e7 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -306,6 +306,7 @@ int __must_check fsl_mc_portal_allocate(struct 
fsl_mc_device *mc_dev,
if (error < 0)
return error;
 
+   error = -EINVAL;
dpmcp_dev = resource->data;
if (WARN_ON(!dpmcp_dev))
goto error_cleanup_resource;
-- 
1.7.9.5

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


[PATCH 06/14] staging: fsl-mc: don't use object versions to make binding decisions

2016-04-11 Thread Stuart Yoder
From: Itai Katz 

Up until now if the object version expected by a driver (in the API header
file) did not match the actual object version in the MC hardware the bus
driver refused to bind the object to the driver or printed out WARN_ON
dumps.

This patch removes those checks, and the responsibility of object version
checking should now be done in the object drivers themselves.  If the actual
version discovered is not supported, the driver's probe function should fail.
Drivers should use version checks to support new features and provide
backwards compatibility if at all possible.

This patch also removes the checks that caused bus driver probing to fail
if the overall MC version discovered did not match the firmware version
from the API header...this was too strict.  The overall MC version is
informational like a release number, and continues to be printed in the
boot log.

Signed-off-by: Itai Katz 
(Stuart: reworded commit log)
Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/dprc-driver.c  |4 +--
 drivers/staging/fsl-mc/bus/mc-allocator.c |6 -
 drivers/staging/fsl-mc/bus/mc-bus.c   |   38 +
 3 files changed, 2 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c 
b/drivers/staging/fsl-mc/bus/dprc-driver.c
index 4334f3c..2d88c10 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
@@ -780,9 +780,7 @@ static int dprc_remove(struct fsl_mc_device *mc_dev)
 static const struct fsl_mc_device_match_id match_id_table[] = {
{
 .vendor = FSL_MC_VENDOR_FREESCALE,
-.obj_type = "dprc",
-.ver_major = DPRC_VER_MAJOR,
-.ver_minor = DPRC_VER_MINOR},
+.obj_type = "dprc"},
{.vendor = 0x0},
 };
 
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c 
b/drivers/staging/fsl-mc/bus/mc-allocator.c
index 86f8543..52b16f7 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -722,20 +722,14 @@ static const struct fsl_mc_device_match_id 
match_id_table[] = {
{
 .vendor = FSL_MC_VENDOR_FREESCALE,
 .obj_type = "dpbp",
-.ver_major = DPBP_VER_MAJOR,
-.ver_minor = DPBP_VER_MINOR
},
{
 .vendor = FSL_MC_VENDOR_FREESCALE,
 .obj_type = "dpmcp",
-.ver_major = DPMCP_VER_MAJOR,
-.ver_minor = DPMCP_VER_MINOR
},
{
 .vendor = FSL_MC_VENDOR_FREESCALE,
 .obj_type = "dpcon",
-.ver_major = DPCON_VER_MAJOR,
-.ver_minor = DPCON_VER_MINOR
},
{.vendor = 0x0},
 };
diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c 
b/drivers/staging/fsl-mc/bus/mc-bus.c
index b594556..981e4c2 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -40,8 +40,6 @@ static int fsl_mc_bus_match(struct device *dev, struct 
device_driver *drv)
struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
struct fsl_mc_driver *mc_drv = to_fsl_mc_driver(drv);
bool found = false;
-   bool major_version_mismatch = false;
-   bool minor_version_mismatch = false;
 
if (WARN_ON(!fsl_mc_bus_exists()))
goto out;
@@ -64,32 +62,12 @@ static int fsl_mc_bus_match(struct device *dev, struct 
device_driver *drv)
for (id = mc_drv->match_id_table; id->vendor != 0x0; id++) {
if (id->vendor == mc_dev->obj_desc.vendor &&
strcmp(id->obj_type, mc_dev->obj_desc.type) == 0) {
-   if (id->ver_major == mc_dev->obj_desc.ver_major) {
-   found = true;
-   if (id->ver_minor != mc_dev->obj_desc.ver_minor)
-   minor_version_mismatch = true;
-   } else {
-   major_version_mismatch = true;
-   }
+   found = true;
 
break;
}
}
 
-   if (major_version_mismatch) {
-   dev_warn(dev,
-"Major version mismatch: driver version %u.%u, MC 
object version %u.%u\n",
-id->ver_major, id->ver_minor,
-mc_dev->obj_desc.ver_major,
-mc_dev->obj_desc.ver_minor);
-   } else if (minor_version_mismatch) {
-   dev_warn(dev,
-"Minor version mismatch: driver version %u.%u, MC 
object version %u.%u\n",
-id->ver_major, id->ver_minor,
-mc_dev->obj_desc.ver_major,
-mc_dev->obj_desc.ver_minor);
-   }
-
 out:
dev_dbg(dev, "%smatched\n", found ? "" : "not ");
return found;
@@ -722,20 +700,6 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
 "Freescale Management Complex Firmware version: %u.%u.%u\n",
 

[PATCH 09/14] staging: fsl-mc: get version of root dprc from MC hardware

2016-04-11 Thread Stuart Yoder
From: Itai Katz 

The root dprc is discovered as a platform device in the device tree.  The
version of that dprc was previously set using hardcoded values from the API
header in the kernel).  This patch removes the use of the hardcoded version
numbers and instead reads the actual dprc version from the hardware.

Signed-off-by: Itai Katz 
(Stuart: resolved merge conflict, updated commit subject/log)
Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/mc-bus.c |   45 ---
 1 file changed, 37 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c 
b/drivers/staging/fsl-mc/bus/mc-bus.c
index 2075597..b4c3c5e 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -229,11 +229,10 @@ static bool fsl_mc_is_root_dprc(struct device *dev)
return dev == root_dprc_dev;
 }
 
-static int get_dprc_icid(struct fsl_mc_io *mc_io,
-int container_id, u16 *icid)
+static int get_dprc_attr(struct fsl_mc_io *mc_io,
+int container_id, struct dprc_attributes *attr)
 {
u16 dprc_handle;
-   struct dprc_attributes attr;
int error;
 
error = dprc_open(mc_io, 0, container_id, &dprc_handle);
@@ -242,15 +241,14 @@ static int get_dprc_icid(struct fsl_mc_io *mc_io,
return error;
}
 
-   memset(&attr, 0, sizeof(attr));
-   error = dprc_get_attributes(mc_io, 0, dprc_handle, &attr);
+   memset(attr, 0, sizeof(struct dprc_attributes));
+   error = dprc_get_attributes(mc_io, 0, dprc_handle, attr);
if (error < 0) {
dev_err(mc_io->dev, "dprc_get_attributes() failed: %d\n",
error);
goto common_cleanup;
}
 
-   *icid = attr.icid;
error = 0;
 
 common_cleanup:
@@ -258,6 +256,34 @@ common_cleanup:
return error;
 }
 
+static int get_dprc_icid(struct fsl_mc_io *mc_io,
+int container_id, u16 *icid)
+{
+   struct dprc_attributes attr;
+   int error;
+
+   error = get_dprc_attr(mc_io, container_id, &attr);
+   if (error == 0)
+   *icid = attr.icid;
+
+   return error;
+}
+
+static int get_dprc_version(struct fsl_mc_io *mc_io,
+   int container_id, u16 *major, u16 *minor)
+{
+   struct dprc_attributes attr;
+   int error;
+
+   error = get_dprc_attr(mc_io, container_id, &attr);
+   if (error == 0) {
+   *major = attr.version.major;
+   *minor = attr.version.minor;
+   }
+
+   return error;
+}
+
 static int translate_mc_addr(struct fsl_mc_device *mc_dev,
 enum dprc_region_type mc_region_type,
 u64 mc_offset, phys_addr_t *phys_addr)
@@ -719,11 +745,14 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
goto error_cleanup_mc_io;
}
 
+   error = get_dprc_version(mc_io, container_id,
+&obj_desc.ver_major, &obj_desc.ver_minor);
+   if (error < 0)
+   goto error_cleanup_mc_io;
+
obj_desc.vendor = FSL_MC_VENDOR_FREESCALE;
strcpy(obj_desc.type, "dprc");
obj_desc.id = container_id;
-   obj_desc.ver_major = DPRC_VER_MAJOR;
-   obj_desc.ver_minor = DPRC_VER_MINOR;
obj_desc.irq_count = 1;
obj_desc.region_count = 0;
 
-- 
1.7.9.5

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


[PATCH 10/14] staging: fsl-mc: add dprc version check

2016-04-11 Thread Stuart Yoder
From: Itai Katz 

The dprc driver supports dprc version 5.0 and above.
This patch adds the code to check the version.

Signed-off-by: Itai Katz 
(Stuart: resolved merge conflicts, split dpseci quirk into separate patch)
Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/dprc-cmd.h   |6 +++---
 drivers/staging/fsl-mc/bus/dprc-driver.c|   19 +++
 drivers/staging/fsl-mc/bus/mc-bus.c |1 +
 drivers/staging/fsl-mc/include/mc-private.h |2 ++
 4 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dprc-cmd.h 
b/drivers/staging/fsl-mc/bus/dprc-cmd.h
index d0198f5..9b854fa 100644
--- a/drivers/staging/fsl-mc/bus/dprc-cmd.h
+++ b/drivers/staging/fsl-mc/bus/dprc-cmd.h
@@ -40,9 +40,9 @@
 #ifndef _FSL_DPRC_CMD_H
 #define _FSL_DPRC_CMD_H
 
-/* DPRC Version */
-#define DPRC_VER_MAJOR 5
-#define DPRC_VER_MINOR 1
+/* Minimal supported DPRC Version */
+#define DPRC_MIN_VER_MAJOR 5
+#define DPRC_MIN_VER_MINOR 0
 
 /* Command IDs */
 #define DPRC_CMDID_CLOSE   0x800
diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c 
b/drivers/staging/fsl-mc/bus/dprc-driver.c
index 2d88c10..53c6e98 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
@@ -693,6 +693,25 @@ static int dprc_probe(struct fsl_mc_device *mc_dev)
goto error_cleanup_msi_domain;
}
 
+   error = dprc_get_attributes(mc_dev->mc_io, 0, mc_dev->mc_handle,
+   &mc_bus->dprc_attr);
+   if (error < 0) {
+   dev_err(&mc_dev->dev, "dprc_get_attributes() failed: %d\n",
+   error);
+   goto error_cleanup_open;
+   }
+
+   if (mc_bus->dprc_attr.version.major < DPRC_MIN_VER_MAJOR ||
+  (mc_bus->dprc_attr.version.major == DPRC_MIN_VER_MAJOR &&
+   mc_bus->dprc_attr.version.minor < DPRC_MIN_VER_MINOR)) {
+   dev_err(&mc_dev->dev,
+   "ERROR: DPRC version %d.%d not supported\n",
+   mc_bus->dprc_attr.version.major,
+   mc_bus->dprc_attr.version.minor);
+   error = -ENOTSUPP;
+   goto error_cleanup_open;
+   }
+
mutex_init(&mc_bus->scan_mutex);
 
/*
diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c 
b/drivers/staging/fsl-mc/bus/mc-bus.c
index b4c3c5e..4053643 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -745,6 +745,7 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
goto error_cleanup_mc_io;
}
 
+   memset(&obj_desc, 0, sizeof(struct dprc_obj_desc));
error = get_dprc_version(mc_io, container_id,
 &obj_desc.ver_major, &obj_desc.ver_minor);
if (error < 0)
diff --git a/drivers/staging/fsl-mc/include/mc-private.h 
b/drivers/staging/fsl-mc/include/mc-private.h
index ee5f1d2..cab1ae9 100644
--- a/drivers/staging/fsl-mc/include/mc-private.h
+++ b/drivers/staging/fsl-mc/include/mc-private.h
@@ -94,12 +94,14 @@ struct fsl_mc_resource_pool {
  * from the physical DPRC.
  * @irq_resources: Pointer to array of IRQ objects for the IRQ pool
  * @scan_mutex: Serializes bus scanning
+ * @dprc_attr: DPRC attributes
  */
 struct fsl_mc_bus {
struct fsl_mc_device mc_dev;
struct fsl_mc_resource_pool resource_pools[FSL_MC_NUM_POOL_TYPES];
struct fsl_mc_device_irq *irq_resources;
struct mutex scan_mutex;/* serializes bus scanning */
+   struct dprc_attributes dprc_attr;
 };
 
 #define to_fsl_mc_bus(_mc_dev) \
-- 
1.7.9.5

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


[PATCH 08/14] staging: fsl-mc: set cacheable flag for added devices if applicable

2016-04-11 Thread Stuart Yoder
From: Itai Katz 

Some DPAA2 devices have mmio regions that should be mapped as
cacheable by drivers.  Set IORESOURCE_CACHEABLE in the region's
flags if applicable.

Signed-off-by: Itai Katz 
[Stuart: update subject and commit message]
Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/mc-bus.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c 
b/drivers/staging/fsl-mc/bus/mc-bus.c
index 8bf76d7..2075597 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -354,6 +354,8 @@ static int fsl_mc_device_get_mmio_regions(struct 
fsl_mc_device *mc_dev,
regions[i].end = regions[i].start + region_desc.size - 1;
regions[i].name = "fsl-mc object MMIO region";
regions[i].flags = IORESOURCE_IO;
+   if (region_desc.flags & DPRC_REGION_CACHEABLE)
+   regions[i].flags |= IORESOURCE_CACHEABLE;
}
 
mc_dev->regions = regions;
-- 
1.7.9.5

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


[PATCH 02/14] staging: fsl-mc: DPAA2 overview readme update

2016-04-11 Thread Stuart Yoder
From: Stuart Yoder 

incorporated feedback from review comments, other misc cleanup/tweaks

Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/README.txt |  138 +
 1 file changed, 80 insertions(+), 58 deletions(-)

diff --git a/drivers/staging/fsl-mc/README.txt 
b/drivers/staging/fsl-mc/README.txt
index 8214102..179536a 100644
--- a/drivers/staging/fsl-mc/README.txt
+++ b/drivers/staging/fsl-mc/README.txt
@@ -11,11 +11,11 @@ Contents summary
-Overview of DPAA2 objects
-DPAA2 Linux driver architecture overview
 -bus driver
--dprc driver
+-DPRC driver
 -allocator
--dpio driver
+-DPIO driver
 -Ethernet
--mac
+-MAC
 
 DPAA2 Overview
 --
@@ -37,6 +37,9 @@ interfaces, an L2 switch, or accelerator instances.
 The MC provides memory-mapped I/O command interfaces (MC portals)
 which DPAA2 software drivers use to operate on DPAA2 objects:
 
+The diagram below shows an overview of the DPAA2 resource management
+architecture:
+
  +--+
  |  OS  |
  |DPAA2 drivers |
@@ -77,13 +80,13 @@ DPIO objects.
 
 Overview of DPAA2 Objects
 -
-The section provides a brief overview of some key objects
-in the DPAA2 hardware.  A simple scenario is described illustrating
-the objects involved in creating a network interfaces.
+The section provides a brief overview of some key DPAA2 objects.
+A simple scenario is described illustrating the objects involved
+in creating a network interfaces.
 
 -DPRC (Datapath Resource Container)
 
-A DPRC is an container object that holds all the other
+A DPRC is a container object that holds all the other
 types of DPAA2 objects.  In the example diagram below there
 are 8 objects of 5 types (DPMCP, DPIO, DPBP, DPNI, and DPMAC)
 in the container.
@@ -101,23 +104,23 @@ the objects involved in creating a network interfaces.
 | |
 +-+
 
-From the point of view of an OS, a DPRC is bus-like.  Like
-a plug-and-play bus, such as PCI, DPRC commands can be used to
-enumerate the contents of the DPRC, discover the hardware
-objects present (including mappable regions and interrupts).
+From the point of view of an OS, a DPRC behaves similar to a plug and
+play bus, like PCI.  DPRC commands can be used to enumerate the contents
+of the DPRC, discover the hardware objects present (including mappable
+regions and interrupts).
 
- dprc.1 (bus)
+ DPRC.1 (bus)
|
+--++---+---+---+
   ||   |   |   |
-dpmcp.1  dpio.1  dpbp.1  dpni.1  dpmac.1
-dpmcp.2  dpio.2
-dpmcp.3
+DPMCP.1  DPIO.1  DPBP.1  DPNI.1  DPMAC.1
+DPMCP.2  DPIO.2
+DPMCP.3
 
 Hardware objects can be created and destroyed dynamically, providing
 the ability to hot plug/unplug objects in and out of the DPRC.
 
-A DPRC has a mappable mmio region (an MC portal) that can be used
+A DPRC has a mappable MMIO region (an MC portal) that can be used
 to send MC commands.  It has an interrupt for status events (like
 hotplug).
 
@@ -137,10 +140,11 @@ the objects involved in creating a network interfaces.
 A typical Ethernet NIC is monolithic-- the NIC device contains TX/RX
 queuing mechanisms, configuration mechanisms, buffer management,
 physical ports, and interrupts.  DPAA2 uses a more granular approach
-utilizing multiple hardware objects.  Each object has specialized
-functions, and are used together by software to provide Ethernet network
-interface functionality.  This approach provides efficient use of finite
-hardware resources, flexibility, and performance advantages.
+utilizing multiple hardware objects.  Each object provides specialized
+functions. Groups of these objects are used by software to provide
+Ethernet network interface functionality.  This approach provides
+efficient use of finite hardware resources, flexibility, and
+performance advantages.
 
 The diagram below shows the objects needed for a simple
 network interface configuration on a system with 2 CPUs.
@@ -168,46 +172,52 @@ the objects involved in creating a network interfaces.
 
 Below the objects are described.  For each object a brief description
 is provided along with a summary of the kinds of operations the object
-supports and a summary of key resources of the object (mmio regions
-and irqs).
+supports and a summary of key resources of the object (MMIO regions
+and IRQs).
 
-DPMAC (Datapath Ethernet MAC): represents an Ethernet MAC, a
 hardware device that connects to an Ethernet PHY and allows
 physical t

[PATCH 04/14] staging: fsl-mc: update dpbp binary interface to v2.2

2016-04-11 Thread Stuart Yoder
From: Stuart Yoder 

Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/dpbp.c |   77 -
 drivers/staging/fsl-mc/include/dpbp-cmd.h |4 +-
 drivers/staging/fsl-mc/include/dpbp.h |   51 ++-
 3 files changed, 127 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpbp.c 
b/drivers/staging/fsl-mc/bus/dpbp.c
index 2d97173..c31fe1b 100644
--- a/drivers/staging/fsl-mc/bus/dpbp.c
+++ b/drivers/staging/fsl-mc/bus/dpbp.c
@@ -293,7 +293,7 @@ int dpbp_set_irq(struct fsl_mc_io *mc_io,
cmd.params[0] |= mc_enc(0, 8, irq_index);
cmd.params[0] |= mc_enc(32, 32, irq_cfg->val);
cmd.params[1] |= mc_enc(0, 64, irq_cfg->addr);
-   cmd.params[2] |= mc_enc(0, 32, irq_cfg->user_irq_id);
+   cmd.params[2] |= mc_enc(0, 32, irq_cfg->irq_num);
 
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
@@ -334,7 +334,7 @@ int dpbp_get_irq(struct fsl_mc_io *mc_io,
/* retrieve response parameters */
irq_cfg->val = (u32)mc_dec(cmd.params[0], 0, 32);
irq_cfg->addr = (u64)mc_dec(cmd.params[1], 0, 64);
-   irq_cfg->user_irq_id = (int)mc_dec(cmd.params[2], 0, 32);
+   irq_cfg->irq_num = (int)mc_dec(cmd.params[2], 0, 32);
*type = (int)mc_dec(cmd.params[2], 32, 32);
return 0;
 }
@@ -502,6 +502,7 @@ int dpbp_get_irq_status(struct fsl_mc_io *mc_io,
/* prepare command */
cmd.header = mc_encode_cmd_header(DPBP_CMDID_GET_IRQ_STATUS,
  cmd_flags, token);
+   cmd.params[0] |= mc_enc(0, 32, *status);
cmd.params[0] |= mc_enc(32, 8, irq_index);
 
/* send command to mc*/
@@ -580,3 +581,75 @@ int dpbp_get_attributes(struct fsl_mc_io *mc_io,
return 0;
 }
 EXPORT_SYMBOL(dpbp_get_attributes);
+
+/**
+ * dpbp_set_notifications() - Set notifications towards software
+ * @mc_io: Pointer to MC portal's I/O object
+ * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
+ * @token: Token of DPBP object
+ * @cfg:   notifications configuration
+ *
+ * Return: '0' on Success; Error code otherwise.
+ */
+int dpbp_set_notifications(struct fsl_mc_io *mc_io,
+  u32 cmd_flags,
+  u16 token,
+  struct dpbp_notification_cfg *cfg)
+{
+   struct mc_command cmd = { 0 };
+
+   /* prepare command */
+   cmd.header = mc_encode_cmd_header(DPBP_CMDID_SET_NOTIFICATIONS,
+ cmd_flags,
+ token);
+
+   cmd.params[0] |= mc_enc(0, 32, cfg->depletion_entry);
+   cmd.params[0] |= mc_enc(32, 32, cfg->depletion_exit);
+   cmd.params[1] |= mc_enc(0, 32, cfg->surplus_entry);
+   cmd.params[1] |= mc_enc(32, 32, cfg->surplus_exit);
+   cmd.params[2] |= mc_enc(0, 16, cfg->options);
+   cmd.params[3] |= mc_enc(0, 64, cfg->message_ctx);
+   cmd.params[4] |= mc_enc(0, 64, cfg->message_iova);
+
+   /* send command to mc*/
+   return mc_send_command(mc_io, &cmd);
+}
+
+/**
+ * dpbp_get_notifications() - Get the notifications configuration
+ * @mc_io: Pointer to MC portal's I/O object
+ * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
+ * @token: Token of DPBP object
+ * @cfg:   notifications configuration
+ *
+ * Return: '0' on Success; Error code otherwise.
+ */
+int dpbp_get_notifications(struct fsl_mc_io *mc_io,
+  u32 cmd_flags,
+  u16 token,
+  struct dpbp_notification_cfg *cfg)
+{
+   struct mc_command cmd = { 0 };
+   int err;
+
+   /* prepare command */
+   cmd.header = mc_encode_cmd_header(DPBP_CMDID_GET_NOTIFICATIONS,
+ cmd_flags,
+ token);
+
+   /* send command to mc*/
+   err = mc_send_command(mc_io, &cmd);
+   if (err)
+   return err;
+
+   /* retrieve response parameters */
+   cfg->depletion_entry = (u32)mc_dec(cmd.params[0], 0, 32);
+   cfg->depletion_exit = (u32)mc_dec(cmd.params[0], 32, 32);
+   cfg->surplus_entry = (u32)mc_dec(cmd.params[1], 0, 32);
+   cfg->surplus_exit = (u32)mc_dec(cmd.params[1], 32, 32);
+   cfg->options = (u16)mc_dec(cmd.params[2], 0, 16);
+   cfg->message_ctx = (u64)mc_dec(cmd.params[3], 0, 64);
+   cfg->message_iova = (u64)mc_dec(cmd.params[4], 0, 64);
+
+   return 0;
+}
diff --git a/drivers/staging/fsl-mc/include/dpbp-cmd.h 
b/drivers/staging/fsl-mc/include/dpbp-cmd.h
index efa9bf3..c57b454 100644
--- a/drivers/staging/fsl-mc/include/dpbp-cmd.h
+++ b/drivers/staging/fsl-mc/include/dpbp-cmd.h
@@ -34,7 +34,7 @@
 
 /* DPBP Version */
 #define DPBP_VER_MAJOR 2
-#define DPBP_VER_MINOR 1
+#define DPBP_VER_MINOR 2
 
 /* Command IDs */
 #define DPBP_CMDID_CLOSE   

[PATCH 03/14] staging: fsl-mc: update dpmcp binary interface to v3.0

2016-04-11 Thread Stuart Yoder
From: Stuart Yoder 

Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/dpmcp-cmd.h |5 ++---
 drivers/staging/fsl-mc/bus/dpmcp.c |   35 ++--
 drivers/staging/fsl-mc/bus/dpmcp.h |   10 ++---
 3 files changed, 6 insertions(+), 44 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h 
b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
index a87e9f8..c6f4ec0 100644
--- a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
+++ b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
@@ -33,8 +33,8 @@
 #define _FSL_DPMCP_CMD_H
 
 /* DPMCP Version */
-#define DPMCP_VER_MAJOR2
-#define DPMCP_VER_MINOR1
+#define DPMCP_VER_MAJOR3
+#define DPMCP_VER_MINOR0
 
 /* Command IDs */
 #define DPMCP_CMDID_CLOSE  0x800
@@ -52,6 +52,5 @@
 #define DPMCP_CMDID_SET_IRQ_MASK   0x014
 #define DPMCP_CMDID_GET_IRQ_MASK   0x015
 #define DPMCP_CMDID_GET_IRQ_STATUS 0x016
-#define DPMCP_CMDID_CLEAR_IRQ_STATUS   0x017
 
 #endif /* _FSL_DPMCP_CMD_H */
diff --git a/drivers/staging/fsl-mc/bus/dpmcp.c 
b/drivers/staging/fsl-mc/bus/dpmcp.c
index b0248f5..fd6dd4e 100644
--- a/drivers/staging/fsl-mc/bus/dpmcp.c
+++ b/drivers/staging/fsl-mc/bus/dpmcp.c
@@ -213,7 +213,7 @@ int dpmcp_set_irq(struct fsl_mc_io *mc_io,
cmd.params[0] |= mc_enc(0, 8, irq_index);
cmd.params[0] |= mc_enc(32, 32, irq_cfg->val);
cmd.params[1] |= mc_enc(0, 64, irq_cfg->paddr);
-   cmd.params[2] |= mc_enc(0, 32, irq_cfg->user_irq_id);
+   cmd.params[2] |= mc_enc(0, 32, irq_cfg->irq_num);
 
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
@@ -254,7 +254,7 @@ int dpmcp_get_irq(struct fsl_mc_io *mc_io,
/* retrieve response parameters */
irq_cfg->val = (u32)mc_dec(cmd.params[0], 0, 32);
irq_cfg->paddr = (u64)mc_dec(cmd.params[1], 0, 64);
-   irq_cfg->user_irq_id = (int)mc_dec(cmd.params[2], 0, 32);
+   irq_cfg->irq_num = (int)mc_dec(cmd.params[2], 0, 32);
*type = (int)mc_dec(cmd.params[2], 32, 32);
return 0;
 }
@@ -435,37 +435,6 @@ int dpmcp_get_irq_status(struct fsl_mc_io *mc_io,
 }
 
 /**
- * dpmcp_clear_irq_status() - Clear a pending interrupt's status
- *
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPMCP object
- * @irq_index: The interrupt index to configure
- * @status:Bits to clear (W1C) - one bit per cause:
- * 0 = don't change
- * 1 = clear status bit
- *
- * Return: '0' on Success; Error code otherwise.
- */
-int dpmcp_clear_irq_status(struct fsl_mc_io *mc_io,
-  u32 cmd_flags,
-  u16 token,
-  u8 irq_index,
-  u32 status)
-{
-   struct mc_command cmd = { 0 };
-
-   /* prepare command */
-   cmd.header = mc_encode_cmd_header(DPMCP_CMDID_CLEAR_IRQ_STATUS,
- cmd_flags, token);
-   cmd.params[0] |= mc_enc(0, 32, status);
-   cmd.params[0] |= mc_enc(32, 8, irq_index);
-
-   /* send command to mc*/
-   return mc_send_command(mc_io, &cmd);
-}
-
-/**
  * dpmcp_get_attributes - Retrieve DPMCP attributes.
  *
  * @mc_io: Pointer to MC portal's I/O object
diff --git a/drivers/staging/fsl-mc/bus/dpmcp.h 
b/drivers/staging/fsl-mc/bus/dpmcp.h
index 6df351f..fe79d4d 100644
--- a/drivers/staging/fsl-mc/bus/dpmcp.h
+++ b/drivers/staging/fsl-mc/bus/dpmcp.h
@@ -82,12 +82,12 @@ int dpmcp_reset(struct fsl_mc_io *mc_io,
  * struct dpmcp_irq_cfg - IRQ configuration
  * @paddr: Address that must be written to signal a message-based interrupt
  * @val:   Value to write into irq_addr address
- * @user_irq_id: A user defined number associated with this IRQ
+ * @irq_num: A user defined number associated with this IRQ
  */
 struct dpmcp_irq_cfg {
 uint64_t   paddr;
 uint32_t   val;
-intuser_irq_id;
+intirq_num;
 };
 
 int dpmcp_set_irq(struct fsl_mc_io *mc_io,
@@ -133,12 +133,6 @@ int dpmcp_get_irq_status(struct fsl_mc_io  *mc_io,
uint8_t irq_index,
uint32_t*status);
 
-int dpmcp_clear_irq_status(struct fsl_mc_io*mc_io,
-  uint32_t cmd_flags,
-  uint16_t token,
- uint8_t   irq_index,
- uint32_t  status);
-
 /**
  * struct dpmcp_attr - Structure representing DPMCP attributes
  * @id:DPMCP object ID
-- 
1.7.9.5

___
d

[PATCH 07/14] staging: fsl-mc: set up coherent dma ops for added devices

2016-04-11 Thread Stuart Yoder
From: Stuart Yoder 

Unless discovered devices have the no shareability flag set,
set up coherent dma ops for them.

Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/mc-bus.c |4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c 
b/drivers/staging/fsl-mc/bus/mc-bus.c
index 981e4c2..8bf76d7 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -469,6 +469,10 @@ int fsl_mc_device_add(struct dprc_obj_desc *obj_desc,
goto error_cleanup_dev;
}
 
+   /* Objects are coherent, unless 'no shareability' flag set. */
+   if (!(obj_desc->flags & DPRC_OBJ_FLAG_NO_MEM_SHAREABILITY))
+   arch_setup_dma_ops(&mc_dev->dev, 0, 0, NULL, true);
+
/*
 * The device-specific probe callback will get invoked by device_add()
 */
-- 
1.7.9.5

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


[PATCH 00/14] staging: fsl-mc: misc updates

2016-04-11 Thread Stuart Yoder
From: Stuart Yoder 

This patch series makes further progress towards completing the fsl-mc
TODO list.

-patch 1 removes three items from the TODO file that were previously 
 completed-- multiple root dprc support, MSI support, and command
 serialization

-patch 2 makes some way overdue updates to README.txt from review
 comments on the mailing list last fall

-patches 3-5 update the binary interface for several objects to
 sync with latest MC firmware (todo item: "MC firmware uprev")

-patches 6-13 are cleanup items
   -change in how object versions are used in binding decisions
   -setting coherent dma_ops for devices if necessary
   -setting cacheable flag for object regions if applicable
   -getting the version of the root dprc from hardware, not based
on what was in the .h file
   -dprc driver now refuses to probe if dprc version is not minimum
expected
   -added quirk for bug in coherency flag for dpseci objects
   -allocator driver refuses to bind to dpmcp objects if version
is not minimum expected

-patch 14 adds a second maintainer for the driver
 
Horia Geanta (1):
  staging: fsl-mc: add quirk handling for dpseci objects < 4.0

Horia Geantă (1):
  staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate()
failures

Itai Katz (5):
  staging: fsl-mc: don't use object versions to make binding decisions
  staging: fsl-mc: set cacheable flag for added devices if applicable
  staging: fsl-mc: get version of root dprc from MC hardware
  staging: fsl-mc: add dprc version check
  staging: fsl-mc: add dpmcp version check

Stuart Yoder (7):
  staging: fsl-mc: TODO updates
  staging: fsl-mc: DPAA2 overview readme update
  staging: fsl-mc: update dpmcp binary interface to v3.0
  staging: fsl-mc: update dpbp binary interface to v2.2
  staging: fsl-mc: update dprc binary interface to v5.1
  staging: fsl-mc: set up coherent dma ops for added devices
  MAINTAINERS: fsl-mc: Add second maintainer

 MAINTAINERS |1 +
 drivers/staging/fsl-mc/README.txt   |  138 ---
 drivers/staging/fsl-mc/TODO |   13 ---
 drivers/staging/fsl-mc/bus/dpbp.c   |   77 ++-
 drivers/staging/fsl-mc/bus/dpmcp-cmd.h  |7 +-
 drivers/staging/fsl-mc/bus/dpmcp.c  |   35 +--
 drivers/staging/fsl-mc/bus/dpmcp.h  |   10 +-
 drivers/staging/fsl-mc/bus/dprc-cmd.h   |6 +-
 drivers/staging/fsl-mc/bus/dprc-driver.c|   33 ++-
 drivers/staging/fsl-mc/bus/dprc.c   |   26 ++---
 drivers/staging/fsl-mc/bus/mc-allocator.c   |   18 ++--
 drivers/staging/fsl-mc/bus/mc-bus.c |   93 +-
 drivers/staging/fsl-mc/bus/mc-msi.c |2 +-
 drivers/staging/fsl-mc/include/dpbp-cmd.h   |4 +-
 drivers/staging/fsl-mc/include/dpbp.h   |   51 +-
 drivers/staging/fsl-mc/include/dprc.h   |   19 ++--
 drivers/staging/fsl-mc/include/mc-private.h |2 +
 17 files changed, 335 insertions(+), 200 deletions(-)

-- 
1.7.9.5

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


[PATCH 05/14] staging: fsl-mc: update dprc binary interface to v5.1

2016-04-11 Thread Stuart Yoder
From: Stuart Yoder 

The meaning of the "status" parameter in dprc_get_irq_status
has changed, and this patch updates the flib and caller
of the API.

Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/dprc-cmd.h|4 ++--
 drivers/staging/fsl-mc/bus/dprc-driver.c |1 +
 drivers/staging/fsl-mc/bus/dprc.c|   26 +-
 drivers/staging/fsl-mc/bus/mc-msi.c  |2 +-
 drivers/staging/fsl-mc/include/dprc.h|   19 ---
 5 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dprc-cmd.h 
b/drivers/staging/fsl-mc/bus/dprc-cmd.h
index 6552c20..d0198f5 100644
--- a/drivers/staging/fsl-mc/bus/dprc-cmd.h
+++ b/drivers/staging/fsl-mc/bus/dprc-cmd.h
@@ -41,8 +41,8 @@
 #define _FSL_DPRC_CMD_H
 
 /* DPRC Version */
-#define DPRC_VER_MAJOR 4
-#define DPRC_VER_MINOR 0
+#define DPRC_VER_MAJOR 5
+#define DPRC_VER_MINOR 1
 
 /* Command IDs */
 #define DPRC_CMDID_CLOSE   0x800
diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c 
b/drivers/staging/fsl-mc/bus/dprc-driver.c
index 31488a7..4334f3c 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
@@ -423,6 +423,7 @@ static irqreturn_t dprc_irq0_handler_thread(int irq_num, 
void *arg)
if (WARN_ON(!msi_desc || msi_desc->irq != (u32)irq_num))
goto out;
 
+   status = 0;
error = dprc_get_irq_status(mc_io, 0, mc_dev->mc_handle, 0,
&status);
if (error < 0) {
diff --git a/drivers/staging/fsl-mc/bus/dprc.c 
b/drivers/staging/fsl-mc/bus/dprc.c
index 381b9a9..a2c4737 100644
--- a/drivers/staging/fsl-mc/bus/dprc.c
+++ b/drivers/staging/fsl-mc/bus/dprc.c
@@ -265,7 +265,7 @@ int dprc_get_irq(struct fsl_mc_io *mc_io,
/* retrieve response parameters */
irq_cfg->val = mc_dec(cmd.params[0], 0, 32);
irq_cfg->paddr = mc_dec(cmd.params[1], 0, 64);
-   irq_cfg->user_irq_id = mc_dec(cmd.params[2], 0, 32);
+   irq_cfg->irq_num = mc_dec(cmd.params[2], 0, 32);
*type = mc_dec(cmd.params[2], 32, 32);
 
return 0;
@@ -296,7 +296,7 @@ int dprc_set_irq(struct fsl_mc_io *mc_io,
cmd.params[0] |= mc_enc(32, 8, irq_index);
cmd.params[0] |= mc_enc(0, 32, irq_cfg->val);
cmd.params[1] |= mc_enc(0, 64, irq_cfg->paddr);
-   cmd.params[2] |= mc_enc(0, 32, irq_cfg->user_irq_id);
+   cmd.params[2] |= mc_enc(0, 32, irq_cfg->irq_num);
 
/* send command to mc*/
return mc_send_command(mc_io, &cmd);
@@ -466,6 +466,7 @@ int dprc_get_irq_status(struct fsl_mc_io *mc_io,
/* prepare command */
cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_IRQ_STATUS,
  cmd_flags, token);
+   cmd.params[0] |= mc_enc(0, 32, *status);
cmd.params[0] |= mc_enc(32, 8, irq_index);
 
/* send command to mc*/
@@ -948,6 +949,7 @@ int dprc_get_obj(struct fsl_mc_io *mc_io,
obj_desc->state = mc_dec(cmd.params[1], 32, 32);
obj_desc->ver_major = mc_dec(cmd.params[2], 0, 16);
obj_desc->ver_minor = mc_dec(cmd.params[2], 16, 16);
+   obj_desc->flags = mc_dec(cmd.params[2], 32, 16);
obj_desc->type[0] = mc_dec(cmd.params[3], 0, 8);
obj_desc->type[1] = mc_dec(cmd.params[3], 8, 8);
obj_desc->type[2] = mc_dec(cmd.params[3], 16, 8);
@@ -1042,6 +1044,7 @@ int dprc_get_obj_desc(struct fsl_mc_io *mc_io,
obj_desc->state = (u32)mc_dec(cmd.params[1], 32, 32);
obj_desc->ver_major = (u16)mc_dec(cmd.params[2], 0, 16);
obj_desc->ver_minor = (u16)mc_dec(cmd.params[2], 16, 16);
+   obj_desc->flags = mc_dec(cmd.params[2], 32, 16);
obj_desc->type[0] = (char)mc_dec(cmd.params[3], 0, 8);
obj_desc->type[1] = (char)mc_dec(cmd.params[3], 8, 8);
obj_desc->type[2] = (char)mc_dec(cmd.params[3], 16, 8);
@@ -1108,7 +,7 @@ int dprc_set_obj_irq(struct fsl_mc_io *mc_io,
cmd.params[0] |= mc_enc(32, 8, irq_index);
cmd.params[0] |= mc_enc(0, 32, irq_cfg->val);
cmd.params[1] |= mc_enc(0, 64, irq_cfg->paddr);
-   cmd.params[2] |= mc_enc(0, 32, irq_cfg->user_irq_id);
+   cmd.params[2] |= mc_enc(0, 32, irq_cfg->irq_num);
cmd.params[2] |= mc_enc(32, 32, obj_id);
cmd.params[3] |= mc_enc(0, 8, obj_type[0]);
cmd.params[3] |= mc_enc(8, 8, obj_type[1]);
@@ -1189,7 +1192,7 @@ int dprc_get_obj_irq(struct fsl_mc_io *mc_io,
/* retrieve response parameters */
irq_cfg->val = (u32)mc_dec(cmd.params[0], 0, 32);
irq_cfg->paddr = (u64)mc_dec(cmd.params[1], 0, 64);
-   irq_cfg->user_irq_id = (int)mc_dec(cmd.params[2], 0, 32);
+   irq_cfg->irq_num = (int)mc_dec(cmd.params[2], 0, 32);
*type = (int)mc_dec(cmd.params[2], 32, 32);
 
return 0;
@@ -1437,14 +1440,8 @@ EXPORT_SYMBOL(dprc_set_obj_label);
  *

[PATCH 01/14] staging: fsl-mc: TODO updates

2016-04-11 Thread Stuart Yoder
From: Stuart Yoder 

remove 3 of the remaining TODO items:

   -multiple root fsl-mc buses-- done in patch series starting with
commit 14f928054a05 ("staging: fsl-mc: abstract test for existence
of fsl-mc bus")

   -interrupt support-- done in patch series starting with
commit 9b1b282ccd81 ("irqdomain: Added domain bus token
DOMAIN_BUS_FSL_MC_MSI")

   -MC command serialization-- done in commit 63f2be5c3b358 ("staging:
fsl-mc: Added serialization to mc_send_command()")

Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/TODO |   13 -
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/fsl-mc/TODO b/drivers/staging/fsl-mc/TODO
index 3894368..54a8bc6 100644
--- a/drivers/staging/fsl-mc/TODO
+++ b/drivers/staging/fsl-mc/TODO
@@ -1,21 +1,8 @@
-* Decide if multiple root fsl-mc buses will be supported per Linux instance,
-  and if so add support for this.
-
 * Add at least one device driver for a DPAA2 object (child device of the
   fsl-mc bus).  Most likely candidate for this is adding DPAA2 Ethernet
   driver support, which depends on drivers for several objects: DPNI,
   DPIO, DPMAC.  Other pre-requisites include:
 
- * interrupt support. for meaningful driver support we need
-   interrupts, and thus need message interrupt support by the bus
-   driver.
-  -Note: this has dependencies on generic MSI support work
-   in process upstream, see [1] and [2].
-
- * Management Complex (MC) command serialization. locking mechanisms
-   are needed by drivers to serialize commands sent to the MC, including
-   from atomic context.
-
  * MC firmware uprev.  The MC firmware upon which the fsl-mc
bus driver and DPAA2 object drivers are based is continuing
to evolve, so minor updates are needed to keep in sync with binary
-- 
1.7.9.5

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


[PATCH 14/14] MAINTAINERS: fsl-mc: Add second maintainer

2016-04-11 Thread Stuart Yoder
From: Stuart Yoder 

Add Stuart Yoder as additional maintainer of fsl-mc bus driver.

Signed-off-by: Stuart Yoder 
---
 MAINTAINERS |1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 03e00c7..62db04e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4670,6 +4670,7 @@ F:sound/soc/fsl/mpc8610_hpcd.c
 
 FREESCALE QORIQ MANAGEMENT COMPLEX DRIVER
 M: "J. German Rivera" 
+M: Stuart Yoder 
 L: linux-ker...@vger.kernel.org
 S: Maintained
 F: drivers/staging/fsl-mc/
-- 
1.7.9.5

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


[PATCH 11/14] staging: fsl-mc: add quirk handling for dpseci objects < 4.0

2016-04-11 Thread Stuart Yoder
From: Horia Geanta 

dpseci objects < 4.0 are not coherent-- in spite of the fact
that the MC reports them to be coherent in certain versions.
Add a special case to set the no shareability flag for dpseci
objects < 4.0.

Signed-off-by: Horia Geanta 
(Stuart: reworded commit message, updated comment in patch)
Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/dprc-driver.c |9 +
 1 file changed, 9 insertions(+)

diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c 
b/drivers/staging/fsl-mc/bus/dprc-driver.c
index 53c6e98..7fc4717 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
@@ -312,6 +312,15 @@ int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev,
continue;
}
 
+   /*
+* add a quirk for all versions of dpsec < 4.0...none
+* are coherent regardless of what the MC reports.
+*/
+   if ((strcmp(obj_desc->type, "dpseci") == 0) &&
+   (obj_desc->ver_major < 4))
+   obj_desc->flags |=
+   DPRC_OBJ_FLAG_NO_MEM_SHAREABILITY;
+
irq_count += obj_desc->irq_count;
dev_dbg(&mc_bus_dev->dev,
"Discovered object: type %s, id %d\n",
-- 
1.7.9.5

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


[PATCH 13/14] staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures

2016-04-11 Thread Stuart Yoder
From: Horia Geantă 

There are some error paths that allow for a NULL new_mc_io and err = 0
return code. Return -EINVAL instead.

Signed-off-by: Horia Geantă 
Signed-off-by: Stuart Yoder 
---
 drivers/staging/fsl-mc/bus/mc-allocator.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c 
b/drivers/staging/fsl-mc/bus/mc-allocator.c
index 4676ba1..7ee71e7 100644
--- a/drivers/staging/fsl-mc/bus/mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
@@ -306,6 +306,7 @@ int __must_check fsl_mc_portal_allocate(struct 
fsl_mc_device *mc_dev,
if (error < 0)
return error;
 
+   error = -EINVAL;
dpmcp_dev = resource->data;
if (WARN_ON(!dpmcp_dev))
goto error_cleanup_resource;
-- 
1.7.9.5

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


[PATCHv2] MAINTAINERS: Add Android Ion as a separate entry

2016-04-11 Thread Laura Abbott
The android drivers have a few other people reviewing patches.
Add a separate entry to ensure patches go to the right people.

Signed-off-by: Laura Abbott 
---
v2: Drop RFC tag
---
 MAINTAINERS | 9 +
 1 file changed, 9 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 40eb1db..c697c6e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -776,6 +776,15 @@ S: Supported
 F: drivers/android/
 F: drivers/staging/android/
 
+ANDROID ION DRIVER
+M: Laura Abbott 
+M: Sumit Semwal 
+L: de...@driverdev.osuosl.org
+S: Supported
+F: drivers/staging/android/ion
+F: drivers/staging/android/uapi/ion.h
+F: drivers/staging/android/uapi/ion_test.h
+
 AOA (Apple Onboard Audio) ALSA DRIVER
 M: Johannes Berg 
 L: linuxppc-...@lists.ozlabs.org
-- 
2.5.5

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


Re: [PATCH 14/14] MAINTAINERS: fsl-mc: Add second maintainer

2016-04-11 Thread Greg KH
On Mon, Apr 11, 2016 at 11:50:48AM -0500, Stuart Yoder wrote:
> From: Stuart Yoder 
> 
> Add Stuart Yoder as additional maintainer of fsl-mc bus driver.
> 
> Signed-off-by: Stuart Yoder 

I need an ack from the existing maintainer for this, and the other
patches in this series :)

thanks,

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


[PATCH 2/3] staging: comedi: ni_stc.h: Prefer kernel type 'u8' over 'uint8_t'

2016-04-11 Thread H Hartley Sweeten
Change the type to fix the checkpatch.pl issues.

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---
 drivers/staging/comedi/drivers/ni_stc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/ni_stc.h 
b/drivers/staging/comedi/drivers/ni_stc.h
index 8423dbc..e848697 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -1032,7 +1032,7 @@ struct ni_private {
unsigned short pwm_down_count;
 
unsigned short ai_fifo_buffer[0x2000];
-   uint8_t eeprom_buffer[M_SERIES_EEPROM_SIZE];
+   u8 eeprom_buffer[M_SERIES_EEPROM_SIZE];
__be32 serial_number;
 
struct mite_struct *mite;
-- 
2.6.3

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


[PATCH 3/3] staging: comedi: ni_stc.h: tidy up block comments

2016-04-11 Thread H Hartley Sweeten
Tidy up the block comments to fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---
 drivers/staging/comedi/drivers/ni_stc.h | 35 -
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_stc.h 
b/drivers/staging/comedi/drivers/ni_stc.h
index e848697..896bc02 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -1,24 +1,23 @@
 /*
-module/ni_stc.h
-Register descriptions for NI DAQ-STC chip
-
-COMEDI - Linux Control and Measurement Device Interface
-Copyright (C) 1998-9 David A. Schleef 
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-*/
+ * Register descriptions for NI DAQ-STC chip
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 1998-9 David A. Schleef 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 
 /*
-   References:
-   DAQ-STC Technical Reference Manual
+ * References:
+ *   DAQ-STC Technical Reference Manual
 */
 
 #ifndef _COMEDI_NI_STC_H
-- 
2.6.3

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


[PATCH 0/3] staging: comedi: ni_stc.h: fix checkpatch.pl issues

2016-04-11 Thread H Hartley Sweeten
Fix the checkpatch.pl issues in this file.

H Hartley Sweeten (3):
  staging: comedi: ni_stc.h: Prefer 'unsigned int' to bare use of 'unsigned'
  staging: comedi: ni_stc.h: Prefer kernel type 'u8' over 'uint8_t'
  staging: comedi: ni_stc.h: tidy up block comments

 drivers/staging/comedi/drivers/ni_stc.h | 45 -
 1 file changed, 22 insertions(+), 23 deletions(-)

-- 
2.6.3

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


[PATCH 1/3] staging: comedi: ni_stc.h: Prefer 'unsigned int' to bare use of 'unsigned'

2016-04-11 Thread H Hartley Sweeten
Change the types to fix the checkpatch.pl issues.

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---
 drivers/staging/comedi/drivers/ni_stc.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_stc.h 
b/drivers/staging/comedi/drivers/ni_stc.h
index 1d5af25..8423dbc 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -958,7 +958,7 @@ struct ni_board_struct {
unsigned int ao_maxdata;
int ao_fifo_depth;
const struct comedi_lrange *ao_range_table;
-   unsigned ao_speed;
+   unsigned int ao_speed;
 
int reg_type;
unsigned int has_8255:1;
@@ -1007,7 +1007,7 @@ struct ni_private {
struct ni_gpct_device *counter_dev;
unsigned short an_trig_etc_reg;
 
-   unsigned ai_offset[512];
+   unsigned int ai_offset[512];
 
unsigned long serial_interval_ns;
unsigned char serial_hw_mode;
@@ -1025,8 +1025,8 @@ struct ni_private {
unsigned short g0_g1_select_reg;
unsigned short cdio_dma_select_reg;
 
-   unsigned clock_ns;
-   unsigned clock_source;
+   unsigned int clock_ns;
+   unsigned int clock_source;
 
unsigned short pwm_up_count;
unsigned short pwm_down_count;
-- 
2.6.3

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


[PATCH] staging: comedi: plx9080.h: rename CamelCase enum value

2016-04-11 Thread H Hartley Sweeten
Rename the enum value to fix the checkpatch.pl issue:
CHECK: Avoid CamelCase: 

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---
 drivers/staging/comedi/drivers/plx9080.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/plx9080.h 
b/drivers/staging/comedi/drivers/plx9080.h
index f5cd6d5..8d1aee00b1 100644
--- a/drivers/staging/comedi/drivers/plx9080.h
+++ b/drivers/staging/comedi/drivers/plx9080.h
@@ -88,7 +88,7 @@ enum marb_bits {
/* direct slave LLOCKo# enable */
MARB_DS_LLOCK_ENABLE = 0x0040,
MARB_PCI_REQUEST_MODE = 0x0080,
-   MARB_PCIv21_MODE = 0x0100,  /* pci specification v2.1 mode */
+   MARB_PCIV21_MODE = 0x0100,  /* pci specification v2.1 mode */
MARB_PCI_READ_NO_WRITE_MODE = 0x0200,
MARB_PCI_READ_WITH_WRITE_FLUSH_MODE = 0x0400,
/* gate local bus latency timer with BREQ */
-- 
2.6.3

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


[PATCH] staging: comedi: amcc_s5933.h: tidy up comment issues

2016-04-11 Thread H Hartley Sweeten
Tidy up the comments to fix the checkpatch.pl isses:
WARNING: Block comments use * on subsequent lines
WARNING: line over 80 characters

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---
 drivers/staging/comedi/drivers/amcc_s5933.h | 24 +++-
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/comedi/drivers/amcc_s5933.h 
b/drivers/staging/comedi/drivers/amcc_s5933.h
index d4b8c01..f03e4c8 100644
--- a/drivers/staging/comedi/drivers/amcc_s5933.h
+++ b/drivers/staging/comedi/drivers/amcc_s5933.h
@@ -1,16 +1,14 @@
 /*
-comedi/drivers/amcc_s5933.h
-
-Stuff for AMCC S5933 PCI Controller
-
-Author: Michal Dobes 
-
-Inspirated from general-purpose AMCC S5933 PCI Matchmaker driver
-made by Andrea Cisternino  
-and as result of espionage from MITE code made by David A. Schleef.
-Thanks to AMCC for their on-line documentation and bus master DMA
-example.
-*/
+ * Stuff for AMCC S5933 PCI Controller
+ *
+ * Author: Michal Dobes 
+ *
+ * Inspirated from general-purpose AMCC S5933 PCI Matchmaker driver
+ * made by Andrea Cisternino  
+ * and as result of espionage from MITE code made by David A. Schleef.
+ * Thanks to AMCC for their on-line documentation and bus master DMA
+ * example.
+ */
 
 #ifndef _AMCC_S5933_H_
 #define _AMCC_S5933_H_
@@ -58,7 +56,7 @@
 #define INTCSR_INTR_ASSERTED   0x80
 
 //
-/* AMCC - PCI non-volatile ram command register (byte 3 of master 
control/status register) */
+/* AMCC - PCI non-volatile ram command register (byte 3 of AMCC_OP_REG_MCSR) */
 //
 #define MCSR_NV_LOAD_LOW_ADDR  0x0
 #define MCSR_NV_LOAD_HIGH_ADDR 0x20
-- 
2.6.3

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


[PATCH] staging: comedi: comedi_8254.h: tidy up the register map defines

2016-04-11 Thread H Hartley Sweeten
Tidy up the defines to fix the checkpatch.pl issues:
CHECK: Prefer using the BIT macro

Signed-off-by: H Hartley Sweeten 
Cc: Ian Abbott 
Cc: Greg Kroah-Hartman 
---
 drivers/staging/comedi/drivers/comedi_8254.h | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/comedi_8254.h 
b/drivers/staging/comedi/drivers/comedi_8254.h
index f4610ea..a12c294 100644
--- a/drivers/staging/comedi/drivers/comedi_8254.h
+++ b/drivers/staging/comedi/drivers/comedi_8254.h
@@ -53,13 +53,15 @@ struct comedi_subdevice;
 #define I8254_COUNTER2_REG 0x02
 #define I8254_CTRL_REG 0x03
 #define I8254_CTRL_SEL_CTR(x)  ((x) << 6)
-#define I8254_CTRL_READBACK_COUNT  ((3 << 6) | (1 << 4))
-#define I8254_CTRL_READBACK_STATUS ((3 << 6) | (1 << 5))
+#define I8254_CTRL_READBACK(x) (I8254_CTRL_SEL_CTR(3) | BIT(x))
+#define I8254_CTRL_READBACK_COUNT  I8254_CTRL_READBACK(4)
+#define I8254_CTRL_READBACK_STATUS I8254_CTRL_READBACK(5)
 #define I8254_CTRL_READBACK_SEL_CTR(x) (2 << (x))
-#define I8254_CTRL_LATCH   (0 << 4)
-#define I8254_CTRL_LSB_ONLY(1 << 4)
-#define I8254_CTRL_MSB_ONLY(2 << 4)
-#define I8254_CTRL_LSB_MSB (3 << 4)
+#define I8254_CTRL_RW(x)   (((x) & 0x3) << 4)
+#define I8254_CTRL_LATCH   I8254_CTRL_RW(0)
+#define I8254_CTRL_LSB_ONLYI8254_CTRL_RW(1)
+#define I8254_CTRL_MSB_ONLYI8254_CTRL_RW(2)
+#define I8254_CTRL_LSB_MSB I8254_CTRL_RW(3)
 
 /* counter maps zero to 0x1 */
 #define I8254_MAX_COUNT0x1
-- 
2.6.3

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


[PATCH] staging: lustre: libcfs: Fix warnings reported by 'make C=1'

2016-04-11 Thread Aleksey Fedotov
>From 08473aa48a1726c09dbab43e99059be9b0e88af2 Mon Sep 17 00:00:00 2001
From: Aleksei Fedotov 
Date: Mon, 11 Apr 2016 21:13:27 +0300
Subject: [PATCH] staging: lustre: libcfs: Fix warnings reported by sparse

This patch fixes sparse warnings:

lustre/lnet/libcfs/linux/linux-module.c:177:35: warning: incorrect type
in argument 2 (different address spaces)

lustre/lnet/libcfs/module.c:101:5: error: symbol 'libcfs_ioctl'
redeclared with different type

Signed-off-by: Aleksey Fedotov 
---
 drivers/staging/lustre/include/linux/libcfs/libcfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index 9158c61..4141afb 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -106,7 +106,7 @@ int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand);
 int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp,
 			 const struct libcfs_ioctl_hdr __user *uparam);
 int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data);
-int libcfs_ioctl(unsigned long cmd, void *arg);
+int libcfs_ioctl(unsigned long cmd, void __user *arg);
 
 /* container_of depends on "likely" which is defined in libcfs_private.h */
 static inline void *__container_of(void *ptr, unsigned long shift)
-- 
2.5.5

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


Re: [lustre-devel] [PATCH] staging: lustre: Fix warnings reported by sparse

2016-04-11 Thread James Simmons

> On Mon, Apr 11, 2016 at 10:28:51PM +0300, Aleksey Fedotov wrote:
> > >From c3b19bf16c1a11f78362847646399309c4ff6d41 Mon Sep 17 00:00:00 2001
> > From: Aleksei Fedotov 
> > Date: Mon, 11 Apr 2016 21:13:27 +0300
> > Subject: [PATCH] staging: lustre: Fix warnings reported by sparse
> 
> What is all of this here for?
> 
> And always cc: the public driverdevel mailing list for all staging
> patches, like get_maintainer.pl told you to...

For the new people wanting to get involved in the lustre upstream
client please read this link:

http://wiki.lustre.org/Upstream_contributing

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


RE: [PATCH 00/14] staging: fsl-mc: misc updates

2016-04-11 Thread Jose Rivera
> -Original Message-
> From: Stuart Yoder [mailto:stuart.yo...@nxp.com]
> Sent: Monday, April 11, 2016 11:48 AM
> To: gre...@linuxfoundation.org; Jose Rivera 
> Cc: de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org; ag...@suse.de;
> a...@arndb.de; Yang-Leo Li ; Stuart Yoder
> 
> Subject: [PATCH 00/14] staging: fsl-mc: misc updates
> 
> From: Stuart Yoder 
> 
> This patch series makes further progress towards completing the fsl-mc TODO
> list.
> 
> -patch 1 removes three items from the TODO file that were previously
>  completed-- multiple root dprc support, MSI support, and command
> serialization
> 
> -patch 2 makes some way overdue updates to README.txt from review
> comments on the mailing list last fall
> 
> -patches 3-5 update the binary interface for several objects to  sync with 
> latest
> MC firmware (todo item: "MC firmware uprev")
> 
> -patches 6-13 are cleanup items
>-change in how object versions are used in binding decisions
>-setting coherent dma_ops for devices if necessary
>-setting cacheable flag for object regions if applicable
>-getting the version of the root dprc from hardware, not based
> on what was in the .h file
>-dprc driver now refuses to probe if dprc version is not minimum
> expected
>-added quirk for bug in coherency flag for dpseci objects
>-allocator driver refuses to bind to dpmcp objects if version
> is not minimum expected
> 
> -patch 14 adds a second maintainer for the driver
> 
> Horia Geanta (1):
>   staging: fsl-mc: add quirk handling for dpseci objects < 4.0
> 
> Horia Geantă (1):
>   staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate()
> failures
> 
> Itai Katz (5):
>   staging: fsl-mc: don't use object versions to make binding decisions
>   staging: fsl-mc: set cacheable flag for added devices if applicable
>   staging: fsl-mc: get version of root dprc from MC hardware
>   staging: fsl-mc: add dprc version check
>   staging: fsl-mc: add dpmcp version check
> 
> Stuart Yoder (7):
>   staging: fsl-mc: TODO updates
>   staging: fsl-mc: DPAA2 overview readme update
>   staging: fsl-mc: update dpmcp binary interface to v3.0
>   staging: fsl-mc: update dpbp binary interface to v2.2
>   staging: fsl-mc: update dprc binary interface to v5.1
>   staging: fsl-mc: set up coherent dma ops for added devices
>   MAINTAINERS: fsl-mc: Add second maintainer
> 
>  MAINTAINERS |1 +
>  drivers/staging/fsl-mc/README.txt   |  138 
> ---
>  drivers/staging/fsl-mc/TODO |   13 ---
>  drivers/staging/fsl-mc/bus/dpbp.c   |   77 ++-
>  drivers/staging/fsl-mc/bus/dpmcp-cmd.h  |7 +-
>  drivers/staging/fsl-mc/bus/dpmcp.c  |   35 +--
>  drivers/staging/fsl-mc/bus/dpmcp.h  |   10 +-
>  drivers/staging/fsl-mc/bus/dprc-cmd.h   |6 +-
>  drivers/staging/fsl-mc/bus/dprc-driver.c|   33 ++-
>  drivers/staging/fsl-mc/bus/dprc.c   |   26 ++---
>  drivers/staging/fsl-mc/bus/mc-allocator.c   |   18 ++--
>  drivers/staging/fsl-mc/bus/mc-bus.c |   93 +-
>  drivers/staging/fsl-mc/bus/mc-msi.c |2 +-
>  drivers/staging/fsl-mc/include/dpbp-cmd.h   |4 +-
>  drivers/staging/fsl-mc/include/dpbp.h   |   51 +-
>  drivers/staging/fsl-mc/include/dprc.h   |   19 ++--
>  drivers/staging/fsl-mc/include/mc-private.h |2 +
>  17 files changed, 335 insertions(+), 200 deletions(-)
> 
> --
> 1.7.9.5

Acked-by: German Rivera 

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


Re: [PATCH] staging: lustre: libcfs: Fix warnings reported by 'make C=1'

2016-04-11 Thread Greg Kroah-Hartman
On Mon, Apr 11, 2016 at 11:50:13PM +0300, Aleksey Fedotov wrote:
> >From 08473aa48a1726c09dbab43e99059be9b0e88af2 Mon Sep 17 00:00:00 2001
> From: Aleksei Fedotov 
> Date: Mon, 11 Apr 2016 21:13:27 +0300
> Subject: [PATCH] staging: lustre: libcfs: Fix warnings reported by sparse

Why is this here in the body of your patch?

Please use git send-email so it does not show up.

thanks,

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


Re: [PATCH] staging: lustre: libcfs: Fix warnings reported by 'make C=1'

2016-04-11 Thread Drokin, Oleg

On Apr 11, 2016, at 4:50 PM, Aleksey Fedotov wrote:

> From 08473aa48a1726c09dbab43e99059be9b0e88af2 Mon Sep 17 00:00:00 2001
> From: Aleksei Fedotov 
> Date: Mon, 11 Apr 2016 21:13:27 +0300
> Subject: [PATCH] staging: lustre: libcfs: Fix warnings reported by sparse

A better title would be something like:
staging: lustre: libcfs: Fix libcfs_ioctl() prototype.

Thanks.

> 
> This patch fixes sparse warnings:
> 
> lustre/lnet/libcfs/linux/linux-module.c:177:35: warning: incorrect type
> in argument 2 (different address spaces)
> 
> lustre/lnet/libcfs/module.c:101:5: error: symbol 'libcfs_ioctl'
> redeclared with different type
> 
> Signed-off-by: Aleksey Fedotov 
> ---
> drivers/staging/lustre/include/linux/libcfs/libcfs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h 
> b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
> index 9158c61..4141afb 100644
> --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
> +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
> @@ -106,7 +106,7 @@ int libcfs_deregister_ioctl(struct libcfs_ioctl_handler 
> *hand);
> int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp,
>const struct libcfs_ioctl_hdr __user *uparam);
> int libcfs_ioctl_data_adjust(struct libcfs_ioctl_data *data);
> -int libcfs_ioctl(unsigned long cmd, void *arg);
> +int libcfs_ioctl(unsigned long cmd, void __user *arg);
> 
> /* container_of depends on "likely" which is defined in libcfs_private.h */
> static inline void *__container_of(void *ptr, unsigned long shift)
> -- 
> 2.5.5
> 

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


RE: [PATCH 00/14] staging: fsl-mc: misc updates

2016-04-11 Thread Jose Rivera
> -Original Message-
> From: Stuart Yoder [mailto:stuart.yo...@nxp.com]
> Sent: Monday, April 11, 2016 11:48 AM
> To: gre...@linuxfoundation.org; Jose Rivera 
> Cc: de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org; ag...@suse.de;
> a...@arndb.de; Yang-Leo Li ; Stuart Yoder
> 
> Subject: [PATCH 00/14] staging: fsl-mc: misc updates
> 
> From: Stuart Yoder 
> 
> This patch series makes further progress towards completing the fsl-mc TODO
> list.
> 
> -patch 1 removes three items from the TODO file that were previously
>  completed-- multiple root dprc support, MSI support, and command
> serialization
> 
> -patch 2 makes some way overdue updates to README.txt from review
> comments on the mailing list last fall
> 
> -patches 3-5 update the binary interface for several objects to  sync with 
> latest
> MC firmware (todo item: "MC firmware uprev")
> 
> -patches 6-13 are cleanup items
>-change in how object versions are used in binding decisions
>-setting coherent dma_ops for devices if necessary
>-setting cacheable flag for object regions if applicable
>-getting the version of the root dprc from hardware, not based
> on what was in the .h file
>-dprc driver now refuses to probe if dprc version is not minimum
> expected
>-added quirk for bug in coherency flag for dpseci objects
>-allocator driver refuses to bind to dpmcp objects if version
> is not minimum expected
> 
> -patch 14 adds a second maintainer for the driver
> 
> Horia Geanta (1):
>   staging: fsl-mc: add quirk handling for dpseci objects < 4.0
> 
> Horia Geantă (1):
>   staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate()
> failures
> 
> Itai Katz (5):
>   staging: fsl-mc: don't use object versions to make binding decisions
>   staging: fsl-mc: set cacheable flag for added devices if applicable
>   staging: fsl-mc: get version of root dprc from MC hardware
>   staging: fsl-mc: add dprc version check
>   staging: fsl-mc: add dpmcp version check
> 
> Stuart Yoder (7):
>   staging: fsl-mc: TODO updates
>   staging: fsl-mc: DPAA2 overview readme update
>   staging: fsl-mc: update dpmcp binary interface to v3.0
>   staging: fsl-mc: update dpbp binary interface to v2.2
>   staging: fsl-mc: update dprc binary interface to v5.1
>   staging: fsl-mc: set up coherent dma ops for added devices
>   MAINTAINERS: fsl-mc: Add second maintainer
> 
>  MAINTAINERS |1 +
>  drivers/staging/fsl-mc/README.txt   |  138 
> ---
>  drivers/staging/fsl-mc/TODO |   13 ---
>  drivers/staging/fsl-mc/bus/dpbp.c   |   77 ++-
>  drivers/staging/fsl-mc/bus/dpmcp-cmd.h  |7 +-
>  drivers/staging/fsl-mc/bus/dpmcp.c  |   35 +--
>  drivers/staging/fsl-mc/bus/dpmcp.h  |   10 +-
>  drivers/staging/fsl-mc/bus/dprc-cmd.h   |6 +-
>  drivers/staging/fsl-mc/bus/dprc-driver.c|   33 ++-
>  drivers/staging/fsl-mc/bus/dprc.c   |   26 ++---
>  drivers/staging/fsl-mc/bus/mc-allocator.c   |   18 ++--
>  drivers/staging/fsl-mc/bus/mc-bus.c |   93 +-
>  drivers/staging/fsl-mc/bus/mc-msi.c |2 +-
>  drivers/staging/fsl-mc/include/dpbp-cmd.h   |4 +-
>  drivers/staging/fsl-mc/include/dpbp.h   |   51 +-
>  drivers/staging/fsl-mc/include/dprc.h   |   19 ++--
>  drivers/staging/fsl-mc/include/mc-private.h |2 +
>  17 files changed, 335 insertions(+), 200 deletions(-)
> 
> --
> 1.7.9.5

For the series:
 Acked-by: German Rivera 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 13/14] staging: fsl-mc: return -EINVAL for all fsl_mc_portal_allocate() failures

2016-04-11 Thread Stuart Yoder

> -Original Message-
> From: Stuart Yoder 
> Date: Mon, Apr 11, 2016 at 11:56 AM
> Subject: [PATCH 13/14] staging: fsl-mc: return -EINVAL for all
> fsl_mc_portal_allocate() failures
> To: gre...@linuxfoundation.org, german.riv...@nxp.com
> Cc: de...@driverdev.osuosl.org, linux-ker...@vger.kernel.org,
> ag...@suse.de, a...@arndb.de, leoyang...@nxp.com, Horia Geantă
> , Stuart Yoder 
> 
> 
> From: Horia Geantă 
> 
> There are some error paths that allow for a NULL new_mc_io and err = 0
> return code. Return -EINVAL instead.
> 
> Signed-off-by: Horia Geantă 
> Signed-off-by: Stuart Yoder 
> ---
>  drivers/staging/fsl-mc/bus/mc-allocator.c |1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c
> b/drivers/staging/fsl-mc/bus/mc-allocator.c
> index 4676ba1..7ee71e7 100644
> --- a/drivers/staging/fsl-mc/bus/mc-allocator.c
> +++ b/drivers/staging/fsl-mc/bus/mc-allocator.c
> @@ -306,6 +306,7 @@ int __must_check fsl_mc_portal_allocate(struct
> fsl_mc_device *mc_dev,
> if (error < 0)
> return error;
> 
> +   error = -EINVAL;
> dpmcp_dev = resource->data;
> if (WARN_ON(!dpmcp_dev))
> goto error_cleanup_resource;
> --
> 1.7.9.5

I had smtp mail server weirdness that led me to belive that the freescale.com
email addresses in this patch were causing the patch to not show up on the
mailing list, so I resent [PATCH 13/14] with the email address changed to
nxp.com.  Then both copies of [PATCH 13/14] showed up.  So please ignore
the duplicated email for this patch.  Both copies are identical and either
either freescale.com or nxp.com are ok for the email address.  nxp.com
version would be preferred I guess.

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


Re: [PATCH 2/3] staging/lustre: Fix blank line after/before {/} style

2016-04-11 Thread Greg Kroah-Hartman
On Fri, Apr 01, 2016 at 03:18:02PM -0400, gr...@linuxhacker.ru wrote:
> From: Oleg Drokin 
> 
> This patch fixes all checkpatch occurences of
> CHECK: Blank lines aren't necessary after an open brace '{'
> CHECK: Blank lines aren't necessary before a close brace '}'
> in Lustre code.
> 
> Signed-off-by: Oleg Drokin 

Doesn't apply anymore after merging with 4.6-rc3, can you rebase and
resend?

thanks,

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


Re: [PATCH 18/18] staging: lustre: osc: Lustre returns EINTR from writes when SA_RESTART is set

2016-04-11 Thread Greg Kroah-Hartman
Some of this series didn't apply, due to merge issues with 4.6-rc3.  Can
you rebase and resend the remaining patches?

thanks,

greg k-h

On Mon, Apr 04, 2016 at 09:37:03PM -0400, James Simmons wrote:
> When Lustre is in a read or write system call and receives a
> SIGALRM, it will return EINTR if interrupted in osc_enter_cache.
> This prevents the system call from being restarted if
> SA_RESTART is set in the handler.
> 
> This patch changes behavior in this location to return ERESTARTSYS
> when a signal arrives during the call to l_wait_event.
> 
> Signed-off-by: Patrick Farrell 
> Signed-off-by: James Simmons 
> ntel-bug-id: https://jira.hpdd.intel.com/browse/LU-3581
> Reviewed-on: http://review.whamcloud.com/7002
> Reviewed-by: Rahul Deshmukh 
> Reviewed-by: Cory Spitz 
> Reviewed-by: Andreas Dilger 
> Signed-off-by: James Simmons 
> ---
>  drivers/staging/lustre/lustre/osc/osc_cache.c |   13 -
>  1 files changed, 12 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c 
> b/drivers/staging/lustre/lustre/osc/osc_cache.c
> index f09b89d..956d57b 100644
> --- a/drivers/staging/lustre/lustre/osc/osc_cache.c
> +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c
> @@ -1626,11 +1626,22 @@ static int osc_enter_cache(const struct lu_env *env, 
> struct client_obd *cli,
>  
>   /* l_wait_event is interrupted by signal, or timed out */
>   if (rc < 0) {
> - if (rc == -ETIMEDOUT) {
> + switch (rc) {
> + case -ETIMEDOUT:
>   OSC_DUMP_GRANT(D_ERROR, cli,
>  "try to reserve %d.\n", bytes);
>   osc_extent_tree_dump(D_ERROR, osc);
>   rc = -EDQUOT;
> + break;
> + case -EINTR:
> + /* Ensures restartability - LU-3581 */
> + rc = -ERESTARTSYS;
> + break;
> + default:
> + CDEBUG(D_CACHE, "%s: event for cache space @ %p 
> never arrived due to %d\n",
> +cli->cl_import->imp_obd->obd_name,
> +&ocw, rc);
> + break;
>   }
>   list_del_init(&ocw.ocw_entry);
>   goto out;
> -- 
> 1.7.1
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] staging: unisys: visornic: convert BUG_ON to dev_err() message

2016-04-11 Thread Greg KH
On Mon, Apr 04, 2016 at 11:31:14PM -0400, David Kershner wrote:
> From: Tim Sell 
> 
> The caller of visor_copy_fragsinfo_from_skb() is prepared to log a
> dev_err() message if it fails (by returning a negative value), so we now
> just fail in the one occasion where visor_copy_fragsinfo_from_skb() was
> doing a BUG_ON.
> 
> There was also a problem before where visor_copy_fragsinfo_from_skb() was
> returning a negative to indicate error, yet it was declared to return an
> unsigned value!  So obviously that needed correcting too.
> 
> Signed-off-by: Tim Sell 
> Signed-off-by: David Kershner 
> ---
>  drivers/staging/unisys/visornic/visornic_main.c | 8 +++-
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/unisys/visornic/visornic_main.c 
> b/drivers/staging/unisys/visornic/visornic_main.c
> index 763738d..cd30d0a 100644
> --- a/drivers/staging/unisys/visornic/visornic_main.c
> +++ b/drivers/staging/unisys/visornic/visornic_main.c
> @@ -209,7 +209,7 @@ static void poll_for_irq(unsigned long v);
>   *   Return value indicates number of entries filled in frags
>   *   Negative values indicate an error.
>   */
> -static unsigned int
> +static int
>  visor_copy_fragsinfo_from_skb(struct sk_buff *skb, unsigned int firstfraglen,
> unsigned int frags_max,
> struct phys_info frags[])
> @@ -269,11 +269,9 @@ visor_copy_fragsinfo_from_skb(struct sk_buff *skb, 
> unsigned int firstfraglen,
>* zero if the frags array is out of room
>* That should never happen because we
>* fail above, if count+numfrags > frags_max.
> -  * Given that theres no recovery mechanism from putting
> -  * half a packet in the I/O channel, panic here as this
> -  * should never happen
>*/
> - BUG_ON(!count);
> + if (!count)
> + return -1;

Please return a real error number, don't make up error numbers like -1
:(

thanks,

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


Re: [PATCH 01/17] staging: lustre: osc: fix race issues thanks to oap_lock

2016-04-11 Thread Greg Kroah-Hartman
On Sun, Apr 10, 2016 at 09:13:24AM -0400, James Simmons wrote:
> From: Sebastien Buisson 
> 
> Fix 'data race condition' defects found by Coverity version 6.5.0:
> 
> Data race condition (MISSING_LOCK)
> 
> Accessing variable without holding lock. Elsewhere,
> this variable is accessed with lock held.
> 
> This patch is dedicated to code fragments involving oap_lock.
> 
> Signed-off-by: Sebastien Buisson 
> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2744
> Reviewed-on: http://review.whamcloud.com/6572
> Reviewed-by: Oleg Drokin 
> Reviewed-by: Andreas Dilger 
> Signed-off-by: James Simmons 
> ---
>  drivers/staging/lustre/lustre/osc/osc_cache.c |8 
>  drivers/staging/lustre/lustre/osc/osc_io.c|2 ++
>  2 files changed, 10 insertions(+), 0 deletions(-)

This patch doesn't apply at all.  Can you rebase the whole series and
resend them?

thanks,

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


Re: [PATCH 00/24] staging: lustre: selftest: remove typedefs

2016-04-11 Thread Greg Kroah-Hartman
On Wed, Apr 06, 2016 at 03:25:26PM -0400, James Simmons wrote:
> The lnet selftest code is littered with typedefs. Convert these
> typedefs into their proper data types.

Not all of these applied, please fix up and resend the remaining ones.

thanks,

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