aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/ndis
Commit message (Collapse)AuthorAgeFilesLines
* Use the cprd_mem field when setting the start and length for a memoryRebecca Cran2011-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 Notes: svn path=/head/; revision=218985
* Fix typos - remove duplicate "the".Rebecca Cran2011-02-211-1/+1
| | | | | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days Notes: svn path=/head/; revision=218909
* Fix a few more SYSCTL_PROC() that were missing a CTLFLAG type specifier.Matthew D Fleming2011-01-191-2/+3
| | | | Notes: svn path=/head/; revision=217566
* Merge amd64 and i386 bus.h and move the resulting header to x86. ReplaceTijl Coosemans2010-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) Notes: svn path=/head/; revision=216592
* Implement NdisGetRoutineAddress and MmGetSystemRoutineAddress used inBernhard Schmidt2010-12-065-0/+40
| | | | | | | | | newer Ralink drivers. Submitted by: Paul B Mahol <onemda at gmail.com> Notes: svn path=/head/; revision=216242
* Add a dummy for IoOpenDeviceRegistryKey().Bernhard Schmidt2010-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 Notes: svn path=/head/; revision=216050
* Some drivers rely on the existence of certain keys. The Atheros 9xxxBernhard Schmidt2010-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 Notes: svn path=/head/; revision=216049
* Add prototype for InitializeSListHead().Bernhard Schmidt2010-11-231-0/+1
| | | | Notes: svn path=/head/; revision=215782
* Add a few functions used in newer drivers. Fix RtlCompareMemory() whileBernhard Schmidt2010-11-233-6/+149
| | | | | | | | | here. Submitted by: Paul B Mahol <onemda@gmail.com> Notes: svn path=/head/; revision=215779
* Resurrect amd64 support.Bernhard Schmidt2010-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> Notes: svn path=/head/; revision=215708
* Prefer pmap_extract() over pmap_kextract() as done in MmIsAddressValid().Bernhard Schmidt2010-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> Notes: svn path=/head/; revision=215707
* Fix a panic on i386 for drivers using MmAllocateContiguousMemory()Bernhard Schmidt2010-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> Notes: svn path=/head/; revision=215420
* Use kmem_alloc_contig() to honour the cache_type variable.Bernhard Schmidt2010-11-172-6/+41
| | | | | | | Pointed out by: alc Notes: svn path=/head/; revision=215419
* According to specs for MmAllocateContiguousMemorySpecifyCache() physicallyBernhard Schmidt2010-11-111-6/+3
| | | | | | | | | contiguous memory with requested restrictions must be allocated. Submitted by: Paul B Mahol <onemda at gmail.com> Notes: svn path=/head/; revision=215135
* Remove 4.x, 5.x and 6.x compatibility bits.Bernhard Schmidt2010-11-043-68/+0
| | | | | | | Submitted by: Paul B Mahol <onemda at gmail.com> Notes: svn path=/head/; revision=214798
* Use the printf-like capability from kproc_create().Andrew Thompson2010-10-051-8/+3
| | | | | | | Submitted by: Paul B Mahol Notes: svn path=/head/; revision=213461
* ANSIfy prototypes in subr_usbd.c.Ed Schouten2010-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 Notes: svn path=/head/; revision=209102
* Revert a functional change that snuck in.Rui Paulo2009-11-021-1/+1
| | | | Notes: svn path=/head/; revision=198819
* Fix a non-style change that snuck in.Rui Paulo2009-11-021-1/+1
| | | | | | | Spotted by: danfe Notes: svn path=/head/; revision=198816
* Big style cleanup. While there remove references to FreeBSD versionsRui Paulo2009-11-027-682/+360
| | | | | | | | | older than 6.0. Submitted by: Paul B Mahol <onemda at gmail.com> Notes: svn path=/head/; revision=198786
* provides a extra write buffer when the NDIS driver want to send aWeongyo Jeong2009-06-261-2/+3
| | | | | | | | | request whose body has some datas through the default pipe. Tested by: Nikos Vassiliadis <nvass9573 at gmx.com> Notes: svn path=/head/; revision=195031
* Fix a typeo in the frame len function to unbreak the build, make it shorterAndrew Thompson2009-06-231-1/+1
| | | | | | | while I am here. Notes: svn path=/head/; revision=194682
* - Make struct usb_xfer opaque so that drivers can not access the internalsAndrew Thompson2009-06-233-52/+62
| | | | | | | - 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-27/+27
| | | | Notes: svn path=/head/; revision=194228
* Rename usb pipes to endpoints as it better represents what they are, and structAndrew Thompson2009-06-071-3/+3
| | | | | | | usb_pipe may be used for a different purpose later on. Notes: svn path=/head/; revision=193644
* s/usb2_/usb_/ on all typedefs for the USB stack.Andrew Thompson2009-05-291-16/+16
| | | | Notes: svn path=/head/; revision=193045
* s/usb2_/usb_/ on all C structs for the USB stack.Andrew Thompson2009-05-281-17/+17
| | | | Notes: svn path=/head/; revision=192984
* Remove an unused variable.Antoine Brodin2009-05-241-1/+1
| | | | Notes: svn path=/head/; revision=192692
* Remove an unused variable.Christian Brueffer2009-05-141-2/+0
| | | | | | | | Found with: Coverity Prevent(tm) CID: 1167 Notes: svn path=/head/; revision=192090
* Fix memory leak in an error case.Christian Brueffer2009-05-131-0/+3
| | | | | | | | | Found with: Coverity Prevent(tm) CID: 371 MFC after: 2 weeks Notes: svn path=/head/; revision=192036
* MFp4 //depot/projects/usb@159909Andrew Thompson2009-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 Notes: svn path=/head/; revision=190734
* Some NDIS USB drivers try to call URB funcs like URB_FUNCTION_VENDOR_xxxWeongyo Jeong2009-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. Notes: svn path=/head/; revision=189950
* If the caller sets irp_usriostat or irp_usrevent it try to process itWeongyo Jeong2009-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. Notes: svn path=/head/; revision=189942
* grab NDIS USB lock instead of HAL preemption. This change should beWeongyo Jeong2009-03-171-3/+4
| | | | | | | happened in the previous. Notes: svn path=/head/; revision=189917
* use usb2_desc_foreach() to iterate the USB config descriptor instread ofWeongyo Jeong2009-03-161-4/+4
| | | | | | | | | accessing structures directly to check some invalid descriptors. Pointed by: hps Notes: svn path=/head/; revision=189874
* o change a lock model based on HAL preemption lock to a normal mtx.Weongyo Jeong2009-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> Notes: svn path=/head/; revision=189719
* o port NDIS USB support from USB1 to the new usb(USB2).Weongyo Jeong2009-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 Notes: svn path=/head/; revision=189488
* Change the functions to ANSI in those cases where it breaks promotionRoman Divacky2009-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 Notes: svn path=/head/; revision=189004
* Move usb to a graveyard location under sys/legacy/dev, it is intended that theAndrew Thompson2009-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. Notes: svn path=/head/; revision=188939
* Change some movl's to mov's. Newer GAS no longer accept 'movl' instructionsDavid E. O'Brien2009-01-311-1/+1
| | | | | | | | | for moving between a segment register and a 32-bit memory location. Looked at by: jhb Notes: svn path=/head/; revision=187948
* Remove unused variable.Ganbold Tsagaankhuu2008-12-281-3/+0
| | | | | | | | | | Found with: Coverity Prevent(tm) CID: 542 Approved by: weongyo Notes: svn path=/head/; revision=186540
* fix a bug to handling the argument that it passed `device_t' but it'sWeongyo Jeong2008-12-271-1/+3
| | | | | | | | handled as `struct ndis_softc'. It'll cause a panic when the driver is detached. Notes: svn path=/head/; revision=186509
* Integrate the NDIS USB support code to CURRENT.Weongyo Jeong2008-12-278-42/+1490
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Allow PAGE_SHIFT to already be defined.Andrew Thompson2008-09-131-0/+2
| | | | | | | Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=183003
* Decontextualize the couplet VOP_GETATTR / VOP_SETATTR as the passed threadAttilio Rao2008-08-281-1/+1
| | | | | | | | | was always curthread and totally unuseful. Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com> Notes: svn path=/head/; revision=182371
* when NDIS framework try to query/set informations NDIS drivers canWeongyo Jeong2008-07-231-5/+7
| | | | | | | | | | | | | return NDIS_STATUS_PENDING. In this case, it's waiting for 5 secs to get the response from drivers now. However, some NDIS drivers can send the response before NDIS framework gets ready to receive it so we might always be blocked for 5 secs in current implementation. NDIS framework should reset the event before calling NDIS driver's callback not after. MFC after: 1 month Notes: svn path=/head/; revision=180754
* Silence warning about missing IoGetDeviceObjectPointer by implementingColeman Kane2008-06-151-0/+13
| | | | | | | | | | | a simple stub that always returns STATUS_SUCCESS. Submitted by: Paul B. Mahol <onemda@gmail.com> Reviewed by: thompsa MFC after: 1 week Notes: svn path=/head/; revision=179806
* fix a page fault that it occurred during ifp is NULL. This bug happensWeongyo Jeong2008-06-111-2/+2
| | | | | | | | when NDIS driver's initialization is failed and NDIS driver's trying to call NdisWriteErrorLogEntry(). Notes: svn path=/head/; revision=179720
* Fix a panic that a priority value which is passed to cv_broadcastpri(9)Weongyo Jeong2008-05-301-4/+6
| | | | | | | | | | can be < 0. We don't ignore a `increment' argument but at least we keep a priority value of NDIS threads over PRI_MIN_KERN. Reviewed by: thompsa Notes: svn path=/head/; revision=179423
* Fix a panic when it occurred during initializing the ndis driver becauseWeongyo Jeong2008-05-151-0/+4
| | | | | | | | | | it try to read network address through ifnet structure which is NULL until the ndis driver's initialization is finished. Reviewed by: thompsa Notes: svn path=/head/; revision=179009