public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: torvalds@osdl.org, Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz,
	hch@lst.de
Subject: [PATCH] PCI: don't override drv->shutdown unconditionally
Date: Fri, 17 Jun 2005 12:25:25 -0700	[thread overview]
Message-ID: <20050617192525.GA22457@kroah.com> (raw)

There are many drivers that have been setting the generic driver
model level shutdown callback, and pci thus must not override it.

Without this patch we can have really bad data loss on various
raid controllers.


From: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 drivers/pci/pci-driver.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

--- gregkh-2.6.orig/drivers/pci/pci-driver.c	2005-06-16 15:19:44.000000000 -0700
+++ gregkh-2.6/drivers/pci/pci-driver.c	2005-06-17 12:17:34.000000000 -0700
@@ -395,7 +395,10 @@
 	drv->driver.bus = &pci_bus_type;
 	drv->driver.probe = pci_device_probe;
 	drv->driver.remove = pci_device_remove;
-	drv->driver.shutdown = pci_device_shutdown,
+	/* FIXME, once all of the existing PCI drivers have been fixed to set
+	 * the pci shutdown function, this test can go away. */
+	if (!drv->driver.shutdown)
+		drv->driver.shutdown = pci_device_shutdown,
 	drv->driver.owner = drv->owner;
 	drv->driver.kobj.ktype = &pci_driver_kobj_type;
 	pci_init_dynids(&drv->dynids);

             reply	other threads:[~2005-06-17 19:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-17 19:25 Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-06-17 18:30 [PATCH] pci: don't override drv->shutdown unconditionally Christoph Hellwig
2005-06-17 18:49 ` Greg KH
2005-06-17 18:51   ` Christoph Hellwig
2005-06-17 18:53     ` Greg KH
2005-06-17 19:01       ` Greg KH
2005-06-17 19:34         ` 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=20050617192525.GA22457@kroah.com \
    --to=gregkh@suse.de \
    --cc=akpm@osdl.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=torvalds@osdl.org \
    /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