Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755275Ab3JCTLn (ORCPT ); Thu, 3 Oct 2013 15:11:43 -0400 Received: from va3ehsobe010.messaging.microsoft.com ([216.32.180.30]:9661 "EHLO va3outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754536Ab3JCTLl (ORCPT ); Thu, 3 Oct 2013 15:11:41 -0400 X-Forefront-Antispam-Report: CIP:70.37.183.190;KIP:(null);UIP:(null);IPV:NLI;H:mail.freescale.net;RD:none;EFVD:NLI X-SpamScore: -3 X-BigFish: VS-3(zz98dI936eI1432Izz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de098h1de097h8275dhz2dh2a8h839h93fhd24hf0ah1288h12a5h12a9h12bdh137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1fb3h1d0ch1d2eh1d3fh1dfeh1dffh1e23h1fe8h1ff5h1155h) Message-ID: <1380827494.12932.161.camel@snotra.buserror.net> Subject: Re: RFC: (re-)binding the VFIO platform driver to a platform device From: Scott Wood To: "gregkh@linuxfoundation.org" CC: Christoffer Dall , Yoder Stuart-B08248 , Alex Williamson , Kim Phillips , "linux-kernel@vger.kernel.org" , "a.motakis@virtualopensystems.com" , "agraf@suse.de" , Wood Scott-B07421 , Sethi Varun-B16395 , Bhushan Bharat-R65777 , "peter.maydell@linaro.org" , "santosh.shukla@linaro.org" , "kvm@vger.kernel.org" Date: Thu, 3 Oct 2013 14:11:34 -0500 In-Reply-To: <20131003185434.GA26123@kroah.com> References: <20131002151413.GG63102@lvm> <9F6FE96B71CF29479FF1CDC8046E15036D405D@039-SN1MPN1-003.039d.mgd.msft.net> <1380738758.12932.43.camel@snotra.buserror.net> <20131002184330.GC5108@cbox> <20131002203735.GA10871@kroah.com> <1380748121.12932.89.camel@snotra.buserror.net> <20131002211631.GA11914@kroah.com> <1380749715.12932.109.camel@snotra.buserror.net> <20131002234009.GA27714@kroah.com> <1380825207.12932.151.camel@snotra.buserror.net> <20131003185434.GA26123@kroah.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1616 Lines: 39 On Thu, 2013-10-03 at 11:54 -0700, gregkh@linuxfoundation.org wrote: > On Thu, Oct 03, 2013 at 01:33:27PM -0500, Scott Wood wrote: > > What it looks like we do still want from the driver core is the ability > > for a driver to say that it should not be bound to a device except via > > explicit sysfs bind, > > You can do that today by not providing any device ids in your driver > structure, relying on the dynamic ids the driver core creates. I'm not sure what you mean by dynamic ids, but if the driver doesn't provide any match data, then driver_match_device() will return 0 and bind_store() will fail. > > and the ability for a user to say that a device should not be bound to > > a driver except via explicit sysfs bind. > > That's not going to happen, as how can the kernel know a specific device > is going to want this, before it asks the drivers about it? This would normally be set by the user prior to unbinding from a different driver, though it would also be nice to be able to set it at boot time (e.g. via the kernel command line). > Or, just don't ever create a driver that matches that device, then rely > on userspace to do the binding explicitly. That breaks the normal use case where you want the device to be bound to the normal driver without doing anything special. And again, driver_match_device() will cause the bind to fail. -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/