Date: Tue, 25 Apr 2023 16:17:54 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271062] [PATCH] add support for 28xx based device to isp(4) Message-ID: <bug-271062-227-GG7GIzHV8D@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-271062-227@https.bugs.freebsd.org/bugzilla/> References: <bug-271062-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271062 Warner Losh <imp@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |imp@FreeBSD.org --- Comment #1 from Warner Losh <imp@FreeBSD.org> --- I generally like this patch... however... - isp_prt(isp, ISP_LOGERR, "bad frame length (%d) from NVRAM- using %d", DEFAULT_FRAMESIZE(isp), ICB_DFLT_FRMLEN); - icbp->icb_maxfrmlen =3D ICB_DFLT_FRMLEN; + if (IS_28XX(isp)) { + isp_prt(isp, ISP_LOGERR, "bad frame length (%d) from NVRAM - using %d", DEFAULT_FRAMESIZE(isp), ICB_DFLT_FRMLEN_28XX); + icbp->icb_maxfrmlen =3D ICB_DFLT_FRMLEN_28XX; + } else { + isp_prt(isp, ISP_LOGERR, "bad frame length (%d) from NVRAM - using %d", DEFAULT_FRAMESIZE(isp), ICB_DFLT_FRMLEN); + icbp->icb_maxfrmlen =3D ICB_DFLT_FRMLEN; + } looks a little ugly to me. I'd be tempted to add a icbp->icb_dflt_frmlen fi= eld where we detect the 2800, set a different value. That way, we'd not need th= e if here with the code duplication. Other than that, the patch looks very good. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271062-227-GG7GIzHV8D>