diff options
author | Asai Thambi S P <asamymuthupa@micron.com> | 2012-03-23 07:33:03 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-03-23 07:33:03 -0400 |
commit | 22be2e6e13ac09b20000582ac34d47fb0029a6da (patch) | |
tree | 1dde3b0a30e6c60721967b686c8ee2870ac5b428 /drivers/block | |
parent | bc67f63650fad6b3478d9ddfd5406d45a95987c9 (diff) |
mtip32xx: fix incorrect value set for drv_cleanup_done, and re-initialize and start port in mtip_restart_port()
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 <asamymuthupa@micron.com>
Signed-off-by: Sam Bradshaw <sbradshaw@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 8eb81c96608f..04f69e6da1fe 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c | |||
@@ -422,6 +422,10 @@ static void mtip_init_port(struct mtip_port *port) | |||
422 | /* Clear any pending interrupts for this port */ | 422 | /* Clear any pending interrupts for this port */ |
423 | writel(readl(port->mmio + PORT_IRQ_STAT), port->mmio + PORT_IRQ_STAT); | 423 | writel(readl(port->mmio + PORT_IRQ_STAT), port->mmio + PORT_IRQ_STAT); |
424 | 424 | ||
425 | /* Clear any pending interrupts on the HBA. */ | ||
426 | writel(readl(port->dd->mmio + HOST_IRQ_STAT), | ||
427 | port->dd->mmio + HOST_IRQ_STAT); | ||
428 | |||
425 | /* Enable port interrupts */ | 429 | /* Enable port interrupts */ |
426 | writel(DEF_PORT_IRQ, port->mmio + PORT_IRQ_MASK); | 430 | writel(DEF_PORT_IRQ, port->mmio + PORT_IRQ_MASK); |
427 | } | 431 | } |
@@ -490,11 +494,9 @@ static void mtip_restart_port(struct mtip_port *port) | |||
490 | dev_warn(&port->dd->pdev->dev, | 494 | dev_warn(&port->dd->pdev->dev, |
491 | "COM reset failed\n"); | 495 | "COM reset failed\n"); |
492 | 496 | ||
493 | /* Clear SError, the PxSERR.DIAG.x should be set so clear it */ | 497 | mtip_init_port(port); |
494 | writel(readl(port->mmio + PORT_SCR_ERR), port->mmio + PORT_SCR_ERR); | 498 | mtip_start_port(port); |
495 | 499 | ||
496 | /* Enable the DMA engine */ | ||
497 | mtip_enable_engine(port, 1); | ||
498 | } | 500 | } |
499 | 501 | ||
500 | /* | 502 | /* |
@@ -3359,9 +3361,6 @@ static int mtip_pci_probe(struct pci_dev *pdev, | |||
3359 | return -ENOMEM; | 3361 | return -ENOMEM; |
3360 | } | 3362 | } |
3361 | 3363 | ||
3362 | /* Set the atomic variable as 1 in case of SRSI */ | ||
3363 | atomic_set(&dd->drv_cleanup_done, true); | ||
3364 | |||
3365 | atomic_set(&dd->resumeflag, false); | 3364 | atomic_set(&dd->resumeflag, false); |
3366 | 3365 | ||
3367 | /* Attach the private data to this PCI device. */ | 3366 | /* Attach the private data to this PCI device. */ |
@@ -3434,8 +3433,8 @@ iomap_err: | |||
3434 | pci_set_drvdata(pdev, NULL); | 3433 | pci_set_drvdata(pdev, NULL); |
3435 | return rv; | 3434 | return rv; |
3436 | done: | 3435 | done: |
3437 | /* Set the atomic variable as 0 in case of SRSI */ | 3436 | /* Set the atomic variable as 0 */ |
3438 | atomic_set(&dd->drv_cleanup_done, true); | 3437 | atomic_set(&dd->drv_cleanup_done, false); |
3439 | 3438 | ||
3440 | return rv; | 3439 | return rv; |
3441 | } | 3440 | } |
@@ -3463,8 +3462,6 @@ static void mtip_pci_remove(struct pci_dev *pdev) | |||
3463 | } | 3462 | } |
3464 | } | 3463 | } |
3465 | } | 3464 | } |
3466 | /* Set the atomic variable as 1 in case of SRSI */ | ||
3467 | atomic_set(&dd->drv_cleanup_done, true); | ||
3468 | 3465 | ||
3469 | /* Clean up the block layer. */ | 3466 | /* Clean up the block layer. */ |
3470 | mtip_block_remove(dd); | 3467 | mtip_block_remove(dd); |