From owner-freebsd-current@freebsd.org Wed Apr 29 17:43:32 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B8222BCA46 for ; Wed, 29 Apr 2020 17:43:32 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 49C5Tb5v6Dz4Ynk for ; Wed, 29 Apr 2020 17:43:31 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id CA4E52BCA45; Wed, 29 Apr 2020 17:43:31 +0000 (UTC) Delivered-To: current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA1412BCA44 for ; Wed, 29 Apr 2020 17:43:31 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (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 49C5TZ4cp7z4Ynj for ; Wed, 29 Apr 2020 17:43:30 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9C1035C03DA for ; Wed, 29 Apr 2020 13:43:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 29 Apr 2020 13:43:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:subject:to:message-id:date:mime-version:content-type :content-transfer-encoding; s=fm2; bh=2U5j3K7kdvA9uosMlVkk4BYr8c IodnDFtBuKMJEsegA=; b=EpNiqRjU+DXpL6A5ATH0kUQFEtuGMaJwrR7RTZmNRz tWnL6g66fk6efHIvm7LfcHCdMChAi0TU1iD4u+69HFSFCfbzMYEAeJ28wA7cKr39 9K+GSs/OEL4IBeQQfV/R5mWqPYT7F0V1+9JHqQuvSKpU7O28FkQWqHllPDfj0tpN s4XNOWOn7iXQTV1RK/NZozt/cRwHept58x1dI+0SQreGSRTVlQ7V5iBbTmdqwHmg 5qydxF0M2FDzmO0lGlMJtNGhIeMvvlGQ2hd5v9LeKTAp5ODj+2UJGP5zzlxPdif3 IsFUe5CXY5+9/kEPO1Fgu/6ByMdhYkfHNGAaYtktXigQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=2U5j3K 7kdvA9uosMlVkk4BYr8cIodnDFtBuKMJEsegA=; b=MemQVrAGbKnrZBLHQyiX0p TIok109KjpgQq7ncESjZCnNyWEZ9ZnZ3Qs/SLjULjEVE+m9Rw1Os7y1QJUtI2SiZ /qydcVWROO9075yWvd+hoQ29XQikgDn9tD1gISJuoj7YSImBTgJywsgYOLmknv5v PoeELLy2RlWoMlZPJPXWkGjzEaDTZNjwVIs2ZNkMzYs/nEjDHpYjfgY0X9Z/vVt2 zRyT0bybJ9db8H55T9bQMpDA1/yZXQsZp7HEpCYivDCXieg+RvM0EAeXRKdMuwrq NNi+2nRZC2RBRdenjg2e1pUQCR7Wc1GGhJzqVkKFwiUpZVNPg++/cjOLaV0wGWMg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieefgdduudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhuffvkffffgggtgfgsehtjeertd dtfeejnecuhfhrohhmpegjuhhrihcurfgrnhhkohhvuceohihprghnkhhovhesfhgrshht mhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpefgheelfeektdevudeljeekffdttd ffffdtffetgefhudekgeejgeejvdehffefudenucffohhmrghinhepghhithhhuhgsrdgt ohhmnecukfhppeekhedrudejgedrvddtjedrvddujeenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeihphgrnhhkohhvsehfrghsthhmrghilhdr tghomh X-ME-Proxy: Received: from [192.168.1.6] (unknown [85.174.207.217]) by mail.messagingengine.com (Postfix) with ESMTPA id 6A4D23065E98 for ; Wed, 29 Apr 2020 13:43:28 -0400 (EDT) From: Yuri Pankov Subject: nvme on 2019 macbooks To: current@freebsd.org Message-ID: Date: Wed, 29 Apr 2020 20:43:26 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49C5TZ4cp7z4Ynj X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fastmail.com header.s=fm2 header.b=EpNiqRjU; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=MemQVrAG; dmarc=pass (policy=none) header.from=fastmail.com; spf=pass (mx1.freebsd.org: domain of ypankov@fastmail.com designates 66.111.4.28 as permitted sender) smtp.mailfrom=ypankov@fastmail.com X-Spamd-Result: default: False [4.93 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[28.4.111.66.rep.mailspike.net : 127.0.0.18]; R_SPF_ALLOW(0.00)[+ip4:66.111.4.28]; FREEMAIL_FROM(0.00)[fastmail.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[fastmail.com:+,messagingengine.com:+]; DMARC_POLICY_ALLOW(0.00)[fastmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[28.4.111.66.list.dnswl.org : 127.0.5.1]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[217.207.174.85.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[217.207.174.85.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.4]; R_DKIM_ALLOW(0.00)[fastmail.com:s=fm2,messagingengine.com:s=fm2]; NEURAL_HAM_MEDIUM(-0.80)[-0.802,0]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[fastmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[current@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[]; IP_SCORE(0.00)[ip: (-9.83), ipnet: 66.111.4.0/24(-4.89), asn: 11403(-2.69), country: US(-0.05)]; NEURAL_SPAM_LONG(0.83)[0.835,0] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 17:43:32 -0000 I have tried booting latest -current snapshot on 2019 macbook pro 16, and noticed that nvme driver didn't attach, as class reported is 0x018002 and not 0x010802 that we expect in nvme_pci.c. The following linux changes seem to be related: https://github.com/torvalds/linux/commit/66341331ba0d2de4ff421cdc401a1e34de50502a https://github.com/torvalds/linux/commit/d38e9f04ebf667d9cb8185b45bff747485f1d3e9 I have tried adding the exact PCI IDs, but that also fails as number of msix vectors seems to be 0 in nvme_ctrlr_setup_interrupts() and nvme_ctrlr_configure_intx() fails with "unable to allocate shared IRQ". Any hints on how to proceed here? pciconf excerpt: none7@pci0:4:0:0: class=0x018002 rev=0x01 hdr=0x00 vendor=0x106b device=0x2005 subvendor=0x106b subdevice=0x1800 vendor = "Apple Inc." device = "ANS2 NVMe Controller" class = mass storage bar [10] = type Prefetchable Memory, range 64, base 0xc0400000, size 419304, enabled bar [18] = type Prefetchable Memory, range 64, base 0xc1400000, size 524288, enabled bar [20] = type Prefetchable Memory, range 64, base 0xc1600000, size 65536, enabled cap 01[40] = powerspec 3 supports D0 D3 current D0 cap 05[50] = MSI supports 8 messages, 64 bit cap 10[70] = PCI-Express 2 endpoint max data 256(256) RO NS link x4(x4) speed 8.0(8.0) ASPM L1(L1) ClockPM enabled ecap 0001[100] = AER 2 0 fatal 0 non-fatal 1 corrected ecap 0019[148] = PCIe Sec 1 lane errors 0 ecap 0018[168] = LTR 1 ecap 001e[170] = L1 PM Substated 1 ecap 000b[180] = Vendor [1] ID 0002 Rev 1 Length 256 ecap 0015[280] = Resizable BAR 1