Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1446379

Re: [PATCH net-next] cdc_ether: Improve ZTE MF823/831/910 handling

Path csiph.com!news.redatomik.org!newsfeed.datemas.de!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Andrey Melnikov <temnota.am@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH net-next] cdc_ether: Improve ZTE MF823/831/910 handling
Date Tue, 19 Jul 2016 14:20:02 +0200
Message-ID <rWCae-3Tc-11@gated-at.bofh.it> (permalink)
X-Original-To Kristian Evensen <kristian.evensen@gmail.com>, linux-kernel@vger.kernel.org
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=XI0sfsC1map3iOb9mwnNuI1T3xut7P19t7I2KVJltbs=; b=yfwIkfIbzHyvJh7lRkYo2ZnDpS1d8bM9bHR9gUNV8rQ2+WLP9ahDuoocxTBxPw3XsY FOu05wfIae0tHnE0gSvLzAiJyufbDPVArOSNtGh5rxPtJfuf5VLltPKKZmX4w4RFRx8t vYBNlPqo4d1iIMF6kjByCaM/f3447z1srsUALWJOT0zDHO52LChcJ1/9CKbxp4DwMu/P FGRkZpwt1gYggRzYUZYlQSQ4G2bCDuN/m3OIPbvhV9wPlITjGRd4zbF3pc0j3L4VJfq7 q1iRlb74tC4WMigmjaDChUIeWIWXYnbxf7TKT0GoRqYJOy/Yxo8brClGL6dq9Vv615ov zfOg==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=XI0sfsC1map3iOb9mwnNuI1T3xut7P19t7I2KVJltbs=; b=OFbQ6TFDVWEoUmsrHdwJ3x4xWPGz4107wbiH7J2t+EzVFmW0tSx1RGN41OIYb/kk0q HmURR7EFxvrGjeTRDqRBIlzB+d/O+WbTdq12elTD3egOoyASEhSa2qV+275SyWc1/X1i sdUfeNWPAD0gznvsfHSfTWOIt/8RqD+tKCNUm9rbEG+C7rpM/QpcWvfDexrB8eLoblVi u2xa7YXRxhYSWPGFvCmyf9OdSQesYj4b3wpPDx4QjsqtJ7YV178VJvv3Pq2hDhKnQ/bZ 9wtSv6BFOv3t65j6dI4sfvJikq6UDlbf8RqsKHFw2Fpv/jTL564XLWKnLuKXIFXluQSX aLdA==
X-Gm-Message-State ALyK8tKnROtQeqRJrqYHuqFi911CKPfyfZx45CbcZ1M4hnETtWczJmMEx6T9XvalxGs9p50rINp0jo1H0MtxAQ==
X-Received by 10.25.166.2 with SMTP id p2mr15434920lfe.134.1468930459860; Tue, 19 Jul 2016 05:14:19 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 40
Organization linux.* mail to news gateway
X-Original-Date Tue, 19 Jul 2016 15:14:19 +0300
X-Original-Message-ID <CA+PODjqA49W9UXqu9pKFi5-fXdFs1q2JQCyuJrjL4YV4BPaXzg@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1446379

Show key headers only | View raw


> On Tue, Jul 19, 2016 at 10:30 AM, Lars Melin <larsm17@gmail.com> wrote:
> > On 2016-07-19 13:40, Kristian Evensen wrote:
> >
> >> I guess I can match on the VID/PID in usbnet, but won't it be cleaner
> >> to add a new bind() function (in cdc_ether) which matches the two PIDs
> >> and leave usbnet as is? Or am I misunderstanding how to add this
> >> functionality to usbnet?
> >>
> >
> > Matching on the usb id is probably not a great idea, there is more id's
> > than the two you have found and there is also more than two non-unique mac
> > addresses.
> >
> > Example:
> >
> > 0200FFAAAAAA  19d2:1589/1592/1595
> > 020CE70B0102  19d2:1040/1048/1405
> >
> > You can easily find them by googling them, without colon separators you
> > will find them in verbose lsusb listings, with colons you will find them in
> > dmesg pastings.
> >
> > I would probably have found more dupes if users had refrained from using the
> > stupid usbdevices cmd which removes almost all interesting info from device
> > listings in internet foras.

> Thanks for letting me know. It seems that the static MAC behaviour is
> the default behaviour of ZTE-devices that use cdc_ether. Unless anyone
> objects, I will make the following changes for v2:

> * Create a ZTE-specific bind method in cdc_ether that checks for a
> random MAC and generates a new MAC if found.
> * Use the ZTE-specific bind + rx fixup for all ZTE cdc_ether devices
> by default, and add exceptions if we find any devices not displaying
> this behaviour. I see there are already five ZTE devices with separate
> entries in the products-array in cdc_ether.

This is not only ZTE specific bug. Huawei (balong based) modems use
predefined MAC 0a:5b:8f:27:9a:64.
I think - better detect this devices by MAC address, not by VID/PID.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH net-next] cdc_ether: Improve ZTE MF823/831/910 handling Andrey Melnikov <temnota.am@gmail.com> - 2016-07-19 14:20 +0200

csiph-web