public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PRD_ENTRIES is 256
@ 2004-02-25  9:53 William Lee Irwin III
  2004-02-25 13:11 ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 4+ messages in thread
From: William Lee Irwin III @ 2004-02-25  9:53 UTC (permalink / raw)
  To: B.Zolnierkiewicz; +Cc: linux-kernel

PRD_ENTRIES is specified to be precisely 256; on platforms where
PAGE_SIZE varies from 4KB the calculation in the current expression
defining it is inaccurate, which may cause crashes. This patch changes
it to the constant literal 256.


-- wli


===== include/linux/ide.h 1.88 vs edited =====
--- 1.88/include/linux/ide.h	Tue Feb 10 07:35:39 2004
+++ edited/include/linux/ide.h	Wed Feb 25 01:46:45 2004
@@ -224,7 +224,7 @@
  * allowing each to have about 256 entries (8 bytes each) from this.
  */
 #define PRD_BYTES       8
-#define PRD_ENTRIES     (PAGE_SIZE / (2 * PRD_BYTES))
+#define PRD_ENTRIES     256
 
 /*
  * Some more useful definitions

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-25 16:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-25  9:53 PRD_ENTRIES is 256 William Lee Irwin III
2004-02-25 13:11 ` Bartlomiej Zolnierkiewicz
2004-02-25 13:18   ` William Lee Irwin III
2004-02-25 16:15   ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox