From: James Bottomley <James.Bottomley@steeleye.com>
To: gibbs@scsiguy.com
Cc: wli@holomorphy.com, Stian Jordet <liste@jordet.nu>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: aic7xxx compile failure
Date: 20 May 2003 16:43:58 -0500 [thread overview]
Message-ID: <1053467040.3784.6.camel@mulgrave> (raw)
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
next reply other threads:[~2003-05-20 21:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-20 21:43 James Bottomley [this message]
2003-05-20 21:52 ` aic7xxx compile failure Justin T. Gibbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1053467040.3784.6.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=gibbs@scsiguy.com \
--cc=linux-scsi@vger.kernel.org \
--cc=liste@jordet.nu \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox