get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/2234560/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2234560,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2234560/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260507-dw-i2c-v4-4-9a447b23bfdf@wkennington.com/",
    "project": {
        "id": 35,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/35/?format=api",
        "name": "Linux I2C development",
        "link_name": "linux-i2c",
        "list_id": "linux-i2c.vger.kernel.org",
        "list_email": "linux-i2c@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260507-dw-i2c-v4-4-9a447b23bfdf@wkennington.com>",
    "list_archive_url": null,
    "date": "2026-05-07T20:05:18",
    "name": "[v4,4/4] i2c: designware: Handle active target cleanly",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "79bb833220f364675e8608db318c66d698061750",
    "submitter": {
        "id": 87247,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/87247/?format=api",
        "name": "William A. Kennington III",
        "email": "william@wkennington.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260507-dw-i2c-v4-4-9a447b23bfdf@wkennington.com/mbox/",
    "series": [
        {
            "id": 503262,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/503262/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/list/?series=503262",
            "date": "2026-05-07T20:05:14",
            "name": "i2c: designware: Improve device disable handling",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/503262/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2234560/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2234560/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-i2c+bounces-17301-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-i2c@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=wkennington-com.20251104.gappssmtp.com\n header.i=@wkennington-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=KUiE9X5C;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-i2c+bounces-17301-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=wkennington-com.20251104.gappssmtp.com\n header.i=@wkennington-com.20251104.gappssmtp.com header.b=\"KUiE9X5C\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.175",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=wkennington.com",
            "smtp.subspace.kernel.org;\n spf=none smtp.mailfrom=wkennington.com"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBNZb732bz1y04\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 06:07:19 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id ED9E4306572E\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  7 May 2026 20:05:32 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id E4F8B36998C;\n\tThu,  7 May 2026 20:05:28 +0000 (UTC)",
            "from mail-pf1-f175.google.com (mail-pf1-f175.google.com\n [209.85.210.175])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A4AC364E84\n\tfor <linux-i2c@vger.kernel.org>; Thu,  7 May 2026 20:05:26 +0000 (UTC)",
            "by mail-pf1-f175.google.com with SMTP id\n d2e1a72fcca58-8367df48711so568479b3a.1\n        for <linux-i2c@vger.kernel.org>; Thu, 07 May 2026 13:05:26 -0700 (PDT)",
            "from wakbuild.c.googlers.com\n (123.143.125.34.bc.googleusercontent.com. [34.125.143.123])\n        by smtp.gmail.com with ESMTPSA id\n 41be03b00d2f7-c8263ff29c2sm443200a12.12.2026.05.07.13.05.25\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Thu, 07 May 2026 13:05:26 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778184328; cv=none;\n b=nzM9GK+5C3dDOhBZck5y3M5beoAFeDpUb5O4VivwtiPcpqRtEPhRArhZCpH9qko2uxB929w92NxTl7zI4Li0epH6pFNKBV9dM11i7aaPiNaZzfr/ZUt7nW/MwNmL96pHZXHGwQh5gaeM6+kyaJ3a98J9/t0i3nTKgXMf0OGObVY=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778184328; c=relaxed/simple;\n\tbh=dWw2eeSEN5euvjVJ3wXeI34saYGcPcQNp2hNwJvzVPY=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=toIPxge/KqAeAen8hYp6YEIBRbgp+whqkWgbm4W8BDmBQIC9NaffLeguEJCy2gxsWLGpQTH4OCnbkp1V14G/9AuN1choLMFS6AARaaH7SHs0A2tMdp3YpK2L9rwRh/rDKcozTC+/V3N1fKhUC802yit+4mMvO7ENTSOuOpOdSm4=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=wkennington.com;\n spf=none smtp.mailfrom=wkennington.com;\n dkim=pass (2048-bit key) header.d=wkennington-com.20251104.gappssmtp.com\n header.i=@wkennington-com.20251104.gappssmtp.com header.b=KUiE9X5C;\n arc=none smtp.client-ip=209.85.210.175",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=wkennington-com.20251104.gappssmtp.com; s=20251104; t=1778184326;\n x=1778789126; darn=vger.kernel.org;\n        h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n         :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n         :reply-to;\n        bh=oC1FmSZRpBHqB8kjyzbhzh5I8FZEHW+KmWxwvZd/drI=;\n        b=KUiE9X5C+Jsx1BuO3PudTjxQ+N7CuINFeFaZ+jBIj9A4Uz6gTWDQ+sdmDxoks7LXW8\n         fv8e6oZWEg+n5V9xsTyDuyVcuVlf3QaImRLRhv3uoi7VShE98MKNnZX2y8HblsUzXm4+\n         /AcHAvu2nl93+8gf8KwXdnh6tVegD3qSOAPftaWulUeAZBFhyOua9mzkTqe7nnAp8iyI\n         p9gh3iLttdJi59IxztlQCoEpXj7V0trALNFk4c+8+2P+W+Dqg8t0PihjhPTFkIqYY0mm\n         684cv+IEnIYcu93G2akwtk7ddBjemL+vGQs0RuVOOYaPJsjcqANBI05JegBK4OCPXQw7\n         DdhQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1778184326; x=1778789126;\n        h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n         :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n         :cc:subject:date:message-id:reply-to;\n        bh=oC1FmSZRpBHqB8kjyzbhzh5I8FZEHW+KmWxwvZd/drI=;\n        b=mcaOUSEt9+vPbfpP93LG/AgkQVPvuFnN48zFOsvR+KE/vJBdPMiC/v6j1mpgNNsSfJ\n         iK49aQfEAagZ4kn3q59pz/ekk7rWYCQZGzrrU6sv37BGGtXoIpbCbbeRab95T3QfIsJb\n         JBJ5DFyXugjJRoqYMxRTu4f51eUrqWVErcS3EdoHacwP7WeOmfbZyus9btjagzmG477n\n         WXTHCAOJj79Sl4oY48RzFZOvkeYiEBUyTQHyGPKbMwMnmjLc7902iXRCWoOKB6hgb321\n         FH7zbpxonfsNGrrP0CmskJUi0G53ZmP7VM4gC43dQrKQEiQ7UYv2dF4lkC/GkAs43mxZ\n         7nHQ==",
        "X-Gm-Message-State": "AOJu0YyBZxRagmT7kBG9/8NyJbL/QONWQMtZFwfHnVQM9OQ60vB11kMe\n\tkXlYt+qdYos2DU8LckKFklGhMkXSatiXl2QEs2598UdsqFyfwPlSWpl3HoifRV8q8YY=",
        "X-Gm-Gg": "AeBDieuDkoDYVYOSoBm1jCApuRwFoZBx8vbDCtMmZmWjyFZWnXEZn3BrH8A1uJHxZiF\n\ttpJFj/iH1BlwQnOoN7GsMmzsJ0vEeKw9aDsOtmti6d7kU6J+QFSe7Ri0jNvyqSYQwflUrvG+NZJ\n\tPn4hOQs7eh4elQsf0jCaf4vSnGKG0wqimTfcsO5g7zr7HcXLLyphQkzAugFEH4ezTTTj1Jg6goU\n\tTCIZMRTfe233OlDgILcOgEcvMdNbYHAt4FdC34WpguXBCdtEMmso/WQ9mXbXsXJ5zCbMYftKkAH\n\twA+tcHHat/hJ2ncLRBPUDGdd78B9m87WRTEgljPozad+90WRucoVZi0r8N0Bqeol4iVm/LaNOMg\n\t2dnBwDoa5E1Q12v0B5IjEn3+uVnAIX51Wna6BrHjk9AOAc903h37m95wzygOpYHF4UC/vJRlkAu\n\t5WA96ADtpFlQQ8g0zdQu9bNxYg5A7ldTRgwDYYF91YamFKN9LaP2uaeiy0nZBgAmgsaxbauERWS\n\tO4QyvOfrtdTOIE=",
        "X-Received": "by 2002:a05:6a21:99a9:b0:39b:e321:67ea with SMTP id\n adf61e73a8af0-3aa5ab855bemr9904536637.45.1778184326443;\n        Thu, 07 May 2026 13:05:26 -0700 (PDT)",
        "From": "\"William A. Kennington III\" <william@wkennington.com>",
        "Date": "Thu, 07 May 2026 20:05:18 +0000",
        "Subject": "[PATCH v4 4/4] i2c: designware: Handle active target cleanly",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-i2c@vger.kernel.org",
        "List-Id": "<linux-i2c.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-i2c+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-i2c+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260507-dw-i2c-v4-4-9a447b23bfdf@wkennington.com>",
        "References": "<20260507-dw-i2c-v4-0-9a447b23bfdf@wkennington.com>",
        "In-Reply-To": "<20260507-dw-i2c-v4-0-9a447b23bfdf@wkennington.com>",
        "To": "Mika Westerberg <mika.westerberg@linux.intel.com>,\n Andy Shevchenko <andriy.shevchenko@linux.intel.com>,\n Jan Dabros <jsd@semihalf.com>, Andi Shyti <andi.shyti@kernel.org>",
        "Cc": "linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,\n \"William A. Kennington III\" <william@wkennington.com>",
        "X-Mailer": "b4 0.14.3"
    },
    "content": "When the I2C controller attempts a new transaction while the target\ncontroller is shutting down or restarting, it can lead to bus lockups\nand system bootloops if the hardware enters an inconsistent state.\n\nAddress this by ensuring that the internal state machines are properly\ncleared when disabling the controller if target activity is detected.\n\nIf the controller remains active after disabling, perform a bus recovery\nto reset it to a known good state.\n\nSigned-off-by: William A. Kennington III <william@wkennington.com>\n---\n drivers/i2c/busses/i2c-designware-common.c |  8 ++++++++\n drivers/i2c/busses/i2c-designware-master.c | 31 ++++++++++++++++++------------\n 2 files changed, 27 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c\nindex 886f4dad166a..cf5feed269bd 100644\n--- a/drivers/i2c/busses/i2c-designware-common.c\n+++ b/drivers/i2c/busses/i2c-designware-common.c\n@@ -633,6 +633,14 @@ void __i2c_dw_disable(struct dw_i2c_dev *dev)\n \n \tabort_needed = (raw_intr_stats & DW_IC_INTR_MST_ON_HOLD) ||\n \t\t\t(ic_stats & DW_IC_STATUS_MASTER_HOLD_TX_FIFO_EMPTY);\n+\n+\t/*\n+\t * If we are in target mode and there is activity, we should also\n+\t * trigger an abort to clear the internal state machines.\n+\t */\n+\tif (dev->mode == DW_IC_SLAVE && (ic_stats & DW_IC_STATUS_SLAVE_ACTIVITY))\n+\t\tabort_needed = true;\n+\n \tif (abort_needed) {\n \t\tif (!(enable & DW_IC_ENABLE_ENABLE)) {\n \t\t\tregmap_write(dev->map, DW_IC_ENABLE, DW_IC_ENABLE_ENABLE);\ndiff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c\nindex de929b91d5ea..7a301c8b604e 100644\n--- a/drivers/i2c/busses/i2c-designware-master.c\n+++ b/drivers/i2c/busses/i2c-designware-master.c\n@@ -785,18 +785,25 @@ __i2c_dw_xfer_one_part(struct dw_i2c_dev *dev, struct i2c_msg *msgs, size_t num)\n \t * IC_RAW_INTR_STAT.MASTER_ON_HOLD holding SCL low. Check if\n \t * controller is still ACTIVE before disabling I2C.\n \t */\n-\tif (i2c_dw_is_controller_active(dev))\n-\t\tdev_err(dev->dev, \"controller active\\n\");\n-\n-\t/*\n-\t * We must disable the adapter before returning and signaling the end\n-\t * of the current transfer. Otherwise the hardware might continue\n-\t * generating interrupts which in turn causes a race condition with\n-\t * the following transfer. Needs some more investigation if the\n-\t * additional interrupts are a hardware bug or this driver doesn't\n-\t * handle them correctly yet.\n-\t */\n-\t__i2c_dw_disable_nowait(dev);\n+\tif (i2c_dw_is_controller_active(dev)) {\n+\t\t/*\n+\t\t * If the controller is still active after the timeout, attempt a\n+\t\t * bus recovery to clear any potentially locked state.\n+\t\t */\n+\t\tdev_err(dev->dev, \"controller active after xfer, recovering\\n\");\n+\t\ti2c_recover_bus(&dev->adapter);\n+\t\ti2c_dw_init(dev);\n+\t} else {\n+\t\t/*\n+\t\t * We must disable the adapter before returning and signaling the end\n+\t\t * of the current transfer. Otherwise the hardware might continue\n+\t\t * generating interrupts which in turn causes a race condition with\n+\t\t * the following transfer. Needs some more investigation if the\n+\t\t * additional interrupts are a hardware bug or this driver doesn't\n+\t\t * handle them correctly yet.\n+\t\t */\n+\t\t__i2c_dw_disable_nowait(dev);\n+\t}\n \n \tif (dev->msg_err)\n \t\treturn dev->msg_err;\n",
    "prefixes": [
        "v4",
        "4/4"
    ]
}