Date: Mon, 20 Apr 1998 10:44:25 -0600 From: "Justin T. Gibbs" <gibbs@plutotech.com> To: Peter Wemm <peter@netplex.com.au> Cc: gibbs@FreeBSD.ORG, scsi@FreeBSD.ORG Subject: Re: New CAM w/ buslogic doesn't do bounce buffers correctly.. Message-ID: <199804201648.KAA27912@pluto.plutotech.com> In-Reply-To: Your message of "Mon, 20 Apr 1998 21:36:41 %2B0800." <199804201336.VAA04663@spinner.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
>It seems that when bt_ccb's are allocated, the dmamap pointer isn't >initialized, so it stays null. This causes a few things to hit a fatal >trap at first call since map == NULL isn't checked in a few critical >places (bus_dmamap_load for starters). add_bounce_page() doesn;'t work if >the map = NULL -> map = &nobounce_dmamap conversion happens since the >bpages SLIST isn't initialized there either. The idea was that a NULL map meant that bouncing wasn't possible. Because of coding flaws in the bt driver where the map wasn't initialized, this "heuristic" didn't work for your cards. I've changed the bus dma code to explicitly set maps to the nobounce map instead of relying on NULL. >At a guess, it should be set pointing to the instance of the >containing page's sg->sg_dmamap. so, perhaps >+ new_ccb->dmamap = sg->sg_dmamap? Nope. It needs to be allocating a new dmamap for each CCB that can occur concurrently using the bt->buffer_dmat. > do { >[..] > if (map->pagesneeded != 0 && run_filter(dmat, paddr)) { > paddr = add_bounce_page(dmat, map, vaddr, size); > } >[..] > >And add_bounce_page() does: You should never get to either of these locations if bouncing is not required. >In the instance where map = &nobounce_dmamap, the STAILQ_INSERT_TAIL() >faults since the bpages list is never intialised. Which is a good thing because it's a bug if any bounce pages are added to the nobounce_dmamap. It's only a place holder. >Cheers, >-Peter >-- >Peter Wemm <peter@netplex.com.au> Netplex Consulting -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804201648.KAA27912>