linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] IDE driver model update
@ 2002-10-07 19:30 Patrick Mochel
  2002-10-07 19:31 ` Patrick Mochel
                   ` (2 more replies)
  0 siblings, 3 replies; 32+ messages in thread
From: Patrick Mochel @ 2002-10-07 19:30 UTC (permalink / raw)
  To: torvalds; +Cc: alan, viro, andre, linux-kernel


Hey there.

This changeset and set of patches improves IDE support for the new driver
model. Instead of having each IDE driver declare and register a struct
device_driver, one is added to ide_driver_t. ide_register_driver() fills
in the necessary fields to the structure and registers it with the driver
model core.

A generic remove method is implemented, which forwards the call to the ide 
drivers. Doing this allows the drives to received the remove() call during 
device shutdown, which obviates the need for ide reboot notifier. 

The ide core also checks if the device is present before registering, so 
there should be no more "ghost drives" in the device tree. 

Diffstat and changelogs are appended. The patches will follow.

	-pat

Please pull from 

	bk://ldm.bkbits.net/linux-2.5-ide

This will update the following files:

 drivers/ide/ide-disk.c  |   16 ------------
 drivers/ide/ide-probe.c |   11 ++++++++
 drivers/ide/ide.c       |   64 +++++++++++-------------------------------------
 include/linux/ide.h     |    1 
 4 files changed, 27 insertions(+), 65 deletions(-)

through these ChangeSets:

<mochel@osdl.org> (02/10/07 1.696.19.3)
   IDE: Add generic remove() method for drives; remove reboot notifier.
   
   The remove() method is generic for all drives, and set in ide_driver_t::gen_driver.
   The call simply forwards the call to ide_driver_t::standby(). 
   
   ide_drive_release() is also added, and set when the device is registered with
   the driver model core. This cleans up the drive once the last reference has gone
   away by calling ide_driver_t::cleanup().
   
   These two additions obviate the need for IDE reboot notifier, since they exploit
   the constructs of the driver model core. It has been removed.

<mochel@osdl.org> (02/10/07 1.696.19.2)
   IDE: register ide driver for all ide drives; not just for disk drives. 
   
   This adds
   	struct device_driver	gen_driver;
   
   to ide_driver_t, which is filled in with necessary fields when an ide
   driver calls ide_register_driver(). That then registers the driver with
   the driver model core. 
   
   As a result, this gives us the following output in driverfs:
   
   # tree -d /sys/bus/ide/drivers/
   /sys/bus/ide/drivers/
   |-- ide-cdrom
   `-- ide-disk
   
   The suspend/resume callbacks in ide-disk.c have been temporarily
   disabled until the ide core implements generic methods which forward
   the calls to the drive drivers. 

<mochel@osdl.org> (02/10/07 1.696.19.1)
   IDE: only register drives that are present with the driver core.




^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2002-10-15  6:54 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-07 19:30 [patch] IDE driver model update Patrick Mochel
2002-10-07 19:31 ` Patrick Mochel
2002-10-07 19:31 ` Patrick Mochel
2002-10-11 23:06   ` Pavel Machek
2002-10-07 19:31 ` Patrick Mochel
2002-10-07 22:42   ` Alexander Viro
2002-10-07 22:51     ` Patrick Mochel
2002-10-07 22:58       ` Alexander Viro
2002-10-07 23:06         ` Patrick Mochel
2002-10-08  2:17           ` Alexander Viro
2002-10-08 12:21             ` Alan Cox
2002-10-08 12:24               ` Alexander Viro
2002-10-08 13:05                 ` Alan Cox
2002-10-08 19:18                   ` Andries Brouwer
2002-10-08 13:25                 ` jbradford
2002-10-08 14:31                   ` Ketil Froyn
2002-10-08 21:34                     ` Xavier Bestel
2002-10-08 21:57                   ` Pavel Machek
2002-10-08 15:05                 ` Benjamin Herrenschmidt
2002-10-08 18:43             ` Patrick Mochel
2002-10-08 20:47               ` [RFC] embedded struct device " Alexander Viro
2002-10-08 21:29                 ` Linus Torvalds
2002-10-08 21:42                   ` Alexander Viro
2002-10-08 21:53                     ` Kai Germaschewski
2002-10-08 21:57                       ` Patrick Mochel
2002-10-08 22:51                         ` Alan Cox
2002-10-08 21:54                     ` Patrick Mochel
2002-10-08 22:12                     ` Linus Torvalds
2002-10-08 22:48                       ` Kai Germaschewski
2002-10-08 23:28                         ` Linus Torvalds
2002-10-08 22:29                     ` Greg KH
2002-10-08 21:30                 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).