git: d4941306264f - stable/13 - bhyve nvme: Remove redundant AER Limit checks

From: Chuck Tuffli <chuck_at_FreeBSD.org>
Date: Mon, 21 Feb 2022 21:57:56 UTC
The branch stable/13 has been updated by chuck:

URL: https://cgit.FreeBSD.org/src/commit/?id=d4941306264f2edd12bb2034b7445f47bdd72f37

commit d4941306264f2edd12bb2034b7445f47bdd72f37
Author:     Chuck Tuffli <chuck@FreeBSD.org>
AuthorDate: 2022-01-30 07:07:29 +0000
Commit:     Chuck Tuffli <chuck@FreeBSD.org>
CommitDate: 2022-02-22 03:26:18 +0000

    bhyve nvme: Remove redundant AER Limit checks
    
    The NVMe emulation checked if the Asynchronous Event Request Limit
    (a.k.a AERL) would be exceeded in pci_nvme_aer_add(), but this function
    is only called from nvme_opc_async_event_req() which also checks for
    exceeding the AERL.
    
    (cherry picked from commit 45ab4076f36b428595ba1ce200515fda6af58a76)
---
 usr.sbin/bhyve/pci_nvme.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
index 71abfa17deae..682f7561329c 100644
--- a/usr.sbin/bhyve/pci_nvme.c
+++ b/usr.sbin/bhyve/pci_nvme.c
@@ -744,9 +744,6 @@ pci_nvme_aer_add(struct pci_nvme_softc *sc, uint16_t cid)
 {
 	struct pci_nvme_aer *aer = NULL;
 
-	if (pci_nvme_aer_limit_reached(sc))
-		return (-1);
-
 	aer = calloc(1, sizeof(struct pci_nvme_aer));
 	if (aer == NULL)
 		return (-1);