* [patch ide-dev 6/9] check capacity in ide_task_init_flush()
@ 2005-02-24 14:44 Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-02-24 14:44 UTC (permalink / raw)
To: linux-ide, linux-kernel; +Cc: Tejun Heo
Use WIN_FLUSH_CACHE_EXT only if disk requires LBA48.
diff -Nru a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
--- a/drivers/ide/ide-io.c 2005-02-23 20:58:16 +01:00
+++ b/drivers/ide/ide-io.c 2005-02-23 20:58:16 +01:00
@@ -61,7 +61,8 @@
memset(task, 0, sizeof(*task));
- if (ide_id_has_flush_cache_ext(drive->id)) {
+ if (ide_id_has_flush_cache_ext(drive->id) &&
+ (drive->capacity64 >= (1UL << 28))) {
tf->command = WIN_FLUSH_CACHE_EXT;
tf->flags |= ATA_TFLAG_LBA48;
} else
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch ide-dev 6/9] check capacity in ide_task_init_flush()
@ 2005-03-04 8:52 Chuck Ebbert
0 siblings, 0 replies; 2+ messages in thread
From: Chuck Ebbert @ 2005-03-04 8:52 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel, Tejun Heo
On Thu, 24 Feb 2005 at 15:44:34, Bartlomiej Zolnierkiewicz wrote:
> --- a/drivers/ide/ide-io.c 2005-02-23 20:58:16 +01:00
> +++ b/drivers/ide/ide-io.c 2005-02-23 20:58:16 +01:00
> @@ -61,7 +61,8 @@
>
> memset(task, 0, sizeof(*task));
>
> - if (ide_id_has_flush_cache_ext(drive->id)) {
> + if (ide_id_has_flush_cache_ext(drive->id) &&
> + (drive->capacity64 >= (1UL << 28))) {
^^
------------------------------>||
> tf->command = WIN_FLUSH_CACHE_EXT;
> tf->flags |= ATA_TFLAG_LBA48;
> } else
Shouldn't that be ">" ???
Either that or this code from ide-disk is wrong:
/* limit drive capacity to 137GB if LBA48 cannot be used */
if (drive->addressing == 0 && drive->capacity64 > 1ULL << 28) {
printk(KERN_WARNING "%s: cannot use LBA48 - full capacity "
"%llu sectors (%llu MB)\n",
drive->name, (unsigned long long)drive->capacity64,
sectors_to_MB(drive->capacity64));
drive->capacity64 = 1ULL << 28;
}
--
Chuck
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-04 9:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-24 14:44 [patch ide-dev 6/9] check capacity in ide_task_init_flush() Bartlomiej Zolnierkiewicz
2005-03-04 8:52 Chuck Ebbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).