Commit graph

16412 commits

Author SHA1 Message Date
Bill Paul cbc20d30a5 Properly re-enable the transmitter in the TX error handler. 1999-08-26 05:31:53 +00:00
Bill Paul 2f0f7ef0a6 Handle buses with multiple PHYs correctly. 1999-08-26 05:30:33 +00:00
Greg Lehey 2de219e97f Change asf function to use the new name of the list in kern_linker.c.
See revision 1.35 of sys/kern/kern_linker.c.
1999-08-26 04:01:37 +00:00
Greg Lehey 4e72079195 read_drive: Remove references to vp->v_lastr, which is going away.
Reviewed-by:	dillon
1999-08-26 03:27:21 +00:00
Greg Lehey 35b5051ab9 complete_rqe: explicitly reinitialize b.b_iodone. This shouldn't have
changed, but we've seen some weird cases of b_iodone
	      being NULL, and they don't make any sense.

Suffered-by:  Bernd Walter <ticso@cicely.de>
1999-08-26 03:26:39 +00:00
Greg Lehey ca55837990 config_plex: don't allocate a rangelock struct.
lockrange: correctly expand rangelock struct, including expanding a
	   null struct.  Previously lockrange would attempt to lock a
	   NULL pointer under these circumstances.

Reported-by:	Ian Freislich <iang@uunet.co.za>
1999-08-26 03:25:38 +00:00
Peter Wemm 399f34180a Use .p2align to ensure consistant a.out/elf alignment. I'd have used
SUPERALIGN_TEXT, but this is inline assembler and after cpp has run.
Inspired by bde's comments on linux_locore.s.
1999-08-25 23:50:03 +00:00
Peter Wemm 4a54450a9d It would help if things that MUST be 32 bit aligned were really 32 bit
aligned.  If I recall correctly, this is to ensure apic_imen can be
accessed in a single bus cycle.  Also, use TEXT_ALIGN rather than a
.align 2 (which means 2 byte align on ELF and 4 byte align on a.out)
1999-08-25 23:42:02 +00:00
Mark Newton 776a8f98ee Replace ".align 2" with "ALIGN_TEXT" as per recent discussion re: the linux
emulator.

Suggested by:	bde
1999-08-25 22:55:56 +00:00
Julian Elischer 2a1be8333d Make a place to store the devfs hook for the block device, as the same
specinfo is used to identify both raw and block version sof a device.
1999-08-25 22:50:12 +00:00
Marcel Moolenaar ae4ea3eed4 Use ALIGN_TEXT macro for alignment to avoid ambiguity.
Pointed out by: bde
1999-08-25 19:04:39 +00:00
Matt Jacob 2d712f3d8d what is a devuce? 1999-08-25 18:05:52 +00:00
Marcel Moolenaar 4e0eaf6924 Fix linux_newlstat in that it doesn't return the attributes of its containing
directory. Also, update arguments of NDINIT for both newstat and newlstat.

While I'm at it, fix style bugs in all {s|ls|fs}tat syscalls.

Reported by: bde
1999-08-25 15:23:54 +00:00
Marcel Moolenaar c85f67175f Fix {g|s}etgroups semantics. We use cr_groups[0] to hold egid. This means that
egid will be twice in the set and that setting cr_groups[0] will change egid.
This is simply solved by ignoring cr_groups[0]. That is; linux_getgroups does
not return cr_groups[0] and linux_setgroups does not touch it.

Noticed by: bde
Brought to my attention by: sheldonh
1999-08-25 14:11:01 +00:00
Marcel Moolenaar 296f7267f3 Fix lingo: 'is not implemented or obsoleted' is not the same as 'is obsoleted
or not implemented'.
1999-08-25 13:17:05 +00:00
Poul-Henning Kamp 41d2e3e09e Introduce vn_isdisk(struct vnode *vp) function, and use it to test for diskness. 1999-08-25 12:24:39 +00:00
Poul-Henning Kamp a431597b25 Add a couple of missing but unimportant break; statements. 1999-08-25 11:44:11 +00:00
Marcel Moolenaar 2fdc82e093 Change all UNIMPL syscalls to STD and add them to linux_dummy. Now we always
know if and when an unimplemented or obsoleted syscall is being used. Make the
message more end-user friendly.

And as long as we're here, rename some unimplemeted syscalls (linux_phys ->
linux_umount2, linux_vm86 -> linux_vm86old, linux_new_vm86 -> linux_vm86).

Change prototype for linux_newuname from `struct linux_newuname_t *' into
`struct linux_new_utsname *'. This change is reflected in linux.h and
linux_misc.c.
1999-08-25 11:19:03 +00:00
Marcel Moolenaar fc4529a0d1 Change all UNIMPL syscalls to STD and add them to linux_dummy. Now we always
know if and when an unimplemented or obsoleted syscall is being used. Make the
message more end-user friendly.

And as long as we're here, rename some unimplemeted syscalls (linux_phys ->
linux_umount2, linux_vm86 -> linux_vm86old, linux_new_vm86 -> linux_vm86).

Change prototype for linux_newuname from `struct linux_newuname_t *' into
`struct linux_new_utsname *'. This change is reflected in linux.h and
linux_misc.c.

Lastly, make line-continuation and indentation more uniform.
1999-08-25 11:17:36 +00:00
Marcel Moolenaar 8ebe972975 Fix stack misalignment for Linux binaries caused by `linux_sigcode' not being
a multiple of 4 bytes in size. This solves the recent SIGBUS errors for
glibc2.1 configurations.

Explained by: bde
1999-08-25 09:05:29 +00:00
Doug Rabson 6afde6e247 Some very minor changes to the ISA dma code. 1999-08-25 08:25:58 +00:00
Mike Smith 68b7d21a4a Rename 'bios_jmp' to 'bios16_jmp' to make it clear what it's related to. 1999-08-25 06:56:37 +00:00
Peter Wemm 857c0cefe0 Use the far jump for the base of the page arithmatic rather than the
calling function, otherwise Bad Things Happen(tm) when bios16_call is
not in the same page as bios_jmp.

Reviewed by:  msmith
1999-08-25 06:44:32 +00:00
Julian Elischer 0ff7b13acd Make DEVFS use PHK's specinfo struct as the source of dev_t and devsw.
In lookup() however it's the other way around as we need to supply the
dev_t for the vnode, so devfs still has a copy of it stashed away.

Sourcing it from the vnode in the vnops however is useful as it makes
a lot of the code almost the same as that in specfs.
1999-08-25 04:55:20 +00:00
Julian Elischer 2053751093 Make DEVFS ops reflect some of the changes that have recently occured in the
specfs version of the same ops. Merging with phk's dev_t changes is not yet
complete.

i.e. devfs still uses it's own devsw pointer rather than following
devsw(a_vp->v_rdev), and it's own copy of the dev_t.

This fixes some broken actions re: syscons and DEVFS due to bitrot in
devfs vops.
1999-08-25 02:04:40 +00:00
Julian Elischer bb70475a92 Fix comment to match reality..
vop_strategy gets a vnode argument these days.
1999-08-25 00:26:34 +00:00
Julian Elischer 792b73b97b Devfs now adds itself to the hook that PHK supplies.
block devices are still not handled correctly, though a kludge
may make them "ok".
1999-08-24 20:30:15 +00:00
Poul-Henning Kamp cb5eef8f2b Initialize the si_bsize fields for the MFS bogodevices.
(This broke MFS rootfs and thereby installation)
1999-08-24 18:35:33 +00:00
Poul-Henning Kamp c1df7a7420 Remove unneeded prototypes. 1999-08-24 18:31:06 +00:00
Mike Smith e6a80efcdd Work around a bad design in some PnP BIOS code whereby the BIOS can reach
off the top of our constructed stack segment while it's trying to copy a
maximally-sized PnP argument frame around.
1999-08-24 16:42:08 +00:00
Sheldon Hearn 740e3a15f7 Fix bug introduced in rev 1.28, which causes kernel build to break for
the case where DEBUG is defined but not DIAGNOSTIC. ffs_checkblk is
declared conditionally on DIAGNOSTIC, not DEBUG.

PR:	13314
Reviewed by:	bde
1999-08-24 08:39:41 +00:00
Alan Cox 4bffe072c4 Cosmetic: Correct the Id string.
Submitted by:	Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
1999-08-24 06:54:20 +00:00
Brian Feldman 076dab2983 When the SYSINIT() was removed, it was replaced with a make_dev on-demand
creation of /dev/drum via calling swapon. However, the make_dev has a
bogus (insofar that it hasn't been added yet) cdevsw, so later we end
up crashing with a null pointer dereference on the swap vp's specinfo.
The specinfo points to a dev_t with a major of 254 (uninitialized), and
we get a crash on its d_strategy being called.

The simple solution to this is to call cdevsw_add before the make_dev
is ever used. This fixes the panic which occurred upon swapping.
1999-08-24 05:58:35 +00:00
Kazutaka YOKOTA 2832e35612 Correct the mode information for the VGA mode X.
- This mode uses four planes rather than one.
- "# of bytes in a scan line" = "# of pixels in the line"/2
1999-08-24 04:26:54 +00:00
Bill Paul 0f41c63996 Change PN_RXLEN from 1518 bytes to 1536 bytes. The chip always DMAs data
in 4 byte chunks. It turns out that with the 82c169C on the Netgear
FA-310TX Rev D2, if you tell the chip you have reserved a buffer of 1518
bytes, it will actually treat it as 1516 bytes since 1518 is divisible
by four. Consequently, a packet of 1514 bytes will always end up consuming
two buffers: the last coupleof bytes will spill over into the next
descriptor. This causes the pn_rx_bug_war() routine to trip unnecessarily.

I'm not sure if the 82c169B or 82c168 chips behave the same way; I'll
have to check them. In any case, this change should work just as well
with them. Note that the FA-310TX Rev D2 also has a Broadcom PHY
instead of a Level One LXT970 PHY, however this shouldn't make any
difference as far as the driver is concerned.

This change also allows me to do a way with one rounding overation in
pn_rx-buf_war().
1999-08-24 03:19:45 +00:00
Greg Lehey 4819484d0f set_sd_state: Correct the conditions for bringing up empty or
initialized subdisks.

Tidy up some comments.

Eliminate sddownstate(); it wasn't being used any more.  Return
REQUEST_DOWN instead.

Add setstate_by_force() to implement the VINUM_SETSTATE_FORCE ioctl
for diddling individual object states.  This is a repair tool which
can also be used for panicing the system.  Use with utmost care if at
all.
1999-08-24 02:29:41 +00:00
Greg Lehey 0911b330a0 Lock stripes of striped and RAID-5 plexes before writing them. This
avoids a race condition where multiple RAID-5 subdisks are being
revived at the same time.  The locks should also prevent conflicts
with user requests on concatenated and striped plexes, but this needs
more work.

Tidy up some comments.
1999-08-24 02:28:37 +00:00
Greg Lehey 7b0c9dde22 Add keywords setstate, checkparity, rebuildparity. 1999-08-24 02:27:45 +00:00
Greg Lehey 4fe498363c Add VINUM_SETSTATE_FORCE ioctl for diddling individual object states.
This is a repair tool which can also be used for panicing the system.
Use with utmost care if at all.
1999-08-24 02:26:15 +00:00
Greg Lehey 21c3b10bbc format_config: print preferred plex correctly. 1999-08-24 02:24:47 +00:00
Greg Lehey c4bbdf0e5a Change parameters of unlockrange to allow calling from revive_block,
which doesn't use request groups.
1999-08-24 02:23:21 +00:00
Greg Lehey 2a11f45e35 Add declaration for vinum_setstate_by_force. 1999-08-24 02:21:46 +00:00
Greg Lehey 0c5c538d29 give_sd_to_drive: If we don't have space, deallocate the subdisk.
Previously we could end up with a valid subdisk
                  entry pointing to offset -1 on the drive.
1999-08-24 02:20:30 +00:00
Greg Lehey 8d9ef32fdd vinumclose: close raw plexes and subdisks. 1999-08-24 02:18:55 +00:00
Greg Lehey fe89164039 Add support for logging subdisk I/O.
Change parameters of unlockrange to allow calling from revive_block,
which doesn't use request groups.
1999-08-24 02:17:42 +00:00
Bruce Evans d009ccfaf5 Cast pointers to uintptr_t instead of casting them to u_long, and/or vice
versa.  Cosmetic.
1999-08-24 00:56:50 +00:00
Bruce Evans ff0061bb1d Cast pointers to [u]intptr_t instead of casting them to [u_]long. Don't
depend on gcc's feature of casting lvalues, especially for direct
assignment where it doesn't even simplify the syntax.  Cosmetic.
1999-08-24 00:48:19 +00:00
Bruce Evans 0921e4886f Cast pointers to uintptr_t instead of casting them to u_long. They
are still converted to u_long by assignment of the uintptr_t, and
address calculations are still done using u_long.  This is OK for
currently supported machines, but addresses should be represented
by vm_offset_t or uintptr_t in case pointers are longer than longs.

"Fixed" size of linker_path[].  MAXPATHLEN + 1 was 1 too large for
search paths with only one file path in them, but much too small
for search paths with several long file paths in them.
1999-08-24 00:38:52 +00:00
Bruce Evans 917210006a Fixed a misplaced cast to uintptr_t. Cosmetic.
Use device_get_nameunit() instead of rolling our own.
1999-08-24 00:22:10 +00:00
Bruce Evans 1195ae1843 Cast pointers to uintptr_t instead of casting them to u_long. Don't
depend on gcc's feature of casting lvalues.  Cosmetic.
1999-08-24 00:04:45 +00:00