RE: Boot panic w/HEAD sources from ~4 hours ago. (amd related me

看板DFBSD_kernel作者時間21年前 (2004/10/21 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
Thanks, Matt. This patch gets my amd back in business. > -----Original Message----- > From: Matthew Dillon [mailto:dillon@apollo.backplane.com] > Sent: Tuesday, October 19, 2004 2:03 PM > To: Robin P. Blanchard > Cc: kernel@crater.dragonflybsd.org > Subject: Re: Boot panic w/HEAD sources from ~4 hours ago. > (amd related me thinks) > > Try this patch. The amd device was not creating the > dmamap, which is > necessary due to the delayed segments allocation. > > And yes, to Joerg: I agree that we have to back that > delayed-segments > allocation out and go back to allocating it when the tag > is created, > changing the nsegments argument for non-allocating tags to 0 and > conditionalizing the malloc. Sigh. > > Basically the problem is that FreeBSD has gone off on a > tangent with the > busdma architecture. They are adding hacks rather then > cleaning up the > mess they already have. We are definitely going to be > making some big > changes there. > > -Matt > > Index: amd.c > =================================================================== > RCS file: /cvs/src/sys/dev/disk/amd/amd.c,v retrieving > revision 1.5 diff -u -r1.5 amd.c > --- amd.c 17 Sep 2004 03:39:39 -0000 1.5 > +++ amd.c 19 Oct 2004 17:58:14 -0000 > @@ -2099,14 +2099,25 @@ > void > amd_linkSRB(struct amd_softc *amd) > { > - u_int16_t count, i; > + u_int16_t count, i; > struct amd_srb *psrb; > + int error; > > count = amd->SRBCount; > > for (i = 0; i < count; i++) { > psrb = (struct amd_srb *)&amd->SRB_array[i]; > psrb->TagNumber = i; > + > + /* > + * Create the dmamap. This is no longer optional! > + */ > + error = bus_dmamap_create(amd->buffer_dmat, 0, > &psrb->dmamap); > + if (error) { > + device_printf(amd->dev, "Error %d > creating buffer " > + "dmamap!\n", error); > + break; > + } > TAILQ_INSERT_TAIL(&amd->free_srbs, psrb, links); > } > } >
文章代碼(AID): #11TgVs00 (DFBSD_kernel)