Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1392071pxv; Fri, 16 Jul 2021 08:21:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiN0y4InKVWx8iQe08Lt6dGHLgBlAdtPJSffjPlf05dCnW4TBWVyu0YpC+nCaAezkjoibI X-Received: by 2002:a50:ff02:: with SMTP id a2mr15128091edu.214.1626448880384; Fri, 16 Jul 2021 08:21:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626448880; cv=none; d=google.com; s=arc-20160816; b=hsKRNQTYP4TF2uNY1fr6ymzwKJUZ4xZx3ETCptsDraMNyDfqZviledlDKQoCSaJxFG WxaIKjOlHEMJoBmH35w2r4xmBd0dGiCiRZot64Ke0m53Wf5JOxHoFnDAeEkumOlhGWLD SvT11gplu2mOFI8piMIC9kbViiaJU3ER7s4FxzTOmYJdHSiQgQjOhIENIDtTzR0Ntk+R t3W9plL5lkpucOpWuOA3GxPZZVL8WA0/cI7NO4BviG3wQgowULikhZcM+ee1+o0KTKQU gU5mo4wMLnnolypW1HkMhIOMIiy4QBeNlz4t+wxo7ojGu0pJgzun/IXzpqyCNPEwGp8Z jX6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0QVlcMY1gAfIISVAPvHh34Y1TfGpWj4HRFD2XYrOwRA=; b=aeeOVrpkOoOw4TDJ26PhXxHwtOw6v8UecoQlVLFCpyUY0P3nxbjNniqqOi5GnsKUY8 NvqVpAJS+o3e4BMEQHSqIq4EJX9ZPziIR4OCzYcElXOqKcGawY93ca7F7kb/PRTcTSjy cpTNJZS8T6s0FBpNhPYEGZAJpCKYVylgllQf50ynw4FovKh7TcqJPT+Lb6xK2yQGOtzs cSJtk0nlgfTMwVAGm3fffr6BWJBwrJb/b4Dqet6nfFI7kzsUsJLeNLIX76qSii7yvBz5 tEUoHJ2RlyNgOIGiZd8BNyMgR2ptGYsemljkcAuiUC6vh5ywYeaYg/btJGp2zkzJXXpe H0rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="XiGclKh/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o8si11460859edw.60.2021.07.16.08.20.57; Fri, 16 Jul 2021 08:21:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="XiGclKh/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240818AbhGPPWh (ORCPT + 99 others); Fri, 16 Jul 2021 11:22:37 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:9094 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240662AbhGPPWZ (ORCPT ); Fri, 16 Jul 2021 11:22:25 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16GFJ7lv044354; Fri, 16 Jul 2021 11:19:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=0QVlcMY1gAfIISVAPvHh34Y1TfGpWj4HRFD2XYrOwRA=; b=XiGclKh/s2TG9RrL+Ho2GcVydfo/EQwFye7efm3AGxDTP20BJV52i1XNI4aUrtmaLZVj UqRXDCxB2/VkjViGUGHZ/S80fddbv7AXT+GAdJEJWJre+Q7Ug9ayx0mw8LHwFqz949pA AZ2itmpRExDf8Z3e9rjA2uEwvEtvFY2AQSKtFmOxzJqLJuY/PMW1je55M+SbJ40UWbJJ v4kFBrTWtDY2c42T/+y7K1F0pqvJI00VymjO3LMqBjriXRhn9tSQyEW47yjR7Q2wq841 JCGskb9MMorvxD6lNI6NSxdHj9waLTM6q2gDUCIK+rBWChKnPdNa9NbqYMUeqR6R/vcS XA== Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com with ESMTP id 39tw6bgduv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Jul 2021 11:19:07 -0400 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16GFHgtY017641; Fri, 16 Jul 2021 15:18:58 GMT Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma05wdc.us.ibm.com with ESMTP id 39q36f71pr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Jul 2021 15:18:58 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16GFIvo831523160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Jul 2021 15:18:57 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 16CE2C605D; Fri, 16 Jul 2021 15:18:57 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 943FFC6057; Fri, 16 Jul 2021 15:18:56 +0000 (GMT) Received: from v0005c16.aus.stglabs.ibm.com (unknown [9.211.92.96]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 16 Jul 2021 15:18:56 +0000 (GMT) From: Eddie James To: linux-kernel@vger.kernel.org Cc: linux-hwmon@vger.kernel.org, linux-fsi@lists.ozlabs.org, linux@roeck-us.net, jdelvare@suse.com, jk@ozlabs.org, joel@jms.id.au, alistair@popple.id.au, openbmc@lists.ozlabs.org, Eddie James Subject: [PATCH 0/3] OCC: fsi and hwmon: Set sequence number in submit interface Date: Fri, 16 Jul 2021 10:18:47 -0500 Message-Id: <20210716151850.28973-1-eajames@linux.ibm.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: uzbyxn0zbHVSz9zdEq9wLFhQ-OlU1hCK X-Proofpoint-ORIG-GUID: uzbyxn0zbHVSz9zdEq9wLFhQ-OlU1hCK X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-07-16_05:2021-07-16,2021-07-16 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 mlxlogscore=921 spamscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 clxscore=1015 mlxscore=0 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107160092 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Conflicting sequence numbers have resulted in users of the OCC interface getting the wrong response. For example, both the hwmon driver and an application might send a transfer near the same time with the same sequence number, and then one or both will get an incorrect respnse, but cannot tell because the sequence number looks correct. Perform the sequence numbering in the submit interface to make sure each transfer has a unique sequence number. This also requires that the submit interface perform the checksum calculation for the command. Adjust the hwmon driver accordingly too. Eddie James (3): fsi: occ: Force sequence numbering per OCC hwmon: (occ) Remove sequence numbering and checksum calculation fsi: occ: Add dynamic debug to dump command and response drivers/fsi/fsi-occ.c | 98 +++++++++++++++++++++++++++++++------- drivers/hwmon/occ/common.c | 30 +++++------- drivers/hwmon/occ/common.h | 3 +- drivers/hwmon/occ/p8_i2c.c | 15 +++--- drivers/hwmon/occ/p9_sbe.c | 4 +- 5 files changed, 105 insertions(+), 45 deletions(-) -- 2.27.0