linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Mochel <mochel@osdl.org>
To: torvalds@transmeta.com
Cc: alan@lxorguk.ukuu.org.uk, <viro@math.psu.edu>,
	<andre@linux-ide.org>, <linux-kernel@vger.kernel.org>
Subject: [patch] IDE driver model update
Date: Mon, 7 Oct 2002 12:30:58 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0210071220020.16276-100000@cherise.pdx.osdl.net> (raw)


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.




             reply	other threads:[~2002-10-07 19:23 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-07 19:30 Patrick Mochel [this message]
2002-10-07 19:31 ` [patch] IDE driver model update 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0210071220020.16276-100000@cherise.pdx.osdl.net \
    --to=mochel@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andre@linux-ide.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).