Skip to content

Commit

Permalink
libata: use ata_port_printk() in ata_wait_idle()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Oct 12, 2007
1 parent b877353 commit 1552945
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -1182,9 +1182,11 @@ static inline u8 ata_wait_idle(struct ata_port *ap)
{
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;
}
Expand Down

0 comments on commit 1552945

Please sign in to comment.