Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp925629imm; Thu, 6 Sep 2018 12:18:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZo/cBdmkgWsP2+E/UDUSVvV5KHjkgkmkJhFNj39MM5Du4qaeP4kg8L+7EOhFemR7ut0qxD X-Received: by 2002:a63:5f01:: with SMTP id t1-v6mr4430505pgb.149.1536261521307; Thu, 06 Sep 2018 12:18:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536261521; cv=none; d=google.com; s=arc-20160816; b=RPdjpSsuTrWbwhvQpZEwVY+7SsYBnKID4CglduxZzL6ajGDAJxr2fFptjr7z4x6eot HS6Mfz94ic4kvvLYwfpZBwrJriCYqBzs5lPin7E/EPix9rBN7ki884Impw6nZiaFpYP/ v0TQtDWkjATimHO7Wofn81/5mWSyLULc7VPfV/rnkIqxiwNrDedVLaII1Zw0V/ZgEfdN uimCV+Kj+RGPZ2FlIxSYhsh270lyvtUKZ3a0eH9ljrUlwXbI8IrTvPJDUlV/ovWQYRs/ fOVSzVhORMkLrJCvT4GO7VOl3QLmp2qwSZNumphECfyzOSHE8NkR6xOciP81Ic381qZm Z/mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=i2g0T2EbTMEwCPKkfyKiIgQpN+o/UUbZymtjz0q96Lc=; b=EM5ehwUV7+GdIUikl5HeDkHKSBkGGBk/SSh0UNhCEiafIKsk2t1z4xwATeNmt8kfGm 4suEeu19d6aio05LZ50Ls1/UO88xlh5cBGRpbOOe5A3+Vksrd1ImONUlpu5k9p8i37nP tWPewerwtfiA0tcTpTfZPJcq9pCjIbbLOIiz1gd8cMAaT3DPpbltmcBsix7JG5dQab66 ZfHxwt3hLuiE2xOyVuCjnbVIGHvyUl7t7aLLeQzHFwVNln7F+NpigyEvh/eqXwP2USw+ K4thvdSgi6oWz4R91iy5yyuGfHfppfmysaXb06lTk8nZkT0HLuEZcvAu8ZN1MEifbDQC YF6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u20-v6si6280485pgj.443.2018.09.06.12.18.25; Thu, 06 Sep 2018 12:18:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729925AbeIFSVi (ORCPT + 99 others); Thu, 6 Sep 2018 14:21:38 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:46271 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729233AbeIFSVh (ORCPT ); Thu, 6 Sep 2018 14:21:37 -0400 Received: by mail-qk1-f193.google.com with SMTP id j7-v6so7301100qkd.13; Thu, 06 Sep 2018 06:45:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i2g0T2EbTMEwCPKkfyKiIgQpN+o/UUbZymtjz0q96Lc=; b=D+m79WwaURigaYHOsdQ/T6aiK01nCokXPK/bkD6TBxRP+eplys+HykGMcHJ5M2zsgb UPxIulROoFGkQapmoyPZ6JcMeU46ufn2pZCAMC/emVPlKzZZvQ6jHX4hTAMaSyC/W+2W p9PkZAFmzKsWvG+Hf6bi+dM0+S+JJYciUXqlAKDcNyh90uHsanLzlUQkEy7o7RA3wqxk F2oimBK4wEwrpdnINfDzpc5mP+nLsrsHne8w7da7Dqwzk4ZAXu7FVwcUqLuW8CIV6p7s eQZbPQQBC4GHdDnJh8AnB6kA/pS742boKmAL1as6EIpkASicuPD9er2p96IkvGTinGnx fCBw== X-Gm-Message-State: APzg51ChbMX8JEeCVnS5J2JnKvO75PGvIX3KdqN2ReL+Mux9MBzmcmy5 5zeDPt8/ZNAwqRxI0OSSzCm/vyUXsS5D/7VDJsg= X-Received: by 2002:a37:6b03:: with SMTP id g3-v6mr2061403qkc.107.1536241558740; Thu, 06 Sep 2018 06:45:58 -0700 (PDT) MIME-Version: 1.0 References: <20180719152930.3715-1-boris.brezillon@bootlin.com> <20180719152930.3715-2-boris.brezillon@bootlin.com> <20180824143934.6d6b6487@bbrezillon> <20180824201600.7d80bca9@bbrezillon> <20180828140209.29155d00@bbrezillon> <4DBE768F-3CDC-41BE-9CC8-E294E7277CB1@cadence.com> <8abfb007-d755-36a4-5960-fddd61d04aa2@synopsys.com> <3D2681D9-1ACC-42FF-9FAB-D86B3C689003@cadence.com> <9584757a-e7e2-5bfe-fc2c-e9bc14ad65a8@synopsys.com> <25862F03-9823-42B0-87AC-AE36D7E9C780@cadence.com> <20180906151437.4259d6fc@bbrezillon> <20180906152055.5618d235@bbrezillon> In-Reply-To: <20180906152055.5618d235@bbrezillon> From: Arnd Bergmann Date: Thu, 6 Sep 2018 15:45:41 +0200 Message-ID: Subject: Re: [PATCH v6 01/10] i3c: Add core I3C infrastructure To: Boris Brezillon Cc: Przemyslaw Gaj , Vitor Soares , "open list:GPIO SUBSYSTEM" , Sekhar Nori , Wolfram Sang , Linux I2C , Jonathan Corbet , "open list:DOCUMENTATION" , gregkh , Przemyslaw Sroka , Arkadiusz Golec , Alan Douglas , Bartosz Folta , Damian Kos , Alicja Jurasik-Urbaniak , Cyprian Wronka , Suresh Punnoose , Rafal Ciepiela , Thomas Petazzoni , Nishanth Menon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , DTML , Linux Kernel Mailing List , Geert Uytterhoeven , Linus Walleij , Xiang Lin , Peter Rosin Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 6, 2018 at 3:21 PM Boris Brezillon wrote: > > On Thu, 6 Sep 2018 15:14:37 +0200 > Boris Brezillon wrote: > > When a master is not in control of the bus, it gets informed of devices > > present on the bus by monitoring DAA or DEFSLVS broadcast events. That > > means the secondary master should populate the bus with I3C/I2C devices > > on such events, but that's not enough, because DEFSLVS/DAA do not > > provide all device info. Some of them (like read/write/ibi limitations) > > require extra CCC commands, and, to send those CCC commands, the > > secondary master must claim the bus. We could add a case where we > > declare devices as partially discovered until the master acquires > > ownership of the bus, but that means part of the data returned by > > i3c_device_get_info() will be inaccurate, which might have an impact on > > some i3c driver ->probe() functions. > > Hm, one possible solution would be to register partially discovered > devices to the device model and let i3c_device_get_info() claim the bus > and request missing data when needed. This way, if the driver needs to > call i3c_device_get_info() in its probe path, it should work just fine. I guess you could also call i3c_device_get_info() in the common i3c_probe() function before calling into the driver. However, either way, we may still have a problem here: if the current master decides not to hand over master access to us at all, the probe() function will be blocked indefinitely, and that may stop us from probing other devices later on, or hang the module loader (depending on what context that probe() is called from). Using a timeout here could avoid the hang, but leads to other potential issues, e.g. how to decide whether to retry the probe later. Arnd