From nobody Mon Nov 25 22:46:52 2024 X-Original-To: stable@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 4Xy16P1b8Gz5fKm6 for ; Mon, 25 Nov 2024 22:46:53 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xy16N1ys9z4NqB for ; Mon, 25 Nov 2024 22:46:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732574812; 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: in-reply-to:in-reply-to:references:references; bh=bbjApFa3jD0rTN4+qMlgOzLUUooXiaABhBTrCECuddE=; b=w9wGqGTkA7SBVAVHnmJdzggBL2wozm1sdaR48yug4DZjIbn2NbK87c5hTey5AAu+GsVxhC h8vlE7cdBYAsLrZFcxoE6JlEZjcfKACBZtw/cE1QcUVx6UhpVMFscK9DBG2UfOR40OjVN+ j2rOJQaKL+BaKbSLYNLXlencYed6r5Me603Z/DTvrfvNCVk9MJMgyH0LcVZCNl9iS84nkW RxGxBmdDYOdIcXxNbDwyPllmpgXexr9lYYa8sG7AdKN4VOuF2nCUNMcFI57J5j3YPybXcD fJH5VK5I/c2hB0YnN2NBAu61SixJL8rlD0oQkaO/acxI39lY1z0ucaKZQ4exqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732574812; a=rsa-sha256; cv=none; b=Yk5Tc5zJKsxtnGJQo0bdI2mibU1pVMat+/M2naoBtNhLBKeSOVth3QttAduckVuT7ridTm u9sKNebAL2QhxvuNE0EQQtfcRwRG7bXlHl7FuVkeh1f1IAiMdAaqDkjd2KQ+mn1tICZADp 54Y7b5o6+kJp708QjZ/uzgj3EVvqiPVXiv0y7DAIFS4p2wdJlenHiIOJFq1adtOleyqM75 uewVmKWHifCpxtHxgy/gwZbZT0FE+5rayah6LIfT3UY6sZ6DhZkHOGEZR2oorE52vVIytX lvCMRrPIOD8Nq+nIi6VYKAmU4MzJwqLNWRM1v/dIuEpmzDGR6PKUdSOLDiuCJQ== 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 4Xy16N1RvRzygy for ; Mon, 25 Nov 2024 22:46:52 +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 4APMkqTU015226 for ; Mon, 25 Nov 2024 22:46:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4APMkqbw015223 for stable@FreeBSD.org; Mon, 25 Nov 2024 22:46:52 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: stable@FreeBSD.org Subject: [Bug 271238] mpr (LSI SAS3816) driver not finding all devices in HP D6020 enclosures Date: Mon, 25 Nov 2024 22:46:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: pen@lysator.liu.se X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-stable@freebsd.org Sender: owner-freebsd-stable@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271238 --- Comment #8 from Peter Eriksson --- Hmm. I added some debugging printf's to the mpr driver and rebooted. It say= s: > mpr0: mpr_mapping_initialize: Mapping table has a max of 2622 entries and= DPM has a max of 128 entries. > mpr0: _mapping_process_dpm_pg0: Start copy of 128 DPM entries into the ma= pping table. > mpr0: _mapping_find_enc_map_space: Looking for space in the mapping table= for added enclosure. [max_num_phy_ids=3D16, skip_count=3D0, eot=3D2622] > mpr0: _mapping_find_enc_map_space: Found space in the mapping for enclosu= re at map index 16. > mpr0: _mapping_get_dev_info: Initialize 18 map entries for the enclosure,= starting at map index 16. > mpr0: _mapping_flush_dpm_pages: Flushing DPM entry 0. And then it preceeds and adds 35 drives (there are 35 drives in each drawer= /on each expander). > mpr0: Handle 0x005f SAS Address from SAS device page0 =3D 5001438041bb92bc > mpr0: mprsas_add_device: Target ID for added device is 33. > mpr0: Found device <4441,End Device> <12.0Gbps> h= andle<0x005f> enclosureHandle<0x0002> slot 17 > mpr0: At enclosure level 0 and connector name (C1 ) > mpr0: Target id 0x21 added >=20 > mpr0: _mapping_find_enc_map_space: Looking for space in the mapping table= for added enclosure. [max_num_phy_ids=3D16, skip_count=3D0, eot=3D2622] > mpr0: _mapping_find_enc_map_space: Found space in the mapping for enclosu= re at map index 34. > mpr0: _mapping_get_dev_info: Initialize 18 map entries for the enclosure,= starting at map index 34. > mpr0: _mapping_flush_dpm_pages: Flushing DPM entry 1. Then it adds 18 more map entries starting at 16+18. And promply starts reus= ing stuff... I wonder if things wouldn't work better it it would add 35 entries= and start the next group at 16+35 instead... I wonder where it gets that number 18 from. Aha! root@:/ # mprutil show enclosures Slots Logical ID SEPHandle EncHandle Type 17 300062b218119a40 0000 0001 Direct Attached SES-2 18 5001438041bb9280 005f 0002 External SES-2 18 5001438041bb0000 0061 0003 External SES-2 18 5001438030897600 009c 0004 External SES-2 18 5001438030889a80 009d 0005 External SES-2 There it is... Each drawer has 35 drive slots. And the comes from this code in mpr_mapping.c line 2285: if ((ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_MASK_MAPPING_MODE) = =3D=3D MPI2_IOCPAGE8_FLAGS_ENCLOSURE_SLOT_MAPPING) { /*=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 * The dev_idx for an enclosure is the start index.= If=20=20 * the start index is within the controller's defau= lt=20=20=20 * enclosure area, set the number of slots for this= =20=20=20=20=20 * enclosure to the max allowed. Otherwise, it shou= ld be=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 * a normal enclosure and the number of slots is in= the=20 * DPM entry's Mapping Information.=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 */ if (dev_idx < (sc->num_rsvd_entries + max_num_phy_ids)) { slot_id =3D 0; if (ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_DA_START_SLOT_1) slot_id =3D 1; num_slots =3D max_num_phy_ids; } else { slot_id =3D 0; num_slots =3D dpm_entry->MappingInformation= & MPI2_DRVMAP0_MAPINFO_SLOT_MASK; num_slots >>=3D MPI2_DRVMAP0_MAPINFO_SLOT_S= HIFT; } --=20 You are receiving this mail because: You are on the CC list for the bug.=