aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_inic162x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_inic162x.c')
-rw-r--r--drivers/ata/sata_inic162x.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index 27dc6c86a4cd..a36149ebf4a2 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -415,22 +415,11 @@ static irqreturn_t inic_interrupt(int irq, void *dev_instance)
415 415
416 spin_lock(&host->lock); 416 spin_lock(&host->lock);
417 417
418 for (i = 0; i < NR_PORTS; i++) { 418 for (i = 0; i < NR_PORTS; i++)
419 struct ata_port *ap = host->ports[i]; 419 if (host_irq_stat & (HIRQ_PORT0 << i)) {
420 420 inic_host_intr(host->ports[i]);
421 if (!(host_irq_stat & (HIRQ_PORT0 << i)))
422 continue;
423
424 if (likely(ap && !(ap->flags & ATA_FLAG_DISABLED))) {
425 inic_host_intr(ap);
426 handled++; 421 handled++;
427 } else {
428 if (ata_ratelimit())
429 dev_printk(KERN_ERR, host->dev, "interrupt "
430 "from disabled port %d (0x%x)\n",
431 i, host_irq_stat);
432 } 422 }
433 }
434 423
435 spin_unlock(&host->lock); 424 spin_unlock(&host->lock);
436 425
@@ -679,8 +668,7 @@ static void init_port(struct ata_port *ap)
679 memset(pp->pkt, 0, sizeof(struct inic_pkt)); 668 memset(pp->pkt, 0, sizeof(struct inic_pkt));
680 memset(pp->cpb_tbl, 0, IDMA_CPB_TBL_SIZE); 669 memset(pp->cpb_tbl, 0, IDMA_CPB_TBL_SIZE);
681 670
682 /* setup PRD and CPB lookup table addresses */ 671 /* setup CPB lookup table addresses */
683 writel(ap->prd_dma, port_base + PORT_PRD_ADDR);
684 writel(pp->cpb_tbl_dma, port_base + PORT_CPB_CPBLAR); 672 writel(pp->cpb_tbl_dma, port_base + PORT_CPB_CPBLAR);
685} 673}
686 674
@@ -694,7 +682,6 @@ static int inic_port_start(struct ata_port *ap)
694{ 682{
695 struct device *dev = ap->host->dev; 683 struct device *dev = ap->host->dev;
696 struct inic_port_priv *pp; 684 struct inic_port_priv *pp;
697 int rc;
698 685
699 /* alloc and initialize private data */ 686 /* alloc and initialize private data */
700 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL); 687 pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL);
@@ -703,10 +690,6 @@ static int inic_port_start(struct ata_port *ap)
703 ap->private_data = pp; 690 ap->private_data = pp;
704 691
705 /* Alloc resources */ 692 /* Alloc resources */
706 rc = ata_port_start(ap);
707 if (rc)
708 return rc;
709
710 pp->pkt = dmam_alloc_coherent(dev, sizeof(struct inic_pkt), 693 pp->pkt = dmam_alloc_coherent(dev, sizeof(struct inic_pkt),
711 &pp->pkt_dma, GFP_KERNEL); 694 &pp->pkt_dma, GFP_KERNEL);
712 if (!pp->pkt) 695 if (!pp->pkt)