Commit Graph

7048 Commits

Author SHA1 Message Date
luoqi
01796e3f81 Support for LG GM82C700, an AIC6360 clone. 2002-03-15 21:30:41 +00:00
mckusick
e929f2e4f0 Introduce the new 64-bit size disk block, daddr64_t. Change
the bio and buffer structures to have daddr64_t bio_pblkno,
b_blkno, and b_lblkno fields which allows access to disks
larger than a Terabyte in size. This change also requires
that the VOP_BMAP vnode operation accept and return daddr64_t
blocks. This delta should not affect system operation in
any way. It merely sets up the necessary interfaces to allow
the development of disk drivers that work with these larger
disk block addresses. It also allows for the development of
UFS2 which will use 64-bit block addresses.
2002-03-15 18:49:47 +00:00
sos
66c17217fb Update to the RAID1 rebuild code.
Run rebuild as a background process.

Sponsored by: Advanis
2002-03-15 15:39:54 +00:00
imp
9c7d357cd4 Revert most of the recent PCI merge. This has proven to be too
unstable for the coming DP1 release.  Instead, I'll develop that on
the IMP_CB_MERGE branch until it is more stable.
2002-03-15 06:41:01 +00:00
sos
33c882b814 Unbreak the probing of some CDROM drives. 2002-03-14 21:35:55 +00:00
ambrisko
81e2a6ab4a Only allow super user to perform the Linux compatible ioctls since some
of the things they do, shouldn't be done by normal users.

MFC after:	2 days
2002-03-14 20:56:41 +00:00
alfred
2c16fbdd2a Fixes to make select/poll mpsafe.
Problem:
  selwakeup required calling pfind which would cause lock order
  reversals with the allproc_lock and the per-process filedesc lock.
Solution:
  Instead of recording the pid of the select()'ing process into the
  selinfo structure, actually record a pointer to the thread.  To
  avoid dereferencing a bad address all the selinfo structures that
  are in use by a thread are kept in a list hung off the thread
  (protected by sellock).  When a selwakeup occurs the selinfo is
  removed from that threads list, it is also removed on the way out
  of select or poll where the thread will traverse its list removing
  all the selinfos from its own list.

Problem:
  Previously the PROC_LOCK was used to provide the mutual exclusion
  needed to ensure proper locking, this couldn't work because there
  was a single condvar used for select and poll and condvars can
  only be used with a single mutex.
Solution:
  Introduce a global mutex 'sellock' which is used to provide mutual
  exclusion when recording events to wait on as well as performing
  notification when an event occurs.

Interesting note:
  schedlock is required to manipulate the per-thread TDF_SELECT
  flag, however if given its own field it would not need schedlock,
  also because TDF_SELECT is only manipulated under sellock one
  doesn't actually use schedlock for syncronization, only to protect
  against corruption.

Proc locks are no longer used in select/poll.

Portions contributed by: davidc
2002-03-14 01:32:30 +00:00
imp
93a919ffc1 Add 5th parameter to pci_read_device specifying the size of the object
to create.
2002-03-13 16:32:11 +00:00
imp
9da090c4c4 Cleanup the recent cardbus cleanups. This fixes some of the panics
that I introduced with -v.  However, other problems still remain (including
the loss of interrupts).
2002-03-13 05:38:19 +00:00
dfr
c9a75e90ac Only i386 has wbinvd(). 2002-03-12 09:45:17 +00:00
peter
bce3d7f621 Do not concatenate __func__ with strings, because it is not a string.
Later gcc's blow up on this.
2002-03-12 00:15:06 +00:00
peter
4bd977bea6 Do not do string concatenation with __func__ (which is not a string) 2002-03-12 00:12:59 +00:00
peter
e19329dfa6 Recent acpica imports have changed the lengths from UINT32 to ACPI_SIZE,
which is 64 bit on ia64.  Fix it.
2002-03-12 00:10:40 +00:00
brooks
593f3e9668 Add support for 3Com Airconnect PCI cards.
MFC after:	3 days
2002-03-11 23:29:59 +00:00
sos
2bbd43c8f1 Add new support for locking an ATA channel and use that throughout
the ATA/ATAPI driver. This solves the concurrency problem with
the new GEOM code, and also cuts a good deal of the patch size
in the upcoming MFC.
2002-03-11 21:04:32 +00:00
imp
a5126a967f On FreeBSD make usb_proc_t the same as d_thred_t always. 2002-03-11 16:38:53 +00:00
joe
4e03c97b1d Be more specific about when block major numbers disappeared from
the cdev switch.
2002-03-11 16:22:15 +00:00
obrien
73dc5cffc7 Due to changes in the handling of the #line directive by GCC(cpp) 3.1,
we must now explicitly list the source directory with -I.
2002-03-11 06:45:31 +00:00
dd
3a71779f4d Make the diagnostics printfs less ugly. 2002-03-11 03:48:32 +00:00
tmm
747cc01268 Use the pci_enable_* functions instead of manually fiddling with the
command register.

Pointed out by:	msmith
2002-03-11 02:37:19 +00:00
sos
2420c1b451 Silence a warning when compile without atapi devices. 2002-03-10 21:03:04 +00:00
tanimura
53021e2926 Do not call a synthesizer with a sequencer lock held. 2002-03-10 16:56:38 +00:00
takawata
6bbe628e1d Add SONY VAIO psm controller ISA-PnP ID. 2002-03-10 12:22:17 +00:00
luigi
4834f513d8 Fix one genuine bug and a potential one:
-#if defined(__FreeBSD__) && __FreeBSD_version__ >= 500023
  +#if defined(__FreeBSD__) && __FreeBSD_version >= 500023

is a genuine bug -- __FreeBSD_version__ does not exist.
The other one:

  -#if (__FreeBSD__ < 5)
  +#if (__FreeBSD_version < 500000)

pops out when you cross-compile the code:

  __FreeBSD__			is a compiler predefine,
  __FreeBSD_version		is defined in <sys/param.h> .

Given that in this case (and all others in sys/dev/usb and sys/i4b)
the goal is to adapt to a different kernel interface, and not to
a compiler feature, I believe the correct form is the second one
(in the best case the two are synonyms so the change does not break
anything anyways).
2002-03-10 08:29:53 +00:00
tmm
1b31933622 Set the busmaster enable bit in the PCI command register, as the firmware
of sparc64 machines will not do this for us if the interface is not used
for booting over the network.
2002-03-09 21:52:31 +00:00
tmm
c0d9a360ce Fix some bugs in the handling of the case of not enough tx descriptors
being free to send a packet.
2002-03-09 21:50:25 +00:00
sos
259c8e6d53 Even more Highpoint RAID support.
Fix the 80pin cable detection system.
2002-03-08 21:36:49 +00:00
jhay
0152ccb7ee Remove the #if __FreeBSD_version glue now that the puc driver is part of
-stable.
2002-03-08 17:41:22 +00:00
nyan
30e07f37ab Add pc98 support. 2002-03-08 12:41:32 +00:00
sos
0b0678b193 Support newer Highpoint BIOS's extended config. 2002-03-08 11:33:52 +00:00
sos
a4b9448d10 cosmetics 2002-03-08 11:31:37 +00:00
sos
15f98e2cbc Oops I mixed up the patch for -current & -stable, sorry .... 2002-03-07 19:20:23 +00:00
mjacob
2a04794c7d Disable RIO (reduced interrupt operation) for 2200 boards- it seemed like
it worked- but I ran into a case with a 2204 where commands were being lost
right and left. Best be safe.

For target mode, or things called if we call isp_handle_other response- note
that we might have dropped locks by changing the output pointer so we bail
from the loop. It's the responsibility of the entity dropping the lock to
make sure that we let the f/w know we've read thus far into the response
queue (else we begin processing the same entries again- blech!).

MFC after:	1 day
2002-03-07 17:32:45 +00:00
sos
fb90ee5e0b Minor cosmetic changes to minimise diffs for MFC. 2002-03-07 16:34:19 +00:00
sos
23058273ee Fix a couble of bugs in the rebuild code, return errors properly. 2002-03-07 16:32:21 +00:00
msmith
eea0ae24b9 Update for the 6.9 firmware family (6xxx controllers), as well as for
the upcoming 7.4 family (7xxx controllers).

 - improved error reporting and handling
 - more diagnostic output
 - add extra command packet definitions
 - merge sources again with -stable
2002-03-07 09:55:41 +00:00
imp
955b896bbc Don't use __FBSDID yet. Looks like most (all?) of the rest of the kernel
doesn't do that.
2002-03-07 08:12:40 +00:00
imp
de68624be2 Implement hw.cardbus.debug and hw.cardbus.cis_debug to help debug some
of the cardbus problems that people may start seeing.
2002-03-07 08:10:42 +00:00
imp
03b0ddafe2 Make hw.pccard.debug and hw.pccard.cis_debug tunable/sysctl. Setting to 1
will enable more verbose debugging output from the pccard system.
2002-03-07 08:03:53 +00:00
imp
981c5de6f7 Two style(9) fixes:
- return(foo);	(note parens)
- use __FBSDID()
2002-03-07 00:11:42 +00:00
imp
182f114156 Check for NULL on resource allocation. For the moment, punt, but we should
be smarter about a) cleanup and b) fallback.
2002-03-07 00:05:26 +00:00
jhay
023aa97df2 Add the "Avlab Technology, PCI IO 2S" card.
Submitted by:	Terry Glanfield <Terry.Glanfield@program-products.co.uk>
2002-03-06 17:37:27 +00:00
ru
77922c9603 Fixed compilation warnings. 2002-03-06 08:55:34 +00:00
bde
f639b7649f Fixed a printf format error again. Rev.127 was clobbered in rev.1.128
by removing parentheses.  The main bug is in gcc: on machines with
64-bit longs and 64-bit long longs,

    (unsigned long long)rdp->total_sectors / ((1024L * 1024L) / DEV_BSIZE))

has type plain unsigned long instead of the correctly promoted type
unsigned long long, so it can not be printfed using %llu format.  Even
1ULL / 1L is mispromoted.  Anyway, casting the correct operand
automatically avoids the problem.  We do not want to to pessimize the
division; we just want to convert to a common maximal type for printing.
2002-03-06 06:33:33 +00:00
imp
e1e067d4d9 Add roaming and microwave oven support. Some minor formatting nits.
Some buggy firmware workarounds.  Fix some endian bugs.

These reduce the diffs from NetBSD, but NetBSD does have more changes since
my last manual merge.
2002-03-05 16:18:14 +00:00
imp
dce85c5689 Remove __P to reduce diffs with NetBSD and my private tree. 2002-03-05 16:12:41 +00:00
imp
838cc06843 Merge a little from NetBSD. 2002-03-05 16:06:54 +00:00
sos
9efc11065b Misc little cleanups:
Link if only ATAPI device in kernel config
Remove unused #includes
Rearrange a bit in ata-raid to make diff against -stable smaller
Enable wc as default again, dunne how this happend...
2002-03-05 09:24:19 +00:00
iwasaki
3f245d8dd1 Add generalized power profile code.
This makes other power-management system (APM for now) to be able to
generate power profile change events (ie. AC-line status changes), and
other kernel components, not only the ACPI components, can be notified
the events.

 - move subroutines in acpi_powerprofile.c (removed) to kern/subr_power.c
 - call power_profile_set_state() also from APM driver when AC-line
   status changes
 - add call-back function for Crusoe LongRun controlling on power
   profile changes for a example
2002-03-04 18:46:13 +00:00
alfred
199a58a697 Support for USB fm radio.
Submitted by: David Yeske <dyeske@yahoo.com>
2002-03-04 03:51:21 +00:00