Date: Thu, 29 Jul 2010 06:27:41 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r210597 - head/sys/dev/pci Message-ID: <201007290627.o6T6RfTF056366@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Thu Jul 29 06:27:41 2010 New Revision: 210597 URL: http://svn.freebsd.org/changeset/base/210597 Log: Fix 'pciconf -a' by providing an implementation of PCIOCATTACHED. Reviewed by: imp MFC after: 1 week Pointed out by: Heymian Wong (heymian at mit.alum.edu) Sponsored by: NetApp Modified: head/sys/dev/pci/pci_user.c Modified: head/sys/dev/pci/pci_user.c ============================================================================== --- head/sys/dev/pci/pci_user.c Thu Jul 29 05:14:59 2010 (r210596) +++ head/sys/dev/pci/pci_user.c Thu Jul 29 06:27:41 2010 (r210597) @@ -735,6 +735,16 @@ getconfexit: bio->pbi_enabled = (value & PCIM_CMD_PORTEN) != 0; error = 0; break; + case PCIOCATTACHED: + error = 0; + io = (struct pci_io *)data; + pcidev = pci_find_dbsf(io->pi_sel.pc_domain, io->pi_sel.pc_bus, + io->pi_sel.pc_dev, io->pi_sel.pc_func); + if (pcidev != NULL) + io->pi_data = device_is_attached(pcidev); + else + error = ENODEV; + break; default: error = ENOTTY; break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007290627.o6T6RfTF056366>