Re: [PATCH V3 1/3] x86/Hyper-V: Set x2apic destination mode to physical when x2apic is available

2019-02-11 Thread Tianyu Lan
Hi Thomas:
  Thanks for your review.

On Mon, Feb 11, 2019 at 5:48 AM Thomas Gleixner  wrote:
>
> On Thu, 7 Feb 2019, lantianyu1...@gmail.com wrote:
>
> > From: Lan Tianyu 
> >
> > Hyper-V doesn't provide irq remapping for IO-APIC. To enable x2apic,
> > set x2apic destination mode to physcial mode when x2apic is available
> > and Hyper-V IOMMU driver makes sure cpus assigned with IO-APIC irqs have
> > 8-bit APIC id.
>
> This looks good now. Can that be applied independent of the IOMMU stuff or
> should this go together. If the latter:
>
>Reviewed-by: Thomas Gleixner 
>
> If not, I just queue if for 5.1. Let me know,
>

This patch can be applied independently. Thanks.
-- 
Best regards
Tianyu Lan
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 1/8] staging: rtl8192e: rename function cpMacAddr to copy_mac_addr - style

2019-02-11 Thread Greg KH
On Sun, Feb 10, 2019 at 02:13:12PM +0530, Himadri Pandya wrote:
> Rename function cpMacAddr to copy_mac_addr in order to fix checkpatch 
> warning:Avoid CamelCase and make the function name more readable, 
> understandable.

Please properly wrap your changelog comments at 72 columns.

Please fix up and resend.

thanks,

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


Re: [PATCH v4 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-11 Thread Philipp Zabel
On Fri, 2019-02-08 at 17:47 -0800, Steve Longerbeam wrote:
> Pass v4l2 encoding enum to the ipu_ic task init functions, and add
> support for the BT.709 encoding and inverse encoding matrices.
> 
> Reported-by: Tim Harvey 
> Signed-off-by: Steve Longerbeam 
> ---
> Changes in v4:
> - fix compile error.
> Chnges in v3:
> - none.
> Changes in v2:
> - only return "Unsupported YCbCr encoding" error if inf != outf,
>   since if inf == outf, the identity matrix can be used. Reported
>   by Tim Harvey.
> ---
>  drivers/gpu/ipu-v3/ipu-ic.c | 71 +++--
>  drivers/gpu/ipu-v3/ipu-image-convert.c  |  1 +
>  drivers/staging/media/imx/imx-ic-prpencvf.c |  4 +-
>  include/video/imx-ipu-v3.h  |  5 +-
>  4 files changed, 71 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/ipu-v3/ipu-ic.c b/drivers/gpu/ipu-v3/ipu-ic.c
> index e459615a49a1..c5f83d7e357f 100644
> --- a/drivers/gpu/ipu-v3/ipu-ic.c
> +++ b/drivers/gpu/ipu-v3/ipu-ic.c
> @@ -212,6 +212,23 @@ static const struct ic_csc_params ic_csc_identity = {
>   .scale = 2,
>  };
>  
> +/*
> + * BT.709 encoding from RGB full range to YUV limited range:
> + *
> + * Y = R *  .2126 + G *  .7152 + B *  .0722;
> + * U = R * -.1146 + G * -.3854 + B *  .5000 + 128.;
> + * V = R *  .5000 + G * -.4542 + B * -.0458 + 128.;

This is a conversion to YUV full range. Limited range should be:

Y   R *  .1826 + G *  .6142 + B *  .0620 + 16;
U = R * -.1007 + G * -.3385 + B *  .4392 + 128;
V   R *  .4392 + G * -.3990 + B * -.0402 + 128;

> + */
> +static const struct ic_csc_params ic_csc_rgb2ycbcr_bt709 = {
> + .coeff = {
> + { 54, 183, 18 },
> + { 483, 413, 128 },
> + { 128, 396, 500 },
> + },
> + .offset = { 0, 512, 512 },
> + .scale = 1,
> +};
> +
>  /*
>   * Inverse BT.601 encoding from YUV limited range to RGB full range:
>   *
> @@ -229,12 +246,31 @@ static const struct ic_csc_params 
> ic_csc_ycbcr2rgb_bt601 = {
>   .scale = 2,
>  };
>  
> +/*
> + * Inverse BT.709 encoding from YUV limited range to RGB full range:
> + *
> + * R = (1. * (Y - 16)) + (1.5748 * (Cr - 128));
> + * G = (1. * (Y - 16)) - (0.1873 * (Cb - 128)) - (0.4681 * (Cr - 128));
> + * B = (1. * (Y - 16)) + (1.8556 * (Cb - 128);

The coefficients look like full range again, conversion from limited
range YUV should look like:

  R = (1.1644 * (Y - 16)) + (1.7927 * (Cr - 128));
  G = (1.1644 * (Y - 16)) - (0.2132 * (Cb - 128)) - (0.5329 * (Cr - 128));
  B = (1.1644 * (Y - 16)) + (2.1124 * (Cb - 128);

> + */
> +static const struct ic_csc_params ic_csc_ycbcr2rgb_bt709 = {
> + .coeff = {
> + { 128, 0, 202 },
> + { 128, 488, 452 },
> + { 128, 238, 0 },
> + },
> + .offset = { -435, 136, -507 },
> + .scale = 2,
> +};
> +
>  static int init_csc(struct ipu_ic *ic,
>   enum ipu_color_space inf,
>   enum ipu_color_space outf,
> + enum v4l2_ycbcr_encoding encoding,

Should we support YUV BT.601 <-> YUV REC.709 conversions? That would
require separate encodings for input and output. Also, this might be a
good time to think about adding quantization range parameters as well.

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


Re: [PATCH net-next v3 1/9] Documentation: networking: switchdev: Update port parent ID section

2019-02-11 Thread Jiri Pirko
Mon, Feb 11, 2019 at 12:39:59AM CET, f.faine...@gmail.com wrote:
>Update the section about switchdev drivers having to implement a
>switchdev_port_attr_get() function to return
>SWITCHDEV_ATTR_ID_PORT_PARENT_ID since that is no longer valid after
>commit bccb30254a4a ("net: Get rid of
>SWITCHDEV_ATTR_ID_PORT_PARENT_ID").
>
>Fixes: bccb30254a4a ("net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID")
>Signed-off-by: Florian Fainelli 

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


Re: [PATCH net-next v3 2/9] switchdev: Add SWITCHDEV_PORT_ATTR_SET, SWITCHDEV_PORT_ATTR_GET

2019-02-11 Thread Jiri Pirko
Mon, Feb 11, 2019 at 12:40:00AM CET, f.faine...@gmail.com wrote:
>In preparation for allowing switchdev enabled drivers to veto specific
>attribute settings from within the context of the caller, introduce a
>new switchdev notifier type for port attributes.
>
>Suggested-by: Ido Schimmel 
>Signed-off-by: Florian Fainelli 

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


Re: [PATCH net-next v3 3/9] rocker: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-11 Thread Jiri Pirko
Mon, Feb 11, 2019 at 12:40:01AM CET, f.faine...@gmail.com wrote:
>Following patches will change the way we communicate getting or setting
>a port's attribute and use a blocking notifier to perform those tasks.
>
>Prepare rocker to support receiving notifier events targeting
>SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing
>rocker_port_attr_{set,get} calls.
>
>Signed-off-by: Florian Fainelli 

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


Re: [PATCH net-next v3 4/9] mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-11 Thread Jiri Pirko
Mon, Feb 11, 2019 at 12:40:02AM CET, f.faine...@gmail.com wrote:
>Following patches will change the way we communicate getting or setting
>a port's attribute and use a blocking notifier to perform those tasks.
>
>Prepare mlxsw to support receiving notifier events targeting
>SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing
>mlxsw_sp_port_attr_{set,get} calls.
>
>Signed-off-by: Florian Fainelli 

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


Re: [PATCH net-next v3 5/9] net: mscc: ocelot: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-11 Thread Jiri Pirko
Mon, Feb 11, 2019 at 12:40:03AM CET, f.faine...@gmail.com wrote:
>Following patches will change the way we communicate getting or setting
>a port's attribute and use a blocking notifier to perform those tasks.
>
>Prepare ocelot to support receiving notifier events targeting
>SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing
>ocelot_port_attr_{set,get} calls.
>
>Signed-off-by: Florian Fainelli 
>---
> drivers/net/ethernet/mscc/ocelot.c | 21 +
> 1 file changed, 21 insertions(+)
>
>diff --git a/drivers/net/ethernet/mscc/ocelot.c 
>b/drivers/net/ethernet/mscc/ocelot.c
>index 195306d05bcd..850a49033a30 100644
>--- a/drivers/net/ethernet/mscc/ocelot.c
>+++ b/drivers/net/ethernet/mscc/ocelot.c
>@@ -1582,6 +1582,24 @@ struct notifier_block ocelot_netdevice_nb __read_mostly 
>= {
> };
> EXPORT_SYMBOL(ocelot_netdevice_nb);
> 
>+static int
>+ocelot_switchdev_port_attr_event(unsigned long event,
>+  struct net_device *netdev,
>+  struct switchdev_notifier_port_attr_info *port_attr_info)
>+{
>+  int err = -EOPNOTSUPP;
>+
>+  switch (event) {
>+  case SWITCHDEV_PORT_ATTR_SET:
>+  err = ocelot_port_attr_set(netdev, port_attr_info->attr,
>+ port_attr_info->trans);
>+  break;
>+  }
>+
>+  port_attr_info->handled = true;
>+  return notifier_from_errno(err);
>+}
>+
> static int ocelot_switchdev_blocking_event(struct notifier_block *unused,
>  unsigned long event, void *ptr)
> {
>@@ -1600,6 +1618,9 @@ static int ocelot_switchdev_blocking_event(struct 
>notifier_block *unused,
>   ocelot_netdevice_dev_check,
>   ocelot_port_obj_del);
>   return notifier_from_errno(err);
>+  case SWITCHDEV_PORT_ATTR_SET:
>+  case SWITCHDEV_PORT_ATTR_GET: /* fallthrough */

I think that the "fallthrough" comment should be for "ATTR_SET" case.

Anyway:
Acked-by: Jiri Pirko 



>+  return ocelot_switchdev_port_attr_event(event, dev, ptr);
>   }
> 
>   return NOTIFY_DONE;
>-- 
>2.19.1
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH net-next v3 6/9] staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-11 Thread Jiri Pirko
Mon, Feb 11, 2019 at 12:40:04AM CET, f.faine...@gmail.com wrote:
>Following patches will change the way we communicate getting or setting
>a port's attribute and use a blocking notifier to perform those tasks.
>
>Prepare ethsw to support receiving notifier events targeting
>SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing
>swdev_port_attr_{set,get} calls.
>
>Signed-off-by: Florian Fainelli 

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


Re: [PATCH net-next v3 7/9] net: dsa: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-11 Thread Jiri Pirko
Mon, Feb 11, 2019 at 12:40:05AM CET, f.faine...@gmail.com wrote:
>Following patches will change the way we communicate getting or setting
>a port's attribute and use a blocking notifier to perform those tasks.
>
>Prepare DSA to support receiving notifier events targeting
>SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing
>dsa_slave_port_attr_{set,get} calls.
>
>Signed-off-by: Florian Fainelli 
>---
> net/dsa/slave.c | 24 
> 1 file changed, 24 insertions(+)
>
>diff --git a/net/dsa/slave.c b/net/dsa/slave.c
>index 2e5e7c04821b..2a14a38f5f93 100644
>--- a/net/dsa/slave.c
>+++ b/net/dsa/slave.c
>@@ -1558,6 +1558,27 @@ dsa_slave_switchdev_port_obj_event(unsigned long event,
>   return notifier_from_errno(err);
> }
> 
>+static int
>+dsa_slave_switchdev_port_attr_event(unsigned long event,
>+  struct net_device *netdev,
>+  struct switchdev_notifier_port_attr_info *port_attr_info)
>+{
>+  int err = -EOPNOTSUPP;
>+
>+  switch (event) {
>+  case SWITCHDEV_PORT_ATTR_SET:
>+  err = dsa_slave_port_attr_set(netdev, port_attr_info->attr,
>+port_attr_info->trans);
>+  break;
>+  case SWITCHDEV_PORT_ATTR_GET:
>+  err = dsa_slave_port_attr_get(netdev, port_attr_info->attr);
>+  break;
>+  }
>+
>+  port_attr_info->handled = true;
>+  return notifier_from_errno(err);
>+}
>+
> static int dsa_slave_switchdev_blocking_event(struct notifier_block *unused,
> unsigned long event, void *ptr)
> {
>@@ -1570,6 +1591,9 @@ static int dsa_slave_switchdev_blocking_event(struct 
>notifier_block *unused,
>   case SWITCHDEV_PORT_OBJ_ADD: /* fall through */
>   case SWITCHDEV_PORT_OBJ_DEL:
>   return dsa_slave_switchdev_port_obj_event(event, dev, ptr);
>+  case SWITCHDEV_PORT_ATTR_SET: /* fallthrough */

The case above has "fall through". It would be nice to be consistent.

Anyway:
Acked-by: Jiri Pirko 



>+  case SWITCHDEV_PORT_ATTR_GET:
>+  return dsa_slave_switchdev_port_attr_event(event, dev, ptr);
>   }
> 
>   return NOTIFY_DONE;
>-- 
>2.19.1
>
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH net-next v3 8/9] net: switchdev: Replace port attr get/set SDO with a notification

2019-02-11 Thread Jiri Pirko
Mon, Feb 11, 2019 at 12:40:06AM CET, f.faine...@gmail.com wrote:
>Drop switchdev_ops.switchdev_port_attr_get and _set. Drop the uses of
>this field from all clients, which were migrated to use switchdev
>notification in the previous patches.
>
>Add a new function switchdev_port_attr_notify() that sends the switchdev
>notifications SWITCHDEV_PORT_ATTR_GET and _SET.
>
>Update switchdev_port_attr_get() to dispatch to this new function. Drop
>__switchdev_port_attr_set() and update switchdev_port_attr_set()
>likewise.
>
>Signed-off-by: Florian Fainelli 

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


Re: [PATCH net-next v3 9/9] net: Remove switchdev_ops

2019-02-11 Thread Jiri Pirko
Mon, Feb 11, 2019 at 12:40:07AM CET, f.faine...@gmail.com wrote:
>Now that we have converted all possible callers to using a switchdev
>notifier for attributes we do not have a need for implementing
>switchdev_ops anymore, and this can be removed from all drivers the
>net_device structure.
>
>Signed-off-by: Florian Fainelli 

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


[PATCH V4 1/3] x86/Hyper-V: Set x2apic destination mode to physical when x2apic is available

2019-02-11 Thread lantianyu1986
From: Lan Tianyu 

Hyper-V doesn't provide irq remapping for IO-APIC. To enable x2apic,
set x2apic destination mode to physcial mode when x2apic is available
and Hyper-V IOMMU driver makes sure cpus assigned with IO-APIC irqs have
8-bit APIC id.

Reviewed-by: Thomas Gleixner 
Signed-off-by: Lan Tianyu 
---
Change since v2:
   - Fix compile error due to x2apic_phys
   - Fix comment indent
Change since v1:
   - Remove redundant extern for x2apic_phys
---
 arch/x86/kernel/cpu/mshyperv.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index e81a2db..0c29e4e 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -328,6 +328,16 @@ static void __init ms_hyperv_init_platform(void)
 # ifdef CONFIG_SMP
smp_ops.smp_prepare_boot_cpu = hv_smp_prepare_boot_cpu;
 # endif
+
+   /*
+* Hyper-V doesn't provide irq remapping for IO-APIC. To enable x2apic,
+* set x2apic destination mode to physcial mode when x2apic is available
+* and Hyper-V IOMMU driver makes sure cpus assigned with IO-APIC irqs
+* have 8-bit APIC id.
+*/
+   if (IS_ENABLED(CONFIG_X86_X2APIC) && x2apic_supported())
+   x2apic_phys = 1;
+
 #endif
 }
 
-- 
2.7.4

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


[PATCH V4 0/3] x86/Hyper-V/IOMMU: Add Hyper-V IOMMU driver to support x2apic mode

2019-02-11 Thread lantianyu1986
From: Lan Tianyu 

On the bare metal, enabling X2APIC mode requires interrupt remapping
function which helps to deliver irq to cpu with 32-bit APIC ID.
Hyper-V doesn't provide interrupt remapping function so far and Hyper-V
MSI protocol already supports to deliver interrupt to the CPU whose
virtual processor index is more than 255. IO-APIC interrupt still has
8-bit APIC ID limitation.

This patchset is to add Hyper-V stub IOMMU driver in order to enable
X2APIC mode successfully in Hyper-V Linux guest. The driver returns X2APIC
interrupt remapping capability when X2APIC mode is available. X2APIC
destination mode is set to physical by PATCH 1 when X2APIC is available.
Hyper-V IOMMU driver will scan cpu 0~255 and set cpu into IO-APIC MAX cpu
affinity cpumask if its APIC ID is 8-bit. Driver creates a Hyper-V irq domain
to limit IO-APIC interrupts' affinity and make sure cpus assigned with IO-APIC
interrupt are in the scope of IO-APIC MAX cpu affinity.

Lan Tianyu (3):
  x86/Hyper-V: Set x2apic destination mode to physical when x2apic is   
 available
  HYPERV/IOMMU: Add Hyper-V stub IOMMU driver
  MAINTAINERS: Add Hyper-V IOMMU driver into Hyper-V CORE AND DRIVERS
scope

 MAINTAINERS|   1 +
 arch/x86/kernel/cpu/mshyperv.c |  10 +++
 drivers/iommu/Kconfig  |   9 ++
 drivers/iommu/Makefile |   1 +
 drivers/iommu/hyperv-iommu.c   | 194 +
 drivers/iommu/irq_remapping.c  |   3 +
 drivers/iommu/irq_remapping.h  |   1 +
 7 files changed, 219 insertions(+)
 create mode 100644 drivers/iommu/hyperv-iommu.c

-- 
2.7.4

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


Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-11 Thread Kimberly Brown
On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote:
> On Fri, 8 Feb 2019 05:01:12 -0500
> Kimberly Brown  wrote:
> 
> You are right, the current behavior is broken.
> It would be good to add a description of under what conditions
> monitor is not used. Is this some part of a project emulating
> Hyper-V?
> 

I'm not sure which conditions determine whether the monitor mechanism is
used. I've searched the Hypervisor TLFS, and I couldn't find any
information. If you have any suggestions for where I can find this
information, please let me know.

No, I'm not working on a project emulating Hyper-V.


> 
> > +
> > +   if (!hv_dev->channel->offermsg.monitor_allocated)
> > +   return sprintf(buf, "\n");
> 
> If monitor is not used, why not return an error instead of empty
> data. Any program (or user) would have to handle that already.

I think that returning an error instead is fine. I'll make this change
in the next version of the patch.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: android: vsoc: Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT

2019-02-11 Thread Souptick Joarder
As mentioned in TODO list, Removed VSOC_WAIT_FOR_INCOMING_INTERRUPT
ioctl. This functionality has been superseded by the futex and is
there for legacy reasons.

Signed-off-by: Souptick Joarder 
---
 drivers/staging/android/uapi/vsoc_shm.h | 7 ---
 drivers/staging/android/vsoc.c  | 5 -
 2 files changed, 12 deletions(-)

diff --git a/drivers/staging/android/uapi/vsoc_shm.h 
b/drivers/staging/android/uapi/vsoc_shm.h
index 6291fb2..69090cc 100644
--- a/drivers/staging/android/uapi/vsoc_shm.h
+++ b/drivers/staging/android/uapi/vsoc_shm.h
@@ -232,13 +232,6 @@ struct vsoc_shm_layout_descriptor {
 #define VSOC_MAYBE_SEND_INTERRUPT_TO_HOST _IO(0xF5, 2)
 
 /*
- * When this returns the guest will scan host_to_guest_signal_table to
- * check for new futexes to wake.
- */
-/* TODO(ghartman): Consider moving this to the bottom half */
-#define VSOC_WAIT_FOR_INCOMING_INTERRUPT _IO(0xF5, 3)
-
-/*
  * Guest HALs will use this to retrieve the region description after
  * opening their device node.
  */
diff --git a/drivers/staging/android/vsoc.c b/drivers/staging/android/vsoc.c
index 22571ab..a842ff7 100644
--- a/drivers/staging/android/vsoc.c
+++ b/drivers/staging/android/vsoc.c
@@ -592,11 +592,6 @@ static long vsoc_ioctl(struct file *filp, unsigned int 
cmd, unsigned long arg)
case VSOC_SEND_INTERRUPT_TO_HOST:
writel(reg_num, vsoc_dev.regs + DOORBELL);
return 0;
-   case VSOC_WAIT_FOR_INCOMING_INTERRUPT:
-   wait_event_interruptible
-   (reg_data->interrupt_wait_queue,
-(atomic_read(reg_data->incoming_signalled) != 0));
-   break;
 
case VSOC_DESCRIBE_REGION:
return do_vsoc_describe_region
-- 
1.9.1

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


Re: [PATCH] staging: android: vsoc: Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT

2019-02-11 Thread Greg KH
On Mon, Feb 11, 2019 at 08:56:02PM +0530, Souptick Joarder wrote:
> As mentioned in TODO list, Removed VSOC_WAIT_FOR_INCOMING_INTERRUPT
> ioctl. This functionality has been superseded by the futex and is
> there for legacy reasons.
> 
> Signed-off-by: Souptick Joarder 
> ---
>  drivers/staging/android/uapi/vsoc_shm.h | 7 ---
>  drivers/staging/android/vsoc.c  | 5 -
>  2 files changed, 12 deletions(-)

So userspace is all fixed up now and this ioctl can be dropped?  Any
pointers to the userspace commit that did this?

thanks,

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


Re: [PATCH] staging: android: vsoc: Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT

2019-02-11 Thread Souptick Joarder
On Mon, Feb 11, 2019 at 9:10 PM Greg KH  wrote:
>
> On Mon, Feb 11, 2019 at 08:56:02PM +0530, Souptick Joarder wrote:
> > As mentioned in TODO list, Removed VSOC_WAIT_FOR_INCOMING_INTERRUPT
> > ioctl. This functionality has been superseded by the futex and is
> > there for legacy reasons.
> >
> > Signed-off-by: Souptick Joarder 
> > ---
> >  drivers/staging/android/uapi/vsoc_shm.h | 7 ---
> >  drivers/staging/android/vsoc.c  | 5 -
> >  2 files changed, 12 deletions(-)
>
> So userspace is all fixed up now and this ioctl can be dropped?  Any
> pointers to the userspace commit that did this?

I am not sure about user space part.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: android: vsoc: Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT

2019-02-11 Thread Greg KH
On Mon, Feb 11, 2019 at 09:21:19PM +0530, Souptick Joarder wrote:
> On Mon, Feb 11, 2019 at 9:10 PM Greg KH  wrote:
> >
> > On Mon, Feb 11, 2019 at 08:56:02PM +0530, Souptick Joarder wrote:
> > > As mentioned in TODO list, Removed VSOC_WAIT_FOR_INCOMING_INTERRUPT
> > > ioctl. This functionality has been superseded by the futex and is
> > > there for legacy reasons.
> > >
> > > Signed-off-by: Souptick Joarder 
> > > ---
> > >  drivers/staging/android/uapi/vsoc_shm.h | 7 ---
> > >  drivers/staging/android/vsoc.c  | 5 -
> > >  2 files changed, 12 deletions(-)
> >
> > So userspace is all fixed up now and this ioctl can be dropped?  Any
> > pointers to the userspace commit that did this?
> 
> I am not sure about user space part.

Then we can not just delete the ioctl :)

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


Re: [PATCH] staging: android: vsoc: Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT

2019-02-11 Thread Souptick Joarder
On Mon, Feb 11, 2019 at 9:27 PM Greg KH  wrote:
>
> On Mon, Feb 11, 2019 at 09:21:19PM +0530, Souptick Joarder wrote:
> > On Mon, Feb 11, 2019 at 9:10 PM Greg KH  wrote:
> > >
> > > On Mon, Feb 11, 2019 at 08:56:02PM +0530, Souptick Joarder wrote:
> > > > As mentioned in TODO list, Removed VSOC_WAIT_FOR_INCOMING_INTERRUPT
> > > > ioctl. This functionality has been superseded by the futex and is
> > > > there for legacy reasons.
> > > >
> > > > Signed-off-by: Souptick Joarder 
> > > > ---
> > > >  drivers/staging/android/uapi/vsoc_shm.h | 7 ---
> > > >  drivers/staging/android/vsoc.c  | 5 -
> > > >  2 files changed, 12 deletions(-)
> > >
> > > So userspace is all fixed up now and this ioctl can be dropped?  Any
> > > pointers to the userspace commit that did this?
> >
> > I am not sure about user space part.
>
> Then we can not just delete the ioctl :)

Agree, but where to verify the user space commit ?
Any pointer to the source code path ?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 0/7] binder: eliminate use of vmalloc space for binder buffers

2019-02-11 Thread Christoph Hellwig
On Fri, Feb 08, 2019 at 10:35:13AM -0800, Todd Kjos wrote:
> Binder buffers have always been mapped into kernel space
> via map_kernel_range_noflush() to allow the binder driver
> to modify the buffer before posting to userspace for
> processing.
> 
> In recent Android releases, the number of long-running
> binder processes has increased to the point that for
> 32-bit systems, there is a risk of running out of
> vmalloc space.
> 
> This patch set removes the persistent mapping of the
> binder buffers into kernel space. Instead, the binder
> driver creates temporary mappings with kmap() or
> kmap_atomic() to copy to or from the buffer only when
> necessary.

Is there any good reason to actually map the user memory to kernel
space instead of just using copy_{to,from}_user?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: android: vsoc: Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT

2019-02-11 Thread Greg KH
On Mon, Feb 11, 2019 at 10:15:18PM +0530, Souptick Joarder wrote:
> On Mon, Feb 11, 2019 at 9:27 PM Greg KH  wrote:
> >
> > On Mon, Feb 11, 2019 at 09:21:19PM +0530, Souptick Joarder wrote:
> > > On Mon, Feb 11, 2019 at 9:10 PM Greg KH  
> > > wrote:
> > > >
> > > > On Mon, Feb 11, 2019 at 08:56:02PM +0530, Souptick Joarder wrote:
> > > > > As mentioned in TODO list, Removed VSOC_WAIT_FOR_INCOMING_INTERRUPT
> > > > > ioctl. This functionality has been superseded by the futex and is
> > > > > there for legacy reasons.
> > > > >
> > > > > Signed-off-by: Souptick Joarder 
> > > > > ---
> > > > >  drivers/staging/android/uapi/vsoc_shm.h | 7 ---
> > > > >  drivers/staging/android/vsoc.c  | 5 -
> > > > >  2 files changed, 12 deletions(-)
> > > >
> > > > So userspace is all fixed up now and this ioctl can be dropped?  Any
> > > > pointers to the userspace commit that did this?
> > >
> > > I am not sure about user space part.
> >
> > Then we can not just delete the ioctl :)
> 
> Agree, but where to verify the user space commit ?
> Any pointer to the source code path ?

Please work with the android developers to solve this.  It should be in
AOSP "somewhere" :(

good luck,

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


Re: [PATCH net-next v3 0/9] net: Remove switchdev_ops

2019-02-11 Thread Florian Fainelli
On 2/10/19 3:39 PM, Florian Fainelli wrote:
> Hi all,
> 
> This patch series finishes by the removal of switchdev_ops. To get there
> we need to do a few things:
> 
> - get rid of the one and only call to switchdev_port_attr_get() which is
>   used to fetch the device's bridge port flags capabilities, instead we
>   can just check what flags are being programmed during the prepare
>   phase
> 
> - once we get rid of getting switchdev port attributes we convert the
>   setting of such attributes using a blocking notifier
> 
> And then remove switchdev_ops completely.
> 
> Please review and let me know what you think!
> 
> David, I would like to get Ido's feedback on this to make sure I did not
> miss something, thank you!

David, I will be reposting a v4 with Jiri's Acked-by as well as adding
fallthrough switch/case annotations so we don't regress on that front.
Thank you.

> 
> Changes in v3:
> - dropped patches removing te need to get the attribute since we
>   still need that in order to support different sleeping vs.
>   non-sleeping contexts
> 
> Changes in v2:
> - fixed bisectability issues in patch #15
> - added Acked-by from Jiri where necessary
> - fixed a few minor issues according to Jiri's feedback:
>   - rename port_attr_event -> port_attr_set_event
>   - moved SWITCHDEV_PORT_ATTR_SET closer to other blocking events
> 
> Florian Fainelli (9):
>   Documentation: networking: switchdev: Update port parent ID section
>   switchdev: Add SWITCHDEV_PORT_ATTR_SET, SWITCHDEV_PORT_ATTR_GET
>   rocker: Handle SWITCHDEV_PORT_ATTR_GET/SET
>   mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_ATTR_GET/SET
>   net: mscc: ocelot: Handle SWITCHDEV_PORT_ATTR_GET/SET
>   staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_ATTR_GET/SET
>   net: dsa: Handle SWITCHDEV_PORT_ATTR_GET/SET
>   net: switchdev: Replace port attr get/set SDO with a notification
>   net: Remove switchdev_ops
> 
>  Documentation/networking/switchdev.txt|  10 +-
>  .../net/ethernet/mellanox/mlxsw/spectrum.c|  12 --
>  .../net/ethernet/mellanox/mlxsw/spectrum.h|   2 -
>  .../mellanox/mlxsw/spectrum_switchdev.c   |  36 +++---
>  drivers/net/ethernet/mscc/ocelot.c|  26 -
>  drivers/net/ethernet/rocker/rocker_main.c |  30 -
>  drivers/staging/fsl-dpaa2/ethsw/ethsw.c   |  30 -
>  include/linux/netdevice.h |   3 -
>  include/net/switchdev.h   |  28 ++---
>  net/dsa/slave.c   |  30 -
>  net/switchdev/switchdev.c | 107 ++
>  11 files changed, 168 insertions(+), 146 deletions(-)
> 


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


Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-11 Thread Stephen Hemminger
On Mon, 11 Feb 2019 02:01:18 -0500
Kimberly Brown  wrote:

> On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote:
> > On Fri, 8 Feb 2019 05:01:12 -0500
> > Kimberly Brown  wrote:
> > 
> > You are right, the current behavior is broken.
> > It would be good to add a description of under what conditions
> > monitor is not used. Is this some part of a project emulating
> > Hyper-V?
> >   
> 
> I'm not sure which conditions determine whether the monitor mechanism is
> used. I've searched the Hypervisor TLFS, and I couldn't find any
> information. If you have any suggestions for where I can find this
> information, please let me know.

The monitor page stuff pre-dates my involvement with Hyper-V. KY might know.
But based on comments it looks like it was added to avoid hypercalls
for each message. It probably showed up in Windows Server 2012 timeframe.

To test you might want to dig up Windows Server 2008.
 
> No, I'm not working on a project emulating Hyper-V.

OK, I had heard that KVM project was doing something with QEMU.

> >   
> > > +
> > > + if (!hv_dev->channel->offermsg.monitor_allocated)
> > > + return sprintf(buf, "\n");  
> > 
> > If monitor is not used, why not return an error instead of empty
> > data. Any program (or user) would have to handle that already.  
> 
> I think that returning an error instead is fine. I'll make this change
> in the next version of the patch.

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


Re: [PATCH net-next v3 0/9] net: Remove switchdev_ops

2019-02-11 Thread David Miller
From: Florian Fainelli 
Date: Mon, 11 Feb 2019 09:31:42 -0800

> David, I will be reposting a v4 with Jiri's Acked-by as well as adding
> fallthrough switch/case annotations so we don't regress on that front.
> Thank you.

Ok, thanks for letting me know.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH net-next v4 1/9] Documentation: networking: switchdev: Update port parent ID section

2019-02-11 Thread Florian Fainelli
Update the section about switchdev drivers having to implement a
switchdev_port_attr_get() function to return
SWITCHDEV_ATTR_ID_PORT_PARENT_ID since that is no longer valid after
commit bccb30254a4a ("net: Get rid of
SWITCHDEV_ATTR_ID_PORT_PARENT_ID").

Fixes: bccb30254a4a ("net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID")
Acked-by: Jiri Pirko 
Signed-off-by: Florian Fainelli 
---
 Documentation/networking/switchdev.txt | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/networking/switchdev.txt 
b/Documentation/networking/switchdev.txt
index f3244d87512a..ea90243340a9 100644
--- a/Documentation/networking/switchdev.txt
+++ b/Documentation/networking/switchdev.txt
@@ -92,11 +92,11 @@ device.
 Switch ID
 ^
 
-The switchdev driver must implement the switchdev op switchdev_port_attr_get
-for SWITCHDEV_ATTR_ID_PORT_PARENT_ID for each port netdev, returning the same
-physical ID for each port of a switch.  The ID must be unique between switches
-on the same system.  The ID does not need to be unique between switches on
-different systems.
+The switchdev driver must implement the net_device operation
+ndo_get_port_parent_id for each port netdev, returning the same physical ID for
+each port of a switch. The ID must be unique between switches on the same
+system. The ID does not need to be unique between switches on different
+systems.
 
 The switch ID is used to locate ports on a switch and to know if aggregated
 ports belong to the same switch.
-- 
2.17.1

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


[PATCH net-next v4 0/9] net: Remove switchdev_ops

2019-02-11 Thread Florian Fainelli
Hi all,

This patch series finishes by the removal of switchdev_ops. To get there
we convert the existing switchdev_port_attr_{set,get} switchdev_ops to
use a blocking notifier, thus making it consistent with how the objects
are pushed to the switchdev enabled devices.

Please review and let me know what you think!

David, I would like to get Ido's feedback on this to make sure I did not
miss something, thank you!

Changes in v4:
- removed double space in Documentation/networking/switchdev.txt
- added Jiri's Acked-by tags
- added fall through annotations where appropriate

Changes in v3:
- dropped patches removing te need to get the attribute since we
  still need that in order to support different sleeping vs.
  non-sleeping contexts

Changes in v2:
- fixed bisectability issues in patch #15
- added Acked-by from Jiri where necessary
- fixed a few minor issues according to Jiri's feedback:
- rename port_attr_event -> port_attr_set_event
- moved SWITCHDEV_PORT_ATTR_SET closer to other blocking events

Florian Fainelli (9):
  Documentation: networking: switchdev: Update port parent ID section
  switchdev: Add SWITCHDEV_PORT_ATTR_SET, SWITCHDEV_PORT_ATTR_GET
  rocker: Handle SWITCHDEV_PORT_ATTR_GET/SET
  mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_ATTR_GET/SET
  net: mscc: ocelot: Handle SWITCHDEV_PORT_ATTR_GET/SET
  staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_ATTR_GET/SET
  net: dsa: Handle SWITCHDEV_PORT_ATTR_GET/SET
  net: switchdev: Replace port attr get/set SDO with a notification
  net: Remove switchdev_ops

 Documentation/networking/switchdev.txt|  10 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.c|  12 --
 .../net/ethernet/mellanox/mlxsw/spectrum.h|   2 -
 .../mellanox/mlxsw/spectrum_switchdev.c   |  36 +++---
 drivers/net/ethernet/mscc/ocelot.c|  26 -
 drivers/net/ethernet/rocker/rocker_main.c |  30 -
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c   |  30 -
 include/linux/netdevice.h |   3 -
 include/net/switchdev.h   |  28 ++---
 net/dsa/slave.c   |  30 -
 net/switchdev/switchdev.c | 107 ++
 11 files changed, 168 insertions(+), 146 deletions(-)

-- 
2.17.1

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


[PATCH net-next v4 2/9] switchdev: Add SWITCHDEV_PORT_ATTR_SET, SWITCHDEV_PORT_ATTR_GET

2019-02-11 Thread Florian Fainelli
In preparation for allowing switchdev enabled drivers to veto specific
attribute settings from within the context of the caller, introduce a
new switchdev notifier type for port attributes.

Suggested-by: Ido Schimmel 
Acked-by: Jiri Pirko 
Signed-off-by: Florian Fainelli 
---
 include/net/switchdev.h | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 5e87b54c5dc5..b8becabbef38 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -143,6 +143,9 @@ enum switchdev_notifier_type {
SWITCHDEV_VXLAN_FDB_ADD_TO_DEVICE,
SWITCHDEV_VXLAN_FDB_DEL_TO_DEVICE,
SWITCHDEV_VXLAN_FDB_OFFLOADED,
+
+   SWITCHDEV_PORT_ATTR_SET, /* Blocking. */
+   SWITCHDEV_PORT_ATTR_GET, /* Blocking. */
 };
 
 struct switchdev_notifier_info {
@@ -165,6 +168,13 @@ struct switchdev_notifier_port_obj_info {
bool handled;
 };
 
+struct switchdev_notifier_port_attr_info {
+   struct switchdev_notifier_info info; /* must be first */
+   struct switchdev_attr *attr;
+   struct switchdev_trans *trans;
+   bool handled;
+};
+
 static inline struct net_device *
 switchdev_notifier_info_to_dev(const struct switchdev_notifier_info *info)
 {
-- 
2.17.1

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


[PATCH net-next v4 6/9] staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-11 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting
a port's attribute and use a blocking notifier to perform those tasks.

Prepare ethsw to support receiving notifier events targeting
SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing
swdev_port_attr_{set,get} calls.

Acked-by: Jiri Pirko 
Signed-off-by: Florian Fainelli 
---
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 24 
 1 file changed, 24 insertions(+)

diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c 
b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
index e559f4c25cf7..7c77fb43233e 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
@@ -,6 +,27 @@ ethsw_switchdev_port_obj_event(unsigned long event, 
struct net_device *netdev,
return notifier_from_errno(err);
 }
 
+static int
+ethsw_switchdev_port_attr_event(unsigned long event,
+   struct net_device *netdev,
+   struct switchdev_notifier_port_attr_info *port_attr_info)
+{
+   int err = -EOPNOTSUPP;
+
+   switch (event) {
+   case SWITCHDEV_PORT_ATTR_SET:
+   err = swdev_port_attr_set(netdev, port_attr_info->attr,
+ port_attr_info->trans);
+   break;
+   case SWITCHDEV_PORT_ATTR_GET:
+   err = swdev_port_attr_get(netdev, port_attr_info->attr);
+   break;
+   }
+
+   port_attr_info->handled = true;
+   return notifier_from_errno(err);
+}
+
 static int port_switchdev_blocking_event(struct notifier_block *unused,
 unsigned long event, void *ptr)
 {
@@ -1123,6 +1144,9 @@ static int port_switchdev_blocking_event(struct 
notifier_block *unused,
case SWITCHDEV_PORT_OBJ_ADD: /* fall through */
case SWITCHDEV_PORT_OBJ_DEL:
return ethsw_switchdev_port_obj_event(event, dev, ptr);
+   case SWITCHDEV_PORT_ATTR_SET: /* fall through */
+   case SWITCHDEV_PORT_ATTR_GET:
+   return ethsw_switchdev_port_attr_event(event, dev, ptr);
}
 
return NOTIFY_DONE;
-- 
2.17.1

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


[PATCH net-next v4 3/9] rocker: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-11 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting
a port's attribute and use a blocking notifier to perform those tasks.

Prepare rocker to support receiving notifier events targeting
SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing
rocker_port_attr_{set,get} calls.

Acked-by: Jiri Pirko 
Signed-off-by: Florian Fainelli 
---
 drivers/net/ethernet/rocker/rocker_main.c | 24 +++
 1 file changed, 24 insertions(+)

diff --git a/drivers/net/ethernet/rocker/rocker_main.c 
b/drivers/net/ethernet/rocker/rocker_main.c
index 66f72f8c46e5..9a8fe49e32b6 100644
--- a/drivers/net/ethernet/rocker/rocker_main.c
+++ b/drivers/net/ethernet/rocker/rocker_main.c
@@ -2835,6 +2835,27 @@ rocker_switchdev_port_obj_event(unsigned long event, 
struct net_device *netdev,
return notifier_from_errno(err);
 }
 
+static int
+rocker_switchdev_port_attr_event(unsigned long event, struct net_device 
*netdev,
+struct switchdev_notifier_port_attr_info
+*port_attr_info)
+{
+   int err = -EOPNOTSUPP;
+
+   switch (event) {
+   case SWITCHDEV_PORT_ATTR_SET:
+   err = rocker_port_attr_set(netdev, port_attr_info->attr,
+  port_attr_info->trans);
+   break;
+   case SWITCHDEV_PORT_ATTR_GET:
+   err = rocker_port_attr_get(netdev, port_attr_info->attr);
+   break;
+   }
+
+   port_attr_info->handled = true;
+   return notifier_from_errno(err);
+}
+
 static int rocker_switchdev_blocking_event(struct notifier_block *unused,
   unsigned long event, void *ptr)
 {
@@ -2847,6 +2868,9 @@ static int rocker_switchdev_blocking_event(struct 
notifier_block *unused,
case SWITCHDEV_PORT_OBJ_ADD:
case SWITCHDEV_PORT_OBJ_DEL:
return rocker_switchdev_port_obj_event(event, dev, ptr);
+   case SWITCHDEV_PORT_ATTR_SET: /* fall through */
+   case SWITCHDEV_PORT_ATTR_GET:
+   return rocker_switchdev_port_attr_event(event, dev, ptr);
}
 
return NOTIFY_DONE;
-- 
2.17.1

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


[PATCH net-next v4 5/9] net: mscc: ocelot: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-11 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting
a port's attribute and use a blocking notifier to perform those tasks.

Prepare ocelot to support receiving notifier events targeting
SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing
ocelot_port_attr_{set,get} calls.

Acked-by: Jiri Pirko 
Signed-off-by: Florian Fainelli 
---
 drivers/net/ethernet/mscc/ocelot.c | 21 +
 1 file changed, 21 insertions(+)

diff --git a/drivers/net/ethernet/mscc/ocelot.c 
b/drivers/net/ethernet/mscc/ocelot.c
index 195306d05bcd..2708809713ed 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -1582,6 +1582,24 @@ struct notifier_block ocelot_netdevice_nb __read_mostly 
= {
 };
 EXPORT_SYMBOL(ocelot_netdevice_nb);
 
+static int
+ocelot_switchdev_port_attr_event(unsigned long event,
+   struct net_device *netdev,
+   struct switchdev_notifier_port_attr_info *port_attr_info)
+{
+   int err = -EOPNOTSUPP;
+
+   switch (event) {
+   case SWITCHDEV_PORT_ATTR_SET:
+   err = ocelot_port_attr_set(netdev, port_attr_info->attr,
+  port_attr_info->trans);
+   break;
+   }
+
+   port_attr_info->handled = true;
+   return notifier_from_errno(err);
+}
+
 static int ocelot_switchdev_blocking_event(struct notifier_block *unused,
   unsigned long event, void *ptr)
 {
@@ -1600,6 +1618,9 @@ static int ocelot_switchdev_blocking_event(struct 
notifier_block *unused,
ocelot_netdevice_dev_check,
ocelot_port_obj_del);
return notifier_from_errno(err);
+   case SWITCHDEV_PORT_ATTR_SET: /* fall through */
+   case SWITCHDEV_PORT_ATTR_GET:
+   return ocelot_switchdev_port_attr_event(event, dev, ptr);
}
 
return NOTIFY_DONE;
-- 
2.17.1

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


[PATCH net-next v4 4/9] mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-11 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting
a port's attribute and use a blocking notifier to perform those tasks.

Prepare mlxsw to support receiving notifier events targeting
SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing
mlxsw_sp_port_attr_{set,get} calls.

Acked-by: Jiri Pirko 
Signed-off-by: Florian Fainelli 
---
 .../mellanox/mlxsw/spectrum_switchdev.c   | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 95e37de3e48f..88d4994309a7 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -3443,6 +3443,26 @@ mlxsw_sp_switchdev_handle_vxlan_obj_del(struct 
net_device *vxlan_dev,
}
 }
 
+static int
+mlxsw_sp_switchdev_port_attr_event(unsigned long event, struct net_device *dev,
+   struct switchdev_notifier_port_attr_info *port_attr_info)
+{
+   int err = -EOPNOTSUPP;
+
+   switch (event) {
+   case SWITCHDEV_PORT_ATTR_SET:
+   err = mlxsw_sp_port_attr_set(dev, port_attr_info->attr,
+port_attr_info->trans);
+   break;
+   case SWITCHDEV_PORT_ATTR_GET:
+   err = mlxsw_sp_port_attr_get(dev, port_attr_info->attr);
+   break;
+   }
+
+   port_attr_info->handled = true;
+   return notifier_from_errno(err);
+}
+
 static int mlxsw_sp_switchdev_blocking_event(struct notifier_block *unused,
 unsigned long event, void *ptr)
 {
@@ -3466,6 +3486,9 @@ static int mlxsw_sp_switchdev_blocking_event(struct 
notifier_block *unused,
mlxsw_sp_port_dev_check,
mlxsw_sp_port_obj_del);
return notifier_from_errno(err);
+   case SWITCHDEV_PORT_ATTR_SET: /* fall through */
+   case SWITCHDEV_PORT_ATTR_GET:
+   return mlxsw_sp_switchdev_port_attr_event(event, dev, ptr);
}
 
return NOTIFY_DONE;
-- 
2.17.1

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


[PATCH net-next v4 7/9] net: dsa: Handle SWITCHDEV_PORT_ATTR_GET/SET

2019-02-11 Thread Florian Fainelli
Following patches will change the way we communicate getting or setting
a port's attribute and use a blocking notifier to perform those tasks.

Prepare DSA to support receiving notifier events targeting
SWITCHDEV_PORT_ATTR_GET/SET and simply translate that into the existing
dsa_slave_port_attr_{set,get} calls.

Acked-by: Jiri Pirko 
Signed-off-by: Florian Fainelli 
---
 net/dsa/slave.c | 24 
 1 file changed, 24 insertions(+)

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 2e5e7c04821b..66c6c353f4f7 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1558,6 +1558,27 @@ dsa_slave_switchdev_port_obj_event(unsigned long event,
return notifier_from_errno(err);
 }
 
+static int
+dsa_slave_switchdev_port_attr_event(unsigned long event,
+   struct net_device *netdev,
+   struct switchdev_notifier_port_attr_info *port_attr_info)
+{
+   int err = -EOPNOTSUPP;
+
+   switch (event) {
+   case SWITCHDEV_PORT_ATTR_SET:
+   err = dsa_slave_port_attr_set(netdev, port_attr_info->attr,
+ port_attr_info->trans);
+   break;
+   case SWITCHDEV_PORT_ATTR_GET:
+   err = dsa_slave_port_attr_get(netdev, port_attr_info->attr);
+   break;
+   }
+
+   port_attr_info->handled = true;
+   return notifier_from_errno(err);
+}
+
 static int dsa_slave_switchdev_blocking_event(struct notifier_block *unused,
  unsigned long event, void *ptr)
 {
@@ -1570,6 +1591,9 @@ static int dsa_slave_switchdev_blocking_event(struct 
notifier_block *unused,
case SWITCHDEV_PORT_OBJ_ADD: /* fall through */
case SWITCHDEV_PORT_OBJ_DEL:
return dsa_slave_switchdev_port_obj_event(event, dev, ptr);
+   case SWITCHDEV_PORT_ATTR_SET: /* fall through */
+   case SWITCHDEV_PORT_ATTR_GET:
+   return dsa_slave_switchdev_port_attr_event(event, dev, ptr);
}
 
return NOTIFY_DONE;
-- 
2.17.1

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


[PATCH net-next v4 9/9] net: Remove switchdev_ops

2019-02-11 Thread Florian Fainelli
Now that we have converted all possible callers to using a switchdev
notifier for attributes we do not have a need for implementing
switchdev_ops anymore, and this can be removed from all drivers the
net_device structure.

Acked-by: Jiri Pirko 
Signed-off-by: Florian Fainelli 
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 12 
 drivers/net/ethernet/mellanox/mlxsw/spectrum.h |  2 --
 .../mellanox/mlxsw/spectrum_switchdev.c| 13 -
 drivers/net/ethernet/mscc/ocelot.c |  5 -
 drivers/net/ethernet/rocker/rocker_main.c  |  6 --
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c|  6 --
 include/linux/netdevice.h  |  3 ---
 include/net/switchdev.h| 18 --
 net/dsa/slave.c|  6 --
 9 files changed, 71 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 7c9745cecbbd..619965abab43 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -3220,7 +3220,6 @@ static int mlxsw_sp_port_create(struct mlxsw_sp 
*mlxsw_sp, u8 local_port,
}
mlxsw_sp_port->default_vlan = mlxsw_sp_port_vlan;
 
-   mlxsw_sp_port_switchdev_init(mlxsw_sp_port);
mlxsw_sp->ports[local_port] = mlxsw_sp_port;
err = register_netdev(dev);
if (err) {
@@ -3237,7 +3236,6 @@ static int mlxsw_sp_port_create(struct mlxsw_sp 
*mlxsw_sp, u8 local_port,
 
 err_register_netdev:
mlxsw_sp->ports[local_port] = NULL;
-   mlxsw_sp_port_switchdev_fini(mlxsw_sp_port);
mlxsw_sp_port_vlan_destroy(mlxsw_sp_port_vlan);
 err_port_vlan_create:
 err_port_pvid_set:
@@ -3280,7 +3278,6 @@ static void mlxsw_sp_port_remove(struct mlxsw_sp 
*mlxsw_sp, u8 local_port)
mlxsw_core_port_clear(mlxsw_sp->core, local_port, mlxsw_sp);
unregister_netdev(mlxsw_sp_port->dev); /* This calls ndo_stop */
mlxsw_sp->ports[local_port] = NULL;
-   mlxsw_sp_port_switchdev_fini(mlxsw_sp_port);
mlxsw_sp_port_vlan_flush(mlxsw_sp_port, true);
mlxsw_sp_port_nve_fini(mlxsw_sp_port);
mlxsw_sp_tc_qdisc_fini(mlxsw_sp_port);
@@ -4001,12 +3998,6 @@ static int mlxsw_sp_init(struct mlxsw_core *mlxsw_core,
goto err_span_init;
}
 
-   err = mlxsw_sp_switchdev_init(mlxsw_sp);
-   if (err) {
-   dev_err(mlxsw_sp->bus_info->dev, "Failed to initialize 
switchdev\n");
-   goto err_switchdev_init;
-   }
-
err = mlxsw_sp_counter_pool_init(mlxsw_sp);
if (err) {
dev_err(mlxsw_sp->bus_info->dev, "Failed to init counter 
pool\n");
@@ -4077,8 +4068,6 @@ static int mlxsw_sp_init(struct mlxsw_core *mlxsw_core,
 err_afa_init:
mlxsw_sp_counter_pool_fini(mlxsw_sp);
 err_counter_pool_init:
-   mlxsw_sp_switchdev_fini(mlxsw_sp);
-err_switchdev_init:
mlxsw_sp_span_fini(mlxsw_sp);
 err_span_init:
mlxsw_sp_lag_fini(mlxsw_sp);
@@ -4141,7 +4130,6 @@ static void mlxsw_sp_fini(struct mlxsw_core *mlxsw_core)
mlxsw_sp_nve_fini(mlxsw_sp);
mlxsw_sp_afa_fini(mlxsw_sp);
mlxsw_sp_counter_pool_fini(mlxsw_sp);
-   mlxsw_sp_switchdev_fini(mlxsw_sp);
mlxsw_sp_span_fini(mlxsw_sp);
mlxsw_sp_lag_fini(mlxsw_sp);
mlxsw_sp_buffers_fini(mlxsw_sp);
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index ceebc91f4f1d..82e3e6dc81a1 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -375,8 +375,6 @@ u32 mlxsw_sp_bytes_cells(const struct mlxsw_sp *mlxsw_sp, 
u32 bytes);
 /* spectrum_switchdev.c */
 int mlxsw_sp_switchdev_init(struct mlxsw_sp *mlxsw_sp);
 void mlxsw_sp_switchdev_fini(struct mlxsw_sp *mlxsw_sp);
-void mlxsw_sp_port_switchdev_init(struct mlxsw_sp_port *mlxsw_sp_port);
-void mlxsw_sp_port_switchdev_fini(struct mlxsw_sp_port *mlxsw_sp_port);
 int mlxsw_sp_rif_fdb_op(struct mlxsw_sp *mlxsw_sp, const char *mac, u16 fid,
bool adding);
 void
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 88d4994309a7..3e2ef69a1d22 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -1957,11 +1957,6 @@ static struct mlxsw_sp_port 
*mlxsw_sp_lag_rep_port(struct mlxsw_sp *mlxsw_sp,
return NULL;
 }
 
-static const struct switchdev_ops mlxsw_sp_port_switchdev_ops = {
-   .switchdev_port_attr_get= mlxsw_sp_port_attr_get,
-   .switchdev_port_attr_set= mlxsw_sp_port_attr_set,
-};
-
 static int
 mlxsw_sp_bridge_8021q_port_join(struct mlxsw_sp_bridge_device *bridge_device,
struct mlxsw_sp_bridge_port *bridge_port,
@@ -3576,11 +3571,3 

[PATCH net-next v4 8/9] net: switchdev: Replace port attr get/set SDO with a notification

2019-02-11 Thread Florian Fainelli
Drop switchdev_ops.switchdev_port_attr_get and _set. Drop the uses of
this field from all clients, which were migrated to use switchdev
notification in the previous patches.

Add a new function switchdev_port_attr_notify() that sends the switchdev
notifications SWITCHDEV_PORT_ATTR_GET and _SET.

Update switchdev_port_attr_get() to dispatch to this new function. Drop
__switchdev_port_attr_set() and update switchdev_port_attr_set()
likewise.

Acked-by: Jiri Pirko 
Signed-off-by: Florian Fainelli 
---
 net/switchdev/switchdev.c | 107 +-
 1 file changed, 37 insertions(+), 70 deletions(-)

diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 7e1357db33d7..8fc3db2179f5 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -174,81 +174,31 @@ static int switchdev_deferred_enqueue(struct net_device 
*dev,
return 0;
 }
 
-/**
- * switchdev_port_attr_get - Get port attribute
- *
- * @dev: port device
- * @attr: attribute to get
- */
-int switchdev_port_attr_get(struct net_device *dev, struct switchdev_attr 
*attr)
+static int switchdev_port_attr_notify(enum switchdev_notifier_type nt,
+ struct net_device *dev,
+ struct switchdev_attr *attr,
+ struct switchdev_trans *trans)
 {
-   const struct switchdev_ops *ops = dev->switchdev_ops;
-   struct net_device *lower_dev;
-   struct list_head *iter;
-   struct switchdev_attr first = {
-   .id = SWITCHDEV_ATTR_ID_UNDEFINED
-   };
-   int err = -EOPNOTSUPP;
+   int err;
+   int rc;
 
-   if (ops && ops->switchdev_port_attr_get)
-   return ops->switchdev_port_attr_get(dev, attr);
+   struct switchdev_notifier_port_attr_info attr_info = {
+   .attr = attr,
+   .trans = trans,
+   .handled = false,
+   };
 
-   if (attr->flags & SWITCHDEV_F_NO_RECURSE)
+   rc = call_switchdev_blocking_notifiers(nt, dev, &attr_info.info, NULL);
+   err = notifier_to_errno(rc);
+   if (err) {
+   WARN_ON(!attr_info.handled);
return err;
-
-   /* Switch device port(s) may be stacked under
-* bond/team/vlan dev, so recurse down to get attr on
-* each port.  Return -ENODATA if attr values don't
-* compare across ports.
-*/
-
-   netdev_for_each_lower_dev(dev, lower_dev, iter) {
-   err = switchdev_port_attr_get(lower_dev, attr);
-   if (err)
-   break;
-   if (first.id == SWITCHDEV_ATTR_ID_UNDEFINED)
-   first = *attr;
-   else if (memcmp(&first, attr, sizeof(*attr)))
-   return -ENODATA;
-   }
-
-   return err;
-}
-EXPORT_SYMBOL_GPL(switchdev_port_attr_get);
-
-static int __switchdev_port_attr_set(struct net_device *dev,
-const struct switchdev_attr *attr,
-struct switchdev_trans *trans)
-{
-   const struct switchdev_ops *ops = dev->switchdev_ops;
-   struct net_device *lower_dev;
-   struct list_head *iter;
-   int err = -EOPNOTSUPP;
-
-   if (ops && ops->switchdev_port_attr_set) {
-   err = ops->switchdev_port_attr_set(dev, attr, trans);
-   goto done;
-   }
-
-   if (attr->flags & SWITCHDEV_F_NO_RECURSE)
-   goto done;
-
-   /* Switch device port(s) may be stacked under
-* bond/team/vlan dev, so recurse down to set attr on
-* each port.
-*/
-
-   netdev_for_each_lower_dev(dev, lower_dev, iter) {
-   err = __switchdev_port_attr_set(lower_dev, attr, trans);
-   if (err)
-   break;
}
 
-done:
-   if (err == -EOPNOTSUPP && attr->flags & SWITCHDEV_F_SKIP_EOPNOTSUPP)
-   err = 0;
+   if (!attr_info.handled)
+   return -EOPNOTSUPP;
 
-   return err;
+   return 0;
 }
 
 static int switchdev_port_attr_set_now(struct net_device *dev,
@@ -267,7 +217,9 @@ static int switchdev_port_attr_set_now(struct net_device 
*dev,
 */
 
trans.ph_prepare = true;
-   err = __switchdev_port_attr_set(dev, attr, &trans);
+   err = switchdev_port_attr_notify(SWITCHDEV_PORT_ATTR_SET,
+dev, (struct switchdev_attr *)attr,
+&trans);
if (err) {
/* Prepare phase failed: abort the transaction.  Any
 * resources reserved in the prepare phase are
@@ -286,7 +238,9 @@ static int switchdev_port_attr_set_now(struct net_device 
*dev,
 */
 
trans.ph_prepare = false;
-   err = __switchdev_port_attr_set(dev, attr, &trans);
+   err = switchdev_port_attr_notify(SWITCHDEV_PORT_ATTR_SET,
+

Re: [PATCH net-next v4 0/9] net: Remove switchdev_ops

2019-02-11 Thread David Miller
From: Florian Fainelli 
Date: Mon, 11 Feb 2019 11:09:52 -0800

> David, I would like to get Ido's feedback on this to make sure I did not
> miss something, thank you!

Ok, Ido please look at this when you can.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH net-next 0/3] Remove getting SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS

2019-02-11 Thread Florian Fainelli
Hi all,

AFAICT there is no code that attempts to get the value of the attribute
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS while it is used with
switchdev_port_attr_set().

This is effectively no doing anything and it can slow down future work
that tries to make modifications in these areas so remove that.

David, there should be no dependency with previous patch series, but
again, feedback from Ido and Jiri would be welcome in case this was
added for a reason.

Thanks!

Florian Fainelli (3):
  mlxsw: spectrum_switchdev: Remove getting PORT_BRIDGE_FLAGS
  rocker: Remove getting PORT_BRIDGE_FLAGS
  staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGS

 .../mellanox/mlxsw/spectrum_switchdev.c | 17 -
 drivers/net/ethernet/rocker/rocker.h|  2 --
 drivers/net/ethernet/rocker/rocker_main.c   | 15 ---
 drivers/net/ethernet/rocker/rocker_ofdpa.c  | 10 --
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c |  5 -
 5 files changed, 49 deletions(-)

-- 
2.17.1

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


[PATCH net-next 2/3] rocker: Remove getting PORT_BRIDGE_FLAGS

2019-02-11 Thread Florian Fainelli
There is no code that attempts to get the
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS attribute, remove support for that.

Signed-off-by: Florian Fainelli 
---
 drivers/net/ethernet/rocker/rocker.h   |  2 --
 drivers/net/ethernet/rocker/rocker_main.c  | 15 ---
 drivers/net/ethernet/rocker/rocker_ofdpa.c | 10 --
 3 files changed, 27 deletions(-)

diff --git a/drivers/net/ethernet/rocker/rocker.h 
b/drivers/net/ethernet/rocker/rocker.h
index 748fb12260a6..2b2e1c4f0dc3 100644
--- a/drivers/net/ethernet/rocker/rocker.h
+++ b/drivers/net/ethernet/rocker/rocker.h
@@ -109,8 +109,6 @@ struct rocker_world_ops {
int (*port_attr_bridge_flags_set)(struct rocker_port *rocker_port,
  unsigned long brport_flags,
  struct switchdev_trans *trans);
-   int (*port_attr_bridge_flags_get)(const struct rocker_port *rocker_port,
- unsigned long *p_brport_flags);
int (*port_attr_bridge_flags_support_get)(const struct rocker_port *
  rocker_port,
  unsigned long *
diff --git a/drivers/net/ethernet/rocker/rocker_main.c 
b/drivers/net/ethernet/rocker/rocker_main.c
index 66f72f8c46e5..5ce8d5aba603 100644
--- a/drivers/net/ethernet/rocker/rocker_main.c
+++ b/drivers/net/ethernet/rocker/rocker_main.c
@@ -1582,17 +1582,6 @@ rocker_world_port_attr_bridge_flags_set(struct 
rocker_port *rocker_port,
trans);
 }
 
-static int
-rocker_world_port_attr_bridge_flags_get(const struct rocker_port *rocker_port,
-   unsigned long *p_brport_flags)
-{
-   struct rocker_world_ops *wops = rocker_port->rocker->wops;
-
-   if (!wops->port_attr_bridge_flags_get)
-   return -EOPNOTSUPP;
-   return wops->port_attr_bridge_flags_get(rocker_port, p_brport_flags);
-}
-
 static int
 rocker_world_port_attr_bridge_flags_support_get(const struct rocker_port *
rocker_port,
@@ -2061,10 +2050,6 @@ static int rocker_port_attr_get(struct net_device *dev,
int err = 0;
 
switch (attr->id) {
-   case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS:
-   err = rocker_world_port_attr_bridge_flags_get(rocker_port,
- 
&attr->u.brport_flags);
-   break;
case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT:
err = 
rocker_world_port_attr_bridge_flags_support_get(rocker_port,
  
&attr->u.brport_flags_support);
diff --git a/drivers/net/ethernet/rocker/rocker_ofdpa.c 
b/drivers/net/ethernet/rocker/rocker_ofdpa.c
index bea7895930f6..9c07f6040720 100644
--- a/drivers/net/ethernet/rocker/rocker_ofdpa.c
+++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c
@@ -2511,16 +2511,6 @@ static int ofdpa_port_attr_bridge_flags_set(struct 
rocker_port *rocker_port,
return err;
 }
 
-static int
-ofdpa_port_attr_bridge_flags_get(const struct rocker_port *rocker_port,
-unsigned long *p_brport_flags)
-{
-   const struct ofdpa_port *ofdpa_port = rocker_port->wpriv;
-
-   *p_brport_flags = ofdpa_port->brport_flags;
-   return 0;
-}
-
 static int
 ofdpa_port_attr_bridge_flags_support_get(const struct rocker_port *
 rocker_port,
-- 
2.17.1

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


[PATCH net-next 3/3] staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGS

2019-02-11 Thread Florian Fainelli
There is no code that tries to get the attribute
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, remove support for doing that.

Signed-off-by: Florian Fainelli 
---
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c 
b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
index e559f4c25cf7..e5a14c7c777f 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
@@ -646,11 +646,6 @@ static int swdev_port_attr_get(struct net_device *netdev,
struct ethsw_port_priv *port_priv = netdev_priv(netdev);
 
switch (attr->id) {
-   case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS:
-   attr->u.brport_flags =
-   (port_priv->ethsw_data->learning ? BR_LEARNING : 0) |
-   (port_priv->flood ? BR_FLOOD : 0);
-   break;
case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT:
attr->u.brport_flags_support = BR_LEARNING | BR_FLOOD;
break;
-- 
2.17.1

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


[PATCH net-next 1/3] mlxsw: spectrum_switchdev: Remove getting PORT_BRIDGE_FLAGS

2019-02-11 Thread Florian Fainelli
There is no code that will query the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS
attribute remove support for that.

Signed-off-by: Florian Fainelli 
---
 .../mellanox/mlxsw/spectrum_switchdev.c | 17 -
 1 file changed, 17 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 95e37de3e48f..4c5780f8f4b2 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -431,19 +431,6 @@ static void mlxsw_sp_bridge_vlan_put(struct 
mlxsw_sp_bridge_vlan *bridge_vlan)
mlxsw_sp_bridge_vlan_destroy(bridge_vlan);
 }
 
-static void mlxsw_sp_port_bridge_flags_get(struct mlxsw_sp_bridge *bridge,
-  struct net_device *dev,
-  unsigned long *brport_flags)
-{
-   struct mlxsw_sp_bridge_port *bridge_port;
-
-   bridge_port = mlxsw_sp_bridge_port_find(bridge, dev);
-   if (WARN_ON(!bridge_port))
-   return;
-
-   memcpy(brport_flags, &bridge_port->flags, sizeof(*brport_flags));
-}
-
 static int mlxsw_sp_port_attr_get(struct net_device *dev,
  struct switchdev_attr *attr)
 {
@@ -451,10 +438,6 @@ static int mlxsw_sp_port_attr_get(struct net_device *dev,
struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp;
 
switch (attr->id) {
-   case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS:
-   mlxsw_sp_port_bridge_flags_get(mlxsw_sp->bridge, attr->orig_dev,
-  &attr->u.brport_flags);
-   break;
case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT:
attr->u.brport_flags_support = BR_LEARNING | BR_FLOOD |
   BR_MCAST_FLOOD;
-- 
2.17.1

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


Re: [PATCH net-next v4 0/9] net: Remove switchdev_ops

2019-02-11 Thread Ido Schimmel
On Mon, Feb 11, 2019 at 12:16:57PM -0800, David Miller wrote:
> From: Florian Fainelli 
> Date: Mon, 11 Feb 2019 11:09:52 -0800
> 
> > David, I would like to get Ido's feedback on this to make sure I did not
> > miss something, thank you!
> 
> Ok, Ido please look at this when you can.

Will review tomorrow. I was occupied with other stuff last couple of
days. Sorry
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v4 3/4] gpu: ipu-v3: ipu-ic: Add support for BT.709 encoding

2019-02-11 Thread Steve Longerbeam



On 2/11/19 2:12 AM, Philipp Zabel wrote:

On Fri, 2019-02-08 at 17:47 -0800, Steve Longerbeam wrote:

Pass v4l2 encoding enum to the ipu_ic task init functions, and add
support for the BT.709 encoding and inverse encoding matrices.

Reported-by: Tim Harvey 
Signed-off-by: Steve Longerbeam 
---
Changes in v4:
- fix compile error.
Chnges in v3:
- none.
Changes in v2:
- only return "Unsupported YCbCr encoding" error if inf != outf,
   since if inf == outf, the identity matrix can be used. Reported
   by Tim Harvey.
---
  drivers/gpu/ipu-v3/ipu-ic.c | 71 +++--
  drivers/gpu/ipu-v3/ipu-image-convert.c  |  1 +
  drivers/staging/media/imx/imx-ic-prpencvf.c |  4 +-
  include/video/imx-ipu-v3.h  |  5 +-
  4 files changed, 71 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/ipu-v3/ipu-ic.c b/drivers/gpu/ipu-v3/ipu-ic.c
index e459615a49a1..c5f83d7e357f 100644
--- a/drivers/gpu/ipu-v3/ipu-ic.c
+++ b/drivers/gpu/ipu-v3/ipu-ic.c
@@ -212,6 +212,23 @@ static const struct ic_csc_params ic_csc_identity = {
.scale = 2,
  };
  
+/*

+ * BT.709 encoding from RGB full range to YUV limited range:
+ *
+ * Y = R *  .2126 + G *  .7152 + B *  .0722;
+ * U = R * -.1146 + G * -.3854 + B *  .5000 + 128.;
+ * V = R *  .5000 + G * -.4542 + B * -.0458 + 128.;

This is a conversion to YUV full range. Limited range should be:

Y   R *  .1826 + G *  .6142 + B *  .0620 + 16;
U = R * -.1007 + G * -.3385 + B *  .4392 + 128;
V   R *  .4392 + G * -.3990 + B * -.0402 + 128;


Yep, I fixed these to encode to limited range YUV, and ...


+ */
+static const struct ic_csc_params ic_csc_rgb2ycbcr_bt709 = {
+   .coeff = {
+   { 54, 183, 18 },
+   { 483, 413, 128 },
+   { 128, 396, 500 },
+   },
+   .offset = { 0, 512, 512 },
+   .scale = 1,
+};
+
  /*
   * Inverse BT.601 encoding from YUV limited range to RGB full range:
   *
@@ -229,12 +246,31 @@ static const struct ic_csc_params ic_csc_ycbcr2rgb_bt601 
= {
.scale = 2,
  };
  
+/*

+ * Inverse BT.709 encoding from YUV limited range to RGB full range:
+ *
+ * R = (1. * (Y - 16)) + (1.5748 * (Cr - 128));
+ * G = (1. * (Y - 16)) - (0.1873 * (Cb - 128)) - (0.4681 * (Cr - 128));
+ * B = (1. * (Y - 16)) + (1.8556 * (Cb - 128);

The coefficients look like full range again, conversion from limited
range YUV should look like:

   R = (1.1644 * (Y - 16)) + (1.7927 * (Cr - 128));
   G = (1.1644 * (Y - 16)) - (0.2132 * (Cb - 128)) - (0.5329 * (Cr - 128));
   B = (1.1644 * (Y - 16)) + (2.1124 * (Cb - 128);


fixed these to inverse encode from limited range YUV.


+ */
+static const struct ic_csc_params ic_csc_ycbcr2rgb_bt709 = {
+   .coeff = {
+   { 128, 0, 202 },
+   { 128, 488, 452 },
+   { 128, 238, 0 },
+   },
+   .offset = { -435, 136, -507 },
+   .scale = 2,
+};
+
  static int init_csc(struct ipu_ic *ic,
enum ipu_color_space inf,
enum ipu_color_space outf,
+   enum v4l2_ycbcr_encoding encoding,

Should we support YUV BT.601 <-> YUV REC.709 conversions? That would
require separate encodings for input and output.


How about if we pass the input and output encodings to the init ic task 
functions, but for now require they be the same? We can support 
transcoding in a later series.



  Also, this might be a
good time to think about adding quantization range parameters as well.


Again, I think for now, just include input/output quantization but 
require full range for RGB and limited range for YUV.


But that really balloons the arguments to ipu_ic_task_init_*(). Should 
we create an ipu_ic_task_init structure?


Steve

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


[PATCH 2/2] staging: erofs: remove redundant unlikely annotation in unzip_vle.c

2019-02-11 Thread Chengguang Xu
unlikely has already included in IS_ERR(),
so just remove it.

Signed-off-by: Chengguang Xu 
---
 drivers/staging/erofs/unzip_vle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/erofs/unzip_vle.c 
b/drivers/staging/erofs/unzip_vle.c
index 4ac1099a39c6..7cd2d4d9c264 100644
--- a/drivers/staging/erofs/unzip_vle.c
+++ b/drivers/staging/erofs/unzip_vle.c
@@ -539,7 +539,7 @@ static int z_erofs_vle_work_iter_begin(struct 
z_erofs_vle_work_builder *builder,
if (unlikely(work == ERR_PTR(-EAGAIN)))
goto repeat;
 
-   if (unlikely(IS_ERR(work)))
+   if (IS_ERR(work))
return PTR_ERR(work);
 got_it:
z_erofs_pagevec_ctor_init(&builder->vector,
-- 
2.20.1

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


[PATCH 1/2] staging: erofs: remove redundant likely/unlikely annotation in namei.c

2019-02-11 Thread Chengguang Xu
unlikely has already included in IS_ERR(),
so just remove redundant likely/unlikely
annotation.

Signed-off-by: Chengguang Xu 
---
 drivers/staging/erofs/namei.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/erofs/namei.c b/drivers/staging/erofs/namei.c
index 5596c52e246d..1acd742a41ed 100644
--- a/drivers/staging/erofs/namei.c
+++ b/drivers/staging/erofs/namei.c
@@ -144,7 +144,7 @@ static struct page *find_target_block_classic(
head = mid + 1;
startprfx = matched;
 
-   if (likely(!IS_ERR(candidate)))
+   if (!IS_ERR(candidate))
put_page(candidate);
candidate = page;
} else {
@@ -177,7 +177,7 @@ int erofs_namei(struct inode *dir,
diff = 1;
page = find_target_block_classic(dir, name, &diff);
 
-   if (unlikely(IS_ERR(page)))
+   if (IS_ERR(page))
return PTR_ERR(page);
 
data = kmap_atomic(page);
@@ -187,7 +187,7 @@ int erofs_namei(struct inode *dir,
find_target_dirent(name, data, EROFS_BLKSIZ) :
(struct erofs_dirent *)data;
 
-   if (likely(!IS_ERR(de))) {
+   if (!IS_ERR(de)) {
*nid = le64_to_cpu(de->nid);
*d_type = de->file_type;
}
-- 
2.20.1

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


Spende von 5 Millionen Euro

2019-02-11 Thread shane missler
Dies ist eine persönliche Mail, die ich an Sie gerichtet habe. Ich bin SHANE 
MISSLER aus Florida, Vereinigte Staaten. Wie Sie bereits wissen, habe ich 2018 
einen Lotto-Jackpot von 451 Millionen US-Dollar gewonnen, und das Geld hat mein 
Leben und mein Familienleben verändert, aber es wird mein Herz nicht ändern, 
wie ich an dem Tag sagte, an dem ich mein Geld habe Ich werde dieses Geld für 
die Hilfe der Menschheit verwenden. Ich habe beschlossen, Ihnen und Ihrer 
Gemeinde die Summe von 5 Millionen Euro zu spenden, um diese Spende zu 
beantragen, E-Mail- (shanemissl...@gmail.com)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] staging: erofs: remove redundant unlikely annotation in unzip_vle.c

2019-02-11 Thread Gao Xiang


On 2019/2/12 11:24, Chengguang Xu wrote:
> unlikely has already included in IS_ERR(),
> so just remove it.
>
> Signed-off-by: Chengguang Xu 


Reviewed-by: Gao Xiang 


Thanks,

Gao Xiang

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


Re: [PATCH 1/2] staging: erofs: remove redundant likely/unlikely annotation in namei.c

2019-02-11 Thread Gao Xiang


On 2019/2/12 11:24, Chengguang Xu wrote:
> unlikely has already included in IS_ERR(),
> so just remove redundant likely/unlikely
> annotation.
>
> Signed-off-by: Chengguang Xu 

Thanks for the correction, and happy new lunar year :)

Reviewed-by: Gao Xiang 


Thanks,

Gao Xiang

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


Re: [PATCH v2] staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()

2019-02-11 Thread Gao Xiang
kindly ping... some ideas about this patch v2? Thanks,

On 2019/2/1 20:16, Gao Xiang wrote:
> As Al pointed out, "
> ... and while we are at it, what happens to
>   unsigned int nameoff = le16_to_cpu(de[mid].nameoff);
>   unsigned int matched = min(startprfx, endprfx);
>
>   struct qstr dname = QSTR_INIT(data + nameoff,
>   unlikely(mid >= ndirents - 1) ?
>   maxsize - nameoff :
>   le16_to_cpu(de[mid + 1].nameoff) - nameoff);
>
>   /* string comparison without already matched prefix */
>   int ret = dirnamecmp(name, &dname, &matched);
> if le16_to_cpu(de[...].nameoff) is not monotonically increasing?  I.e.
> what's to prevent e.g. (unsigned)-1 ending up in dname.len?
>
> Corrupted fs image shouldn't oops the kernel.. "
>
> Revisit the related lookup flow to address the issue.
>
> Fixes: d72d1ce60174 ("staging: erofs: add namei functions")
> Cc:  # 4.19+
> Suggested-by: Al Viro 
> Signed-off-by: Gao Xiang 
> ---
> [ It should be better get reviewed first and for linux-next... ]
>
> change log v2:
>  - fix the missing "kunmap_atomic" pointed out by Dan;
>  - minor cleanup;
>
>  drivers/staging/erofs/namei.c | 187 
> ++
>  1 file changed, 99 insertions(+), 88 deletions(-)
>
> diff --git a/drivers/staging/erofs/namei.c b/drivers/staging/erofs/namei.c
> index 5596c52e246d..321c881d720f 100644
> --- a/drivers/staging/erofs/namei.c
> +++ b/drivers/staging/erofs/namei.c
> @@ -15,74 +15,77 @@
>  
>  #include 
>  
> -/* based on the value of qn->len is accurate */
> -static inline int dirnamecmp(struct qstr *qn,
> - struct qstr *qd, unsigned int *matched)
> +struct erofs_qstr {
> + const unsigned char *name;
> + const unsigned char *end;
> +};
> +
> +/* based on the end of qn is accurate and it must have the trailing '\0' */
> +static inline int dirnamecmp(const struct erofs_qstr *qn,
> +  const struct erofs_qstr *qd,
> +  unsigned int *matched)
>  {
> - unsigned int i = *matched, len = min(qn->len, qd->len);
> -loop:
> - if (unlikely(i >= len)) {
> - *matched = i;
> - if (qn->len < qd->len) {
> - /*
> -  * actually (qn->len == qd->len)
> -  * when qd->name[i] == '\0'
> -  */
> - return qd->name[i] == '\0' ? 0 : -1;
> + unsigned int i = *matched;
> +
> + /*
> +  * on-disk error, let's only BUG_ON in the debugging mode.
> +  * otherwise, it will return 1 to just skip the invalid name
> +  * and go on (in consideration of the lookup performance).
> +  */
> + DBG_BUGON(qd->name > qd->end);
> +
> + /* qd could not have trailing '\0' */
> + /* However it is absolutely safe if < qd->end */
> + while (qd->name + i < qd->end && qd->name[i] != '\0') {
> + if (qn->name[i] != qd->name[i]) {
> + *matched = i;
> + return qn->name[i] > qd->name[i] ? 1 : -1;
>   }
> - return (qn->len > qd->len);
> + ++i;
>   }
> -
> - if (qn->name[i] != qd->name[i]) {
> - *matched = i;
> - return qn->name[i] > qd->name[i] ? 1 : -1;
> - }
> -
> - ++i;
> - goto loop;
> + *matched = i;
> + /* See comments in __d_alloc on the terminating NUL character */
> + return qn->name[i] == '\0' ? 0 : 1;
>  }
>  
> -static struct erofs_dirent *find_target_dirent(
> - struct qstr *name,
> - u8 *data, int maxsize)
> +#define nameoff_from_disk(off, sz)   (le16_to_cpu(off) & ((sz) - 1))
> +
> +static struct erofs_dirent *find_target_dirent(struct erofs_qstr *name,
> +u8 *data,
> +unsigned int dirblksize,
> +const int ndirents)
>  {
> - unsigned int ndirents, head, back;
> + int head, back;
>   unsigned int startprfx, endprfx;
>   struct erofs_dirent *const de = (struct erofs_dirent *)data;
>  
> - /* make sure that maxsize is valid */
> - BUG_ON(maxsize < sizeof(struct erofs_dirent));
> -
> - ndirents = le16_to_cpu(de->nameoff) / sizeof(*de);
> -
> - /* corrupted dir (may be unnecessary...) */
> - BUG_ON(!ndirents);
> -
> - head = 0;
> + /* since the 1st dirent has been evaluated previously */
> + head = 1;
>   back = ndirents - 1;
>   startprfx = endprfx = 0;
>  
>   while (head <= back) {
> - unsigned int mid = head + (back - head) / 2;
> - unsigned int nameoff = le16_to_cpu(de[mid].nameoff);
> + const int mid = head + (back - head) / 2;
> + const int nameoff = nameoff_from_disk(de[mid].nameoff,
> +   dirblksize);
>   unsigned int matched = min(startprfx, endprfx);
> -
> -  

[PATCH] staging: android: ion: Use low_order_gfp_flags for smaller allocations

2019-02-11 Thread Jing Xia
gfp_flags is always set high_order_gfp_flags even if allocations of
order 0 are made.But for smaller allocations, the system should be able
to reclaim some memory.

Signed-off-by: Jing Xia 
Reviewed-by: Yuming Han 
Reviewed-by: Zhaoyang Huang 
Reviewed-by: Orson Zhai 
---
 drivers/staging/android/ion/ion_system_heap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion_system_heap.c 
b/drivers/staging/android/ion/ion_system_heap.c
index 0383f75..20f2103 100644
--- a/drivers/staging/android/ion/ion_system_heap.c
+++ b/drivers/staging/android/ion/ion_system_heap.c
@@ -223,10 +223,10 @@ static void ion_system_heap_destroy_pools(struct 
ion_page_pool **pools)
 static int ion_system_heap_create_pools(struct ion_page_pool **pools)
 {
int i;
-   gfp_t gfp_flags = low_order_gfp_flags;
 
for (i = 0; i < NUM_ORDERS; i++) {
struct ion_page_pool *pool;
+   gfp_t gfp_flags = low_order_gfp_flags;
 
if (orders[i] > 4)
gfp_flags = high_order_gfp_flags;
-- 
1.9.1

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


Re: [PATCH] staging: mt7621-pci: update driver's TODO file

2019-02-11 Thread Sergio Paracuellos
On Mon, Feb 11, 2019 at 3:52 AM NeilBrown  wrote:
>
> On Sun, Feb 10 2019, Sergio Paracuellos wrote:
>
> > Some of the things included in driver's TODO file have
> > been properly achieved. Update file accordly.
> >
> > Signed-off-by: Sergio Paracuellos 
> > ---
> > Hi Neil,
> >
> > I've been looking through the code of this driver and pci-phy
> > driver while thinking in what is missing already to get this
> > mainlined out of staging. I don't really know what cleanups
> > are missing here. The only thinkg is not clear yet is the thing
> > with the clocks defined in device-tree. Should be just remove
> > them and give this stuff a try to get feedback or what is missing?
> > Can you please point me out in the right direction?
>
> Hi Sergio,
>  thanks for persisting with this.

Hi Neil,

>
> I think the "right" thing to do with the clocks is to write a driver
> that support ralink,rt2880-clock, similar to the way
>  arch/mips/ralink/reset.c
> supports ralink,rt2880-reset

I see. I also do think this is the correct thing to do. So let's do
it. A minor doubt here,
Should I add this driver to staging in order to be checked and tested
or should it be just directly
send to ralink and mips people to try it to be mainlined directly?

>
> It would support clk_enable by setting the relevant bit in
> #define RALINK_CLKCFG1  0x30
>
> and clk_disable by clearing it.
> The pci-mt7621.c (and pci-mt7620.c) could use this to enable/disable
> the clocks, rather than poking directly at the register.

This stuff has been moved to the phy part of the pci so we should move
also the port clocks to there in the device tree and remove them from the
pci port bindingsand handle clk_* options there.

>
> Also, pci-mt7621.c (maybe) shouldn't be poking RALINK_PCIE_RST directly.
> This is apparently another reset line the driver needs, so it should be
> described in devicetree. i.e add another reset-name "pcie".

True, I will add a new reset line to the device tree to achieve this.

>
> Also,
> #define RALINK_PCI_IO_MAP_BASE  0x1e16
>
> duplicates info that is in devicetree:
> ranges = <
> 0x0200 0 0x 0x6000 0 0x1000 /* 
> pci memory */
> 0x0100 0 0x 0x1e16 0 0x0001 /* io 
> space */
> ^^HERE
> >;
>
> I wonder if that matter...

I knew this, the thing is that this is only used to set the register
IOBASE which is the base Address for IO Space window. I am not sure
if just writing this after request resources from device tree will
work. I'll add this change as the last patch of the series just to see
what
happen.

>
> A tiny thing:
>
>  * 3'b100  0x   x
>  * 3'b101  1x   0
>  * 3'b110  10   x
>  * 3'b111  21   0
>
> There are two sets of 8 spaces in there, that should be a TAB, and there
> is a space before a TAB, that should be removed (yes, I do have x-ray vision).

I will change this also. Awesome vision, BTW :-)

>
>
> I really don't know how important all this is. Maybe it would be best
> to post the patch and see what people say.

Let's change all of these and post then the PATCHes to get last feedback.

>
> Thanks,
> NeilBrown

Thanks a lot.

Best regards,
Sergio Paracuellos
>
> >
> > Thanks in advance for your time.
> >
> > Best regards,
> > Sergio Paracuellos
> >  drivers/staging/mt7621-pci/TODO | 8 
> >  1 file changed, 8 deletions(-)
> >
> > diff --git a/drivers/staging/mt7621-pci/TODO 
> > b/drivers/staging/mt7621-pci/TODO
> > index cf30f629b9fd..ccfd266db4ca 100644
> > --- a/drivers/staging/mt7621-pci/TODO
> > +++ b/drivers/staging/mt7621-pci/TODO
> > @@ -1,12 +1,4 @@
> >
> >  - general code review and cleanup
> > -- can this be converted to not require PCI_DRIVERS_LEGACY ??
> > -The irq returned by pcibios_map_irq is a "hwirq" (hardware irq number)
> > -and pci_assign_irq() assigns this directly to dev->irq, which
> > -expects a "virq" (virtual irq number).  These numbers are different
> > -on MIPS.  There is a gross hack to make it work on one
> > -specific platform, so it can be tested.
> > -- Should this be merged with arch/mips/pci/pci-mt7620.c ??
> > -- ensure device-tree requirements are documented
> >
> >  Cc:  NeilBrown 
> > --
> > 2.19.1
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH net-next 3/3] staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGS

2019-02-11 Thread Greg KH
On Mon, Feb 11, 2019 at 01:17:49PM -0800, Florian Fainelli wrote:
> There is no code that tries to get the attribute
> SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, remove support for doing that.
> 
> Signed-off-by: Florian Fainelli 
> ---
>  drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 -
>  1 file changed, 5 deletions(-)

Acked-by: Greg Kroah-Hartman 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel