From: Greg Kroah-Hartman Date: Thu, 10 May 2012 16:34:49 +0000 (-0700) Subject: 3.3-stable patches X-Git-Tag: v3.3.6~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=726122f5aa110a3012c54c68b88584fe17a4ef7b;p=thirdparty%2Fkernel%2Fstable-queue.git 3.3-stable patches added patches: block-mtip32xx-remove-hotplug_pci_pcie-dependancy.patch mtip32xx-fix-error-handling-in-mtip_init.patch mtip32xx-fix-incorrect-value-set-for-drv_cleanup_done-and.patch --- diff --git a/queue-3.3/block-mtip32xx-remove-hotplug_pci_pcie-dependancy.patch b/queue-3.3/block-mtip32xx-remove-hotplug_pci_pcie-dependancy.patch new file mode 100644 index 00000000000..df89b0fd66f --- /dev/null +++ b/queue-3.3/block-mtip32xx-remove-hotplug_pci_pcie-dependancy.patch @@ -0,0 +1,31 @@ +From 63634806519b49bb43f37e53a1e8366eb3e846a4 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 12 Apr 2012 08:47:05 +0200 +Subject: block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy + +From: Greg Kroah-Hartman + +commit 63634806519b49bb43f37e53a1e8366eb3e846a4 upstream. + +This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it +depend on PCI. + +Cc: Sam Bradshaw +Signed-off-by: Greg Kroah-Hartman +Acked-by: Asai Thambi S P +Signed-off-by: Jens Axboe + +--- + drivers/block/mtip32xx/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/block/mtip32xx/Kconfig ++++ b/drivers/block/mtip32xx/Kconfig +@@ -4,6 +4,6 @@ + + config BLK_DEV_PCIESSD_MTIP32XX + tristate "Block Device Driver for Micron PCIe SSDs" +- depends on HOTPLUG_PCI_PCIE ++ depends on PCI + help + This enables the block driver for Micron PCIe SSDs. diff --git a/queue-3.3/mtip32xx-fix-error-handling-in-mtip_init.patch b/queue-3.3/mtip32xx-fix-error-handling-in-mtip_init.patch new file mode 100644 index 00000000000..1ee905af27a --- /dev/null +++ b/queue-3.3/mtip32xx-fix-error-handling-in-mtip_init.patch @@ -0,0 +1,52 @@ +From 6d27f09a6398ee086b11804aa3a16609876f0c7c Mon Sep 17 00:00:00 2001 +From: Ryosuke Saito +Date: Thu, 5 Apr 2012 08:09:34 -0600 +Subject: mtip32xx: fix error handling in mtip_init() + +From: Ryosuke Saito + +commit 6d27f09a6398ee086b11804aa3a16609876f0c7c upstream. + +Ensure that block device is properly unregistered, if +pci_register_driver() fails. + +Signed-off-by: Ryosuke Saito +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/block/mtip32xx/mtip32xx.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +--- a/drivers/block/mtip32xx/mtip32xx.c ++++ b/drivers/block/mtip32xx/mtip32xx.c +@@ -3605,18 +3605,25 @@ MODULE_DEVICE_TABLE(pci, mtip_pci_tbl); + */ + static int __init mtip_init(void) + { ++ int error; ++ + printk(KERN_INFO MTIP_DRV_NAME " Version " MTIP_DRV_VERSION "\n"); + + /* Allocate a major block device number to use with this driver. */ +- mtip_major = register_blkdev(0, MTIP_DRV_NAME); +- if (mtip_major < 0) { ++ error = register_blkdev(0, MTIP_DRV_NAME); ++ if (error <= 0) { + printk(KERN_ERR "Unable to register block device (%d)\n", +- mtip_major); ++ error); + return -EBUSY; + } ++ mtip_major = error; + + /* Register our PCI operations. */ +- return pci_register_driver(&mtip_pci_driver); ++ error = pci_register_driver(&mtip_pci_driver); ++ if (error) ++ unregister_blkdev(mtip_major, MTIP_DRV_NAME); ++ ++ return error; + } + + /* diff --git a/queue-3.3/mtip32xx-fix-incorrect-value-set-for-drv_cleanup_done-and.patch b/queue-3.3/mtip32xx-fix-incorrect-value-set-for-drv_cleanup_done-and.patch new file mode 100644 index 00000000000..09589191f63 --- /dev/null +++ b/queue-3.3/mtip32xx-fix-incorrect-value-set-for-drv_cleanup_done-and.patch @@ -0,0 +1,80 @@ +From 22be2e6e13ac09b20000582ac34d47fb0029a6da Mon Sep 17 00:00:00 2001 +From: Asai Thambi S P +Date: Fri, 23 Mar 2012 12:33:03 +0100 +Subject: mtip32xx: fix incorrect value set for drv_cleanup_done, and + re-initialize and start port in mtip_restart_port() + +From: Asai Thambi S P + +commit 22be2e6e13ac09b20000582ac34d47fb0029a6da upstream. + +This patch includes two changes: + * fix incorrect value set for drv_cleanup_done + * re-initialize and start port in mtip_restart_port() + +Signed-off-by: Asai Thambi S P +Signed-off-by: Sam Bradshaw +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/block/mtip32xx/mtip32xx.c | 19 ++++++++----------- + 1 file changed, 8 insertions(+), 11 deletions(-) + +--- a/drivers/block/mtip32xx/mtip32xx.c ++++ b/drivers/block/mtip32xx/mtip32xx.c +@@ -422,6 +422,10 @@ static void mtip_init_port(struct mtip_p + /* Clear any pending interrupts for this port */ + writel(readl(port->mmio + PORT_IRQ_STAT), port->mmio + PORT_IRQ_STAT); + ++ /* Clear any pending interrupts on the HBA. */ ++ writel(readl(port->dd->mmio + HOST_IRQ_STAT), ++ port->dd->mmio + HOST_IRQ_STAT); ++ + /* Enable port interrupts */ + writel(DEF_PORT_IRQ, port->mmio + PORT_IRQ_MASK); + } +@@ -490,11 +494,9 @@ static void mtip_restart_port(struct mti + dev_warn(&port->dd->pdev->dev, + "COM reset failed\n"); + +- /* Clear SError, the PxSERR.DIAG.x should be set so clear it */ +- writel(readl(port->mmio + PORT_SCR_ERR), port->mmio + PORT_SCR_ERR); ++ mtip_init_port(port); ++ mtip_start_port(port); + +- /* Enable the DMA engine */ +- mtip_enable_engine(port, 1); + } + + /* +@@ -3359,9 +3361,6 @@ static int mtip_pci_probe(struct pci_dev + return -ENOMEM; + } + +- /* Set the atomic variable as 1 in case of SRSI */ +- atomic_set(&dd->drv_cleanup_done, true); +- + atomic_set(&dd->resumeflag, false); + + /* Attach the private data to this PCI device. */ +@@ -3434,8 +3433,8 @@ iomap_err: + pci_set_drvdata(pdev, NULL); + return rv; + done: +- /* Set the atomic variable as 0 in case of SRSI */ +- atomic_set(&dd->drv_cleanup_done, true); ++ /* Set the atomic variable as 0 */ ++ atomic_set(&dd->drv_cleanup_done, false); + + return rv; + } +@@ -3463,8 +3462,6 @@ static void mtip_pci_remove(struct pci_d + } + } + } +- /* Set the atomic variable as 1 in case of SRSI */ +- atomic_set(&dd->drv_cleanup_done, true); + + /* Clean up the block layer. */ + mtip_block_remove(dd); diff --git a/queue-3.3/series b/queue-3.3/series index 0854345293b..49ee2cd3226 100644 --- a/queue-3.3/series +++ b/queue-3.3/series @@ -44,3 +44,6 @@ kvm-vmx-fix-kvm_set_shared_msr-called-in-preemptible-context.patch kvm-lock-slots_lock-around-device-assignment.patch sony-laptop-enable-keyboard-backlight-by-default.patch hugepages-fix-use-after-free-bug-in-quota-handling.patch +mtip32xx-fix-incorrect-value-set-for-drv_cleanup_done-and.patch +mtip32xx-fix-error-handling-in-mtip_init.patch +block-mtip32xx-remove-hotplug_pci_pcie-dependancy.patch