mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/4] rsxx: Removing IDA on driver unload.
@ 2013-07-23 20:18 Philip J. Kelleher
  0 siblings, 0 replies; 2+ messages in thread
From: Philip J. Kelleher @ 2013-07-23 20:18 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel

From: Philip J Kelleher <pjk1939@linux.vnet.ibm.com>

The driver was not releasing the IDA entry during
driver unload.

Signed-off-by: Philip J Kelleher <pjk1939@linux.vnet.ibm.com>
-------------------------------------------------------------------------------


diff -uprN -X linux-block-vanilla/Documentation/dontdiff linux-block-vanilla/drivers/block/rsxx/core.c linux-block/drivers/block/rsxx/core.c
--- linux-block-vanilla/drivers/block/rsxx/core.c	2013-07-23 10:11:20.943772116 -0500
+++ linux-block/drivers/block/rsxx/core.c	2013-07-23 10:14:50.402462948 -0500
@@ -1105,6 +1105,10 @@ static void rsxx_pci_remove(struct pci_d
 	pci_disable_device(dev);
 	pci_release_regions(dev);
 
+	spin_lock(&rsxx_ida_lock);
+	ida_remove(&rsxx_disk_ida, card->disk_id);
+	spin_unlock(&rsxx_ida_lock);
+
 	kfree(card);
 }
 


^ permalink raw reply	[flat|nested] 2+ messages in thread
* [PATCH 2/4] rsxx: Removing IDA on driver unload.
@ 2013-08-06 21:10 Philip J. Kelleher
  0 siblings, 0 replies; 2+ messages in thread
From: Philip J. Kelleher @ 2013-08-06 21:10 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel

From: Philip J Kelleher <pjk1939@linux.vnet.ibm.com>

The rsxx driver was not releasing the IDA entry during
driver unload. This would be a big problem on a DLPAR
remove where the card is remove from the LPAR but the
driver is still loaded. This patch fixes that issue.

Signed-off-by: Philip J Kelleher <pjk1939@linux.vnet.ibm.com>
-------------------------------------------------------------------------------


diff -uprN -X linux-block-vanilla/Documentation/dontdiff linux-block-vanilla/drivers/block/rsxx/core.c linux-block/drivers/block/rsxx/core.c
--- linux-block-vanilla/drivers/block/rsxx/core.c	2013-07-23 10:11:20.943772116 -0500
+++ linux-block/drivers/block/rsxx/core.c	2013-07-23 10:14:50.402462948 -0500
@@ -1105,6 +1105,10 @@ static void rsxx_pci_remove(struct pci_d
 	pci_disable_device(dev);
 	pci_release_regions(dev);
 
+	spin_lock(&rsxx_ida_lock);
+	ida_remove(&rsxx_disk_ida, card->disk_id);
+	spin_unlock(&rsxx_ida_lock);
+
 	kfree(card);
 }
 


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

end of thread, other threads:[~2013-08-06 21:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-23 20:18 [PATCH 2/4] rsxx: Removing IDA on driver unload Philip J. Kelleher
2013-08-06 21:10 Philip J. Kelleher

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

all inboxes | Powered by JetHome®