public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sym53c8xx_2 pci_remove cleanup
@ 2003-10-08 21:17 Brian King
  2003-10-10 11:36 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Brian King @ 2003-10-08 21:17 UTC (permalink / raw)
  To: linux-scsi; +Cc: Matthew Wilcox, James Bottomley

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


This is a patch to the sym2 driver to properly cleanup midlayer 
resources both on module unload and pci hot remove.

Brian

-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center

[-- Attachment #2: sym_glue-free_resources.patch --]
[-- Type: text/plain, Size: 634 bytes --]

--- linux-2.6.0-test6/drivers/scsi/sym53c8xx_2/sym_glue.c	Sat Sep 27 19:51:29 2003
+++ linux-2.6.0-test6-sym/drivers/scsi/sym53c8xx_2/sym_glue.c	Tue Oct  7 12:33:42 2003
@@ -1605,6 +1605,8 @@
 	sym_hcb_free(np);
 
 	sym_mfree_dma(np, sizeof(*np), "HCB");
+
+	scsi_host_put(np->s.host);
 }
 
 /*
@@ -1861,7 +1863,8 @@
 	printf_info("%s: giving up ...\n", sym_name(np));
 	if (np)
 		sym_free_resources(np);
-	scsi_host_put(instance);
+	else
+		scsi_host_put(instance);
 
 	return -1;
  }
@@ -2213,6 +2216,8 @@
 {
 	printk("%s: detaching ...\n", sym_name(np));
 
+	scsi_remove_host(np->s.host);
+
 	del_timer_sync(&np->s.timer);
 
 	/*

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

end of thread, other threads:[~2003-10-10 18:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-08 21:17 [PATCH] sym53c8xx_2 pci_remove cleanup Brian King
2003-10-10 11:36 ` Matthew Wilcox
2003-10-10 18:05   ` Brian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox