Enable the device on NetBSD too (don't rely on firmware to do it for us).

This commit is contained in:
jmcneill 2020-01-17 19:13:25 +00:00
parent 6f25f8641b
commit 99c1972654
1 changed files with 3 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: nouveau_nvkm_engine_device_pci.c,v 1.8 2018/08/27 14:17:36 riastradh Exp $ */
/* $NetBSD: nouveau_nvkm_engine_device_pci.c,v 1.9 2020/01/17 19:13:25 jmcneill Exp $ */
/*
* Copyright 2015 Red Hat Inc.
@ -24,7 +24,7 @@
* Authors: Ben Skeggs <bskeggs@redhat.com>
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_engine_device_pci.c,v 1.8 2018/08/27 14:17:36 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_engine_device_pci.c,v 1.9 2020/01/17 19:13:25 jmcneill Exp $");
#include <core/pci.h>
#include "priv.h"
@ -1673,15 +1673,11 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg,
const struct nvkm_device_pci_vendor *pciv;
const char *name = NULL;
struct nvkm_device_pci *pdev;
#ifndef __NetBSD__
int ret;
#endif
#ifndef __NetBSD__
ret = pci_enable_device(pci_dev);
ret = linux_pci_enable_device(pci_dev);
if (ret)
return ret;
#endif
switch (pci_dev->vendor) {
case 0x10de: pcid = nvkm_device_pci_10de; break;