public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: gregkh@suse.de, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] pci: don't override drv->shutdown unconditionally
Date: Fri, 17 Jun 2005 20:30:57 +0200	[thread overview]
Message-ID: <20050617183057.GA20966@lst.de> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 856 bytes --]

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.


Index: linux-2.6/drivers/pci/pci-driver.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci-driver.c	2005-05-05 11:01:03.000000000 +0200
+++ linux-2.6/drivers/pci/pci-driver.c	2005-06-17 18:44:52.000000000 +0200
@@ -393,7 +393,8 @@
 	drv->driver.bus = &pci_bus_type;
 	drv->driver.probe = pci_device_probe;
 	drv->driver.remove = pci_device_remove;
-	drv->driver.shutdown = pci_device_shutdown,
+	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 18:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-17 18:30 Christoph Hellwig [this message]
2005-06-17 18:49 ` [PATCH] pci: don't override drv->shutdown unconditionally 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
  -- strict thread matches above, loose matches on Subject: below --
2005-06-17 19:25 [PATCH] PCI: " 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=20050617183057.GA20966@lst.de \
    --to=hch@lst.de \
    --cc=akpm@osdl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.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