Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754130AbcDSMyJ (ORCPT ); Tue, 19 Apr 2016 08:54:09 -0400 Received: from mga03.intel.com ([134.134.136.65]:9882 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752861AbcDSMyH (ORCPT ); Tue, 19 Apr 2016 08:54:07 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,506,1455004800"; d="asc'?scan'208";a="948352808" From: Felipe Balbi To: David Woodhouse , Vinod Koul Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [RFC] DMA initialization for manually created devices In-Reply-To: <1461068047.3765.97.camel@infradead.org> References: <87bn55esm6.fsf@intel.com> <1461068047.3765.97.camel@infradead.org> User-Agent: Notmuch/0.21+96~g9bbc54b (http://notmuchmail.org) Emacs/25.0.90.3 (x86_64-pc-linux-gnu) Date: Tue, 19 Apr 2016 15:52:06 +0300 Message-ID: <871t61ep6x.fsf@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1865 Lines: 54 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, David Woodhouse writes: > On Tue, 2016-04-19 at 14:38 +0300, Felipe Balbi wrote: >>=20 >> The reason for that I'm using a manually created platform_device and >> that misses dev->archdata which the underlying/parent PCI device has. > > Typically we'd expect you to use the parent device for DMA, as in your > second option. > > That said, we're exploring the option of moving the dma_ops to be a > first-class member of 'struct device' instead of hiding it in archdata, > and cleaning up the way that it gets initialised for newly-created > devices. And at that point we might end up letting it get inherited > from the parent so your original code *would* work... but I wouldn't > hold your breath for that. > > Definitely *don't* mess around in archdata. alright, I'll patch it up to use parent device everywhere, at least for now. Thanks =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXFin2AAoJEIaOsuA1yqREB50P/3e7EyUh7n0AHyuGse3iFpOv IuH47Q+R7tUPGmjsQ+mRvYlpmGDxvG9Tueq4bL4abk7U5HvafAdyhlR3nPXY65vB dhVaNSOPZW6G4T4xfKxT+bEGbd9XYiwIteb8K9nXXXWlvGI9Z9ttT3/DLq4gtynP dxJuyPHQKeAVgledcRAXGVsXHNexnXDc4WLBCeelN8QCI7TkzmygBOECwyFNy6wo H9FpFbGfkT3jQ0GWiRNBIqib2eUd7JRGtf/0QFZMazlL+wCQrcJTuwSuKERR+/0z DuzPXpwJgr2zSVIDQ0UlRuZ2+JlxTVGEcdRM8OgeDpL/dhooDGl8eiXDTlHa8q78 5FXrP6lbfmrQB5nHI5olPXLyFIZazbyO2g4XiNE9cHsCGtEhX3t7n9uFqSK5e4iA /qvwf12/FaeTLUQbc37Wwg+2GPwIhN8gOEgpTvFXJ0CQ37YwmXniki5cscE9pHxC 6d5ArSbdfVRA7/s8LeCYlENEFZ8bXGXmavuMvgqcZ3PqB1R9W2YithkqctDPu8JH 7Jd1kKxoNl2FITHxL+maz+LL+2kbOHf2rLtPM4HEeQ0cdzNmKSPStaXKT9UpxgDP Bh/mzeIYuaIe2dHPN3CHQfzAEWPi3l+YxxB6lJwh9A3ttmKAf4d0zFdvQKEPsBgM AvEuhJXd0RuwvKgM4tA2 =rqNB -----END PGP SIGNATURE----- --=-=-=--