diff options
author | Steve French <sfrench@us.ibm.com> | 2008-04-28 00:01:34 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-04-28 00:01:34 -0400 |
commit | 1dbbb6077426f8ce63d6a59c5ac6613e1689cbde (patch) | |
tree | 6141d4d7a8eb7c557705bdfa764137d4fd2e4924 /drivers/ide/ide-acpi.c | |
parent | d09e860cf07e7c9ee12920a09f5080e30a12a23a (diff) | |
parent | 064922a805ec7aadfafdd27aa6b4908d737c3c1d (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/ide/ide-acpi.c')
-rw-r--r-- | drivers/ide/ide-acpi.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 0f6fb6b72dd9..9d3601fa5680 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c | |||
@@ -55,14 +55,22 @@ struct ide_acpi_hwif_link { | |||
55 | /* note: adds function name and KERN_DEBUG */ | 55 | /* note: adds function name and KERN_DEBUG */ |
56 | #ifdef DEBUGGING | 56 | #ifdef DEBUGGING |
57 | #define DEBPRINT(fmt, args...) \ | 57 | #define DEBPRINT(fmt, args...) \ |
58 | printk(KERN_DEBUG "%s: " fmt, __FUNCTION__, ## args) | 58 | printk(KERN_DEBUG "%s: " fmt, __func__, ## args) |
59 | #else | 59 | #else |
60 | #define DEBPRINT(fmt, args...) do {} while (0) | 60 | #define DEBPRINT(fmt, args...) do {} while (0) |
61 | #endif /* DEBUGGING */ | 61 | #endif /* DEBUGGING */ |
62 | 62 | ||
63 | extern int ide_noacpi; | 63 | int ide_noacpi; |
64 | extern int ide_noacpitfs; | 64 | module_param_named(noacpi, ide_noacpi, bool, 0); |
65 | extern int ide_noacpionboot; | 65 | MODULE_PARM_DESC(noacpi, "disable IDE ACPI support"); |
66 | |||
67 | int ide_acpigtf; | ||
68 | module_param_named(acpigtf, ide_acpigtf, bool, 0); | ||
69 | MODULE_PARM_DESC(acpigtf, "enable IDE ACPI _GTF support"); | ||
70 | |||
71 | int ide_acpionboot; | ||
72 | module_param_named(acpionboot, ide_acpionboot, bool, 0); | ||
73 | MODULE_PARM_DESC(acpionboot, "call IDE ACPI methods on boot"); | ||
66 | 74 | ||
67 | static bool ide_noacpi_psx; | 75 | static bool ide_noacpi_psx; |
68 | static int no_acpi_psx(const struct dmi_system_id *id) | 76 | static int no_acpi_psx(const struct dmi_system_id *id) |
@@ -309,7 +317,7 @@ static int do_drive_get_GTF(ide_drive_t *drive, | |||
309 | if (ACPI_FAILURE(status)) { | 317 | if (ACPI_FAILURE(status)) { |
310 | printk(KERN_DEBUG | 318 | printk(KERN_DEBUG |
311 | "%s: Run _GTF error: status = 0x%x\n", | 319 | "%s: Run _GTF error: status = 0x%x\n", |
312 | __FUNCTION__, status); | 320 | __func__, status); |
313 | goto out; | 321 | goto out; |
314 | } | 322 | } |
315 | 323 | ||
@@ -335,7 +343,7 @@ static int do_drive_get_GTF(ide_drive_t *drive, | |||
335 | out_obj->buffer.length % REGS_PER_GTF) { | 343 | out_obj->buffer.length % REGS_PER_GTF) { |
336 | printk(KERN_ERR | 344 | printk(KERN_ERR |
337 | "%s: unexpected GTF length (%d) or addr (0x%p)\n", | 345 | "%s: unexpected GTF length (%d) or addr (0x%p)\n", |
338 | __FUNCTION__, out_obj->buffer.length, | 346 | __func__, out_obj->buffer.length, |
339 | out_obj->buffer.pointer); | 347 | out_obj->buffer.pointer); |
340 | err = -ENOENT; | 348 | err = -ENOENT; |
341 | kfree(output.pointer); | 349 | kfree(output.pointer); |
@@ -376,7 +384,7 @@ static int taskfile_load_raw(ide_drive_t *drive, | |||
376 | memcpy(&args.tf_array[7], >f->tfa, 7); | 384 | memcpy(&args.tf_array[7], >f->tfa, 7); |
377 | args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; | 385 | args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE; |
378 | 386 | ||
379 | if (ide_noacpitfs) { | 387 | if (!ide_acpigtf) { |
380 | DEBPRINT("_GTF execution disabled\n"); | 388 | DEBPRINT("_GTF execution disabled\n"); |
381 | return err; | 389 | return err; |
382 | } | 390 | } |
@@ -384,7 +392,7 @@ static int taskfile_load_raw(ide_drive_t *drive, | |||
384 | err = ide_no_data_taskfile(drive, &args); | 392 | err = ide_no_data_taskfile(drive, &args); |
385 | if (err) | 393 | if (err) |
386 | printk(KERN_ERR "%s: ide_no_data_taskfile failed: %u\n", | 394 | printk(KERN_ERR "%s: ide_no_data_taskfile failed: %u\n", |
387 | __FUNCTION__, err); | 395 | __func__, err); |
388 | 396 | ||
389 | return err; | 397 | return err; |
390 | } | 398 | } |
@@ -422,7 +430,7 @@ static int do_drive_set_taskfiles(ide_drive_t *drive, | |||
422 | 430 | ||
423 | if (gtf_length % REGS_PER_GTF) { | 431 | if (gtf_length % REGS_PER_GTF) { |
424 | printk(KERN_ERR "%s: unexpected GTF length (%d)\n", | 432 | printk(KERN_ERR "%s: unexpected GTF length (%d)\n", |
425 | __FUNCTION__, gtf_length); | 433 | __func__, gtf_length); |
426 | goto out; | 434 | goto out; |
427 | } | 435 | } |
428 | 436 | ||
@@ -547,7 +555,7 @@ void ide_acpi_get_timing(ide_hwif_t *hwif) | |||
547 | printk(KERN_ERR | 555 | printk(KERN_ERR |
548 | "%s: unexpected _GTM length (0x%x)[should be 0x%zx] or " | 556 | "%s: unexpected _GTM length (0x%x)[should be 0x%zx] or " |
549 | "addr (0x%p)\n", | 557 | "addr (0x%p)\n", |
550 | __FUNCTION__, out_obj->buffer.length, | 558 | __func__, out_obj->buffer.length, |
551 | sizeof(struct GTM_buffer), out_obj->buffer.pointer); | 559 | sizeof(struct GTM_buffer), out_obj->buffer.pointer); |
552 | return; | 560 | return; |
553 | } | 561 | } |
@@ -721,7 +729,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *hwif) | |||
721 | drive->name, err); | 729 | drive->name, err); |
722 | } | 730 | } |
723 | 731 | ||
724 | if (ide_noacpionboot) { | 732 | if (!ide_acpionboot) { |
725 | DEBPRINT("ACPI methods disabled on boot\n"); | 733 | DEBPRINT("ACPI methods disabled on boot\n"); |
726 | return; | 734 | return; |
727 | } | 735 | } |