linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH libata-dev#upstream 1/3] libata: use ata_port_printk() in ata_wait_idle()
@ 2007-07-30  5:23 Tejun Heo
  2007-07-30  5:24 ` [PATCH libata-dev#upstream 2/3] libata: add printf format attribute to ehi desc functions Tejun Heo
  2007-08-15  8:49 ` [PATCH libata-dev#upstream 1/3] libata: use ata_port_printk() in ata_wait_idle() Jeff Garzik
  0 siblings, 2 replies; 8+ messages in thread
From: Tejun Heo @ 2007-07-30  5:23 UTC (permalink / raw)
  To: Jeff Garzik, Alan Cox, linux-ide

ata_wait_idle() identified controller by printing out the address of
the Status register.  This is bogus because 1. it's iomapped address
2. some controllers don't have Status register and don't initialize
the field.  Use ata_port_printk() instead.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
Currently there's no equivalent ata_msg_* level for ATA_DEBUG, so the
printk is conditionalized with #ifdef ATA_DEBUG.  We need to kill
ATA_DEBUG, ATA_VERBOSE_DEBUG and integrate them into ata_msg_* in the
future.

 include/linux/libata.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: work/include/linux/libata.h
===================================================================
--- work.orig/include/linux/libata.h
+++ work/include/linux/libata.h
@@ -1106,9 +1106,11 @@ static inline u8 ata_wait_idle(struct at
 {
 	u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
 
+#ifdef ATA_DEBUG
 	if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ)))
-		DPRINTK("ATA: abnormal status 0x%X on port 0x%p\n",
-			status, ap->ioaddr.status_addr);
+		ata_port_printk(ap, KERN_DEBUG, "abnormal Status 0x%X\n",
+				status);
+#endif
 
 	return status;
 }

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

end of thread, other threads:[~2007-08-31  9:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-30  5:23 [PATCH libata-dev#upstream 1/3] libata: use ata_port_printk() in ata_wait_idle() Tejun Heo
2007-07-30  5:24 ` [PATCH libata-dev#upstream 2/3] libata: add printf format attribute to ehi desc functions Tejun Heo
2007-07-30  5:25   ` [PATCH libata-dev#upstream 3/3] libata: implement and use ata_port_desc() to report port configuration Tejun Heo
2007-07-30 12:55     ` Alan Cox
2007-08-15  8:48     ` Jeff Garzik
2007-08-18  4:14       ` [PATCH libata-dev#upstream 3/3 REGENERATED] " Tejun Heo
2007-08-31  9:35         ` Jeff Garzik
2007-08-15  8:49 ` [PATCH libata-dev#upstream 1/3] libata: use ata_port_printk() in ata_wait_idle() Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).