Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1936109/?format=api
{ "id": 1936109, "url": "http://patchwork.ozlabs.org/api/patches/1936109/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-aspeed/patch/20240516181907.3468796-4-eajames@linux.ibm.com/", "project": { "id": 57, "url": "http://patchwork.ozlabs.org/api/projects/57/?format=api", "name": "Linux ASPEED SoC development", "link_name": "linux-aspeed", "list_id": "linux-aspeed.lists.ozlabs.org", "list_email": "linux-aspeed@lists.ozlabs.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20240516181907.3468796-4-eajames@linux.ibm.com>", "list_archive_url": null, "date": "2024-05-16T18:18:30", "name": "[v3,03/40] fsi: Fix slave addressing after break command", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "0a855e2de6bb65274d123acad7a7ca04d90db9a1", "submitter": { "id": 74989, "url": "http://patchwork.ozlabs.org/api/people/74989/?format=api", "name": "Eddie James", "email": "eajames@linux.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-aspeed/patch/20240516181907.3468796-4-eajames@linux.ibm.com/mbox/", "series": [ { "id": 407101, "url": "http://patchwork.ozlabs.org/api/series/407101/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-aspeed/list/?series=407101", "date": "2024-05-16T18:18:31", "name": "fsi: Add interrupt support", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/407101/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1936109/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1936109/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-aspeed@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "linux-aspeed@lists.ozlabs.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=peltbzJE;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=112.213.38.117; helo=lists.ozlabs.org;\n envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)", "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=peltbzJE;\n\tdkim-atps=neutral", "lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com", "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=peltbzJE;\n\tdkim-atps=neutral", "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com\n (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com;\n envelope-from=eajames@linux.ibm.com; receiver=lists.ozlabs.org)" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4VgJKg41lCz1ymw\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 May 2024 04:20:07 +1000 (AEST)", "from boromir.ozlabs.org (localhost [IPv6:::1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4VgJKg1sHyz3frg\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 May 2024 04:20:07 +1000 (AEST)", "from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n [148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4VgJJt3x27z3fpT;\n\tFri, 17 May 2024 04:19:26 +1000 (AEST)", "from pps.filterd (m0353722.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 44GGGhsU017307;\n\tThu, 16 May 2024 18:19:13 GMT", "from ppma12.dal12v.mail.ibm.com\n (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220])\n\tby mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3y5g6jh6tw-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tThu, 16 May 2024 18:19:13 +0000", "from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1])\n\tby ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id\n 44GHATbp018819;\n\tThu, 16 May 2024 18:19:12 GMT", "from smtprelay05.dal12v.mail.ibm.com ([172.16.1.7])\n\tby ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3y2k0tuqe4-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tThu, 16 May 2024 18:19:12 +0000", "from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com\n [10.241.53.104])\n\tby smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 44GIJASx21496554\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n\tThu, 16 May 2024 18:19:12 GMT", "from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 777A35807D;\n\tThu, 16 May 2024 18:19:08 +0000 (GMT)", "from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 3FBB558071;\n\tThu, 16 May 2024 18:19:08 +0000 (GMT)", "from slate16.aus.stglabs.ibm.com (unknown [9.61.107.19])\n\tby smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP;\n\tThu, 16 May 2024 18:19:08 +0000 (GMT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com;\n h=from : to : cc : subject\n : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding; s=pp1;\n bh=0/NaGtMOdV6peMp7cxUe2O305K/Nsm2Su9UXKOlASJE=;\n b=peltbzJEELAc56tYfO8jgi6BgNqaQ5jycRbIzU+xJVuRGq9hhq56xY0Ni4l4CE7/flPR\n 4XamdNfRdqkaH7ZYwgdcqxtcVFcWMx7HLZHKg1fp4be7jnJqDWXZRzzylj/hEJDW7V8G\n 01Qh8CJkZlw5OmPQz18dvhcrebbH5Xi34+rtNP0Pja2lmtJinE0INPsoEtWgNjQVV2Ug\n i1cM9RUwkdHu92viBHUHfU47p2gMwwiR+79NhP4mbuW3TGTrKtwVwX/v8nk/E54gMi+h\n X4APhbqQL0jw7g1MOvrUoCmI8tsbak+uAzl01e+/O4It2xd4Pz1oHGO1a/sRnktZKu1w Lw==", "From": "Eddie James <eajames@linux.ibm.com>", "To": "linux-fsi@lists.ozlabs.org", "Subject": "[PATCH v3 03/40] fsi: Fix slave addressing after break command", "Date": "Thu, 16 May 2024 13:18:30 -0500", "Message-Id": "<20240516181907.3468796-4-eajames@linux.ibm.com>", "X-Mailer": "git-send-email 2.39.3", "In-Reply-To": "<20240516181907.3468796-1-eajames@linux.ibm.com>", "References": "<20240516181907.3468796-1-eajames@linux.ibm.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-TM-AS-GCONF": "00", "X-Proofpoint-ORIG-GUID": "CklOn_OLANOO577Ilyz59g5tq9McdkVA", "X-Proofpoint-GUID": "CklOn_OLANOO577Ilyz59g5tq9McdkVA", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26\n definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n priorityscore=1501\n bulkscore=0 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 impostorscore=0\n spamscore=0 phishscore=0 suspectscore=0 clxscore=1015 adultscore=0\n malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1\n engine=8.12.0-2405010000 definitions=main-2405160132", "X-BeenThere": "linux-aspeed@lists.ozlabs.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Linux ASPEED SoC development <linux-aspeed.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linux-aspeed>,\n <mailto:linux-aspeed-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/linux-aspeed/>", "List-Post": "<mailto:linux-aspeed@lists.ozlabs.org>", "List-Help": "<mailto:linux-aspeed-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linux-aspeed>,\n <mailto:linux-aspeed-request@lists.ozlabs.org?subject=subscribe>", "Cc": "andi.shyti@kernel.org, linux-aspeed@lists.ozlabs.org, jk@ozlabs.org,\n alistair@popple.id.au, linux-kernel@vger.kernel.org,\n linux-spi@vger.kernel.org, broonie@kernel.org, andrew@codeconstruct.com.au,\n linux-i2c@vger.kernel.org", "Errors-To": "linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org", "Sender": "\"Linux-aspeed\"\n <linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>" }, "content": "After a break command, the slave ID is set to 0x3, which means the\nFSI driver should use that ID when communicating with the slave, until\nSMODE is programmed with the new ID (forced to 0 for 23 bit addressing in\nthe current implementation). This worked previously due to a feature of\nnewer FSI slaves that don't enforce this requirement. Since hub masters\ncannot address non-zero slave IDs, disable this behavior for slaves off\nhub masters.\n\nFixes: 2b545cd8e1b2 (\"drivers/fsi: Implement slave initialisation\")\nSigned-off-by: Eddie James <eajames@linux.ibm.com>\n---\n drivers/fsi/fsi-core.c | 20 ++++++++++----------\n drivers/fsi/fsi-master-hub.c | 1 +\n drivers/fsi/fsi-master.h | 1 +\n drivers/fsi/fsi-slave.h | 1 +\n 4 files changed, 13 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c\nindex 7bf0c96fc0172..e8dbf5e95c234 100644\n--- a/drivers/fsi/fsi-core.c\n+++ b/drivers/fsi/fsi-core.c\n@@ -217,7 +217,7 @@ static uint32_t fsi_slave_smode(int id, u8 t_senddly, u8 t_echodly)\n \t\t| fsi_smode_lbcrr(0x8);\n }\n \n-static int fsi_slave_set_smode(struct fsi_slave *slave)\n+static int fsi_slave_set_smode(struct fsi_slave *slave, uint8_t id)\n {\n \tuint32_t smode;\n \t__be32 data;\n@@ -228,8 +228,7 @@ static int fsi_slave_set_smode(struct fsi_slave *slave)\n \tsmode = fsi_slave_smode(slave->id, slave->t_send_delay, slave->t_echo_delay);\n \tdata = cpu_to_be32(smode);\n \n-\treturn fsi_master_write(slave->master, slave->link, slave->id,\n-\t\t\t\tFSI_SLAVE_BASE + FSI_SMODE,\n+\treturn fsi_master_write(slave->master, slave->link, id, FSI_SLAVE_BASE + FSI_SMODE,\n \t\t\t\t&data, sizeof(data));\n }\n \n@@ -281,7 +280,7 @@ static int fsi_slave_handle_error(struct fsi_slave *slave, bool write,\n \tslave->t_send_delay = send_delay;\n \tslave->t_echo_delay = echo_delay;\n \n-\trc = fsi_slave_set_smode(slave);\n+\trc = fsi_slave_set_smode(slave, FSI_SMODE_SID_BREAK);\n \tif (rc)\n \t\treturn rc;\n \n@@ -773,7 +772,7 @@ static ssize_t slave_send_echo_store(struct device *dev,\n \tslave->t_send_delay = val;\n \tslave->t_echo_delay = val;\n \n-\trc = fsi_slave_set_smode(slave);\n+\trc = fsi_slave_set_smode(slave, slave->id);\n \tif (rc < 0)\n \t\treturn rc;\n \tif (master->link_config)\n@@ -945,6 +944,8 @@ EXPORT_SYMBOL_GPL(fsi_free_minor);\n \n static int fsi_slave_init(struct fsi_master *master, int link, uint8_t id)\n {\n+\tconst uint8_t break_id = (master->flags & FSI_MASTER_FLAG_NO_BREAK_SID) ? 0 :\n+\t\tFSI_SMODE_SID_BREAK;\n \tuint32_t cfam_id;\n \tstruct fsi_slave *slave;\n \tuint8_t crc;\n@@ -957,7 +958,7 @@ static int fsi_slave_init(struct fsi_master *master, int link, uint8_t id)\n \tif (id != 0)\n \t\treturn -EINVAL;\n \n-\trc = fsi_master_read(master, link, id, 0, &data, sizeof(data));\n+\trc = fsi_master_read(master, link, break_id, 0, &data, sizeof(data));\n \tif (rc) {\n \t\tdev_dbg(&master->dev, \"can't read slave %02x:%02x %d\\n\",\n \t\t\t\tlink, id, rc);\n@@ -981,9 +982,8 @@ static int fsi_slave_init(struct fsi_master *master, int link, uint8_t id)\n \t */\n \tif (master->flags & FSI_MASTER_FLAG_SWCLOCK) {\n \t\tllmode = cpu_to_be32(FSI_LLMODE_ASYNC);\n-\t\trc = fsi_master_write(master, link, id,\n-\t\t\t\tFSI_SLAVE_BASE + FSI_LLMODE,\n-\t\t\t\t&llmode, sizeof(llmode));\n+\t\trc = fsi_master_write(master, link, break_id, FSI_SLAVE_BASE + FSI_LLMODE, &llmode,\n+\t\t\t\t sizeof(llmode));\n \t\tif (rc)\n \t\t\tdev_warn(&master->dev,\n \t\t\t\t\"can't set llmode on slave:%02x:%02x %d\\n\",\n@@ -1028,7 +1028,7 @@ static int fsi_slave_init(struct fsi_master *master, int link, uint8_t id)\n \t\t\t \"can't set slbus on slave:%02x:%02x %d\\n\", link, id,\n \t\t\t rc);\n \n-\trc = fsi_slave_set_smode(slave);\n+\trc = fsi_slave_set_smode(slave, break_id);\n \tif (rc) {\n \t\tdev_warn(&master->dev,\n \t\t\t\t\"can't set smode on slave:%02x:%02x %d\\n\",\ndiff --git a/drivers/fsi/fsi-master-hub.c b/drivers/fsi/fsi-master-hub.c\nindex 36da643b32018..eea8649fee74d 100644\n--- a/drivers/fsi/fsi-master-hub.c\n+++ b/drivers/fsi/fsi-master-hub.c\n@@ -232,6 +232,7 @@ static int hub_master_probe(struct device *dev)\n \n \thub->master.idx = fsi_dev->slave->link + 1;\n \thub->master.n_links = links;\n+\thub->master.flags = FSI_MASTER_FLAG_NO_BREAK_SID;\n \thub->master.read = hub_master_read;\n \thub->master.write = hub_master_write;\n \thub->master.send_break = hub_master_break;\ndiff --git a/drivers/fsi/fsi-master.h b/drivers/fsi/fsi-master.h\nindex 967622c1cabf7..a0d7ad0f0f7cc 100644\n--- a/drivers/fsi/fsi-master.h\n+++ b/drivers/fsi/fsi-master.h\n@@ -111,6 +111,7 @@\n \n /* fsi-master definition and flags */\n #define FSI_MASTER_FLAG_SWCLOCK\t\t0x1\n+#define FSI_MASTER_FLAG_NO_BREAK_SID\t0x2\n \n /*\n * Structures and function prototypes\ndiff --git a/drivers/fsi/fsi-slave.h b/drivers/fsi/fsi-slave.h\nindex dba65bd4e083f..f6cca04131a92 100644\n--- a/drivers/fsi/fsi-slave.h\n+++ b/drivers/fsi/fsi-slave.h\n@@ -39,6 +39,7 @@\n #define FSI_SMODE_ECRC\t\t0x20000000\t/* Hw CRC check */\n #define FSI_SMODE_SID_SHIFT\t24\t\t/* ID shift */\n #define FSI_SMODE_SID_MASK\t3\t\t/* ID Mask */\n+#define FSI_SMODE_SID_BREAK\t3\t\t/* ID after break command */\n #define FSI_SMODE_ED_SHIFT\t20\t\t/* Echo delay shift */\n #define FSI_SMODE_ED_MASK\t0xf\t\t/* Echo delay mask */\n #define FSI_SMODE_SD_SHIFT\t16\t\t/* Send delay shift */\n", "prefixes": [ "v3", "03/40" ] }