From: =?utf-8?Q?Bj=C3=B8rn_Mork?= Subject: Re: [PATCH] cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind Date: Tue, 08 Mar 2016 21:18:15 +0100 Message-ID: <871t7k7mgo.fsf@nemi.mork.no> References: <20160307.141100.1511700720120062677.davem@davemloft.net> <20160307.145406.188091362181073486.davem@davemloft.net> <87k2le815w.fsf_-_@nemi.mork.no> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: David Miller , Andrey Konovalov , Oliver Neukum , Dmitry Vyukov , Alexander Potapenko , Kostya Serebryany , Greg Kroah-Hartman , USB list , Network Development , Ben Hutchings To: Linus Torvalds Return-path: In-Reply-To: (Linus Torvalds's message of "Tue, 8 Mar 2016 11:43:26 -0800") Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org Linus Torvalds writes: > So looking at this, I wonder... > > Why is that FLAG_LINK_INTR thing not just always used? > > The _only_ thing that FLAG_LINK_INTR does is to cause > > usbnet_link_change(dev, 0, 0); > > to be called after network device attach. That doesn't seem to be con= troversial. Not all usbnet drivers support carrier detection, which is required to ever bring the link up again. > Looking at some examples, we have ax88179_178a.c that doesn't set the > flag, but instead does that usbnet_link_change() call at the end of > ax88179_bind(). > > There are a few drivers that seem to never call that > usbnet_link_change() at all, and don't have that FLAG_LINK_INTR flag. > Would they break? Yes. Drivers without carrier detection will be "down" forever. > Why is it called "FLAG_LINK_INTR" anyway? There doesn't seem to be > anything "INTR" about it. Beats me. I can only say that I always find naming difficult... We could ask Ben, who introduced it in: commit 37e8273cd30592d3a82bcb70cbb1bdc4eaeb6b71 Author: Ben Hutchings Date: Wed Nov 4 15:29:52 2009 +0000 usbnet: Set link down initially for drivers that update link state =20 Some usbnet drivers update link state while others do not due to hardware limitations. Add a flag to distinguish those that do, and set the link down initially for their devices. =20 This is intended to fix this bug: http://bugs.debian.org/444043 =20 Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller But I guess it doesn't really matter. Bj=C3=B8rn -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html