public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Lord <lkml@rtr.ca>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [patch 2.6.9-ac3] ide: fixes for 2.6.9-ac3 ide issues
Date: Thu, 21 Oct 2004 21:42:51 -0400	[thread overview]
Message-ID: <4178659B.4020303@rtr.ca> (raw)
In-Reply-To: <41785B65.4090202@rtr.ca>

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

The attached patch fixes two problems with 2.6.9-ac3:

1. restores the missing spin_unlock_irq() line, and
2. removes hwif from /proc/ide/ as part of __ide_unregister_hwif().

(and also removes a bogus compiler warning)

Signed-off-by: Mark Lord <lkml@rtr.ca>
-- 
Mark Lord
(hdparm keeper & the original "Linux IDE Guy")

[-- Attachment #2: ac3-ide-fixes.patch --]
[-- Type: text/plain, Size: 2667 bytes --]

diff -u --recursive --new-file --exclude='.*' linux-2.6.9-ac3/drivers/ide/ide.c linux/drivers/ide/ide.c
--- linux-2.6.9-ac3/drivers/ide/ide.c	2004-10-21 20:45:22.000000000 -0400
+++ linux/drivers/ide/ide.c	2004-10-21 21:28:54.000000000 -0400
@@ -862,7 +862,7 @@
 
 int __ide_unregister_hwif(ide_hwif_t *hwif)
 {
-	ide_drive_t *drive;
+	ide_drive_t *drive = NULL; /* keep compiler happy */
 	ide_hwif_t *g;
 	static ide_hwif_t tmp_hwif; /* protected by ide_cfg_sem */
 	ide_hwgroup_t *hwgroup;
@@ -901,6 +901,7 @@
 	was_present = hwif->present;	 
 	hwif->present = 0;
 
+	spin_unlock_irq(&ide_lock);
 	up(&ide_setting_sem);
 
 	for (unit = 0; unit < MAX_DRIVES; ++unit) {
@@ -912,6 +913,7 @@
 
 #ifdef CONFIG_PROC_FS
 	destroy_proc_ide_drives(hwif);
+	destroy_proc_ide_interface(hwif);
 #endif
 
 	spin_lock_irq(&ide_lock);
diff -u --recursive --new-file --exclude='.*' linux-2.6.9-ac3/drivers/ide/ide-proc.c linux/drivers/ide/ide-proc.c
--- linux-2.6.9-ac3/drivers/ide/ide-proc.c	2004-10-21 20:45:22.000000000 -0400
+++ linux/drivers/ide/ide-proc.c	2004-10-21 21:25:06.000000000 -0400
@@ -821,24 +821,30 @@
 EXPORT_SYMBOL_GPL(ide_pci_create_host_proc);
 #endif
 
+void destroy_proc_ide_interface(ide_hwif_t *hwif)
+{
+	int exist = (hwif->proc != NULL);
+#if 0
+	if (!hwif->present)
+		continue;
+#endif
+	if (exist) {
+		destroy_proc_ide_drives(hwif);
+		ide_remove_proc_entries(hwif->proc, hwif_entries);
+		remove_proc_entry(hwif->name, proc_ide_root);
+		hwif->proc = NULL;
+	}
+}
+
+EXPORT_SYMBOL(destroy_proc_ide_interface);
+
 void destroy_proc_ide_interfaces(void)
 {
 	int	h;
 
 	for (h = 0; h < MAX_HWIFS; h++) {
 		ide_hwif_t *hwif = &ide_hwifs[h];
-		int exist = (hwif->proc != NULL);
-#if 0
-		if (!hwif->present)
-			continue;
-#endif
-		if (exist) {
-			destroy_proc_ide_drives(hwif);
-			ide_remove_proc_entries(hwif->proc, hwif_entries);
-			remove_proc_entry(hwif->name, proc_ide_root);
-			hwif->proc = NULL;
-		} else
-			continue;
+		destroy_proc_ide_interface(hwif);
 	}
 }
 
diff -u --recursive --new-file --exclude='.*' linux-2.6.9-ac3/include/linux/ide.h linux/include/linux/ide.h
--- linux-2.6.9-ac3/include/linux/ide.h	2004-10-21 20:45:22.000000000 -0400
+++ linux/include/linux/ide.h	2004-10-21 21:27:39.000000000 -0400
@@ -1076,6 +1076,7 @@
 extern void proc_ide_create(void);
 extern void proc_ide_destroy(void);
 extern void destroy_proc_ide_drives(ide_hwif_t *);
+extern void destroy_proc_ide_interface(ide_hwif_t *);
 extern void create_proc_ide_interfaces(void);
 extern void ide_add_proc_entries(struct proc_dir_entry *, ide_proc_entry_t *, void *);
 extern void ide_remove_proc_entries(struct proc_dir_entry *, ide_proc_entry_t *);

  reply	other threads:[~2004-10-22  1:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21 23:08 Linux 2.6.9-ac3 Alan Cox
2004-10-22  0:59 ` Mark Lord
2004-10-22  1:42   ` Mark Lord [this message]
2004-10-22  1:18 ` Con Kolivas
2004-10-22  1:50 ` [PATCH 2.6.9-ac3] delkin_cb: new driver for Cardbus IDE CF Adapter Mark Lord
2004-10-22  6:36 ` Linux 2.6.9-ac3 Jens Axboe

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=4178659B.4020303@rtr.ca \
    --to=lkml@rtr.ca \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bzolnier@gmail.com \
    --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