[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8737c2eat4.fsf@miraculix.mork.no>
Date: Thu, 18 May 2017 12:09:11 +0200
From: Bjørn Mork <bjorn@...k.no>
To: Oliver Neukum <oneukum@...e.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] cdc-ether: divorce initialisation with a filter reset and a generic method
Oliver Neukum <oneukum@...e.com> writes:
> @@ -417,7 +434,7 @@ int usbnet_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
> BUILD_BUG_ON((sizeof(((struct usbnet *)0)->data)
> < sizeof(struct cdc_state)));
>
> - status = usbnet_generic_cdc_bind(dev, intf);
> + status = usbnet_ether_cdc_bind(dev, intf);
> if (status < 0)
> return status;
>
> @@ -472,7 +489,6 @@ static void usbnet_cdc_zte_status(struct usbnet *dev, struct urb *urb)
>
> if (urb->actual_length < sizeof(*event))
> return;
> -
> event = urb->transfer_buffer;
>
> if (event->bNotificationType != USB_CDC_NOTIFY_NETWORK_CONNECTION) {
> @@ -493,7 +509,7 @@ static void usbnet_cdc_zte_status(struct usbnet *dev, struct urb *urb)
> static const struct driver_info cdc_info = {
> .description = "CDC Ethernet Device",
> .flags = FLAG_ETHER | FLAG_POINTTOPOINT,
> - .bind = usbnet_cdc_bind,
> + .bind = usbnet_ether_cdc_bind,
> .unbind = usbnet_cdc_unbind,
> .status = usbnet_cdc_status,
> .set_rx_mode = usbnet_cdc_update_filter,
I didn't quite get this. You change the call in usbnet_cdc_bind() from
usbnet_generic_cdc_bind() to usbnet_ether_cdc_bind(), which I believe is
fine. But then you update the .bind hook to point to usbnet_ether_cdc_bind.
Why? The only effect I can see is that usbnet_get_ethernet_addr() is
skipped. That can't be correct?
Bjørn
Powered by blists - more mailing lists