NetBSD Problem Report #58644

From dogcow@babymeat.com  Mon Aug 26 02:32:10 2024
Return-Path: <dogcow@babymeat.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A68EA1A923F
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 26 Aug 2024 02:32:10 +0000 (UTC)
Message-Id: <20240826022830.E43C81DB8DB@chungus.babymeat.com>
Date: Sun, 25 Aug 2024 19:32:09 -0700
From: "T K Spindler (moof)" <dogcow@babymeat.com>
Reply-To: dogcow@babymeat.com
To: gnats-bugs@netbsd.org
Cc:
Subject: areca enumeration issues
X-Send-Pr-Version: 3.95

>Number:         58644
>Category:       kern
>Synopsis:       arcmsr does not enumerate disks properly with later firmware
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jnemeth
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 26 02:35:00 +0000 2024
>Last-Modified:  Sun Sep 01 19:20:57 +0000 2024
>Originator:     dogcow@babymeat.com
>Release:        NetBSD 10.0_STABLE
>Organization:

>Environment:
System: NetBSD chungus.babymeat.com 10.0_STABLE NetBSD 10.0_STABLE (GENERIC) #0: Sat Aug 24 01:34:05 CDT 2024 dogcow@chungus.babymeat.com:/crap/obj/10obj/src/nb10src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
On later versions of the Areca firmware - 1.49 and later, I'd guess - NetBSD
does not properly enumerate the available disks under many conditions.

>How-To-Repeat:
Boot NetBSD with at least three disks in the array, preferably with one >2Tb

>Fix:
OpenBSD notes in their arc.c, -r1.77:
    Increase the size of the diskinfo struct, which has grown
    4 bytes in the new firmware.

    To allow this to work on older firmwares add a "short read allowed"
    flag to arc_msgbuf(), which will allow short reads by getting
    the read length from the header of the response the firmware sends.

    Only set the flag on the arc_msgbuf() call that deals with the diskinfo
    struct for now.
(note that it's struct arc_fw_diskinfo in NetBSD)

NetBSD's arcmsr.c has diverged a fair bit from the OpenBSD import (their
-r1.68) so their patch can't just be dropped in as-is.


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->jnemeth
Responsible-Changed-By: jnemeth@NetBSD.org
Responsible-Changed-When: Sun, 01 Sep 2024 19:20:57 +0000
Responsible-Changed-Why:
Take.  I have an update to arcmsr(4) to support newer cards.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.