netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn-yOkvZcmFvRU@public.gmane.org>
To: Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: Aleksander Morgado
	<aleksander-Dvg4H30XQSRVIjRurl1/8g@public.gmane.org>,
	Dan Williams <dcbw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Oliver Neukum <oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>,
	Ben Hutchings
	<ben.hutchings-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>,
	USB list <linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Network Development
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	xiaomao <xiaomao0213-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>
Subject: Re: Fwd: [PATCH] net:usb:cdc_ncm: fix that tag Huawei devices as wwan
Date: Mon, 15 Jun 2015 10:58:07 +0200	[thread overview]
Message-ID: <87ioapl55s.fsf@nemi.mork.no> (raw)
In-Reply-To: <CA+55aFz3S3nR_aDMMS1vcayyEqJCBL5tgoYAfDE2WGyM3Vcrww-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> (Linus Torvalds's message of "Sun, 14 Jun 2015 13:51:46 -1000")

Linus Torvalds <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> writes:

> Hmm. Oliver is marked as the maintainer of the USB CDC code, but
> others have touched it more recently. So I'm just wildly adding people
> to the cc to comment on this patch and maybe apply it.
> Oliver/David/Ben/Bjørn?

Adding Aleksander and Dan, too.  The 'wwanX' vs 'usbX' distinction is a
hint for userspace and nothing more. We try our best to make this hint
as precise as possible, but there has never been any guarantee that it
is 100% correct.  So userspace will have to deal with hints being wrong.
This has been discussed before:
http://lists.freedesktop.org/archives/modemmanager-devel/2014-April/001068.html

What makes the Huawei NCM devices special is that the same ID is reused
for both types of devices, making it impossible to achieve perfect
hinting by adding exceptions to the generic rule.  We can choose between
wrong towards 'wwanX' or wrong towards 'usbX'.  But the hint WILL be
wrong in some cases no matter what we do.

The 12d1:1506 device ID is a perfect example.  Here's a report of a
Huawei E5776 which should be used as a plain 'usbX' NCM device:
http://lists.freedesktop.org/archives/modemmanager-devel/2014-April/001040.html
And here's a report of a Huawei E3276 which needs wwan management and
therefore should be hinted as a 'wwanX' NCM device:
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=764920

So which of the two wrongs should we choose?

Huawei wanting this changed is a strong argument for the 'usbX'
direction, of course.  But this will be a user visible change which is
likely to break currently working devices until userspace adapts.  And
that will normally trump almost any other argument.  I don't think we
can change this now.  I sincerely apologise about having added the
generic rule in the first place, but I don't see how I can go back and
change that.

I believe we have to follow the path of least surprise: Keeping what we
have.

But we should definitely work with userspace to ensure that a wrongly
flagged 'wwanX' device is usable without any wwan management.
Preferably without the user really noticing anything different (except
possibly the device name).



Bjørn

> ---------- Forwarded message ----------
> From: xiaomao <xiaomao0213-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>
> Date: Sun, Jun 14, 2015 at 1:18 PM
> Subject: [PATCH] net:usb:cdc_ncm: fix that tag Huawei devices as wwan
>
>
> Form: Qianni Mamaqianni-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
>
> Huawei devices is the gereric CDC_NCM devices, but not is WWAN
> devices. In the patch, we deleted the code about tagging Huawei
> devices as WWAN.
> ---
>
> Signed-off-by:Qianni Mamaqianni-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
>
> --- linux-3.19/drivers/net/usb/cdc_ncm.c.orig	2015-06-15 01:29:52.354238079 +0800
> +++ linux-3.19/drivers/net/usb/cdc_ncm.c	2015-06-15 01:31:04.074236246 +0800
> @@ -1573,12 +1573,12 @@ static const struct usb_device_id cdc_de
>  	},
>  
>  	/* tag Huawei devices as wwan */
> -	{ USB_VENDOR_AND_INTERFACE_INFO(0x12d1,
> +	/*{ USB_VENDOR_AND_INTERFACE_INFO(0x12d1,
>  					USB_CLASS_COMM,
>  					USB_CDC_SUBCLASS_NCM,
>  					USB_CDC_PROTO_NONE),
>  	  .driver_info = (unsigned long)&wwan_info,
> -	},
> +	},*/
>  
>  	/* Infineon(now Intel) HSPA Modem platform */
>  	{ USB_DEVICE_AND_INTERFACE_INFO(0x1519, 0x0443,
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-06-15  8:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <SNT147-W99A0E937260823EBAA1FFB3B90@phx.gbl>
     [not found] ` <SNT147-W99A0E937260823EBAA1FFB3B90-MsuGFMq8XAE@public.gmane.org>
2015-06-14 23:51   ` Fwd: [PATCH] net:usb:cdc_ncm: fix that tag Huawei devices as wwan Linus Torvalds
     [not found]     ` <CA+55aFz3S3nR_aDMMS1vcayyEqJCBL5tgoYAfDE2WGyM3Vcrww-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-15  8:58       ` Bjørn Mork [this message]
2015-06-15 10:22         ` Marcel Holtmann
     [not found]           ` <30508675-5839-4E65-975A-4CFC5B1C5E24-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2015-06-15 11:09             ` Bjørn Mork
     [not found]               ` <87a8w1kz3a.fsf-lbf33ChDnrE/G1V5fR+Y7Q@public.gmane.org>
2015-06-15 11:25                 ` Marcel Holtmann
     [not found]                   ` <SNT147-W34897D8EB12DAD3DE657EDB3A60@phx.gbl>
     [not found]                     ` <SNT147-W52BB193529481B6D3BFA57B3AF0@phx.gbl>
     [not found]                       ` <73FEE7778B75214796F3C8DE1ABE6DD66ED26A22@szxema508-mbx.china.huawei.com>
2015-06-26  9:20                         ` about " Bjørn Mork
     [not found]                           ` <87oak27rmn.fsf-lbf33ChDnrE/G1V5fR+Y7Q@public.gmane.org>
2015-07-01  0:49                             ` 答复: " Chenqi (jakio)
2015-07-01  1:04                               ` Greg KH
2015-07-01  1:50                                 ` 答复: " Chenqi (jakio)
2015-06-15  9:08     ` Fwd: " Oliver Neukum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ioapl55s.fsf@nemi.mork.no \
    --to=bjorn-yokvzcmfvru@public.gmane.org \
    --cc=aleksander-Dvg4H30XQSRVIjRurl1/8g@public.gmane.org \
    --cc=ben.hutchings-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org \
    --cc=dcbw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=xiaomao0213-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).