Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Apr 2002 11:08:29 -0800 (PST)
From:      Matthew Jacob <mjacob@feral.com>
To:        Andrew Gallatin <gallatin@cs.duke.edu>
Cc:        hackers@freebsd.org
Subject:   Re: BUS_SPACE_MAXSIZE & isp driver.
Message-ID:  <Pine.BSF.4.21.0204041105070.78599-100000@beppo>
In-Reply-To: <Pine.BSF.4.21.0204041058010.78599-100000@beppo>

next in thread | previous in thread | raw e-mail | index | archive | help

*argh* 

Moved to hackers...

[
Original mail from Drew:

I just booted a recent current (or rather attempted to) and saw this
when attempting to mount root from a qlogic card on my miata:


bus_dmamap_load: Too many segs! buf_len = 0x2000
spec_getpages:(da0a) I/O read failure: (error=22) bp
0xfffffe0004087ae8 vp 0xfffffe000ae90000
               size: 98304, resid: 98304, a_count: 98304, valid: 0x0
               nread: 0, reqpage: 7, pindex: 59, pcount: 12
vm_fault: pager read error, pid 1 (init)

<... more of same ...>

The only way I could get the system to boot was to increase
BUS_SPACE_MAXSIZE to 128K to match MAXPHYS.  I don't know why they
don't match in the first place (they don't match on x86 either, so the
driver will probably puke there too.)

#define BUS_SPACE_MAXSIZE    (128 * 1024)

Does anybody know why BUS_SPACE_MAXSIZE != MAXPHYS on some platforms?

Thanks,

]


The actual define that was left working in isp_pci.c was already

#define ISP_NSEGS ((BUS_SPACE_MAXSIZE / PAGE_SIZE) + 1) 

which is copied from:

#define BUS_DMAMAP_NSEGS ((BUS_SPACE_MAXSIZE / PAGE_SIZE) + 1)

in all the busdma_machdep implementations.

I'm now very confused. How could this:

#ifdef __GNUC__
        bus_dma_segment_t       dm_segments[dmat->nsegments];
#else
        bus_dma_segment_t       dm_segments[BUS_DMAMAP_NSEGS];
#endif

ever be expected to be correct for non __GNUC__

???

-matt



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0204041105070.78599-100000>