Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-04 Thread Jiri Kosina
On Tue, 2 Oct 2012, Linus Torvalds wrote: > Now, at the same time, I do agree that network devices should generally > try to delay it until ifup time Slightly tangential to the ongoing discussion, but still ... I think that even "all network drivers should delay firmware loading to ifup time"

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-04 Thread Greg KH
On Thu, Oct 04, 2012 at 09:39:41AM -0400, Josh Boyer wrote: > > That said, there's clearly enough variation here that I think that for > > now I won't take the step to disable the udev part. I'll do the patch > > to support "direct filesystem firmware loading" using the udev default > > paths, and

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-04 Thread Josh Boyer
On Wed, Oct 3, 2012 at 6:58 PM, Linus Torvalds wrote: > On Wed, Oct 3, 2012 at 3:48 PM, Andy Walls wrote: >> >> I don't know if you can remove the /sys/.../firmware ABI altogether, because >> there is at least one, somewhat popular udev replacement that also uses it: >> mdev >> >> http://git.bu

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Kay Sievers
On Thu, Oct 4, 2012 at 12:58 AM, Linus Torvalds wrote: > That said, there's clearly enough variation here that I think that for > now I won't take the step to disable the udev part. I'll do the patch > to support "direct filesystem firmware loading" using the udev default > paths, and that hopeful

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Linus Torvalds
On Wed, Oct 3, 2012 at 6:33 PM, Ming Lei wrote: > > Yes, the patch will make firmware cache not working, I would like to fix > that when I return from one trip next week. > > BTW, firmware cache is still needed even direct loading is taken. I agree 100%, I'd have liked to do the caching for the d

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Linus Torvalds
On Wed, Oct 3, 2012 at 3:48 PM, Andy Walls wrote: > > I don't know if you can remove the /sys/.../firmware ABI altogether, because > there is at least one, somewhat popular udev replacement that also uses it: > mdev > > http://git.busybox.net/busybox/plain/docs/mdev.txt Heh. That web doc docume

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Stephen Rothwell
Hi Linus, On Wed, 3 Oct 2012 13:39:23 -0700 Linus Torvalds wrote: > > Ok, I wish this had been getting more testing in Linux-next or > something If you ever want a patch tested for a few days, just send it to me and I will put it in my "fixes" tree which is merged into linux-next immediately on

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Andy Walls
Linus Torvalds wrote: >On Wed, Oct 3, 2012 at 12:50 PM, Greg KH >wrote: >>> >>> Ok, like this? >> >> This looks good to me. Having udev do firmware loading and tieing it >to >> the driver model may have not been such a good idea so many years >ago. >> Doing it this way makes more sense. > >Ok,

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Linus Torvalds
On Wed, Oct 3, 2012 at 2:58 PM, Lucas De Marchi wrote: > > So maintaining the fallback or adding a configurable entry to set the > firmware paths might be good. Yeah, I do think we need to make it configurable. Probably both at kernel compile time and dynamically. The aim of having a user-mode d

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Lucas De Marchi
On Tue, Oct 2, 2012 at 7:37 PM, Linus Torvalds wrote: > On Tue, Oct 2, 2012 at 2:03 PM, Ivan Kalvachev wrote: >> >> I'm not kernel developer and probably my opinion would be a little >> naive, but here it is. >> >> Please, make the kernel load firmware from the filesystem on its own. > > We proba

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Lucas De Marchi
On Wed, Oct 3, 2012 at 5:39 PM, Linus Torvalds wrote: > On Wed, Oct 3, 2012 at 12:50 PM, Greg KH wrote: >>> >>> Ok, like this? >> >> This looks good to me. Having udev do firmware loading and tieing it to >> the driver model may have not been such a good idea so many years ago. >> Doing it this

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Alan Cox
On Wed, 3 Oct 2012 23:18:06 +0200 Kay Sievers wrote: > On Wed, Oct 3, 2012 at 11:05 PM, Greg KH wrote: > > > As for the firmware path, maybe we should > > change that to be modified by userspace (much like /sbin/hotplug was) in > > a proc file so that distros can override the location if they n

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Kay Sievers
On Wed, Oct 3, 2012 at 11:05 PM, Greg KH wrote: > As for the firmware path, maybe we should > change that to be modified by userspace (much like /sbin/hotplug was) in > a proc file so that distros can override the location if they need to. If that's needed, a CONFIG_FIRMWARE_PATH= with the array

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Andy Walls
Greg KH wrote: >On Wed, Oct 03, 2012 at 10:32:08AM -0700, Linus Torvalds wrote: >> On Wed, Oct 3, 2012 at 10:09 AM, Al Viro >wrote: >> > >> > + if (!S_ISREG(inode->i_mode)) >> > + return false; >> > + size = i_size_read(inode); >> > >> > Probably better to do vfs_getatt

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Greg KH
On Wed, Oct 03, 2012 at 01:39:23PM -0700, Linus Torvalds wrote: > On Wed, Oct 3, 2012 at 12:50 PM, Greg KH wrote: > >> > >> Ok, like this? > > > > This looks good to me. Having udev do firmware loading and tieing it to > > the driver model may have not been such a good idea so many years ago. > >

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Kay Sievers
On Wed, Oct 3, 2012 at 10:39 PM, Linus Torvalds wrote: > On Wed, Oct 3, 2012 at 12:50 PM, Greg KH wrote: >>> >>> Ok, like this? >> >> This looks good to me. Having udev do firmware loading and tieing it to >> the driver model may have not been such a good idea so many years ago. >> Doing it this

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Linus Torvalds
On Wed, Oct 3, 2012 at 12:50 PM, Greg KH wrote: >> >> Ok, like this? > > This looks good to me. Having udev do firmware loading and tieing it to > the driver model may have not been such a good idea so many years ago. > Doing it this way makes more sense. Ok, I wish this had been getting more te

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Greg KH
On Wed, Oct 03, 2012 at 10:32:08AM -0700, Linus Torvalds wrote: > On Wed, Oct 3, 2012 at 10:09 AM, Al Viro wrote: > > > > + if (!S_ISREG(inode->i_mode)) > > + return false; > > + size = i_size_read(inode); > > > > Probably better to do vfs_getattr() and check mode and siz

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Mauro Carvalho Chehab
Em 03-10-2012 13:57, Greg KH escreveu: > On Wed, Oct 03, 2012 at 04:36:53PM +0200, Kay Sievers wrote: >> On Wed, Oct 3, 2012 at 12:12 AM, Greg KH wrote: >> >>> Mauro, what version of udev are you using that is still showing this >>> issue? >>> >>> Kay, didn't you resolve this already? If not, wha

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Al Viro
On Wed, Oct 03, 2012 at 10:32:08AM -0700, Linus Torvalds wrote: > On Wed, Oct 3, 2012 at 10:09 AM, Al Viro wrote: > > > > + if (!S_ISREG(inode->i_mode)) > > + return false; > > + size = i_size_read(inode); > > > > Probably better to do vfs_getattr() and check mode and siz

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Linus Torvalds
On Wed, Oct 3, 2012 at 10:24 AM, Kay Sievers wrote: > > Nothing really "breaks", It's "slow" and it will surely be fixed when > we know what's the right fix, which we haven't sorted out at this > moment. A thirty-second pause at bootup is easily long enough that some people might think the machin

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Linus Torvalds
On Wed, Oct 3, 2012 at 10:09 AM, Al Viro wrote: > > + if (!S_ISREG(inode->i_mode)) > + return false; > + size = i_size_read(inode); > > Probably better to do vfs_getattr() and check mode and size in kstat; if > it's sufficiently hot for that to hurt, we are fucked anyway.

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Kay Sievers
On Wed, Oct 3, 2012 at 6:57 PM, Greg KH wrote: >> It's the same in the current release, we still haven't wrapped our >> head around how to fix it/work around it. > > Ick, as this is breaking people's previously-working machines, shouldn't > this be resolved quickly? Nothing really "breaks", It's

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Al Viro
On Wed, Oct 03, 2012 at 09:38:52AM -0700, Linus Torvalds wrote: > Yeah, that bugzilla shows the problem with Kay as a maintainer too, > not willing to own up to problems he caused. > > Can you actually see the problem? I did add the attached patch as an > attachment to the bugzilla, so the reporte

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Linus Torvalds
On Wed, Oct 3, 2012 at 9:38 AM, Linus Torvalds wrote: > > Anyway. Attached is a really stupid patch that tries to do the "direct > firmware load" as suggested by Ivan. It has not been tested very > extensively at all (but I did test that it loaded the brcmsmac > firmware images on my laptop so it

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Greg KH
On Wed, Oct 03, 2012 at 04:36:53PM +0200, Kay Sievers wrote: > On Wed, Oct 3, 2012 at 12:12 AM, Greg KH wrote: > > > Mauro, what version of udev are you using that is still showing this > > issue? > > > > Kay, didn't you resolve this already? If not, what was the reason why? > > It's the same i

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Linus Torvalds
On Wed, Oct 3, 2012 at 8:13 AM, Mauro Carvalho Chehab wrote: > > Yes. The issue was noticed with media drivers when people started using the > drivers on Fedora 17, witch came with udev-182. There's an open > bugzilla there: > https://bugzilla.redhat.com/show_bug.cgi?id=827538 Yeah, that

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Mauro Carvalho Chehab
Em 02-10-2012 19:47, Linus Torvalds escreveu: > On Tue, Oct 2, 2012 at 3:23 PM, Greg KH wrote: >> >> which went into udev release 187 which I think corresponds to the place >> when people started having problems, right Mauro? > > According to what I've seen, people started complaining in 182, not

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Linus Torvalds
On Wed, Oct 3, 2012 at 7:36 AM, Kay Sievers wrote: > > If that unfortunate module_init() lockup can't be solved properly in > the kernel Stop this idiocy. The kernel doesn't have a lockup problem. udev does. As even you admit, it is *udev* that has the whole serialization issue, and does exces

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Kay Sievers
On Wed, Oct 3, 2012 at 12:12 AM, Greg KH wrote: > Mauro, what version of udev are you using that is still showing this > issue? > > Kay, didn't you resolve this already? If not, what was the reason why? It's the same in the current release, we still haven't wrapped our head around how to fix it

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Mauro Carvalho Chehab
Em 02-10-2012 19:23, Greg KH escreveu: > On Tue, Oct 02, 2012 at 03:12:39PM -0700, Greg KH wrote: >> On Tue, Oct 02, 2012 at 09:33:03AM -0700, Linus Torvalds wrote: >>> I don't know where the problem started in udev, but the report I saw >>> was that udev175 was fine, and udev182 was broken, and wo

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-02 Thread Linus Torvalds
On Tue, Oct 2, 2012 at 5:01 PM, Jiri Kosina wrote: > On Tue, 2 Oct 2012, Linus Torvalds wrote: > >> And see this email from Kay Sievers that shows that it was all known >> about and intentional in the udev camp: >> >> http://www.spinics.net/lists/netdev/msg185742.html > > This seems confusing in

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-02 Thread Jiri Kosina
On Tue, 2 Oct 2012, Linus Torvalds wrote: > And see this email from Kay Sievers that shows that it was all known > about and intentional in the udev camp: > > http://www.spinics.net/lists/netdev/msg185742.html This seems confusing indeed. That e-mail referenced above is talking about loading

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-02 Thread Linus Torvalds
On Tue, Oct 2, 2012 at 3:23 PM, Greg KH wrote: > > which went into udev release 187 which I think corresponds to the place > when people started having problems, right Mauro? According to what I've seen, people started complaining in 182, not 187. See for example http://patchwork.linuxtv.org/

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-02 Thread Linus Torvalds
On Tue, Oct 2, 2012 at 2:03 PM, Ivan Kalvachev wrote: > > I'm not kernel developer and probably my opinion would be a little > naive, but here it is. > > Please, make the kernel load firmware from the filesystem on its own. We probably should do that, not just for firmware, but for modules too. I

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-02 Thread Greg KH
On Tue, Oct 02, 2012 at 03:12:39PM -0700, Greg KH wrote: > On Tue, Oct 02, 2012 at 09:33:03AM -0700, Linus Torvalds wrote: > > I don't know where the problem started in udev, but the report I saw > > was that udev175 was fine, and udev182 was broken, and would deadlock > > if module_init() did a re

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-02 Thread Greg KH
On Tue, Oct 02, 2012 at 09:33:03AM -0700, Linus Torvalds wrote: > I don't know where the problem started in udev, but the report I saw > was that udev175 was fine, and udev182 was broken, and would deadlock > if module_init() did a request_firmware(). That kind of nested > behavior is absolutely *r

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-02 Thread Ivan Kalvachev
On 10/2/12, Linus Torvalds wrote: > On Tue, Oct 2, 2012 at 6:03 AM, Mauro Carvalho Chehab > wrote: >> >> I basically tried a few different approaches, including deferred probe(), >> as you suggested, and request_firmware_async(), as Kay suggested. > > Stop this crazy. FIX UDEV ALREADY, DAMMIT. >

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-02 Thread Linus Torvalds
On Tue, Oct 2, 2012 at 6:03 AM, Mauro Carvalho Chehab wrote: > > I basically tried a few different approaches, including deferred probe(), > as you suggested, and request_firmware_async(), as Kay suggested. Stop this crazy. FIX UDEV ALREADY, DAMMIT. Who maintains udev these days? Is it Lennart/K

udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-02 Thread Mauro Carvalho Chehab
Hi Greg, Em Mon, 25 Jun 2012 22:55:41 -0300 Mauro Carvalho Chehab escreveu: > Em 25-06-2012 19:33, Greg KH escreveu: > > On Mon, Jun 25, 2012 at 05:49:25PM -0300, Mauro Carvalho Chehab wrote: > >> Greg, > >> > >> Basically, the recent changes at request_firmware() exposed an issue that > >> affe

Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-06-25 Thread Mauro Carvalho Chehab
Em 25-06-2012 19:33, Greg KH escreveu: > On Mon, Jun 25, 2012 at 05:49:25PM -0300, Mauro Carvalho Chehab wrote: >> Greg, >> >> Basically, the recent changes at request_firmware() exposed an issue that >> affects all media drivers that use firmware (64 drivers). > > What change was that? How did i

Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-06-25 Thread Greg KH
On Mon, Jun 25, 2012 at 05:49:25PM -0300, Mauro Carvalho Chehab wrote: > Greg, > > Basically, the recent changes at request_firmware() exposed an issue that > affects all media drivers that use firmware (64 drivers). What change was that? How did it break anything? > Driver's documentation at D

Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-06-25 Thread Mauro Carvalho Chehab
Greg, Basically, the recent changes at request_firmware() exposed an issue that affects all media drivers that use firmware (64 drivers). Driver's documentation at Documentation/driver-model/driver.txt says that the .probe() callback should "bind the driver to a given device. That includes veri

Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-06-25 Thread Mauro Carvalho Chehab
Greg, Basically, the recent changes at request_firmware() exposed an issue that affects all media drivers that use firmware (64 drivers). Driver's documentation at Documentation/driver-model/driver.txt says that the .probe() callback should "bind the driver to a given device. That includes veri