syncs weren't optimized properly (they probably still aren't, but are bug
for bug compatible with ffs). These fixes are mostly academic, since
ext2fs is too broken to mount read-write (it apparently doesn't clear
indirect blocks).
Obtained from: mostly from Lite2
* Fix a raft of warnings, printf and otherwise.
* Allocate the correct amount in mod_searchmodule to prevent an overflow.
* Fix the makefiles so they work outside my home directory (oops).
Fixes for bugs not shared with ffs:
- don't mount unclean filesystems rw unless forced to.
- accept EXT2_ERROR_FS (treat it like !EXT2_VALID_FS). We still don't set
this or honour the maximal mount count.
- don't attempt to print the name of the mount point when mounting an
unclean file system, since the name of the previous mount point is
unknown and the name of the current mount point is still "".
Fixes for bugs shared with ffs until recently:
- don't set the clean flag on unmount of an initially-unclean filesystem
that was (forcibly) mounted rw.
- set the clean flag on rw -> ro update of a mounted initially-clean
filesystem.
- fixed some style bugs (mostly long lines).
The fixes are slightly simpler than for ffs, because the relevant on-disk
state is not a simple boolean variable, and the superblock has a core-only
extension.
Obtained from: parts from ffs_vfsops.c, parts from NetBSD
- don't set the clean flag on unmount of an unclean filesystem that was
(forcibly) mounted rw.
- set the clean flag on rw -> ro update of a mounted initially-clean
filesystem.
- fixed some style bugs (mostly long lines).
This uses the fs_flags field and FS_UNCLEAN state bit which were
introduced in the softdep changes. NetBSD uses extra state bits in
fs_clean.
Reviewed by: luoqui
- there were too many global variables (there still are :-).
- the data section was bloated by explicit initializations of static
variables to 0 (only fixed the recently changed ones).
- WRAPHIST() had silly parentheses around foo->bar.
- the comment about inline functions was stale.
- the comment about Userconfig presumes too much about the boot environment.
- `i' was reused confusingly in scioctl().
- the declaration of `butmap' used a deprecated K&R misfeature.
- the initializeation of `butmap' had an unnecessary line break.
- `unsigned char' was not consistently (mis)spelled as u_char.
- English was poor in a comment in videoio.c.
Submitted by: bde
Allow the MI code to override the preferred console (eg. so that
an RB_SERIAL flag from the i386 boot2 can override the default
first active console)
isapnp.c
Use the standard format for ISA PnP IDs.
pnp.c
Allow trailing comments on lines, be less picky about line
contents.
ls.c
Cosmetic error message fix.
panic.c
Print the right arguments.
Reviewed by: Luoqi Chen <luoqi@watermarkgroup.com>
Fixed problem where write()s can get lost due to buffers flagged B_DELWRI
being improperly released in brelse().
The last consumer of this code (the old SCSI system) has left us and
the CAM code does it's own bouncing. The isa dma system has been
doing it's own bouncing for a while too.
Reviewed by: core
the OpenBSD group to fix a problem with the default ifmedia not being
set properly in some cases with a 3c905B, leading to a panic in ifmedia_set().
Also apply a patch to force the transmit start routine to check the
transmitter to make sure it isn't wedged if the outbound tx queue appears
full. This seems to cure some problems with 'watchdog timeout' errors
cropping up in some cases. I tried to do this before by checking for the
IFF_OACTIVE flag on entry to xl_start(), but if the IFF_OACTIVE flag is
set, ether_output() won't even call xl_start(). It should work now.
Lastly, increase the size of the TX queue from 10 descriptors to 16 to
hopefully make it less likely that the TX queue will fill up.
- Tagged devices were limited to one transaction (oops)
- We revert to untagged with a tag delay if the user changed the
transfer negotiation values (via perhaps camcontrol some day).
- xpt_async did not use the expanded path in some cases which could
cause a panic.
computer 'suspended', although the slot was powered off. There was a
race where the slow could be powered off *after* it was assigned a
new driver when the computer was 'resumed'.
Noticed by: Brian Somers <brian@Awfulhak.org>
PHYs in tl_attach(). This is mainly to suck away any possible stray
interrupts.
This prevents an intermittent problem on some systems where the adapter
probes correctly but yields a device timeout (and possible subsequent adapter
check) when configured. When I originally tested the driver, I ifconfig'ed
the interface after the system had already been booted and didn't notice
any problems, but when configuring the interface immediately at startup,
it would occasionally timeout and hang, until an adapter check interrupt
came along and reset things again. I'm not exactly sure if this is a
general problem of just something peculiar to this hardware (there are
three devices, including the tlan, all on IRQ 11) but the extra reset
shouldn't hurt anything. (It works fine with my 100Mbps Olicom adapter too.)
Thanks to Mark Taylor from Cybernet (mtaylor@cybernet.com) for allowing
me remote access to a Compaq system for debugging purposes.
Submitted by: Kirk McKusick <mckusick@McKusick.COM>
Two minor changes are also included,
1. Remove gratuitious checks for error return from vn_lock with LK_RETRY set,
vn_lock should always succeed in these cases.
2. Back out change rev. 1.36->1.37, which unnecessarily makes async mount
a little more unstable. It also keeps us in sync with other BSDs.
Suggested by: Bruce Evans <bde@zeta.org.au>
Now supposedly less harmful way of accessing VGA sequencer registers
is default. An alternative, often troublesome, I/O access is optional.
Discussed with: sos, jkh
address for the LCA PCI configuration register address.
FreeBSD/Alpha now boots on the NoName (aka AXPpci 33, Alpha PC), and probably
also on the Multia (mine hasn't arrived yet, so I can't tell for sure).
Submitted by: Doug Rabson <dfr@freebsd.org>
- Handle pixel (raster text) mode properly.
- Clear screen and paint border right.
- Paint text attribute (colors).
- Fix off-by-one errors.
- Add some sanity checks.
- Fix some function prototypes.
- Add some comment lines.
- Define generic text mode numbers so that the user can just give
"80x25", "80x60", "132x25"..., rather than "VGA_xxx", to `vidcontrol'
to change the current video mode. `vidoio.c' and `vesa.c' will map
these numbers to real video mode numbers appropriate and available
with the given video hardware. I believe this will be useful to make
syscons more portable across archtectures.
changes:
- Cleaned up register access macros so that they work like the XL
driver macros (you can switch from PIO to memory-mapped mode
using a single #define -- default is still memory mapped mode).
The old 'struct overlayed onto the memory mapped register space'
cruft has been removed.
- Improved multicast filter code. The ThunderLAN has four entry
perfect filter table in addition to the 64-bit hash table: we need
one of the perfect filter entries for the station address, but we
can use the other three for multicast filtering. We arrange to put
the first three multicast group addresses in the perfect filter
slots so that commonly joined groups like the all hosts group and
the all routers group can be filtered without using up bits in the
hash table.
Note: in FreeBSD 3.0, multicast groups are stored in a doubly
linked list, however new entries are added at the head of the list
(thereby pushing existing entries down towards the tail). We want
to update the filter starting from the oldest entry to the newest
since the all hosts group is always joined first. This means we
really want to start from the tail of the list, not the head, but
to find the tail we first have to traverse the list all the way to
the end and then add entries working backwards. This is a bit of a
kludge and could be inefficient if the list is long.
- Cleaned up autonegotiation code: tl_autoneg() wasn't always setting
modes correctly.
- Cleaned up ifmedia update and status routines as well.
- Added tl_hardreset() routine to initialize the internal PHY according
to the ThunderLAN manual.
- Did away with the kludge where PHYs were treated as separate logical
interfaces. This didn't really work, especially in the case of the
newer Olicom 2326 adapters which use a Micro Linear ML6692 PHY which
provides only 100Mbps support, relying on the internal PHY for 10Mbps
support (both PHYs share the RJ45 port, with the 6692 doing all the
autonegotiation work). This kludge resulted from my misunderstanding
of the operation of the Compaq Netelligent Dual Port card (the tlan
manual mentions multiple channels, but in a different context; this
got me a little confused). The driver has been reported to work
correctly with the dual port card.
- Added dio_getbit/dio_setbit/dio_read/dio_write functions which carefully
set the ThunderLAN's indirectly accessed internal registers. This makes
the EEPROM reading code more reliable.
Hopefully I won't have to touch this again before 3.0 goes out the door.
I plan to import the 2.2.x version sometime this week.
Approved-by: jkh
already allowed medium not present type errors (0x3a), but some Philips and
HP WORM drives return 0x04,0x00 when you issue a read capacity without
media in the drive.