Commit Graph

25972 Commits

Author SHA1 Message Date
Joerg Wunsch
7998b1245d Make the FDC (state machine) state an enum, as opposed to an int
abusing a bunch of #defines, for clarity and better debugging support.
2001-06-05 21:01:46 +00:00
Bill Paul
357dfe502a Fix mindo:
PCN_BCR_CLRBIT(sc, PCN_BCR_MIICTL, PCN_MIICTL_DANAS);

should be:

	PCN_BCR_SETBIT(sc, PCN_BCR_MIICTL, PCN_MIICTL_DANAS);

Turning this bit on is what disables MII autoneg, not turning it off.
Without this, manually setting the media doesn't work.

Noticed by: Jim Browne <jbrowne@jbrowne.com>
2001-06-05 20:51:17 +00:00
Shafeeq Sinnamohideen
ba8aae1baf Now works again and as a module and with devfs.
Used the bpf & tun drivers as examples as to what is necessary for devfs.
2001-06-05 19:45:16 +00:00
Matt Jacob
6a23026c6e Fix botch for state levels. Role minor release. Start adding code for a
'force logout' path.

MFC after:	4 weeks
2001-06-05 17:11:06 +00:00
Hellmuth Michaelis
a272144a13 PR: i386/26347
Submitted by:	Nicola Vitale <nivit@libero.it>
Reviewed by:	hm
Fix screen number display in HP mode in case PCVT_NSCREENS > 10
2001-06-05 15:31:47 +00:00
Jonathan Lemon
4e92ec9dd0 Add a kqueue filter for writing to ufs filesystems which always returns
true.  This permits better interoperability with programs which register
filters on their stdin/stdout handles.

Submitted by: Niels Provos <provos@citi.umich.edu>
2001-06-05 13:52:37 +00:00
Warner Losh
53e4eaaeba Close the line displine on detach. Lots of folks have submittd this, and
I think bde even reviewed it once.

Also, change the name of ActionTEC pat to more generic Lucent Kermit
chip.  Add stub for Xircom card.  Add cardbus attachment too.
2001-06-05 05:58:57 +00:00
Dima Dorfman
ddf5b79683 Add a line discipline close routine which restores some functionality
I accidently nuked in rev. 1.54.  Also rework the error handling in
snplwrite a little.
2001-06-05 05:07:53 +00:00
Dima Dorfman
f09f49f136 Style and cosmetic cleanups. This driver is now reasonably stlye(9)
compliant.  All the variable definitions and function names are
reasonably consistent, and the functions which should be static (i.e.,
all of them) are.  Other assorted fixes were made.  The majority of
the delta is indentation fixes.

Partially reviewed by:	bde
2001-06-05 05:00:17 +00:00
Warner Losh
0f17416309 Only build i82365_isa attachment when we have isa bus. 2001-06-05 04:26:12 +00:00
David E. O'Brien
1239674238 There seems to be a problem that the order of disk write operation being
incorrect due to a missing check for some dependency.  This change
avoids the freelist corruption (but not the temporarily inconsistent
state of the file system).

A message is printed as a reminder of the under lying problem when a
pagedep structure is not freed due to the NEWBLOCK flag being set.

Submitted by:	Tor.Egge@fast.no
2001-06-05 01:49:37 +00:00
Dima Dorfman
7fd72392d9 Use the l_nullioctl exported from tty_conf.c rather than rolling our own. 2001-06-04 23:31:21 +00:00
Dima Dorfman
22cf0fb34d Unstaticize l_nullioctl; it is needed elsewhere (like in tty_snoop.c).
Suggested by:	bde
2001-06-04 23:30:47 +00:00
Jonathan Lemon
11457bbf08 While in the interrupt loop, check for a bogus interrupt value of 0xff.
This may be returned if the underlying hardware is a pc-card which has
been ejected.

Reviewed by: warner
2001-06-04 22:01:44 +00:00
Joerg Wunsch
b794010414 Move out the files from src/sys/isa/ic/ to src/sys/dev/ic/, so they
can be made userland-visible as <dev/ic/...>.  Also, those files are
not supposed to contain any bus-specific details at all, so placing
them under .../isa/ has been a misnomer from the beginning.

The files in src/sys/dev/ic/ have been repo-copied from their old
location (this commit is a forced null commit there to record this
message).
2001-06-04 21:04:14 +00:00
John Baldwin
a9672a8144 Use bitmasks of the KTR_* constants instead of hexidecimal values for
the KTR_COMPILE and KTR_MASK examples.
2001-06-04 18:26:02 +00:00
John Baldwin
75fd8a701b Add a new psuedo-KTR trace level KTR_ALL which is a mask of all currently
used KTR levels.
2001-06-04 18:24:07 +00:00
Matt Jacob
2c7d0b8dbc first blush at some FC path inquiry settings 2001-06-04 18:23:49 +00:00
Matt Jacob
f253884421 Do NOLUNS dance for oddball Exabyte. We *really* need to do this as hints.
Correct match for A5000 SES instance.

PR:		19887
MFC after:	2 weeks
2001-06-04 18:20:52 +00:00
Matt Jacob
fd13aa4745 first blush at some FC path inquiry settings 2001-06-04 18:08:30 +00:00
Warner Losh
81aad9b606 If the chip isn't in power state D0, put it in power state D0. I
elected to do this in the probe rather than the attach so that we don't
disturb things which this might reset.  different cards have different
quirks, according to their datasheets.

This should fix the "I booted in windows and rebooted to FreeBSD and
now things don't work" problem.

PR: 4847, 20670
2001-06-04 17:14:28 +00:00
Brian Somers
f987e1bd0f Add BSD-style copyright headers
Approved by: Charles Mott <cmott@scientech.com>
2001-06-04 15:09:51 +00:00
Brian Somers
888b1a7aa5 Change to a standard BSD-style copyright
Approved by:	Atsushi Murai <amurai@spec.co.jp>
2001-06-04 14:52:17 +00:00
Ruslan Ermilov
ffdc316d48 When looking for an interface appropriate for the (new or changing)
route in ifa_ifwithroute(), as the last resort, look up the route to
the gateway, not destination (to derive the interface from).

PR:		kern/27852
Submitted by:	Iasen Kostoff <tbyte@tbyte.org>
MFC after:	2 weeks
2001-06-04 14:13:15 +00:00
Warner Losh
58c13f9b7a Add new pci attachment for pcic. This supports pci cards as well as
card bus bridges.

We now always use pci interrupts for pci cards.  This will allow us to
more easily configure things.  You must change your IRQ lines in
/etc/pccard.conf to match what we've probed.  I'm not sure the right
way to deal with this right now.

Development of pci pcmcia has been funded by Monzoon Networks AG.  I
am grateful for their generosity.
2001-06-04 06:49:46 +00:00
Matthew Dillon
1b3e974a71 The pipe_write() code was locking the pipe without busying it first in
certain cases, and a close() by another process could potentially rip the
pipe out from under the (blocked) locking operation.

Reported-by: Alexander Viro <viro@math.psu.edu>
2001-06-04 04:04:45 +00:00
Paul Richards
34c4099770 S_IFCHR is not a bit mask, it's just a value in a field. The correct
way to clear that field is to use S_IFMT.

Pointed out by BDE.
2001-06-04 03:39:14 +00:00
Warner Losh
f20688d55c #defines for pci way interrupt routing. 2001-06-04 03:36:22 +00:00
Warner Losh
94b197e96d Move the pcic interrupt from pcic.c to pcic_isa.c. The ISA handling
for card change interrupts is different than the pci stuff that's
coming soon.  Set the management irq in different ways.  If
pci_parallel interrutp routing, then use the PCI way of getting
interrupts.  Move polling mode into pcic_isa since when we're routing
via pci polling doesn't work because many bridges (systems hang solid).

If we're routing interrupts via pci, they can be shared, so flag them
as such.

Note, this doesn't actually change anything since the pci attachment
isn't quite ready to be committed.
2001-06-04 03:29:06 +00:00
Warner Losh
07d8251503 Minor style(9) nit. a|b -> a | b. 2001-06-04 03:13:45 +00:00
Matt Jacob
d50c79387a Use correct flag in test whether this interrupt handler is fast or not.
PR:		27866
Submitted by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
2001-06-04 00:52:09 +00:00
Jesper Skriver
690a6055ff Prevent denial of service using bogus fragmented IPv4 packets.
A attacker sending a lot of bogus fragmented packets to the target
(with different IPv4 identification field - ip_id), may be able
to put the target machine into mbuf starvation state.

By setting a upper limit on the number of reassembly queues we
prevent this situation.

This upper limit is controlled by the new sysctl
net.inet.ip.maxfragpackets which defaults to 200,
as the IPv6 case, this should be sufficient for most
systmes, but you might want to increase it if you have
lots of TCP sessions.
I'm working on making the default value dependent on
nmbclusters.

If you want old behaviour (no upper limit) set this sysctl
to a negative value.

If you don't want to accept any fragments (not recommended)
set the sysctl to 0 (zero).

Obtained from:	NetBSD
MFC after:	1 week
2001-06-03 23:33:23 +00:00
Joerg Wunsch
06740f7b41 Fix my email address. I accidentally cut'npasted the wrong (old)
hostname laste time.
2001-06-03 20:41:21 +00:00
Yaroslav Tykhiy
a98dc5e6a7 First, wrap the if_up() call into splimp()/splx() because
if_up() must be called at splnet or higher.
Second, set the IFF_RUNNING flag on an interface after its
resources (i.e. tunnel source and destination addresses)
have been set. Note that we don't set IFF_UP because it is
if_up()'s job to do that.

PR:		kern/27851
Submitted by:	Horacio J. PeÓa <horape@compendium.com.ar>
2001-06-03 17:31:11 +00:00
Peter Wemm
eee598d8f3 Fix reversed arguments to pci_write_config()
PR:		kern/9408
Submitted by:	Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
2001-06-03 09:45:40 +00:00
Dima Dorfman
87826386e0 Remove unused includes, use *min() inline functions rather than a
home-grown macro, rewrite a confusing conditional in snpdevtotty(),
and change ibuf to 512 bytes instead of 1024 bytes in dsnwrite().

Reviewed by:	bde
2001-06-03 05:17:39 +00:00
Dima Dorfman
b8edb44cc3 When tring to find out if this is a request for a write in
kernel_sysctl and userland_sysctl, check for whether new is NULL, not
whether newlen is 0.  This allows one to set a string sysctl to "".
2001-06-03 04:58:51 +00:00
Yoshihiro Takahashi
69f5c95465 Merged from sys/kern/subr_diskmbr.c revision 1.45. 2001-06-03 04:44:26 +00:00
Yoshihiro Takahashi
efcd68f008 Merged from sys/kern/subr_diskmbr.c revision 1.52. 2001-06-03 03:36:57 +00:00
Dima Dorfman
c0b824f97d Include sys/mutex.h to silence a warning. 2001-06-03 02:19:07 +00:00
Jonathan Lemon
e46e7fa2c2 Only touch the PCR register in order to set bits for the fxp driver.
The 3C509-TX card apparently had a slightly different version of the
chip, and has problems when this register is set.  The problem does
not appear on the 3C509{BC} cards, but since only the fxp driver needs
specific bits set, conditionalize on that.
2001-06-02 19:51:02 +00:00
David E. O'Brien
41843d3cde Support GCC 3.0 2001-06-02 17:35:50 +00:00
Poul-Henning Kamp
0d31cbfab7 Properly wrap mtx_intr_enable() macro in "do $bla while (0)" 2001-06-02 08:17:42 +00:00
Yoshihiro Takahashi
a8ef346171 Merged from sys/i386/i386/machdep.c revision 1.454. 2001-06-02 06:30:56 +00:00
Yoshihiro Takahashi
d4336cd071 Disabled unneeded code for PC98.
Submitted by:	NOKUBI Hirotaka <nokubi@ff.iij4u.or.jp>
2001-06-02 05:51:21 +00:00
Yoshihiro Takahashi
d7e03ee681 Merged from sys/i386/isa/npx.c revision 1.101. 2001-06-02 05:00:08 +00:00
Thomas Moestl
5c5c8fa826 Change the way information about swap devices is exported to be more
canonical: define a versioned struct xswdev, and add a sysctl node
handler that allows the user to get this structure for a certain device
index by specifying this index as last element of the MIB.
This new node handler, vm.swap_info, replaces the old vm.nswapdev
and vm.swapdevX.* (where X was the index) sysctls.
2001-06-01 22:53:10 +00:00
Dirk Froemberg
11151a5b42 Fix typo (opt_acc.h -> opt_aac.h) for AAC_COMPAT_LINUX. 2001-06-01 22:39:50 +00:00
Jesper Skriver
5b86eac4e5 Revert the last bits of my bogus move of NMBCLUSTERS
to <sys/param.h>
2001-06-01 21:47:34 +00:00
Warner Losh
3a4f29da1e The orm device. This device gobbles up the Option ROMs in the ISA
memory I/O space.  Otherwise, our resource allocation system might
mistakenly assign pccard, plug and play devices or other things
addresses that conflict with ROMs.

I cleaned up his code a little from the submited driver: style(9)
issues, commentary on why something that looks incorrect really is
correct.  Also noted that while a checksum field is defined for the
ROMs, enough common hardware neglects it to make it not worthwhile
checking.

Submitted by: Nikolai Saoukh <nms@otdel-1.org>
PR: 22078
2001-06-01 20:58:32 +00:00