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-08-12 15:30:57.959857895 -0500
+++ linux-block/drivers/block/rsxx/core.c 2013-08-12 15:31:12.833861866 -0500
@@ -1101,6 +1101,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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
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-08-12 15:30:57.959857895 -0500
+++ linux-block/drivers/block/rsxx/core.c 2013-08-12 15:31:12.833861866 -0500
@@ -1101,6 +1101,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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/