cvs commit: src/sys/conf files.amd64 files.i386 src/sys/modules/ndis Makefile src/sys/compat/ndis kern_ndis.c kern_windrv.c ntoskrnl_var.h subr_usbd.c usbd_var.h src/sys/dev/if_ndis if_ndis.c if_ndis_pccard.c if_ndis_pci.c ...

Bill Paul wpaul at FreeBSD.org
Thu Feb 24 21:49:15 GMT 2005


wpaul       2005-02-24 21:49:14 UTC

  FreeBSD src repository

  Modified files:
    sys/conf             files.amd64 files.i386 
    sys/modules/ndis     Makefile 
    sys/compat/ndis      kern_ndis.c kern_windrv.c ntoskrnl_var.h 
    sys/dev/if_ndis      if_ndis.c if_ndis_pccard.c if_ndis_pci.c 
  Added files:
    sys/compat/ndis      subr_usbd.c usbd_var.h 
    sys/dev/if_ndis      if_ndis_usb.c 
  Log:
  - Correct one aspect of the driver_object/device_object/IRP framework:
    when we create a PDO, the driver_object associated with it is that
    of the parent driver, not the driver we're trying to attach. For
    example, if we attach a PCI device, the PDO we pass to the NdisAddDevice()
    function should contain a pointer to fake_pci_driver, not to the NDIS
    driver itself. For PCI or PCMCIA devices this doesn't matter because
    the child never needs to talk to the parent bus driver, but for USB,
    the child needs to be able to send IRPs to the parent USB bus driver, and
    for that to work the parent USB bus driver has to be hung off the PDO.
  
    This involves modifying windrv_lookup() so that we can search for
    bus drivers by name, if necessary. Our fake bus drivers attach themselves
    as "PCI Bus," "PCCARD Bus" and "USB Bus," so we can search for them
    using those names.
  
    The individual attachment stubs now create and attach PDOs to the
    parent bus drivers instead of hanging them off the NDIS driver's
    object, and in if_ndis.c, we now search for the correct driver
    object depending on the bus type, and use that to find the correct PDO.
  
    With this fix, I can get my sample USB ethernet driver to deliver
    an IRP to my fake parent USB bus driver's dispatch routines.
  
  - Add stub modules for USB support: subr_usbd.c, usbd_var.h and
    if_ndis_usb.c. The subr_usbd.c module is hooked up the build
    but currently doesn't do very much. It provides the stub USB
    parent driver object and a dispatch routine for
    IRM_MJ_INTERNAL_DEVICE_CONTROL. The only exported function at
    the moment is USBD_GetUSBDIVersion(). The if_ndis_usb.c stub
    compiles, but is not hooked up to the build yet. I'm putting
    these here so I can keep them under source code control as I
    flesh them out.
  
  Revision  Changes    Path
  1.67      +4 -0      src/sys/compat/ndis/kern_ndis.c
  1.4       +20 -5     src/sys/compat/ndis/kern_windrv.c
  1.26      +1 -1      src/sys/compat/ndis/ntoskrnl_var.h
  1.1       +156 -0    src/sys/compat/ndis/subr_usbd.c (new)
  1.1       +56 -0     src/sys/compat/ndis/usbd_var.h (new)
  1.56      +1 -0      src/sys/conf/files.amd64
  1.519     +1 -0      src/sys/conf/files.i386
  1.80      +32 -11    src/sys/dev/if_ndis/if_ndis.c
  1.9       +2 -4      src/sys/dev/if_ndis/if_ndis_pccard.c
  1.11      +1 -3      src/sys/dev/if_ndis/if_ndis_pci.c
  1.1       +176 -0    src/sys/dev/if_ndis/if_ndis_usb.c (new)
  1.9       +1 -1      src/sys/modules/ndis/Makefile


More information about the cvs-all mailing list