aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/if_ndis/if_ndis_usb.c
Commit message (Collapse)AuthorAgeFilesLines
* ndis(4): remove as previous announcedBrooks Davis2021-01-251-240/+0
| | | | | | | | | | | | | | nids(4) was a clever idea in the early 2000's when the market was flooded with 10/100 NICs with Windows-only drivers, but that hasn't been the case for ages and the driver has had no meaningful maintenance in ages. It only supports Windows-XP era drivers. Also remove: - ndis support from wpa_supplicant - ndiscvt(8) Reviewed By: emaste, bcr (manpages) Differential Revision: https://reviews.freebsd.org/D27609
* ndis: Per user request, delay removal to 14Brooks Davis2021-01-111-1/+1
| | | | | | | We will remove ndis shortly after the 13 branch. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D28049
* ndis(4): expand deprecation to the whole driverBrooks Davis2020-12-111-0/+2
| | | | | | | | | | | | | | | nids(4) was a clever idea in the early 2000's when the market was flooded with 10/100 NICs with Windows-only drivers, but that hasn't been the case for ages and the driver has had no meaningful maintenance in ages. It only supports Windows-XP era drivers. Reviewed by: imp, bcr MFC after: 3 days Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27527 Notes: svn path=/head/; revision=368561
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-1/+2
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-10-261-0/+1
| | | | | | | | | | | to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257176
* - There's no need to overwrite the default device method with the defaultMarius Strobl2011-11-221-3/+1
| | | | | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID. Notes: svn path=/head/; revision=227843
* Revert the ndis part of r212122, windrv_stub.c already adds a MODULE_VERSIONAndrew Thompson2011-01-221-1/+0
| | | | | | | | | | | and this breaks loading miniport drivers from loader.conf Reported by: Yuri <yuri^rawbw^com> Submitted by: Paul B Mahol MFC after: 3 days Notes: svn path=/head/; revision=217727
* Add missing MODULE_VERSION() definitions, this resolves problems aroundAndrew Thompson2010-09-011-0/+1
| | | | | | | | | | | duplicate module loads. PR: usb/125736 Submitted by: danger, mm Reviewed by: hselasky Notes: svn path=/head/; revision=212122
* Remove extraneous semicolons, no functional changes.Martin Blapp2010-01-071-1/+1
| | | | | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week Notes: svn path=/head/; revision=201758
* Set correct USB device descriptionAndrew Thompson2009-12-221-0/+1
| | | | | | | Submitted by: Paul B Mahol Notes: svn path=/head/; revision=200824
* Big style cleanup. While there remove references to FreeBSD versionsRui Paulo2009-11-021-2/+2
| | | | | | | | | older than 6.0. Submitted by: Paul B Mahol <onemda at gmail.com> Notes: svn path=/head/; revision=198786
* - Make struct usb_xfer opaque so that drivers can not access the internalsAndrew Thompson2009-06-231-1/+1
| | | | | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h Notes: svn path=/head/; revision=194677
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.Andrew Thompson2009-06-151-3/+3
| | | | Notes: svn path=/head/; revision=194228
* Commit missed driver_info to driver_ivar change in usb_attach_args.Andrew Thompson2009-06-081-2/+2
| | | | | | | Pointed out by: kib Notes: svn path=/head/; revision=193742
* s/usb2_/usb_/ on all C structs for the USB stack.Andrew Thompson2009-05-281-3/+3
| | | | Notes: svn path=/head/; revision=192984
* Fix a few variable renames of usb2_mode outside dev/usb.Andrew Thompson2009-05-211-1/+1
| | | | Notes: svn path=/head/; revision=192505
* Some NDIS USB drivers try to call URB funcs like URB_FUNCTION_VENDOR_xxxWeongyo Jeong2009-03-181-0/+4
| | | | | | | | | | or URB_FUNCTION_CLASS_xxx with HAL preemption lock that means it's non-sleepable during USB requests though usb2_do_request() requires a sleep so it needs to send queries to the default pipe without those interfaces to avoid sleep. Notes: svn path=/head/; revision=189950
* o change a lock model based on HAL preemption lock to a normal mtx.Weongyo Jeong2009-03-121-2/+6
| | | | | | | | | | | | | | | | | | Based on the HAL preemption lock there is a problem on SMP machines and causes a panic. o When a device detached the current tactic to detach NDIS USB driver is to call SURPRISE_REMOVED event. So it don't need to call ndis_halt_nic() again. This fixes some page faults when some drivers work abnormal. o it assumes now that URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER is in DISPATCH_LEVEL (non-sleepable) and as further work URB_FUNCTION_VENDOR_XXX and URB_FUNCTION_CLASS_XXX should be. Reviewed by: Hans Petter Selasky <hselasky_at_freebsd.org> Tested by: Paul B. Mahol <onemda_at_gmail.com> Notes: svn path=/head/; revision=189719
* o port NDIS USB support from USB1 to the new usb(USB2).Weongyo Jeong2009-03-071-51/+26
| | | | | | | | | | | | o implement URB_FUNCTION_ABORT_PIPE handling. o remove unused code related with canceling the timer list for USB drivers. o whitespace cleanup and style(9) Obtained from: hps's original patch Notes: svn path=/head/; revision=189488
* Move usb to a graveyard location under sys/legacy/dev, it is intended that theAndrew Thompson2009-02-231-4/+4
| | | | | | | | | | new USB2 stack will fully replace this for 8.0. Remove kernel modules, a subsequent commit will update conf/files. Unhook usbdevs from the build. Notes: svn path=/head/; revision=188939
* Integrate the NDIS USB support code to CURRENT.Weongyo Jeong2008-12-271-2/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now the NDISulator supports NDIS USB drivers that it've tested with devices as follows: - Anygate XM-142 (Conexant) - Netgear WG111v2 (Realtek) - U-Khan UW-2054u (Marvell) - Shuttle XPC Accessory PN20 (Realtek) - ipTIME G054U2 (Ralink) - UNiCORN WL-54G (ZyDAS) - ZyXEL G-200v2 (ZyDAS) All of them succeeded to attach and worked though there are still some problems that it's expected to be solved. To use NDIS USB support, you should rebuild and install ndiscvt(8) and if you encounter a problem to attach please set `hw.ndisusb.halt' to 0 then retry. I expect no changes of the NDIS code for PCI, PCMCIA devices. Obtained from: //depot/projects/ndisusb/... Notes: svn path=/head/; revision=186507
* finish removing usb_port.h macros.Warner Losh2007-06-181-14/+14
| | | | | | | | Use device_foo_t to declare functions a little de-k&r Notes: svn path=/head/; revision=170934
* Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate fromWarner Losh2007-06-121-3/+3
| | | | | | | usb_port.h. They aren't needed, and are a legacy of this code's past. Notes: svn path=/head/; revision=170612
* Static -> static.Matt Jacob2006-09-071-3/+3
| | | | Notes: svn path=/head/; revision=162102
* Catch up with USB changes, device_ptr_t was removed, we need device_t here.Tom Rhodes2006-09-071-3/+3
| | | | Notes: svn path=/head/; revision=162101
* Throw the switch on the new driver generation/loading mechanism. FromBill Paul2005-04-241-23/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | here on in, if_ndis.ko will be pre-built as a module, and can be built into a static kernel (though it's not part of GENERIC). Drivers are created using the new ndisgen(8) script, which uses ndiscvt(8) under the covers, along with a few other tools. The result is a driver module that can be kldloaded into the kernel. A driver with foo.inf and foo.sys files will be converted into foo_sys.ko (and foo_sys.o, for those who want/need to make static kernels). This module contains all of the necessary info from the .INF file and the driver binary image, converted into an ELF module. You can kldload this module (or add it to /boot/loader.conf) to have it loaded automatically. Any required firmware files can be bundled into the module as well (or converted/loaded separately). Also, add a workaround for a problem in NdisMSleep(). During system bootstrap (cold == 1), msleep() always returns 0 without actually sleeping. The Intel 2200BG driver uses NdisMSleep() to wait for the NIC's firmware to come to life, and fails to load if NdisMSleep() doesn't actually delay. As a workaround, if msleep() (and hence ndis_thsuspend()) returns 0, use a hard DELAY() to sleep instead). This is not really the right thing to do, but we can't really do much else. At the very least, this makes the Intel driver happy. There are probably other drivers that fail in this way during bootstrap. Unfortunately, the only workaround for those is to avoid pre-loading them and kldload them once the system is running instead. Notes: svn path=/head/; revision=145485
* Use 0 instead if NULL for vm_offset_t argument to windrv_lookup() toBill Paul2005-02-281-2/+2
| | | | | | | silence compiler warnings. Notes: svn path=/head/; revision=142804
* Correct e-mail address in copyright.Bill Paul2005-02-251-1/+1
| | | | Notes: svn path=/head/; revision=142415
* Apparently, the probe routine in if_ndis_usb.c can be called twiceBill Paul2005-02-241-9/+7
| | | | | | | | | | | | | for a given device in some circumstances, so move the PDO creation to the attach routine so we don't end up creating two PDOs. Also, when we skip the call to ndis_convert_res() in if_ndis.c:ndis_attach(), initialize sc->ndis_block->nmb_rlist to NULL. We don't explicitly zero the miniport block, so this will make sure ndis_unload_driver() does the right thing. Notes: svn path=/head/; revision=142408
* - Correct one aspect of the driver_object/device_object/IRP framework:Bill Paul2005-02-241-0/+176
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. Notes: svn path=/head/; revision=142399