]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
authorJakub Kicinski <kuba@kernel.org>
Thu, 27 May 2021 16:22:11 +0000 (09:22 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 May 2021 16:55:10 +0000 (09:55 -0700)
cdc-wdm: s/kill_urbs/poison_urbs/ to fix build

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
25 files changed:
1  2 
MAINTAINERS
drivers/net/appletalk/cops.c
drivers/net/bonding/bond_main.c
drivers/net/dsa/mt7530.c
drivers/net/dsa/sja1105/sja1105_main.c
drivers/net/ethernet/broadcom/bnx2.c
drivers/net/ethernet/fujitsu/fmvj18x_cs.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/usb/hso.c
drivers/usb/class/cdc-wdm.c
kernel/bpf/btf.c
kernel/bpf/syscall.c
kernel/bpf/verifier.c
net/core/dev.c
net/core/filter.c
net/packet/af_packet.c
net/sched/cls_api.c
net/tls/tls_sw.c
tools/bpf/bpftool/prog.c
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf_internal.h
tools/testing/selftests/bpf/prog_tests/ringbuf.c

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
Simple merge
index a105e174b3af34ed255184c961a74acb5f0d5f4f,b88d9ef45a1f1d138861bc454dcf197171dd0e6b..2080f36ff25b2ce4eba25073e363eba178b7d6f6
@@@ -3013,13 -2986,13 +3023,13 @@@ static int sja1105_setup(struct dsa_swi
        rc = sja1105_static_config_load(priv, ports);
        if (rc < 0) {
                dev_err(ds->dev, "Failed to load static config: %d\n", rc);
-               return rc;
+               goto out_ptp_clock_unregister;
        }
        /* Configure the CGU (PHY link modes and speeds) */
 -      rc = sja1105_clocking_setup(priv);
 +      rc = priv->info->clocking_setup(priv);
        if (rc < 0) {
                dev_err(ds->dev, "Failed to configure MII clocking: %d\n", rc);
-               return rc;
+               goto out_static_config_free;
        }
        /* On SJA1105, VLAN filtering per se is always enabled in hardware.
         * The only thing we can do to disable it is lie about what the 802.1Q
Simple merge
Simple merge
index 457b00c6e9841c855d48114d75d53de5ca3eda0b,d1e4a7379bebdb0bf73b00b6adb11f64b069c29b..8e5490ac13a259cb54e688cde8cdeb95197fdddc
@@@ -811,151 -804,6 +823,152 @@@ static struct usb_class_driver wdm_clas
        .minor_base =   WDM_MINOR_BASE,
  };
  
-       kill_urbs(desc);
 +/* --- WWAN framework integration --- */
 +#ifdef CONFIG_WWAN
 +static int wdm_wwan_port_start(struct wwan_port *port)
 +{
 +      struct wdm_device *desc = wwan_port_get_drvdata(port);
 +
 +      /* The interface is both exposed via the WWAN framework and as a
 +       * legacy usbmisc chardev. If chardev is already open, just fail
 +       * to prevent concurrent usage. Otherwise, switch to WWAN mode.
 +       */
 +      mutex_lock(&wdm_mutex);
 +      if (desc->count) {
 +              mutex_unlock(&wdm_mutex);
 +              return -EBUSY;
 +      }
 +      set_bit(WDM_WWAN_IN_USE, &desc->flags);
 +      mutex_unlock(&wdm_mutex);
 +
 +      desc->manage_power(desc->intf, 1);
 +
 +      /* tx is allowed */
 +      wwan_port_txon(port);
 +
 +      /* Start getting events */
 +      return usb_submit_urb(desc->validity, GFP_KERNEL);
 +}
 +
 +static void wdm_wwan_port_stop(struct wwan_port *port)
 +{
 +      struct wdm_device *desc = wwan_port_get_drvdata(port);
 +
 +      /* Stop all transfers and disable WWAN mode */
++      poison_urbs(desc);
 +      desc->manage_power(desc->intf, 0);
 +      clear_bit(WDM_READ, &desc->flags);
 +      clear_bit(WDM_WWAN_IN_USE, &desc->flags);
++      unpoison_urbs(desc);
 +}
 +
 +static void wdm_wwan_port_tx_complete(struct urb *urb)
 +{
 +      struct sk_buff *skb = urb->context;
 +      struct wdm_device *desc = skb_shinfo(skb)->destructor_arg;
 +
 +      usb_autopm_put_interface(desc->intf);
 +      wwan_port_txon(desc->wwanp);
 +      kfree_skb(skb);
 +}
 +
 +static int wdm_wwan_port_tx(struct wwan_port *port, struct sk_buff *skb)
 +{
 +      struct wdm_device *desc = wwan_port_get_drvdata(port);
 +      struct usb_interface *intf = desc->intf;
 +      struct usb_ctrlrequest *req = desc->orq;
 +      int rv;
 +
 +      rv = usb_autopm_get_interface(intf);
 +      if (rv)
 +              return rv;
 +
 +      usb_fill_control_urb(
 +              desc->command,
 +              interface_to_usbdev(intf),
 +              usb_sndctrlpipe(interface_to_usbdev(intf), 0),
 +              (unsigned char *)req,
 +              skb->data,
 +              skb->len,
 +              wdm_wwan_port_tx_complete,
 +              skb
 +      );
 +
 +      req->bRequestType = (USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE);
 +      req->bRequest = USB_CDC_SEND_ENCAPSULATED_COMMAND;
 +      req->wValue = 0;
 +      req->wIndex = desc->inum;
 +      req->wLength = cpu_to_le16(skb->len);
 +
 +      skb_shinfo(skb)->destructor_arg = desc;
 +
 +      rv = usb_submit_urb(desc->command, GFP_KERNEL);
 +      if (rv)
 +              usb_autopm_put_interface(intf);
 +      else /* One transfer at a time, stop TX until URB completion */
 +              wwan_port_txoff(port);
 +
 +      return rv;
 +}
 +
 +static struct wwan_port_ops wdm_wwan_port_ops = {
 +      .start = wdm_wwan_port_start,
 +      .stop = wdm_wwan_port_stop,
 +      .tx = wdm_wwan_port_tx,
 +};
 +
 +static void wdm_wwan_init(struct wdm_device *desc)
 +{
 +      struct usb_interface *intf = desc->intf;
 +      struct wwan_port *port;
 +
 +      /* Only register to WWAN core if protocol/type is known */
 +      if (desc->wwanp_type == WWAN_PORT_UNKNOWN) {
 +              dev_info(&intf->dev, "Unknown control protocol\n");
 +              return;
 +      }
 +
 +      port = wwan_create_port(&intf->dev, desc->wwanp_type, &wdm_wwan_port_ops, desc);
 +      if (IS_ERR(port)) {
 +              dev_err(&intf->dev, "%s: Unable to create WWAN port\n",
 +                      dev_name(intf->usb_dev));
 +              return;
 +      }
 +
 +      desc->wwanp = port;
 +}
 +
 +static void wdm_wwan_deinit(struct wdm_device *desc)
 +{
 +      if (!desc->wwanp)
 +              return;
 +
 +      wwan_remove_port(desc->wwanp);
 +      desc->wwanp = NULL;
 +}
 +
 +static void wdm_wwan_rx(struct wdm_device *desc, int length)
 +{
 +      struct wwan_port *port = desc->wwanp;
 +      struct sk_buff *skb;
 +
 +      /* Forward data to WWAN port */
 +      skb = alloc_skb(length, GFP_ATOMIC);
 +      if (!skb)
 +              return;
 +
 +      memcpy(skb_put(skb, length), desc->inbuf, length);
 +      wwan_port_rx(port, skb);
 +
 +      /* inbuf has been copied, it is safe to check for outstanding data */
 +      schedule_work(&desc->service_outs_intr);
 +}
 +#else /* CONFIG_WWAN */
 +static void wdm_wwan_init(struct wdm_device *desc) {}
 +static void wdm_wwan_deinit(struct wdm_device *desc) {}
 +static void wdm_wwan_rx(struct wdm_device *desc, int length) {}
 +#endif /* CONFIG_WWAN */
 +
  /* --- error handling --- */
  static void wdm_rxwork(struct work_struct *work)
  {
Simple merge
Simple merge
Simple merge
diff --cc net/core/dev.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge