diff options
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 4aa76c453755..994e41099b42 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -134,18 +134,6 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) | |||
134 | #endif | 134 | #endif |
135 | ide_fix_driveid(id); | 135 | ide_fix_driveid(id); |
136 | 136 | ||
137 | #if defined (CONFIG_SCSI_EATA_PIO) || defined (CONFIG_SCSI_EATA) | ||
138 | /* | ||
139 | * EATA SCSI controllers do a hardware ATA emulation: | ||
140 | * Ignore them if there is a driver for them available. | ||
141 | */ | ||
142 | if ((id->model[0] == 'P' && id->model[1] == 'M') || | ||
143 | (id->model[0] == 'S' && id->model[1] == 'K')) { | ||
144 | printk("%s: EATA SCSI HBA %.10s\n", drive->name, id->model); | ||
145 | goto err_misc; | ||
146 | } | ||
147 | #endif /* CONFIG_SCSI_EATA || CONFIG_SCSI_EATA_PIO */ | ||
148 | |||
149 | /* | 137 | /* |
150 | * WIN_IDENTIFY returns little-endian info, | 138 | * WIN_IDENTIFY returns little-endian info, |
151 | * WIN_PIDENTIFY *usually* returns little-endian info. | 139 | * WIN_PIDENTIFY *usually* returns little-endian info. |
@@ -167,7 +155,8 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) | |||
167 | 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")) |
168 | goto err_misc; | 156 | goto err_misc; |
169 | 157 | ||
170 | printk("%s: %s, ", drive->name, id->model); | 158 | printk(KERN_INFO "%s: %s, ", drive->name, id->model); |
159 | |||
171 | drive->present = 1; | 160 | drive->present = 1; |
172 | drive->dead = 0; | 161 | drive->dead = 0; |
173 | 162 | ||
@@ -176,16 +165,17 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) | |||
176 | */ | 165 | */ |
177 | if (cmd == WIN_PIDENTIFY) { | 166 | if (cmd == WIN_PIDENTIFY) { |
178 | u8 type = (id->config >> 8) & 0x1f; | 167 | u8 type = (id->config >> 8) & 0x1f; |
179 | printk("ATAPI "); | 168 | |
169 | printk(KERN_CONT "ATAPI "); | ||
180 | switch (type) { | 170 | switch (type) { |
181 | case ide_floppy: | 171 | case ide_floppy: |
182 | if (!strstr(id->model, "CD-ROM")) { | 172 | if (!strstr(id->model, "CD-ROM")) { |
183 | if (!strstr(id->model, "oppy") && | 173 | if (!strstr(id->model, "oppy") && |
184 | !strstr(id->model, "poyp") && | 174 | !strstr(id->model, "poyp") && |
185 | !strstr(id->model, "ZIP")) | 175 | !strstr(id->model, "ZIP")) |
186 | printk("cdrom or floppy?, assuming "); | 176 | printk(KERN_CONT "cdrom or floppy?, assuming "); |
187 | if (drive->media != ide_cdrom) { | 177 | if (drive->media != ide_cdrom) { |
188 | printk ("FLOPPY"); | 178 | printk(KERN_CONT "FLOPPY"); |
189 | drive->removable = 1; | 179 | drive->removable = 1; |
190 | break; | 180 | break; |
191 | } | 181 | } |
@@ -198,25 +188,25 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) | |||
198 | /* kludge for Apple PowerBook internal zip */ | 188 | /* kludge for Apple PowerBook internal zip */ |
199 | if (!strstr(id->model, "CD-ROM") && | 189 | if (!strstr(id->model, "CD-ROM") && |
200 | strstr(id->model, "ZIP")) { | 190 | strstr(id->model, "ZIP")) { |
201 | printk ("FLOPPY"); | 191 | printk(KERN_CONT "FLOPPY"); |
202 | type = ide_floppy; | 192 | type = ide_floppy; |
203 | break; | 193 | break; |
204 | } | 194 | } |
205 | #endif | 195 | #endif |
206 | printk ("CD/DVD-ROM"); | 196 | printk(KERN_CONT "CD/DVD-ROM"); |
207 | break; | 197 | break; |
208 | case ide_tape: | 198 | case ide_tape: |
209 | printk ("TAPE"); | 199 | printk(KERN_CONT "TAPE"); |
210 | break; | 200 | break; |
211 | case ide_optical: | 201 | case ide_optical: |
212 | printk ("OPTICAL"); | 202 | printk(KERN_CONT "OPTICAL"); |
213 | drive->removable = 1; | 203 | drive->removable = 1; |
214 | break; | 204 | break; |
215 | default: | 205 | default: |
216 | printk("UNKNOWN (type %d)", type); | 206 | printk(KERN_CONT "UNKNOWN (type %d)", type); |
217 | break; | 207 | break; |
218 | } | 208 | } |
219 | printk (" drive\n"); | 209 | printk(KERN_CONT " drive\n"); |
220 | drive->media = type; | 210 | drive->media = type; |
221 | /* an ATAPI device ignores DRDY */ | 211 | /* an ATAPI device ignores DRDY */ |
222 | drive->ready_stat = 0; | 212 | drive->ready_stat = 0; |
@@ -236,7 +226,9 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) | |||
236 | drive->removable = 1; | 226 | drive->removable = 1; |
237 | 227 | ||
238 | drive->media = ide_disk; | 228 | drive->media = ide_disk; |
239 | 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"); | ||
240 | 232 | ||
241 | return; | 233 | return; |
242 | 234 | ||
@@ -387,7 +379,7 @@ static int try_to_identify (ide_drive_t *drive, u8 cmd) | |||
387 | /* Mmmm.. multiple IRQs.. | 379 | /* Mmmm.. multiple IRQs.. |
388 | * don't know which was ours | 380 | * don't know which was ours |
389 | */ | 381 | */ |
390 | printk("%s: IRQ probe failed (0x%lx)\n", | 382 | printk(KERN_ERR "%s: IRQ probe failed (0x%lx)\n", |
391 | drive->name, cookie); | 383 | drive->name, cookie); |
392 | } | 384 | } |
393 | } | 385 | } |
@@ -456,7 +448,7 @@ static int do_probe (ide_drive_t *drive, u8 cmd) | |||
456 | return 4; | 448 | return 4; |
457 | } | 449 | } |
458 | #ifdef DEBUG | 450 | #ifdef DEBUG |
459 | 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", |
460 | drive->name, drive->present, drive->media, | 452 | drive->name, drive->present, drive->media, |
461 | (cmd == WIN_IDENTIFY) ? "ATA" : "ATAPI"); | 453 | (cmd == WIN_IDENTIFY) ? "ATA" : "ATAPI"); |
462 | #endif | 454 | #endif |
@@ -534,7 +526,8 @@ static void enable_nest (ide_drive_t *drive) | |||
534 | const struct ide_tp_ops *tp_ops = hwif->tp_ops; | 526 | const struct ide_tp_ops *tp_ops = hwif->tp_ops; |
535 | u8 stat; | 527 | u8 stat; |
536 | 528 | ||
537 | printk("%s: enabling %s -- ", hwif->name, drive->id->model); | 529 | printk(KERN_INFO "%s: enabling %s -- ", hwif->name, drive->id->model); |
530 | |||
538 | SELECT_DRIVE(drive); | 531 | SELECT_DRIVE(drive); |
539 | msleep(50); | 532 | msleep(50); |
540 | tp_ops->exec_command(hwif, EXABYTE_ENABLE_NEST); | 533 | tp_ops->exec_command(hwif, EXABYTE_ENABLE_NEST); |
@@ -883,7 +876,7 @@ static void save_match(ide_hwif_t *hwif, ide_hwif_t *new, ide_hwif_t **match) | |||
883 | if (m && m->hwgroup && m->hwgroup != new->hwgroup) { | 876 | if (m && m->hwgroup && m->hwgroup != new->hwgroup) { |
884 | if (!new->hwgroup) | 877 | if (!new->hwgroup) |
885 | return; | 878 | return; |
886 | printk("%s: potential irq problem with %s and %s\n", | 879 | printk(KERN_WARNING "%s: potential IRQ problem with %s and %s\n", |
887 | hwif->name, new->name, m->name); | 880 | hwif->name, new->name, m->name); |
888 | } | 881 | } |
889 | 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 */ |
@@ -1142,17 +1135,17 @@ static int init_irq (ide_hwif_t *hwif) | |||
1142 | } | 1135 | } |
1143 | 1136 | ||
1144 | #if !defined(__mc68000__) | 1137 | #if !defined(__mc68000__) |
1145 | 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, |
1146 | io_ports->data_addr, io_ports->status_addr, | 1139 | io_ports->data_addr, io_ports->status_addr, |
1147 | io_ports->ctl_addr, hwif->irq); | 1140 | io_ports->ctl_addr, hwif->irq); |
1148 | #else | 1141 | #else |
1149 | printk("%s at 0x%08lx on irq %d", hwif->name, | 1142 | printk(KERN_INFO "%s at 0x%08lx on irq %d", hwif->name, |
1150 | io_ports->data_addr, hwif->irq); | 1143 | io_ports->data_addr, hwif->irq); |
1151 | #endif /* __mc68000__ */ | 1144 | #endif /* __mc68000__ */ |
1152 | if (match) | 1145 | if (match) |
1153 | printk(" (%sed with %s)", | 1146 | printk(KERN_CONT " (%sed with %s)", |
1154 | hwif->sharing_irq ? "shar" : "serializ", match->name); | 1147 | hwif->sharing_irq ? "shar" : "serializ", match->name); |
1155 | printk("\n"); | 1148 | printk(KERN_CONT "\n"); |
1156 | 1149 | ||
1157 | mutex_unlock(&ide_cfg_mtx); | 1150 | mutex_unlock(&ide_cfg_mtx); |
1158 | return 0; | 1151 | return 0; |
@@ -1287,7 +1280,7 @@ static int hwif_init(ide_hwif_t *hwif) | |||
1287 | if (!hwif->irq) { | 1280 | if (!hwif->irq) { |
1288 | hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); | 1281 | hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); |
1289 | if (!hwif->irq) { | 1282 | if (!hwif->irq) { |
1290 | printk("%s: DISABLED, NO IRQ\n", hwif->name); | 1283 | printk(KERN_ERR "%s: disabled, no IRQ\n", hwif->name); |
1291 | return 0; | 1284 | return 0; |
1292 | } | 1285 | } |
1293 | } | 1286 | } |
@@ -1317,16 +1310,16 @@ static int hwif_init(ide_hwif_t *hwif) | |||
1317 | */ | 1310 | */ |
1318 | hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); | 1311 | hwif->irq = __ide_default_irq(hwif->io_ports.data_addr); |
1319 | if (!hwif->irq) { | 1312 | if (!hwif->irq) { |
1320 | printk("%s: Disabled unable to get IRQ %d.\n", | 1313 | printk(KERN_ERR "%s: disabled, unable to get IRQ %d\n", |
1321 | hwif->name, old_irq); | 1314 | hwif->name, old_irq); |
1322 | goto out; | 1315 | goto out; |
1323 | } | 1316 | } |
1324 | if (init_irq(hwif)) { | 1317 | if (init_irq(hwif)) { |
1325 | 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", |
1326 | hwif->name, old_irq, hwif->irq); | 1319 | hwif->name, old_irq, hwif->irq); |
1327 | goto out; | 1320 | goto out; |
1328 | } | 1321 | } |
1329 | printk("%s: probed IRQ %d failed, using default.\n", | 1322 | printk(KERN_WARNING "%s: probed IRQ %d failed, using default\n", |
1330 | hwif->name, hwif->irq); | 1323 | hwif->name, hwif->irq); |
1331 | 1324 | ||
1332 | done: | 1325 | done: |
@@ -1595,6 +1588,8 @@ struct ide_host *ide_host_alloc_all(const struct ide_port_info *d, | |||
1595 | 1588 | ||
1596 | ide_init_port_data(hwif, idx); | 1589 | ide_init_port_data(hwif, idx); |
1597 | 1590 | ||
1591 | hwif->host = host; | ||
1592 | |||
1598 | host->ports[i] = hwif; | 1593 | host->ports[i] = hwif; |
1599 | host->n_ports++; | 1594 | host->n_ports++; |
1600 | } | 1595 | } |
@@ -1604,6 +1599,12 @@ struct ide_host *ide_host_alloc_all(const struct ide_port_info *d, | |||
1604 | return NULL; | 1599 | return NULL; |
1605 | } | 1600 | } |
1606 | 1601 | ||
1602 | if (hws[0]) | ||
1603 | host->dev[0] = hws[0]->dev; | ||
1604 | |||
1605 | if (d) | ||
1606 | host->host_flags = d->host_flags; | ||
1607 | |||
1607 | return host; | 1608 | return host; |
1608 | } | 1609 | } |
1609 | EXPORT_SYMBOL_GPL(ide_host_alloc_all); | 1610 | EXPORT_SYMBOL_GPL(ide_host_alloc_all); |