RE: [PATCH net] hyperv: Fix the carrier status setting
> -Original Message- > From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] > Sent: Monday, February 10, 2014 8:29 AM > To: Haiyang Zhang; da...@davemloft.net; net...@vger.kernel.org > Cc: KY Srinivasan; o...@aepfle.de; jasow...@redhat.com; linux- > ker...@vger.kernel.org; driverdev-de...@linuxdriverproject.org > Subject: Re: [PATCH net] hyperv: Fix the carrier status setting > > Hello. > > On 10-02-2014 5:07, Haiyang Zhang wrote: > > > Signed-off-by: Haiyang Zhang > > Reviewed-by: K. Y. Srinivasan > > --- > > drivers/net/hyperv/netvsc_drv.c | 24 +++- > > 1 files changed, 15 insertions(+), 9 deletions(-) > > > diff --git a/drivers/net/hyperv/netvsc_drv.c > > b/drivers/net/hyperv/netvsc_drv.c index 7756118..836211c 100644 > > --- a/drivers/net/hyperv/netvsc_drv.c > > +++ b/drivers/net/hyperv/netvsc_drv.c > [...] > > @@ -229,15 +238,17 @@ void netvsc_linkstatus_callback(struct hv_device > *device_obj, > > struct net_device *net; > > struct net_device_context *ndev_ctx; > > struct netvsc_device *net_device; > > + struct rndis_device *rdev; > > > > net_device = hv_get_drvdata(device_obj); > > + rdev = net_device->extension; > > + > > + rdev->link_state = !(status == 1); > > Why not just 'status != 1'? I will simplify it. Thanks, - Haiyang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net] hyperv: Fix the carrier status setting
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Monday, February 10, 2014 4:04 AM > To: Haiyang Zhang > Cc: da...@davemloft.net; net...@vger.kernel.org; o...@aepfle.de; > jasow...@redhat.com; driverdev-de...@linuxdriverproject.org; linux- > ker...@vger.kernel.org > Subject: Re: [PATCH net] hyperv: Fix the carrier status setting > > On Sun, Feb 09, 2014 at 05:07:58PM -0800, Haiyang Zhang wrote: > > Signed-off-by: Haiyang Zhang > > Reviewed-by: K. Y. Srinivasan > > Changelog sucks. What are the user visible effects of this bug? > Without this patch, the "cat /sys/class/net/ethN/operstate" shows "unknown", and "ethtool ethN" shows "Link detected: yes", when VM boots up with or without vNIC connected. This patch fixed the problem. I will include the comments. Thanks, - Haiyang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH net] hyperv: Fix the carrier status setting
Hello. On 10-02-2014 5:07, Haiyang Zhang wrote: Signed-off-by: Haiyang Zhang Reviewed-by: K. Y. Srinivasan --- drivers/net/hyperv/netvsc_drv.c | 24 +++- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 7756118..836211c 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c [...] @@ -229,15 +238,17 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj, struct net_device *net; struct net_device_context *ndev_ctx; struct netvsc_device *net_device; + struct rndis_device *rdev; net_device = hv_get_drvdata(device_obj); + rdev = net_device->extension; + + rdev->link_state = !(status == 1); Why not just 'status != 1'? WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH net] hyperv: Fix the carrier status setting
On Sun, Feb 09, 2014 at 05:07:58PM -0800, Haiyang Zhang wrote: > Signed-off-by: Haiyang Zhang > Reviewed-by: K. Y. Srinivasan Changelog sucks. What are the user visible effects of this bug? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH net] hyperv: Fix the carrier status setting
On Sun, Feb 09, 2014 at 05:07:58PM -0800, Haiyang Zhang wrote: Signed-off-by: Haiyang Zhang haiya...@microsoft.com Reviewed-by: K. Y. Srinivasan k...@microsoft.com Changelog sucks. What are the user visible effects of this bug? regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH net] hyperv: Fix the carrier status setting
Hello. On 10-02-2014 5:07, Haiyang Zhang wrote: Signed-off-by: Haiyang Zhang haiya...@microsoft.com Reviewed-by: K. Y. Srinivasan k...@microsoft.com --- drivers/net/hyperv/netvsc_drv.c | 24 +++- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 7756118..836211c 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c [...] @@ -229,15 +238,17 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj, struct net_device *net; struct net_device_context *ndev_ctx; struct netvsc_device *net_device; + struct rndis_device *rdev; net_device = hv_get_drvdata(device_obj); + rdev = net_device-extension; + + rdev-link_state = !(status == 1); Why not just 'status != 1'? WBR, Sergei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net] hyperv: Fix the carrier status setting
-Original Message- From: Dan Carpenter [mailto:dan.carpen...@oracle.com] Sent: Monday, February 10, 2014 4:04 AM To: Haiyang Zhang Cc: da...@davemloft.net; net...@vger.kernel.org; o...@aepfle.de; jasow...@redhat.com; driverdev-de...@linuxdriverproject.org; linux- ker...@vger.kernel.org Subject: Re: [PATCH net] hyperv: Fix the carrier status setting On Sun, Feb 09, 2014 at 05:07:58PM -0800, Haiyang Zhang wrote: Signed-off-by: Haiyang Zhang haiya...@microsoft.com Reviewed-by: K. Y. Srinivasan k...@microsoft.com Changelog sucks. What are the user visible effects of this bug? Without this patch, the cat /sys/class/net/ethN/operstate shows unknown, and ethtool ethN shows Link detected: yes, when VM boots up with or without vNIC connected. This patch fixed the problem. I will include the comments. Thanks, - Haiyang -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH net] hyperv: Fix the carrier status setting
-Original Message- From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] Sent: Monday, February 10, 2014 8:29 AM To: Haiyang Zhang; da...@davemloft.net; net...@vger.kernel.org Cc: KY Srinivasan; o...@aepfle.de; jasow...@redhat.com; linux- ker...@vger.kernel.org; driverdev-de...@linuxdriverproject.org Subject: Re: [PATCH net] hyperv: Fix the carrier status setting Hello. On 10-02-2014 5:07, Haiyang Zhang wrote: Signed-off-by: Haiyang Zhang haiya...@microsoft.com Reviewed-by: K. Y. Srinivasan k...@microsoft.com --- drivers/net/hyperv/netvsc_drv.c | 24 +++- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 7756118..836211c 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c [...] @@ -229,15 +238,17 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj, struct net_device *net; struct net_device_context *ndev_ctx; struct netvsc_device *net_device; + struct rndis_device *rdev; net_device = hv_get_drvdata(device_obj); + rdev = net_device-extension; + + rdev-link_state = !(status == 1); Why not just 'status != 1'? I will simplify it. Thanks, - Haiyang -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/