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: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

+28 -23
+28 -23
drivers/ide/ide-probe.c
··· 155 if (strstr(id->model, "E X A B Y T E N E S T")) 156 goto err_misc; 157 158 - printk("%s: %s, ", drive->name, id->model); 159 drive->present = 1; 160 drive->dead = 0; 161 ··· 165 */ 166 if (cmd == WIN_PIDENTIFY) { 167 u8 type = (id->config >> 8) & 0x1f; 168 - printk("ATAPI "); 169 switch (type) { 170 case ide_floppy: 171 if (!strstr(id->model, "CD-ROM")) { 172 if (!strstr(id->model, "oppy") && 173 !strstr(id->model, "poyp") && 174 !strstr(id->model, "ZIP")) 175 - printk("cdrom or floppy?, assuming "); 176 if (drive->media != ide_cdrom) { 177 - printk ("FLOPPY"); 178 drive->removable = 1; 179 break; 180 } ··· 188 /* kludge for Apple PowerBook internal zip */ 189 if (!strstr(id->model, "CD-ROM") && 190 strstr(id->model, "ZIP")) { 191 - printk ("FLOPPY"); 192 type = ide_floppy; 193 break; 194 } 195 #endif 196 - printk ("CD/DVD-ROM"); 197 break; 198 case ide_tape: 199 - printk ("TAPE"); 200 break; 201 case ide_optical: 202 - printk ("OPTICAL"); 203 drive->removable = 1; 204 break; 205 default: 206 - printk("UNKNOWN (type %d)", type); 207 break; 208 } 209 - printk (" drive\n"); 210 drive->media = type; 211 /* an ATAPI device ignores DRDY */ 212 drive->ready_stat = 0; ··· 226 drive->removable = 1; 227 228 drive->media = ide_disk; 229 - printk("%s DISK drive\n", (id->config == 0x848a) ? "CFA" : "ATA" ); 230 231 return; 232 ··· 379 /* Mmmm.. multiple IRQs.. 380 * don't know which was ours 381 */ 382 - printk("%s: IRQ probe failed (0x%lx)\n", 383 drive->name, cookie); 384 } 385 } ··· 448 return 4; 449 } 450 #ifdef DEBUG 451 - printk("probing for %s: present=%d, media=%d, probetype=%s\n", 452 drive->name, drive->present, drive->media, 453 (cmd == WIN_IDENTIFY) ? "ATA" : "ATAPI"); 454 #endif ··· 526 const struct ide_tp_ops *tp_ops = hwif->tp_ops; 527 u8 stat; 528 529 - printk("%s: enabling %s -- ", hwif->name, drive->id->model); 530 SELECT_DRIVE(drive); 531 msleep(50); 532 tp_ops->exec_command(hwif, EXABYTE_ENABLE_NEST); ··· 876 if (m && m->hwgroup && m->hwgroup != new->hwgroup) { 877 if (!new->hwgroup) 878 return; 879 - printk("%s: potential irq problem with %s and %s\n", 880 hwif->name, new->name, m->name); 881 } 882 if (!m || m->irq != hwif->irq) /* don't undo a prior perfect match */ ··· 1135 } 1136 1137 #if !defined(__mc68000__) 1138 - printk("%s at 0x%03lx-0x%03lx,0x%03lx on irq %d", hwif->name, 1139 io_ports->data_addr, io_ports->status_addr, 1140 io_ports->ctl_addr, hwif->irq); 1141 #else 1142 - printk("%s at 0x%08lx on irq %d", hwif->name, 1143 io_ports->data_addr, hwif->irq); 1144 #endif /* __mc68000__ */ 1145 if (match) 1146 - printk(" (%sed with %s)", 1147 hwif->sharing_irq ? "shar" : "serializ", match->name); 1148 - printk("\n"); 1149 1150 mutex_unlock(&ide_cfg_mtx); 1151 return 0; ··· 1280 if (!hwif->irq) { 1281 hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); 1282 if (!hwif->irq) { 1283 - printk("%s: DISABLED, NO IRQ\n", hwif->name); 1284 return 0; 1285 } 1286 } ··· 1310 */ 1311 hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); 1312 if (!hwif->irq) { 1313 - printk("%s: Disabled unable to get IRQ %d.\n", 1314 hwif->name, old_irq); 1315 goto out; 1316 } 1317 if (init_irq(hwif)) { 1318 - printk("%s: probed IRQ %d and default IRQ %d failed.\n", 1319 hwif->name, old_irq, hwif->irq); 1320 goto out; 1321 } 1322 - printk("%s: probed IRQ %d failed, using default.\n", 1323 hwif->name, hwif->irq); 1324 1325 done:
··· 155 if (strstr(id->model, "E X A B Y T E N E S T")) 156 goto err_misc; 157 158 + printk(KERN_INFO "%s: %s, ", drive->name, id->model); 159 + 160 drive->present = 1; 161 drive->dead = 0; 162 ··· 164 */ 165 if (cmd == WIN_PIDENTIFY) { 166 u8 type = (id->config >> 8) & 0x1f; 167 + 168 + printk(KERN_CONT "ATAPI "); 169 switch (type) { 170 case ide_floppy: 171 if (!strstr(id->model, "CD-ROM")) { 172 if (!strstr(id->model, "oppy") && 173 !strstr(id->model, "poyp") && 174 !strstr(id->model, "ZIP")) 175 + printk(KERN_CONT "cdrom or floppy?, assuming "); 176 if (drive->media != ide_cdrom) { 177 + printk(KERN_CONT "FLOPPY"); 178 drive->removable = 1; 179 break; 180 } ··· 186 /* kludge for Apple PowerBook internal zip */ 187 if (!strstr(id->model, "CD-ROM") && 188 strstr(id->model, "ZIP")) { 189 + printk(KERN_CONT "FLOPPY"); 190 type = ide_floppy; 191 break; 192 } 193 #endif 194 + printk(KERN_CONT "CD/DVD-ROM"); 195 break; 196 case ide_tape: 197 + printk(KERN_CONT "TAPE"); 198 break; 199 case ide_optical: 200 + printk(KERN_CONT "OPTICAL"); 201 drive->removable = 1; 202 break; 203 default: 204 + printk(KERN_CONT "UNKNOWN (type %d)", type); 205 break; 206 } 207 + printk(KERN_CONT " drive\n"); 208 drive->media = type; 209 /* an ATAPI device ignores DRDY */ 210 drive->ready_stat = 0; ··· 224 drive->removable = 1; 225 226 drive->media = ide_disk; 227 + 228 + printk(KERN_CONT "%s DISK drive\n", 229 + (id->config == 0x848a) ? "CFA" : "ATA"); 230 231 return; 232 ··· 375 /* Mmmm.. multiple IRQs.. 376 * don't know which was ours 377 */ 378 + printk(KERN_ERR "%s: IRQ probe failed (0x%lx)\n", 379 drive->name, cookie); 380 } 381 } ··· 444 return 4; 445 } 446 #ifdef DEBUG 447 + printk(KERN_INFO "probing for %s: present=%d, media=%d, probetype=%s\n", 448 drive->name, drive->present, drive->media, 449 (cmd == WIN_IDENTIFY) ? "ATA" : "ATAPI"); 450 #endif ··· 522 const struct ide_tp_ops *tp_ops = hwif->tp_ops; 523 u8 stat; 524 525 + printk(KERN_INFO "%s: enabling %s -- ", hwif->name, drive->id->model); 526 + 527 SELECT_DRIVE(drive); 528 msleep(50); 529 tp_ops->exec_command(hwif, EXABYTE_ENABLE_NEST); ··· 871 if (m && m->hwgroup && m->hwgroup != new->hwgroup) { 872 if (!new->hwgroup) 873 return; 874 + printk(KERN_WARNING "%s: potential IRQ problem with %s and %s\n", 875 hwif->name, new->name, m->name); 876 } 877 if (!m || m->irq != hwif->irq) /* don't undo a prior perfect match */ ··· 1130 } 1131 1132 #if !defined(__mc68000__) 1133 + printk(KERN_INFO "%s at 0x%03lx-0x%03lx,0x%03lx on irq %d", hwif->name, 1134 io_ports->data_addr, io_ports->status_addr, 1135 io_ports->ctl_addr, hwif->irq); 1136 #else 1137 + printk(KERN_INFO "%s at 0x%08lx on irq %d", hwif->name, 1138 io_ports->data_addr, hwif->irq); 1139 #endif /* __mc68000__ */ 1140 if (match) 1141 + printk(KERN_CONT " (%sed with %s)", 1142 hwif->sharing_irq ? "shar" : "serializ", match->name); 1143 + printk(KERN_CONT "\n"); 1144 1145 mutex_unlock(&ide_cfg_mtx); 1146 return 0; ··· 1275 if (!hwif->irq) { 1276 hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); 1277 if (!hwif->irq) { 1278 + printk(KERN_ERR "%s: disabled, no IRQ\n", hwif->name); 1279 return 0; 1280 } 1281 } ··· 1305 */ 1306 hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); 1307 if (!hwif->irq) { 1308 + printk(KERN_ERR "%s: disabled, unable to get IRQ %d\n", 1309 hwif->name, old_irq); 1310 goto out; 1311 } 1312 if (init_irq(hwif)) { 1313 + printk(KERN_ERR "%s: probed IRQ %d and default IRQ %d failed\n", 1314 hwif->name, old_irq, hwif->irq); 1315 goto out; 1316 } 1317 + printk(KERN_WARNING "%s: probed IRQ %d failed, using default\n", 1318 hwif->name, hwif->irq); 1319 1320 done: