Linux ATA/IDE development
 help / color / mirror / Atom feed
* [PATCH 7/9] sata_promise.c conversion
@ 2006-06-29 16:10 Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2006-06-29 16:10 UTC (permalink / raw)
  To: linux-ide; +Cc: Jeff Garzik, Tejun Heo

Convert the sata-promise.c to the new scheme.

Signed-off-by: <petkov@math.uni-muenster.de>

--- libata-dev/drivers/scsi/sata_promise.c.orig	2006-06-29 16:36:14.000000000 +0200
+++ libata-dev/drivers/scsi/sata_promise.c	2006-06-29 16:50:36.000000000 +0200
@@ -408,9 +408,10 @@ static void pdc_sata_scr_write (struct a
 static void pdc_qc_prep(struct ata_queued_cmd *qc)
 {
 	struct pdc_port_priv *pp = qc->ap->private_data;
+	struct ata_port *ap = qc->ap;
 	unsigned int i;
 
-	VPRINTK("ENTER\n");
+	ata_port_printk(ap, ATA_MSG_TRACE, "%s: ENTER\n", __FUNCTION__);
 
 	switch (qc->tf.protocol) {
 	case ATA_PROT_DMA:
@@ -441,7 +442,7 @@ static void pdc_eng_timeout(struct ata_p
 	struct ata_queued_cmd *qc;
 	unsigned long flags;
 
-	DPRINTK("ENTER\n");
+	ata_port_printk(ap, ATA_MSG_TRACE, "%s: ENTER\n", __FUNCTION__);
 
 	spin_lock_irqsave(&host_set->lock, flags);
 
@@ -450,7 +451,7 @@ static void pdc_eng_timeout(struct ata_p
 	switch (qc->tf.protocol) {
 	case ATA_PROT_DMA:
 	case ATA_PROT_NODATA:
-		ata_port_printk(ap, KERN_ERR, "command timeout\n");
+		ata_port_printk(ap, ATA_MSG_ERR, "command timeout\n");
 		drv_stat = ata_wait_idle(ap);
 		qc->err_mask |= __ac_err_mask(drv_stat);
 		break;
@@ -458,7 +459,7 @@ static void pdc_eng_timeout(struct ata_p
 	default:
 		drv_stat = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
 
-		ata_port_printk(ap, KERN_ERR,
+		ata_port_printk(ap, ATA_MSG_ERR,
 				"unknown timeout, cmd 0x%x stat 0x%x\n",
 				qc->tf.command, drv_stat);
 
@@ -468,7 +469,7 @@ static void pdc_eng_timeout(struct ata_p
 
 	spin_unlock_irqrestore(&host_set->lock, flags);
 	ata_eh_qc_complete(qc);
-	DPRINTK("EXIT\n");
+	ata_port_printk(ap, ATA_MSG_TRACE, "%s: EXIT\n", __FUNCTION__);
 }
 
 static inline unsigned int pdc_host_intr( struct ata_port *ap,
@@ -539,14 +540,15 @@ static irqreturn_t pdc_interrupt (int ir
 	mask &= 0xffff;		/* only 16 tags possible */
 	if (!mask) {
 		VPRINTK("QUICK EXIT 3\n");
+		return IRQ_NONE;
 		goto done_irq;
 	}
 
 	writel(mask, mmio_base + PDC_INT_SEQMASK);
 
 	for (i = 0; i < host_set->n_ports; i++) {
-		VPRINTK("port %u\n", i);
 		ap = host_set->ports[i];
+		ata_port_printk(ap, ATA_MSG_CMD, "port %u\n", i);
 		tmp = mask & (1 << (i + 1));
 		if (tmp && ap &&
 		    !(ap->flags & ATA_FLAG_DISABLED)) {
@@ -572,7 +574,8 @@ static inline void pdc_packet_start(stru
 	unsigned int port_no = ap->port_no;
 	u8 seq = (u8) (port_no + 1);
 
-	VPRINTK("ENTER, ap %p\n", ap);
+	ata_port_printk(ap, ATA_MSG_TRACE, "%s: ENTER, ap %p\n", 
+			__FUNCTION__, ap);
 
 	writel(0x00000001, ap->host_set->mmio_base + (seq * 4));
 	readl(ap->host_set->mmio_base + (seq * 4));	/* flush */

	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 7/9] sata_promise.c conversion
@ 2006-06-30  6:50 Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2006-06-30  6:50 UTC (permalink / raw)
  To: linux-ide; +Cc: Jeff Garzik, Tejun Heo

Convert the sata-promise.c to the new scheme.

Signed-off-by: <petkov@math.uni-muenster.de>

diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
index b2b6ed5..eda0ef5 100644
--- a/drivers/scsi/sata_promise.c
+++ b/drivers/scsi/sata_promise.c
@@ -408,9 +408,10 @@ static void pdc_sata_scr_write (struct a
 static void pdc_qc_prep(struct ata_queued_cmd *qc)
 {
 	struct pdc_port_priv *pp = qc->ap->private_data;
+	struct ata_port *ap = qc->ap;
 	unsigned int i;
 
-	VPRINTK("ENTER\n");
+	ata_port_printk(ap, ATA_MSG_TRACE, "%s: ENTER\n", __FUNCTION__);
 
 	switch (qc->tf.protocol) {
 	case ATA_PROT_DMA:
@@ -441,7 +442,7 @@ static void pdc_eng_timeout(struct ata_p
 	struct ata_queued_cmd *qc;
 	unsigned long flags;
 
-	DPRINTK("ENTER\n");
+	ata_port_printk(ap, ATA_MSG_TRACE, "%s: ENTER\n", __FUNCTION__);
 
 	spin_lock_irqsave(&host_set->lock, flags);
 
@@ -450,7 +451,7 @@ static void pdc_eng_timeout(struct ata_p
 	switch (qc->tf.protocol) {
 	case ATA_PROT_DMA:
 	case ATA_PROT_NODATA:
-		ata_port_printk(ap, KERN_ERR, "command timeout\n");
+		ata_port_printk(ap, ATA_MSG_ERR, "command timeout\n");
 		drv_stat = ata_wait_idle(ap);
 		qc->err_mask |= __ac_err_mask(drv_stat);
 		break;
@@ -458,7 +459,7 @@ static void pdc_eng_timeout(struct ata_p
 	default:
 		drv_stat = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
 
-		ata_port_printk(ap, KERN_ERR,
+		ata_port_printk(ap, ATA_MSG_ERR,
 				"unknown timeout, cmd 0x%x stat 0x%x\n",
 				qc->tf.command, drv_stat);
 
@@ -468,7 +469,7 @@ static void pdc_eng_timeout(struct ata_p
 
 	spin_unlock_irqrestore(&host_set->lock, flags);
 	ata_eh_qc_complete(qc);
-	DPRINTK("EXIT\n");
+	ata_port_printk(ap, ATA_MSG_TRACE, "%s: EXIT\n", __FUNCTION__);
 }
 
 static inline unsigned int pdc_host_intr( struct ata_port *ap,
@@ -539,14 +540,15 @@ static irqreturn_t pdc_interrupt (int ir
 	mask &= 0xffff;		/* only 16 tags possible */
 	if (!mask) {
 		VPRINTK("QUICK EXIT 3\n");
+		return IRQ_NONE;
 		goto done_irq;
 	}
 
 	writel(mask, mmio_base + PDC_INT_SEQMASK);
 
 	for (i = 0; i < host_set->n_ports; i++) {
-		VPRINTK("port %u\n", i);
 		ap = host_set->ports[i];
+		ata_port_printk(ap, ATA_MSG_CMD, "port %u\n", i);
 		tmp = mask & (1 << (i + 1));
 		if (tmp && ap &&
 		    !(ap->flags & ATA_FLAG_DISABLED)) {
@@ -572,7 +574,8 @@ static inline void pdc_packet_start(stru
 	unsigned int port_no = ap->port_no;
 	u8 seq = (u8) (port_no + 1);
 
-	VPRINTK("ENTER, ap %p\n", ap);
+	ata_port_printk(ap, ATA_MSG_TRACE, "%s: ENTER, ap %p\n", 
+			__FUNCTION__, ap);
 
 	writel(0x00000001, ap->host_set->mmio_base + (seq * 4));
 	readl(ap->host_set->mmio_base + (seq * 4));	/* flush */

	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-30  6:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-30  6:50 [PATCH 7/9] sata_promise.c conversion Borislav Petkov
  -- strict thread matches above, loose matches on Subject: below --
2006-06-29 16:10 Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox