Commit Graph

73896 Commits

Author SHA1 Message Date
christos 60fb5c0ece Turn checksumming on loopback back on until we fix the bugs in it.
Connect over tcp on the loopback is broken:

  4729 amq      0.000007 CALL  connect(4,0x804f2a0,0x1c)
  4729 amq      75.007420 RET   connect -1 errno 60 Connection timed out
2004-12-17 22:54:52 +00:00
shige cef61c32cd X1226 RTC is connected to IBM405GPr On-chip IIC(I2C).
These files were already moved to sys/dev/i2c.
We don't need these files.
2004-12-17 19:41:04 +00:00
shige eb555844f1 Substitute PPC405_ with PPC_IBM405_. 2004-12-17 16:23:57 +00:00
cube 6717eabf3a ETHFOO_GOING had no chance to actually be useful if sc_flags is set to 0
in ethfoo_dev_close().
2004-12-17 12:17:09 +00:00
briggs 38ffdc4f30 Back out part of previous. OF_open() works fine with /chaos/control, but
is a bit picky about interrupts.
2004-12-17 05:44:12 +00:00
briggs 78776b6678 - Avoid looking for lost interrupts when recalculating interrupt priorities.
- Use atomic_setbits_ulong() for softintr().  Thanks to Tim Kelly for
  reminding me about atomic_*.
2004-12-17 05:42:30 +00:00
yamt f4221aaaf6 revive spec vop_bwrite as it's needed for block devices.
PR/28684 from Jukka Salmi.
2004-12-17 03:31:20 +00:00
is 80dd3cea87 new world order 2004-12-16 21:51:04 +00:00
darrenr f314fbb0f1 Expand out an unused byte to give each NAT rule a protocol version field,
allowing rules to be set to match only ipv4/ipv6. And so ipnat must be updated
to actually set this field correctly but to keep things working for old
versions of ipnat (that will set this to 0), make the ioctl handler "update"
the 0 to a 4 to keep things working when people just upgrade kernels.  This
forces NAT rule matching to be limited to ipv4 only, here forward, fixing
kern/28662
2004-12-16 17:01:02 +00:00
darrenr d7859a0415 add an extra sanity check for stepping through TCP header options 2004-12-16 16:37:52 +00:00
tsutsui 25c45d8b5f Now ctrl_led is set in locore.s so remove it from machdep.c. 2004-12-16 12:14:51 +00:00
atatat c64e485f42 Reorder ptyfs pseudo inode numbers so that 0 and 1 are unused, 2 is
the root of the file system, and slaves and masters alternate starting
at 3.  This means the inode numbers won't be really large until you
really allocate a really lot of ptys.
2004-12-16 05:30:18 +00:00
heas 14089042f3 Fix a comment. 2004-12-16 03:13:28 +00:00
heas d7dac6089c Adjust the cscope target so that each source file on a separate line to avoid
overrunning cscope's read buffer and prefix files within lib/{kern,compat}
with the appropriate path.
2004-12-16 00:35:48 +00:00
heas 2239334429 Add entry for the Radeon Mobility T2. 2004-12-16 00:29:06 +00:00
tsutsui b3da46dc10 - Use macro for CTRL_POWER port
- Store machine dependent CTRL_LED address in ctrl_led
- Fix LED debug functions to use stored MD values

Actually I only used these debug routines at the very early porting stage
before I got working kernel printf. Heh.

XXX: news1200 has not been tested for many years.
2004-12-15 17:30:46 +00:00
tsutsui 62724bfcae Add definitions for ports CTRL_POWER and CTRL_LED. 2004-12-15 17:22:11 +00:00
tsutsui 7c2dd89551 Backout previous because:
- we should fix genassym.sh to generate proper unsigned values rather than
  remove use of such values in each source
- 0xe0dc0000 is port to control LED so INTIOBASE1700_OFF is not proper name
- these LED debug code didn't work on news1200 and it should be fixed anyway
2004-12-15 14:03:52 +00:00
mycroft 5ac91d4849 Remove some unnecessary (int32_t) casts that would cause us to screw up the
top bit in block addresses.

Also, change some daddr_t->int32_t casts (mostly as arguments to ufs_rw32(),
where they would get promoted anyway) to u_int32_t.
2004-12-15 07:11:51 +00:00
jmc a00ad2295a Due to cpp always treating constants as signed and gas no longer accepting
X - -Y in any form, need to convert a subtract into + (-1 * val).
2004-12-15 05:21:36 +00:00
jmc e2fee8d9b1 Convert -MMU_68040 into a form gas will take now (-- isn't valid) 2004-12-15 05:03:23 +00:00
jmc 11ea356c3f Convert expression for (0xe0dc0000-INTIOBASE1700) directly within a cpp
macro as otherwise gas gets handed an X - -Y expression and w 2.15 it won't
treat that as a valid expression
2004-12-15 04:56:13 +00:00
briggs 6aba8dfd50 * Don't try to clear the screen if we failed to map it.
* Don't try to call OF_open for /chaos@F0000000/control@B -- it hangs.
2004-12-15 04:52:05 +00:00
thorpej 7994b6f95e Don't perform checksums on loopback interfaces. They can be reenabled with
the net.inet.*.do_loopback_cksum sysctl.

Approved by: groo
2004-12-15 04:25:19 +00:00
jmc 051513394b Use correct locator name 2004-12-15 04:09:29 +00:00
jmc 60c10a987e If LKM deal w. locators different 2004-12-15 04:09:16 +00:00
jmc 0c600e6739 Add a missing include for locators.h 2004-12-15 03:56:20 +00:00
dyoung ad16f31a1c In wi_stop, wait for transmit commands to complete. Extract
subroutine wi_txcmd_wait from wi_cmd and wi_stop.

This stops wi from griping, "wi0: command timed out, cmd=0x10b,
arg=0x0", when we down/up the interface.  Thanks to Pavel Cahyna
for reporting this bug.
2004-12-14 19:53:46 +00:00
tls c1545077ff Terminate the domain on RB_HALT, not just on reboot. This avoids looping
around a cngetc() that will never return while "halted", which is rude,
and which also requires domain 0 to not just restart us, but kill us
first.  Suggestion from Michael Kukat (though this change is not the
same as the one he suggested).

Will cngetc() actually return something when running in domain 0 with a
VGA console?  I don't think it will; if it actually does, we should make
this behaviour depend on whether we're in domain 0 or some other domain.
2004-12-14 18:07:42 +00:00
tls 2f6318305f Change confusing name HYPERVISOR_yield to HYPERVISOR_sched_op as suggested
by Michael Kukat.
2004-12-14 17:13:56 +00:00
christos 2294df2c80 Move the definition of sccA from zc.c to machdep.c and always initialize it.
This way we save a mess of #ifdefs. XXX: This code is disgusting. Drivers
should not communicate with the rest of the kernel by means of global variables.
2004-12-14 16:28:00 +00:00
yamt ee344f939f redirect some VOPs which shouldn't be used for nfs
to genfs_badop (ie. panic).
2004-12-14 09:15:23 +00:00
yamt e3ed5def47 - centerize code to invalidate stale cache.
- don't ignore errors when invalidating buffers in nfs_open.
2004-12-14 09:13:13 +00:00
chs 6b7d89dfc7 remove some defines that aren't used anywhere (and shouldn't exist anyway,
since they hard-code information that should come from locators.h).
2004-12-14 02:34:15 +00:00
chs 267af995b7 use the generated macros in locators.h rather than hard-coded numbers
to index the cf_loc[] array.  reviewed by allen briggs.
2004-12-14 02:32:02 +00:00
cube e32b031c0f Change cf_fstate value to FSTATE_STAR to avoid a panic in config_detach()
for DISAGNOSTIC kernel.  That value of struct cfdata is not currently used
for pseudo-device attachments anyway.
2004-12-13 19:40:56 +00:00
tls db47b27974 HYPERVISOR_yield is one of the hypervisor calls that's "overloaded"; it
does different things depending what's in %ebx.

We weren't setting %ebx here *at all*; so we did not get SCHEDOP_yield,
which was what was wanted; so unpredictable things happened, notably
immediate return to the NetBSD idle loop, in other words spinning on CPU.
Definitely not cool!

Michael Kukat caught this one and suggested this fix on port-xen.
2004-12-13 19:33:56 +00:00
cube ab9c18a45c Constify. From Peter Postma. 2004-12-13 19:26:34 +00:00
cube 3957e91683 Fix compilation on LP64 hosts. Reported by Peter Postma. 2004-12-13 19:22:57 +00:00
cube 89a3fae64d Fix a comment. 2004-12-13 19:21:42 +00:00
dyoung 4a2df5a4d4 Bug fix: synchronize Transmit commands with all other commands.
Following Charles Hannum's wi(4) optimizations, there could be a
Transmit command outstanding after wi_tx_intr or wi_start returns.
The driver would blithely issue a second command [*] before the
first command was finished, taking the first command's WI_EV_CMD
indication to mean the second command had finished.  The driver
would be dreadfully confused when the second command's results did
not meet its expectations (e.g., a RID mismatch error would occur).
The packet transmit section of the code would never read the
WI_EV_CMD it expected, so transmissions would cease.

This patch counts the outstanding transmit commands (there can be
only one) and, if a transmit command is outstanding at the top of
wi_cmd(), wi_cmd waits for the command to complete.  If there was
a transmit command outstanding when wi_cmd begins, it calls
wi_cmd_intr() on its way out.

I have tested this on an Orinoco card.  Previously, the card would
stop transmitting or the kernel would panic as desynchronization
occurred.  Now it works beautifully.

[*] A second command could be issued by wi_ioctl or else by
    wi_intr->wi_info_intr->wi_newstate->wi_read_xrid->wi_read_rid.
2004-12-13 17:55:28 +00:00
dyoung 407495af6f In wi_tx_intr, be a little more explicit about which fields we're
reading from the Tx-Complete FID.
2004-12-13 17:24:09 +00:00
dyoung cdf3961f69 Refactor. wi_read_rid calls,
wi_read_rid(sc, rid, &val, &buflen) == 0 && buflen == sizeof(val),

become wi_read_xrid calls

  wi_read_xrid(sc, rid, &val, sizeof(val)) == 0.

If the actual RID length is different from the expected RID length,
wi_read_rid prints to the log.
2004-12-13 17:21:35 +00:00
christos f5e5c22a8e PR/28645: Fabien Devaux: Infinite loop at startup with Acer Travelmate 313T
due to buggy BIOS.
2004-12-13 13:46:29 +00:00
yamt 819738713e sys_acct: use VOP_SETATTR instead of VOP_TRUNCATE as the latter's
filesystem internal.  while i'm here, fix vnode locking.

XXX vn_start_write
2004-12-13 08:46:43 +00:00
sekiya c01662e204 Add prototype for r5k_sdcache_wbinv_range_index() 2004-12-13 08:39:50 +00:00
sekiya 07b6e1e982 Implement r5k indexed writeback-invalidate, and fix usage of Page_Invalidate_S.
Originally written by rafal@ back in April 2003.  Field-tested by many
people since.

(I am not committing the pmap hack at this time; although pmap changes are
necessary to fully address the r5k panic/coma problems, the implementation
needs further thought)
2004-12-13 08:39:21 +00:00
sekiya d1eab478d8 Remove gratuitous use of MIPS1/MIPS3. 2004-12-13 08:31:54 +00:00
sekiya d45f3ffb2c MIPS3_CONFIG_SC is an unreliable indicator for SC presence; r5k_enable_sdcache()
will gracefully exit if there is no secondary cache.  Rework #ifdef'd out
r5k cache code to take this into account, and remove pointless r10k case.
2004-12-13 08:30:58 +00:00
chs f873a82973 for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
2004-12-13 02:39:07 +00:00