From 0eed670d36f3b0f5a14a9ca8f353326ddf2175f3 Mon Sep 17 00:00:00 2001 From: Asai Thambi S P Date: Fri, 23 Mar 2012 12:33:03 +0100 Subject: [PATCH] --- yaml --- r: 299199 b: refs/heads/master c: 22be2e6e13ac09b20000582ac34d47fb0029a6da h: refs/heads/master i: 299197: 5970198c5591b1266d0e310b7fe87e0315d45f14 299195: b6f3f58f50aba92bbe399362eb8cd70400d01998 299191: 72571c3ab43e8eb1f1addc6d1cb0b5ce6a144793 299183: 7f9b2f5d8fd4f77d0236c0d89858b9335b91e74b 299167: d06d8b525ec71854c658da2744696fc5d266dcb3 299135: 140c524356e829259f432e6ef9a8f7beae0aac50 v: v3 --- [refs] | 2 +- trunk/drivers/block/mtip32xx/mtip32xx.c | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 7421d4915232..0764d09623e0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bc67f63650fad6b3478d9ddfd5406d45a95987c9 +refs/heads/master: 22be2e6e13ac09b20000582ac34d47fb0029a6da diff --git a/trunk/drivers/block/mtip32xx/mtip32xx.c b/trunk/drivers/block/mtip32xx/mtip32xx.c index 8eb81c96608f..04f69e6da1fe 100644 --- a/trunk/drivers/block/mtip32xx/mtip32xx.c +++ b/trunk/drivers/block/mtip32xx/mtip32xx.c @@ -422,6 +422,10 @@ static void mtip_init_port(struct mtip_port *port) /* 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 mtip_port *port) 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 *pdev, 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 @@ static int mtip_pci_probe(struct pci_dev *pdev, 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_dev *pdev) } } } - /* 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);