From 16416501a995d5e0bbb51ba0f371590d3dc0c00a Mon Sep 17 00:00:00 2001 From: wpaul Date: Sun, 11 Jul 2004 00:19:30 +0000 Subject: Make NdisReadPcmciaAttributeMemory() and NdisWritePcmciaAttributeMemory() actually work. Make the PCI and PCCARD attachments provide a bus_get_resource_list() method so that resource listing for PCCARD works. PCCARD does not have a bus_get_resource_list() method (yet), so I faked up the resource list management in if_ndis_pccard.c, and added bus_get_resource_list() methods to both if_ndis_pccard.c and if_ndis_pci.c. The one in the PCI attechment just hands off to the PCI bus code. The difference is transparent to the NDIS resource handler code. Fixed ndis_open_file() so that opening files which live on NFS filesystems work: pass an actual ucred structure to VOP_GETATTR() (NFS explodes if the ucred structure is NOCRED). Make NdisMMapIoSpace() handle mapping of PCMCIA attribute memory resources correctly. Turn subr_ndis.c:my_strcasecmp() into ndis_strcasecmp() and export it so that if_ndis_pccard.c can use it, and junk the other copy of my_strcasecmp() from if_ndis_pccard.c. --- sys/compat/ndis/kern_ndis.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/compat/ndis/kern_ndis.c') diff --git a/sys/compat/ndis/kern_ndis.c b/sys/compat/ndis/kern_ndis.c index bbfff77..59c9d38 100644 --- a/sys/compat/ndis/kern_ndis.c +++ b/sys/compat/ndis/kern_ndis.c @@ -853,7 +853,8 @@ ndis_convert_res(arg) rl->cprl_count = sc->ndis_rescnt; prd = rl->cprl_partial_descs; - brl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev); + brl = BUS_GET_RESOURCE_LIST(dev, dev); + if (brl != NULL) { /* -- cgit v1.1