Commit Graph

44438 Commits

Author SHA1 Message Date
Bill Paul
137bcec3f9 Modify if_ndis.c so that the MiniportISR function runs in ndis_intr()
and MiniportHandleInterrupt() is fired off later via a task queue in
ndis_intrtask(). This more accurately follows the NDIS interrupt handling
model, where the ISR does a minimal amount of work in interrupt context
and the handler is defered and run at a lower priority.

Create a separate ndis_intrmtx mutex just for the guarding the ISR.

Modify NdisSynchronizeWithInterrupt() to aquire the ndis_intrmtx
mutex before invoking the synchronized procedure. (The purpose of
this function is to provide mutual exclusion for code that shares
variables with the ISR.)

Modify NdisMRegisterInterrupt() to save a pointer to the miniport
block in the ndis_miniport_interrupt structure so that
NdisSynchronizeWithInterrupt() can grab it later and derive
ndis_intrmtx from it.
2004-01-04 21:22:25 +00:00
Alan Cox
2f7af3db57 Simplify the various pager allocation routines by computing the desired
object size once and assigning that value to a local variable.
2004-01-04 20:55:15 +00:00
Bill Paul
209dd08745 Implement NdisScheduleWorkItem() and RtlCompareMemory().
Also, call the libinit and libfini routines from the modevent
handler in kern_ndis.c. This simplifies the initialization a little.
2004-01-04 07:47:33 +00:00
Nate Lawson
9ca39f70b1 This commit was generated by cvs2svn to compensate for changes in r124120,
which included commits to RCS files with non-trunk default branches.
2004-01-04 06:35:01 +00:00
Nate Lawson
59cb1d160c Fix for "UtAllocate: Attempt to allocate zero bytes" warnings on Dell
laptops that resulted in problems reading battery status.  Don't
copy Buffers, Packages, or Regions in DsStoreObjectToLocal().

Tested by:	scottl, sam
Submitted by:	Luming Yu (Intel)
2004-01-04 06:35:01 +00:00
Alexander Kabaev
291027ce9c Avoid calling vprint on a vnode while holding its interlock mutex.
Move diagnostic printf after vget. This might delay the debug
output some, but at least it keeps kernel from exploding if
DEBUG_VFS_LOCKS is in effect.
2004-01-04 04:08:34 +00:00
Alexander Kabaev
3ff1b7c23f Cosmetics: strip '\n' from a string passed to Debugger(). 2004-01-04 03:42:20 +00:00
Alan Cox
a67048571f Eliminate the acquisition and release of Giant from vnode_pager_alloc().
The vm object and vnode locking should suffice.

Discussed with:	jeff
2004-01-04 03:18:24 +00:00
Bill Paul
8bf6313448 In ndis_attach(), report the NDIS API level that the Windows miniport
driver was compiled with.

Remove debug printf from ndis_assicn_pcirsc(). It doesn't serve
much purpose.

Implement NdisMIndicateStatus() and NdisMIndicateStatusComplete()
as functions in subr_ndis.c. In NDIS 4.0, they were functions. In
NDIS 5.0 and later, they're just macros.

Allocate a few extra packets/buffers beyond what the driver asks
for since sometimes it seems they can lie about how many they really
need, and some extra stupid ones don't check to see if NdisAllocatePacket()
and/or NdisAllocateBuffer() actually succeed.
2004-01-04 03:00:21 +00:00
Tim J. Robbins
208a7a97a3 In smbfs_inactive(), only invalidate the node's attribute cache if we
had to send a file close request to the server.
2004-01-04 00:57:22 +00:00
David Xu
51362c2d8a Make sigaltstack as per-threaded, because per-process sigaltstack state
is useless for threaded programs, multiple threads can not share same
stack.
The alternative signal stack is private for thread, no lock is needed,
the orignal P_ALTSTACK is now moved into td_pflags and renamed to
TDP_ALTSTACK.
For single thread or Linux clone() based threaded program, there is no
semantic changed, because those programs only have one kernel thread
in every process.
2004-01-03 23:36:31 +00:00
David Xu
9b778a1611 Make sigaltstack as per-threaded, because per-process sigaltstack state
is useless for threaded programs, multiple threads can not share same
stack.
The alternative signal stack is private for thread, no lock is needed,
the orignal P_ALTSTACK is now moved into td_pflags and renamed to
TDP_ALTSTACK.
For single thread or Linux clone() based threaded program, there is no
semantic changed, because those programs only have one kernel thread
in every process.
2004-01-03 23:31:29 +00:00
MIHIRA Sanpei Yoshiro
ba94ce12a7 Sync to 1.153 of usbdevs 2004-01-03 23:06:08 +00:00
MIHIRA Sanpei Yoshiro
a77a8c3ddd Add some ids(not yet support)
[1] EMS PSX Gun controller converter
	[2] CSR USB Bluetooth Device

PR:	kern/60378	[1]
Submitted by:	Samuel Tardieu <sam@rfc1149.net>	[1]
		<jps@scxnet.de>				[2]
2004-01-03 23:04:31 +00:00
Alan Cox
e793b7797d Reduce the scope of Giant in swap_pager_alloc(). 2004-01-03 20:02:17 +00:00
Warner Losh
e342346255 Define KERNBUILDDIR again. The RELENG_5_2 tree is stable enough that
we can turn this back on to start to resolve the issues with the
release process.

Approved by: scottl
2004-01-03 19:03:28 +00:00
Poul-Henning Kamp
c991bedb18 Hook the CPU_GEODE option up.
This option is mandatory on platforms like the Soekris 4801 because the
i8254 hardware is buggy.
2004-01-03 18:43:37 +00:00
MIHIRA Sanpei Yoshiro
6ce0b433a1 Add support Sony CLIE PEG-S500C(Palm OS 3.5)
Submitted by:	Hiroaki Satoh <hsato@iwate-u.ac.jp> [FreeBSD-users-jp 76073]
2004-01-03 15:30:11 +00:00
MIHIRA Sanpei Yoshiro
d9494ca3c1 Sync to 1.152 of usbdevs 2004-01-03 15:03:09 +00:00
MIHIRA Sanpei Yoshiro
31b073a02e Add support SUN TYPE 6 USB KEYBOARD
Submitted by:	<schley@cf-wnd.de>
2004-01-03 15:01:04 +00:00
MIHIRA Sanpei Yoshiro
b124b5e8b3 Fix Scanlogic SL11R usb-ide protocol and quirks
PR:		kern/60389
Submitted by:	Sang Woo Shim <ssw@swoo.org>
2004-01-03 13:52:44 +00:00
MIHIRA Sanpei Yoshiro
7cb5c8a6cb Add the MMC commands to umass_atapi_transform. It seems to work
unmodified for ATAPI type devices with ports/sysutils/cdrtools.
(But we need timeout routine which was in kern/58649 for fixate, I think.)

PR:		kern/58649
Submitted by:	SAKIYAMA Nobuo <sakichan@sakichan.org>
2004-01-03 13:30:19 +00:00
Bill Paul
3f4ea6aea4 In if_ndis.c:ndis_attach(), temporarily set the IFF_UP flag while
calling the haltfunc. If an interrupt is triggered by the init
or halt func, the IFF_UP flag must be set in order for us to be able
to service it.

In kern_ndis.c: implement a handler for NdisMSendResourcesAvailable()
(currently does nothing since we don't really need it).

In subr_ndis.c:
	- Correct ndis_init_string() and ndis_unicode_to_ansi(),
	  which were both horribly broken.
        - Implement NdisImmediateReadPciSlotInformation() and
	  NdisImmediateWritePciSlotInformation().
	- Implement NdisBufferLength().
	- Work around my first confirmed NDIS driver bug.
	  The SMC 9462 gigE driver (natsemi 83820-based copper)
	  incorrectly creates a spinlock in its DriverEntry()
	  routine and then destroys it in its MiniportHalt()
	  handler. This is wrong: spinlocks should be created
	  in MiniportInit(). In a Windows environment, this is
	  often not a problem because DriverEntry()/MiniportInit()
	  are called once when the system boots and MiniportHalt()
	  or the shutdown handler is called when the system halts.

With this stuff in place, this driver now seems to work:

ndis0: <SMC EZ Card 1000> port 0xe000-0xe0ff mem 0xda000000-0xda000fff irq 10 at device 9.0 on pci0
ndis0: assign PCI resources...
ndis_open_file("FLASH9.hex", 18446744073709551615)
ndis0: Ethernet address: 00:04:e2:0e:d3:f0
2004-01-03 13:20:30 +00:00
MIHIRA Sanpei Yoshiro
7e277e1fcb Sync to 1.151 of usbdevs 2004-01-03 12:54:04 +00:00
MIHIRA Sanpei Yoshiro
bab0ca7f3a Add support
- Canon USB Scanner N676U	[1]
	- Canon USB Scanner N1220U	[2]

PR:		misc/40280		[1]

Submitted by:	[1] Yasue Koichi / StarRing <starring@fscn.ne.jp>
		[2] MIYAO Akio <miyao@affrc.go.jp> [FreeBSD-users-jp 74516]
2004-01-03 12:51:59 +00:00
Bill Paul
6fc4b10f58 subr_hal.c: implement WRITE_PORT_BUFFER_xxx() and READ_PORT_BUFFER_xxx()
subr_ndis.c: implement NdisDprAllocatePacket() and NdisDprFreePacket()
(which are aliased to NdisAllocatePacket() and NdisFreePacket()), and
bump the value we return in ndis_mapreg_cnt() to something ridiculously
large, since some drivers apparently expect to be able to allocate
way more than just 64.

These changes allow the Level 1 1000baseSX driver to work for
the following card:

ndis0: <SMC TigerCard 1000 Adapter> port 0xe000-0xe0ff mem 0xda004000-0xda0043ff irq 10 at device 9.0 on pci0
ndis0: Ethernet address: 00:e0:29:6f:cc:04

This is already supported by the lge(4) driver, but I decided
to take a try at making the Windows driver that came with it work too,
since I still had the floppy diskette for it lying around.
2004-01-03 09:20:48 +00:00
Sam Leffler
5016de40e1 backout the switch to use a zone for vlan tags; this requires
vlans be present if any driver with h/w vlan tagging is configured
2004-01-03 03:33:39 +00:00
Bill Paul
0a9e1a08a1 Tweak ndiscvt to support yet another flavor of .INF files (look for
the NTx86 section decoration).

subr_ndis.c: correct the behavior of ndis_query_resources(): if the
caller doesn't provide enough space to return the resources, tell it
how much it needs to provide and return an error.

subr_hal.c & subr_ntoskrnl.c: implement/stub a bunch of new routines;

ntoskrnl:

KefAcquireSpinLockAtDpcLevel
KefReleaseSpinLockFromDpcLevel
MmMapLockedPages
InterlockedDecrement
InterlockedIncrement
IoFreeMdl
KeInitializeSpinLock

HAL:

KfReleaseSpinLock
KeGetCurrentIrql
KfAcquireSpinLock

Lastly, correct spelling of "_aullshr" in the ntoskrnl functable.
2004-01-03 02:25:21 +00:00
David Xu
a30ec4b99c Make sigaltstack as per-threaded, because per-process sigaltstack state
is useless for threaded programs, multiple threads can not share same
stack.
The alternative signal stack is private for thread, no lock is needed,
the orignal P_ALTSTACK is now moved into td_pflags and renamed to
TDP_ALTSTACK.
For single thread or Linux clone() based threaded program, there is no
semantic changed, because those programs only have one kernel thread
in every process.

Reviewed by: deischen, dfr
2004-01-03 02:02:26 +00:00
Nate Lawson
16844a97c8 Delete the region we are passed if that is the requested operation.
This should fix the problem with removing an address space handler
although we don't currently use that capability so it's unlikely anyone
saw this problem.
2004-01-03 02:01:39 +00:00
Tim J. Robbins
00fff2c71a Pass ACL, extended attribute and MAC vnode ops down the vnode stack. 2004-01-03 00:36:46 +00:00
Tim J. Robbins
190b2c4f8a Add support for SMB request signing, which prevents "man in the middle"
attacks and is required to connect to Windows 2003 servers in their
default configuration. This adds an extra field to the SMB header
containing the truncated 64-bit MD5 digest of a key (a function of the
user's password and the server's authentication challenge), an implicit
sequence number, and the message data itself. As signing each message
imposes a significant performance penalty, we only enable it if the
server will not let us connect without it; this should eventually become
an option to mount_smbfs.
2004-01-02 22:38:42 +00:00
Alan Cox
d0058957b5 Revision 1.74 of vm_meter.c ("Avoid lock-order reversal") makes the release
and subsequent reacquisition of the same vm object lock in
vm_object_collapse() unnecessary.
2004-01-02 19:57:45 +00:00
Alan Cox
e0ba75dd78 Avoid lock-order reversal between the vm object list mutex and the vm
object mutex.
2004-01-02 19:38:25 +00:00
Alan Cox
277b62040d Lock the traversal of the vm object list. Use TAILQ_FOREACH consistently. 2004-01-02 19:29:31 +00:00
Poul-Henning Kamp
49e9fc0a0d Improve on POLA by populating DEVFS before doing devfs(8) rule ioctls.
PR:	60687
Spotted by:	Colin Percival <cperciva@daemonology.net>
2004-01-02 19:02:28 +00:00
Nate Lawson
44bb5f52d3 Move the kernel power change printf under bootverbose since the
power_profile script now duplicates the message via syslog.
2004-01-02 18:24:13 +00:00
Sam Leffler
dfffd5d472 switch vlan packet tag allocation to use a private zone 2004-01-02 17:31:51 +00:00
Sam Leffler
4f9f9cf3a4 m_tag fixups in preparation for heavier use:
o promote several m_tag_* routines to inline
o add an m_tag_setup inline to set the fixed fields in a packet tag
o add an m_tag_free method pointer to each mtag to support, for example,
  allocating tags from zones
o have m_tag_find check if the tag list is not empty before calling
  m_tag_locate to search

Reviewed by:	brooks, silence from others
2004-01-02 17:27:39 +00:00
Bill Paul
a06598ec58 Fix detection of RealTek 8129 PCI cards. Apparently, these cards
report a hardware rev of 0x00000000. Sadly, the 8169 gigE MAC
also reports 0x00000000, so testing against this for exclusion
results in both cards being skipped by rl_probe(). Make the 8169
test more specific by matching against both the hwrev and the PCI
ID for this chip.

PR: kern/60824
2004-01-02 17:22:12 +00:00
David E. O'Brien
2affa9f7b1 Don't confuse NULL with 0. 2004-01-02 10:46:38 +00:00
Warner Losh
65a690ef74 It appears that we don't need sys/vnode.h, which is a layering violation... 2004-01-02 05:16:01 +00:00
Bill Paul
f07cc658a4 Clean up ndiscvt a bit (leaving out the -i flag didn't work) and add
copyrights to the inf parser files.

Add a -n flag to ndiscvt to allow the user to override the default
device name of NDIS devices. Instead of "ndis0, ndis1, etc..."
you can have "foo0, foo1, etc..." This allows you to have more than
one kind of NDIS device in the kernel at the same time.

Convert from printf() to device_printf() in if_ndis.c, kern_ndis.c
and subr_ndis.c.

Create UMA zones for ndis_packet and ndis_buffer structs allocated
on transmit. The zones are created and destroyed in the modevent
handler in kern_ndis.c.

printf() and UMA changes submitted by green@freebsd.org
2004-01-02 04:31:06 +00:00
Nate Lawson
0906e0c58f Use <machine/asmacros.h> since <machine/asm.h> is a userland-only header
and gives very wrong macros for ENTRY(), etc. for kernel programs.

PR:
Suggested by:	bde
Reviewed by:
Approved by:
Obtained from:
MFC after:
2004-01-01 22:57:22 +00:00
Alan Cox
ff5dcf2546 - Increase the scope of the kmem_object's lock in kmem_malloc(). Add a
comment explaining why a further increase is not possible.
2004-01-01 19:48:56 +00:00
Martin Blapp
aa8689ef95 The reset_type should not be 0x80, it should be set to zero.
0x80 can cause the command to be rejected as invalid. This bug
exists also in the Linux IPS ffdc code.

Submitted by:	David Jeffery
MFC after:	1 week
2004-01-01 10:22:10 +00:00
Alan Cox
f79f3abcbf - Use pagezero() instead of bzero() in pmap_pinit(). (pagezero() is much
faster.)
MFi386:
 - Don't bother clearing PG_ZERO on the page table page in
   _pmap_allocpte(); it serves no purpose.
 - Don't bother clearing and setting PG_BUSY on page table directory pages.
2004-01-01 07:08:52 +00:00
Warner Losh
fa37a995f2 Happy 2004!
I know this is a little early for the US, but it isn't for Japan :-).
This year I thought I'd bump the copyright odometer when it was new
years there.
2003-12-31 22:27:51 +00:00
Nate Lawson
3fb343ac12 Use the appropriate values for the notifies. No change in behavior
since both notifies result in the same function being called.

Found by:	documenting the code
2003-12-31 19:11:19 +00:00
Alan Cox
4804edb44f In vm_page_lookup() check the root of the vm object's splay tree for the
desired page before calling vm_page_splay().
2003-12-31 19:02:01 +00:00
John Baldwin
7cd06e089c Add support for an non-branded SUN1889-based 2 port PCI serial card.
PR:		kern/55159
Submitted by:	Yeasah Pell <yeasah@apocalypse.org>
MFC after:	1 week
2003-12-31 17:51:18 +00:00
John Baldwin
21e25fa607 Replace an outb() during the test for configuration mechanism #1 with a
DELAY(1) instead.  After wading through old commit logs, I found that the
outb() was added not as part of the test but as an intentional delay. In
fact, according to Shanley's PCI book, the configuration 1 data and address
ports should only be accessed using aligned 32-bit accesses (i.e. inl()
and outl()).  Thus, using outb() to just the last byte of the port violates
the PCI spec it would seem.  On at least one box doing so broke the probe
for PCI, whereas changing it to a DELAY(1) fixed the probe.

Reported by:	Sean Welch <welchsm@earthlink.net>
MFC after:	1 week
2003-12-31 16:56:32 +00:00
KATO Takenori
38816a4377 Added TDK LAK-CD031 (simple NE2000 device).
Reviewed by:	imp
2003-12-31 04:25:00 +00:00
KATO Takenori
dc25f9c07f Sync to 1.80. 2003-12-31 04:21:42 +00:00
KATO Takenori
996e86c529 Added ID for TDK LAK-CD031 Ethernet card.
Reviewed by:	imp
2003-12-31 04:19:50 +00:00
Bill Paul
835e1e84d2 - subr_ntoskrnl.c: improve the _fastcall hack based on suggestions from
peter and jhb: use __volatile__ to prevent gcc from possibly reordering
  code, use a null inline instruction instead of a no-op movl (I would
  have done this myself if I knew it was allowed) and combine two register
  assignments into a single asm statement.
- if_ndis.c: set the NDIS_STATUS_PENDING flag on all outgoing packets
  in ndis_start(), make the resource allocation code a little smarter
  about how it selects the altmem range, correct a lock order reversal
  in ndis_tick().
2003-12-31 04:12:57 +00:00
Alan Cox
bcdaad7fe7 Simplify vm_page_grab(): Don't bother with the generation check. If the
vm object hasn't changed, the desired page will be at or near the root
of the vm object's splay tree, making vm_page_lookup() cheap.  (The only
lock required for vm_page_lookup() is already held.)  If, however, the
vm object has changed and retry was requested, eliminating the generation
check also eliminates a pointless acquisition and release of the page
queues lock.
2003-12-31 01:44:45 +00:00
Alan Cox
4da9f125cc - Modify vm_object_split() to expect a locked vm object on entry and
return on a locked vm object on exit.  Remove GIANT_REQUIRED.
 - Eliminate some unnecessary local variables from vm_object_split().
2003-12-30 22:28:36 +00:00
Maksim Yevmenkin
d82a1f81c4 Add few new USB vendor/product IDs for Bluetooth USB devices.
Regen.

Reviewed by:	imp (mentor)
Approved by:	imp (mentor)
2003-12-30 22:10:29 +00:00
Bill Paul
8695252e67 - Add new 802.11 OID information obtained from NDIS 5.1 update to
ndis_var.h
- In kern_ndis.c:ndis_send_packets(), avoid dereferencing NULL pointers
  created when the driver's send routine immediately calls the txeof
  handler (which releases the packets for us anyway).
- In if_ndis.c:ndis_80211_setstate(), implement WEP support.
2003-12-30 21:33:26 +00:00
Ruslan Ermilov
3b95e1346a Document the net.inet.ip.subnets_are_local sysctl. 2003-12-30 16:05:03 +00:00
Maxim Sobolev
73d7ddbc56 Sync with NetBSD:
if_gre.c rev.1.41-1.49

 o Spell output with two ts.
 o Remove assigned-to but not used variable.
 o fix grammatical error in a diagnostic message.
 o u_short -> u_int16_t.
 o gi_len is ip_len, so it has to be network byteorder.

if_gre.h rev.1.11-1.13

 o prototype must not have variable name.
 o u_short -> u_int16_t.
 o Spell address with two d's.

ip_gre.c rev.1.22-1.29

 o KNF - return is not a function.
 o The "osrc" variable in gre_mobile_input() is only ever set but not
   referenced; remove it.
 o correct (false) assumptions on mbuf chain.  not sure if it really helps, but
   anyways, it is necessary to perform m_pullup.
 o correct arg to m_pullup (need to count IP header size as well).
 o remove redundant adjustment of m->m_pkthdr.len.
 o clear m_flags just for safety.
 o tabify.
 o u_short -> u_int16_t.

MFC after:	2 weeks
2003-12-30 11:41:43 +00:00
Bruce Evans
2c737393a1 Backed out a small part of rev.1.15. -Winline now works better, so
there is no need turn it off when compiling with -finstrument-functions.

Having -Winline turned off mainly broke checking for bogus inlines in
kernels configured with high resolution profiling, e.g., LINT.  Not
turning it off unbreaks the warnings for bogus inlines in istallion.c,
but at least the i386 LINT still builds because istallion.c is compiled
without -Werror due to other bugs in it.
2003-12-30 09:01:29 +00:00
Bruce Evans
77c854b056 Backed out rev.1.48. -Winline now works better so there should be no
need for a hack to prevent bogus warnings about unused inlines.
2003-12-30 07:54:39 +00:00
Bruce Evans
42033f49c1 Garbage-collected CLK_USE_TSC_CALIBRATION.
i386/conf/NOTES, pc98/conf/NOTES:
Fixed the descriptions of the other CLK_* options.
2003-12-30 07:28:54 +00:00
Doug Ambrisko
e84c87915b - Bump up the general and status RID sizes
- Clear out an_dma_vaddr on free so we can test to see if dma is
  setup when the card is kldunloaded/kldloaded etc. only for MPI350
- Use a common detach like wi(4)
- Notify on RID read overflow and truncate this currently causes
  a panic in -stable when the stack during an ifconfig an0 is done
  with newer firmware
- Convert from UNLOCK/tsleep/LOCK to msleep.  I thought I did that
  a while ago.
2003-12-30 01:07:12 +00:00
Bill Paul
265745a5bf Rework resource allocation. Replace the "feel around like a blind man"
method with something a little more intelligent: use BUS_GET_RESOURCE_LIST()
to run through all resources allocated to us and map them as needed. This
way we know exactly what resources need to be mapped and what their RIDs
are without having to guess. This simplifies both ndis_attach() and
ndis_convert_res(), and eliminates the unfriendly "ndisX: couldn't map
<foo>" messages that are sometimes emitted during driver load.
2003-12-29 23:51:59 +00:00
Bruce Evans
392dbea3f6 Fixed some (most) style bugs in rev.1.33. Mainly 4-char indentation
(msdosfs uses normal 8-char indentation almost everywhere else),
too-long lines, and minor English usage errors.  The verbose formal
comment before the new function is still abnormal.
2003-12-29 11:59:05 +00:00
Bruce Evans
e1402a88c6 Garbage-collected some vestiges of objformat support (mainly ${FMT}). 2003-12-29 11:34:33 +00:00
Bruce Evans
c52c3a23e9 Fixed some style bugs (manly a few English usage errors in comments and
many unusual indentations for continued lines in code).
2003-12-29 11:28:21 +00:00
Bruce Evans
be039c568f Fixed some minor style bugs in rev.1.144. All related to msdosfs_advlock()
(mainly unsorting).  There were no changes related to the dirty flag
here.  The reference NetBSD implementation put msdosfs_advlock() in a
different place.  This commit only moves its declarations and changes
some of the function body to be like the NetBSD version.
2003-12-29 10:12:02 +00:00
Bruce Evans
a78c928753 Fixed style bugs in rev.1.112. The bugs started with obscure magic
numbers in comments (Apple PR numbers?) and didn't improve.
2003-12-29 09:50:42 +00:00
Bruce Evans
04bf9e6707 Use double quotes instead of single quotes for echos to build options
headers as in most other modules Makefiles (5 yesterday, none now).
Fixed any simple nearby style bugs (not many).
2003-12-29 09:15:48 +00:00
Bruce Evans
8e128ecdf2 Fixed some style bugs (mainly the bad examples @echo, NOMAN, and non-use
of ${.TARGET}).  This was the last instances of @echo in module Makefiles
after it was removed in sio/Makefile.  NOMAN is nonsense in module
Makefiles, and was removed, but came back here and in too many other
places.
2003-12-29 09:03:38 +00:00
Bruce Evans
8a1a7f65e2 Fixed some style bugs:
- SRCS was totally disordered.
- the echos to create options headers were hidden using '@'.
- the args of echos to create options headers were single-quoted.
- the target names for the rules to create options headers were repeated.
- the unused option COMPAT_FREEBSD4 was put in opt_compat.h.
2003-12-29 08:45:38 +00:00
Bruce Evans
1c07192538 Fixed some style bugs. SRCS and the opt_*.h rules were totally
disordered.  This commit only fixes the external disorder by
rearranging whole lines.
2003-12-29 08:35:33 +00:00
Tim J. Robbins
c1dae2f08f Unbreak build of bpf-free kernels. 2003-12-29 08:23:11 +00:00
Bruce Evans
ff22c670d9 Sorted includes. Removed duplicates exposed by this. 2003-12-29 06:51:10 +00:00
Bruce Evans
6d7d464994 Sorted includes. 2003-12-29 06:47:38 +00:00
Greg Lehey
01b4ca63ec gdbinit target: Remove comment lines from dot.gdbinit. This allows us to
put dire warnings in the original and not find them in the installed version.
2003-12-29 06:40:00 +00:00
Alan Cox
bd228075c7 Remove swap_pager_un_object_list; it is unused. 2003-12-29 04:21:44 +00:00
Alan Cox
a41c6c2ad6 Don't bother clearing PG_ZERO on the page table page in _pmap_allocpte();
it serves no purpose.
2003-12-28 23:57:09 +00:00
Nate Lawson
5016979369 Don't attach throttling if the P_BLK is 0, even if the P_BLK_LEN is 6.
This is more strict but no known systems have this problem.
2003-12-28 22:15:24 +00:00
Bill Paul
6162a5f91a Implement NdisInitUnicodeString(). 2003-12-28 21:36:03 +00:00
Bill Paul
f123dd84fb Remove the sanity test in ndis_adjust_buflen(). I'm not sure what the
nb_size field in an ndis_buffer is meant to represent, but it does not
represent the original allocation size, so the sanity check doesn't
make any sense now that we're using the Windows-mandated initialization
method.

Among other things, this makes the following card work with the
NDISulator:

ndis0: <NETGEAR PA301 Phoneline10X PCI Adapter> mem 0xda004000-0xda004fff irq 10 at device 9.0 on pci0

This is that notoriously undocumented 10Mbps HomePNA Broadcom chipset
that people wanted support for many moons ago. Sadly, the only other
HomePNA NIC I have handy is a 1Mbps device, so I can't actually do
any 10Mbps performance tests, but it talks to my 1Mbps ADMtek card
just fine.
2003-12-28 21:28:36 +00:00
David Malone
70ad6c2190 Plug a leak of open files that happens when you exec a suid program
with one of std{in,out,err} open. This helps with the file descriptor
leaks reported on -current. This should probably be merged into 5.2.

Reviewed by:	ru
Tested by:	Bjoern A. Zeeb <bzeeb-lists@lists.zabbadoz.net>
2003-12-28 19:27:14 +00:00
Yoshihiro Takahashi
a19cac5c3c Fix to support pc98 and currect typo. 2003-12-28 12:27:34 +00:00
Yoshihiro Takahashi
92c531b502 Add detach method. 2003-12-28 12:25:49 +00:00
Bruce Evans
9efe7d9d83 v_vxproc was a bogus name for a thread (pointer). 2003-12-28 09:12:56 +00:00
Mike Silbersack
007233efcd Move the declarations for nsfbufs and friends over to sf_buf.h from
mbuf.h
2003-12-28 09:10:51 +00:00
Mike Silbersack
ddeb5b242e Track three new sendfile-related statistics:
- The number of times sendfile had to do disk I/O
- The number of times sfbuf allocation failed
- The number of times sfbuf allocation had to wait
2003-12-28 08:57:09 +00:00
Sam Leffler
eb2cdcb127 update radiotap support to reflect recent changes:
o move tx taps from ath_start to ath_tx_start so lots more
  state is available to tap
o add tx flags
o add tx rate
o add tx power (constant for the moment)
o add tx antenna state
2003-12-28 07:00:32 +00:00
Sam Leffler
3c898db70a update radiotap support to reflect recent changes:
o add xmit rate
o drop rx time
o add rx flags
2003-12-28 06:58:52 +00:00
Sam Leffler
c6b688c403 Sync with netbsd:
o #ifdef _KERNEL the fallback definition for DLT_IEEE802_11_RADIO
o fix many comments
o rename antenna stuff and fix units/reference signal
o change IEEE80211_RADIOTAP_DBM_TX_POWER from unsigned 16-bit value
  to a signed 8-bit value
o change IEEE80211_RADIOTAP_FLAGS from 16 bits to 8 bits to simplify
  padding requirements
o drop IEEE80211_RADIOTAP_TIME
o change IEEE80211_RADIOTAP_ANTENNA from 16 bits to 8 bits
o drop IEEE80211_RADIOTAP_PAD
o add channel flag definitions for outside the kernel so radiotap
  doesn't depend on stuff in ieee80211*.h

Obtained from:	NetBSD
2003-12-28 06:57:28 +00:00
Alan Cox
8eaddab161 Don't bother clearing and setting PG_BUSY on page table directory pages. 2003-12-28 05:10:21 +00:00
Bruce Evans
d6c847f378 Fixed some style bugs (mainly, try to always use explicit comparisons with
NULL when checking for null pointers).
2003-12-28 04:37:59 +00:00
Bruce Evans
ca46e90ef4 Fixed some disordering in revs.1.194 and 1,196. Moved the exceve() syscall
function back to near the beginning of the file.  Rev.1.194 moved it into
the middle of auxiliary functions following kern_execve().  Moved the
__mac_execve() syscall function up together with execve().  It was new in
rev1.1.196 and perfectly misplaced after execve().
2003-12-28 04:18:13 +00:00
Sam Leffler
437ffe1823 o eliminate widespread on-stack mbuf use for bpf by introducing
a new bpf_mtap2 routine that does the right thing for an mbuf
  and a variable-length chunk of data that should be prepended.
o while we're sweeping the drivers, use u_int32_t uniformly when
  when prepending the address family (several places were assuming
  sizeof(int) was 4)
o return M_ASSERTVALID to BPF_MTAP* now that all stack-allocated
  mbufs have been eliminated; this may better be moved to the bpf
  routines

Reviewed by:	arch@ and several others
2003-12-28 03:56:00 +00:00
Mike Silbersack
5caf2b00f0 Move the declaration of sfbufspeak and sfbufsused to mbuf.h,
and use imax instead of max, as sfbufspeak and sfbufsused
are signed.

Submitted by:   bde
2003-12-28 01:43:22 +00:00
Mike Silbersack
69fba1650a Fix the maxpipekva warning message so that it points to the correct
sysctl, and shorten the message.

Noticed by:	bde
2003-12-28 01:19:58 +00:00
Alan Cox
53d0a98878 Remove GIANT_REQUIRED from kmem_suballoc(). 2003-12-28 00:10:48 +00:00
Warner Losh
34f40c9b63 New sio module. A number of people have suggested this over the years
(most recently bde), so I'll commit the module I've had knocking
around in my tree for a while.  This may have some rough edges, so if
you are able to build it on non-i386 platform (including pc98) please
let me know you succeeded.  When I get enough reports, I'll connect it
to the build.  If there are problems, feel free to fix them.

Suggested by: bde
2003-12-27 19:50:37 +00:00
Warner Losh
4acf0ddea2 Add detach methods so we can unload the sio module. 2003-12-27 19:47:10 +00:00
Alan Cox
34d2675761 Remove GIANT_REQUIRED from exec_unmap_first_page(). 2003-12-27 19:40:03 +00:00
Warner Losh
81e2d98d9e Fix slight disordering of supported cards. 2003-12-27 18:07:50 +00:00
Maxim Konovalov
fad1d65260 o Fix a comment: softticks lives in sys/kern/kern_timeout.c.
PR:		kern/60613
Submitted by:	Gleb Smirnoff
MFC after:	3 days
2003-12-27 14:08:53 +00:00
Bruce Evans
2d13f3377f Fixed style bugs in rev.1.12 (unsorting of prototypes by adding new ones
at the end).

Fixed some older style bugs (missing parameter names in all the kernel
prototypes except the ones added in rev.1.12).
2003-12-27 10:30:43 +00:00
Mike Silbersack
5eda9873e9 Track current and peak sfbuf usage, export the values via sysctl. 2003-12-27 07:52:47 +00:00
Alan Cox
a976eb5e46 - Reduce Giant's scope in vm_fault().
- Use vm_object_reference_locked() instead of vm_object_reference()
   in vm_fault().
2003-12-26 23:33:37 +00:00
Alan Cox
75898105c0 Minor correction to revision 1.258: Use the proc pointer that is passed to
vm_map_growstack() in the RLIMIT_VMEM check rather than curthread.
2003-12-26 21:54:45 +00:00
Brian Feldman
5d7252afab Don't truncate the interface name in ifunit(). It's now possible to query
"very long interface names", e.g.:
ndis_atheros0: flags=8847<UP,BROADCAST,DEBUG,RUNNING,SIMPLEX,MULTICAST> mtu 1500
2003-12-26 18:09:35 +00:00
Tom Rhodes
cede1f563c Make msdosfs support the dirty flag in FAT16 and FAT32.
Enable lockf support.

PR:		55861
Submitted by:	Jun Su <junsu@m-net.arbornet.org> (original version)
Reviewed by:	make universe
2003-12-26 17:19:19 +00:00
John Baldwin
c55bbb6cb7 Create a separate kthread that executes sched_cpu() once a second. Because
sched_cpu() locks an sx lock (allproc_lock) which can sleep if it fails to
acquire the lock, it is not safe to execute this in a callout handler from
softclock().
2003-12-26 17:07:29 +00:00
John Baldwin
c59c9a8e1c Fix acpi_MatchHid() to check the compatibility ID's if the hardware ID
doesn't match.

Submitted by:	marcel
2003-12-26 15:42:13 +00:00
David E. O'Brien
8ae025dbda Don't confuse NULL with 0. 2003-12-26 14:30:19 +00:00
David E. O'Brien
f01ac8a3dd Don't confuse NULL with 0. 2003-12-26 14:22:26 +00:00
David E. O'Brien
bac2da2926 Don't confuse NULL with 0. 2003-12-26 14:04:19 +00:00
Bill Paul
ca989c99d0 Attempt to handle the status field in the ndis_packet oob area correctly.
For received packets, an status of NDIS_STATUS_RESOURCES means we need
to copy the packet data and return the ndis_packet to the driver immediatel.
NDIS_STATUS_SUCCESS means we get to hold onto the packet, but we have
to set the status to NDIS_STATUS_PENDING so the driver knows we're
going to hang onto it for a while.

For transmit packets, NDIS_STATUS_PENDING means the driver will
asynchronously return the packet to us via the ndis_txeof() routine,
and NDIS_STATUS_SUCCESS means the driver sent the frame, and NDIS
(i.e. the OS) retains ownership of the packet and can free it
right away.
2003-12-26 07:01:05 +00:00
David E. O'Brien
ba49ba35a6 GC the AMD64 special handling. 2003-12-26 06:11:43 +00:00
Alfred Perlstein
0d2a853bee regen (__restrict) 2003-12-26 05:58:32 +00:00
Alfred Perlstein
866e3b7e73 Put restrict back in, the compilation failure was my fault when I
did a bad merge from the PR.

Thanks to Bruce Evans for explaining.
2003-12-26 05:58:16 +00:00
Alfred Perlstein
4abb4ff34d Add __restrict qualifiers to copyinfrom, copyinstrfrom, copystr, copyinstr,
copyin and copyout.
2003-12-26 05:54:35 +00:00
David E. O'Brien
4609c9a528 Properly initialize all members of the sentinel entry. 2003-12-26 05:36:08 +00:00
Warner Losh
d3b663dffc The record's stuck. The record's stuck. The record's stuck.
Remove a rendundant $FreeBSD$
2003-12-26 04:30:01 +00:00
Bill Paul
1e642180fe Back out the last batch of changes until I have a chance to properly
evaluate them. Whatever they're meant to do, they're doing it wrong.

Also:

- Clean up last bits of NULL fallout in subr_pe
- Don't let ndis_ifmedia_sts() do anything if the IFF_UP flag isn't set
- Implement NdisSystemProcessorCount() and NdisQueryMapRegisterCount().
2003-12-26 03:31:34 +00:00
Bruce Evans
ac0e70c401 Merged from sys/dev/sio/sio.c revision 1.417. 2003-12-26 03:06:11 +00:00
Brian Feldman
38f5ddc909 Don't call the miniport driver's releasepacket function unless the
packet being freed has NDIS_STATUS_PENDING in the status field of
the OOB data.  Finish implementing the "alternative" packet-releasing
function so it doesn't crash.

For those that are curious about ndis0: <ORiNOCO 802.11abg ComboCard Gold>:
1123 packets transmitted, 1120 packets received, 0% packet loss
round-trip min/avg/max/stddev = 3.837/6.146/13.919/1.925 ms

Not bad!
2003-12-26 02:20:54 +00:00
David Malone
9322078275 In socket(2) we only need Giant around the call to socreate, so just
grab it there.
2003-12-25 23:44:38 +00:00
David Malone
1c58509c25 Don't TAILQ_INIT kq_head twice, once is enough. 2003-12-25 23:42:36 +00:00
David Malone
7028d20d07 When calculating the sequence number to use in an ip6fw reset, remember to
add one if the SYN flag was set in the original packet. This seems to make
ip6fw reset work correctly for new and in-progress connections. Update
the man page to reflect the fact it now seems to work.

Glanced at by:	ume
MFC after:	2 weeks
2003-12-25 23:39:44 +00:00
Poul-Henning Kamp
8c27747768 Vastly improve performance of IRQ handling on stopped interfaces with
this driver by introducing a flag saying we already stopped the device.

On my Soekris net4801, this took a ping -i 0.001 from spending 80% of
time in interrupt handling to 10% (approx numbers).

This was a particular problem for the net4801 because the tree
interfaces share the same interrupt, but it would be a problem for
any configuration where an unused if_sis interface shares an interrupt
with a busy device.

Other drivers may have similar problems.

Thanks to:	Luigi
2003-12-25 22:14:25 +00:00
Bill Paul
8cb4c5760a Give the timer API one last overhaul: this time, use the new callout
API instead of the old timeout/untimeout mechanism.
2003-12-25 21:34:16 +00:00
Søren Schmidt
608346656f Try to simplify the SiS probe. If SiS stays with the current schema for
new nothbridges we should even find the southbridge and be able to
use it (if its one we know that is).
2003-12-25 19:37:11 +00:00
Ruslan Ermilov
e0dd77fdd7 Don't add CWARNFLAGS to CFLAGS here, they were already added by bsd.sys.mk. 2003-12-25 14:07:52 +00:00
Bruce Evans
d3f715c5eb Fixed another 0 (actually '\0') vs / NULL mixup. This completes
unbreaking LINT on i386's.
2003-12-25 11:17:01 +00:00
Bruce Evans
3db2a84395 Quick fix for LINT breakage caused by interface changes in accept(2), etc.
The log message for rev.1.160 of kern/uipc_syscalls.c and associated
changes only claimed to add restrict qualifiers (which have no effect in
the kernel so they probably shouldn't be added), but the following
interface changes were also made:
- caddr_t to `void *' and `struct sockaddr_t *'
- `int *' to `socklen_t *'.
These interface changes are not quite null, and this fix is quick (like
the changes in uipc_syscalls 1.160) because it uses bogus casts instead
of complete bounds-checked conversions.

Things should be fixed better when the conversions can be done without
using the stack gap.  linux_check_hdrincl() already uses the stack gap
and is fixed completely though the type mismatches in it were not fatal
(there were only fatal type mismatches from unopaquing pointers to
[o]sockaddr't's -- the difference between accept()'s args and oaccept()'s
args is now non-opaque, but this is not reflected in their args structs).
2003-12-25 09:59:02 +00:00
Bill Paul
e237b45890 - In ndis_intr(), don't do any interrupt processing if the IFF_UP
flag isn't set.
- In ndis_attach(), halt the NIC before exiting the routine. Calling
  ndis_init() will bring it up again, and we don't want it running
  (and potentially generating interrupts) until we're ready to deal
  with it.
2003-12-25 09:44:49 +00:00
Bill Paul
72b926ae1a Avoid using any of the ndis_packet/ndis_packet_private fields for
mbuf<->packet housekeeping. Instead, add a couple of extra fields
to the end of ndis_packet. These should be invisible to the Windows
driver module.

This also lets me get rid of a little bit of evil from ndis_ptom()
(frobbing of the ext_buf field instead of relying on the MEXTADD()
macro).
2003-12-25 06:04:40 +00:00
Sam Leffler
a2bf609dd8 NULL fallout 2003-12-25 01:23:38 +00:00
Mike Silbersack
8dee2f6746 Fix another 0 / NULL mixup. 2003-12-25 01:17:27 +00:00
Bill Paul
e819d5cc21 - Add stubs for Ndis*File() functions
- Fix ndis_time().
- Implement NdisGetSystemUpTime().
- Implement RtlCopyUnicodeString() and RtlUnicodeStringToAnsiString().
- In ndis_getstate_80211(), use sc->ndis_link to determine connect
  status.

Submitted by:	 Brian Feldman <green@freebsd.org>
2003-12-25 00:40:02 +00:00
Bill Paul
de87c787f3 - Fix some compiler warnings in subr_pe.c
- Add explicit cardbus attachment in if_ndis.c
- Clean up after moving bus_setup_intr() in ndis_attach().
- When setting an ssid, program an empty ssid as a 1-byte string
  with a single 0 byte. The Microsoft documentation says this is
  how you're supposed to tell the NIC to attach to 'any' ssid.
- Keep trace of callout handles for timers externally from the
  ndis_miniport_timer structs, and run through and clobber them
  all after invoking the haltfunc just in case the driver left one
  running. (We need to make sure all timers are cancelled on driver
  unload.)
- Handle the 'cancelled' argument in ndis_cancel_timer() correctly.
2003-12-24 21:21:18 +00:00
Marcel Moolenaar
b3378ed911 Don't use NULL with integral types. 2003-12-24 19:55:07 +00:00
Alfred Perlstein
424b70d005 regen (after removal of restrict) 2003-12-24 19:10:16 +00:00
Alfred Perlstein
6502da1307 We're not ready for restrict qualifiers here. 2003-12-24 19:09:45 +00:00
Alfred Perlstein
d602acc208 fix warnings. NULL -> 0 2003-12-24 19:00:49 +00:00
Alfred Perlstein
87dddecb1f NULL -> 0 2003-12-24 18:59:20 +00:00
Alfred Perlstein
1a7a60374c regen 2003-12-24 18:52:09 +00:00
Alfred Perlstein
b9fe2d6cc2 NULL -> 0 where appropriate. 2003-12-24 18:51:01 +00:00
Alfred Perlstein
9f144cff85 Add restrict qualifiers.
PR: 44394
Submitted by: Craig Rodrigues <rodrige@attbi.com>
2003-12-24 18:47:43 +00:00
Alfred Perlstein
3939094dfb change NULL to 0 to silence warning. 2003-12-24 18:23:02 +00:00
Hajimu UMEMOTO
8b8a0cef40 NULL is not 0.
Submitted by:	"Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
2003-12-24 18:22:04 +00:00
Sam Leffler
8b31851075 correct bridge_version: replace unexpanded RCS keywords by a fixed string
PR:		kern/60251
2003-12-24 17:47:45 +00:00
Robert Watson
69546b2fbb Document that when we are addressing an open()/close() race, the reason
we call vn_close() manually rather than letting fdrop() take care of it
is that we haven't yet hooked up the various 'struct file' fields.
2003-12-24 17:13:01 +00:00
Peter Wemm
7655ebdaaa Return AE_OK for stub functions returning ACPI_STATUS, not NULL 2003-12-24 05:26:26 +00:00
Peter Wemm
191c07211b Fix 0 / NULL mixup (this module isn't in LINT!) 2003-12-24 05:24:24 +00:00
Bruce Evans
ab99f13b16 Fixed breakage of a check for boolean true by misusing NULL in rev.1.407.
This became fatal when the type of NULL was changed recently.
2003-12-24 04:11:10 +00:00
Nate Lawson
d571e11b4f Move the acpi module down a directory. This will allow us to import
other ACPI-specific drivers into sys/modules/acpi/.
2003-12-24 03:49:38 +00:00
Warner Losh
f54a290f54 Minor whitespace changes to conform better to stlye(9) and reduce diffs
with uncommitted changes I have in p4.
2003-12-24 02:01:22 +00:00
Peter Wemm
c15e347e22 GC the unused <machine/kse.h> file. 2003-12-24 00:51:30 +00:00
Peter Wemm
bdbbbb1bb9 GC unused 'syshide' override to /dev/null. This was here to disable
the output of the namespc column.  Its functionality was removed some time
ago, but the overrides and the namespc column remained.
2003-12-24 00:32:07 +00:00
Peter Wemm
7f7866ad7a Regen (should be NOP except for rcsid) 2003-12-24 00:26:34 +00:00
Peter Wemm
bb5be17a81 GC unused namespc column and un-wrap some longer lines that now fit. 2003-12-24 00:26:09 +00:00
Peter Wemm
78cb533a0c Oops, remove references to namespc column in comment (I'm not going to
bother regenerating after this)
2003-12-24 00:17:24 +00:00
Peter Wemm
18513a2e43 Regen. (This should have been a NOP except it hasn't been regenerated
after makesyscalls.sh changes and the last few syscall.master changes, and
there have been some tree-sweeps that have touched generated files).
2003-12-24 00:15:20 +00:00
Peter Wemm
17ac3054d4 GC namespc column and unwrap long lines that now fit. 2003-12-24 00:14:08 +00:00
Peter Wemm
0763060b96 Regen. This should have been a NOP, but its not been regenerated for
ages and is missing the changes from the last few makesyscalls.sh
revisions.
2003-12-24 00:02:08 +00:00
Peter Wemm
d27e91b58c GC OBE namespc column and un-wrap longer lines that now fit 2003-12-24 00:00:47 +00:00
Nate Lawson
bd189fe7fa Fix locking broken by recent _CID changes. Always be sure to unlock
in the error case.
2003-12-23 18:47:31 +00:00
Bill Paul
9baaa1f6ed Set up the interrupt earlier in ndis_attach(), because calling the
driver's initfunc may cause an interrupt to be generated. This avoids
the occasional 'stray irqXXX' messages on load.
2003-12-23 18:41:34 +00:00
Bill Paul
ffc0badf60 Correct the definitions for NDIS_80211_NET_INFRA_IBSS and
NDIS_80211_NET_INFRA_BSS: I accidentally reversed them during
transcription from the Microsoft headers. Note that the
driver will default to BSS mode, and you need to specify
'mediaopt adhoc' to get it into IBSS mode.
2003-12-23 18:31:04 +00:00
Nate Lawson
8d181eb589 Update to use the new package routines instead of rolling our own
macros.
2003-12-23 18:27:35 +00:00
Nate Lawson
21cea91f6e Remove the device_t parameter from package routines that only used it to
print an error message.  Update all callers of the package routines.
2003-12-23 18:26:53 +00:00
Bill Paul
84394e7fa9 Make the NDIS driver depend on the wlan module now that it has
some 802.11 support.
2003-12-23 16:47:01 +00:00
Stefan Eßer
dc75b9e808 Fix a few more places where NULL was used instead of 0. 2003-12-23 14:38:42 +00:00
Ruslan Ermilov
3117579171 I didn't notice it right away, but check the right length too. 2003-12-23 14:08:50 +00:00
Alfred Perlstein
1805ed0772 Introduce mp_maxcpus which can be used by libkvm utils to find out
how many CPUs the system was compiled for.
Export the variable via a sysctl node 'kern.smp.maxcpus' as well.
2003-12-23 13:54:16 +00:00
Ruslan Ermilov
78e2d2bd28 Fix a problem introduced in revision 1.84: m_pullup() does not
necessarily return the same mbuf chain so we need to recompute
mtod() consumers after pulling up.
2003-12-23 13:33:23 +00:00
Poul-Henning Kamp
8592d7a760 Prevent withering of the provider we're orphaning from happening until
we do it ourselves.

Nailed by:	Simon Heath <heath@cng.fr>
2003-12-23 11:37:05 +00:00
Hajimu UMEMOTO
a46f7e7c92 Catch a few places where NULL (pointer) was used where 0 (integer) was
expected (fix build).
2003-12-23 11:01:17 +00:00
Bill Paul
ee422a28d6 Re-do the handling of ndis_buffers. The NDIS_BUFFER structure is
supposed to be opaque to the driver, however it is exposed through
several macros which expect certain behavior. In my original
implementation, I used the mappedsystemva member of the structure
to hold a pointer to the buffer and bytecount to hold the length.
It turns out you must use the startva pointer to point to the
page containing the start of the buffer and set byteoffset to
the offset within the page where the buffer starts. So, for a buffer
with address 'baseva,' startva is baseva & ~(PAGE_SIZE -1) and
byteoffset is baseva & (PAGE_SIZE -1). We have to maintain this
convention everywhere that ndis_buffers are used.

Fortunately, Microsoft defines some macros for initializing and
manipulating NDIS_BUFFER structures in ntddk.h. I adapted some
of them for use here and used them where appropriate.

This fixes the discrepancy I observed between how RX'ed packet sizes
were being reported in the Broadcom wireless driver and the sample
ethernet drivers that I've tested. This should also help the
Intel Centrino wireless driver work.

Also try to properly initialize the 802.11 BSS and IBSS channels.
(Sadly, the channel value is meaningless since there's no way
in the existing NDIS API to get/set the channel, but this should
take care of any 'invalid channel (NULL)' messages printed on
the console.
2003-12-23 04:08:22 +00:00
Peter Wemm
d1d7ef3e23 Regen (should be a NOP except for rcsid) 2003-12-23 04:07:47 +00:00
Peter Wemm
151e298ec2 GC unused namespc column. 2003-12-23 04:07:22 +00:00
Peter Wemm
ff7a52b4b5 Regen (should be a NOP except for rcsid changes) 2003-12-23 03:55:06 +00:00
Peter Wemm
eca6e6472d GC unused third namespace column. 2003-12-23 03:54:40 +00:00
Peter Wemm
b368159c7f GC unused namespace column. Unwrap some long lines that now fit. 2003-12-23 03:53:21 +00:00
Peter Wemm
2c74309622 Regen - this should be essentially a NOP, except for rcsid changes. 2003-12-23 03:52:14 +00:00
Peter Wemm
eec525a435 Remove namespc column and attempt to un-fold some of the longer lines
that now fit.
2003-12-23 03:51:36 +00:00
Peter Wemm
1a58b07149 Remove the namespace column from the syscalls tables. We don't actually
use it, if we ever did.  They have been been VERY poorly maintained for
some time, possibly because they were a NOP.  FWIW, This brings our table
formats back closer to the other *BSD's.
2003-12-23 03:50:43 +00:00
Peter Wemm
cb925bec10 Regen 2003-12-23 03:21:49 +00:00
Peter Wemm
c725485111 freebsd32_fstat(2) is now MPSAFE 2003-12-23 03:21:06 +00:00
Peter Wemm
34eda6348d Rather than screw around with the (unsafe) stackgap, call vn_stat/fo_stat
directly for stat/fstat/lstat syscall emulation.  It turns out not only
safer, but the code is smaller this way too.
2003-12-23 03:20:49 +00:00
Peter Wemm
096cced7fb Regen 2003-12-23 02:48:58 +00:00
Peter Wemm
5cb0e301a4 Eliminate stackgap usage for the (woefully incomplete) path translations
since it isn't needed here anymore.
Use standard open(2)/access(2) and chflags(2) syscalls now.
2003-12-23 02:48:11 +00:00
Peter Wemm
9b68618df0 Add an additional field to the elf brandinfo structure to support
quicker exec-time replacement of the elf interpreter on an emulation
environment where an entire /compat/* tree isn't really warranted.
2003-12-23 02:42:39 +00:00
Peter Wemm
feb5832efb Add a reminder note about removing the amd64 test here once the gcc33 port
has been updated.
2003-12-23 02:38:55 +00:00
Peter Wemm
a89ec05e3e Catch a few places where NULL (pointer) was used where 0 (integer) was
expected.
2003-12-23 02:36:43 +00:00
Peter Wemm
98ef6ed422 Don peril sensitive sunglasses and set NULL to an actual pointer type,
but *only* for the kernel.  We can do this because the kernel is not a
standard C application environment.  This would have stopped the recent
mtx_* arg NULL/MTX_DEF mixups from going unnoticed for so long.
2003-12-23 02:34:25 +00:00
Peter Wemm
8070ad52a1 Don't use NULL (pointer) when we're testing for a count of 0 (integer). 2003-12-23 02:29:46 +00:00
Peter Wemm
55cdddc0d8 Don't use NULL (pointer) when we mean 0 (integer) for the number of ticks
in msleep.
2003-12-23 02:28:42 +00:00