* aic7xxx compile failure
@ 2003-05-20 21:43 James Bottomley
2003-05-20 21:52 ` Justin T. Gibbs
0 siblings, 1 reply; 2+ messages in thread
From: James Bottomley @ 2003-05-20 21:43 UTC (permalink / raw)
To: gibbs; +Cc: wli, Stian Jordet, SCSI Mailing List
Several people have reported compile failures due to this code in
aic7xxx_osm.c:
if (sizeof(bus_addr_t) > 4
&& (ahc->flags & AHC_39BIT_ADDRESSING) != 0) {
/*
* Due to DAC restrictions, we can't
* cross a 4GB boundary.
*/
if ((addr ^ (addr + len - 1)) & ~0xFFFFFFFF) {
struct ahc_dma_seg *next_sg;
uint32_t next_len;
printf("Crossed Seg\n");
if ((scb->sg_count + 2) > AHC_NSEG)
panic("Too few segs for dma mapping. "
"Increase AHC_NSEG\n");
consumed++;
next_sg = sg + 1;
next_sg->addr = 0;
next_len = 0x100000000 - (addr & 0xFFFFFFFF);
len -= next_len;
next_len |= ((addr >> 8) + 0x1000000) & 0x7F000000;
next_sg->len = ahc_htole32(next_len);
}
len |= (addr >> 8) & 0x7F000000;
The main problem being the constant on line 767 is 33 bits wide and thus
too long for the computation.
My initial reaction is that obviously this should become zero minus to
keep everything within u32.
However, I note that the code is unnecessary anyway: both 2.4 and 2.5
will not let physical segment merging cross a 4GB boundary (in 2.5 the
boundary is settable, but defaults to 4GB). Could we just take this
out, please?
James
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-20 21:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-20 21:43 aic7xxx compile failure James Bottomley
2003-05-20 21:52 ` Justin T. Gibbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox