Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4226287imj; Tue, 12 Feb 2019 12:02:00 -0800 (PST) X-Google-Smtp-Source: AHgI3IbeSPxT6mPzTSqzo7i1BmoIfZAYNfWd2tFniDmDD7v2aj7qOb/ICHvNjdsBFK5MMzSwYAES X-Received: by 2002:a17:902:7608:: with SMTP id k8mr5533872pll.245.1550001720551; Tue, 12 Feb 2019 12:02:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550001720; cv=none; d=google.com; s=arc-20160816; b=ej4r8vIQuSSMDy+VamVy+/PJ8gIfkFLiNfAgQ4jhpcxxR5BgEWbTmWf9mJQe6CM0Q9 qzcnABlGPDXpSTzcku7Zctj1+H389YGF2ZM40o4ptO9/6qqWFD8xol7zKhtLyTVij5yu jNM0h9Nvaj9bXp+fCfUyhlyyIbgBU7Gj3oo5MliqP0eZ6eiuJ1EhjCIqXBhmZphbK33O G+bXimtTZvuiZhFw2CDCk+WqFgSgFnenp95nllx0dhVEmkObhXkYShRS0MInrqnIep3u /HKFKgLFy95AmRz6RSDjFfyMXgnuotFsCB04xrvl/5DyxI0daGaDxcAWMXcBj0elh6Tl 7H1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=iiQhzWWb/jKZV8rK6QC2pxZyMkeAc+VLBisMEvR/32g=; b=BiCUeK5S109Ju0NI6fJohVTi5U0EOlVrpyfrgBUdXg+b3T+1MAcrRBK8Ljs1+lbj8h OcCKtTnedu7zFdRs1WpoUiCn7E4h3FujVI+z2EmBSJXgxeP4xeWXaxX4qCLuqrQf7Jv+ zo2UshTngq0DiS97KQwieRnjhVtLxAbR6mX0qFW+8J+VP2t+QOq4Az4QBx1ZiiYPHk1M ooQArIYj9EEXI7L2M1gFB1x7cOVBZLB5QqSM0EohX/ryS2bXM9T/3zN7mr15X8f8xNhr 0Zx9jcihLVV425kTcWIokWUSEcGCYAHZiG3E7ArOLRKk/+bZKvHfHTYFgTq0TUrDHbFs K+vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=cjgDeV0C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si7503390pgd.395.2019.02.12.12.01.43; Tue, 12 Feb 2019 12:02:00 -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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=cjgDeV0C; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732209AbfBLTGy (ORCPT + 99 others); Tue, 12 Feb 2019 14:06:54 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:19468 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731328AbfBLTGv (ORCPT ); Tue, 12 Feb 2019 14:06:51 -0500 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 12 Feb 2019 11:06:51 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Tue, 12 Feb 2019 11:06:50 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Tue, 12 Feb 2019 11:06:50 -0800 Received: from HQMAIL102.nvidia.com (172.18.146.10) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 12 Feb 2019 19:06:49 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL102.nvidia.com (172.18.146.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 12 Feb 2019 19:06:49 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Tue, 12 Feb 2019 19:06:49 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.110.103.70]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Tue, 12 Feb 2019 11:06:49 -0800 From: Sowjanya Komatineni To: , , , , , CC: , , , , , Subject: [PATCH V19 3/7] i2c: tegra: fix maximum transfer size Date: Tue, 12 Feb 2019 11:06:44 -0800 Message-ID: <1549998408-9137-3-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549998408-9137-1-git-send-email-skomatineni@nvidia.com> References: <1549998408-9137-1-git-send-email-skomatineni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1549998411; bh=iiQhzWWb/jKZV8rK6QC2pxZyMkeAc+VLBisMEvR/32g=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=cjgDeV0C/8kjzRwNkupY22KExfFyP8U9uBHgyeHMeXacAjaeGraR2Hl408jF/JQal V+tC5SD7CM5oWK2rTrF9IdDgCCpogWLgxN7FrXNuAzukYYvbaxejSolE4DO0onMSgx 7e3Lu3+O9aRsPECWQCNn8veBRhDesigeMkcYL8FuQpjo8PFDDQr358MXtGQ6PFXQGR ntcZlDq0mBRCXjirl22gqAcKx0O65ZJP5D+mURmvOdsVoirBh4uz/wYm2sltIbm9mI tS9uojKQY2bD97XDWwtSypSs1tDypcwei+6M0fAXPmVpPrJTMRxsFYsFWRskGRvCc6 VMY5wvAQoEUyQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tegra186 and prior supports maximum 4K bytes per packet transfer including 12 bytes of packet header. This patch fixes max write length limit to account packet header size for transfers. Cc: stable@vger.kernel.org # 4.4+ Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni --- [V19] : Splitted maximum transfer limit patch into 2 separate patches to allow this fix for old Tegra chips and next patch in this series for Tegra194. [V18] : Using Max of SZ_64K (65536) size for dma buffer instead of 65535 [V16/V17] : I2C core max message size is 65535. So, max_read_len of 65535 is NOP. Removed it leaving max_write_len [V15] : This is new patch in this series. drivers/i2c/busses/i2c-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index a46446dbc48a..036cab795426 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -901,7 +901,7 @@ static const struct i2c_algorithm tegra_i2c_algo = { static const struct i2c_adapter_quirks tegra_i2c_quirks = { .flags = I2C_AQ_NO_ZERO_LEN, .max_read_len = 4096, - .max_write_len = 4096, + .max_write_len = 4096 - 12, }; static const struct i2c_adapter_quirks tegra194_i2c_quirks = { -- 2.7.4