Commit Graph

10290 Commits

Author SHA1 Message Date
Nate Lawson
9b937d4836 Add devctl(4) notify support to ACPI. Various subsystems now notify
userland whenever events occur.  See the example in devd.conf below
to see how to use it.
2003-10-25 05:03:25 +00:00
Warner Losh
c365ed47e4 Whole grab-bag of changes:
o Make the driver MPSAFE
o Some changes due to diff reduction effort with vx.
o Removed some obsolete junk.

Reviewed by: sam, modd
2003-10-25 04:09:49 +00:00
Warner Losh
e0eeb66087 Start to minimize diffs between vx and ep. These latter is based on a
more advanced version of the chips supported by the former.  Matt Dodd
and I are working towards merging them, and this a step on that path.
2003-10-25 04:05:33 +00:00
Doug Ambrisko
43e42f3688 Add support for another multiple serial port card based on OX16PCI954 device
id 0x950a.

MFC:	after 4.9 release.
2003-10-24 22:34:56 +00:00
Eric Anholt
4294fd5ce1 Don't try to use dev->dma_lock unless dma is initialized (dev->dma != NULL)
in bufs_info sysctl handler.  dev->dma and dev->dma_lock existence are
protected by DRM_LOCK().  Fixes panic on sysctl hw.dri when the device is
uninitialied (when you aren't in X).
2003-10-24 21:45:21 +00:00
Hartmut Brandt
7298db81fe Sysctl names should not contain dots. Convert them to underlines. 2003-10-24 16:44:27 +00:00
Hidetoshi Shimokawa
869093b15d Add dumb console driver and related bits.
dcons(4): very simple console and gdb port driver
dcons_crom(4): FireWire attachment
dconschat(8): User interface to dcons

Tested with: i386, i386-PAE, and sparc64.
2003-10-24 15:44:10 +00:00
Hidetoshi Shimokawa
102ebc1f95 Fix for FW_ASYREQ.
- set send.pay_len correctly.
- copy response only if needed.
- remove unnecessary 'err = 0'.
2003-10-24 13:55:51 +00:00
Hidetoshi Shimokawa
ad5c39fe2a Don't check timeout just after booted.
Some transactions could be considered wrongly to be timeout
bacause interrupts are disabled during boot process.
2003-10-24 07:42:21 +00:00
Warner Losh
d2bda4e032 Backswards is as backwards does: If we're MPSAFE, then we don't need
giant, which implies that we need to take out giant it we're NOT
MPSAFE.

# I can't believe the number of people that looked at this failed to
# detect this.
2003-10-24 07:20:13 +00:00
Eric Anholt
1d0d7f3ee4 Update to latest from DRI CVS. Primary new feature is mostly-complete smpng
locking, and the apparently unnecessary locking for -stable has been removed.
This may fix issues with missed interrupts since April, which manifested
themselves as slowdowns or hangs in radeon, in particular. Many cleanups also
took place.  In the shared code, there are improvements to r128 driver
stability.
2003-10-24 01:48:17 +00:00
John Baldwin
9f9ccd206d Add simple support for AGP 3.0 including enabling 8x mode. The simple
part of the support is that it still assumes one master and one target
where as AGP 3.0 actually supports multiple devices on the bus.

Submitted by:	Keith Whitwell <keith@tungstengraphics.com>
Sponsored by:	The Weather Channel
2003-10-23 18:08:56 +00:00
John Baldwin
65c3981023 Use a switch statement on the devid instead of if-else for determing which
code to use to see if the onboard video has been disabled or not.

Submitted by:	Keith Whitwell <keith@tungstengraphics.com>
2003-10-23 17:48:30 +00:00
Warner Losh
9d51aaa4e8 Const poison crc routines (why these aren't centralized, I'm not sure). 2003-10-23 16:57:38 +00:00
Warner Losh
97bf3cc2cc Const poison the crc calcuation routines so const data can be sent to
it.
2003-10-23 16:55:27 +00:00
Dag-Erling Smørgrav
76bfe7b119 0x7FFFFFFFFF is >32 bits and needs an explicit LL. 2003-10-23 13:42:03 +00:00
Peter Wemm
042093540c Look at the equipment list for amd64 as well as i386 for autodetecting
floppy drives in the absence of hints.
2003-10-23 05:52:52 +00:00
Warner Losh
71d72f8892 Fix mismerge from one tree to another: add ( 2003-10-23 05:33:53 +00:00
Warner Losh
1d4cc96d96 more unused item cleanup 2003-10-23 04:53:33 +00:00
Warner Losh
8abef7fd9b BASE is no longer used, and is an appendix. Remove it. 2003-10-23 04:50:35 +00:00
Warner Losh
537db6f8b0 Learn basic C.
((uint32_t *) v) + 10 != ((caddr_t) v) + 10
so apply the cast later.
2003-10-23 03:42:47 +00:00
Hidetoshi Shimokawa
61ba65809d Reduce debug messages. 2003-10-23 01:55:03 +00:00
Sam Leffler
04e22a026d terminate the rx descriptor list with a self-linked entry
so high phy error rates on a 5212 don't cause rx overruns
2003-10-22 04:37:34 +00:00
Matt Jacob
081a1c2536 Turn off ISP_SMPLOCK- not to be turned on again.
Until we can have perfect knowledge that all callers above us think it's okay
for us to sleep, releasing *our* locks of course, we don't dare try and sleep.
2003-10-21 21:52:23 +00:00
Søren Schmidt
4788059c5e Properly unload the DMA SG list on errors. 2003-10-21 19:25:20 +00:00
Søren Schmidt
80344be509 Fix the DMA problem that most severely hit on the DS3112a SATA chip
in connection with Marvell based SATA->PATA dongles.

The problem was caused by a combination of things working
together to make it hard to spot...

The ATA driver has always started the ATA command, then build
the SG list for DMA and then finally started the DMA engine.
While this is according to specs, it poses a potential
problem as some controllers apparently do not allow for unlimitted
time between starting the ATA command and starting the DMA engine.

At about the same time as ATAng was committed there were lots
of other changes applied, some of which was locking in parts
that causes the busdma load functions to take significantly
longer to load the SG list.

This pushed the time spent between starting the ATA command and
starting the DMA engine over the hill for some controllers
(especially the Silicon Image DS3112a) and caused what looked
like lost interrupts.

The solution is to get all the SG list work or rather all
busdma related stuff done before we even try to start anything.

This has the nice side effect of seperating busdma out the
way it should be, so the working of the ATA machinery is not
cluttered up with busdma droppings, making the code easier
to read and understand.
2003-10-21 19:20:37 +00:00
Mike Silbersack
184dcdc7c8 Change all SYSCTLS which are readonly and have a related TUNABLE
from CTLFLAG_RD to CTLFLAG_RDTUN so that sysctl(8) can provide
more useful error messages.
2003-10-21 18:28:36 +00:00
Søren Schmidt
c3093074c4 Up the alignment requirement of the SC1100 to 16 bytes, it has all the bugs and then some of its Cyrix inheritance.
Set the max_iosize for the Cyrix to 63K as the SC1100.
2003-10-21 08:53:29 +00:00
Søren Schmidt
a89ec7140f If just gcc could make up its mind... 2003-10-20 14:28:37 +00:00
Søren Schmidt
2e7deb2b86 Only return valid DMA error bits. 2003-10-20 13:45:11 +00:00
Søren Schmidt
5b2b2eba16 Up delay from 10 to 100ms after reset, this helps some slow devices
get their act together before we start probing.
2003-10-20 13:44:33 +00:00
Søren Schmidt
87efd6d017 Only announce ECC errors when its only that. 2003-10-20 13:32:42 +00:00
Mike Silbersack
a10c0e4574 Fix a problem where m_defrag would allocate a new mbuf to replace the
chain passed into dc_encap, which dc_start was unaware of.  This caused
the old (now invalid) mbuf to be passed to BPF_MTAP.

Spotted by:	Kenjiro Cho <kjc@csl.sony.co.jp>
2003-10-19 23:05:19 +00:00
David Malone
e1419c08e2 falloc allocates a file structure and adds it to the file descriptor
table, acquiring the necessary locks as it works. It usually returns
two references to the new descriptor: one in the descriptor table
and one via a pointer argument.

As falloc releases the FILEDESC lock before returning, there is a
potential for a process to close the reference in the file descriptor
table before falloc's caller gets to use the file. I don't think this
can happen in practice at the moment, because Giant indirectly protects
closes.

To stop the file being completly closed in this situation, this change
makes falloc set the refcount to two when both references are returned.
This makes life easier for several of falloc's callers, because the
first thing they previously did was grab an extra reference on the
file.

Reviewed by:	iedowse
Idea run past:	jhb
2003-10-19 20:41:07 +00:00
Warner Losh
0f08d52a60 Finish the removal of the bst/bsh confusion. 2003-10-19 17:38:04 +00:00
Bruce M Simpson
3eb4d8a3bc Fix LINT build by correcting a missed change. 2003-10-19 09:31:07 +00:00
Nate Lawson
5539804740 Disable irqs before entering the power-off state. This is not known
to fix any problems but is similar to how Linux implements this
function.
2003-10-19 05:56:59 +00:00
Warner Losh
38e7cb26d4 Don't confuse tags and handles. 2003-10-19 00:03:10 +00:00
Bruce M Simpson
fc1cbf4331 Fix a typo. The module has the EISA front-end commented out, therefore the
error may not have been picked up right away.

Reviewed by:	mdodd
Submitted by:	Stuart Walsh
2003-10-18 20:44:23 +00:00
Poul-Henning Kamp
06a259faf6 Do not initialize bp->b_pblkno, it is going away. 2003-10-18 17:57:48 +00:00
Poul-Henning Kamp
b52b7f465d Eliminate use bio_blkno. 2003-10-18 17:51:26 +00:00
Poul-Henning Kamp
c4f832d118 Discontinue bio_blkno, use bio_offset instead. 2003-10-18 17:44:01 +00:00
Poul-Henning Kamp
0eac610fd7 Eliminate reporting of bio_blkno. 2003-10-18 17:28:36 +00:00
Poul-Henning Kamp
24730dd78a Use bio_offset instead of bio_blkno 2003-10-18 17:26:13 +00:00
Poul-Henning Kamp
3a71ca7daa No need to initialize bio_pblkno from bio_blkno, disksort uses bio_offset. 2003-10-18 17:24:51 +00:00
Warner Losh
3dc59524c7 Transition to using bus_space macros rather than the inb/outb/etc.
Use EP_{READ,WRITE}{,_MULTI}_{1,2,4} instead.  I've had several people
submit patches like this over the years of varying qualities, markm
being the last.  The names were chosen in consulation with mdodd on
irc.

I've tested this with only PCMCIA cards: 3CCE589EC and 3CCSH572BT.
I've not tried with my more extensive ISA, EISA and cbus collection.

Reviewed by: mdodd
2003-10-18 15:22:43 +00:00
Poul-Henning Kamp
2c18019f14 DuH!
bp->b_iooffset (the spot on the disk), not bp->b_offset (the offset in
the file)
2003-10-18 14:10:28 +00:00
Poul-Henning Kamp
6e9a011a6a Don't initialize unused bio_blkno field. 2003-10-18 11:25:42 +00:00
Poul-Henning Kamp
a09aaeaa0f Initialize bp->b_offset and remove comment about B_PHYS. 2003-10-18 11:02:24 +00:00
Mark Murray
8f559ca08e Mark as __unused some arguments that are, erm, unused. 2003-10-18 09:16:01 +00:00