Commit Graph

8194 Commits

Author SHA1 Message Date
Maxime Henrion
e6fccf7adf Fix a warning when CISS_DEBUG is defined. 2002-10-27 12:05:11 +00:00
Maxime Henrion
a8cdde69c2 Add a missing destroy_dev(). 2002-10-26 18:09:30 +00:00
Thomas Moestl
08e0fdeb39 Call bpf_mtap() on outgoing packets. 2002-10-26 12:32:07 +00:00
Sam Leffler
57b6353534 o m_adj rx buffer so IP header is 32-bit aligned
o replace EPIC_MGETCLUSER with m_getcl

MFC after:	1 week
2002-10-25 22:06:03 +00:00
John Baldwin
fbc9740955 Cast si_drv2 to intptr_t instead of int to quiet warnings.
Tested on:	alpha
Reported by:	marcel (on an ia64)
2002-10-25 20:49:24 +00:00
Mitsuru IWASAKI
4690674e12 Add new loader tunable hw.acpi.ec.event_driven so that we control
EcWaitEventIntr()'s behavior.
Some EC controllers require this for working properly (including
sleep/wakeup).
2002-10-24 10:56:33 +00:00
John Baldwin
599c57a971 - New-bussify the rc(4) device driver.
- Add detach support to the driver so that you can kldunload the module.
  Note that currently rc_detach() fails to detach a unit if any of its
  child devices are open, thus a kldunload will fail if any of the tty
  devices are currently open.
- sys/i386/isa/ic/cd180.h was moved to sys/dev/ic/cd180.h as part of
  this change.

Requested by:	rwatson
Tested by:	rwatson
2002-10-23 15:53:09 +00:00
Hidetoshi Shimokawa
06a93bac4f - Dequeue OCBs more safely in sbp_abort_all_ocbs(). 2002-10-23 13:04:02 +00:00
Mark Murray
64f82235d8 Very minor whitespace/style nit. 2002-10-23 10:14:30 +00:00
Thomas Quinot
e937fdbdcd Fill in missing parts of the ATAPI/CAM XPT: implement XPT_RESET_BUS
and XPT_RESET_DEV.

In order to properly handle reset requests whether they originate in the
ATA layer (atacontrol reinit) or from the CAM layer (camcontrol reset)
ata_reinit does not cause the SIM to be deallocated anymore. The SIM
is now unconditionnally created for each ATAPI bus.

This change may cause existing bus ids to change on some setups.

Reviewed by:	roberto
Approved by:	sos
2002-10-22 20:18:51 +00:00
Semen Ustimenko
52d0ed1d0d Remove the OpenBSD comatibility stuff. Many changes to be more style(9)
compilant. Split two pieces if code into separate functions to do not
exceed line length due to indentation.
2002-10-22 00:57:51 +00:00
Poul-Henning Kamp
8689acc48c We want /dev/md0 for ramdisk roots, not /dev/md0c.
Sponsored by:	DARPA & NAI Labs
2002-10-21 20:08:28 +00:00
Hidetoshi Shimokawa
8e484a62c8 - Abort all OCBs for timeout.
- Improve warning message.
2002-10-21 15:36:59 +00:00
Hidetoshi Shimokawa
481df042ff fix prototype of asyreqq(). 2002-10-21 10:21:49 +00:00
Hidetoshi Shimokawa
41d45c5235 These (userland) files shouldn't be here. 2002-10-21 10:14:26 +00:00
Robert Drehmel
47e40520dd Do not try to work around ``poor (un)sign extension code''
creation by GCC-2.6.3.  Casting pointers to unsigned char
to volatile pointers to unsigned char seemed to produce
better results on the ia32 architecture with old versions
of GCC.
The current FreeBSD system compiler GCC-3.2.1 emits
better sign extension code for non-volatile variables:

volatile char c;
int i = c;

is compiled to:
...
movb	-1(%ebp), %al
movbsl	%al, %eax
movl	%eax, -8(%ebp)
...

char c;
int i = c;

is compiled to:
...
movbsl	-1(%ebp), %eax
movl	%eax, -8(%ebp)
...

The same holds for zero-extension of dereferenced pointers
to volatile unsigned char.
When compiled on alpha or sparc64, the code produced for the
two examples above does not differ.
2002-10-20 22:50:13 +00:00
Poul-Henning Kamp
975b628f27 Use ENOSPC error return, not ENOMEM.
Use %jd rather than %lld.
2002-10-20 20:50:31 +00:00
Poul-Henning Kamp
858b84f550 '&' is not needed to pointerize functions.
Spotted by:	FlexeLint
2002-10-20 20:42:25 +00:00
Tor Egge
0a676b7eb6 Fix data corruption caused by last byte in oddly sized transfers being read
to wrong location in RxBuf and written from wrong location in TxBuf.
2002-10-20 18:43:11 +00:00
Poul-Henning Kamp
4294d700d6 Fix mis-indentation.
Approved by:	scottl
2002-10-20 16:00:43 +00:00
Poul-Henning Kamp
18a084cf21 Fix mis-indentation.
Spotted by:	FlexeLint
2002-10-20 08:46:56 +00:00
Scott Long
f9d186edc8 After much delay and anticipation, welcome RAIDFrame into the FreeBSD
world.  This should be considered highly experimental.

Approved-by:	re
2002-10-20 08:17:39 +00:00
Alexander Kabaev
87e89c7595 Whitespace fixes per style(9)
Approved by:	obrien
2002-10-19 21:58:11 +00:00
Nate Lawson
76ba4ecdad * Add CDRIOC{READ,WRITE}SPEED ioctls to cd(4). Units are in KB/sec.
* Change atapi-cd ioctls to use the same units.
* Change burncd, cdcontrol to convert CDROM speed to KB/sec before
calling the ioctl.  Add a "max" speed option for their command lines.

This change does not break ABI but does change the units passed through
the ioctl so 3rd party software that uses cdrio.h will have to convert
(most likely by multiplying CDROM speed by 177 to get KB/s).

PR:		kern/36845
Submitted by:	Philipp Mergenthaler <p@i609a.hadiko.de> (CAM ioctls)
Reviewed by:	sos, ken
MFC after:	1 month
2002-10-18 22:03:39 +00:00
Eric Moore
1a6b414672 (1) added LSI Logic copyright, and legal line 3 in license, and string
changes for "LSILogic"
(2) enabled non-disk support through CAM interface
(3) HA_INQ (a) enabled tagged queuing (b) disable reset during
	driver loading (b) renamed BSDi string to LSI
(4) disabled detecting disk devices during SCSI INQUIRY
(5) changed dcdb single element sglist to send one entire buffer chunk
(6) nsgelem not set in sglist
(7) ap_data_transfer_length not set for dcdb
(8) changed "struct thread" to "d_thread_t" for compatibliity { xxx_open,
	xxx_close, xxx_ioctl }
(9) miscellaneous compatiblity fixes
(10) bug fix for 0x0409/0x1000 card
(11) added compiling amr_cam.c in sys/conf/files
(12) added compiling amr_cam.c in sys/modules/amr/Makefile

Reviewed by:ps
MFC after:1 week
1 week
2002-10-18 21:29:14 +00:00
Thomas Moestl
de540622df Add a pseudo device which allows to access the OpenFirmware device tree
via ioctl()s. This was ported from NetBSD and adapted a bit to better
match our OpenFirmware support code.
2002-10-18 15:23:43 +00:00
Thomas Moestl
89492ca471 Add an #ifdef _KERNEL to make it possible to include this file from
userland (to get the typedefs).
2002-10-18 15:21:09 +00:00
Yoshihiro Takahashi
0399c2578e typo.
Submitted by:	SAWADA Hodaka <hoda@tail.gr.jp>
MFC after:	1 day
2002-10-18 12:06:01 +00:00
Kelly Yancey
30c0d52181 Make kqueue(2) work for virtual terminals.
PR:		40486
Submitted by:	Jilles Tjoelker <jilles+fbsd-bugs@stack.nl>
2002-10-17 05:48:56 +00:00
Marcel Moolenaar
e9be79d69c Suppress the uninitialized variable warning on ia64 introduced by
the previous commit by initializing i and j. These initializations
will normally be eliminated by the compiler.
2002-10-17 03:45:34 +00:00
John Baldwin
f371d460e6 Whitespace. 2002-10-16 19:11:59 +00:00
John Baldwin
fc0ea94a7d Catch up to changes in acpivar.h to add support for using ACPI on
4-stable systems.

Sponsored by:	The Weather Channel
2002-10-16 17:28:53 +00:00
John Baldwin
3a65df0084 struct timecounter is defined in sys/time.h on 4-stable.
Sponsored by:	The Weather Channel
2002-10-16 17:27:40 +00:00
John Baldwin
0b1d1f1afb - Include lock headers on current in this header instead of putting
#if's in all the other ACPI source files.
- Use splhigh() for the ACPI subsystem lock on 4-stable.

Sponsored by:	The Weather Channel
2002-10-16 17:27:11 +00:00
John Baldwin
680717ff9e - In AcpiOsGetThreadId(), allow for curproc to be NULL on 4-stable systems.
In that case use proc0's pid to return the thread ID.
- For 4-stable, use the generic swi taskqueue for ACPI events rather than
  implementing our own.

Sponsored by:	The Weather Channel
2002-10-16 17:25:29 +00:00
John Baldwin
b60bd0c129 Implement the internal locks of an ACPI semaphore with splhigh() on
4-stable.  -current uses a mutex for this purpose.

Sponsored by:	The Weather Channel
2002-10-16 17:23:34 +00:00
Sam Leffler
0f0d411b6c whitespace/indentation fix from phk 2002-10-16 17:07:41 +00:00
Mitsuru IWASAKI
93569b6b3a Fix a possible bug about freeing non-malloc'ed pointer.
Suggested by:	jhb (in -current ML)
2002-10-16 15:42:27 +00:00
Mark Murray
f544a52873 Module-ize the 'core' crypto stuff. This may still need to be compiled
into the kernel by default (if required), but other modules can now
depend() on this.

Fix inter-module dependancy.

Earlier version OK'ed by:	sam
2002-10-16 14:31:34 +00:00
Robert Drehmel
4bcea0f89c Cast the first argument to bzero() to `void *' after casting it to
`uintptr_t' to pass it as the type bzero() expects.
2002-10-16 11:15:35 +00:00
Poul-Henning Kamp
3412120f03 Be consistent about funtions being static.
Spotte by:	FlexeLint.
2002-10-16 10:16:17 +00:00
Poul-Henning Kamp
88647b6de5 Be consistent about functions being static.
Properly put macro args in ().

Spotted by:	FlexeLint.
2002-10-16 09:14:59 +00:00
Poul-Henning Kamp
2c876e15c8 Be consistent about functions being static.
Spotted by:	FlexeLint.
2002-10-16 09:04:52 +00:00
Poul-Henning Kamp
031fd299d7 Be consistent about functions being static.
Spotted by:	FlexeLint.
2002-10-16 08:48:39 +00:00
Poul-Henning Kamp
4d8d520f17 Fix misindentation.
Spotted by:	FlexeLint
2002-10-16 08:45:34 +00:00
Justin T. Gibbs
ccbe423c8f Never allow memory mapped I/O in PCI-X mode on controllers that
do not support that configuration.  This should fix problems with
embedded 7902 controllers running in PCI-X mode.
2002-10-16 02:59:03 +00:00
Sam Leffler
5d84645305 Replace aux mbufs with packet tags:
o instead of a list of mbufs use a list of m_tag structures a la openbsd
o for netgraph et. al. extend the stock openbsd m_tag to include a 32-bit
  ABI/module number cookie
o for openbsd compatibility define a well-known cookie MTAG_ABI_COMPAT and
  use this in defining openbsd-compatible m_tag_find and m_tag_get routines
o rewrite KAME use of aux mbufs in terms of packet tags
o eliminate the most heavily used aux mbufs by adding an additional struct
  inpcb parameter to ip_output and ip6_output to allow the IPsec code to
  locate the security policy to apply to outbound packets
o bump __FreeBSD_version so code can be conditionalized
o fixup ipfilter's call to ip_output based on __FreeBSD_version

Reviewed by:	julian, luigi (silent), -arch, -net, darren
Approved by:	julian, silence from everyone else
Obtained from:	openbsd (mostly)
MFC after:	1 month
2002-10-16 01:54:46 +00:00
Sam Leffler
87cb581aa4 missed additional callout that can run w/o Giant locked 2002-10-15 23:25:56 +00:00
Poul-Henning Kamp
fb9da1ef43 Include "opt_kbd.h" since certain structures size depend on the value
of KBDIO_DEBUG which may be defined in the kernel config (as it is in NOTES).

This kind of bug is a _really_ horribly thing as we end up with one bit
of code thinking a particular structure is 136 bytes and another that it
is only 112 bytes.

Ideally all places would remember to #include the right "opt_foo.h" file,
but I think in practice file containing the variable sized struct should
#include it explicitly as a precaution.

Detected by:	FlexeLint
2002-10-15 21:35:01 +00:00
Marcel Moolenaar
18e0cd7dde Fix previous commit: Don't cast integral types to pointers to
print them with %p. Cast to unsigned long and print with %#lx.

Discussed with: bde
2002-10-15 01:50:09 +00:00