diff options
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r-- | drivers/ide/ide-tape.c | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 4e59239fef75..e82bfa5e0ab8 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -4561,28 +4561,33 @@ static void idetape_get_blocksize_from_block_descriptor(ide_drive_t *drive) | |||
4561 | printk(KERN_INFO "ide-tape: Adjusted block size - %d\n", tape->tape_block_size); | 4561 | printk(KERN_INFO "ide-tape: Adjusted block size - %d\n", tape->tape_block_size); |
4562 | #endif /* IDETAPE_DEBUG_INFO */ | 4562 | #endif /* IDETAPE_DEBUG_INFO */ |
4563 | } | 4563 | } |
4564 | |||
4565 | #ifdef CONFIG_IDE_PROC_FS | ||
4564 | static void idetape_add_settings (ide_drive_t *drive) | 4566 | static void idetape_add_settings (ide_drive_t *drive) |
4565 | { | 4567 | { |
4566 | idetape_tape_t *tape = drive->driver_data; | 4568 | idetape_tape_t *tape = drive->driver_data; |
4567 | 4569 | ||
4568 | /* | 4570 | /* |
4569 | * drive setting name read/write ioctl ioctl data type min max mul_factor div_factor data pointer set function | 4571 | * drive setting name read/write data type min max mul_factor div_factor data pointer set function |
4570 | */ | 4572 | */ |
4571 | ide_add_setting(drive, "buffer", SETTING_READ, -1, -1, TYPE_SHORT, 0, 0xffff, 1, 2, &tape->capabilities.buffer_size, NULL); | 4573 | ide_add_setting(drive, "buffer", SETTING_READ, TYPE_SHORT, 0, 0xffff, 1, 2, &tape->capabilities.buffer_size, NULL); |
4572 | ide_add_setting(drive, "pipeline_min", SETTING_RW, -1, -1, TYPE_INT, 1, 0xffff, tape->stage_size / 1024, 1, &tape->min_pipeline, NULL); | 4574 | ide_add_setting(drive, "pipeline_min", SETTING_RW, TYPE_INT, 1, 0xffff, tape->stage_size / 1024, 1, &tape->min_pipeline, NULL); |
4573 | ide_add_setting(drive, "pipeline", SETTING_RW, -1, -1, TYPE_INT, 1, 0xffff, tape->stage_size / 1024, 1, &tape->max_stages, NULL); | 4575 | ide_add_setting(drive, "pipeline", SETTING_RW, TYPE_INT, 1, 0xffff, tape->stage_size / 1024, 1, &tape->max_stages, NULL); |
4574 | ide_add_setting(drive, "pipeline_max", SETTING_RW, -1, -1, TYPE_INT, 1, 0xffff, tape->stage_size / 1024, 1, &tape->max_pipeline, NULL); | 4576 | ide_add_setting(drive, "pipeline_max", SETTING_RW, TYPE_INT, 1, 0xffff, tape->stage_size / 1024, 1, &tape->max_pipeline, NULL); |
4575 | ide_add_setting(drive, "pipeline_used",SETTING_READ, -1, -1, TYPE_INT, 0, 0xffff, tape->stage_size / 1024, 1, &tape->nr_stages, NULL); | 4577 | ide_add_setting(drive, "pipeline_used", SETTING_READ, TYPE_INT, 0, 0xffff, tape->stage_size / 1024, 1, &tape->nr_stages, NULL); |
4576 | ide_add_setting(drive, "pipeline_pending",SETTING_READ,-1, -1, TYPE_INT, 0, 0xffff, tape->stage_size / 1024, 1, &tape->nr_pending_stages, NULL); | 4578 | ide_add_setting(drive, "pipeline_pending", SETTING_READ, TYPE_INT, 0, 0xffff, tape->stage_size / 1024, 1, &tape->nr_pending_stages, NULL); |
4577 | ide_add_setting(drive, "speed", SETTING_READ, -1, -1, TYPE_SHORT, 0, 0xffff, 1, 1, &tape->capabilities.speed, NULL); | 4579 | ide_add_setting(drive, "speed", SETTING_READ, TYPE_SHORT, 0, 0xffff, 1, 1, &tape->capabilities.speed, NULL); |
4578 | ide_add_setting(drive, "stage", SETTING_READ, -1, -1, TYPE_INT, 0, 0xffff, 1, 1024, &tape->stage_size, NULL); | 4580 | ide_add_setting(drive, "stage", SETTING_READ, TYPE_INT, 0, 0xffff, 1, 1024, &tape->stage_size, NULL); |
4579 | ide_add_setting(drive, "tdsc", SETTING_RW, -1, -1, TYPE_INT, IDETAPE_DSC_RW_MIN, IDETAPE_DSC_RW_MAX, 1000, HZ, &tape->best_dsc_rw_frequency, NULL); | 4581 | ide_add_setting(drive, "tdsc", SETTING_RW, TYPE_INT, IDETAPE_DSC_RW_MIN, IDETAPE_DSC_RW_MAX, 1000, HZ, &tape->best_dsc_rw_frequency, NULL); |
4580 | ide_add_setting(drive, "dsc_overlap", SETTING_RW, -1, -1, TYPE_BYTE, 0, 1, 1, 1, &drive->dsc_overlap, NULL); | 4582 | ide_add_setting(drive, "dsc_overlap", SETTING_RW, TYPE_BYTE, 0, 1, 1, 1, &drive->dsc_overlap, NULL); |
4581 | ide_add_setting(drive, "pipeline_head_speed_c",SETTING_READ, -1, -1, TYPE_INT, 0, 0xffff, 1, 1, &tape->controlled_pipeline_head_speed, NULL); | 4583 | ide_add_setting(drive, "pipeline_head_speed_c",SETTING_READ, TYPE_INT, 0, 0xffff, 1, 1, &tape->controlled_pipeline_head_speed, NULL); |
4582 | ide_add_setting(drive, "pipeline_head_speed_u",SETTING_READ, -1, -1, TYPE_INT, 0, 0xffff, 1, 1, &tape->uncontrolled_pipeline_head_speed, NULL); | 4584 | ide_add_setting(drive, "pipeline_head_speed_u",SETTING_READ, TYPE_INT, 0, 0xffff, 1, 1, &tape->uncontrolled_pipeline_head_speed,NULL); |
4583 | ide_add_setting(drive, "avg_speed", SETTING_READ, -1, -1, TYPE_INT, 0, 0xffff, 1, 1, &tape->avg_speed, NULL); | 4585 | ide_add_setting(drive, "avg_speed", SETTING_READ, TYPE_INT, 0, 0xffff, 1, 1, &tape->avg_speed, NULL); |
4584 | ide_add_setting(drive, "debug_level",SETTING_RW, -1, -1, TYPE_INT, 0, 0xffff, 1, 1, &tape->debug_level, NULL); | 4586 | ide_add_setting(drive, "debug_level", SETTING_RW, TYPE_INT, 0, 0xffff, 1, 1, &tape->debug_level, NULL); |
4585 | } | 4587 | } |
4588 | #else | ||
4589 | static inline void idetape_add_settings(ide_drive_t *drive) { ; } | ||
4590 | #endif | ||
4586 | 4591 | ||
4587 | /* | 4592 | /* |
4588 | * ide_setup is called to: | 4593 | * ide_setup is called to: |
@@ -4703,7 +4708,7 @@ static void ide_tape_remove(ide_drive_t *drive) | |||
4703 | { | 4708 | { |
4704 | idetape_tape_t *tape = drive->driver_data; | 4709 | idetape_tape_t *tape = drive->driver_data; |
4705 | 4710 | ||
4706 | ide_unregister_subdriver(drive, tape->driver); | 4711 | ide_proc_unregister_driver(drive, tape->driver); |
4707 | 4712 | ||
4708 | ide_unregister_region(tape->disk); | 4713 | ide_unregister_region(tape->disk); |
4709 | 4714 | ||
@@ -4730,8 +4735,7 @@ static void ide_tape_release(struct kref *kref) | |||
4730 | kfree(tape); | 4735 | kfree(tape); |
4731 | } | 4736 | } |
4732 | 4737 | ||
4733 | #ifdef CONFIG_PROC_FS | 4738 | #ifdef CONFIG_IDE_PROC_FS |
4734 | |||
4735 | static int proc_idetape_read_name | 4739 | static int proc_idetape_read_name |
4736 | (char *page, char **start, off_t off, int count, int *eof, void *data) | 4740 | (char *page, char **start, off_t off, int count, int *eof, void *data) |
4737 | { | 4741 | { |
@@ -4749,11 +4753,6 @@ static ide_proc_entry_t idetape_proc[] = { | |||
4749 | { "name", S_IFREG|S_IRUGO, proc_idetape_read_name, NULL }, | 4753 | { "name", S_IFREG|S_IRUGO, proc_idetape_read_name, NULL }, |
4750 | { NULL, 0, NULL, NULL } | 4754 | { NULL, 0, NULL, NULL } |
4751 | }; | 4755 | }; |
4752 | |||
4753 | #else | ||
4754 | |||
4755 | #define idetape_proc NULL | ||
4756 | |||
4757 | #endif | 4756 | #endif |
4758 | 4757 | ||
4759 | static int ide_tape_probe(ide_drive_t *); | 4758 | static int ide_tape_probe(ide_drive_t *); |
@@ -4773,7 +4772,9 @@ static ide_driver_t idetape_driver = { | |||
4773 | .end_request = idetape_end_request, | 4772 | .end_request = idetape_end_request, |
4774 | .error = __ide_error, | 4773 | .error = __ide_error, |
4775 | .abort = __ide_abort, | 4774 | .abort = __ide_abort, |
4775 | #ifdef CONFIG_IDE_PROC_FS | ||
4776 | .proc = idetape_proc, | 4776 | .proc = idetape_proc, |
4777 | #endif | ||
4777 | }; | 4778 | }; |
4778 | 4779 | ||
4779 | /* | 4780 | /* |
@@ -4864,7 +4865,7 @@ static int ide_tape_probe(ide_drive_t *drive) | |||
4864 | 4865 | ||
4865 | ide_init_disk(g, drive); | 4866 | ide_init_disk(g, drive); |
4866 | 4867 | ||
4867 | ide_register_subdriver(drive, &idetape_driver); | 4868 | ide_proc_register_driver(drive, &idetape_driver); |
4868 | 4869 | ||
4869 | kref_init(&tape->kref); | 4870 | kref_init(&tape->kref); |
4870 | 4871 | ||