From nobody Wed Jul 07 16:23:40 2021 X-Original-To: bugs@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 A997E11E1E0E for ; Wed, 7 Jul 2021 16:23:40 +0000 (UTC) (envelope-from bugzilla-noreply@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 4GKl984KJ7z3t0q for ; Wed, 7 Jul 2021 16:23:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 7D031109B4 for ; Wed, 7 Jul 2021 16:23:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 167GNeNx087372 for ; Wed, 7 Jul 2021 16:23:40 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 167GNe6d087371 for bugs@FreeBSD.org; Wed, 7 Jul 2021 16:23:40 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 257042] mpr driver fails to wake "idle" disks on reboot Date: Wed, 07 Jul 2021 16:23:40 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: karl@denninger.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257042 Bug ID: 257042 Summary: mpr driver fails to wake "idle" disks on reboot Product: Base System Version: 12.2-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: karl@denninger.net 12.2-STABLE (and previous 12.2, may be prior)=20 Context: mpr0: port 0x6000-0x60ff mem 0xa2540000-0xa25 4ffff,0xa2500000-0xa253ffff irq 16 at device 0.0 on pci1 mpr0: Firmware: 16.00.01.00, Driver: 23.00.00.00-fbsd mpr0: IOCCapabilities: 7a85c pcib2: irq 16 at device 1.1 on pci0 pci2: on pcib2 mpr1: port 0x5000-0x50ff mem 0xa2340000-0xa23 4ffff,0xa2300000-0xa233ffff irq 17 at device 0.0 on pci2 mpr1: Firmware: 16.00.01.00, Driver: 23.00.00.00-fbsd mpr1: IOCCapabilities: 7a85c Several (rust) disks attached to this adapter; the boot pool is on the motherboard ata ports. Boot pool is comprised of SSDs and is not impacted. The firmware is disabled in the card as I do not wish to use its onboard facilities, nor boot from it. Starting from a power-off state the system bo= ots normally, spins up the disks, and you get something similar to this: Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM mpr0: Found device <881,End Device> <6.0Gbps> handle<0x0009> enclosureHandle<0x0001> slot 7 mpr0: At enclosure level 0 and connector name ( ) Root mount waiting for: CAM Root mount waiting for: CAM Root mount waiting for: CAM mpr1: Found device <881,End Device> <6.0Gbps> handle<0x0009> enclosureHandle<0x0001> slot 0 mpr1: At enclosure level 0 and connector name ( ) mpr0: Found device <881,End Device> <6.0Gbps> handle<0x000a> enclosureHandle<0x0001> slot 3 mpr0: At enclosure level 0 and connector name ( ) mpr0: Found device <881,End Device> <6.0Gbps> handle<0x000b> enclosureHandle<0x0001> slot 2 mpr0: At enclosure level 0 and connector name ( ) .... and so on until all of the disks are enumerated, then the boot continu= es and all is well. At the end of start, in /etc/rc.local, I do this: /sbin/camcontrol idle da0 -t 600 /sbin/camcontrol idle da1 -t 600 /sbin/camcontrol idle da2 -t 600 /sbin/camcontrol idle da3 -t 600 /sbin/camcontrol idle da4 -t 600 /sbin/camcontrol idle da5 -t 600 /sbin/camcontrol idle da6 -t 600 /sbin/camcontrol idle da7 -t 600 The intent is to set a 10 minute spin-down on those disks to conserve power since these disks are all a "bulk storage" pool that has rare accesses to it during normal operations. This works well while the system is running at the expense of a brief time penalty if access is made to that pool after 10 or minutes of inactivity in that the components of the pool must spin up. The problem is that if I reboot the system (e.g. "reboot" from a root login, such as when updating the kernel and/or world) without powering it off (or = the system panics and reboots) the driver *does not* wake these drives up. It = does so from a cold start (apparently detecting the spun-down state and sending "spin-up" commands on a cold start) but doesn't send the necessary command(= s) to wake disks from an idle state. As such if any of these devices ARE idle when a non-power-cycled reboot occurs the system spins on "Root mount waiti= ng for: CAM" forever. This appears to be an omission in the FreeBSD driver code; the documentation for camcontrol notes that a "sleep" may require a reset, but both "idle" and "standby" should be woken by activity to the target device. --=20 You are receiving this mail because: You are the assignee for the bug.=