public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: Keith Packard <keithp@keithp.com>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	Kyle McMartin <kyle@infradead.org>
Subject: Re: [PATCH] net/usb: Add Lenovo ThinkPad OneLink GigaLAN USB ID to ax88179 driver
Date: Tue, 25 Feb 2014 09:55:28 +0100	[thread overview]
Message-ID: <87txbnbmgv.fsf@nemi.mork.no> (raw)
In-Reply-To: <1393286176-32076-1-git-send-email-keithp@keithp.com> (Keith Packard's message of "Mon, 24 Feb 2014 15:56:16 -0800")

Keith Packard <keithp@keithp.com> writes:

> Kyle McMartin says:
>
>>  &lenovo_info, surely.
>
> Yeah, Daniel Stone caught the same bug. Not a big deal; the only
> difference between any of these elements is the string produced by the
> kernel.

Yes, and that mess should really be cleaned up in this driver (and
probably others).

The .description field describes the *driver*, not the device.  The
device is described by the manufacturer, using the iManufacturer,
iProduct and iSerialstring descriptors, which the USB core takes care of
logging and storing.  There is absolutely no reason to add additional,
possibly conflicting, product descriptions in these drivers.

Some additional static data does of course not matter much, but the
additional code is really an unnecessary source of subtle bugs.  I'm
pretty sure the entry you copied has bugs in the .flags field
(ax88179_rx_fixup clones the skb and returns 1, which means that
FLAG_MULTI_PACKET should be set).  Keeping numerous copies of the exact
same driver definition is just waiting for someone to forget
syncronizing any fixups for such bugs.

I propose replacing samsung_info, lenovo_info and the other entries
differing only by description with a generic driver entry, and trust the
vendors to add the appropriate string descriptors to their devices.

The separate generic entries for USB2 and USB3 versions of the chip is
also more confusing than helpful IMHO, given that the driver really is
identical. I don't think it helps anyone to see "USB 3.0 Gigabit
Ethernet" reported if the adapter is connected to a USB 2.0 host and
vice versa.  Something lik "ASIX AX88179/178A" would do just fine as
description regardless of device ID.


Bjørn

  reply	other threads:[~2014-02-25  8:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 23:13 [PATCH] net/usb: Add Lenovo ThinkPad OneLink GigaLAN USB ID to ax88179 driver Keith Packard
2014-02-24 23:42 ` Kyle McMartin
2014-02-24 23:56   ` Keith Packard
2014-02-25  8:55     ` Bjørn Mork [this message]
2014-02-25  9:15 ` David Laight
2014-02-25 18:25   ` Keith Packard

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=87txbnbmgv.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=keithp@keithp.com \
    --cc=kyle@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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