aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r--drivers/ide/ide-disk.c66
1 files changed, 32 insertions, 34 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 119063470820..01846f244b40 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -575,11 +575,8 @@ static int set_nowerr(ide_drive_t *drive, int arg)
575 if (arg < 0 || arg > 1) 575 if (arg < 0 || arg > 1)
576 return -EINVAL; 576 return -EINVAL;
577 577
578 if (ide_spin_wait_hwgroup(drive))
579 return -EBUSY;
580 drive->nowerr = arg; 578 drive->nowerr = arg;
581 drive->bad_wstat = arg ? BAD_R_STAT : BAD_W_STAT; 579 drive->bad_wstat = arg ? BAD_R_STAT : BAD_W_STAT;
582 spin_unlock_irq(&ide_lock);
583 return 0; 580 return 0;
584} 581}
585 582
@@ -702,33 +699,34 @@ static int set_addressing(ide_drive_t *drive, int arg)
702 return 0; 699 return 0;
703} 700}
704 701
702ide_devset_rw(acoustic, acoustic);
703ide_devset_rw(address, addressing);
704ide_devset_rw(multcount, multcount);
705ide_devset_rw(wcache, wcache);
706
707ide_devset_rw_sync(nowerr, nowerr);
708
705#ifdef CONFIG_IDE_PROC_FS 709#ifdef CONFIG_IDE_PROC_FS
706ide_devset_rw_nolock(acoustic, 0, 254, acoustic); 710ide_devset_rw_field(bios_cyl, bios_cyl);
707ide_devset_rw_nolock(address, 0, 2, addressing); 711ide_devset_rw_field(bios_head, bios_head);
708ide_devset_rw_nolock(multcount, 0, 16, multcount); 712ide_devset_rw_field(bios_sect, bios_sect);
709ide_devset_rw_nolock(nowerr, 0, 1, nowerr); 713ide_devset_rw_field(failures, failures);
710ide_devset_rw_nolock(wcache, 0, 1, wcache); 714ide_devset_rw_field(lun, lun);
711 715ide_devset_rw_field(max_failures, max_failures);
712ide_devset_rw(bios_cyl, 0, 65535, bios_cyl); 716
713ide_devset_rw(bios_head, 0, 255, bios_head); 717static const struct ide_proc_devset idedisk_settings[] = {
714ide_devset_rw(bios_sect, 0, 63, bios_sect); 718 IDE_PROC_DEVSET(acoustic, 0, 254),
715ide_devset_rw(failures, 0, 65535, failures); 719 IDE_PROC_DEVSET(address, 0, 2),
716ide_devset_rw(lun, 0, 7, lun); 720 IDE_PROC_DEVSET(bios_cyl, 0, 65535),
717ide_devset_rw(max_failures, 0, 65535, max_failures); 721 IDE_PROC_DEVSET(bios_head, 0, 255),
718 722 IDE_PROC_DEVSET(bios_sect, 0, 63),
719static const struct ide_devset *idedisk_settings[] = { 723 IDE_PROC_DEVSET(failures, 0, 65535),
720 &ide_devset_acoustic, 724 IDE_PROC_DEVSET(lun, 0, 7),
721 &ide_devset_address, 725 IDE_PROC_DEVSET(max_failures, 0, 65535),
722 &ide_devset_bios_cyl, 726 IDE_PROC_DEVSET(multcount, 0, 16),
723 &ide_devset_bios_head, 727 IDE_PROC_DEVSET(nowerr, 0, 1),
724 &ide_devset_bios_sect, 728 IDE_PROC_DEVSET(wcache, 0, 1),
725 &ide_devset_failures, 729 { 0 },
726 &ide_devset_lun,
727 &ide_devset_max_failures,
728 &ide_devset_multcount,
729 &ide_devset_nowerr,
730 &ide_devset_wcache,
731 NULL
732}; 730};
733#endif 731#endif
734 732
@@ -1001,11 +999,11 @@ static int idedisk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
1001} 999}
1002 1000
1003static const struct ide_ioctl_devset ide_disk_ioctl_settings[] = { 1001static const struct ide_ioctl_devset ide_disk_ioctl_settings[] = {
1004{ HDIO_GET_ADDRESS, HDIO_SET_ADDRESS, get_addressing, set_addressing }, 1002{ HDIO_GET_ADDRESS, HDIO_SET_ADDRESS, &ide_devset_address },
1005{ HDIO_GET_MULTCOUNT, HDIO_SET_MULTCOUNT, get_multcount, set_multcount }, 1003{ HDIO_GET_MULTCOUNT, HDIO_SET_MULTCOUNT, &ide_devset_multcount },
1006{ HDIO_GET_NOWERR, HDIO_SET_NOWERR, get_nowerr, set_nowerr }, 1004{ HDIO_GET_NOWERR, HDIO_SET_NOWERR, &ide_devset_nowerr },
1007{ HDIO_GET_WCACHE, HDIO_SET_WCACHE, get_wcache, set_wcache }, 1005{ HDIO_GET_WCACHE, HDIO_SET_WCACHE, &ide_devset_wcache },
1008{ HDIO_GET_ACOUSTIC, HDIO_SET_ACOUSTIC, get_acoustic, set_acoustic }, 1006{ HDIO_GET_ACOUSTIC, HDIO_SET_ACOUSTIC, &ide_devset_acoustic },
1009{ 0 } 1007{ 0 }
1010}; 1008};
1011 1009