Commit Graph

15285 Commits

Author SHA1 Message Date
Robert Nordier
9292eec80d Add mbr: a standard master boot record intended to replace a couple
that are presently embedded in the fdisk and sysinstall code.
1999-05-24 22:36:24 +00:00
Doug Rabson
1522abdd5e Don't try to allocate memory resource unless address is non-zero. 1999-05-24 18:50:41 +00:00
Bill Paul
497760a16a Fix bug that can cause transmit corruption. There are actually two 'rings'
in the transmit code: the TX descriptor ring, and a 'shadow' ring of mbuf
pointers, one for each TX descriptor. When transmitting a packet that
consists of several fragments in an mbuf chain, we link each fragment
to a descriptor in the TX ring, but we only save a pointer to the mbuf
chain. This pointer is saved in the shadow ring entry which corresponds
to the first fragment in the packet. Later, ti_txeof() can release the
whole chain with a single m_freem() call. (We need the second ring to
keep track of the virtual addresses of the mbuf chains.)

The problem with this is that the Tigon isn't actually through with the
mbuf chain until it reaches the last fragment (which has the TI_BDFLAG_END
bit set), however the current scheme releases the mbuf chain as soon as
the first fragment is consumed. This is wrong, since the mbufs can then
be yanked out from under the Tigon and modified before the other fragments
can be transmitted.

The fix is to make a one line change to ti_encap() so that it saves the
mbuf chain pointer in the shadow ring entry that corresponds to the last
fragment in TX ring instead of the first. This prevents the mbufs from
being released until the last fragment is transmitted.

Painstakingly diagnosed and fixed by: Robert Picco <picco@mail.wevinc.com>
Brought to my attention by: dg
1999-05-24 14:56:55 +00:00
Luigi Rizzo
e142fadecb close pr 10889:
+ add a missing call to dn_rule_delete() when flushing firewall
  rules, thus preventing possible panics due to dangling pointers
  (this was already done for single rule deletes).
+ improve "usage" output in ipfw(8)
+ add a few checks to ipfw pipe parameters and make it a bit more
  tolerant of common mistakes (such as specifying kbit instead of Kbit)

PR: kern/10889
Submitted by: Ruslan Ermilov
1999-05-24 10:01:22 +00:00
Peter Wemm
578de0426e Fix a [start,end] vs [start,count] botch that corrupted the resource
manager and prevented IOPort allocation beyond the first EISA slot from
working.  subr_rman.c should have trapped this on the way into the system
rather than tripping over the wreckage.

Head banged into wall repeatedly by:  "Matthew N. Dodd" <winter@jurai.net>
1999-05-24 03:08:46 +00:00
John Birrell
8fb7da0099 Remove the mfs stuff now that mfs_init() does the MFS_ROOT initialisation. 1999-05-24 00:54:17 +00:00
John Birrell
350185153d Back out my previous change (phk didn't like it) in favour of setting
rootdev in the mfs initialisation code iff MFS_ROOT (which Bruce doesn't
like). Damned if I do - damned if I don't.
1999-05-24 00:37:26 +00:00
John Birrell
02013ff886 Remove the test for bdevsw(dev) == NULL from bdevvp() because it fails
if there is no character device associated with the block device. In this
case that doesn't matter because bdevvp() doesn't use the character
device structure.

I can use the pointy bit of the axe too.
1999-05-24 00:34:10 +00:00
John Birrell
4d562a18fc - Make setroot() conditional on FFS etc, to avoid a compiler warning
on systems with no FFS.
- Remove all references to mfs from cpu_rootconf(). mfs_init is
  called prior to cpu_rootconf(), so it can set mountrootfsname to mfs
  and (more imporantly) set rootdev using the (bogus in Bruce's opinion)
  special major number of 255.
1999-05-24 00:30:49 +00:00
John Birrell
ed3a2fb7b3 - Back out Luoqi's cdevsw stuff. It panics on my system and is not required.
- Fix an error message.
- Do the MFS_ROOT setting of mountrootfsname in mfs_init() instead of
  cpu_rootconf().
- Set rootdev in mfs_init instead of later in mfs_mount() iff MFS_ROOT.
1999-05-24 00:27:12 +00:00
Roger Hardiman
ab27fe4452 Added rgb_vbi_prog() to capture VBI data and video at the
same time. To capture VBI data, /dev/vbi must be opened
before starting video capture.
A partly on code from Hiroki Mori <mori@infocity.co.jp>
1999-05-23 21:40:51 +00:00
Justin T. Gibbs
8281556234 Rely on the statistics in XPT_GDEV_STATS instead of the versions still
retained in XPT_GDEV_TYPE for binary compatibility.  Mark the legacy
structure values for removal when we bump the major CAM revision.
1999-05-23 18:57:29 +00:00
Justin T. Gibbs
3caf668db7 Don't reference our SCB until we have validated that the firmware has
returned an SCB that is in range.
1999-05-23 18:55:58 +00:00
Justin T. Gibbs
cf7d3071b9 Poll for interrupts in bt_cmd in case they are masked. A completing
mailbox command will block the completion of an immediate command,
so we must service them for our command to succeed.

PR: 11799
1999-05-23 18:54:34 +00:00
Brian Somers
6961f3da13 brucify
Mentioned by: sprice@hiwaay.net
1999-05-23 13:52:05 +00:00
Peter Wemm
a0ca55077a Don't reference non-existant ATAPI option..
PR:		11814
Submitted by:	Sheldon Hearn <sheldonh@uunet.co.za>
1999-05-23 11:11:31 +00:00
John Birrell
d47066829a Make MFS_ROOT work again. MFS_ROOT means that rootdev is not set.
Broken by: phk
Problem ignored by: phk
1999-05-23 10:51:33 +00:00
Justin T. Gibbs
fdd1fe20a4 Add the amd driver. 1999-05-22 22:10:07 +00:00
Justin T. Gibbs
ebada55cce aic7xxx.c:
Honor the 'bus reset at startup' option now that the XPT properly
	handles transfer negotiation in this scenario.

	Honor the sync rate settings on Ultra2 controllers.  We would
	always negotiate at the fastest speed.  Oops.

aic7xxx.h:
	Whitespace.

aic7xxx.seq:
	Fix a minor nit that would cause the controller to miss the update
	of the negotiation required bitmask causing the negotiation to
	be delayed by a command.
1999-05-22 22:04:11 +00:00
Justin T. Gibbs
516871c613 Add a default async handler funstion to cam_periph.c to remove duplicated
code in all initiator type peripheral drivers.

scsi_target.c:
	Release ATIO structures that wind up in the 'unkown command queue'
	for consumption by our userland counterpart, back to the controller
	when the exception for that command is cleared.
1999-05-22 22:00:24 +00:00
Justin T. Gibbs
87cfaf0e1f Add the XPT_PATH_STATS and XPT_GDEV_STATS function codes. These ccb
types allow the reporting of error counts and other statistics.  Currently
we provide information on the last BDR or bus reset as well as active
transaction inforamtion, but this will be expanded as more information is
added to aid in error recovery.

Use the 'last reset' information to better handle bus settle delays.
Peripheral drivers now control whether a bus settle delay occurs and
for how long.  This allows target mode peripheral drivers to avoid
having their device queue frozen by the XPT for what shoudl only be
initiator type behavior.

Don't perform a bus reset if the target device is incapable of performing
transfer negotiation (e.g. Fiber Channel).

If we don't perform a bus reset but the controller is capable of transfer
negotiations, force negotiations on the first transaction to go to the
device.  This ensures that we aren't tripped up by a left over negotiation
from the prom, BIOS, loader, etc.

Add a default async handler funstion to cam_periph.c to remove duplicated
code in all initiator type peripheral drivers.

Allow mapping of XPT_CONT_TARGET_IO ccbs from userland.  They are
itentical to XPT_SCSI_IO ccbs as far as data mapping is concerned.
1999-05-22 21:58:47 +00:00
Justin T. Gibbs
1723e869c1 First cut at a driver for the amd53c974 PCI SCSI host adapter. This
driver lacks error recovery and still needs more testing, but it's
about time I got it under revision control.

Submitted by:	 Tekram Inc.
Bus Space/DMA and cleanup: gibbs
1999-05-22 21:50:40 +00:00
Dmitrij Tejblum
9d3a442583 Don't call calcru() on a swapped-out process. calcru() access p_stats, which
is in U-area.
1999-05-22 20:10:31 +00:00
Bill Paul
33b3ee3898 - Fix up some comments in if_wi.c (no code changes)
- Mention that the 6Mbps turbo adapters are supported in HARDWARE.TXT
  and RELNOTES.TXT and the wi.4 man page
- Mention turbo adapters in the wicontrol.8 man page and provide a
  complete table of available transmit speed settings
1999-05-22 16:12:54 +00:00
Doug Rabson
6f50cfb43a Use the resource apis to manipulate resources. 1999-05-22 15:47:34 +00:00
Doug Rabson
f78030e22d Don't use BUS_WRITE_IVAR to manipulate resources. 1999-05-22 15:45:47 +00:00
Doug Rabson
a3be63b3ce * Factor out the common code between the isa bus drivers for i386 and alpha.
* Re-work the resource allocation code to use helper functions in subr_bus.c.
* Add simple isa interface for manipulating the resource ranges which can be
  allocated and remove the code from isa_write_ivar() which was previously
  used for this purpose.
1999-05-22 15:18:28 +00:00
Doug Rabson
7e082b48a2 Add some helper functions to make it easier to write a driver for a bus
which needs to manage resources for its children.
1999-05-22 14:57:15 +00:00
Robert Nordier
32ea10b4fc Fix a reference to the mysterious Mike Smisth. 1999-05-22 13:18:28 +00:00
Peter Wemm
13b758eb46 Add seatbelt like in previous function.. 1999-05-22 09:52:21 +00:00
Peter Wemm
2b5be3fad4 Recover from removing the last (unshared) interrupt handler.
PR:		11806
Submitted by:	Assar Westerlund <assar@sics.se>
1999-05-22 09:39:31 +00:00
Bruce Evans
bb86f61a79 Fixed style bugs in previous commit. 1999-05-22 08:36:55 +00:00
Semen Ustimenko
a1684b9830 Move arpcom structure be the first in softc structure. Needed
for ether_ioctl.

PR:   pending/11754
1999-05-22 06:10:14 +00:00
Julian Elischer
2e897e94b6 Cosmetic changes to make it compile without errors in gcc -Wall 1999-05-22 04:43:04 +00:00
Bruce Evans
1979249db2 Restored rev.1.76 which was clobbered by rev.1.77. 1999-05-22 04:34:59 +00:00
Bill Paul
333c864f90 Remove some #ifdef'ed code. The ADMtek doesn't have a 'enable reception of
broadcast frames' bit, so we don't need any code in al_init() to set/clear
it.
1999-05-21 23:58:12 +00:00
Kenneth D. Merry
0d0fb9ffeb Fix a memory leak and a double free that could happen in certain error
cases.  These were unlikely to happen in normal operation.

Noticed by:	"Christopher R. Bowman" <crb@ChrisBowman.com>
1999-05-21 22:02:02 +00:00
Andrey A. Chernov
925fa5c3f5 Realy fix overflow on SO_*TIMEO
Submitted by: bde
1999-05-21 15:54:40 +00:00
Doug Rabson
0053cc2cfe Silently return NULL from devclass_get_device if dc == NULL. The caller
should be handling NULL returns already.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1999-05-21 08:23:58 +00:00
Bill Paul
405b45954e Ack! Cut & paste-o: xl -> al 1999-05-21 04:42:36 +00:00
Bill Paul
ab431312b4 This commit adds driver support for PCI fast ethernet cards based on the
ADMtek AL981 "Comet" chipset. The AL981 is yet another DEC tulip clone,
except with simpler receive filter options. The AL981 has a built-in
transceiver, power management support, wake on LAN and flow control.
This chip performs extremely well; it's on par with the ASIX chipset
in terms of speed, which is pretty good (it can do 11.5MB/sec with TCP
easily).

I would have committed this driver sooner, except I ran into one problem
with the AL981 that required a workaround. When the chip is transmitting
at full speed, it will sometimes wedge if you queue a series of packets
that wrap from the end of the transmit descriptor list back to the
beginning. I can't explain why this happens, and none of the other tulip
clones behave this way. The workaround this is to just watch for the end
of the transmit ring and make sure that al_start() breaks out of its
packet queuing loop and waiting until the current batch of transmissions
completes before wrapping back to the start of the ring. Fortunately, this
does not significantly impact transmit performance.

This is one of those things that takes weeks of analysis just to come
up with two or three lines of code changes.
1999-05-21 04:37:48 +00:00
Andrey A. Chernov
80a290844b Set CHAR_{MIN,MAX} according to -funsigned-char flag given or not
PR: 11627
Submitted by: Petr Lampa <lampa@fee.vutbr.cz>
1999-05-20 23:33:35 +00:00
Eivind Eklund
5164f52665 Make incoming packets work as keepalives, too. This should fix problems
for some games.

Notified of problem by:	tim@turbinegames.com
1999-05-20 20:20:24 +00:00
Nick Hibma
f26c33d249 usbdi.h:
Implement priorities.
GENERIC, LINT, files:
        Remove remarks about ordering of device names.
GENERIC, LINT:
        Sort the devices alphabetically in LINT and GENERIC.
1999-05-20 20:02:37 +00:00
Nick Hibma
91ea20f498 Add comment about split in driver 1999-05-20 19:52:04 +00:00
Andrew Gallatin
aa6de8e012 Add support for multiple PCI "hoses" used on various alpha platforms.
The specific intent of this commit is to pave the way for importing
Compaq XP1000 support.  These changes should not affect the i386 port.

Reviewed by: Doug Rabson <dfr@nlsystems.com>
(actually, he walked me through most of it & deserves more than reviewd-by
credit )
1999-05-20 15:33:33 +00:00
Hellmuth Michaelis
80037d6e9e upgrade isdn4bsd from version 0.71 to the just released version 0.81 1999-05-20 10:14:57 +00:00
Kazutaka YOKOTA
d3c87b8512 - Include isa/isareg.h rather than i386/isa/isa.h for i386.
- Remove unused (thus, commented out) section of code.
1999-05-20 09:49:33 +00:00
Kazutaka YOKOTA
aee1b285f1 Include sys/isa/isareg.h rather than i386/isa/isa.h for i386. 1999-05-20 09:48:13 +00:00
Søren Schmidt
dc82ab74e3 Eigth update to the new ATA/ATAPI driver:
Fixed problems:

    LS120/ZIP drives still currupted data.
	Reworked once again, buffered I/O is just ignoring any sizehints
	it is given :(
	Now the atapifd driver splits up requests for devices that has
	limitted transfer size.

    ISA only configs fails on boot with interrupt timeouts.
	The new-bus integration introduced a bug where the softc ptr
	was lost during the probe.

Some minor cleanups and rearrangements as well.

As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code.
Especially the DMA support can hose your disk real bad if anything
goes wrong, again you have been warned :)
Notebook owners should be carefull that their machines dont suspend
as this might cause trouble...

But please tell me how it works for you!

Enjoy!
1999-05-20 09:12:06 +00:00