lkml.org 
[lkml]   [2002]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] aic7xxx bouncing over 4G
Date
I have an Adaptec AIC-7897 Ultra2 SCSI adapter on a system with 8G
of physical memory. The adapter is using bounce buffers when DMA'ing
to memory >4G because of a bug in the aic7xxx driver.

The problem is ahc_linux_get_memsize() returns an erroneous memory size
(i.e., shifts out the high-order bits) for configurations >4G and the
wrong dma mask is set by the caller. The following patch fixes the problem
by adding the needed cast.


--- linux-2.5.52/drivers/scsi/aic7xxx/aic7xxx_linux.c Sun Dec 15 18:07:54 2002
+++ nobounce/drivers/scsi/aic7xxx/aic7xxx_linux.c Fri Dec 20 16:08:11 2002
@@ -1156,7 +1156,7 @@
struct sysinfo si;

si_meminfo(&si);
- return (si.totalram << PAGE_SHIFT);
+ return ((uint64_t)si.totalram << PAGE_SHIFT);
}

/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:31    [W:1.860 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site