]> git.hungrycats.org Git - linux/commit
[PATCH] ide-disk.c: more write cache fixes
authorBartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl>
Sat, 15 May 2004 04:01:48 +0000 (21:01 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 15 May 2004 04:01:48 +0000 (21:01 -0700)
commit7e33820d9017521a3513f0a3c715f63c2cb386f1
tree49d7ec5b2e65e9a0d9e9ca3bd0c36f3d77e956c3
parentab9e69a33b25cd34d547d05806e04dc69a62cb38
[PATCH] ide-disk.c: more write cache fixes

- many Maxtor disks incorrectly claim CACHE FLUSH EXT command support,
  fix it by checking both CACHE FLUSH EXT command and LBA48 support
  (thanks to Eric D. Mudama for help in fixing this)

- write_cache() was called with 'drive->id->cfs_enable_2 & 0x3000' as 'int arg'
  argument which was always truncated to zero due to 'u8 drive->wcache = arg'
  assignment so write cache was indeed enabled but drive->wcache was zero
  (thanks to Rene Herman for help in debugging this)

- flush cache in idedisk_start_power_step() only if ATA-6 CACHE FLUSH (EXT)
  bits are present in disk's identify data (prevents sending unknown commands)

- set drive->wcache in idedisk_setup() not idedisk_attach() (no need to check
  id->command_set_2 - we check id->cfs_enable_2 instead in write_cache() call)

- use ide_cacheflush_p() in idedisk_setup()

- minor cleanups
drivers/ide/ide-disk.c