ide: use proper printk() KERN_* levels in ide-probe.c

While at it:

- fixup printk() messages in save_match() and hwif_init().
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 52f3a771
...@@ -155,7 +155,8 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) ...@@ -155,7 +155,8 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd)
if (strstr(id->model, "E X A B Y T E N E S T")) if (strstr(id->model, "E X A B Y T E N E S T"))
goto err_misc; goto err_misc;
printk("%s: %s, ", drive->name, id->model); printk(KERN_INFO "%s: %s, ", drive->name, id->model);
drive->present = 1; drive->present = 1;
drive->dead = 0; drive->dead = 0;
...@@ -164,16 +165,17 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) ...@@ -164,16 +165,17 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd)
*/ */
if (cmd == WIN_PIDENTIFY) { if (cmd == WIN_PIDENTIFY) {
u8 type = (id->config >> 8) & 0x1f; u8 type = (id->config >> 8) & 0x1f;
printk("ATAPI ");
printk(KERN_CONT "ATAPI ");
switch (type) { switch (type) {
case ide_floppy: case ide_floppy:
if (!strstr(id->model, "CD-ROM")) { if (!strstr(id->model, "CD-ROM")) {
if (!strstr(id->model, "oppy") && if (!strstr(id->model, "oppy") &&
!strstr(id->model, "poyp") && !strstr(id->model, "poyp") &&
!strstr(id->model, "ZIP")) !strstr(id->model, "ZIP"))
printk("cdrom or floppy?, assuming "); printk(KERN_CONT "cdrom or floppy?, assuming ");
if (drive->media != ide_cdrom) { if (drive->media != ide_cdrom) {
printk ("FLOPPY"); printk(KERN_CONT "FLOPPY");
drive->removable = 1; drive->removable = 1;
break; break;
} }
...@@ -186,25 +188,25 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) ...@@ -186,25 +188,25 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd)
/* kludge for Apple PowerBook internal zip */ /* kludge for Apple PowerBook internal zip */
if (!strstr(id->model, "CD-ROM") && if (!strstr(id->model, "CD-ROM") &&
strstr(id->model, "ZIP")) { strstr(id->model, "ZIP")) {
printk ("FLOPPY"); printk(KERN_CONT "FLOPPY");
type = ide_floppy; type = ide_floppy;
break; break;
} }
#endif #endif
printk ("CD/DVD-ROM"); printk(KERN_CONT "CD/DVD-ROM");
break; break;
case ide_tape: case ide_tape:
printk ("TAPE"); printk(KERN_CONT "TAPE");
break; break;
case ide_optical: case ide_optical:
printk ("OPTICAL"); printk(KERN_CONT "OPTICAL");
drive->removable = 1; drive->removable = 1;
break; break;
default: default:
printk("UNKNOWN (type %d)", type); printk(KERN_CONT "UNKNOWN (type %d)", type);
break; break;
} }
printk (" drive\n"); printk(KERN_CONT " drive\n");
drive->media = type; drive->media = type;
/* an ATAPI device ignores DRDY */ /* an ATAPI device ignores DRDY */
drive->ready_stat = 0; drive->ready_stat = 0;
...@@ -224,7 +226,9 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) ...@@ -224,7 +226,9 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd)
drive->removable = 1; drive->removable = 1;
drive->media = ide_disk; drive->media = ide_disk;
printk("%s DISK drive\n", (id->config == 0x848a) ? "CFA" : "ATA" );
printk(KERN_CONT "%s DISK drive\n",
(id->config == 0x848a) ? "CFA" : "ATA");
return; return;
...@@ -375,7 +379,7 @@ static int try_to_identify (ide_drive_t *drive, u8 cmd) ...@@ -375,7 +379,7 @@ static int try_to_identify (ide_drive_t *drive, u8 cmd)
/* Mmmm.. multiple IRQs.. /* Mmmm.. multiple IRQs..
* don't know which was ours * don't know which was ours
*/ */
printk("%s: IRQ probe failed (0x%lx)\n", printk(KERN_ERR "%s: IRQ probe failed (0x%lx)\n",
drive->name, cookie); drive->name, cookie);
} }
} }
...@@ -444,7 +448,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd) ...@@ -444,7 +448,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd)
return 4; return 4;
} }
#ifdef DEBUG #ifdef DEBUG
printk("probing for %s: present=%d, media=%d, probetype=%s\n", printk(KERN_INFO "probing for %s: present=%d, media=%d, probetype=%s\n",
drive->name, drive->present, drive->media, drive->name, drive->present, drive->media,
(cmd == WIN_IDENTIFY) ? "ATA" : "ATAPI"); (cmd == WIN_IDENTIFY) ? "ATA" : "ATAPI");
#endif #endif
...@@ -522,7 +526,8 @@ static void enable_nest (ide_drive_t *drive) ...@@ -522,7 +526,8 @@ static void enable_nest (ide_drive_t *drive)
const struct ide_tp_ops *tp_ops = hwif->tp_ops; const struct ide_tp_ops *tp_ops = hwif->tp_ops;
u8 stat; u8 stat;
printk("%s: enabling %s -- ", hwif->name, drive->id->model); printk(KERN_INFO "%s: enabling %s -- ", hwif->name, drive->id->model);
SELECT_DRIVE(drive); SELECT_DRIVE(drive);
msleep(50); msleep(50);
tp_ops->exec_command(hwif, EXABYTE_ENABLE_NEST); tp_ops->exec_command(hwif, EXABYTE_ENABLE_NEST);
...@@ -871,7 +876,7 @@ static void save_match(ide_hwif_t *hwif, ide_hwif_t *new, ide_hwif_t **match) ...@@ -871,7 +876,7 @@ static void save_match(ide_hwif_t *hwif, ide_hwif_t *new, ide_hwif_t **match)
if (m && m->hwgroup && m->hwgroup != new->hwgroup) { if (m && m->hwgroup && m->hwgroup != new->hwgroup) {
if (!new->hwgroup) if (!new->hwgroup)
return; return;
printk("%s: potential irq problem with %s and %s\n", printk(KERN_WARNING "%s: potential IRQ problem with %s and %s\n",
hwif->name, new->name, m->name); hwif->name, new->name, m->name);
} }
if (!m || m->irq != hwif->irq) /* don't undo a prior perfect match */ if (!m || m->irq != hwif->irq) /* don't undo a prior perfect match */
...@@ -1130,17 +1135,17 @@ static int init_irq (ide_hwif_t *hwif) ...@@ -1130,17 +1135,17 @@ static int init_irq (ide_hwif_t *hwif)
} }
#if !defined(__mc68000__) #if !defined(__mc68000__)
printk("%s at 0x%03lx-0x%03lx,0x%03lx on irq %d", hwif->name, printk(KERN_INFO "%s at 0x%03lx-0x%03lx,0x%03lx on irq %d", hwif->name,
io_ports->data_addr, io_ports->status_addr, io_ports->data_addr, io_ports->status_addr,
io_ports->ctl_addr, hwif->irq); io_ports->ctl_addr, hwif->irq);
#else #else
printk("%s at 0x%08lx on irq %d", hwif->name, printk(KERN_INFO "%s at 0x%08lx on irq %d", hwif->name,
io_ports->data_addr, hwif->irq); io_ports->data_addr, hwif->irq);
#endif /* __mc68000__ */ #endif /* __mc68000__ */
if (match) if (match)
printk(" (%sed with %s)", printk(KERN_CONT " (%sed with %s)",
hwif->sharing_irq ? "shar" : "serializ", match->name); hwif->sharing_irq ? "shar" : "serializ", match->name);
printk("\n"); printk(KERN_CONT "\n");
mutex_unlock(&ide_cfg_mtx); mutex_unlock(&ide_cfg_mtx);
return 0; return 0;
...@@ -1275,7 +1280,7 @@ static int hwif_init(ide_hwif_t *hwif) ...@@ -1275,7 +1280,7 @@ static int hwif_init(ide_hwif_t *hwif)
if (!hwif->irq) { if (!hwif->irq) {
hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
if (!hwif->irq) { if (!hwif->irq) {
printk("%s: DISABLED, NO IRQ\n", hwif->name); printk(KERN_ERR "%s: disabled, no IRQ\n", hwif->name);
return 0; return 0;
} }
} }
...@@ -1305,16 +1310,16 @@ static int hwif_init(ide_hwif_t *hwif) ...@@ -1305,16 +1310,16 @@ static int hwif_init(ide_hwif_t *hwif)
*/ */
hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); hwif->irq = __ide_default_irq(hwif->io_ports.data_addr);
if (!hwif->irq) { if (!hwif->irq) {
printk("%s: Disabled unable to get IRQ %d.\n", printk(KERN_ERR "%s: disabled, unable to get IRQ %d\n",
hwif->name, old_irq); hwif->name, old_irq);
goto out; goto out;
} }
if (init_irq(hwif)) { if (init_irq(hwif)) {
printk("%s: probed IRQ %d and default IRQ %d failed.\n", printk(KERN_ERR "%s: probed IRQ %d and default IRQ %d failed\n",
hwif->name, old_irq, hwif->irq); hwif->name, old_irq, hwif->irq);
goto out; goto out;
} }
printk("%s: probed IRQ %d failed, using default.\n", printk(KERN_WARNING "%s: probed IRQ %d failed, using default\n",
hwif->name, hwif->irq); hwif->name, hwif->irq);
done: done:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment