From 632c6868f29e299d61ff47788966fda6aac82b2e Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Wed, 25 Feb 2004 20:49:45 -0800 Subject: [PATCH] [PATCH] explicitly define PRD_ENTRIES to 256 From: William Lee Irwin III 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. --- include/linux/ide.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/ide.h b/include/linux/ide.h index 44c824b50c3c9..d166358e626c8 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -224,7 +224,7 @@ typedef unsigned char byte; /* used everywhere */ * 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 -- 2.53.0