diff options
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 06fe002116ec..fa047150a1c6 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -282,6 +282,29 @@ no_80w: | |||
282 | return 0; | 282 | return 0; |
283 | } | 283 | } |
284 | 284 | ||
285 | static const char *nien_quirk_list[] = { | ||
286 | "QUANTUM FIREBALLlct08 08", | ||
287 | "QUANTUM FIREBALLP KA6.4", | ||
288 | "QUANTUM FIREBALLP KA9.1", | ||
289 | "QUANTUM FIREBALLP KX13.6", | ||
290 | "QUANTUM FIREBALLP KX20.5", | ||
291 | "QUANTUM FIREBALLP KX27.3", | ||
292 | "QUANTUM FIREBALLP LM20.4", | ||
293 | "QUANTUM FIREBALLP LM20.5", | ||
294 | NULL | ||
295 | }; | ||
296 | |||
297 | void ide_check_nien_quirk_list(ide_drive_t *drive) | ||
298 | { | ||
299 | const char **list, *m = (char *)&drive->id[ATA_ID_PROD]; | ||
300 | |||
301 | for (list = nien_quirk_list; *list != NULL; list++) | ||
302 | if (strstr(m, *list) != NULL) { | ||
303 | drive->dev_flags |= IDE_DFLAG_NIEN_QUIRK; | ||
304 | return; | ||
305 | } | ||
306 | } | ||
307 | |||
285 | int ide_driveid_update(ide_drive_t *drive) | 308 | int ide_driveid_update(ide_drive_t *drive) |
286 | { | 309 | { |
287 | u16 *id; | 310 | u16 *id; |
@@ -311,7 +334,6 @@ int ide_driveid_update(ide_drive_t *drive) | |||
311 | 334 | ||
312 | return 1; | 335 | return 1; |
313 | out_err: | 336 | out_err: |
314 | SELECT_MASK(drive, 0); | ||
315 | if (rc == 2) | 337 | if (rc == 2) |
316 | printk(KERN_ERR "%s: %s: bad status\n", drive->name, __func__); | 338 | printk(KERN_ERR "%s: %s: bad status\n", drive->name, __func__); |
317 | kfree(id); | 339 | kfree(id); |
@@ -365,7 +387,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | |||
365 | 387 | ||
366 | tp_ops->exec_command(hwif, ATA_CMD_SET_FEATURES); | 388 | tp_ops->exec_command(hwif, ATA_CMD_SET_FEATURES); |
367 | 389 | ||
368 | if (drive->quirk_list == 2) | 390 | if (drive->dev_flags & IDE_DFLAG_NIEN_QUIRK) |
369 | tp_ops->write_devctl(hwif, ATA_DEVCTL_OBS); | 391 | tp_ops->write_devctl(hwif, ATA_DEVCTL_OBS); |
370 | 392 | ||
371 | error = __ide_wait_stat(drive, drive->ready_stat, | 393 | error = __ide_wait_stat(drive, drive->ready_stat, |