On Sat, Oct 20, 2007 at 03:30:07PM +0200, Jachym Holecek wrote:ows ware No, this is not what a cfdata_t represents. It's a potential instance of a driver, not a device. In order to create a cfdata_t, you need the name of a driver. Except the parent bus can't know about drivers able to claim a device before it has called their match functions, and for that it needs a set of cfdata_t. Think of competing drivers for a device that identifies the same way to the parent bus. The issue at stake here is how to mix direct and indirect configurations for a given bus. It's possible under the current autoconf(9) framework (albeit somewhat hackish). The controler that attaches an iic instance has to pass a table of some sort to the iic driver; in the current autoconf(9) framework it would unfortunately have to be through a pointer in the attach args (unless you somehow delay attachment of children to give a chance to the parent to set a property, but that's equally ugly). Then the iic driver attaches its children in two distinct phases: first, the direct configuration, enumerating the passed table. The trick here (again, in the current autoconf(9) framework) is to let drivers know it's a direct configuration attempt. That's a field to add to the iic_attach_args structure as the id given by the controler. If said id is "set" (e.g., it's a string and it's not NUL[L?]), a driver's match function knows it's a direct config attempt and will use said id to match. If it isn't set, then it's an indirect config attempt, and the driver will probe the usual way. It gets ugly here because what we really want to avoid, whether the bus be isa or icc, is a driver poking to some random address when not asked to. Which means that under the method given here, all drivers have to be modified, most of them not to do anything but return 0 when a direct config is attempted. (Therefore, with a more refined autoconf(9), a driver would have a match function for direct configuration, and a different one for indirect configuration, more correctly called "probe function".) In any case, cfdata_t are basically lines in the config files or its equivalent for a LKM, but nothing more. --=20 Quentin Garnier - cube@cubidou.net - cube@NetBSD.org "See the look on my face from staying too long in one place [...] every time the morning breaks I know I'm closer to falling" KT Tunstall, Saving My Face, Drastic Fantastic, 2007.
| Martin Bligh | Re: Unified tracing buffer |
| Ingo Molnar | [announce] "kill the Big Kernel Lock (BKL)" tree |
| Con Kolivas | [PATCH] [RFC] sched: accurate user accounting |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Krzysztof Oledzki | Error: an inet prefix is expected rather than "0/0". |
| Wenji Wu | A Linux TCP SACK Question |
| Ramachandra K | [PATCH 11/13] QLogic VNIC: Driver utility file - implements various utility macros |
| Jay Cliburn | Re: atl1 64-bit => 32-bit DMA borkage (reproducible, bisected) |
git: | |
| Andrew Morton | Untracked working tree files |
| Pierre Habouzit | Re: libgit2 - a true git library |
| Nicolas Vilz 'niv' | git + ssh + key authentication feature-request |
| Martin Langhoff | Re: pack operation is thrashing my server |
| Steve B | SSH brute force attacks no longer being caught by PF rule |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| rancor | How to copy/pipe console buffert to file? |
| Richard Stallman | Real men don't attack straw men |
| Question on swap as ramdisk partition | 43 minutes ago | Linux kernel |
| Netfilter kernel module | 11 hours ago | Linux kernel |
| serial driver xmit problem | 14 hours ago | Linux kernel |
| Why Windows is better than Linux | 14 hours ago | Linux general |
| How can I see my kernel messages in vt12? | 20 hours ago | Linux kernel |
| Grub | 1 day ago | Linux general |
| vmalloc_fault handling in x86_64 | 1 day ago | Linux kernel |
| epoll_wait()ing on epoll FD | 1 day ago | Linux kernel |
| Framebuffer in x86_64 causes problems to multiseat | 1 day ago | Linux kernel |
| Difference between 2.4 and 2.6 regarding thread creation | 2 days ago | Linux general |
