Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 2009 10:52:49 -0400
From:      "Alexandre \"Sunny\" Kovalenko" <gaijin.k@gmail.com>
To:        Jaakko Heinonen <jh@saunalahti.fi>
Cc:        Warren Block <wblock@wonkity.com>, freebsd-current@freebsd.org, Gonzalo Nemmi <gnemmi@gmail.com>, avg@FreeBSD.org, Thomas Quinot <thomas@freebsd.org>
Subject:   Re: core dump on kldload atapicam
Message-ID:  <1253631169.7895.2.camel@RabbitsDen>
In-Reply-To: <20090922115106.GA2856@a91-153-125-115.elisa-laajakaista.fi>
References:  <alpine.BSF.2.00.0909202116520.3416@lightning.wonkity.com> <19e9a5dc0909202237g1295b6d9hf69012745009eef4@mail.gmail.com> <20090921105458.GA86764@melamine.cuivre.fr.eu.org> <alpine.BSF.2.00.0909210723520.3607@wonkity.com> <20090922115106.GA2856@a91-153-125-115.elisa-laajakaista.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2009-09-22 at 14:51 +0300, Jaakko Heinonen wrote:
> On 2009-09-21, Warren Block wrote:
> > >> I can confirm that .. kldload atapicam still results in a "Fatal trap 12:
> > >> page fault while in kernel mode" on 8.0-RC1
> 
> The problem was introduced in r195534. Does the following patch work for
> you?
> 
> %%%
> Index: sys/dev/ata/atapi-cam.c
> ===================================================================
> --- sys/dev/ata/atapi-cam.c	(revision 197399)
> +++ sys/dev/ata/atapi-cam.c	(working copy)
> @@ -418,8 +418,10 @@ atapi_action(struct cam_sim *sim, union 
>  		break;
>  	    }
>  	}
> -	cpi->maxio = softc->ata_ch->dma.max_iosize ?
> -	    softc->ata_ch->dma.max_iosize : DFLTPHYS;
> +	if (softc->ata_ch != NULL && softc->ata_ch->dma.max_iosize != 0)
> +	    cpi->maxio = softc->ata_ch->dma.max_iosize;
> +	else
> +	    cpi->maxio = DFLTPHYS;
>  	ccb->ccb_h.status = CAM_REQ_CMP;
>  	xpt_done(ccb);
>  	return;
> %%%
> 
I can confirm that:

a) problem still exists in r197402
b) your patch (hand-applied) fixes it.

I have not done any extensive testing of the device apart from mounting,
unmounting and ejecting /dev/cd0.

Thank you very much for your help.

-- 
Alexandre Kovalenko (Олександр Коваленко)





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1253631169.7895.2.camel>