From nobody Thu Oct 20 16:37:18 2022 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 4MtYDF6lRNz4g1KW; Thu, 20 Oct 2022 16:37:33 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MtYDF5zBYz4Dhq; Thu, 20 Oct 2022 16:37:33 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-f180.google.com with SMTP id b18so27164774ljr.13; Thu, 20 Oct 2022 09:37:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b7gzTkKnImb8hWWWmmKjL/J0elcYfjhpZvu3AtEvKL4=; b=NgTWjpPCM5PmkZFkl5fYXuBZY/XuHeXIwNlfNGEOqFxCVLPpWpaDe2BHfS+7DWEzni kuwMGjeWPIe6XgGuu5b0ORUYNb2eK4e3HUuEY8yB2n5GeNujPJKYLTDJ7AfeqTS8JKk2 on0lXC1FzGkBkzLxaRxJBOHDfk25nog9IF9otYDzAoD5kEfT3FH+6Clgow5bkWlILM3F 7aeB6TYLku3DfIguVykfPhhSN3T4RAK6UjSZbI4IsDE1B1+idT4KgaVaPTtT7ffhJ/h+ /T84DIUKHR3uh2xjdaEGAZHAQzmk9U95Y82g7yUyxbDtxebP7VUvzOFuag0mgfCZR/3n 1vSg== X-Gm-Message-State: ACrzQf3zcvW3ixo8FP212E+2N4Ajpph+wo09bfxOavQCn50bOKzRc2CQ iHUy7pE+ePHkKzHeDluCqJtG1VFi4hRbU9aLZfY4kdgl X-Google-Smtp-Source: AMsMyM6ZVHXLqCIj5fK588Fnwbvid+6NXwoOCQZ62NRJzyAmAn9V33GEvn8lDTCfPClYqbClWX37tZvXNqdRHsk2apQ= X-Received: by 2002:a2e:8719:0:b0:26f:abac:4aac with SMTP id m25-20020a2e8719000000b0026fabac4aacmr4963181lji.62.1666283851605; Thu, 20 Oct 2022 09:37:31 -0700 (PDT) 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 References: <202210171652.29HGqtSf007611@gitrepo.freebsd.org> In-Reply-To: From: Alan Somers Date: Thu, 20 Oct 2022 10:37:18 -0600 Message-ID: Subject: Re: git: 11778fca4a83 - main - Fix mpr(4) panic during a firmware update. To: Ken Merry Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Rspamd-Queue-Id: 4MtYDF5zBYz4Dhq X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, Oct 20, 2022 at 10:29 AM Ken Merry wrote: > > > On Oct 20, 2022, at 12:23, Alan Somers wrote: > > On Mon, Oct 17, 2022 at 10:53 AM Kenneth D. Merry wrote= : > > > The branch main has been updated by ken: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D11778fca4a83f5e3b597c75785= aa5c0ee0dc518e > > commit 11778fca4a83f5e3b597c75785aa5c0ee0dc518e > Author: Kenneth D. Merry > AuthorDate: 2022-10-17 16:48:34 +0000 > Commit: Kenneth D. Merry > CommitDate: 2022-10-17 16:48:34 +0000 > > Fix mpr(4) panic during a firmware update. > > Issue Description: > The RequestCredits field of IOCFacts got changed between the Phase23 > firmware to Phase24 firmware. So as part of firmware update operation, > driver has to free the resources & pools which are created with the Ph= ase23 > Firmware's IOCFacts data (i.e. during driver load time) and has to > reallocate the resources and pools using Phase24's IOCFacts data. Here > driver has freed the interrupts but missed to reallocate the interrupt= s and > hence config page read operation is getting timed out and controller i= s > going for recursive reinit (controller reset) operations and leading t= o > kernel panic. > > Fix: > Reallocate the interrupts if the interrupts are disabled as part of > firmware update/downgrade operation. > > Submitted by: Sreekanth Ready > Tested by: ken > MFC after: 3 days > > > Would this commit fix the panic in bug 252575? > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252575 > > > Unfortunately, no. > > This is the panic I ran into on a firmware upgrade using storcli64 on a B= roadcom 9600-16i card going from Phase 23 to Phase 24: > > mpr0: Reinitializing controller > mpr0: Firmware: 24.00.00.00, Driver: 23.00.00.00-fbsd > mpr0: IOCCapabilities: 2fa84c ,MSIXIndex,HostDisc,FastPath,RDPQArray,AtomicReqDesc> > mpr0: Calling Reinit from mpr_wait_command, timeout=3D30, elapsed=3D30 > mpr0: Reinitializing controller > mpr_config_get_ioc_pg8: request for header completed with error 0 > mpr_config_get_ioc_pg8: request for header completed with error 16 > mpr_config_get_ioc_pg8: request for header completed with error 16 > mpr_config_get_ioc_pg8: request for header completed with error 16 > mpr_config_get_ioc_pg8: request for header completed with error 16 > mpr_config_get_ioc_pg8: request for header completed with error 16 > mpr_config_get_iounit_pg8: request for header completed with error 16 > mpr_config_get_iounit_pg8: request for header completed with error 16 > mpr_config_get_iounit_pg8: request for header completed with error 16 > mpr_config_get_iounit_pg8: request for header completed with error 16 > mpr_config_get_iounit_pg8: request for header completed with error 16 > mpr_config_get_iounit_pg8: request for header completed with error 16 > mpr_config_get_man_pg11: request for header completed with error 16 > mpr_config_get_man_pg11: request for header completed with error 16 > mpr_config_get_man_pg11: request for header completed with error 16 > mpr_config_get_man_pg11: request for header completed with error 16 > mpr_config_get_man_pg11: request for header completed with error 16 > mpr_config_get_man_pg11: request for header completed with error 16 > mpr_config_get_dpm_pg0: request for header completed with error 16 > mpr_config_get_dpm_pg0: request for header completed with error 16 > mpr_config_get_dpm_pg0: request for header completed with error 16 > mpr_config_get_dpm_pg0: request for header completed with error 16 > mpr0: Unfreezing SIM queue > mpr0: fault_state(0x40001500)! > mpr0: Timeout while writing doorbell > panic: mpr_iocfacts_allocate failed to get IOC Facts with error 6 > > cpuid =3D 1 > time =3D 1663771142 > KDB: stack backtrace: > db_trace_self_wrapper() at 0xffffffff8040a9ab =3D db_trace_self_wrapper+0= x2b/frame 0xfffffe02e759d6c0 > vpanic() at 0xffffffff805f7ad1 =3D vpanic+0x151/frame 0xfffffe02e759d710 > panic() at 0xffffffff805f7973 =3D panic+0x43/frame 0xfffffe02e759d770 > mpr_iocfacts_allocate() at 0xffffffff8154bdad =3D mpr_iocfacts_allocate+0= x15dd/frame 0xfffffe02e759d8e0 > mpr_reinit() at 0xffffffff81549e0c =3D mpr_reinit+0x14c/frame 0xfffffe02e= 759d930 > mpr_wait_command() at 0xffffffff8154fb69 =3D mpr_wait_command+0x1d9/frame= 0xfffffe02e759d9b0 > mpr_ioctl() at 0xffffffff8155a113 =3D mpr_ioctl+0x1de3/frame 0xfffffe02e7= 59db40 > devfs_ioctl() at 0xffffffff804bab8f =3D devfs_ioctl+0xaf/frame 0xfffffe02= e759db90 > vn_ioctl() at 0xffffffff806e9664 =3D vn_ioctl+0x1a4/frame 0xfffffe02e759d= ca0 > devfs_ioctl_f() at 0xffffffff804bb21e =3D devfs_ioctl_f+0x1e/frame 0xffff= fe02e759dcc0 > kern_ioctl() at 0xffffffff80667b2d =3D kern_ioctl+0x26d/frame 0xfffffe02e= 759dd30 > sys_ioctl() at 0xffffffff80667811 =3D sys_ioctl+0x101/frame 0xfffffe02e75= 9de00 > amd64_syscall() at 0xffffffff8092ae4c =3D amd64_syscall+0x10c/frame 0xfff= ffe02e759df30 > fast_syscall_common() at 0xffffffff8090369b =3D fast_syscall_common+0xf8/= frame 0xfffffe02e759df30 > --- syscall (54, FreeBSD ELF64, sys_ioctl), rip =3D 0x8dfe3a, rsp =3D 0x8= 21837048, rbp =3D 0x4 --- > Uptime: 18h2m58s > Dumping 5338 out of 130903 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81= %..91% > > Ken > =E2=80=94 > Ken Merry > ken@FreeBSD.ORG Ahh, too bad. Is Broadcom even aware of the other one?