aic7xxx compile failure
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
Quoted 2 lines
Several people have reported compile failures due to this code in
aic7xxx_osm.c:
Look at the latest drop from my site. I removed this code last week, but postponed releasing another driver drop until I could untangle the mess in the 2.4.X tree.
http://people.FreeBSD.org/~gibbs/linux/SRC/
--
Justin