Re: [PATCH v2 0/5] usb: cdc-wdm: subdriver support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-02-27 at 14:58 +0100, Bjørn Mork wrote:
> Oliver Neukum <oliver@xxxxxxxxxx> writes:
> 
> > strictly speaking atomic variables must be initialized. One cannot depend
> > on a binary 0 meaning that an atomic ariable is 0 and ready to use.
> 
> OK, so should I integrate something like this in the patch and resubmit,
> this time including netdev in the discussions? :
> 
> 
> diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
> index 546dca5..576ce30 100644
> --- a/drivers/net/usb/qmi_wwan.c
> +++ b/drivers/net/usb/qmi_wwan.c
> @@ -65,6 +65,9 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
>         struct usb_cdc_ether_desc *cdc_ether = NULL;
>         u32 required = 1 << USB_CDC_HEADER_TYPE | 1 << USB_CDC_UNION_TYPE;
>         u32 found = 0;
> +       atomic_t *pmcount = (void *)&dev->data[1];
> +
> +       atomic_set(pmcount, 0);
>  
>         /*
>          * assume a data interface has no additional descriptors and
> @@ -209,6 +212,9 @@ static int qmi_wwan_bind_shared(struct usbnet *dev, struct usb_interface *intf)
>  {
>         int rv;
>         struct usb_driver *subdriver = NULL;
> +       atomic_t *pmcount = (void *)&dev->data[1];
> +
> +       atomic_set(pmcount, 0);
>  
>         /* collect all three endpoints */
>         rv = usbnet_get_endpoints(dev, intf);
> 
> 
> 
> Maybe also include all the known Gobi devices in the ID list? Or is that
> too risky?  People may be using the out-of-tree Gobi driver and this
> will never be fully compatible with userspace for that one.  They can of
> course blacklist this driver if they want to, but still..

That's a good idea.  If you want to patch that in, look at qcserial and
grab all the IDs that *don't* say "QDL mode", ie:

no:  	{DEVICE_G1K(0x05c6, 0x9211)},	/* Acer Gobi QDL device */
yes:	{DEVICE_G1K(0x05c6, 0x9212)},	/* Acer Gobi Modem Device */

Dan

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux