Thread (9 messages) 9 messages, 4 authors, 2019-08-22

Re: [RFC 1/4] Add usb_get_address and usb_set_address support

From: <hidden>
Date: 2019-08-21 23:35:13
Also in: linux-acpi, linux-usb

<snipped>
This is a VERY cdc-net-specific function.  It is not a "generic" USB
function at all.  Why does it belong in the USB core?  Shouldn't it live
in the code that handles the other cdc-net-specific logic?

thanks,

greg k-h

Thank you for this feedback, Greg.  I was not sure about adding this to message.c, because of the USB_CDC_GET_NET_ADDRESS.  I had found references to SET_ADDRESS in the USB protocol at https://wiki.osdev.org/Universal_Serial_Bus#USB_Protocol.  If one wanted a generic USB function for SET_ADDRESS, to be used for both sending a MAC address and receiving one, how would you suggest this be implemented?  This is a legit question because I am curious.

Your feedback led to moving the functionality into cdc_ncm.c for today's testing, and removing all changes from messages.c, usb.h, usbnet.c, and usbnet.h.  This may be where I end up long term, but I would like to learn if there is a possible solution that could live in message.c and be callable from other USB-to-Ethernet aware drivers.

Thank you again,
Charles Hyde
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help