Received: by 10.223.185.116 with SMTP id b49csp6382872wrg; Wed, 28 Feb 2018 08:30:34 -0800 (PST) X-Google-Smtp-Source: AG47ELuCdT/Y/r8zGHQZ85VvnqIBh4szvjM1CyCMfoqy0BDjxjkufiRVplPYlURrf4hxbRswGa6W X-Received: by 10.98.233.3 with SMTP id j3mr8504025pfh.38.1519835434432; Wed, 28 Feb 2018 08:30:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519835434; cv=none; d=google.com; s=arc-20160816; b=svASzWGJz89T7S722L2a4txXLP8EQnyl4LL1bVyEmf1hMgl1RIVlBfIfT43pY2s0RN vKec4H4yTgTv50wmqbzBg6lrpMZupKixq01DeIMGSZkzk6h4zpIAIEmCDuRiY8+M0oZY cK7Pkh/8oS8TARKIMlnXvMqoTnqD9WgKlLmgt6Pt046ccJ7GNxPmkiSOw+PYbGeUErWk JVAITlHFWUzmUXOtJt0PE9ByxNxVk3/Nf373uHyVe+DCDHBj2ECZlzsDF3bSltFpro95 sxIMUBIDT07jCwg94eDl+NI2a5Qstjjn5j8Uau0fLNFlu7+JxK9uRPrLssrwHnv7IVjb zFZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=FiQfLPaoyMwpbxkARhlac4+NlVoS48h/f/3l133kQBI=; b=yzvAdRlcOT9VADpg13TOGQ+a9BQYZNve/oRhjBZGQY4yo/4Y9gH7sI9qyqZ+qOhtaW nnZAc5GuNV1jocEB95sJb2qmnyuT7eH7bHJpZyoHEoQw7XDfj8gkpsPiGWXyIqGDfddB rNhc5J7BpvNXP8UVuiZmE92CKj+OLIht77rsBD2limPjPcBD7PRjb2hvWydOpNIIgpoI fVVb6OwgIWtOiXoJVdOKnYSkBIwNXEqwW8TN6qPF95my/vZtBv6p79CIdzcoKJnFddt1 8OA4iAdWVZwtWev32UW4j7e5JWTjcr2Vbn0dmRDjAJFlVP8WcYQx8cS2p5eJQdsXpcFs gorA== 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 x9-v6si1545552plw.160.2018.02.28.08.30.19; Wed, 28 Feb 2018 08:30:34 -0800 (PST) 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 S934911AbeB1Q21 (ORCPT + 99 others); Wed, 28 Feb 2018 11:28:27 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35190 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934855AbeB1QPg (ORCPT ); Wed, 28 Feb 2018 11:15:36 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yv-0006Xg-B5; Wed, 28 Feb 2018 15:22:33 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yd-0008NU-DD; Wed, 28 Feb 2018 15:22:15 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "=?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?=" , "Joonas Lahtinen" , "Daniel Vetter" , "Chris Wilson" , "Daniel Kurtz" , "Sean Paul" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 018/254] drm/i915: Don't try indexed reads to alternate slave addresses In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Ville Syrjälä commit ae5c631e605a452a5a0e73205a92810c01ed954b upstream. We can only specify the one slave address to indexed reads/writes. Make sure the messages we check are destined to the same slave address before deciding to do an indexed transfer. Cc: Daniel Kurtz Cc: Chris Wilson Cc: Daniel Vetter Cc: Sean Paul Fixes: 56f9eac05489 ("drm/i915/intel_i2c: use INDEX cycles for i2c read transactions") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171123194157.25367-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson (cherry picked from commit c4deb62d7821672265b87952bcd1c808f3bf3e8f) Signed-off-by: Joonas Lahtinen Signed-off-by: Ben Hutchings --- drivers/gpu/drm/i915/intel_i2c.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c @@ -448,6 +448,7 @@ static bool gmbus_is_index_read(struct i2c_msg *msgs, int i, int num) { return (i + 1 < num && + msgs[i].addr == msgs[i + 1].addr && !(msgs[i].flags & I2C_M_RD) && msgs[i].len <= 2 && (msgs[i + 1].flags & I2C_M_RD)); }