Commit Graph

95819 Commits

Author SHA1 Message Date
Alan Cox
b921a12b3b - Introduce and use vm_object_reference_locked(). Unlike
vm_object_reference(), this function must not be used to reanimate dead
   vm objects.  This restriction simplifies locking.

Reviewed by:	tegge
2003-11-02 21:30:10 +00:00
Warner Losh
8b99b80de6 Only the 3C1 is now known not to work. All my other cards work with
this driver.  I've not tested the '556B or the '556BI cards, however,
as I don't own them.
2003-11-02 20:20:28 +00:00
Warner Losh
4f9303c05a MFp4:
o Fix MFC cards.  We were bogusly setting CCR_IOBASE[01] and CCR_IOLIMIT.
  now when we activate the resource, we adjust these for MFC cards, per the
  spec.
o Change type of pf_mfc_* to be bus_addr_t, which is more correct than
  long.

This makes my 3C362D/3C363D and 3CXEM556 cards work!  Woo Hoo!
2003-11-02 20:18:19 +00:00
Warner Losh
1c4c419607 MFp4:
o Remove redundant $FreeBSD$
o Better comments about ep_get_macaddr.
o remove one tab in a switch statement (style only)
o Recognize ID 0x0035 as the device ID for the 3CXEM556 that I have.  This
  makes the 3CXEM556 work for me.  Not 100% sure this is the assigned ID,
  as I don't have the datasheets for this part, but it does work and get
  the correct ethrnet address.
o Comment about the whole fake IRQ 3 thing.  some need it, some don't, all
  work with it.
2003-11-02 20:13:39 +00:00
Warner Losh
02b80cde42 MFp4:
o Minor tweak to error processing in ep_alloc.
2003-11-02 20:10:09 +00:00
Warner Losh
5c30ae1f77 MFP4:
o define EP_W2_ALT_EEPROM.  we don't use it yet, but may soon.
2003-11-02 20:08:58 +00:00
Hajimu UMEMOTO
af12e09e86 rename variables.
Obtained from:	KAME
2003-11-02 19:09:29 +00:00
Ceri Davies
9432b62eb6 Since we do not honour the Confidential: field, and as an attempt to
decrease the number of misfiled PR submissions in general, do not
allow users to send a PR that contains errors.

Discussed with:	core
2003-11-02 17:35:33 +00:00
Hajimu UMEMOTO
2dc334e089 correct %d/%u mismatch.
Obtained from:	KAME
2003-11-02 12:28:04 +00:00
Hajimu UMEMOTO
b67d3260ea exit(3) with negative value does not make sense'
Obtained from:	KAME
2003-11-02 11:43:07 +00:00
Hajimu UMEMOTO
c7ebbcde04 make debugging with "setkey -x" a lot easier.
Obtained from:	KAME
2003-11-02 11:26:42 +00:00
Jeff Roberson
ef1134c9ad - Remove the ksq_loads[] array. We are only interested in three counts,
the total load, the timeshare load, and the number of threads that can
   be migrated to another cpu.  Account for these seperately.
 - Introduce a KSE_CAN_MIGRATE() macro which determines whether or not a KSE
   can be migrated to another CPU.  Currently, this only checks to see if
   we're an interrupt handler.  Eventually this will also be used to support
   CPU binding.
2003-11-02 10:56:48 +00:00
Mark Murray
f757589236 Make sure we get all user-written input. This simplifies the
code considerably.

Submitted by:	(forgotten)
[I'll happily acknowledge the submitter if he owns up!]
2003-11-02 10:55:16 +00:00
Hajimu UMEMOTO
9712142383 cleanup secasvar management; refcnt is key.c responsibility;
alloc/free is keydb.c responsibility.

Obtained from:	KAME
2003-11-02 10:49:47 +00:00
Tim J. Robbins
02f4f60ad5 Convert the Big5, EUC, MSKanji and UTF-8 encoding methods to implement
mbrtowc() and wcrtomb() directly. GB18030, GBK and UTF2 are left
unconverted; GB18030 will be done eventually, but GBK and UTF2 may just
be removed, as they are subsets of GB18030 and UTF-8 respectively.
2003-11-02 10:09:33 +00:00
Marcel Moolenaar
fcca8c1dde Remove headers copied from i386 and either useless or wrong on ia64.
An example of useless is bios.h. An example of wrong is msdos.h (due
to the use of long for 32-bit fields).

display.h cannot be removed because it's used by syscons. That header
however has no platform dependency and shouldn't really be here.

Removal if these headers may cause build failures in the ports tree.
It's the ports that need fixing in that case.

Tested with: buildworld, LINT
2003-11-02 09:19:07 +00:00
Hajimu UMEMOTO
8f27541d2a - do not quit from key_sendup() even if writes to non-target
socket fails.
- remove an unneeded function.
- fix pfkey stat.
- fix comment.

Obtained from:	KAME
2003-11-02 09:13:33 +00:00
Marcel Moolenaar
697defc485 o Add PART_EFI so that we can use it instead of PART_FAT on ia64
to better deal with the fact that we need an EFI partition and
   that we need to have a mountpoint for it.
o  When creating a new partition, add EFI to the list of types
   the user can select from. This makes it easy to create an EFI.
o  Do not include wizard.c on ia64.
o  The user cannot create a partition on ia64 that's a multiple of
   the cylinder size. We don't have a notion of cyclinders.
2003-11-02 08:58:57 +00:00
Marcel Moolenaar
0d7c0ed330 Turn Write_Disk() into a stub for now. It needs to be rewritten to
write out a GPT and not a MBR.
2003-11-02 08:41:18 +00:00
Marcel Moolenaar
f5ea9b34c6 o Move Int_Open_Disk() from disk.c to open_disk.c for use by all
platforms except ia64 and use Int_Open_Disk() in open_ia64_disk.c
   on ia64. We need to know more than GEOM can provide us so we're
   forced to read from the disk. Move uuid_type() to open_ia64_disk.c
   and remove all references on non-ia64.
o  Pass the GEOM conftxt to Int_Open_Disk() so that only Open_Disk()
   needs to know about GEOM and libdisk can more easily be used with
   media not handled by GEOM.
o  Create an ia64 specific definiton of struct disk on ia64, because
   we don't need/have most of the fields other platforms need and
   other fields not applicable on platforms other than ia64.
o  Do not compile change.c on ia64. It's too PC specific.
o  In Fixup_Names() in create_chunk.c, try all partition numbers
   that are valid for the GPT disk. We have the total number of
   partitions that can be allocated in the disk structure on ia64.
   Also, use the GPT partition naming if we're creating one under
   a chunk of type "whole". It's a GPT partition in that case.
o  In Create_Chunk(), compile-out the PC specific code on ia64 that
   checks BIOS geometry restrictions.
o  In Debug_Disk() in disk.c, dump the ia64 specific fields.
o  Save the partition index in the chunk on ia64 so that we can
   preserve it when we write the data back to disk. This avoids that
   partitions get moved around or swapped after installing FreeBSD,
   which may render a disk unusable.
2003-11-02 08:39:08 +00:00
Marcel Moolenaar
78cb7a7cd0 Do not fill in d_ncylinders, d_ntracks and d_nsectors in the disklabel
on ia64. Not only do we not have a disklabel by default, we also do
not have a notion of cylinders, tracks and sectors.
2003-11-02 08:07:25 +00:00
Marcel Moolenaar
c0c0907820 Compile-out support for allfreebsd, dedicate, sanitize and bios on
ia64. These commands are PC specific and not supported.
2003-11-02 08:01:18 +00:00
Marcel Moolenaar
aff198c706 Turn Track_Aligned(), Prev_Track_Aligned(), Next_Track_Aligned(),
Cyl_Aligned(), Prev_Cyl_Aligned() and Next_Cyl_Aligned() into
tautologies on ia64. GPT removes all notion of tracks, heads and
sectors per track, so there are no alignment considerations.
2003-11-02 07:58:19 +00:00
Mike Silbersack
4bd4fa3fe6 Add an additional check to the tcp_twrecycleable function; I had
previously only considered the send sequence space.  Unfortunately,
some OSes (windows) still use a random positive increments scheme for
their syn-ack ISNs, so I must consider receive sequence space as well.

The value of 250000 bytes / second for Microsoft's ISN rate of increase
was determined by testing with an XP machine.
2003-11-02 07:47:03 +00:00
Marcel Moolenaar
03e432ad9c o In Print_Chunk(), don't print the address of the chunk on ia64. It
doesn't have any meaning and only results in lines longer than 80
   characters.
o  In Delete_Chunk2(), also look for chunks of type "part" under
   chunks of type "whole" on ia64. They're not only under chunks of
   type "freebsd" there.
2003-11-02 07:44:59 +00:00
Bruce A. Mah
0a46471721 Trim more devices from the hardware list: ida(4), ciss(4), iir(4),
ie(4).
2003-11-02 07:41:03 +00:00
Ruslan Ermilov
2faf03309d DNS should not necessarily be named(8), tweak the comment a bit. 2003-11-02 07:31:44 +00:00
Ruslan Ermilov
e66afe03de MFV: The -d option. 2003-11-02 07:27:40 +00:00
Ruslan Ermilov
f5b8c6dcbc Sort encodings. 2003-11-02 07:25:24 +00:00
Ruslan Ermilov
3565c6a8e3 Style. 2003-11-02 06:47:39 +00:00
Warner Losh
2e698e49e1 The '574 family works (I had a bad dongle which is why I thought it
might not be).
The modem combo cards do not (confirmed today)
2003-11-02 05:33:12 +00:00
Alexander Kabaev
cb9ddc80ae Take care not to call vput if thread used in corresponding vget
wasn't curthread, i.e. when we receive a thread pointer to use
as a function argument. Use VOP_UNLOCK/vrele in these cases.

The only case there td != curthread known at the moment is
boot() calling sync with thread0 pointer.

This fixes the panic on shutdown people have reported.
2003-11-02 04:52:53 +00:00
Jeff Roberson
769a363537 - In sched_prio() only force us onto the current queue if our priority is
being elevated (numerically smaller).
2003-11-02 04:25:59 +00:00
Jeff Roberson
7d1a81b4dc - Rename SCHED_PRI_NTHRESH to SCHED_SLICE_NTHRESH since it is only used in
slice assignment.  Add a comment describing what it does.
 - Remove a stale XXX comment, the nice should not impact the interactivity,
   nice adjustments only effect non-interactive tasks in ULE.
 - Don't allow nice -20 tasks to totally starve nice 0 tasks.  Give them at
   least SCHED_SLICE_MIN ticks.  We still allow nice 0 tasks to starve nice
   +20 tasks as intended.
2003-11-02 04:10:15 +00:00
Jeff Roberson
7a0d73f587 - Remove PRIO_TOTAL.
Submitted by:	bde
2003-11-02 03:50:16 +00:00
Jeff Roberson
a0a931cec7 - Remove uses of PRIO_TOTAL and replace them with SCHED_PRI_NRESV
- SCHED_PRI_NRESV does not have the off by one error in PRIO_TOTAL so we
   do not have to account for it in the few places that we use it.

Requested by:	bde
2003-11-02 03:49:32 +00:00
Jeff Roberson
d322132c62 - Change sched_interact_update() to only accept slp+runtime values between
0 and SCHED_SLP_RUN_MAX * 2.  This allows us to simplify the algorithm
   quite a bit.  Before, it dealt with arbitrary values which required us
   to do nasty integer division tricks that didn't quite work out correctly.
 - Chnage sched_wakeup() to detect conditions where the slp+runtime could
   exceed SCHED_SLP_RUN_MAX * 2.  This can happen if we go to sleep for
   longer than 6 seconds.  In this case, we'll just clear the runtime and
   set the sleep time to the max.
 - Define a new function, sched_interact_fork() which updates the slp+runtime
   of a newly forked thread.  We want to limit the amount of history retained
   from the parent so that we learn the child's behavior quickly.  We don't,
   however want to decay it to nothing.  Previously, we would simply divide
   each parameter by 100 whenever we forked.  After a few forks the values
   would reach 0 and tasks would not be considered interactive.
 - Add another KTR entry, cleanup some existing entries.
 - Remove a useless sched_interact_update() from sched_priority().  This is
   already done by the callers that require it.
2003-11-02 03:36:33 +00:00
Brooks Davis
389748c1e8 Do if_xname conversion. I missed this one because it's pc98 only. 2003-11-01 23:24:38 +00:00
Alan Cox
22ec553f77 - Increase the scope of two vm object locks in vm_object_collapse().
- Remove the acquisition and release of Giant from vm_object_coalesce().
2003-11-01 23:06:41 +00:00
Marcel Moolenaar
ceeef1c666 o Do not define WITH_SYSCONS and WITH_MICE on ia64. We cannot have
a generic kernel with syscons.
o  Do not define WITH_SLICES on ia64. We only label because we're
   going to create GPT disks.
2003-11-01 20:17:11 +00:00
Marcel Moolenaar
f7da19f20b o Compile-out "wizard" mode on ia64.
o  Also allow swap and filesystem partitions outside a freebsd slice.
   This is typically the case for GPT.
o  Allow chunks of type "whole" to be displayed at the top. This is
   to allow a GPT disk to be labeled. We need a slice out of which we
   can make partitions, but a GPT disk doesn't have slices. For GPT
   disks a chunk of type "whole" can then be used as a placeholder.
2003-11-01 20:14:06 +00:00
Marcel Moolenaar
fb8ce55cf5 o Compile-out "wizard" mode on ia64.
o  Do not set bootblocks on ia64. It's not even a functionality in
   libdisk on ia64.
2003-11-01 20:04:12 +00:00
Tom Rhodes
b34553a3ab Revert the first part of my previous change.
Requested by:	wollman
2003-11-01 16:57:19 +00:00
Tom Rhodes
31212c21bf The copywrite is not a 'static char', remove the #ifdefs and move the copywrite up
into the commented out 'copywrite' section.

Include sys/linker.h for kldload(3).
2003-11-01 15:58:06 +00:00
Alexander Kabaev
9185a9f5e3 Remove now unused variable. 2003-11-01 15:04:50 +00:00
Doug Rabson
aec21b56e8 Make the cardbus driver a derived class of the pci driver. In theory, this
should allow many of the pci methods to be re-staticised.
2003-11-01 12:45:03 +00:00
Søren Schmidt
908e9ae3ec GEOM'ify atapi-cd. Original patch by phk, subtle changes by me. 2003-11-01 09:44:33 +00:00
Mark Murray
4e0a104f91 Shorten the code by removing one "do-nothing" function, replacing it
with nullop(), which is in kern_conf.c.
2003-11-01 09:31:54 +00:00
Søren Schmidt
db6c46469e Fix cable detection on AMD chips. 2003-11-01 09:30:15 +00:00
Alan Cox
c7c8dd7e80 - Modify swap_pager_copy() and its callers such that the source and
destination objects are locked on entry and exit.  Add comments to
   the callers noting that the locks can be released by swap_pager_copy().
 - Remove several instances of GIANT_REQUIRED.
2003-11-01 08:57:26 +00:00