On Mon, 5 Nov 2007, Greg KH wrote:In fact things don't work this way. The list above stops short after "add usb host controller devices"; the probe routines for host controllers do not scan for USB hubs or other USB devices. Instead they are detected by a completely separate thread (khubd). I gather the idea is to convert dev->sem to a mutex. This idea had occurred to me a long time ago but I didn't pursue it because of the sheer number of places where dev->sem gets used, not to mention the lockdep problems. You can't possibly solve the lockdep problems here with a simple-minded approach like your DRIVER_NORMAL, DRIVER_PARENT, etc. The device tree is arbitrarily deep & wide, and there is at least one routine that acquires the semaphores for _all_ the devices in the tree. This fact alone seems to preclude using lockdep for device locks. (If there was a form of mutex_lock() that bypassed the lockdep checks, you could use it and avoid these issues.) Deadlock is a serious consideration. For the most part, routines locking devices do so along a single path in the tree. For this simple case the rule is: Never acquire a parent's lock while holding the child's lock. The routine that locks all the devices acquires the locks in order of device registration. The idea here is that children are always registered _after_ their parents, so this should be compatible with the previous rule. But there is a potential problem: device_move() can move an older child under a younger parent! Right now we have no way to deal with this. There has been some discussion of reordering the dpm_active list when a device is moved, but so far nothing has been done about it. Alan Stern -
| Chuck Ebbert | Why do so many machines need "noapic"? |
| Renato S. Yamane | Error -71 on device descriptor read/all |
| Greg Kroah-Hartman | [PATCH 05/54] kset: convert fuse to use kset_create |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| R. Tyler Ballance | Public repro case! Re: [PATCH/RFC] Allow writing loose objects that are corrupted ... |
| Shawn O. Pearce | Re: Some ideas for StGIT |
| Alexander Litvinov | git-svn does not seems to work with crlf convertion enabled. |
| Wink Saville | Resolving conflicts |
| John P Poet | Realtek 8111C transmit timed out |
| Rémi Denis-Courmont | Re: [PATCH] Security: Implement and document RLIMIT_NETWORK. |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Jason Beaudoin | Re: Real men don't attack straw men |
| Parvinder Bhasin | BIND and CNAME-ing |
| Manuel Ravasio | Annoying problem with dnsmasq |
| Craig Skinner | Re: How can i boot a bsd.rd from windows 2000 ? |
