From owner-freebsd-drivers@freebsd.org Sun Apr 29 16:32:45 2018 Return-Path: Delivered-To: freebsd-drivers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CFF8FB1641 for ; Sun, 29 Apr 2018 16:32:45 +0000 (UTC) (envelope-from freebsd@disroot.org) Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 978B97857B for ; Sun, 29 Apr 2018 16:32:44 +0000 (UTC) (envelope-from freebsd@disroot.org) Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 277C524946; Sun, 29 Apr 2018 18:32:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1525019562; bh=HUbJjjmpMNV1O48Cf1McEhGmJRTb765NiN5yPOwp328=; h=Subject:To:References:From:Date:In-Reply-To; b=dVOC5o0wtBu0H9dW+kNv72+cpoX0IK2C07iwrmnb/Qxc7lwq2+jlpybSKw6tjsXdh 6gTT80n7A37hBqZtwRmQ7flYczw7QdPmG34vJ05XPw4g2a0okA58EtIjpuwwfHm7OF uiKCKUsYkd0GrFK/y6jml4tzuNld3vPn2GSWvAXj5iUWtNa2ewAZiXVAJbLL0N+Ukz 7QtKxeRq+h0CDT7pu4iWLiwB+BCQHuJiAlZjXnC71QkG9UU9E+o4kYdTTZZWvfZZ3W 3sRgL0DcfuamtEDii8qf5etonufM1vN5d3RPUwWipP1axfO/UDytxP8Yy2Hp1IoeyU f2yP13YM+soWQ== X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (mail01.disroot.lan [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id utEse1rJ4xVi; Sun, 29 Apr 2018 18:32:39 +0200 (CEST) Subject: Re: Matching mps driver in 11.1-STABLE to LSI 2008 firmware DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1525019559; bh=HUbJjjmpMNV1O48Cf1McEhGmJRTb765NiN5yPOwp328=; h=Subject:To:References:From:Date:In-Reply-To; b=WU/U3rmTtbR9n/d6CFvPbIOFIpwwDHHDu9VCAcLzJaFcgJMDMKnhgF1iR4KvjZ6qh ATkJevDV8DiPh+rIO/wR/mmc2i8Iz0duE/QxxYmN8WkSiB17CnDxABMaWDeEoXTVkk vBFwLX/SHQEboWb6b93/3XPzbDWxsi00dexsrLpiEIbqMmTRG5w18i9KTEe79Km6Op NzOtfv1v2YArnpKTLlw9c0ZLHawRLnK0LC2XPqWDASUIKTmoA9fuGT3NfWRQsNobiI QjnnBkaOrzNzt+opvMJosVhVIWC6LaCqttLJeDmI7YcPwMTb09YOq8tIYqtVwACvE6 riXvNIcbKcngg== To: rowley.evan@gmail.com, freebsd-drivers@freebsd.org References: <94579286-7fcc-86ff-41d3-ceb6508f9b11@disroot.org> From: "Peter G." Message-ID: <2345b4bb-79e7-3403-8d52-b90f45d2306b@disroot.org> Date: Sun, 29 Apr 2018 18:32:37 +0200 Mime-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Apr 2018 16:32:45 -0000 On 29/04/2018 18:00, Evan Rowley wrote: > This is the mps line from dmesg: > > mps0: port 0xb000-0xb0ff mem > 0xdfd3c000-0xdfd3ffff,0xdfd40000-0xdfd7ffff irq 36 at device 0.0 on > pci3 > mps0: Firmware: 19.00.00.00, Driver: 21.02.00.00-fbsd > mps0: IOCCapabilities: > 1285c > > One might assume that the driver version 21 requires firmware version > 21, although LSI/Avago/Broadcom do not seem to have that version > available. Patched versions of firmware 20 (20.00.07.00) are the > highest offered as of today, as far as I can tell. > > I wonder how other FreeBSD users avoid this guesswork. I honestly doubt this is the driver issue. I've got mps0: port 0x3000-0x30ff mem 0xa2b40000-0xa2b4ffff,0xa2b00000-0xa2b3ffff irq 16 at device 0.0 on pci1 mps0: Firmware: 20.00.07.00, Driver: 21.02.00.00-fbsd mps0: IOCCapabilities: 1285c so the same, minus the firmware version; and before those controllers were flashed to 20.00.07 I've tested them with the same drivers, and since I've got 7 of them (they can be bought very cheaply post-leasing, like 30-35 EUR a pop for post-leasing Dell Perc H310 which is a fine controller), they had different older versions of their firmware. AFAIR the test controller was running version 16 or so (IR) and worked fine. Did you clean controller's BIOS when flashing new firmware? Is the SAS address properly set? If you want to turn SAS2008 into an HBA proper, it doesn't need its own bios at all, only firmware. My guess would be your problem is related to controller's misconfiguration. I run them without their bios, in strict IT/HBA mode and let ZFS handle any mirroring/raid. This way they simply show up as mpsN and drives as basic directly connected daN. I would advice you to reflash the controller, i.e. start from zero. The proper procedure would be to 1) write an empty SRB, 2) erase controller flash, and then 3) clean flash the recent firmware in desired mode (IT for HBA), and 4) set the SAS address. I can walk you through it but I'd need to dig up my old notes on that. It would be very similar to: https://fogelholk.io/reflash-lsi-megaraid-9240-8i-to-9211-8i/ Reflashing Dell H310 requires an extra step to flash older firmware first (allowing the IR->IT change) and only then re-flash the most recent version. -- PG