Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jan 2014 22:32:12 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Zbigniew Bodek <zbb@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r260165 - head/sys/dev/ahci
Message-ID:  <20140101203212.GF59496@kib.kiev.ua>
In-Reply-To: <201401012026.s01KQ8KU017949@svn.freebsd.org>
References:  <201401012026.s01KQ8KU017949@svn.freebsd.org>

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

--AOH7EoHA/zJSUDBX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 01, 2014 at 08:26:08PM +0000, Zbigniew Bodek wrote:
> Author: zbb
> Date: Wed Jan  1 20:26:08 2014
> New Revision: 260165
> URL: http://svnweb.freebsd.org/changeset/base/260165
>=20
> Log:
>   Use only mapped BIOs on ARM
>  =20
>   Using unmapped BIOs causes failure inside bus_dmamap_sync, since
>   this function requires valid MVA address, which is not present
>   if mapping is not set up.
>  =20
>   Submitted by:	Wojciech Macek <wma@semihalf.com>
>   Obtained from:	Semihalf
>=20
> Modified:
>   head/sys/dev/ahci/ahci.c
>=20
> Modified: head/sys/dev/ahci/ahci.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/dev/ahci/ahci.c	Wed Jan  1 20:22:29 2014	(r260164)
> +++ head/sys/dev/ahci/ahci.c	Wed Jan  1 20:26:08 2014	(r260165)
> @@ -3066,7 +3066,15 @@ ahciaction(struct cam_sim *sim, union cc
>  		if (ch->caps & AHCI_CAP_SPM)
>  			cpi->hba_inquiry |=3D PI_SATAPM;
>  		cpi->target_sprt =3D 0;
> +#ifdef __arm__
> +		/*
> +		 * Do not use unmapped buffers on ARM. Doing so will cause
> +		 * failure inside bus_dmamap_sync due to lack of VA.
> +		 */
> +		cpi->hba_misc =3D PIM_SEQSCAN;
> +#else
>  		cpi->hba_misc =3D PIM_SEQSCAN | PIM_UNMAPPED;
> +#endif
>  		cpi->hba_eng_cnt =3D 0;
>  		if (ch->caps & AHCI_CAP_SPM)
>  			cpi->max_target =3D 15;

I think this is wrong. If bus_dmamap_sync(9) is not functional on arm,
then unmapped io should be disabled on arm unconditionally, using
unmapped_buf_allowed.  Why ahci(4) is special in this regard, leaving
other controllers broken for arm ?

--AOH7EoHA/zJSUDBX
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQIcBAEBAgAGBQJSxHtLAAoJEJDCuSvBvK1Bp8EP/3z2qyRnqlHUrkn/meVxGaov
KE6HAh6BDjSGkPICCNEYarl2ZiOUUxplNiTx9M+k+L6dhHJND9SUOFd0t2t8MoET
/djiOoJLqmeZ65Rn0kh2ai0s1X9PrAQsf7eKiwPcykqvrfYUnYoQusoiFcYm50yb
LEBw20HpuABv63MfNC8zP50uw+aooI3JN3jMQkB+u090ZWQ/lyoeBeWJk49wrKHv
nV2di5Bb+wfkmFbc6ISiyWs0NC05v7cGJjsVYT77QVnivVvckERvMVKa8pTu+2QD
PgPYNddBF8mj+3oMErGyeBArGCXjsaapFDobPC8IJjdhkKxxXlfqXOohEFjhZdDh
4AFYCOVJU/pyPq4988s2DRjdkf/g6KmwqfwMPzQH+09dT4M4h2a4+iafJ9jdsS+H
hzZtDCi+WfOMLGxDpJSvP9S6HUAirDgNU7O9/TX3ATi3SLI2tvtCqx+C9/3uKc8M
9gEHToBmCEy8FZ7euGLTpcLNS3LCNK5ICiaeVBwr3JsjnQouHPR1z4+il31aW2JP
UyvFSvwwmcnEfnaSZeytncdT/UH4/CL6A+7ju+wJH1V7ZH2xUfp4Mwa8+Iq6/1ig
rEIMzB1l22v//k0VAL1XVQY6HBv02SmWxTRYOIMPmlDk/HT9EW1qjSYQ4PZHZX0z
MrNzqF2IKtQCIPTba0ro
=Y8m5
-----END PGP SIGNATURE-----

--AOH7EoHA/zJSUDBX--



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