summaryrefslogtreecommitdiffstats
path: root/sys/compat/ndis
Commit message (Collapse)AuthorAgeFilesLines
* Use m_get/m_gethdr instead of compat macros.glebius2013-03-151-6/+2
| | | | Sponsored by: Nginx, Inc.
* Fix wrong assignment.delphij2013-03-011-1/+1
| | | | | | Submitted by: Sascha Wildner <saw online de> Obtained from: DragonFly rev 9568dd07a22a136e380e6c19a8ea188eb92976d5 MFC after: 2 weeks
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-051-3/+3
| | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually
* Remove the support for using non-mpsafe filesystem modules.kib2012-10-221-10/+3
| | | | | | | | | | | | In particular, do not lock Giant conditionally when calling into the filesystem module, remove the VFS_LOCK_GIANT() and related macros. Stop handling buffers belonging to non-mpsafe filesystems. The VFS_VERSION is bumped to indicate the interface change which does not result in the interface signatures changes. Conducted and reviewed by: attilio Tested by: pho
* Make sure that each va_start has one and only one matching va_end,kevlo2012-05-291-0/+1
| | | | especially in error cases.
* Fix race condition in KfRaiseIrql().brucec2012-03-041-4/+6
| | | | | | | | | | After getting the current irql, if the kthread gets preempted and subsequently runs on a different CPU, the saved irql could be wrong. Also, correct the panic string. PR: kern/165630 Submitted by: Vladislav Movchan <vladislav.movchan at gmail.com>
* Fix found places where uio_resid is truncated to int.kib2012-02-211-1/+2
| | | | | | | | | Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from the usermode. Discussed with: bde, das (previous versions) MFC after: 1 month
* In sys/compat/ndis/subr_ntoskrnl.c, change the RtlFillMemory functiondim2011-12-301-4/+1
| | | | | | | | definition from K&R to ANSI, to avoid a clang warning about the uint8_t parameter being promoted to int, which is not compatible with the type declared in the earlier prototype. MFC after: 1 week
* Use the cprd_mem field when setting the start and length for a memorybrucec2011-02-231-2/+2
| | | | | | | | | resource - the layout of cprd_port is identical but using cprd_mem makes the code easier to understand. PR: kern/118493 Submitted by: Weongyo Jeong <weongyo.jeong at gmail.com> MFC after: 3 days
* Fix typos - remove duplicate "the".brucec2011-02-211-1/+1
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Fix a few more SYSCTL_PROC() that were missing a CTLFLAG type specifier.mdf2011-01-191-2/+3
|
* Merge amd64 and i386 bus.h and move the resulting header to x86. Replacetijl2010-12-201-7/+2
| | | | | | | | | the original amd64 and i386 headers with stubs. Rename (AMD64|I386)_BUS_SPACE_* to X86_BUS_SPACE_* everywhere. Reviewed by: imp (previous version), jhb Approved by: kib (mentor)
* Implement NdisGetRoutineAddress and MmGetSystemRoutineAddress used inbschmidt2010-12-065-0/+40
| | | | | | newer Ralink drivers. Submitted by: Paul B Mahol <onemda at gmail.com>
* Add a dummy for IoOpenDeviceRegistryKey().bschmidt2010-11-291-0/+10
| | | | | | | | With that change the Atheros 9xxx driver is actually usable and does not panic anymore. Submitted by: Paul B Mahol <onemda at gmail.com> MFC after: 2 weeks
* Some drivers rely on the existence of certain keys. The Atheros 9xxxbschmidt2010-11-291-0/+10
| | | | | | | | driver for example requests the NetCfgInstanceId but doesn't check the returned status code and will happily access random memory instead. Submitted by: Paul B Mahol <onemda at gmail.com> MFC after: 2 weeks
* Add prototype for InitializeSListHead().bschmidt2010-11-231-0/+1
|
* Add a few functions used in newer drivers. Fix RtlCompareMemory() whilebschmidt2010-11-233-6/+149
| | | | | | here. Submitted by: Paul B Mahol <onemda@gmail.com>
* Resurrect amd64 support.bschmidt2010-11-224-8/+95
| | | | | | | | | | | | - Many drivers on amd64 are picking system uptime, interrupt time and ticks via global data structure instead of calling functions for performance reasons. For now just patch such address so driver will not trigger page fault when trying to access such data. In future, additional callout may be added to update data in periodic intervals. - On amd64 we need to allocate "shadow space" on stack before calling any function. Submitted by: Paul B Mahol <onemda at gmail.com>
* Prefer pmap_extract() over pmap_kextract() as done in MmIsAddressValid().bschmidt2010-11-221-1/+7
| | | | | | | According to the comment for MmIsAddressValid() there are issues on PAE kernels using pmap_kextract(). Submitted by: Paul B Mahol <onemda at gmail.com>
* Fix a panic on i386 for drivers using MmAllocateContiguousMemory()bschmidt2010-11-171-2/+2
| | | | | | | | | | | | and MmAllocateContiguousMemorySpecifyCache(). Those two functions take 64-bit variable(s) for their arguments. On i386 that takes additional 32-bit variable per argument. This is required so that windrv_wrap() can correctly wrap function that miniport driver calls with stdcall convention. Similar explanation is provided in subr_ndis.c for other functions. Submitted by: Paul B Mahol <onemda at gmail.com>
* Use kmem_alloc_contig() to honour the cache_type variable.bschmidt2010-11-172-6/+41
| | | | Pointed out by: alc
* According to specs for MmAllocateContiguousMemorySpecifyCache() physicallybschmidt2010-11-111-6/+3
| | | | | | contiguous memory with requested restrictions must be allocated. Submitted by: Paul B Mahol <onemda at gmail.com>
* Remove 4.x, 5.x and 6.x compatibility bits.bschmidt2010-11-043-68/+0
| | | | Submitted by: Paul B Mahol <onemda at gmail.com>
* Use the printf-like capability from kproc_create().thompsa2010-10-051-8/+3
| | | | Submitted by: Paul B Mahol
* ANSIfy prototypes in subr_usbd.c.ed2010-06-121-72/+29
| | | | | | | | | | | | | | | | | | | Clang generates the following warnings when building subr_usbd.c: | subr_usbd.c:598:13: warning: promoted type 'int' of K&R function | parameter is not compatible with the parameter type 'uint8_t' (aka | 'unsigned char') declared in a previous prototype | subr_usbd.c:627:13: warning: promoted type 'int' of K&R function | parameter is not compatible with the parameter type 'uint8_t' (aka | 'unsigned char') declared in a previous prototype | subr_usbd.c:649:13: warning: promoted type 'int' of K&R function | parameter is not compatible with the parameter type 'uint8_t' (aka | 'unsigned char') declared in a previous prototype Instead of just ANSIfying these three prototypes, do it for the entire file. Spotted by: clang
* Revert a functional change that snuck in.rpaulo2009-11-021-1/+1
|
* Fix a non-style change that snuck in.rpaulo2009-11-021-1/+1
| | | | Spotted by: danfe
* Big style cleanup. While there remove references to FreeBSD versionsrpaulo2009-11-027-682/+360
| | | | | | older than 6.0. Submitted by: Paul B Mahol <onemda at gmail.com>
* provides a extra write buffer when the NDIS driver want to send aweongyo2009-06-261-2/+3
| | | | | | request whose body has some datas through the default pipe. Tested by: Nikos Vassiliadis <nvass9573 at gmx.com>
* Fix a typeo in the frame len function to unbreak the build, make it shorterthompsa2009-06-231-1/+1
| | | | while I am here.
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-233-52/+62
| | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.thompsa2009-06-151-27/+27
|
* Rename usb pipes to endpoints as it better represents what they are, and structthompsa2009-06-071-3/+3
| | | | usb_pipe may be used for a different purpose later on.
* s/usb2_/usb_/ on all typedefs for the USB stack.thompsa2009-05-291-16/+16
|
* s/usb2_/usb_/ on all C structs for the USB stack.thompsa2009-05-281-17/+17
|
* Remove an unused variable.antoine2009-05-241-1/+1
|
* Remove an unused variable.brueffer2009-05-141-2/+0
| | | | | Found with: Coverity Prevent(tm) CID: 1167
* Fix memory leak in an error case.brueffer2009-05-131-0/+3
| | | | | | Found with: Coverity Prevent(tm) CID: 371 MFC after: 2 weeks
* MFp4 //depot/projects/usb@159909thompsa2009-04-051-12/+12
| | | | | | | | | | | | | - make usb2_power_mask_t 16-bit - remove "usb2_config_sub" structure from "usb2_config". To compensate for this "usb2_config" has a new field called "usb_mode" which select for which mode the current xfer entry is active. Options are: a) Device mode only b) Host mode only (default-by-zero) c) Both modes. This change was scripted using the following sed script: "s/\.mh\././g". - the standard packet size table in "usb_transfer.c" is now a function, hence the code for the function uses less memory than the table itself. Submitted by: Hans Petter Selasky
* Some NDIS USB drivers try to call URB funcs like URB_FUNCTION_VENDOR_xxxweongyo2009-03-181-52/+278
| | | | | | | 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.
* If the caller sets irp_usriostat or irp_usrevent it try to process itweongyo2009-03-181-10/+9
| | | | | | whatever the IRP flag is because some drivers (eg. RTL8187L NDIS driver) call IoCompleteRequest() without setting flags. It will prevent waiting a event forever at attach.
* grab NDIS USB lock instead of HAL preemption. This change should beweongyo2009-03-171-3/+4
| | | | happened in the previous.
* use usb2_desc_foreach() to iterate the USB config descriptor instread ofweongyo2009-03-161-4/+4
| | | | | | accessing structures directly to check some invalid descriptors. Pointed by: hps
* o change a lock model based on HAL preemption lock to a normal mtx.weongyo2009-03-123-44/+117
| | | | | | | | | | | | | | | 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>
* o port NDIS USB support from USB1 to the new usb(USB2).weongyo2009-03-0713-1772/+1676
| | | | | | | | | 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
* Change the functions to ANSI in those cases where it breaks promotionrdivacky2009-02-245-237/+81
| | | | | | | | to int rule. See ISO C Standard: SS6.7.5.3:15. Approved by: kib (mentor) Reviewed by: warner Tested by: silence on -current
* Move usb to a graveyard location under sys/legacy/dev, it is intended that thethompsa2009-02-234-11/+11
| | | | | | | 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.
* Change some movl's to mov's. Newer GAS no longer accept 'movl' instructionsobrien2009-01-311-1/+1
| | | | | | for moving between a segment register and a 32-bit memory location. Looked at by: jhb
* Remove unused variable.ganbold2008-12-281-3/+0
| | | | | | | Found with: Coverity Prevent(tm) CID: 542 Approved by: weongyo
* fix a bug to handling the argument that it passed `device_t' but it'sweongyo2008-12-271-1/+3
| | | | | handled as `struct ndis_softc'. It'll cause a panic when the driver is detached.
OpenPOWER on IntegriCloud