Boot panic w/HEAD sources from ~4 hours ago. (amd related me thinks)
Robin P. Blanchard
robin.blanchard at gactr.uga.edu
Wed Oct 20 06:44:21 PDT 2004
Thanks, Matt.
This patch gets my amd back in business.
> -----Original Message-----
> From: Matthew Dillon [mailto:dillon at xxxxxxxxxxxxxxxxxxxx]
> Sent: Tuesday, October 19, 2004 2:03 PM
> To: Robin P. Blanchard
> Cc: kernel at xxxxxxxxxxxxxxxxxxxxxxx
> 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);
> }
> }
>
More information about the Kernel
mailing list