RE: [PATCH v2 3/6] staging: fsl-dpaa2/ethsw: Add ethtool support

2017-10-02 Thread Razvan Stefanescu


> -Original Message-
> From: Andrew Lunn [mailto:and...@lunn.ch]
> Sent: Monday, October 02, 2017 18:37
> To: Razvan Stefanescu 
> Cc: gre...@linuxfoundation.org; de...@driverdev.osuosl.org; linux-
> ker...@vger.kernel.org; net...@vger.kernel.org; ag...@suse.de;
> a...@arndb.de; Alexandru Marginean ;
> Bogdan Purcareata ; Ruxandra Ioana Radulescu
> ; Laurentiu Tudor ;
> stuyo...@gmail.com
> Subject: Re: [PATCH v2 3/6] staging: fsl-dpaa2/ethsw: Add ethtool support
> 
> Hi Razvan
> 
> > +static void ethsw_get_drvinfo(struct net_device *netdev,
> > + struct ethtool_drvinfo *drvinfo)
> > +{
> > +   struct ethsw_port_priv *port_priv = netdev_priv(netdev);
> > +   u16 version_major, version_minor;
> > +   int err;
> > +
> > +   strlcpy(drvinfo->driver, KBUILD_MODNAME, sizeof(drvinfo->driver));
> > +   strlcpy(drvinfo->version, ethsw_drv_version, sizeof(drvinfo->version));
> 
> Software driver versions are mostly useless. I would suggest you
> remove this.
> 
>Andrew
Thank you. I'll remove it in v3.

Best regards,
Razvan S.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 15:22:24 -0400
bfie...@fieldses.org (J. Bruce Fields) wrote:

> Mainly I'd just like to know which you're asking for.  Do you want me to
> apply this, or to ACK it so someone else can?  If it's sent as a series
> I tend to assume the latter.
> 
> But in this case I'm assuming it's the former, so I'll pick up the nfsd
> one
Could you to apply the NFSD patch ("nfsd: use ARRAY_SIZE") with the
Reviewed-by: Jeff Layton ) tag please ?

This patch is an individual patch and it should not have been sent in a
series (sorry about that).

Thank you,
Jérémy
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH RFC] media: staging/imx: fix complete handler

2017-10-02 Thread Steve Longerbeam



On 10/01/2017 04:36 PM, Russell King - ARM Linux wrote:

On Sun, Oct 01, 2017 at 01:16:53PM -0700, Steve Longerbeam wrote:

Right, imx_media_add_vdev_to_pa() has followed a link to an
entity that imx is not aware of.

The only effect of this patch (besides allowing the driver to load
with smiapp cameras), is that no controls from the unknown entity
will be inherited to the capture device nodes. That's not a big deal
since the controls presumably can still be accessed from the subdev
node.

smiapp is just one example I used to illustrate the problem.  The imx
media implementation must not claim subdevs exclusively for itself if
it's going to be useful, it has to cater for subdevs existing for
other hardware attached to it.

As you know, the camera that interests me is my IMX219 camera, and it's
regressed with your driver because of your insistence that you have sole
ownership over subdevs in the imx media stack


If by "sole ownership", you mean expecting async registration of subdevs
and setting up the media graph between them, imx-media will only do that
if those devices and the connections between them are described in the
device tree. If they are not, i.e. the subdevs and media pads and links are
created internally by the driver, then imx-media doesn't interfere with 
that.


But I agree your patch is a fix for a regression. It was created during some
final tweaks to the control inheritance code.



  - I'm having to carry more
and more hacks to workaround things that end up broken.  The imx-media
stack needs to start playing better with the needs of others, which it
can only do by allowing subdevs to be used by others.


Well, for example imx-media will chain s_stream until reaches your
IMX219 driver. It's then up to your driver to pass s_stream to the
subdevs that it owns.


   One way to
achieve that change that results in something that works is the patch
that I've posted - and tested.


 Can you change the error message to be more descriptive, something
like "any controls for unknown subdev %s will not be inherited\n" and maybe
convert to a warn. After that I will ack it.


The reason that the IMX219 driver users subdevs is because it's capable
of image cropping and binning on the camera module - which helps greatly
if you want to achieve higher FPS for high speed capture [*].

It also results in all controls (which are spread over the IMX219's two
subdevs) to be visible via the v4l2 video interface - I have all the
controls attached to the pixel array subdev as well as the controls
attached to the scaling subdev.


However, I still have some concerns about supporting smiapp cameras
in imx-media driver, and that is regarding pad indexes. The smiapp device
that exposes a source pad to the "outside world", which is either the binner
or the scaler entity, has a pad index of 1. But unless the device tree port
for the smiapp device is given a reg value of 1 for that port, imx-media
will assume it is pad 0, not 1.

For IMX219, the source pad on the scaler (which is connected to the CSI
input pad) is pad 0 - always has been.  So I guess this problem is hidden
because of that choice.  Maybe that's a problem for someone who has a
SMIAPP camera to address.


I'm working on a patch for smiapp.

Steve



Right now, my patch stack to get the imx219 on v4.14-rc1 working is:

media: staging/imx: fix complete handler
[media] v4l: async: don't bomb out on ->complete failure
media: imx-csi: fix burst size
media: imx: debug power on
ARM: dts: imx6qdl-hummingboard: add IMX219 camera
media: i2c: imx219 camera driver
media: imx: add frame intervals back in
fix lp-11 timeout

The frame interval patch is there because I just don't agree with the
position of the v4l2 folk, and keeping it means I don't have to screw
up my camera configuration scripts with special handling.  The
"fix lp-11 timeout" changes the LP-11 timeout to be a warning rather
than a failure - and contary to what FSL/NXP say, it works every time
on the iMX6 devices without needing to go through their workaround.


* - This is the whole reason I bought the IMX219, and have written the
IMX219 driver.  I want to use it for high speed capture of an arrow
leaving a recurve bow.  Why?  Everyone archer shoots subtly differently,
and I want to see what's happening to the arrows that are leaving my
bow.  However, for that to be achievable, I (a) need a working capture
implementation for imx6, and (b) I need to be able to quickly convert
bayer to an image, and (c) I need to either encode it on the fly, or
write the raw images to SSD.

(a) is thwarted by the breakage I keep stumbling over with the capture
code.

(b) I have using the GC320 GPU and a gstreamer plugin, trivially
converting the bayer data to grayscale.

(c) I've yet to achieve - encoding may be supported by the CODA v4l
driver, but nothing in userspace appears to support it, there's no
gstreamer v4l plugin for encoding, only one for decoding.  I also
suspect at either the 16G I have free on the SSD 

[PATCH] staging: rtlwifi: make various structures static

2017-10-02 Thread Colin King
From: Colin Ian King 

The structures created from macros RTL_DEBUG_IMPL_MAC_SERIES,
RTL_DEBUG_IMPL_BB_SERIES, RTL_DEBUG_IMPL_RF_SERIES and
RTL_DEBUG_IMPL_CAM_SERIES are all local to the source and do
not need to be in global scope, so make them static.

Cleans up 37 sparse warnings of the form:
symbol 'rtl_debug_priv_mac_0' was not declared. Should it be static?

Signed-off-by: Colin Ian King 
---
 drivers/staging/rtlwifi/debug.c | 32 
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtlwifi/debug.c b/drivers/staging/rtlwifi/debug.c
index 7446d71c41d1..63a9b70ec60f 100644
--- a/drivers/staging/rtlwifi/debug.c
+++ b/drivers/staging/rtlwifi/debug.c
@@ -127,10 +127,10 @@ static int rtl_debug_get_mac_page(struct seq_file *m, 
void *v)
return 0;
 }
 
-#define RTL_DEBUG_IMPL_MAC_SERIES(page, addr)  \
-struct rtl_debugfs_priv rtl_debug_priv_mac_ ##page = { \
-   .cb_read = rtl_debug_get_mac_page,  \
-   .cb_data = addr,\
+#define RTL_DEBUG_IMPL_MAC_SERIES(page, addr)  \
+static struct rtl_debugfs_priv rtl_debug_priv_mac_ ##page = {  \
+   .cb_read = rtl_debug_get_mac_page,  \
+   .cb_data = addr,\
 }
 
 RTL_DEBUG_IMPL_MAC_SERIES(0, 0x);
@@ -169,10 +169,10 @@ static int rtl_debug_get_bb_page(struct seq_file *m, void 
*v)
return 0;
 }
 
-#define RTL_DEBUG_IMPL_BB_SERIES(page, addr)   \
-struct rtl_debugfs_priv rtl_debug_priv_bb_ ##page = {  \
-   .cb_read = rtl_debug_get_bb_page,   \
-   .cb_data = addr,\
+#define RTL_DEBUG_IMPL_BB_SERIES(page, addr)   \
+static struct rtl_debugfs_priv rtl_debug_priv_bb_ ##page = {   \
+   .cb_read = rtl_debug_get_bb_page,   \
+   .cb_data = addr,\
 }
 
 RTL_DEBUG_IMPL_BB_SERIES(8, 0x0800);
@@ -216,10 +216,10 @@ static int rtl_debug_get_reg_rf(struct seq_file *m, void 
*v)
return 0;
 }
 
-#define RTL_DEBUG_IMPL_RF_SERIES(page, addr)   \
-struct rtl_debugfs_priv rtl_debug_priv_rf_ ##page = {  \
-   .cb_read = rtl_debug_get_reg_rf,\
-   .cb_data = addr,\
+#define RTL_DEBUG_IMPL_RF_SERIES(page, addr)   \
+static struct rtl_debugfs_priv rtl_debug_priv_rf_ ##page = {   \
+   .cb_read = rtl_debug_get_reg_rf,\
+   .cb_data = addr,\
 }
 
 RTL_DEBUG_IMPL_RF_SERIES(a, RF90_PATH_A);
@@ -271,10 +271,10 @@ static int rtl_debug_get_cam_register(struct seq_file *m, 
void *v)
return 0;
 }
 
-#define RTL_DEBUG_IMPL_CAM_SERIES(page, addr)  \
-struct rtl_debugfs_priv rtl_debug_priv_cam_ ##page = { \
-   .cb_read = rtl_debug_get_cam_register,  \
-   .cb_data = addr,\
+#define RTL_DEBUG_IMPL_CAM_SERIES(page, addr)  \
+static struct rtl_debugfs_priv rtl_debug_priv_cam_ ##page = {  \
+   .cb_read = rtl_debug_get_cam_register,  \
+   .cb_data = addr,\
 }
 
 RTL_DEBUG_IMPL_CAM_SERIES(1, 0);
-- 
2.14.1

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


[PATCH v3] staging: atomisp: add a driver for ov5648 camera sensor

2017-10-02 Thread Devid Antonio Filoni
The ov5648 5-megapixel camera sensor from OmniVision supports up to 2592x1944
resolution and MIPI CSI-2 interface. Output format is raw sRGB/Bayer with
10 bits per colour (SGRBG10_1X10).

This patch is a port of ov5648 driver after applying following
01org/ProductionKernelQuilts patches:
 - 0004-ov2680-ov5648-Fork-lift-source-from-CTS.patch
 - 0005-ov2680-ov5648-gminification.patch
 - 0006-ov5648-Focus-support.patch
 - 0007-Fix-resolution-issues-on-rear-camera.patch
 - 0008-ov2680-ov5648-Enabled-the-set_exposure-functions.patch
 - 0010-IRDA-cameras-mode-list-cleanup-unification.patch
 - 0012-ov5648-Add-1296x972-binned-mode.patch
 - 0014-ov5648-Adapt-to-Atomisp2-Gmin-VCM-framework.patch
 - 0015-dw9714-Gmin-Atomisp-specific-VCM-driver.patch
 - 0017-ov5648-Fix-deadlock-on-I2C-error.patch
 - 0018-gc2155-Fix-deadlock-on-error.patch
 - 0019-ov5648-Add-1280x960-binned-mode.patch
 - 0020-ov5648-Make-1280x960-as-default-video-resolution.patch
 - 0021-MALATA-Fix-testCameraToSurfaceTextureMetadata-CTS.patch
 - 0023-OV5648-Added-5MP-video-resolution.patch

New changes introduced during the port:
 - Rename entity types to entity functions
 - Replace v4l2_subdev_fh by v4l2_subdev_pad_config
 - Make use of media_bus_format enum
 - Rename media_entity_init function to media_entity_pads_init
 - Replace try_mbus_fmt by set_fmt
 - Replace s_mbus_fmt by set_fmt
 - Replace g_mbus_fmt by get_fmt
 - Use s_ctrl/g_volatile_ctrl instead of ctrl core ops
 - Update gmin platform API path
 - Constify acpi_device_id
 - Add "INT5648" value to acpi_device_id
 - Fix some checkpatch errors and warnings
 - Remove FSF's mailing address from the sample GPL notice

"INT5648" ACPI device id can be found in following production hardware:
BIOS Information
Vendor: LENOVO
Version: 1HCN40WW
Release Date: 11/04/2016
...
BIOS Revision: 0.40
Firmware Revision: 0.0
...
System Information
Manufacturer: LENOVO
Product Name: 80SG
Version: MIIX 310-10ICR
...
SKU Number: LENOVO_MT_80SG_BU_idea_FM_MIIX 310-10ICR
Family: IDEAPAD
...

Device DSDT excerpt:
Device (CA00)
{
Name (_ADR, Zero)  // _ADR: Address
Name (_HID, "INT5648")  // _HID: Hardware ID
Name (_CID, "INT5648")  // _CID: Compatible ID
Name (_SUB, "INTL")  // _SUB: Subsystem ID
Name (_DDN, "ov5648")  // _DDN: DOS Device Name
...

I was not able to properly test this patch on my Lenovo Miix 310 due to other
issues with atomisp, the output is the same as ov2680 driver (OVTI2680)
which is very similar.

Signed-off-by: Devid Antonio Filoni 
---
Changes in v2:
 - Fix indentation
 - Add atomisp prefix to Kconfig option

Changes in v3:
 - Use module_i2c_driver() macro
 - Switch i2c drivers to use ->probe_new()
 - Remove unused ->gpio_ctrl() callback
 - Remove unused ->power_ctrl() callback
 - Remove unneeded header inclusions
 - Sort header inclusions alphabetically
 - Replace kzalloc with devm_kzalloc
 - Remove "XXOV5648" acpi_device_id, we don't know if it's used in any 
production device
 - Use reverse XMAS tree declarations
 - Fix comments style
 - Remove __func__ from all dev_{dbg,info,err}() calls
 - Add missing new line chars in all dev_{dbg,info,err}() calls
 - Remove useless dev_{dbg,err}() calls
 - Fix all checkpatch.pl issues

 drivers/staging/media/atomisp/i2c/Kconfig  |   12 +
 drivers/staging/media/atomisp/i2c/Makefile |1 +
 drivers/staging/media/atomisp/i2c/atomisp-ov5648.c | 1787 

 drivers/staging/media/atomisp/i2c/ov5648.h |  828 +
 4 files changed, 2628 insertions(+)
 create mode 100644 drivers/staging/media/atomisp/i2c/atomisp-ov5648.c
 create mode 100644 drivers/staging/media/atomisp/i2c/ov5648.h

diff --git a/drivers/staging/media/atomisp/i2c/Kconfig 
b/drivers/staging/media/atomisp/i2c/Kconfig
index a76f17d..6bd849d 100644
--- a/drivers/staging/media/atomisp/i2c/Kconfig
+++ b/drivers/staging/media/atomisp/i2c/Kconfig
@@ -83,6 +83,18 @@ config VIDEO_ATOMISP_OV2680
 
 It currently only works with the atomisp driver.
 
+config VIDEO_ATOMISP_OV5648
+   tristate "Omnivision OV5648 sensor support"
+   depends on ACPI
+   depends on I2C && VIDEO_V4L2
+   ---help---
+This is a Video4Linux2 sensor-level driver for the Omnivision
+OV5648 raw camera.
+
+ov5648 is a 5M raw sensor.
+
+It currently only works with the atomisp driver.
+
 #
 # Kconfig for flash drivers
 #
diff --git a/drivers/staging/media/atomisp/i2c/Makefile 
b/drivers/staging/media/atomisp/i2c/Makefile
index f8b3505..bb9cf7b 100644
--- a/drivers/staging/media/atomisp/i2c/Makefile
+++ b/drivers/staging/media/atomisp/i2c/Makefile
@@ -8,6 +8,7 @@ obj-$(CONFIG_VIDEO_ATOMISP_MT9M114)+= atomisp-mt9m114.o
 obj-$(CONFIG_VIDEO_ATOMISP_GC2235) += atomisp-gc2235.o
 obj-$(CONFIG_VIDEO_ATOMISP_OV2722) += atomisp-ov2722.o
 

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread J. Bruce Fields
On Mon, Oct 02, 2017 at 07:35:54AM +0200, Greg KH wrote:
> On Sun, Oct 01, 2017 at 08:52:20PM -0400, Jérémy Lefaure wrote:
> > On Mon, 2 Oct 2017 09:01:31 +1100
> > "Tobin C. Harding"  wrote:
> > 
> > > > In order to reduce the size of the To: and Cc: lines, each patch of the
> > > > series is sent only to the maintainers and lists concerned by the patch.
> > > > This cover letter is sent to every list concerned by this series.  
> > > 
> > > Why don't you just send individual patches for each subsystem? I'm not a 
> > > maintainer but I don't see
> > > how any one person is going to be able to apply this whole series, it is 
> > > making it hard for
> > > maintainers if they have to pick patches out from among the series (if 
> > > indeed any will bother
> > > doing that).
> > Yeah, maybe it would have been better to send individual patches.
> > 
> > From my point of view it's a series because the patches are related (I
> > did a git format-patch from my local branch). But for the maintainers
> > point of view, they are individual patches.
> 
> And the maintainers view is what matters here, if you wish to get your
> patches reviewed and accepted...

Mainly I'd just like to know which you're asking for.  Do you want me to
apply this, or to ACK it so someone else can?  If it's sent as a series
I tend to assume the latter.

But in this case I'm assuming it's the former, so I'll pick up the nfsd
one

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


Re: [PATCH v5 2/2] staging: ion: create one device entry per heap

2017-10-02 Thread Laura Abbott
On 09/27/2017 06:20 AM, Benjamin Gaignard wrote:
> Instead a getting only one common device "/dev/ion" for
> all the heaps this patch allow to create one device
> entry ("/dev/ionX") per heap.
> Getting an entry per heap could allow to set security rules
> per heap and global ones for all heaps.
> 
> Allocation requests will be only allowed if the mask_id
> match with device minor.
> Query request could be done on any of the devices.
>
Thinking about this a bit more, I'm not 100% sure if this
will allow the security rules we want. Heap ids are assigned
dynamically and therefore so will the /dev/ionX designation.
>From my understanding, security rules like selinux need to
be fully specified at boot time so I'm not sure how you would
be able to write rules to differentiate between /dev/ionX and
/dev/ionY without knowing the values at boottime.

So I think we need a different way to match the heap ids to
get the security we want unless my understanding of security
policies is wrong and we can dynamically specify permissions.

Thanks,
Laura
> Signed-off-by: Benjamin Gaignard 
> ---
> version 5:
> - create a configuration flag to keep legacy Ion misc device
> 
> version 4:
> - add a configuration flag to switch between legacy Ion misc device
>   and one device per heap version.
> 
> version 3:
> - change ion_device_add_heap prototype to return a possible error.
> 
> version 2:
> - simplify ioctl check like propose by Dan
> - make sure that we don't register more than ION_DEV_MAX heaps.
> 
>  drivers/staging/android/TODO|  1 -
>  drivers/staging/android/ion/Kconfig |  7 +++
>  drivers/staging/android/ion/ion-ioctl.c | 18 --
>  drivers/staging/android/ion/ion.c   | 31 ++-
>  drivers/staging/android/ion/ion.h   | 15 +--
>  5 files changed, 66 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/android/TODO b/drivers/staging/android/TODO
> index 5f14247..d770ffa 100644
> --- a/drivers/staging/android/TODO
> +++ b/drivers/staging/android/TODO
> @@ -9,7 +9,6 @@ TODO:
>  ion/
>   - Add dt-bindings for remaining heaps (chunk and carveout heaps). This would
> involve putting appropriate bindings in a memory node for Ion to find.
> - - Split /dev/ion up into multiple nodes (e.g. /dev/ion/heap0)
>   - Better test framework (integration with VGEM was suggested)
>  
>  Please send patches to Greg Kroah-Hartman  and Cc:
> diff --git a/drivers/staging/android/ion/Kconfig 
> b/drivers/staging/android/ion/Kconfig
> index a517b2d..cb4666e 100644
> --- a/drivers/staging/android/ion/Kconfig
> +++ b/drivers/staging/android/ion/Kconfig
> @@ -10,6 +10,13 @@ menuconfig ION
> If you're not using Android its probably safe to
> say N here.
>  
> +config ION_LEGACY_DEVICE_API
> + bool "Keep using Ion legacy misc device API"
> + depends on ION
> + help
> +   Choose this option to keep using Ion legacy misc device API
> +   i.e. /dev/ion
> +
>  config ION_SYSTEM_HEAP
>   bool "Ion system heap"
>   depends on ION
> diff --git a/drivers/staging/android/ion/ion-ioctl.c 
> b/drivers/staging/android/ion/ion-ioctl.c
> index e26b786..bb5c77b 100644
> --- a/drivers/staging/android/ion/ion-ioctl.c
> +++ b/drivers/staging/android/ion/ion-ioctl.c
> @@ -25,7 +25,8 @@ union ion_ioctl_arg {
>   struct ion_heap_query query;
>  };
>  
> -static int validate_ioctl_arg(unsigned int cmd, union ion_ioctl_arg *arg)
> +static int validate_ioctl_arg(struct file *filp,
> +   unsigned int cmd, union ion_ioctl_arg *arg)
>  {
>   switch (cmd) {
>   case ION_IOC_HEAP_QUERY:
> @@ -34,6 +35,19 @@ static int validate_ioctl_arg(unsigned int cmd, union 
> ion_ioctl_arg *arg)
>   arg->query.reserved2 )
>   return -EINVAL;
>   break;
> +
> + case ION_IOC_ALLOC:
> + {
> + int mask = 1 << iminor(filp->f_inode);
> +
> +#ifdef CONFIG_ION_LEGACY_DEVICE_API
> + if (imajor(filp->f_inode) == MISC_MAJOR)
> + return 0;
> +#endif
> + if (!(arg->allocation.heap_id_mask & mask))
> + return -EINVAL;
> + break;
> + }
>   default:
>   break;
>   }
> @@ -69,7 +83,7 @@ long ion_ioctl(struct file *filp, unsigned int cmd, 
> unsigned long arg)
>   if (copy_from_user(, (void __user *)arg, _IOC_SIZE(cmd)))
>   return -EFAULT;
>  
> - ret = validate_ioctl_arg(cmd, );
> + ret = validate_ioctl_arg(filp, cmd, );
>   if (WARN_ON_ONCE(ret))
>   return ret;
>  
> diff --git a/drivers/staging/android/ion/ion.c 
> b/drivers/staging/android/ion/ion.c
> index 93e2c90..092b24c 100644
> --- a/drivers/staging/android/ion/ion.c
> +++ b/drivers/staging/android/ion/ion.c
> @@ -40,6 +40,8 @@
>  
>  #include "ion.h"
>  
> +#define ION_DEV_MAX 32
> +
>  static struct ion_device 

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread Mauro Carvalho Chehab
Em Sun, 1 Oct 2017 20:52:20 -0400
Jérémy Lefaure  escreveu:

> Anyway, I can tell to each maintainer that they can apply the patches
> they're concerned about and next time I may send individual patches.

In the case of media, we'll handle it as if they were individual ones.

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


Re: [REVIEW REQUEST] staging: unisys: review request for visorbus

2017-10-02 Thread gre...@linuxfoundation.org
On Mon, Oct 02, 2017 at 03:41:42PM +, Kershner, David A wrote:
> Hey Greg, we think the code for visorbus is ready to be moved out
> of staging, can you review it to see if we have missed anything?

I think your html email got rejected by the list :(

> The files include:
> /drivers/staging/unisys/visorbus/
> /drivers/staging/unisys/include/visorchannel.h
> /drivers/staging/unisys/include/visorbus.h
> 
> The directories staging/drivers/unisys/visornic, visorhba, and visorinput
> are not part of the review as well as the file
> drivers/staging/unisys/include/iochannel.h.
> 
> We currently have 5 checkpatch.pl warnings that I know about:
>  - 3 CHECKs in visorchannel that are due to a MACRO that gets passed a FIELD
> instead of just a variable
> - 2 WARNINGS dealing with char * becoming static const
> 
>  
> 
> Dan Carpenter found some extra parenthesis errors that I will address as
> well as look through the code to fix, but I would like to ask for the review
> while we are working on that.

Sure, I'll look at doing it in a week or so when I catch up with other
patches in my queue.

Everyone else is also welcome to do review :)

thanks,

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


Re: [PATCH v2 3/6] staging: fsl-dpaa2/ethsw: Add ethtool support

2017-10-02 Thread Andrew Lunn
Hi Razvan

> +static void ethsw_get_drvinfo(struct net_device *netdev,
> +   struct ethtool_drvinfo *drvinfo)
> +{
> + struct ethsw_port_priv *port_priv = netdev_priv(netdev);
> + u16 version_major, version_minor;
> + int err;
> +
> + strlcpy(drvinfo->driver, KBUILD_MODNAME, sizeof(drvinfo->driver));
> + strlcpy(drvinfo->version, ethsw_drv_version, sizeof(drvinfo->version));

Software driver versions are mostly useless. I would suggest you
remove this.

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


[PATCH] Add new uio device for PCI with dynamic memory allocation

2017-10-02 Thread Stahl, Manuel
This device combines the uio_pci_generic driver and the uio_dmem_genirq
driver since PCI uses a slightly different API for interrupts.
A fixed number of DMA capable memory regions can be defined using the
module parameter "dmem_sizes". The memory is not allocated until the uio
device file is opened for the first time. When the device file is closed,
the allocated memory block is freed. Physical (DMA) addresses for the
dynamic regions are provided to the userspace via
/sys/class/uio/uioX/maps/mapY/addr in the same way as static addresses are
when the uio device file is open, when no processes are holding the device
file open, the address returned to userspace is DMA_ERROR_CODE.

Signed-off-by: Manuel Stahl 
---
 MAINTAINERS   |   6 +
 drivers/uio/Kconfig   |   9 +
 drivers/uio/Makefile  |   1 +
 drivers/uio/uio_pci_dmem_genirq.c | 357 ++
 4 files changed, 373 insertions(+)
 create mode 100644 drivers/uio/uio_pci_dmem_genirq.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 65b0c88d5ee0..e135c171f88b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5801,6 +5801,12 @@ L:   k...@vger.kernel.org
 S: Supported
 F: drivers/uio/uio_pci_generic.c
 
+GENERIC UIO DRIVER FOR PCI DEVICES WITH DMA
+M: "Manuel Stahl" 
+L: k...@vger.kernel.org
+S: Supported
+F: drivers/uio/uio_pci_dmem_genirq.c
+
 GENWQE (IBM Generic Workqueue Card)
 M: Frank Haverkamp 
 M: Guilherme G. Piccoli 
diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig
index 7e8dc78a9796..30ca4d405378 100644
--- a/drivers/uio/Kconfig
+++ b/drivers/uio/Kconfig
@@ -93,6 +93,15 @@ config UIO_PCI_GENERIC
      primarily, for virtualization scenarios.
      If you compile this as a module, it will be called uio_pci_generic.
 
+config UIO_PCI_DMEM_GENIRQ
+   tristate "Generic driver for PCI 2.3 and PCI Express cards with DMA"
+   depends on PCI
+   help
+     Generic driver that you can bind, dynamically, to any
+     PCI 2.3 compliant and PCI Express card. It is useful
+  for FPGAs with DMA capability connected via PCI.
+     If you compile this as a module, it will be called 
uio_pci_dmem_genirq.
+
 config UIO_NETX
    tristate "Hilscher NetX Card driver"
    depends on PCI
diff --git a/drivers/uio/Makefile b/drivers/uio/Makefile
index e9663bb8a4c7..6c010c26695d 100644
--- a/drivers/uio/Makefile
+++ b/drivers/uio/Makefile
@@ -5,6 +5,7 @@ obj-$(CONFIG_UIO_DMEM_GENIRQ)   += uio_dmem_genirq.o
 obj-$(CONFIG_UIO_AEC)  += uio_aec.o
 obj-$(CONFIG_UIO_SERCOS3)  += uio_sercos3.o
 obj-$(CONFIG_UIO_PCI_GENERIC)  += uio_pci_generic.o
+obj-$(CONFIG_UIO_PCI_DMEM_GENIRQ)  += uio_pci_dmem_genirq.o
 obj-$(CONFIG_UIO_NETX) += uio_netx.o
 obj-$(CONFIG_UIO_PRUSS) += uio_pruss.o
 obj-$(CONFIG_UIO_MF624) += uio_mf624.o
diff --git a/drivers/uio/uio_pci_dmem_genirq.c 
b/drivers/uio/uio_pci_dmem_genirq.c
new file mode 100644
index ..989807029137
--- /dev/null
+++ b/drivers/uio/uio_pci_dmem_genirq.c
@@ -0,0 +1,357 @@
+/* uio_pci_generic - generic UIO driver for PCI 2.3 devices with DMA memory
+ *
+ * Copyright (C) 2016 Fraunhofer IIS
+ * Author: Manuel Stahl 
+ *
+ * Based on uio_pci_generic.c by Michael S. Tsirkin
+ * and uio_dmem_genirq.c by Damian Hobson-Garcia.
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.
+ *
+ * Since the driver does not declare any device ids, you must allocate
+ * id and bind the device to the driver yourself.  For example:
+ *
+ * # echo "8086 10f5" > /sys/bus/pci/drivers/uio_pci_dmem_genirq/new_id
+ * # echo -n :00:19.0 > /sys/bus/pci/drivers/e1000e/unbind
+ * # echo -n :00:19.0 > /sys/bus/pci/drivers/uio_pci_dmem_genirq/bind
+ * # ls -l /sys/bus/pci/devices/:00:19.0/driver
+ * .../:00:19.0/driver -> ../../../bus/pci/drivers/uio_pci_dmem_genirq
+ *
+ * Or use a modprobe alias:
+ * # alias pci:v10EEd1000sv*sd*sc*i* uio_pci_dmem_genirq
+ *
+ * Driver won't bind to devices which do not support the Interrupt Disable Bit
+ * in the command register. All devices compliant to PCI 2.3 (circa 2002) and
+ * all compliant PCI Express devices should support this bit.
+ *
+ * The DMA mask bits and sizes of dynamic regions are derived from module
+ * parameters.
+ *
+ * The format for specifying dynamic region sizes in module parameters
+ * is as follows:
+ *
+ * uio_pci_dmem_genirq.dmem_sizes := 
[;]
+ *    := :[,]
+ *    := :
+ *  := standard linux memsize
+ *
+ * Examples:
+ *
+ * 1) UIO dmem device with 3 dynamic regions:
+ * uio_pci_dmem_genirq.dmem_sizes=8086:10f5:4K,16K,4M
+ *
+ * 2) Two UIO dmem devices with different number of dynamic regions:
+ * uio_pci_dmem_genirq.dmem_sizes=8086:10f5:4K,16K,4M;1234:0001:8K
+ */
+

Re: [Outreachy kernel] [PATCH] staging: rts5208: use usleep_range instead of udelay

2017-10-02 Thread Julia Lawall


On Mon, 2 Oct 2017, Keerthi Reddy wrote:

> Since a its a slow device, allow a small range of 100

How do you know that it is a slow device?

Try to make the commit log message more self contained, not a continuation
of the subject line, and use the imperative.

julia

>
> Signed-off-by: Keerthi Reddy 
> ---
>  drivers/staging/rts5208/rtsx_card.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rts5208/rtsx_card.c 
> b/drivers/staging/rts5208/rtsx_card.c
> index a6b7bff..418e29d 100644
> --- a/drivers/staging/rts5208/rtsx_card.c
> +++ b/drivers/staging/rts5208/rtsx_card.c
> @@ -825,7 +825,7 @@ int switch_normal_clock(struct rtsx_chip *chip, int clk)
>   }
>
>   if (sd_vpclk_phase_reset) {
> - udelay(200);
> + usleep_range(200, 300);
>   retval = rtsx_write_register(chip, SD_VPCLK0_CTL,
>PHASE_NOT_RESET, PHASE_NOT_RESET);
>   if (retval) {
> @@ -838,7 +838,7 @@ int switch_normal_clock(struct rtsx_chip *chip, int clk)
>   rtsx_trace(chip);
>   return retval;
>   }
> - udelay(200);
> + usleep_range(200, 300);
>   }
>   retval = rtsx_write_register(chip, CLK_CTL, 0xFF, 0);
>   if (retval) {
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups 
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to outreachy-kernel+unsubscr...@googlegroups.com.
> To post to this group, send email to outreachy-ker...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/outreachy-kernel/20171002114322.GA8908%40manoharreddy.
> For more options, visit https://groups.google.com/d/optout.
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rts5208: use usleep_range instead of udelay

2017-10-02 Thread Keerthi Reddy
Since a its a slow device, allow a small range of 100

Signed-off-by: Keerthi Reddy 
---
 drivers/staging/rts5208/rtsx_card.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rts5208/rtsx_card.c 
b/drivers/staging/rts5208/rtsx_card.c
index a6b7bff..418e29d 100644
--- a/drivers/staging/rts5208/rtsx_card.c
+++ b/drivers/staging/rts5208/rtsx_card.c
@@ -825,7 +825,7 @@ int switch_normal_clock(struct rtsx_chip *chip, int clk)
}
 
if (sd_vpclk_phase_reset) {
-   udelay(200);
+   usleep_range(200, 300);
retval = rtsx_write_register(chip, SD_VPCLK0_CTL,
 PHASE_NOT_RESET, PHASE_NOT_RESET);
if (retval) {
@@ -838,7 +838,7 @@ int switch_normal_clock(struct rtsx_chip *chip, int clk)
rtsx_trace(chip);
return retval;
}
-   udelay(200);
+   usleep_range(200, 300);
}
retval = rtsx_write_register(chip, CLK_CTL, 0xFF, 0);
if (retval) {
-- 
2.7.4

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


Re: [PATCH 2/4] staging: ccree: simplify access to struct device

2017-10-02 Thread Joe Perches
On Mon, 2017-10-02 at 10:03 +0100, Gilad Ben-Yossef wrote:
> Introduce a DEV macro to retrieve struct device from private
> data structure in preparation to replacing custom logging
> macros with proper dev_dbg and friends which require struct
> device.
[]
> diff --git a/drivers/staging/ccree/ssi_driver.h 
> b/drivers/staging/ccree/ssi_driver.h
[]
> @@ -103,6 +103,8 @@
>  #define SSI_LOG_DEBUG(format, ...) do {} while (0)
>  #endif
>  
> +#define DEV(drvdata) ((&(drvdata)->plat_dev->dev))

The name seems not particularly descriptive.
It seems a longer name would
not be too bad.

Perhaps

static inline struct device *drvdata_to_dev(struct ssi_drvdata *drvdata)
{
return >plat_dev->dev;
}

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


Re: [RESEND PATCH 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver

2017-10-02 Thread Laurentiu Tudor
Hi Florian,

On 09/29/2017 07:11 PM, Florian Fainelli wrote:
> On September 29, 2017 6:59:18 AM PDT, Razvan Stefanescu 
>  wrote:
>>
>>
>>> -Original Message-
>>> From: Bogdan Purcareata
>>> Sent: Friday, September 29, 2017 16:36
>>> To: Razvan Stefanescu ;
>>> gre...@linuxfoundation.org
>>> Cc: de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org;
>>> net...@vger.kernel.org; ag...@suse.de; a...@arndb.de; Alexandru
>> Marginean
>>> ; Ruxandra Ioana Radulescu
>>> ; Laurentiu Tudor
>> ;
>>> stuyo...@gmail.com
>>> Subject: RE: [RESEND PATCH 2/6] staging: fsl-dpaa2/ethsw: Add
>> Freescale DPAA2
>>> Ethernet Switch driver
>>>
 Introduce the DPAA2 Ethernet Switch driver, which manages Datapath
>> Switch
 (DPSW) objects discovered on the MC bus.

 Suggested-by: Alexandru Marginean 
 Signed-off-by: Razvan Stefanescu 
>
> This looks pretty good for a new switchdev driver, is there a reason you 
> can't target drivers/net/ethernet instead of staging? Is it because the MC 
> bus code is still in staging (AFAICT)?

There's a pending patch [1] that moves the bus from staging to its place 
in drivers/bus. DPIO plus other bits and pieces are next on the list.

Greg,

Just a heads up: if this driver goes in first, then i'll need to re-spin 
my patch [1] to also update the #include's in this switch driver.

P.S. Any news on my patch? :-)

[1] https://www.spinics.net/lists/arm-kernel/msg603534.html

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


[PATCH 3/4] staging: ccree: move to generic device log infra

2017-10-02 Thread Gilad Ben-Yossef
Move over from using macro wrappers around to printk to
dev_err, dev_dbg and friends and clean up resulting fallout.

Signed-off-by: Gilad Ben-Yossef 
---
 drivers/staging/ccree/ssi_aead.c| 226 ++
 drivers/staging/ccree/ssi_buffer_mgr.c  | 394 +++-
 drivers/staging/ccree/ssi_buffer_mgr.h  |   5 +-
 drivers/staging/ccree/ssi_cipher.c  | 138 +--
 drivers/staging/ccree/ssi_driver.c  | 142 +---
 drivers/staging/ccree/ssi_driver.h  |  14 +-
 drivers/staging/ccree/ssi_fips.c|  12 +-
 drivers/staging/ccree/ssi_hash.c| 297 
 drivers/staging/ccree/ssi_ivgen.c   |  13 +-
 drivers/staging/ccree/ssi_pm.c  |  15 +-
 drivers/staging/ccree/ssi_request_mgr.c |  85 +++
 drivers/staging/ccree/ssi_sram_mgr.c|  16 +-
 drivers/staging/ccree/ssi_sysfs.c   |   3 +-
 13 files changed, 689 insertions(+), 671 deletions(-)

diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c
index 65be954..4d7aae3 100644
--- a/drivers/staging/ccree/ssi_aead.c
+++ b/drivers/staging/ccree/ssi_aead.c
@@ -95,14 +95,14 @@ static void ssi_aead_exit(struct crypto_aead *tfm)
struct ssi_aead_ctx *ctx = crypto_aead_ctx(tfm);
struct device *dev = DEV(ctx->drvdata);
 
-   SSI_LOG_DEBUG("Clearing context @%p for %s\n",
- crypto_aead_ctx(tfm), crypto_tfm_alg_name(>base));
+   dev_dbg(dev, "Clearing context @%p for %s\n", crypto_aead_ctx(tfm),
+   crypto_tfm_alg_name(>base));
 
/* Unmap enckey buffer */
if (ctx->enckey) {
dma_free_coherent(dev, AES_MAX_KEY_SIZE, ctx->enckey, 
ctx->enckey_dma_addr);
-   SSI_LOG_DEBUG("Freed enckey DMA buffer enckey_dma_addr=%pad\n",
- ctx->enckey_dma_addr);
+   dev_dbg(dev, "Freed enckey DMA buffer enckey_dma_addr=%pad\n",
+   >enckey_dma_addr);
ctx->enckey_dma_addr = 0;
ctx->enckey = NULL;
}
@@ -115,8 +115,8 @@ static void ssi_aead_exit(struct crypto_aead *tfm)
  xcbc->xcbc_keys,
  xcbc->xcbc_keys_dma_addr);
}
-   SSI_LOG_DEBUG("Freed xcbc_keys DMA buffer 
xcbc_keys_dma_addr=%pad\n",
- xcbc->xcbc_keys_dma_addr);
+   dev_dbg(dev, "Freed xcbc_keys DMA buffer 
xcbc_keys_dma_addr=%pad\n",
+   >xcbc_keys_dma_addr);
xcbc->xcbc_keys_dma_addr = 0;
xcbc->xcbc_keys = NULL;
} else if (ctx->auth_mode != DRV_HASH_NULL) { /* HMAC auth. */
@@ -126,8 +126,8 @@ static void ssi_aead_exit(struct crypto_aead *tfm)
dma_free_coherent(dev, 2 * MAX_HMAC_DIGEST_SIZE,
  hmac->ipad_opad,
  hmac->ipad_opad_dma_addr);
-   SSI_LOG_DEBUG("Freed ipad_opad DMA buffer 
ipad_opad_dma_addr=%pad\n",
- hmac->ipad_opad_dma_addr);
+   dev_dbg(dev, "Freed ipad_opad DMA buffer 
ipad_opad_dma_addr=%pad\n",
+   >ipad_opad_dma_addr);
hmac->ipad_opad_dma_addr = 0;
hmac->ipad_opad = NULL;
}
@@ -135,8 +135,8 @@ static void ssi_aead_exit(struct crypto_aead *tfm)
dma_free_coherent(dev, MAX_HMAC_BLOCK_SIZE,
  hmac->padded_authkey,
  hmac->padded_authkey_dma_addr);
-   SSI_LOG_DEBUG("Freed padded_authkey DMA buffer 
padded_authkey_dma_addr=%pad\n",
- hmac->padded_authkey_dma_addr);
+   dev_dbg(dev, "Freed padded_authkey DMA buffer 
padded_authkey_dma_addr=%pad\n",
+   >padded_authkey_dma_addr);
hmac->padded_authkey_dma_addr = 0;
hmac->padded_authkey = NULL;
}
@@ -151,7 +151,8 @@ static int ssi_aead_init(struct crypto_aead *tfm)
container_of(alg, struct ssi_crypto_alg, aead_alg);
struct device *dev = DEV(ssi_alg->drvdata);
 
-   SSI_LOG_DEBUG("Initializing context @%p for %s\n", ctx, 
crypto_tfm_alg_name(>base));
+   dev_dbg(dev, "Initializing context @%p for %s\n", ctx,
+   crypto_tfm_alg_name(>base));
 
/* Initialize modes in instance */
ctx->cipher_mode = ssi_alg->cipher_mode;
@@ -164,10 +165,11 @@ static int ssi_aead_init(struct crypto_aead *tfm)
ctx->enckey = dma_alloc_coherent(dev, AES_MAX_KEY_SIZE,
 >enckey_dma_addr, GFP_KERNEL);
if (!ctx->enckey) {
-   SSI_LOG_ERR("Failed allocating key buffer\n");
+   

[PATCH 2/4] staging: ccree: simplify access to struct device

2017-10-02 Thread Gilad Ben-Yossef
Introduce a DEV macro to retrieve struct device from private
data structure in preparation to replacing custom logging
macros with proper dev_dbg and friends which require struct
device.

Signed-off-by: Gilad Ben-Yossef 
---
 drivers/staging/ccree/ssi_aead.c| 11 ---
 drivers/staging/ccree/ssi_buffer_mgr.c  | 14 -
 drivers/staging/ccree/ssi_cipher.c  | 13 +++-
 drivers/staging/ccree/ssi_driver.c  | 22 +++---
 drivers/staging/ccree/ssi_driver.h  |  2 ++
 drivers/staging/ccree/ssi_hash.c| 53 -
 drivers/staging/ccree/ssi_pm.c  | 15 +-
 drivers/staging/ccree/ssi_request_mgr.c | 22 +++---
 8 files changed, 72 insertions(+), 80 deletions(-)

diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c
index 7a537f8..65be954 100644
--- a/drivers/staging/ccree/ssi_aead.c
+++ b/drivers/staging/ccree/ssi_aead.c
@@ -92,13 +92,12 @@ static inline bool valid_assoclen(struct aead_request *req)
 
 static void ssi_aead_exit(struct crypto_aead *tfm)
 {
-   struct device *dev = NULL;
struct ssi_aead_ctx *ctx = crypto_aead_ctx(tfm);
+   struct device *dev = DEV(ctx->drvdata);
 
SSI_LOG_DEBUG("Clearing context @%p for %s\n",
  crypto_aead_ctx(tfm), crypto_tfm_alg_name(>base));
 
-   dev = >drvdata->plat_dev->dev;
/* Unmap enckey buffer */
if (ctx->enckey) {
dma_free_coherent(dev, AES_MAX_KEY_SIZE, ctx->enckey, 
ctx->enckey_dma_addr);
@@ -146,11 +145,12 @@ static void ssi_aead_exit(struct crypto_aead *tfm)
 
 static int ssi_aead_init(struct crypto_aead *tfm)
 {
-   struct device *dev;
struct aead_alg *alg = crypto_aead_alg(tfm);
struct ssi_aead_ctx *ctx = crypto_aead_ctx(tfm);
struct ssi_crypto_alg *ssi_alg =
container_of(alg, struct ssi_crypto_alg, aead_alg);
+   struct device *dev = DEV(ssi_alg->drvdata);
+
SSI_LOG_DEBUG("Initializing context @%p for %s\n", ctx, 
crypto_tfm_alg_name(>base));
 
/* Initialize modes in instance */
@@ -158,7 +158,6 @@ static int ssi_aead_init(struct crypto_aead *tfm)
ctx->flow_mode = ssi_alg->flow_mode;
ctx->auth_mode = ssi_alg->auth_mode;
ctx->drvdata = ssi_alg->drvdata;
-   dev = >drvdata->plat_dev->dev;
crypto_aead_set_reqsize(tfm, sizeof(struct aead_req_ctx));
 
/* Allocate key buffer, cache line aligned */
@@ -426,7 +425,7 @@ ssi_get_plain_hmac_key(struct crypto_aead *tfm, const u8 
*key, unsigned int keyl
 {
dma_addr_t key_dma_addr = 0;
struct ssi_aead_ctx *ctx = crypto_aead_ctx(tfm);
-   struct device *dev = >drvdata->plat_dev->dev;
+   struct device *dev = DEV(ctx->drvdata);
u32 larval_addr = ssi_ahash_get_larval_digest_sram_addr(
ctx->drvdata, ctx->auth_mode);
struct ssi_crypto_req ssi_req = {};
@@ -1952,7 +1951,7 @@ static int ssi_aead_process(struct aead_request *req, 
enum drv_crypto_direction
struct crypto_aead *tfm = crypto_aead_reqtfm(req);
struct ssi_aead_ctx *ctx = crypto_aead_ctx(tfm);
struct aead_req_ctx *areq_ctx = aead_request_ctx(req);
-   struct device *dev = >drvdata->plat_dev->dev;
+   struct device *dev = DEV(ctx->drvdata);
struct ssi_crypto_req ssi_req = {};
 
SSI_LOG_DEBUG("%s context=%p req=%p iv=%p src=%p src_ofs=%d dst=%p 
dst_ofs=%d cryptolen=%d\n",
diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c 
b/drivers/staging/ccree/ssi_buffer_mgr.c
index 67c3296..a349bb1 100644
--- a/drivers/staging/ccree/ssi_buffer_mgr.c
+++ b/drivers/staging/ccree/ssi_buffer_mgr.c
@@ -514,7 +514,7 @@ int ssi_buffer_mgr_map_blkcipher_request(
struct blkcipher_req_ctx *req_ctx = (struct blkcipher_req_ctx *)ctx;
struct mlli_params *mlli_params = _ctx->mlli_params;
struct buff_mgr_handle *buff_mgr = drvdata->buff_mgr_handle;
-   struct device *dev = >plat_dev->dev;
+   struct device *dev = DEV(drvdata);
struct buffer_array sg_data;
u32 dummy = 0;
int rc = 0;
@@ -770,7 +770,7 @@ static inline int ssi_buffer_mgr_aead_chain_iv(
 {
struct aead_req_ctx *areq_ctx = aead_request_ctx(req);
unsigned int hw_iv_size = areq_ctx->hw_iv_size;
-   struct device *dev = >plat_dev->dev;
+   struct device *dev = DEV(drvdata);
int rc = 0;
 
if (unlikely(!req->iv)) {
@@ -1110,7 +1110,7 @@ static inline int ssi_buffer_mgr_aead_chain_data(
bool is_last_table, bool do_chain)
 {
struct aead_req_ctx *areq_ctx = aead_request_ctx(req);
-   struct device *dev = >plat_dev->dev;
+   struct device *dev = DEV(drvdata);
enum drv_crypto_direction direct = areq_ctx->gen_ctx.op_type;
unsigned int authsize = areq_ctx->req_authsize;
int src_last_bytes = 0, dst_last_bytes = 0;
@@ -1279,7 +1279,7 @@ int 

[PATCH 1/4] staging: ccree: remove sysfs if of deleted code

2017-10-02 Thread Gilad Ben-Yossef
The ccree cycle count mechanism was removed in
commit 7f821f0c6ffa ("staging: ccree: remove cycle count debug support")
but the sysfs interface lingered on. Remove it now.

Signed-off-by: Gilad Ben-Yossef 
---
 drivers/staging/ccree/ssi_sysfs.c | 266 --
 1 file changed, 266 deletions(-)

diff --git a/drivers/staging/ccree/ssi_sysfs.c 
b/drivers/staging/ccree/ssi_sysfs.c
index f7e0c502..e0810e2 100644
--- a/drivers/staging/ccree/ssi_sysfs.c
+++ b/drivers/staging/ccree/ssi_sysfs.c
@@ -24,260 +24,6 @@
 
 static struct ssi_drvdata *sys_get_drvdata(void);
 
-#ifdef CC_CYCLE_COUNT
-
-#include 
-
-struct stat_item {
-   unsigned int min;
-   unsigned int max;
-   cycles_t sum;
-   unsigned int count;
-};
-
-struct stat_name {
-   const char *op_type_name;
-   const char *stat_phase_name[MAX_STAT_PHASES];
-};
-
-static struct stat_name stat_name_db[MAX_STAT_OP_TYPES] = {
-   {
-   /* STAT_OP_TYPE_NULL */
-   .op_type_name = "NULL",
-   .stat_phase_name = {NULL},
-   },
-   {
-   .op_type_name = "Encode",
-   .stat_phase_name[STAT_PHASE_0] = "Init and sanity checks",
-   .stat_phase_name[STAT_PHASE_1] = "Map buffers",
-   .stat_phase_name[STAT_PHASE_2] = "Create sequence",
-   .stat_phase_name[STAT_PHASE_3] = "Send Request",
-   .stat_phase_name[STAT_PHASE_4] = "HW-Q push",
-   .stat_phase_name[STAT_PHASE_5] = "Sequence completion",
-   .stat_phase_name[STAT_PHASE_6] = "HW cycles",
-   },
-   {   .op_type_name = "Decode",
-   .stat_phase_name[STAT_PHASE_0] = "Init and sanity checks",
-   .stat_phase_name[STAT_PHASE_1] = "Map buffers",
-   .stat_phase_name[STAT_PHASE_2] = "Create sequence",
-   .stat_phase_name[STAT_PHASE_3] = "Send Request",
-   .stat_phase_name[STAT_PHASE_4] = "HW-Q push",
-   .stat_phase_name[STAT_PHASE_5] = "Sequence completion",
-   .stat_phase_name[STAT_PHASE_6] = "HW cycles",
-   },
-   {   .op_type_name = "Setkey",
-   .stat_phase_name[STAT_PHASE_0] = "Init and sanity checks",
-   .stat_phase_name[STAT_PHASE_1] = "Copy key to ctx",
-   .stat_phase_name[STAT_PHASE_2] = "Create sequence",
-   .stat_phase_name[STAT_PHASE_3] = "Send Request",
-   .stat_phase_name[STAT_PHASE_4] = "HW-Q push",
-   .stat_phase_name[STAT_PHASE_5] = "Sequence completion",
-   .stat_phase_name[STAT_PHASE_6] = "HW cycles",
-   },
-   {
-   .op_type_name = "Generic",
-   .stat_phase_name[STAT_PHASE_0] = "Interrupt",
-   .stat_phase_name[STAT_PHASE_1] = "ISR-to-Tasklet",
-   .stat_phase_name[STAT_PHASE_2] = "Tasklet start-to-end",
-   .stat_phase_name[STAT_PHASE_3] = "Tasklet:user_cb()",
-   .stat_phase_name[STAT_PHASE_4] = "Tasklet:dx_X_complete() - w/o 
X_complete()",
-   .stat_phase_name[STAT_PHASE_5] = "",
-   .stat_phase_name[STAT_PHASE_6] = "HW cycles",
-   }
-};
-
-/*
- * Structure used to create a directory
- * and its attributes in sysfs.
- */
-struct sys_dir {
-   struct kobject *sys_dir_kobj;
-   struct attribute_group sys_dir_attr_group;
-   struct attribute **sys_dir_attr_list;
-   u32 num_of_attrs;
-   struct ssi_drvdata *drvdata; /* Associated driver context */
-};
-
-/* top level directory structures */
-struct sys_dir sys_top_dir;
-
-static DEFINE_SPINLOCK(stat_lock);
-
-/* List of DBs */
-static struct stat_item stat_host_db[MAX_STAT_OP_TYPES][MAX_STAT_PHASES];
-static struct stat_item stat_cc_db[MAX_STAT_OP_TYPES][MAX_STAT_PHASES];
-
-static void init_db(struct stat_item item[MAX_STAT_OP_TYPES][MAX_STAT_PHASES])
-{
-   unsigned int i, j;
-
-   /* Clear db */
-   for (i = 0; i < MAX_STAT_OP_TYPES; i++) {
-   for (j = 0; j < MAX_STAT_PHASES; j++) {
-   item[i][j].min = 0x;
-   item[i][j].max = 0;
-   item[i][j].sum = 0;
-   item[i][j].count = 0;
-   }
-   }
-}
-
-static void update_db(struct stat_item *item, unsigned int result)
-{
-   item->count++;
-   item->sum += result;
-   if (result < item->min)
-   item->min = result;
-   if (result > item->max)
-   item->max = result;
-}
-
-static void display_db(struct stat_item 
item[MAX_STAT_OP_TYPES][MAX_STAT_PHASES])
-{
-   unsigned int i, j;
-   u64 avg;
-
-   for (i = STAT_OP_TYPE_ENCODE; i < MAX_STAT_OP_TYPES; i++) {
-   for (j = 0; j < MAX_STAT_PHASES; j++) {
-   if (item[i][j].count > 0) {
-   avg = (u64)item[i][j].sum;
-   do_div(avg, item[i][j].count);

[PATCH 4/4] staging: ccree: simplify OOM handling

2017-10-02 Thread Gilad Ben-Yossef
Simplify handling of memory allocation failures and remove
redundant log messages

Signed-off-by: Gilad Ben-Yossef 
---
 drivers/staging/ccree/ssi_cipher.c   | 11 --
 drivers/staging/ccree/ssi_driver.c   |  1 -
 drivers/staging/ccree/ssi_hash.c | 42 +---
 drivers/staging/ccree/ssi_ivgen.c|  9 +++-
 drivers/staging/ccree/ssi_sram_mgr.c | 20 ++---
 5 files changed, 28 insertions(+), 55 deletions(-)

diff --git a/drivers/staging/ccree/ssi_cipher.c 
b/drivers/staging/ccree/ssi_cipher.c
index cceaee8..3a74856 100644
--- a/drivers/staging/ccree/ssi_cipher.c
+++ b/drivers/staging/ccree/ssi_cipher.c
@@ -194,10 +194,9 @@ static int ssi_blkcipher_init(struct crypto_tfm *tfm)
 
/* Allocate key buffer, cache line aligned */
ctx_p->user.key = kmalloc(max_key_buf_size, GFP_KERNEL | GFP_DMA);
-   if (!ctx_p->user.key) {
-   dev_dbg(dev, "Allocating key buffer in context failed\n");
-   rc = -ENOMEM;
-   }
+   if (!ctx_p->user.key)
+   return -ENOMEM;
+
dev_dbg(dev, "Allocated key buffer in context. key=@%p\n",
ctx_p->user.key);
 
@@ -1245,10 +1244,8 @@ struct ssi_crypto_alg *ssi_ablkcipher_create_alg(struct 
ssi_alg_template
struct crypto_alg *alg;
 
t_alg = kzalloc(sizeof(*t_alg), GFP_KERNEL);
-   if (!t_alg) {
-   dev_dbg(dev, "failed to allocate t_alg\n");
+   if (!t_alg)
return ERR_PTR(-ENOMEM);
-   }
 
alg = _alg->crypto_alg;
 
diff --git a/drivers/staging/ccree/ssi_driver.c 
b/drivers/staging/ccree/ssi_driver.c
index 43f2301..aada60e 100644
--- a/drivers/staging/ccree/ssi_driver.c
+++ b/drivers/staging/ccree/ssi_driver.c
@@ -212,7 +212,6 @@ static int init_cc_resources(struct platform_device 
*plat_dev)
 
new_drvdata = devm_kzalloc(dev, sizeof(*new_drvdata), GFP_KERNEL);
if (!new_drvdata) {
-   dev_dbg(dev, "Failed to allocate drvdata");
rc = -ENOMEM;
goto post_drvdata_err;
}
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index cb4980a..8984a5b 100644
--- a/drivers/staging/ccree/ssi_hash.c
+++ b/drivers/staging/ccree/ssi_hash.c
@@ -157,34 +157,28 @@ static int ssi_hash_map_request(struct device *dev,
int rc = -ENOMEM;
 
state->buff0 = kzalloc(SSI_MAX_HASH_BLCK_SIZE, GFP_KERNEL | GFP_DMA);
-   if (!state->buff0) {
-   dev_err(dev, "Allocating buff0 in context failed\n");
+   if (!state->buff0)
goto fail0;
-   }
+
state->buff1 = kzalloc(SSI_MAX_HASH_BLCK_SIZE, GFP_KERNEL | GFP_DMA);
-   if (!state->buff1) {
-   dev_err(dev, "Allocating buff1 in context failed\n");
+   if (!state->buff1)
goto fail_buff0;
-   }
+
state->digest_result_buff = kzalloc(SSI_MAX_HASH_DIGEST_SIZE, 
GFP_KERNEL | GFP_DMA);
-   if (!state->digest_result_buff) {
-   dev_err(dev, "Allocating digest_result_buff in context 
failed\n");
+   if (!state->digest_result_buff)
goto fail_buff1;
-   }
+
state->digest_buff = kzalloc(ctx->inter_digestsize, GFP_KERNEL | 
GFP_DMA);
-   if (!state->digest_buff) {
-   dev_err(dev, "Allocating digest-buffer in context failed\n");
+   if (!state->digest_buff)
goto fail_digest_result_buff;
-   }
 
dev_dbg(dev, "Allocated digest-buffer in context 
ctx->digest_buff=@%p\n",
state->digest_buff);
if (ctx->hw_mode != DRV_CIPHER_XCBC_MAC) {
state->digest_bytes_len = kzalloc(HASH_LEN_SIZE, GFP_KERNEL | 
GFP_DMA);
-   if (!state->digest_bytes_len) {
-   dev_err(dev, "Allocating digest-bytes-len in context 
failed\n");
+   if (!state->digest_bytes_len)
goto fail1;
-   }
+
dev_dbg(dev, "Allocated digest-bytes-len in context 
state->>digest_bytes_len=@%p\n",
state->digest_bytes_len);
} else {
@@ -192,10 +186,9 @@ static int ssi_hash_map_request(struct device *dev,
}
 
state->opad_digest_buff = kzalloc(ctx->inter_digestsize, GFP_KERNEL | 
GFP_DMA);
-   if (!state->opad_digest_buff) {
-   dev_err(dev, "Allocating opad-digest-buffer in context 
failed\n");
+   if (!state->opad_digest_buff)
goto fail2;
-   }
+
dev_dbg(dev, "Allocated opad-digest-buffer in context 
state->digest_bytes_len=@%p\n",
state->opad_digest_buff);
 
@@ -2057,10 +2050,9 @@ ssi_hash_create_alg(struct ssi_hash_template *template, 
struct device *dev,
struct ahash_alg *halg;
 
t_crypto_alg = kzalloc(sizeof(*t_crypto_alg), GFP_KERNEL);
-   if (!t_crypto_alg) {
-   dev_dbg(dev, "failed to allocate t_crypto_alg\n");
+   if (!t_crypto_alg)
   

[PATCH 0/4] staging: ccree: logging related coding style fixes

2017-10-02 Thread Gilad Ben-Yossef
The following patch set cleans up some code and builds upon this to replace
ccree custom logging macros with the generic device dev_* facilities,
handles the resulting fallout and further simplifies logging handling in
some OOM error handling code path exposed by checkpatch following the
change.

Patch set based upon commit 1cd5929ab675 ("staging: greybus: light:
remove unnecessary error check") in the staging-next tree.

Signed-off-by: Gilad Ben-Yossef 

Gilad Ben-Yossef (4):
  staging: ccree: remove sysfs if of deleted code
  staging: ccree: simplify access to struct device
  staging: ccree: move to generic device log infra
  staging: ccree: simplify OOM handling

 drivers/staging/ccree/ssi_aead.c| 237 +++
 drivers/staging/ccree/ssi_buffer_mgr.c  | 408 +++-
 drivers/staging/ccree/ssi_buffer_mgr.h  |   5 +-
 drivers/staging/ccree/ssi_cipher.c  | 158 ++---
 drivers/staging/ccree/ssi_driver.c  | 163 ++---
 drivers/staging/ccree/ssi_driver.h  |  14 +-
 drivers/staging/ccree/ssi_fips.c|  12 +-
 drivers/staging/ccree/ssi_hash.c| 374 ++---
 drivers/staging/ccree/ssi_ivgen.c   |  18 +-
 drivers/staging/ccree/ssi_pm.c  |  30 +--
 drivers/staging/ccree/ssi_request_mgr.c | 107 +
 drivers/staging/ccree/ssi_sram_mgr.c|  30 +--
 drivers/staging/ccree/ssi_sysfs.c   | 269 +
 13 files changed, 771 insertions(+), 1054 deletions(-)

-- 
2.7.4

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


[PATCH v2 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver

2017-10-02 Thread Razvan Stefanescu
Introduce the DPAA2 Ethernet Switch driver, which manages Datapath Switch
(DPSW) objects discovered on the MC bus.

Suggested-by: Alexandru Marginean 
Signed-off-by: Razvan Stefanescu 
---
Changelog:
 v2:
- fix PVID cleanup in ethsw_port_add_vlan()
- rename err2 to ret in ethsw_port_add/del_vlan()
- avoid duplicate code in ethsw_probe()
- move destroy_workqueue to ethsw_takedown()
- have a function for unregistering notifiers
- above changes implement review comments for v1 from Bogdan P.

 drivers/staging/fsl-dpaa2/ethsw/Makefile |2 +-
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c  | 1531 ++
 drivers/staging/fsl-dpaa2/ethsw/ethsw.h  |   88 ++
 3 files changed, 1620 insertions(+), 1 deletion(-)
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/ethsw.c
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/ethsw.h

diff --git a/drivers/staging/fsl-dpaa2/ethsw/Makefile 
b/drivers/staging/fsl-dpaa2/ethsw/Makefile
index db137f7..a6d72d1 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/Makefile
+++ b/drivers/staging/fsl-dpaa2/ethsw/Makefile
@@ -4,4 +4,4 @@
 
 obj-$(CONFIG_FSL_DPAA2_ETHSW) += dpaa2-ethsw.o
 
-dpaa2-ethsw-objs := dpsw.o
+dpaa2-ethsw-objs := ethsw.o dpsw.o
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c 
b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
new file mode 100644
index 000..f45e5bb
--- /dev/null
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
@@ -0,0 +1,1531 @@
+/* Copyright 2014-2016 Freescale Semiconductor Inc.
+ * Copyright 2017 NXP
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 THE COPYRIGHT HOLDERS OR CONTRIBUTORS 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 "../../fsl-mc/include/mc.h"
+
+#include "ethsw.h"
+
+static struct workqueue_struct *ethsw_owq;
+
+/* Minimal supported DPSW version */
+#define DPSW_MIN_VER_MAJOR 8
+#define DPSW_MIN_VER_MINOR 0
+
+#define DEFAULT_VLAN_ID1
+
+static int ethsw_add_vlan(struct ethsw_core *ethsw, u16 vid)
+{
+   int err;
+
+   struct dpsw_vlan_cfgvcfg = {
+   .fdb_id = 0,
+   };
+
+   if (ethsw->vlans[vid]) {
+   dev_err(ethsw->dev, "VLAN already configured\n");
+   return -EEXIST;
+   }
+
+   err = dpsw_vlan_add(ethsw->mc_io, 0,
+   ethsw->dpsw_handle, vid, );
+   if (err) {
+   dev_err(ethsw->dev, "dpsw_vlan_add err %d\n", err);
+   return err;
+   }
+   ethsw->vlans[vid] = ETHSW_VLAN_MEMBER;
+
+   return 0;
+}
+
+static int ethsw_port_add_vlan(struct ethsw_port_priv *port_priv,
+  u16 vid, u16 flags)
+{
+   struct ethsw_core *ethsw = port_priv->ethsw_data;
+   struct net_device *netdev = port_priv->netdev;
+   struct dpsw_vlan_if_cfg vcfg;
+   bool is_oper;
+   int err, ret;
+
+   if (port_priv->vlans[vid]) {
+   netdev_warn(netdev, "VLAN %d already configured\n", vid);
+   return -EEXIST;
+   }
+
+   vcfg.num_ifs = 1;
+   vcfg.if_id[0] = port_priv->idx;
+   err = dpsw_vlan_add_if(ethsw->mc_io, 0, ethsw->dpsw_handle, vid, );
+   if (err) {
+

[PATCH v2 5/6] staging: fsl-dpaa2/ethsw: Add README

2017-10-02 Thread Razvan Stefanescu
Add a README file describing the driver architecture, components and
interfaces.

Signed-off-by: Razvan Stefanescu 
---
Changelog:
 v2:
- no changes

 drivers/staging/fsl-dpaa2/ethsw/README | 106 +
 1 file changed, 106 insertions(+)
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/README

diff --git a/drivers/staging/fsl-dpaa2/ethsw/README 
b/drivers/staging/fsl-dpaa2/ethsw/README
new file mode 100644
index 000..f6fc07f
--- /dev/null
+++ b/drivers/staging/fsl-dpaa2/ethsw/README
@@ -0,0 +1,106 @@
+DPAA2 Ethernet Switch driver
+
+
+This file provides documentation for the DPAA2 Ethernet Switch driver
+
+
+Contents
+
+   Supported Platforms
+   Architecture Overview
+   Creating an Ethernet Switch
+   Features
+
+
+   Supported Platforms
+===
+This driver provides networking support for Freescale LS2085A, LS2088A
+DPAA2 SoCs.
+
+
+Architecture Overview
+=
+The Ethernet Switch in the DPAA2 architecture consists of several hardware
+resources that provide the functionality. These are allocated and
+configured via the Management Complex (MC) portals. MC abstracts most of
+these resources as DPAA2 objects and exposes ABIs through which they can
+be configured and controlled.
+
+For a more detailed description of the DPAA2 architecture and its object
+abstractions see:
+   drivers/staging/fsl-mc/README.txt
+
+The Ethernet Switch is built on top of a Datapath Switch (DPSW) object.
+
+Configuration interface:
+
+  -
+ | DPAA2 Switch driver |
+  -
+   .
+   .
+  --
+ | DPSW API |
+  --
+   .   software
+ = . ==
+   .   hardware
+  -
+ | MC hardware portals |
+  -
+   .
+   .
+ --
+| DPSW |
+ --
+
+Driver uses the switch device driver model and exposes each switch port as
+a network interface, which can be included in a bridge. Traffic switched
+between ports is offloaded into the hardware. Exposed network interfaces
+are not used for I/O, they are used just for configuration. This
+limitation is going to be addressed in the future.
+
+The DPSW can have ports connected to DPNIs or to PHYs via DPMACs.
+
+
+ [ethA] [ethB] [ethC] [ethD] [ethE] [ethF]
+:  :  :  :  :  :
+:  :  :  :  :  :
+[eth drv]  [eth drv]  [ethsw drv  ]
+:  :  :  :  :  :kernel
+
+:  :  :  :  :  :hardware
+ [DPNI]  [DPNI] [= DPSW =]
+|  |  |  |  |  |
+|   --   |   [DPMAC][DPMAC]
+ ---|  |
+|  |
+  [PHY]  [PHY]
+
+For a more detailed description of the Ethernet switch device driver model
+see:
+   Documentation/networking/switchdev.txt
+
+Creating an Ethernet Switch
+===
+A device is created for the switch objects probed on the MC bus. Each DPSW
+has a number of properties which determine the configuration options and
+associated hardware resources.
+
+A DPSW object (and the other DPAA2 objects needed for a DPAA2 switch) can
+be added to a container on the MC bus in one of two ways: statically,
+through a Datapath Layout Binary file (DPL) that is parsed by MC at boot
+time; or created dynamically at runtime, via the DPAA2 objects APIs.
+
+Features
+
+Driver configures DPSW to perform hardware switching offload of
+unicast/multicast/broadcast (VLAN tagged or untagged) traffic between its
+ports.
+
+It allows configuration of hardware learning, flooding, multicast groups,
+port VLAN configuration and STP state.
+
+Static entries can be added/removed from the FDB.
+
+Hardware statistics for each port are provided through ethtool -S option.
-- 
1.9.1

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


[PATCH v2 4/6] staging: fsl-dpaa2/ethsw: Add maintainer for Ethernet Switch driver

2017-10-02 Thread Razvan Stefanescu
Signed-off-by: Razvan Stefanescu 
---
Changelog:
 v2:
- no changes

 MAINTAINERS | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 2281af4..cfd4f74 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4297,6 +4297,12 @@ L:   linux-ker...@vger.kernel.org
 S: Maintained
 F: drivers/staging/fsl-dpaa2/ethernet
 
+DPAA2 ETHERNET SWITCH DRIVER
+M: Razvan Stefanescu 
+L: linux-ker...@vger.kernel.org
+S: Maintained
+F: drivers/staging/fsl-dpaa2/ethsw
+
 DPT_I2O SCSI RAID DRIVER
 M: Adaptec OEM Raid Solutions 
 L: linux-s...@vger.kernel.org
-- 
1.9.1

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


[PATCH v2 6/6] staging: fsl-dpaa2/ethsw: Add TODO

2017-10-02 Thread Razvan Stefanescu
Add a TODO file describing what needs to be added/changed before the driver
can be moved out of staging.

Signed-off-by: Razvan Stefanescu 
---
Changelog:
 v2:
- no changes

 drivers/staging/fsl-dpaa2/ethsw/TODO | 14 ++
 1 file changed, 14 insertions(+)
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/TODO

diff --git a/drivers/staging/fsl-dpaa2/ethsw/TODO 
b/drivers/staging/fsl-dpaa2/ethsw/TODO
new file mode 100644
index 000..d3f12c3
--- /dev/null
+++ b/drivers/staging/fsl-dpaa2/ethsw/TODO
@@ -0,0 +1,14 @@
+* Add I/O capabilities on switch port netdevices. This will allow control
+traffic to reach the CPU.
+* Add ACL to redirect control traffic to CPU.
+* Add support for displaying learned FDB entries
+* MC firmware uprev; the DPAA2 objects used by the Ethernet Switch driver
+need to   be kept in sync with binary interface changes in MC
+* refine README file
+* cleanup
+
+NOTE: At least first three of the above are required before getting the
+DPAA2 Ethernet Switch driver out of staging. Another requirement is that
+the fsl-mc bus driver is moved to drivers/bus and dpio driver is moved to
+drivers/soc (this is required for I/O).
+
-- 
1.9.1

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


[PATCH v2 1/6] staging: fsl-dpaa2/ethsw: Add APIs for DPSW object

2017-10-02 Thread Razvan Stefanescu
Add the command build/parse APIs for operating on DPSW objects through
the DPAA2 Management Complex.

Signed-off-by: Razvan Stefanescu 
---
Changelog:
 v2:
- use u8 for en parameter of dpsw_if_set_flooding/broadcast()

 drivers/staging/fsl-dpaa2/Kconfig  |8 +
 drivers/staging/fsl-dpaa2/Makefile |1 +
 drivers/staging/fsl-dpaa2/ethsw/Makefile   |7 +
 drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h |  358 +
 drivers/staging/fsl-dpaa2/ethsw/dpsw.c | 1115 
 drivers/staging/fsl-dpaa2/ethsw/dpsw.h |  579 +++
 6 files changed, 2068 insertions(+)
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/Makefile
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/dpsw.c
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/dpsw.h

diff --git a/drivers/staging/fsl-dpaa2/Kconfig 
b/drivers/staging/fsl-dpaa2/Kconfig
index dfff675..8a508ef 100644
--- a/drivers/staging/fsl-dpaa2/Kconfig
+++ b/drivers/staging/fsl-dpaa2/Kconfig
@@ -16,3 +16,11 @@ config FSL_DPAA2_ETH
---help---
  Ethernet driver for Freescale DPAA2 SoCs, using the
  Freescale MC bus driver
+
+config FSL_DPAA2_ETHSW
+   tristate "Freescale DPAA2 Ethernet Switch"
+   depends on FSL_DPAA2
+   depends on NET_SWITCHDEV
+   ---help---
+   Driver for Freescale DPAA2 Ethernet Switch. Select
+   BRIDGE to have support for bridge tools.
diff --git a/drivers/staging/fsl-dpaa2/Makefile 
b/drivers/staging/fsl-dpaa2/Makefile
index 0836ba8..6cfd76b 100644
--- a/drivers/staging/fsl-dpaa2/Makefile
+++ b/drivers/staging/fsl-dpaa2/Makefile
@@ -3,3 +3,4 @@
 #
 
 obj-$(CONFIG_FSL_DPAA2_ETH)+= ethernet/
+obj-$(CONFIG_FSL_DPAA2_ETHSW)  += ethsw/
diff --git a/drivers/staging/fsl-dpaa2/ethsw/Makefile 
b/drivers/staging/fsl-dpaa2/ethsw/Makefile
new file mode 100644
index 000..db137f7
--- /dev/null
+++ b/drivers/staging/fsl-dpaa2/ethsw/Makefile
@@ -0,0 +1,7 @@
+#
+# Makefile for the Freescale DPAA2 Ethernet Switch
+#
+
+obj-$(CONFIG_FSL_DPAA2_ETHSW) += dpaa2-ethsw.o
+
+dpaa2-ethsw-objs := dpsw.o
diff --git a/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h 
b/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h
new file mode 100644
index 000..ddfd820
--- /dev/null
+++ b/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h
@@ -0,0 +1,358 @@
+/* Copyright 2013-2016 Freescale Semiconductor Inc.
+ * Copyright 2017 NXP
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 THE COPYRIGHT HOLDERS OR CONTRIBUTORS 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_DPSW_CMD_H
+#define __FSL_DPSW_CMD_H
+
+/* DPSW Version */
+#define DPSW_VER_MAJOR 8
+#define DPSW_VER_MINOR 0
+
+#define DPSW_CMD_BASE_VERSION  1
+#define DPSW_CMD_ID_OFFSET 4
+
+#define DPSW_CMD_ID(id)(((id) << DPSW_CMD_ID_OFFSET) | 
DPSW_CMD_BASE_VERSION)
+
+/* Command IDs */
+#define DPSW_CMDID_CLOSEDPSW_CMD_ID(0x800)
+#define DPSW_CMDID_OPEN DPSW_CMD_ID(0x802)
+
+#define DPSW_CMDID_GET_API_VERSION  DPSW_CMD_ID(0xa02)
+
+#define DPSW_CMDID_ENABLE   DPSW_CMD_ID(0x002)
+#define DPSW_CMDID_DISABLE  DPSW_CMD_ID(0x003)
+#define DPSW_CMDID_GET_ATTR 

[PATCH v2 3/6] staging: fsl-dpaa2/ethsw: Add ethtool support

2017-10-02 Thread Razvan Stefanescu
Add driver information, link details and hardware statistics to be
reported via ethtool -S.

Signed-off-by: Razvan Stefanescu 
---
Changelog:
 v2:
- no changes

 drivers/staging/fsl-dpaa2/ethsw/Makefile|   2 +-
 drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h  |  13 ++
 drivers/staging/fsl-dpaa2/ethsw/dpsw.c  |  32 
 drivers/staging/fsl-dpaa2/ethsw/dpsw.h  |  32 
 drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c | 207 
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c |   3 +
 drivers/staging/fsl-dpaa2/ethsw/ethsw.h |   3 +
 7 files changed, 291 insertions(+), 1 deletion(-)
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c

diff --git a/drivers/staging/fsl-dpaa2/ethsw/Makefile 
b/drivers/staging/fsl-dpaa2/ethsw/Makefile
index a6d72d1..de92cd9 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/Makefile
+++ b/drivers/staging/fsl-dpaa2/ethsw/Makefile
@@ -4,4 +4,4 @@
 
 obj-$(CONFIG_FSL_DPAA2_ETHSW) += dpaa2-ethsw.o
 
-dpaa2-ethsw-objs := ethsw.o dpsw.o
+dpaa2-ethsw-objs := ethsw.o ethsw-ethtool.o dpsw.o
diff --git a/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h 
b/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h
index ddfd820..06b71122 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h
+++ b/drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h
@@ -74,6 +74,8 @@
 #define DPSW_CMDID_IF_SET_FLOODING  DPSW_CMD_ID(0x047)
 #define DPSW_CMDID_IF_SET_BROADCAST DPSW_CMD_ID(0x048)
 
+#define DPSW_CMDID_IF_SET_LINK_CFG  DPSW_CMD_ID(0x04C)
+
 #define DPSW_CMDID_VLAN_ADD DPSW_CMD_ID(0x060)
 #define DPSW_CMDID_VLAN_ADD_IF  DPSW_CMD_ID(0x061)
 #define DPSW_CMDID_VLAN_ADD_IF_UNTAGGED DPSW_CMD_ID(0x062)
@@ -262,6 +264,17 @@ struct dpsw_cmd_if_set_max_frame_length {
__le16 frame_length;
 };
 
+struct dpsw_cmd_if_set_link_cfg {
+   /* cmd word 0 */
+   __le16 if_id;
+   u8 pad[6];
+   /* cmd word 1 */
+   __le32 rate;
+   __le32 pad1;
+   /* cmd word 2 */
+   __le64 options;
+};
+
 struct dpsw_cmd_if_get_link_state {
__le16 if_id;
 };
diff --git a/drivers/staging/fsl-dpaa2/ethsw/dpsw.c 
b/drivers/staging/fsl-dpaa2/ethsw/dpsw.c
index e65b6f5..f1a1fac 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/dpsw.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/dpsw.c
@@ -383,6 +383,38 @@ int dpsw_get_attributes(struct fsl_mc_io *mc_io,
 }
 
 /**
+ * dpsw_if_set_link_cfg() - Set the link 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 DPSW object
+ * @if_id: Interface id
+ * @cfg:   Link configuration
+ *
+ * Return: '0' on Success; Error code otherwise.
+ */
+int dpsw_if_set_link_cfg(struct fsl_mc_io *mc_io,
+u32 cmd_flags,
+u16 token,
+u16 if_id,
+struct dpsw_link_cfg *cfg)
+{
+   struct mc_command cmd = { 0 };
+   struct dpsw_cmd_if_set_link_cfg *cmd_params;
+
+   /* prepare command */
+   cmd.header = mc_encode_cmd_header(DPSW_CMDID_IF_SET_LINK_CFG,
+ cmd_flags,
+ token);
+   cmd_params = (struct dpsw_cmd_if_set_link_cfg *)cmd.params;
+   cmd_params->if_id = cpu_to_le16(if_id);
+   cmd_params->rate = cpu_to_le32(cfg->rate);
+   cmd_params->options = cpu_to_le64(cfg->options);
+
+   /* send command to mc*/
+   return mc_send_command(mc_io, );
+}
+
+/**
  * dpsw_if_get_link_state - Return the link state
  * @mc_io: Pointer to MC portal's I/O object
  * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
diff --git a/drivers/staging/fsl-dpaa2/ethsw/dpsw.h 
b/drivers/staging/fsl-dpaa2/ethsw/dpsw.h
index 7fa8a61..87369a5 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/dpsw.h
+++ b/drivers/staging/fsl-dpaa2/ethsw/dpsw.h
@@ -245,6 +245,38 @@ enum dpsw_action {
 };
 
 /**
+ * Enable auto-negotiation
+ */
+#define DPSW_LINK_OPT_AUTONEG  0x0001ULL
+/**
+ * Enable half-duplex mode
+ */
+#define DPSW_LINK_OPT_HALF_DUPLEX  0x0002ULL
+/**
+ * Enable pause frames
+ */
+#define DPSW_LINK_OPT_PAUSE0x0004ULL
+/**
+ * Enable a-symmetric pause frames
+ */
+#define DPSW_LINK_OPT_ASYM_PAUSE   0x0008ULL
+
+/**
+ * struct dpsw_link_cfg - Structure representing DPSW link configuration
+ * @rate: Rate
+ * @options: Mask of available options; use 'DPSW_LINK_OPT_' values
+ */
+struct dpsw_link_cfg {
+   u32 rate;
+   u64 options;
+};
+
+int dpsw_if_set_link_cfg(struct fsl_mc_io *mc_io,
+u32 cmd_flags,
+u16 token,
+u16 if_id,
+struct dpsw_link_cfg *cfg);
+/**
  * struct dpsw_link_state - Structure representing DPSW link state
  * @rate: Rate
  * @options: Mask of available 

[PATCH v2 0/6] staging: Introduce DPAA2 Ethernet Switch driver

2017-10-02 Thread Razvan Stefanescu
This patchset introduces the Ethernet Switch Driver for Freescale/NXP SoCs
with DPAA2 (DataPath Acceleration Architecture v2). The driver manages
switch objects discovered on the fsl-mc bus. A description of the driver
can be found in the associated README file.

The patchset consists of:
* A set of libraries containing APIs for configuring and controlling
  Management Complex (MC) switch objects
* The DPAA2 Ethernet Switch driver
* Patch adding ethtool support

Limitations:
* no support for control traffic to/from CPU
* only DPSW ports can be added to a bridge

Changelog:
 v2: addressed comments from Bogdan P.

Razvan Stefanescu (6):
  staging: fsl-dpaa2/ethsw: Add APIs for DPSW object
  staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver
  staging: fsl-dpaa2/ethsw: Add ethtool support
  staging: fsl-dpaa2/ethsw: Add maintainer for Ethernet Switch driver
  staging: fsl-dpaa2/ethsw: Add README
  staging: fsl-dpaa2/ethsw: Add TODO

 MAINTAINERS |6 +
 drivers/staging/fsl-dpaa2/Kconfig   |8 +
 drivers/staging/fsl-dpaa2/Makefile  |1 +
 drivers/staging/fsl-dpaa2/ethsw/Makefile|7 +
 drivers/staging/fsl-dpaa2/ethsw/README  |  106 ++
 drivers/staging/fsl-dpaa2/ethsw/TODO|   14 +
 drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h  |  371 ++
 drivers/staging/fsl-dpaa2/ethsw/dpsw.c  | 1147 +
 drivers/staging/fsl-dpaa2/ethsw/dpsw.h  |  611 +
 drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c |  207 +++
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 1534 +++
 drivers/staging/fsl-dpaa2/ethsw/ethsw.h |   91 ++
 12 files changed, 4103 insertions(+)
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/Makefile
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/README
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/TODO
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/dpsw.c
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/dpsw.h
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/ethsw.c
 create mode 100644 drivers/staging/fsl-dpaa2/ethsw/ethsw.h

-- 
1.9.1

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


Re: [PATCH] imx-csi: fix burst size

2017-10-02 Thread Philipp Zabel
Hi Russell,

On Fri, 2017-09-29 at 22:41 +0100, Russell King wrote:
> Setting a burst size of "8" doesn't work for IMX219 with 8-bit bayer,
> but a burst size of "16" does.  Fix this.

Do larger bursts work as well, if the width is divisible by the burst
length? Since the Bayer format can't pass through the IC direct path
anyway, 32-byte or 64-byte bursts may be possible.

> Signed-off-by: Russell King 
> ---
>  drivers/staging/media/imx/imx-media-csi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/imx/imx-media-csi.c
> b/drivers/staging/media/imx/imx-media-csi.c
> index 6d856118c223..e27bcdb63973 100644
> --- a/drivers/staging/media/imx/imx-media-csi.c
> +++ b/drivers/staging/media/imx/imx-media-csi.c
> @@ -341,7 +341,7 @@ static int csi_idmac_setup_channel(struct csi_priv
> *priv)
>   case V4L2_PIX_FMT_SGBRG8:
>   case V4L2_PIX_FMT_SGRBG8:
>   case V4L2_PIX_FMT_SRGGB8:
> - burst_size = 8;
> + burst_size = 16;
>   passthrough = true;
>   passthrough_bits = 8;
>   break;

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


RE: [RESEND PATCH 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver

2017-10-02 Thread Razvan Stefanescu
> -Original Message-
> From: Florian Fainelli [mailto:f.faine...@gmail.com]
> Sent: Friday, September 29, 2017 19:11
> To: Razvan Stefanescu ; Bogdan Purcareata
> ; gre...@linuxfoundation.org
> Cc: de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org;
> net...@vger.kernel.org; ag...@suse.de; a...@arndb.de; Alexandru Marginean
> ; Ruxandra Ioana Radulescu
> ; Laurentiu Tudor ;
> stuyo...@gmail.com
> Subject: RE: [RESEND PATCH 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2
> Ethernet Switch driver
> 
> On September 29, 2017 6:59:18 AM PDT, Razvan Stefanescu
>  wrote:
> >
> >
> >> -Original Message-
> >> From: Bogdan Purcareata
> >> Sent: Friday, September 29, 2017 16:36
> >> To: Razvan Stefanescu ;
> >> gre...@linuxfoundation.org
> >> Cc: de...@driverdev.osuosl.org; linux-ker...@vger.kernel.org;
> >> net...@vger.kernel.org; ag...@suse.de; a...@arndb.de; Alexandru
> >Marginean
> >> ; Ruxandra Ioana Radulescu
> >> ; Laurentiu Tudor
> >;
> >> stuyo...@gmail.com
> >> Subject: RE: [RESEND PATCH 2/6] staging: fsl-dpaa2/ethsw: Add
> >Freescale DPAA2
> >> Ethernet Switch driver
> >>
> >> > Introduce the DPAA2 Ethernet Switch driver, which manages Datapath
> >Switch
> >> > (DPSW) objects discovered on the MC bus.
> >> >
> >> > Suggested-by: Alexandru Marginean 
> >> > Signed-off-by: Razvan Stefanescu 
> 
> This looks pretty good for a new switchdev driver, is there a reason you can't
> target drivers/net/ethernet instead of staging? Is it because the MC bus code 
> is
> still in staging (AFAICT)?
> 
Yes, driver depends on MC bus, which is still in staging.  Also, control traffic
code will require access to DPIO functions, that are also in staging.

Best regards,
Razvan S.
> --
> Florian
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel