From owner-svn-src-all@freebsd.org Mon Jun 3 16:31:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 272C015B64C8 for ; Mon, 3 Jun 2019 16:31:08 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 835A98918B for ; Mon, 3 Jun 2019 16:31:07 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1559579464; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=XNb1EOUL/JvWnM4HFt+g4gnkwbqosacSPv50gx/jfKyzJXkZLfPDcBMdTcVqj6Q5XP9j9kCzdDdez Xwd6r6gkk1AtxWPVMCMH5N0n+Tcl33w0AqypQzw8tU/I7OTgHPD0rnm5GUD4k11wnHtz7L3Rdln47h IOedrWKUpOJ4uDFwlsQk6On5lp05CF0mxl236jON4ghl6IXMEi0AyyVln9Jjj9pwvePx6Bvi+dL5Hl IfpssNylRySnvaj4LFkNvuK1iYEIrLcCUMPLvSBMnnmOjDkHS3hA+pUc9N1hBZNBWQZ+gvAX/UbIZ5 d8f0OdApYxxOXancK7giSRs6AkOutOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=fPW7oxX55LoL0E1QRCGh6oYHZcl3KT3aSw1i8ft7q3c=; b=ZwqnT0oICvPaiOS+8ty4vrbfB8VCRqbPQj4E7KdBUf/PB87bb8+0+bNJutO4mKoA6iHznrXvUNBCC J5DcapAbBH8dI2M30FjpzmuL6Q7DPKQig7CMgN1tx2GmueezFFbrdNWYjZBtSRy89XAxJ0mi9e/CMq 7dFynxaV024dJfzQiT81YX4A3XNVgki99wXpz9jgCIJrorQs+GV4k/iR/b7pZjrYA7YtU19E20VXrE Qn6xOD9RSKKnj0ctiM66RahYY0KClbZAWUpt+xYSf009pB3uFoQOJZDGII1heQvKJbrwXW4knPt7XU QHGwN7rIaIbdJW/B4/EGbOF0C7+ny+Q== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=fPW7oxX55LoL0E1QRCGh6oYHZcl3KT3aSw1i8ft7q3c=; b=o6vLMQ2qTvpmqskcjl9NdMoEJkBxXXhHW1wCQf9oxfkI1tiL0vMlyAbZYQIl9ETF/pfVFAVTQdShF 1wbTq1Nd72O2Qfs8jYwdsNCXj0nJvz4AhOQIufEezp6TmYZ0RqgApGjCiOrMebx7kcwvavcG0yswYe dYrrt97C8Hp/50fDiqnvGOWS/Uv2L9kcnTITxIZ3us2oiQvdwmgX1aSPS1mhpVhsOADijhuVlQa7a7 11EFP9o8zh66FnrVEhlXOc8fN9ZMTgzie40EBRYSX6Ncklaarw/dgEuc5ke5wNTImvazOx9d0VMT+5 Mag25NHqm1sy1hETfqe3n4EzRatTvPw== X-MHO-RoutePath: aGlwcGll X-MHO-User: f81f2188-861c-11e9-91aa-b56e4e6b5865 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id f81f2188-861c-11e9-91aa-b56e4e6b5865; Mon, 03 Jun 2019 16:31:01 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x53GUwlj056421; Mon, 3 Jun 2019 10:30:58 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <68e39f5f8b18569a406ec6bafe8d60fbe9e6d87f.camel@freebsd.org> Subject: Re: svn commit: r348355 - head/sys/dev/iicbus From: Ian Lepore To: Andriy Gapon , Niclas Zeising , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Cc: jmd@freebsd.org Date: Mon, 03 Jun 2019 10:30:58 -0600 In-Reply-To: References: <201905290908.x4T98L89066643@repo.freebsd.org> <75cec0b83709f48bbd52e2444d7af17569093f60.camel@freebsd.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 835A98918B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jun 2019 16:31:08 -0000 On Mon, 2019-06-03 at 18:19 +0300, Andriy Gapon wrote: > On 03/06/2019 17:52, Ian Lepore wrote: > > Please don't. We still have a situation where nobody has shown a > > runtime failure at all. This build failure could be fixed by > > simply > > defining a do-nothing iicbus_set_nostop() function if a quick fix > > is > > needed. > > Well, I am quite certain that the run-time failure will follow after > the build > time failure is fixed. > > > Putting this nostop concept into code that is shared by many > > drivers is > > an abomination. We have exactly one driver that needs this > > functionality, so the right fix is to implement it wholly within > > that > > one driver. I'll put together a diff for that. > > That's true that we have just one such driver. > At the same time, the "no stop" (or rather, repeated start) behavior > makes more > sense. If stop+start between transfers are needed then that can be > done with > multiple calls to iicbus_transfer. If multiple messages are given to > iicbus_transfer, then it's reasonable to assume that a repeated > started is > wanted between them. But it would be a big change to review and, if > needed, fix > or tidy up all code that uses iicbus_transfer. So, > iicbus_set_nostop() could be > just a small step towards the bigger goal. > > But I really don't have a strong opinion. > Fixing drm2 directly is just as good for me as iicbus_set_nostop. > I agree with you that the freebsd iic stuff is a Big Mess, poorly designed. But it is what it is, we can't change things now without breaking every out-of-tree driver in the world (and I know for sure they exist, because we have some at $work). So we're stuck with explicitly setting NOSTOP flags in iic_msg descriptors even though it would be sensible to assume NOSTOP on all but the last one. Anyway, the bad news is I mis-remembered how the iicbb interface and driver are structured. The hook point I wanted isn't there, making it hard to put the fix I was picturing in the intel_iic code. I'd still like to think of a better fix, but it's going to take more than a few minutes. So I guess we'd better go with your fix to get things working right away. If I can think up something more elegant we can always switch to it later. -- Ian