- remove (now obsolete) write_cache() from ide-disk.c. replace calls in
ide-disk.c with calls to ide_write_cache().
drivers/ide/ide-disk.c | 27 ++-------------------------
1 files changed, 2 insertions(+), 25 deletions(-)
diff -X /home/dwm/lib/ide-excludes -Nwupar
lk-2.6.11-rc2-bk5.a/drivers/ide/ide-disk.c
lk-2.6.11-rc2-bk5.b/drivers/ide/ide-disk.c
--- lk-2.6.11-rc2-bk5.a/drivers/ide/ide-disk.c 2005-01-28 11:27:46.000000000
-0600
+++ lk-2.6.11-rc2-bk5.b/drivers/ide/ide-disk.c 2005-01-28 11:36:52.000000000
-0600
@@ -765,29 +765,6 @@ static int set_nowerr(ide_drive_t *drive
return 0;
}
-static int write_cache(ide_drive_t *drive, int arg)
-{
- ide_task_t args;
- int err;
-
- if (!ide_id_has_flush_cache(drive->id))
- return 1;
-
- memset(&args, 0, sizeof(ide_task_t));
- args.tfRegister[IDE_FEATURE_OFFSET] = (arg) ?
- SETFEATURES_EN_WCACHE : SETFEATURES_DIS_WCACHE;
- args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SETFEATURES;
- args.command_type = IDE_DRIVE_TASK_NO_DATA;
- args.handler = &task_no_data_intr;
-
- err = ide_raw_taskfile(drive, &args, NULL);
- if (err)
- return err;
-
- drive->wcache = arg;
- return 0;
-}
-
static int do_idedisk_flushcache (ide_drive_t *drive)
{
ide_task_t args;
@@ -849,7 +826,7 @@ static void idedisk_add_settings(ide_dri
ide_add_setting(drive, "multcount", id ? SETTING_RW :
SETTING_READ, HDIO_GET_MULTCOUNT, HDIO_SET_MULTCOUNT,
TYPE_BYTE, 0, id ? id->max_multsect : 0, 1, 1,
&drive->mult_count, set_multcount);
ide_add_setting(drive, "nowerr", SETTING_RW,
HDIO_GET_NOWERR, HDIO_SET_NOWERR,
TYPE_BYTE, 0, 1, 1, 1,
&drive->nowerr, set_nowerr);
ide_add_setting(drive, "lun", SETTING_RW,
-1, -1,
TYPE_INT, 0, 7, 1, 1,
&drive->lun, NULL);
- ide_add_setting(drive, "wcache", SETTING_RW,
HDIO_GET_WCACHE, HDIO_SET_WCACHE,
TYPE_BYTE, 0, 1, 1, 1,
&drive->wcache, write_cache);
+ ide_add_setting(drive, "wcache", SETTING_RW,
HDIO_GET_WCACHE, HDIO_SET_WCACHE,
TYPE_BYTE, 0, 1, 1, 1,
&drive->wcache, ide_write_cache);
ide_add_setting(drive, "acoustic", SETTING_RW,
HDIO_GET_ACOUSTIC, HDIO_SET_ACOUSTIC,
TYPE_BYTE, 0, 254, 1, 1,
&drive->acoustic, set_acoustic);
ide_add_setting(drive, "failures", SETTING_RW,
-1, -1,
TYPE_INT, 0, 65535, 1, 1,
&drive->failures, NULL);
ide_add_setting(drive, "max_failures", SETTING_RW,
-1, -1,
TYPE_INT, 0, 65535, 1, 1,
&drive->max_failures, NULL);
@@ -1083,7 +1060,7 @@ static void idedisk_setup (ide_drive_t *
if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5)))
drive->wcache = 1;
- write_cache(drive, (BLK_DEV_HDWC ? drive->wcache : 1));
+ ide_write_cache(drive, (BLK_DEV_HDWC ? drive->wcache : 1));
/*
* We must avoid issuing commands a drive does not understand
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html