From nobody Thu Nov 23 19:48:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SbpZz0VJQz51fXf; Thu, 23 Nov 2023 19:48:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SbpZz037Qz3dYg; Thu, 23 Nov 2023 19:48:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700768939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7oR9ChYKfjF560GFJR53Oshm3vvekfQNGoYWIqXTSgQ=; b=Jx3pk1mr8w4SAvuYDLwsS5D2gMQBicSv/kegqBRgKIj46x3OJWwmWMieHxdslnL6cm0T1U HCn62wDIQLm0KKcqqLyx10bpEE0MNPgqIOKMopI65ghSOIu4MkbRfYEtA3+8RSbSMf7exd MiU61KlAp0dHmJwti8C4CQb6/91OpNDD2pzltZzzu5+NRjk6su/q5fF4HPuaHgy/iIgAaQ SUoiDBYKS4A3WwtqJg3RpmIoK/jWKRpefCnTODoxA1X4PIFqseSbSnBnW4dDHigoRhSOen k8kgQLfpX+kwo2zh63GtpzYFndc+lW6duXddrFQ9b6EYWXByzTmgSbXVGnZxAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700768939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7oR9ChYKfjF560GFJR53Oshm3vvekfQNGoYWIqXTSgQ=; b=NxBnREZ1T72MFRsuiRhqj21zFz452qwILocyENU8CveBLK7ZA/NQj7LueyhLcs9Oblh0wr MaII8ypfFbqsTG9wkS7scO2l4WVl3iVj9waqrDSyLZl9/rayf+/LZHu4HWVhL8Wy/w2WQa +nn++OIByoiMM+l/YyYVNs/IIXs+Y1gfTG5pn24ha36i3TbitTynrzz50OSxw77zgYRpTw Ee7Uu/5K2o3Hyc58l/cz+SoSXe+8XeWspUWeWi0hsf4exR10PvD9I5beXlrxRSbCXn4oDS Chl0vcrus3LSDuLg9q4qrCkWug0K0kVWNFDgXH8+qilTMFMz0R9lwamK20pNJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700768939; a=rsa-sha256; cv=none; b=ezAhASKj0NifuZr+soO3X7Wwyu6sIzdQhKf5TUur4XSOGSHINy98Mv8cymyW5qqK18b7Hk 11WHf6LvdquEFwrf4Vu+EzTd2DpAfHgX8KCxtKgFYxgrplzrmgjb9ypfPkQFcilxUHj+qi MtWIdCFRcJ645UrD70KGXoquBPrcZ9b8fJ5xV0H1Z9EpgI66xDtTDYstnbqWhYfGsf3JCT cp3s//INVLy6QFKMdjjTRfbyrpb0cL3LZEwxJCW/vo3d2F5Wiq1nHibC0VSyzijZBIZFOu /NGLhNisOAUmo1MBH9GiTLy2Jy8ph/3oGS4+Sj0frb1uddxP5TIra8wX+HJT9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SbpZy66NgzYq; Thu, 23 Nov 2023 19:48:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ANJmwCB076783; Thu, 23 Nov 2023 19:48:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ANJmwEC076780; Thu, 23 Nov 2023 19:48:58 GMT (envelope-from git) Date: Thu, 23 Nov 2023 19:48:58 GMT Message-Id: <202311231948.3ANJmwEC076780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: ad34121518bb - main - Revert "pst: improve shutdown_post_sync handler" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad34121518bb7e1a38d4a6b1ccf9ca6fe298dd0a Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ad34121518bb7e1a38d4a6b1ccf9ca6fe298dd0a commit ad34121518bb7e1a38d4a6b1ccf9ca6fe298dd0a Author: Mitchell Horne AuthorDate: 2023-11-23 19:46:28 +0000 Commit: Mitchell Horne CommitDate: 2023-11-23 19:48:44 +0000 Revert "pst: improve shutdown_post_sync handler" I did not realize this driver was i386-only, and the change fails to compile. Revert so that I can fix it properly. This reverts commit 428ebb7cd9f51afb6809bf81cf21a05e0fd93ff4. Pointy hat to: mhorne --- sys/dev/pst/pst-iop.c | 2 +- sys/dev/pst/pst-raid.c | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/dev/pst/pst-iop.c b/sys/dev/pst/pst-iop.c index 43ced2401d2c..f9921a564333 100644 --- a/sys/dev/pst/pst-iop.c +++ b/sys/dev/pst/pst-iop.c @@ -432,7 +432,7 @@ iop_queue_wait_msg(struct iop_softc *sc, int mfa, struct i2o_basic_message *msg) int status, timeout = 10000; mtx_lock(&sc->mtx); - if ((sc->reg->oqueue_intr_mask & I20_OUT_INTR_QUEUE) == 0) { + if (!(sc->reg->oqueue_intr_mask & 0x08)) { msg->transaction_context = (u_int32_t)&request; msg->initiator_context = (u_int32_t)iop_done; sc->reg->iqueue = mfa; diff --git a/sys/dev/pst/pst-raid.c b/sys/dev/pst/pst-raid.c index 4f9279462ee8..4e9c4fb724bc 100644 --- a/sys/dev/pst/pst-raid.c +++ b/sys/dev/pst/pst-raid.c @@ -73,7 +73,7 @@ struct pst_request { static disk_strategy_t pststrategy; static int pst_probe(device_t); static int pst_attach(device_t); -static void pst_shutdown_post_sync(device_t, int); +static int pst_shutdown(device_t); static void pst_start(struct pst_softc *); static void pst_done(struct iop_softc *, u_int32_t, struct i2o_single_reply *); static int pst_rw(struct pst_request *); @@ -170,23 +170,18 @@ pst_attach(device_t dev) name, psc->info->capacity/(512*255*63), 255, 63, device_get_nameunit(psc->iop->dev)); - EVENTHANDLER_REGISTER(shutdown_post_sync, pst_shutdown_post_sync, + EVENTHANDLER_REGISTER(shutdown_post_sync, pst_shutdown, dev, SHUTDOWN_PRI_FIRST); return 0; } -static void -pst_shutdown_post_sync(device_t dev, int howto __unused) +static int +pst_shutdown(device_t dev) { struct pst_softc *psc = device_get_softc(dev); struct i2o_bsa_cache_flush_message *msg; int mfa; - if (SCHEDULER_STOPPED()) { - /* Request polled shutdown. */ - psc->reg->oqueue_intr_mask = 0xffffffff; - } - mfa = iop_get_mfa(psc->iop); msg = (struct i2o_bsa_cache_flush_message *)(psc->iop->ibase + mfa); bzero(msg, sizeof(struct i2o_bsa_cache_flush_message)); @@ -199,6 +194,7 @@ pst_shutdown_post_sync(device_t dev, int howto __unused) msg->control_flags = 0x0; /* 0x80 = post progress reports */ if (iop_queue_wait_msg(psc->iop, mfa, (struct i2o_basic_message *)msg)) printf("pst: shutdown failed!\n"); + return 0; } static void