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