[PATCH 4/10] libata: call irq_off from bmdma_freeze()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patch 4/10:
  Call irq_off() from bmdma_freeze() and remove duplicated code.

Signed-off-by: Albert Lee <albertcc@xxxxxxxxxx>
---


diff -Nrup 03_add_irq_off_lldd/drivers/ata/libata-sff.c 04_convert_freeze/drivers/ata/libata-sff.c
--- 03_add_irq_off_lldd/drivers/ata/libata-sff.c	2007-07-04 11:57:33.000000000 +0800
+++ 04_convert_freeze/drivers/ata/libata-sff.c	2007-07-04 13:12:38.000000000 +0800
@@ -413,20 +413,7 @@ void ata_bmdma_stop(struct ata_queued_cm
  */
 void ata_bmdma_freeze(struct ata_port *ap)
 {
-	struct ata_ioports *ioaddr = &ap->ioaddr;
-
-	ap->ctl |= ATA_NIEN;
-	ap->last_ctl = ap->ctl;
-
-	iowrite8(ap->ctl, ioaddr->ctl_addr);
-
-	/* Under certain circumstances, some controllers raise IRQ on
-	 * ATA_NIEN manipulation.  Also, many controllers fail to mask
-	 * previously pending IRQ on ATA_NIEN assertion.  Clear it.
-	 */
-	ata_chk_status(ap);
-
-	ap->ops->irq_clear(ap);
+	ap->ops->irq_off(ap);
 }
 
 /**
diff -Nrup 03_add_irq_off_lldd/drivers/ata/pata_scc.c 04_convert_freeze/drivers/ata/pata_scc.c
--- 03_add_irq_off_lldd/drivers/ata/pata_scc.c	2007-07-04 12:09:29.000000000 +0800
+++ 04_convert_freeze/drivers/ata/pata_scc.c	2007-07-04 13:12:38.000000000 +0800
@@ -875,20 +875,7 @@ static u8 scc_irq_ack (struct ata_port *
 
 static void scc_bmdma_freeze (struct ata_port *ap)
 {
-	struct ata_ioports *ioaddr = &ap->ioaddr;
-
-	ap->ctl |= ATA_NIEN;
-	ap->last_ctl = ap->ctl;
-
-	out_be32(ioaddr->ctl_addr, ap->ctl);
-
-	/* Under certain circumstances, some controllers raise IRQ on
-	 * ATA_NIEN manipulation.  Also, many controllers fail to mask
-	 * previously pending IRQ on ATA_NIEN assertion.  Clear it.
-	 */
-	ata_chk_status(ap);
-
-	ap->ops->irq_clear(ap);
+	scc_irq_off(ap);
 }
 
 /**


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux