* Re: [PATCH net-next 0/1] netvsc: another VF datapath fix
From: Stephen Hemminger @ 2017-08-08 15:53 UTC (permalink / raw)
To: Vitaly Kuznetsov; +Cc: kys, haiyangz, sthemmin, devel, netdev
In-Reply-To: <87mv7a9ict.fsf@vitty.brq.redhat.com>
The following would allow udev a chance at the device.
From 37fb240a6107834c3dd3f57caede9d73b807f414 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <sthemmin@microsoft.com>
Date: Tue, 8 Aug 2017 08:39:24 -0700
Subject: [PATCH] netvsc: delay setup of VF device
When VF device is discovered, delay bring it automatically up in
order to allow userspace to some simple changes (like renaming).
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
drivers/net/hyperv/hyperv_net.h | 2 +-
drivers/net/hyperv/netvsc_drv.c | 11 ++++++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index d1ea99a12cf2..f620c90307ed 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -723,7 +723,7 @@ struct net_device_context {
/* State to manage the associated VF interface. */
struct net_device __rcu *vf_netdev;
struct netvsc_vf_pcpu_stats __percpu *vf_stats;
- struct work_struct vf_takeover;
+ struct delayed_work vf_takeover;
/* 1: allocated, serial number is valid. 0: not allocated */
u32 vf_alloc;
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 7ebf0e10e62b..1dff160368a3 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -47,6 +47,7 @@
#define RING_SIZE_MIN 64
#define LINKCHANGE_INT (2 * HZ)
+#define VF_TAKEOVER_INT (HZ / 10)
static int ring_size = 128;
module_param(ring_size, int, S_IRUGO);
@@ -1570,7 +1571,7 @@ static int netvsc_vf_join(struct net_device *vf_netdev,
/* set slave flag before open to prevent IPv6 addrconf */
vf_netdev->flags |= IFF_SLAVE;
- schedule_work(&ndev_ctx->vf_takeover);
+ schedule_delayed_work(&ndev_ctx->vf_takeover, VF_TAKEOVER_INT);
netdev_info(vf_netdev, "joined to %s\n", ndev->name);
return 0;
@@ -1608,12 +1609,12 @@ static void __netvsc_vf_setup(struct net_device *ndev,
static void netvsc_vf_setup(struct work_struct *w)
{
struct net_device_context *ndev_ctx
- = container_of(w, struct net_device_context, vf_takeover);
+ = container_of(w, struct net_device_context, vf_takeover.work);
struct net_device *ndev = hv_get_drvdata(ndev_ctx->device_ctx);
struct net_device *vf_netdev;
if (!rtnl_trylock()) {
- schedule_work(w);
+ schedule_delayed_work(&ndev_ctx->vf_takeover, 0);
return;
}
@@ -1717,7 +1718,7 @@ static int netvsc_unregister_vf(struct net_device *vf_netdev)
return NOTIFY_DONE;
net_device_ctx = netdev_priv(ndev);
- cancel_work_sync(&net_device_ctx->vf_takeover);
+ cancel_delayed_work_sync(&net_device_ctx->vf_takeover);
netdev_info(ndev, "VF unregistering: %s\n", vf_netdev->name);
@@ -1759,7 +1760,7 @@ static int netvsc_probe(struct hv_device *dev,
spin_lock_init(&net_device_ctx->lock);
INIT_LIST_HEAD(&net_device_ctx->reconfig_events);
- INIT_WORK(&net_device_ctx->vf_takeover, netvsc_vf_setup);
+ INIT_DELAYED_WORK(&net_device_ctx->vf_takeover, netvsc_vf_setup);
net_device_ctx->vf_stats
= netdev_alloc_pcpu_stats(struct netvsc_vf_pcpu_stats);
--
2.11.0
^ permalink raw reply related
* [PATCH 00/35] constify net usb_device_id
From: Arvind Yadav @ 2017-08-08 15:55 UTC (permalink / raw)
To: kvalo, wg, mkl, linux-can, netdev; +Cc: linux-kernel
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
[PATCH 10/35] :Fix checkpatch.pl error.
ERROR: space prohibited before open square bracket '['.
Arvind Yadav (35):
[PATCH 01/35] can: ems_usb: constify usb_device_id
[PATCH 02/35] can: esd_usb2: constify usb_device_id
[PATCH 03/35] can: peak_usb: constify usb_device_id
[PATCH 04/35] net: irda: irda-usb: constify usb_device_id
[PATCH 05/35] net: irda: kingsun: constify usb_device_id
[PATCH 06/35] net: irda: ks959: constify usb_device_id
[PATCH 07/35] net: irda: ksdazzle: constify usb_device_id
[PATCH 08/35] net: irda: mcs7780: constify usb_device_id
[PATCH 09/35] net: irda: stir4200: constify usb_device_id
[PATCH 10/35] net: usb: catc: constify usb_device_id and and fix space before '[' error
[PATCH 11/35] net: usb: cdc-phonet: constify usb_device_id
[PATCH 12/35] net: usb: ipheth: constify usb_device_id
[PATCH 13/35] net: usb: kaweth: constify usb_device_id
[PATCH 14/35] net: usb: r8152: constify usb_device_id
[PATCH 15/35] net: usb: rtl8150: constify usb_device_id
[PATCH 16/35] wireless: ath: ar5523: constify usb_device_id
[PATCH 17/35] wireless: ath: ath6kl: constify usb_device_id
[PATCH 18/35] wireless: ath: ath9k: constify usb_device_id
[PATCH 19/35] wireless: ath: carl9170: constify usb_device_id
[PATCH 20/35] wireless: atmel: at76c50x: constify usb_device_id
[PATCH 21/35] wireless: broadcom: brcm80211: constify usb_device_id
[PATCH 22/35] wireless: intersil: orinoco: constify usb_device_id
[PATCH 23/35] wireless: intersil: p54: constify usb_device_id
[PATCH 24/35] wireless: marvell: libertas: constify usb_device_id
[PATCH 25/35] wireless: marvell: libertas_tf: constify usb_device_id
[PATCH 26/35] wireless: marvell: mwifiex: constify usb_device_id
[PATCH 27/35] wireless: mediatek: mt7601u: constify usb_device_id
[PATCH 28/35] wireless: ralink: rt2500usb: constify usb_device_id
[PATCH 29/35] wireless: ralink: rt2800usb: constify usb_device_id
[PATCH 30/35] wireless: ralink: rt73usb: constify usb_device_id
[PATCH 31/35] wireless: realtek: rtl8187: constify usb_device_id
[PATCH 32/35] wireless: realtek: rtl8xxxu: constify usb_device_id
[PATCH 33/35] wireless: realtek: rtl8192cu: constify usb_device_id
[PATCH 34/35] wireless: zydas: zd1201: constify usb_device_id
[PATCH 35/35] wireless: zydas: zd1211rw: constify usb_device_id
drivers/net/can/usb/ems_usb.c | 2 +-
drivers/net/can/usb/esd_usb2.c | 2 +-
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 +-
drivers/net/irda/irda-usb.c | 2 +-
drivers/net/irda/kingsun-sir.c | 2 +-
drivers/net/irda/ks959-sir.c | 2 +-
drivers/net/irda/ksdazzle-sir.c | 2 +-
drivers/net/irda/mcs7780.c | 2 +-
drivers/net/irda/stir4200.c | 2 +-
drivers/net/usb/catc.c | 2 +-
drivers/net/usb/cdc-phonet.c | 2 +-
drivers/net/usb/ipheth.c | 2 +-
drivers/net/usb/kaweth.c | 2 +-
drivers/net/usb/r8152.c | 2 +-
drivers/net/usb/rtl8150.c | 2 +-
drivers/net/wireless/ath/ar5523/ar5523.c | 2 +-
drivers/net/wireless/ath/ath6kl/usb.c | 2 +-
drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +-
drivers/net/wireless/ath/carl9170/usb.c | 2 +-
drivers/net/wireless/atmel/at76c50x-usb.c | 2 +-
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 2 +-
drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 2 +-
drivers/net/wireless/intersil/p54/p54usb.c | 2 +-
drivers/net/wireless/marvell/libertas/if_usb.c | 2 +-
drivers/net/wireless/marvell/libertas_tf/if_usb.c | 2 +-
drivers/net/wireless/marvell/mwifiex/usb.c | 2 +-
drivers/net/wireless/mediatek/mt7601u/usb.c | 2 +-
drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 2 +-
drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 2 +-
drivers/net/wireless/ralink/rt2x00/rt73usb.c | 2 +-
drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 2 +-
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c | 2 +-
drivers/net/wireless/zydas/zd1201.c | 2 +-
drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 2 +-
35 files changed, 35 insertions(+), 35 deletions(-)
--
2.7.4
^ permalink raw reply
* [PATCH 01/35] can: ems_usb: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:55 UTC (permalink / raw)
To: kvalo, wg, mkl, linux-can, netdev; +Cc: linux-kernel
In-Reply-To: <1502207730-11404-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/can/usb/ems_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c
index b3d0275..c78f3a8 100644
--- a/drivers/net/can/usb/ems_usb.c
+++ b/drivers/net/can/usb/ems_usb.c
@@ -222,7 +222,7 @@ struct __packed ems_cpc_msg {
* Table of devices that work with this driver
* NOTE: This driver supports only CPC-USB/ARM7 (LPC2119) yet.
*/
-static struct usb_device_id ems_usb_table[] = {
+static const struct usb_device_id ems_usb_table[] = {
{USB_DEVICE(USB_CPCUSB_VENDOR_ID, USB_CPCUSB_ARM7_PRODUCT_ID)},
{} /* Terminating entry */
};
--
2.7.4
^ permalink raw reply related
* [PATCH 02/35] can: esd_usb2: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:55 UTC (permalink / raw)
To: kvalo, wg, mkl, linux-can, netdev; +Cc: linux-kernel
In-Reply-To: <1502207730-11404-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/can/usb/esd_usb2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c
index be928ce..00564d7 100644
--- a/drivers/net/can/usb/esd_usb2.c
+++ b/drivers/net/can/usb/esd_usb2.c
@@ -183,7 +183,7 @@ struct __attribute__ ((packed)) esd_usb2_msg {
} msg;
};
-static struct usb_device_id esd_usb2_table[] = {
+static const struct usb_device_id esd_usb2_table[] = {
{USB_DEVICE(USB_ESDGMBH_VENDOR_ID, USB_CANUSB2_PRODUCT_ID)},
{USB_DEVICE(USB_ESDGMBH_VENDOR_ID, USB_CANUSBM_PRODUCT_ID)},
{}
--
2.7.4
^ permalink raw reply related
* [PATCH 03/35] can: peak_usb: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:55 UTC (permalink / raw)
To: kvalo, wg, mkl, linux-can, netdev; +Cc: linux-kernel
In-Reply-To: <1502207730-11404-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
index 1ca76e0..538be60 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
@@ -34,7 +34,7 @@ MODULE_DESCRIPTION("CAN driver for PEAK-System USB adapters");
MODULE_LICENSE("GPL v2");
/* Table of devices that work with this driver */
-static struct usb_device_id peak_usb_table[] = {
+static const struct usb_device_id peak_usb_table[] = {
{USB_DEVICE(PCAN_USB_VENDOR_ID, PCAN_USB_PRODUCT_ID)},
{USB_DEVICE(PCAN_USB_VENDOR_ID, PCAN_USBPRO_PRODUCT_ID)},
{USB_DEVICE(PCAN_USB_VENDOR_ID, PCAN_USBFD_PRODUCT_ID)},
--
2.7.4
^ permalink raw reply related
* [PATCH 04/35] net: irda: irda-usb: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
To: kvalo, samuel; +Cc: linux-kernel, netdev
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/irda/irda-usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index 6f3c805..723e49b 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -72,7 +72,7 @@
static int qos_mtt_bits = 0;
/* These are the currently known IrDA USB dongles. Add new dongles here */
-static struct usb_device_id dongles[] = {
+static const struct usb_device_id dongles[] = {
/* ACTiSYS Corp., ACT-IR2000U FIR-USB Adapter */
{ USB_DEVICE(0x9c4, 0x011), .driver_info = IUC_SPEED_BUG | IUC_NO_WINDOW },
/* Look like ACTiSYS, Report : IBM Corp., IBM UltraPort IrDA */
--
2.7.4
^ permalink raw reply related
* [PATCH 05/35] net: irda: kingsun: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
To: kvalo, samuel; +Cc: linux-kernel, netdev
In-Reply-To: <1502207805-11490-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/irda/kingsun-sir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c
index 24c0f16..4fd4ac2 100644
--- a/drivers/net/irda/kingsun-sir.c
+++ b/drivers/net/irda/kingsun-sir.c
@@ -85,7 +85,7 @@
#define KING_PRODUCT_ID 0x4200
/* These are the currently known USB ids */
-static struct usb_device_id dongles[] = {
+static const struct usb_device_id dongles[] = {
/* KingSun Co,Ltd IrDA/USB Bridge */
{ USB_DEVICE(KING_VENDOR_ID, KING_PRODUCT_ID) },
{ }
--
2.7.4
^ permalink raw reply related
* [PATCH 06/35] net: irda: ks959: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
To: kvalo, samuel; +Cc: linux-kernel, netdev
In-Reply-To: <1502207805-11490-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/irda/ks959-sir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/irda/ks959-sir.c b/drivers/net/irda/ks959-sir.c
index 3affded..8025741 100644
--- a/drivers/net/irda/ks959-sir.c
+++ b/drivers/net/irda/ks959-sir.c
@@ -133,7 +133,7 @@
#define KS959_PRODUCT_ID 0x4959
/* These are the currently known USB ids */
-static struct usb_device_id dongles[] = {
+static const struct usb_device_id dongles[] = {
/* KingSun Co,Ltd IrDA/USB Bridge */
{USB_DEVICE(KS959_VENDOR_ID, KS959_PRODUCT_ID)},
{}
--
2.7.4
^ permalink raw reply related
* [PATCH 07/35] net: irda: ksdazzle: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
To: kvalo, samuel; +Cc: linux-kernel, netdev
In-Reply-To: <1502207805-11490-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/irda/ksdazzle-sir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/irda/ksdazzle-sir.c b/drivers/net/irda/ksdazzle-sir.c
index 741452c..d2a0755 100644
--- a/drivers/net/irda/ksdazzle-sir.c
+++ b/drivers/net/irda/ksdazzle-sir.c
@@ -97,7 +97,7 @@
#define KSDAZZLE_PRODUCT_ID 0x4100
/* These are the currently known USB ids */
-static struct usb_device_id dongles[] = {
+static const struct usb_device_id dongles[] = {
/* KingSun Co,Ltd IrDA/USB Bridge */
{USB_DEVICE(KSDAZZLE_VENDOR_ID, KSDAZZLE_PRODUCT_ID)},
{}
--
2.7.4
^ permalink raw reply related
* [PATCH 08/35] net: irda: mcs7780: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
To: kvalo, samuel; +Cc: linux-kernel, netdev
In-Reply-To: <1502207805-11490-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/irda/mcs7780.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c
index 6f6ed75..32fa4a9 100644
--- a/drivers/net/irda/mcs7780.c
+++ b/drivers/net/irda/mcs7780.c
@@ -66,7 +66,7 @@
#define MCS_VENDOR_ID 0x9710
#define MCS_PRODUCT_ID 0x7780
-static struct usb_device_id mcs_table[] = {
+static const struct usb_device_id mcs_table[] = {
/* MosChip Corp., MCS7780 FIR-USB Adapter */
{USB_DEVICE(MCS_VENDOR_ID, MCS_PRODUCT_ID)},
{},
--
2.7.4
^ permalink raw reply related
* [PATCH 09/35] net: irda: stir4200: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
To: kvalo, samuel; +Cc: linux-kernel, netdev
In-Reply-To: <1502207805-11490-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/irda/stir4200.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c
index 7ee5148..ee2cb70 100644
--- a/drivers/net/irda/stir4200.c
+++ b/drivers/net/irda/stir4200.c
@@ -183,7 +183,7 @@ struct stir_cb {
/* These are the currently known USB ids */
-static struct usb_device_id dongles[] = {
+static const struct usb_device_id dongles[] = {
/* SigmaTel, Inc, STIr4200 IrDA/USB Bridge */
{ USB_DEVICE(0x066f, 0x4200) },
{ }
--
2.7.4
^ permalink raw reply related
* [PATCH 10/35] net: usb: catc: constify usb_device_id and fix space before '[' error
From: Arvind Yadav @ 2017-08-08 15:58 UTC (permalink / raw)
To: kvalo; +Cc: linux-kernel, netdev, linux-usb
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/usb/catc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c
index fce92f0..01cd17e 100644
--- a/drivers/net/usb/catc.c
+++ b/drivers/net/usb/catc.c
@@ -961,7 +961,7 @@ static void catc_disconnect(struct usb_interface *intf)
* Module functions and tables.
*/
-static struct usb_device_id catc_id_table [] = {
+static const struct usb_device_id catc_id_table[] = {
{ USB_DEVICE(0x0423, 0xa) }, /* CATC Netmate, Belkin F5U011 */
{ USB_DEVICE(0x0423, 0xc) }, /* CATC Netmate II, Belkin F5U111 */
{ USB_DEVICE(0x08d1, 0x1) }, /* smartBridges smartNIC */
--
2.7.4
^ permalink raw reply related
* [PATCH 11/35] net: usb: cdc-phonet: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:58 UTC (permalink / raw)
To: kvalo; +Cc: linux-kernel, netdev, linux-usb
In-Reply-To: <1502207885-11574-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/usb/cdc-phonet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c
index 2952cb5..288ecd9 100644
--- a/drivers/net/usb/cdc-phonet.c
+++ b/drivers/net/usb/cdc-phonet.c
@@ -304,7 +304,7 @@ static void usbpn_setup(struct net_device *dev)
/*
* USB driver callbacks
*/
-static struct usb_device_id usbpn_ids[] = {
+static const struct usb_device_id usbpn_ids[] = {
{
.match_flags = USB_DEVICE_ID_MATCH_VENDOR
| USB_DEVICE_ID_MATCH_INT_CLASS
--
2.7.4
^ permalink raw reply related
* [PATCH 12/35] net: usb: ipheth: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:58 UTC (permalink / raw)
To: kvalo; +Cc: linux-kernel, netdev, linux-usb
In-Reply-To: <1502207885-11574-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/usb/ipheth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
index 0f213ea..d49c710 100644
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -87,7 +87,7 @@
#define IPHETH_CARRIER_CHECK_TIMEOUT round_jiffies_relative(1 * HZ)
#define IPHETH_CARRIER_ON 0x04
-static struct usb_device_id ipheth_table[] = {
+static const struct usb_device_id ipheth_table[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(
USB_VENDOR_APPLE, USB_PRODUCT_IPHONE,
IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
--
2.7.4
^ permalink raw reply related
* [PATCH 13/35] net: usb: kaweth: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:58 UTC (permalink / raw)
To: kvalo; +Cc: linux-kernel, netdev, linux-usb
In-Reply-To: <1502207885-11574-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/usb/kaweth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
index 92e4fd2..f160583 100644
--- a/drivers/net/usb/kaweth.c
+++ b/drivers/net/usb/kaweth.c
@@ -125,7 +125,7 @@ static int kaweth_resume(struct usb_interface *intf);
/****************************************************************
* usb_device_id
****************************************************************/
-static struct usb_device_id usb_klsi_table[] = {
+static const struct usb_device_id usb_klsi_table[] = {
{ USB_DEVICE(0x03e8, 0x0008) }, /* AOX Endpoints USB Ethernet */
{ USB_DEVICE(0x04bb, 0x0901) }, /* I-O DATA USB-ET/T */
{ USB_DEVICE(0x0506, 0x03e8) }, /* 3Com 3C19250 */
--
2.7.4
^ permalink raw reply related
* [PATCH 14/35] net: usb: r8152: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:58 UTC (permalink / raw)
To: kvalo; +Cc: linux-kernel, netdev, linux-usb
In-Reply-To: <1502207885-11574-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/usb/r8152.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 6cfffef..ceb78e2 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -5303,7 +5303,7 @@ static void rtl8152_disconnect(struct usb_interface *intf)
.bInterfaceProtocol = USB_CDC_PROTO_NONE
/* table of devices that work with this driver */
-static struct usb_device_id rtl8152_table[] = {
+static const struct usb_device_id rtl8152_table[] = {
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8050)},
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152)},
{REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153)},
--
2.7.4
^ permalink raw reply related
* [PATCH 15/35] net: usb: rtl8150: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:58 UTC (permalink / raw)
To: kvalo, petkan; +Cc: linux-kernel, netdev, linux-usb
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/usb/rtl8150.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c
index daaa88a..5f565bd 100644
--- a/drivers/net/usb/rtl8150.c
+++ b/drivers/net/usb/rtl8150.c
@@ -112,7 +112,7 @@
#undef EEPROM_WRITE
/* table of devices that work with this driver */
-static struct usb_device_id rtl8150_table[] = {
+static const struct usb_device_id rtl8150_table[] = {
{USB_DEVICE(VENDOR_ID_REALTEK, PRODUCT_ID_RTL8150)},
{USB_DEVICE(VENDOR_ID_MELCO, PRODUCT_ID_LUAKTX)},
{USB_DEVICE(VENDOR_ID_MICRONET, PRODUCT_ID_SP128AR)},
--
2.7.4
^ permalink raw reply related
* [PATCH 16/35] wireless: ath: ar5523: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:59 UTC (permalink / raw)
To: kvalo, petkan; +Cc: linux-kernel, netdev, linux-wireless
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/wireless/ath/ar5523/ar5523.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c
index 106d6f8..68f0463 100644
--- a/drivers/net/wireless/ath/ar5523/ar5523.c
+++ b/drivers/net/wireless/ath/ar5523/ar5523.c
@@ -1749,7 +1749,7 @@ static void ar5523_disconnect(struct usb_interface *intf)
{ USB_DEVICE((vendor), (device) + 1), \
.driver_info = AR5523_FLAG_ABG|AR5523_FLAG_PRE_FIRMWARE }
-static struct usb_device_id ar5523_id_table[] = {
+static const struct usb_device_id ar5523_id_table[] = {
AR5523_DEVICE_UG(0x168c, 0x0001), /* Atheros / AR5523 */
AR5523_DEVICE_UG(0x0cf3, 0x0001), /* Atheros2 / AR5523_1 */
AR5523_DEVICE_UG(0x0cf3, 0x0003), /* Atheros2 / AR5523_2 */
--
2.7.4
^ permalink raw reply related
* [PATCH 17/35] wireless: ath: ath6kl: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:59 UTC (permalink / raw)
To: kvalo, petkan; +Cc: linux-kernel, netdev, linux-wireless
In-Reply-To: <1502207951-11692-1-git-send-email-arvind.yadav.cs@gmail.com>
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/wireless/ath/ath6kl/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
index 9da3594..4defb7a 100644
--- a/drivers/net/wireless/ath/ath6kl/usb.c
+++ b/drivers/net/wireless/ath/ath6kl/usb.c
@@ -1201,7 +1201,7 @@ static int ath6kl_usb_pm_resume(struct usb_interface *interface)
#endif
/* table of devices that work with this driver */
-static struct usb_device_id ath6kl_usb_ids[] = {
+static const struct usb_device_id ath6kl_usb_ids[] = {
{USB_DEVICE(0x0cf3, 0x9375)},
{USB_DEVICE(0x0cf3, 0x9374)},
{ /* Terminating entry */ },
--
2.7.4
^ permalink raw reply related
* [PATCH 18/35] wireless: ath: ath9k: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 15:59 UTC (permalink / raw)
To: kvalo, petkan, ath9k-devel; +Cc: linux-kernel, netdev, linux-wireless
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 0d9687a..c5f4dd8 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -20,7 +20,7 @@
MODULE_FIRMWARE(HTC_7010_MODULE_FW);
MODULE_FIRMWARE(HTC_9271_MODULE_FW);
-static struct usb_device_id ath9k_hif_usb_ids[] = {
+static const struct usb_device_id ath9k_hif_usb_ids[] = {
{ USB_DEVICE(0x0cf3, 0x9271) }, /* Atheros */
{ USB_DEVICE(0x0cf3, 0x1006) }, /* Atheros */
{ USB_DEVICE(0x0846, 0x9030) }, /* Netgear N150 */
--
2.7.4
^ permalink raw reply related
* [PATCH 19/35] wireless: ath: carl9170: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 16:00 UTC (permalink / raw)
To: kvalo, petkan, chunkeey; +Cc: linux-kernel, netdev, linux-wireless
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/wireless/ath/carl9170/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/carl9170/usb.c b/drivers/net/wireless/ath/carl9170/usb.c
index 99ab203..e7c3f3b 100644
--- a/drivers/net/wireless/ath/carl9170/usb.c
+++ b/drivers/net/wireless/ath/carl9170/usb.c
@@ -64,7 +64,7 @@ MODULE_ALIAS("arusb_lnx");
* http://wireless.kernel.org/en/users/Drivers/ar9170/devices ),
* whenever you add a new device.
*/
-static struct usb_device_id carl9170_usb_ids[] = {
+static const struct usb_device_id carl9170_usb_ids[] = {
/* Atheros 9170 */
{ USB_DEVICE(0x0cf3, 0x9170) },
/* Atheros TG121N */
--
2.7.4
^ permalink raw reply related
* [PATCH 20/35] wireless: atmel: at76c50x: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 16:00 UTC (permalink / raw)
To: kvalo, petkan; +Cc: linux-kernel, netdev, linux-wireless
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/wireless/atmel/at76c50x-usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c
index 09defbc..94bf01f 100644
--- a/drivers/net/wireless/atmel/at76c50x-usb.c
+++ b/drivers/net/wireless/atmel/at76c50x-usb.c
@@ -130,7 +130,7 @@ MODULE_FIRMWARE("atmel_at76c505amx-rfmd.bin");
#define USB_DEVICE_DATA(__ops) .driver_info = (kernel_ulong_t)(__ops)
-static struct usb_device_id dev_table[] = {
+static const struct usb_device_id dev_table[] = {
/*
* at76c503-i3861
*/
--
2.7.4
^ permalink raw reply related
* [PATCH 21/35] wireless: broadcom: brcm80211: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 16:01 UTC (permalink / raw)
To: kvalo, petkan, arend.vanspriel, franky.lin, wright.feng,
hante.meuleman
Cc: linux-kernel, netdev, linux-wireless, brcm80211-dev-list.pdl,
brcm80211-dev-list
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
index 0eea48e..51562b0 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
@@ -1463,7 +1463,7 @@ static int brcmf_usb_reset_resume(struct usb_interface *intf)
#define LINKSYS_USB_DEVICE(dev_id) \
{ USB_DEVICE(BRCM_USB_VENDOR_ID_LINKSYS, dev_id) }
-static struct usb_device_id brcmf_usb_devid_table[] = {
+static const struct usb_device_id brcmf_usb_devid_table[] = {
BRCMF_USB_DEVICE(BRCM_USB_43143_DEVICE_ID),
BRCMF_USB_DEVICE(BRCM_USB_43236_DEVICE_ID),
BRCMF_USB_DEVICE(BRCM_USB_43242_DEVICE_ID),
--
2.7.4
^ permalink raw reply related
* [PATCH 22/35] wireless: intersil: orinoco: constify usb_device_id
From: Arvind Yadav @ 2017-08-08 16:01 UTC (permalink / raw)
To: kvalo, elena.reshetova; +Cc: linux-kernel, netdev, linux-wireless
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
index c84fd84..56f6e3b 100644
--- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
@@ -210,7 +210,7 @@ struct ezusb_packet {
} __packed;
/* Table of devices that work or may work with this driver */
-static struct usb_device_id ezusb_table[] = {
+static const struct usb_device_id ezusb_table[] = {
{USB_DEVICE(USB_COMPAQ_VENDOR_ID, USB_COMPAQ_WL215_ID)},
{USB_DEVICE(USB_COMPAQ_VENDOR_ID, USB_HP_WL215_ID)},
{USB_DEVICE(USB_COMPAQ_VENDOR_ID, USB_COMPAQ_W200_ID)},
--
2.7.4
^ permalink raw reply related
* [PATCH net-next 0/7] rtnetlink: allow to run selected handlers without rtnl
From: Florian Westphal @ 2017-08-08 16:02 UTC (permalink / raw)
To: netdev
The RTNL mutex is used to serialize both rtnetlink calls and dump requests.
Its also used to protect other things such as the list of current netns.
Unfortunately RTNL mutex is a performance issue, e.g. a cpu adding an
ip address prevents other cpus from seemingly unrelated tasks such as
dumping tc classifiers.
This patch set attempts to add basic infrastructure to start pushing the
rtnl lock down to those places that need it, or even elide it entirely in
some cases.
Subsystems can now indicate that their doit() callback can run without
RTNL mutex. Such callbacks can then run in parallel.
This will obviously need a lot of followup work; all current users need
to be audited/changed to benefit from this.
Initial no-rtnl spots are ip6 fib add/del and netns new/getid.
Dumps are another problem entirely, see
commit 2907c35ff64708065 ("net: hold rtnl again in dump callbacks"),
this patchset doesn't touch them.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox