Linux-ACPI Archive on lore.kernel.org
 help / color / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Charles.Hyde@dellteam.com
Cc: bjorn@mork.no, <oliver@neukum.org>, <rjw@rjwysocki.net>,
	<lenb@kernel.org>, <Mario.Limonciello@dell.com>,
	<chip.programmer@gmail.com>, <nic_swsd@realtek.com>,
	<linux-usb@vger.kernel.org>, <linux-acpi@vger.kernel.org>
Subject: RE: [PATCH 1/3] net: cdc_ncm: add get/set ethernet address functions
Date: Fri, 6 Sep 2019 14:15:10 -0400 (EDT)
Message-ID: <Pine.LNX.4.44L0.1909061412350.1627-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <43fa8b0a974d426faccf5e6d486af18a@AUSX13MPS307.AMER.DELL.COM>

On Fri, 6 Sep 2019 Charles.Hyde@dellteam.com wrote:

> <snipped> 
> > > +	ret = usbnet_read_cmd(dev, USB_CDC_GET_NET_ADDRESS,
> > > +			      USB_DIR_IN | USB_TYPE_CLASS
> > > +			      | USB_RECIP_INTERFACE, 0,
> > > +			      USB_REQ_SET_ADDRESS, buf, ETH_ALEN);
> > 
> > Where did that USB_REQ_SET_ADDRESS come from? Did you just look up an
> > arbutrary macro that happened to match your device config?  How do you
> > expect this to work with a generic NCM device?  Or even your own device,
> > when the next firmware revision moves the function to a different interface?
> <snipped>
> 
> https://wiki.osdev.org/Universal_Serial_Bus#SET_ADDRESS
> 
> https://www.usb.org/document-library/network-control-model-devices-specification-v10-and-errata-and-adopters-agreement
> Download and view the NCM specification v1.0 (Errata 1), dated November 24, 2010.  See table 6.2 on page 30.  Also see sections 6.2.2 and 6.2.3 on page 32.
> 
> USB_REQ_SET_ADDRESS came from include/uapi/linux/usb/ch9.h.  This matches the SET_ADDRESS definition from the osdev wiki page, so I used it because the name and numeric values both matched.  It further matches what the Windows driver issues.

The names and values may match, but the meanings do not.  
USB_REQ_SET_ADDRESS refers to a USB bus address, not a MAC address.

Alan Stern


  reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 21:01 Charles.Hyde
2019-09-06  9:02 ` Bjørn Mork
2019-09-06 18:00   ` Charles.Hyde
2019-09-06 18:15     ` Alan Stern [this message]
2019-09-06 18:19       ` Charles.Hyde
2019-09-06 20:07         ` Bjørn Mork
2019-09-06 20:20           ` Charles.Hyde
2019-09-06 20:39             ` Bjørn Mork
2019-09-06 21:00               ` Charles.Hyde
  -- strict thread matches above, loose matches on Subject: below --
2019-08-30 19:37 Charles.Hyde
2019-09-02  9:43 ` Oliver Neukum
2019-09-03 16:45   ` Charles.Hyde

Reply instructions:

You may reply publically 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=Pine.LNX.4.44L0.1909061412350.1627-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=Charles.Hyde@dellteam.com \
    --cc=Mario.Limonciello@dell.com \
    --cc=bjorn@mork.no \
    --cc=chip.programmer@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=oliver@neukum.org \
    --cc=rjw@rjwysocki.net \
    /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

Linux-ACPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-acpi/0 linux-acpi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-acpi linux-acpi/ https://lore.kernel.org/linux-acpi \
		linux-acpi@vger.kernel.org linux-acpi@archiver.kernel.org
	public-inbox-index linux-acpi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-acpi


AGPL code for this site: git clone https://public-inbox.org/ public-inbox