Commit Graph

12155 Commits

Author SHA1 Message Date
Scott Long
15c37be013 If the timeout handler runs and notices that commands are timed out, check
the firmware status register on the card to see if the firmware is still
running.  There is no way to recover from this, but at least it can give
a hint as whether the car has crashed (which happens all too often).

MFC after: 3 days
2004-09-16 02:37:40 +00:00
Warner Losh
ee9e2737a1 For the moment, treat failures to attach floppy drives as non-fatal
errors for the attachment process for the floppy controller.  This is
a band-aide because it doesn't try any of the fallback methods when
_FDE isn't long enough, but should be sufficient for people
experiencing the dreaded mutex not initialized panic.
2004-09-16 01:51:21 +00:00
Maxim Sobolev
a02bcc107c Backout the code which tries to use undocumented way to determine if
fm801 has sound capabilities or not. Unfortunately this code doesn't
work as expected.

Submitted by:	many
MFC after:	3 days
2004-09-15 23:47:17 +00:00
Søren Schmidt
d95aa401d5 Flush the queue of minor fixes to pst. 2004-09-15 15:39:28 +00:00
Poul-Henning Kamp
592da135e7 #include <isa/isavar.h> instead of <i386/isa/isa_dma.h> 2004-09-15 11:58:34 +00:00
Alan Cox
5a71a6fe52 Fix a typo that affects !i386. 2004-09-15 03:39:18 +00:00
Bill Paul
6ba160b6ef Add missing NGE_LOCK_DESTROY() to nge_detach(). 2004-09-14 22:32:58 +00:00
Bill Paul
ad6c618bc7 Make two major changes to this code to address some stability/corruption
problems:

1) Add locking for SMP, code provided by Alan Cox
2) While testing Alan's patches, I observed serious problems with
   the jumbo buffer allocation code (machine crashed twice), so I gutted
   it and rewrote the receive handler to use multiple chained descriptors.
   Each RX descriptor gets a single 2K cluster, and the chip will fill in
   as many as it needs to hold the complete packet.

User reports that this corrects the data corruption issues previously
observed and discussed on -current.

Note that this driver still needs to be hit with the busdma stick.
I intend to inflict said beating in the near future.

MFC after: 1 week
2004-09-14 22:06:25 +00:00
Pawel Jakub Dawidek
2eafd8b126 Deallocate VM object on failure. 2004-09-14 19:55:07 +00:00
Pawel Jakub Dawidek
7a0970111f One more missing NDFREE(9). 2004-09-14 19:27:59 +00:00
Pawel Jakub Dawidek
52c6716fee - Don't forget about NDFREE() in case of vn_open() failure.
- Don't forget about vn_close() in case of failure.
2004-09-14 18:43:24 +00:00
Pawel Jakub Dawidek
f9963bbc08 Fix UMA zone leak. 2004-09-14 18:32:05 +00:00
Warner Losh
b593dd82f7 Use bus_setup_intr in preference to BUS_SETUP_INTR. 2004-09-14 17:28:51 +00:00
Scott Long
0dde762cb8 Set up the data flow flag correctly so that bounced buffers have a chance of
working in amr_enquire().
2004-09-14 16:36:12 +00:00
Warner Losh
b4046cd721 Checkpoint the fdc resource changes:
o Allow for up to 3 resource I/O ranges to be given for the floppy
  controller, rather than just two that are allowed for now.
o Make sure that we can work with either a base address of 0x3f0 or 0x3f2.
o Create new inline functions to access the YE DATA's unique BDCR register.
o Update pccard attachment to add the fd device.
o Do some minor style(9) polishing.

# I'm guessing that the fdc pccard attachment broke some time ago, since
# there are a number of issues with it still.
2004-09-14 07:06:49 +00:00
Scott Long
4c2ca0f7c8 Pull the correct clock frequency value out of OFW. Why the helper function
doesn't do this is beyond me, but that will be investigated later.  This
results in programming the chip with the correct frequency, which in turn
allows devices to negotiate up to the full 20MB/s.
2004-09-13 15:15:38 +00:00
Don Lewis
2e715afcac Change sb_lock() calls to sbc_lockassert() and remove the sb_unlock()
calls in sb_cmd2() and sb_getmixer().  The lock has already be grabbed
before these functions are called.

This is a RELENG_5 candidate.

PR:		71189
Submitted by:	stephane
MFC after:	3 days
2004-09-12 18:19:42 +00:00
Scott Long
bd971c4961 Put some of the probe messages under bootverbose so to lessen the noise. 2004-09-12 03:19:32 +00:00
Bill Paul
9d77459ca7 Remove unneeded TX channel wakeup from vge_txeof(). This was put
there for testing and forgotten. It's not really needed, and taking
it out saves a register access.
2004-09-11 22:13:25 +00:00
Doug White
155119e8ff Fix build if both of BKTR_USE_FREEBSD_SMBUS and BKTR_NEW_MSP34XX_DRIVER are
defined.

Thanks to Damian Gerow <dgerow@afflictions.org> for pointing out this problem.
RELENG_5 candidate.
2004-09-11 04:32:55 +00:00
Bill Paul
712753fd51 Remove unneeded VGE_UNLOCK() in vge_detach(). 2004-09-11 01:07:39 +00:00
Bill Paul
a07bd003bf Add device driver support for the VIA Networking Technologies
VT6122 gigabit ethernet chip and integrated 10/100/1000 copper PHY.
The vge driver has been added to GENERIC for i386, pc98 and amd64,
but not to sparc or ia64 since I don't have the ability to test
it there. The vge(4) driver supports VLANs, checksum offload and
jumbo frames.

Also added the lge(4) and nge(4) drivers to GENERIC for i386 and
pc98 since I was in the neighborhood. There's no reason to leave them
out anymore.
2004-09-10 20:57:46 +00:00
Matt Jacob
78fb2586ce Make it depend on PCI as well.
Submitted by:	Stefan eSSer
2004-09-10 18:39:02 +00:00
Matt Jacob
0c994d8520 Make sym depend, as a module, on cam.
Submitted by:"Norikatsu Shigemura" <nork@FreeBSD.org>
2004-09-10 17:57:33 +00:00
Søren Schmidt
1d535cd590 Reduce the amount of memory reported to busdma.
This made the requirements for bouncebuffers too big with PAE.
Cleanup the way size defines for transfers are implemented.
2004-09-10 10:31:37 +00:00
Don Lewis
ca219d048a Convert sndstat_lock from a mutex to an sx lock. sndstat_read()
holds sndstat_lock across a call to uiomove(), which is not legal
to do with a  mutex because of the possibility that the data transfer
could sleep because of a page fault.  It is not possible to just
unlock the mutex for the uiomove() call without introducing another
locking mechanism to prevent the body of sndstat_read() from being
re-entered.  Converting sndstat_lock to an sx lock is the least
complicated change.

This is a candidate for RELENG_5.

LOR:		030
MFC after:	4 days
2004-09-10 09:37:06 +00:00
Warner Losh
7e76a985ca Add comments about why we're freeing subdevs (which is completely
redundant at this point and should be retired).  Don't free subdevs if
we don't attach any devices.  This was leaving stale device_t's
around.  Don't touch the device if it isn't attached since the name
isn't meaningful then.  Switch from strncpy (properly used) to
strlcpy.

From a patch submitted by Peter Pentchev
2004-09-09 20:47:28 +00:00
Warner Losh
9c56382454 We don't need a uhub_child_detached() routine now that we don't detach
device_t instances when no driver attaches.  They are left around, and
we need to remember them.

# The usbd_device_handle->subdevs[] array likely is completely bogus
# at this point, but one change at a time, since its removal will need
# to have similar code replace it extracted from newbus.

Part of the patch submitted by Peter Pentchev after an excellent
analysis of the underlying problems.

MFC After: 1 week
2004-09-09 20:43:49 +00:00
Maksim Yevmenkin
248a9ca8ba Shame on me. I screwed up product ID for the 3COM Bluetooth PC-Card.
It's 0x0040 not 0x0400.

MFC after:	3 days
2004-09-09 18:48:09 +00:00
Warner Losh
b3b0e2521a For the moment, back out my back out of green's 1.87 commit. While it
produced better results for a test program I had here, it didn't
substantially change the number of crashes that I saw.  Both the old
code and the new code seemed to produce the same crashes from the usb
layer.  Since the new code also solves a close() crash, go with it
until the underlying issues wrt devices going away can be addressed.
2004-09-09 17:49:53 +00:00
Søren Schmidt
6c893545ad Release the hold on ata_delayed_attach earlier so we can use tsleep
in the boot probe as well.

Suggested by:	gibbs
2004-09-09 13:25:46 +00:00
Nate Lawson
f6cb6ecd55 Clean up rev 1.49 by using the temperature conversion for _PSV also and
wrap a long line.
2004-09-08 19:36:07 +00:00
Warner Losh
63ba42fbf5 Back out 1.88.
The reference counts are there to block detach until the sleepers in
read/write/ioctl have gotten out, not to prevent the open device from
going away.  Restore the old behavior so that we have a chance to wake
up sleepers when the usb device goes away, so they can properly return
EIO back to the caller when this happens.

Otherwise, we have a guarnateed panic waiting to happen when a device
detaches with an active read channel.

This should be merged to 5 asap.
2004-09-08 07:13:39 +00:00
Nate Lawson
f387ed7e06 Don't change the state of the system in acpi_tz_establish(). Before, we
would turn off all fans when initializing a zone.  However, the HP Omnibook
500 generates a notify saying the zone needs to be re-evaluated whenever
its fan is switched on or off.  This produced an infinite loop.  Also, note
that running _SCP can generate the same notify.

Since we need to make sure old fan references are turned off when getting
new ones, run acpi_tz_monitor() first.  This will turn off any unneeded
fans.  Then, check for new settings.  After that, run acpi_tz_monitor()
again to turn on/off any fans referenced by the new settings.

Tested by:	brooks
2004-09-07 17:02:08 +00:00
Nate Lawson
a67e6f3ab1 Instead of trusting _STA from power resources, cache the first value
returned and then infer the state from calls to _ON/_OFF.  This works
around a problem in systems that don't correctly report the state (i.e.
the HP Omnibook 500 reports "on" for its fan always after it has been
turned on once).
2004-09-07 16:58:12 +00:00
Matt Jacob
6de9bf776e Do the small amount of tweaking to support PAE for at least initiator mode.
I was unable to test this as the PAE kernel crashed with a "cannot copy
LDT" before coming up. When this gets a bit more testing, I'll fix the PAE
conf file to allow isp devices.

PR:		59728
2004-09-07 08:04:09 +00:00
Poul-Henning Kamp
affa470653 Use bioq_takefirst() 2004-09-07 07:54:45 +00:00
Gleb Smirnoff
1fb025d58a Remove layer intermixing. Device driver should pass the frame should
pass frame to ether_input(), and do not play with bridge itself.

Reviewed by:	sam, andre
Approved by:	julian (mentor)
MFC after:	1 week
2004-09-06 21:14:32 +00:00
Hidetoshi Shimokawa
e794746d65 Add a missing splx(). 2004-09-06 20:42:34 +00:00
Dag-Erling Smørgrav
fbf4080e88 Use %zu to format size_t. 2004-09-05 12:33:15 +00:00
Dag-Erling Smørgrav
8985c52bb6 Device driver for the Cypress CY7C637xx and CY7C640/1xx families of USB
to RS232 bridges, such as the one found in the DeLorme Earthmate USB GPS
receiver (which is the only device currently supported by this driver).

While other USB to serial drivers in the tree rely heavily on ucom, this
one is self-contained.  The reason for that is that ucom assumes that
the bridge uses bulk pipes for I/O, while the Cypress parts actually
register as human interface devices and use HID reports for configuration
and I/O.

The driver is not entirely complete: there is no support yet for flow
control, and output doesn't seem to work, though I don't know if that is
because of a bug in the code, or simply because the Earthmate is a read-
only device.
2004-09-05 09:43:47 +00:00
Ruslan Ermilov
0187838b3b Fixed build with DEVICE_POLLING defined. 2004-09-04 07:54:05 +00:00
MIHIRA Sanpei Yoshiro
e7934ccbaa Add support Western Digital External USB HDD
ONSPEC entry are sorted

PR:		kern/71031
Submitted by:	Johann Hugo <jhugo@icomtek.csir.co.za>
MFC after:	1 week
2004-09-04 07:07:35 +00:00
MIHIRA Sanpei Yoshiro
3785db4f85 Add support Nikon CoolScan LS40 ED
PR:		kern/71139
Submitted by:	Pierre DAVID <Pierre.David@crc.u-strasbg.fr>
MFC after:	1 week
2004-09-03 23:29:01 +00:00
MIHIRA Sanpei Yoshiro
44cf44fbff Add support Qualcomm CDMA modem
PR:		kern/71043
Submitted by:	Tomas Krivanek <tom@atack.cz>
MFC after:	1 week
2004-09-03 23:19:27 +00:00
MIHIRA Sanpei Yoshiro
42554f699b add support ELECOM UC-SGT(minor change version)
http://www2.elecom.co.jp/products/UC-SGT.html

PR:		[FreeBSD-users-jp 80725]
Submitted by:	NAKAMURA Kazushi <kaz@kobe1995.net>
MFC after:	1 week
2004-09-03 22:41:37 +00:00
John-Mark Gurney
97b9d4baf5 merge in if_rl locking because if_re was originally based upon if_rl.
This essentially merges revs 1.143-1.1445 of sys/pci/if_rl.c.
This now marks the interrupt MPSAFE along with making the mutex non-recursive.

Looked over by:	bms
2004-09-03 16:41:41 +00:00
Søren Schmidt
0f7cfb8473 Introduce ata_udelay() that uses tsleep instead of DELAY if possible.
In places where we have long delays that doesn't depend on too accurate
timing, use ata_udelay() instead of DELAY() so we dont uselessly spin
the CPU if not nessesary;
2004-09-03 12:10:44 +00:00
Scott Long
21b1acfb93 Panic if given a CAM_DATA_PHYS pointer from CAM instead of trying to handle it.
It makes no sense in a PAE environment and is impossible to handle correctly.
This case is also never used right now.  This should make the iir(4) driver
ready for PAE.
2004-09-03 08:44:23 +00:00
Søren Schmidt
7a6d2ca81b Sync promise_mio_command with WIP on the Promise line of SATA controllers. 2004-09-03 08:23:04 +00:00
Søren Schmidt
df6a77ddcb Cleanup the defines used for various chipsets.
Add new nVidia controllers.
2004-09-03 07:37:53 +00:00
Nate Lawson
2df0b34b24 Don't enter the debugger when executing an AML breakpoint instruction
unless ACPI_DEBUG is defined.  Users don't typically care about errant
breakpoint instructions.  The HP Pavilion 7915 has this in its PCI0
_INI method for rev 0x6040000 of the RSDT.
2004-09-02 04:28:05 +00:00
Prafulla Deuskar
9821d34f43 Added support for Intel PRO/1000 GT Desktop Adapter(Device ID 8086 107C)
Removed support for Intel 82541ER
Added fix for 82547 which corrects an issue with Jumbo frames larger than 10k.
Added fix for vlan tagged frames not being properly bridged.
Corrected TBI workaround.
Corrected incorrect LED operation issues

Submitted by:	tackerman (Tony Ackerman)
MFC after:	2 weeks
2004-09-01 23:22:41 +00:00
Marcel Moolenaar
c78752b94b Remove redundant _FBSDID. 2004-09-01 22:53:13 +00:00
Nate Lawson
0c601400a3 Disable links after getting the possible resources. Even though _DIS
should only affect current resources, it seems best to wait until all
configuration is done before disabling it.  If this fixes any problems, it
is a MT5 candidate.
2004-09-01 17:59:29 +00:00
Søren Schmidt
8ea3547a15 Cleanup the storing and printing of the device transfermode for SATA. 2004-09-01 12:15:44 +00:00
Dag-Erling Smørgrav
037fc73d96 Add PCI ID for the BCM4401-B0.
Submitted by:	krion
MFC after:	3 days
2004-09-01 06:10:11 +00:00
Warner Losh
389bdd096c When ISA_PNP_PROBE is called, it will return 0 when it finds a device,
ENOENT when there's no PNP ID for this device node, or ENXIO when there
is one, but it doesn't match.

In the nonPNP case (as most Alpha systems appear to be), we were
treating the error return as an error, when it should be have ignored
it.  Version 1.9 properly ignored it, but the attach re-write of 1.10
introduced this logic error.

Pointy Hat to: phk (for breaking it then asking me to fix it :-)
Sponsored by: The Voices in Bill Paul's Head, LLC
2004-08-31 20:37:10 +00:00
Peter Wemm
c591d41f7c Add a suffix descriptor for the acpi thermal values as a hint for the userland
sysctl tool to print a more readable value for temperatures.
2004-08-30 22:42:10 +00:00
Nate Lawson
885128efdc Fix _FDI drive type probing. The new fd child is not an ACPI device while
the old one is.  Hence we need to evaluate the old one for _FDI since it
has a valid ACPI_HANDLE ivar.  This is a minimal fix.  Make a note that a
more complete one is to make fdc support the ACPI_HANDLE ivar for its
children.

This and the previous change are MT5 candidates.
2004-08-30 21:35:34 +00:00
Nate Lawson
f40c77a223 Fix _FDE probing by using the buffer contents instead of the buffer
object itself.  ACPI-CA returns an ACPI_OBJECT of type Buffer rather than
the buffer contents itself.
2004-08-30 21:13:03 +00:00
Justin T. Gibbs
08bbe9ff04 Correct a typo in a comment: alloated->allocated
Reported by: Jens Schweikhardt <schweikh@schweikhardt.net>
2004-08-30 20:15:42 +00:00
Colin Percival
972be79add Don't g_waitidle() when initializing a preloaded md. This fixes a
deadlock which otherwise occurs during the boot process.

Reported by:	kensmith
MFC after:	3 days
		(assuming that re@ approves)
2004-08-30 08:38:30 +00:00
Hidetoshi Shimokawa
ce7bda463c Remove an unused variable. 2004-08-29 13:45:55 +00:00
Ruslan Ermilov
7bad922a88 Fixed the module name (macros don't work here). 2004-08-29 07:49:53 +00:00
Marcel Moolenaar
cf96390dc6 Do not match TGA2 adapters. They are not compatible with TGA adapters,
nor are they 3D accelarators as the description would like us to
believe. Since the TGA2 adapter has a VGA mode (unlike the TGA adapter),
one can use the VGA driver instead.

This fixes GENERIC kernels on alpha with TGA2 adapters.
2004-08-29 02:53:07 +00:00
Ian Dowse
efe26acda8 Fix two cases where a successful return from usbd_transfer() would
be treated as an error and cause a transfer to be freed twice. This
can probably only happen at boot time when transfers are processed
synchronously.
2004-08-29 02:35:59 +00:00
Robert Watson
2a567ae5ec Tag a last set of PCI network interfaces as IFF_NEEDSGIANT until they
are either locked down or demonstrated MPSAFE.
2004-08-28 15:10:35 +00:00
MIHIRA Sanpei Yoshiro
ea263191fd Add support Corega CG-LAPCIGT Gigabit Ethernet(8169S)
PR:		[FreeBSD-users-jp 80667]
Submitted by:	FUJIMOTO Kou <fujimoto@j.dendai.ac.jp>
MFC after:	1 week
2004-08-28 10:59:02 +00:00
Søren Schmidt
d3ef327c8d remove unused prototype 2004-08-27 22:14:45 +00:00
Roman Kurakin
6b1cbdfc68 Make code ready to switch debug.mpsafenet to 1 since I've not able to
commit MPSAFE code for now it is just IFF_NEEDSGIANT.
2004-08-27 22:14:26 +00:00
Justin T. Gibbs
5fb0f52712 Improve sync recovery algorithm:
o Remove PSM_SYNCERR_THRESHOLD1.  This value specified how many sync
   errors were required before the mouse is re-initialised.
   Re-initialisation is now done after (packetsize * 2) sync errors as
   things aren't likely to improve after that.

 o Reset lastinputerror when re-initialisation occurs.  We don't want
   to continue to drop data after re-initialisation.

 o Count the number of failed packets independently of the syncerrors
   statistic.  syncerrors is useful for recovering sync within a single
   packet.  pkterrors allows us to detect when the mouse changes its
   packet mode due to some external event (e.g. KVM switch).

 o Reinitialize the mouse if we see more than psmpkterrthresh errors
   during the validation period.  The validation period begins as soon
   as a sync error is detected and continues until psmerrsecs/msecs
   time has elapsed.  The defaults for these two values force a reset
   if we see two packet errors in a 2 second period.  This allows rapid
   detection of packet framing errors caused by the mouse changing packet
   modes.

 o Export psmpkterrthresh as a sysctl

 o Export psmloglevel as a sysctl.

 o Enable more debugging code to be enabled at runtime via psmloglevel.

 o Simplify verbose conditioned loging by using a VLOG macro.

 o Add several comments describing the sync recovery algorithm of
   this driver.

Large Portions by: Brian Somers <brian@Awfulhak.org>
Inspired and Frustrated by: Belkin KVMs
Reviewed by: njl, philip
2004-08-27 21:25:16 +00:00
Andre Oppermann
3161f583ca Apply error and success logic consistently to the function netisr_queue() and
its users.

netisr_queue() now returns (0) on success and ERRNO on failure.  At the
moment ENXIO (netisr queue not functional) and ENOBUFS (netisr queue full)
are supported.

Previously it would return (1) on success but the return value of IF_HANDOFF()
was interpreted wrongly and (0) was actually returned on success.  Due to this
schednetisr() was never called to kick the scheduling of the isr.  However this
was masked by other normal packets coming through netisr_dispatch() causing the
dequeueing of waiting packets.

PR:		kern/70988
Found by:	MOROHOSHI Akihiko <moro@remus.dti.ne.jp>
MFC after:	3 days
2004-08-27 18:33:08 +00:00
Poul-Henning Kamp
1d4b1bb78d Hide a printf under bootverbose. 2004-08-27 17:08:24 +00:00
Søren Schmidt
dc26948b0c Fix the handling of "inflight" requests when doing reinit's.
Add missing untimeout that would get lost in handling of some
error situations, and caused what looked like random timeouts
afterwards when the timeout fired.
2004-08-27 14:48:32 +00:00
Søren Schmidt
33203bee0c Set and reset the right bit for UDMA enable/disable on the ICH* chips. 2004-08-27 12:54:58 +00:00
Søren Schmidt
71d7101fac Rearrange the call to disk_destroy.
Suggested by:	phk
2004-08-27 12:03:18 +00:00
Nate Lawson
85cdc19d00 Always set the status and move a printf under bootverbose.
Tested by:	gj
2004-08-27 00:53:11 +00:00
Nate Lawson
59506cd39a If getting the current setting after modifying the link failed, we assume
it succeeded.  However, we also need to set the status to AE_OK.
2004-08-26 17:14:36 +00:00
Dag-Erling Smørgrav
461af901ed Correct capitalization of DeLorme Publishing. 2004-08-26 16:59:50 +00:00
Marius Strobl
8f0882f544 Don't call uart_bus_probe() for non-matching PnP-devices. Trying to probe
the keyboard controller with uart_bus_probe() caused a hang here on an i386
machine.

Approved by:	marcel
2004-08-25 22:15:33 +00:00
Nate Lawson
b0e7e61135 Remove code to initialize the lid state at boot. It interfered with lid
operation for some users with pure GPE lid switches (vs. embedded
controller.)

Tested by:	Anish Mistry <mistry.7_at_osu.edu>
MFC after:	3 days
2004-08-25 20:09:15 +00:00
David E. O'Brien
016bdcb36a Correct style nit in rev 1.17. 2004-08-25 17:54:19 +00:00
Robert Watson
5162f7de6f if_dc includes locking, but that locking is disabled by a #ifdef
by default.  As such, mark if_dc as IFF_NEEDSGIANT until such
time as appropriate locking review and testing can take place,
and the locking can be enabled by default.

RELENG_5 candidate.
2004-08-25 03:37:25 +00:00
Søren Schmidt
1c01d05f9c Sii_reset needs to wait up to 1 second to get slow disks with it so
use tsleep instead of DELAY.
2004-08-24 20:11:26 +00:00
Nate Lawson
9f65aa0340 Be sure to always unlock the sx lock when exiting the sysctl function.
MFC after:	3 days
2004-08-24 17:53:25 +00:00
Søren Schmidt
741d64783e Always pick up giant before returning from an ioctl call. 2004-08-24 15:09:05 +00:00
Søren Schmidt
5a8f8e353e Properly check malloc returns. 2004-08-24 10:39:00 +00:00
Doug White
b3f1e85ab9 Pick up changes in rev 1.8 of src/sys/dev/ic/mpt_netbsd.c from NetBSD.
Set the DMA SGL length correctly if the DMA request must be chained because
it is too large to fit in one SGL.

This should fix this driver for some Dell Precision systems.
RELENG_5 candidate.

PR:		kern/66479
Submitted by:	HITOSHI Osada <qfh02545@nifty.com>
2004-08-24 03:47:41 +00:00
Matt Jacob
e3e49f7e32 Until I can get a clearer architecture from PHK about why he wants
the geometry code to grab a mutex that prohibits any driver on the
stack below it from sleeping, it's not safe to allow anything in
the top half of isp to sleep (excepting the thread that Fibre Channel
instances use to re-scan loops/fabrics).
2004-08-23 19:04:19 +00:00
Nate Lawson
adad474471 Rework sysresource management. Instead of having each sysresource object
hold its own values, pass them up to the parent (acpi0) and merge/uniq them
on the way.  After the namespace evaluation, acpi will reserve these
resources and manage them via rman before bus_generic_probe() and
bus_generic_attach().  This is necessary because some systems specify
conflicting resources in separate sysresource objects.  It's also cleaner
in that the interface between sysresource and acpi is now merely the parent's
resource list.  This code handles the following cases:

1. Unique resource:  add it to the parent via bus_set_resource().
2. New wholly contained in old:  discard new.
3. New tail overlaps old head:  grow old head downward.
   AND/OR
4. New head overlaps old tail:  grow old tail upward.

Tested by:	Pawel Worach <sajd_at_telia.com>
Tested by:	Radek Kozlowski <radek_at_raadradd.com>
MFC after:	5 days
2004-08-23 16:28:42 +00:00
Maxime Henrion
c480dc188f Pass a correct lowaddr to bus_dma_tag_create(), lnc(4) cards can only
deal with 24-bit addresses.  While the two other attachments, namely
isa and cbus, do it properly, the PCI attachment was passing
BUS_SPACE_MAXADDR instead of BUS_SPACE_MAXADDR_24BIT.  This bug
became apparent with the new contigmalloc() code.

This fixes the problem reported with lnc(4) interfaces inside VMWare,
and should theoritically also fix any user of a PCI lnc(4) card.  It
is a RELENG_5 MFC candidate.

Tested by:	Florian Le Goff <madflo@beertech.org>
2004-08-22 23:01:13 +00:00
Colin Percival
2b004a226d When creating a new md, wait for geom's event queue to become empty
before returning.  Device nodes are created via the "taste" mechanism,
so this is necessary in order to make sure that devfs entries are
created before mdconfig(8) returns.

This may be a MFC candidate for 5.3.

Suggested by:	phk
2004-08-22 19:44:24 +00:00
Brian Feldman
bf5ab950e3 The new contigmalloc code is exposing a lot of misuses of busdma memory
allocation. Notably, in this case, the driver tries to allocate several
pieces of memory and then fails if the pieces allocated after the first
do not come after it physically, and within a specific range (8MB I
believe).  Of course, this could just as easily fail for any number of
reasons, but it almost always fails now that contiguous allocations start
at the end of possible specified memory locations rather than the beginning.

Allocate all the possibly-needed memory up front, even though it's a waste,
to get around this.  The least bogus solution would be to take the physical
address from the first allocation and create a new tag that specified that
further allocations must follow it within that 8MB window, then use that
when allocating new channels, but that's left for anyone else that really
feels like doing it.

Tested by:	Erwin Lansing <erwin@lansing.dk>
2004-08-22 18:57:40 +00:00
Søren Schmidt
d607fde675 Workaround devices that responds with registers as *both* master & slave,
but fail utterly when we try to talk to the "fake" device.
2004-08-22 15:54:08 +00:00
Justin T. Gibbs
25edba1e56 In the PCI error interrupt handler, specify the width of the PCI configuration
cycle using the correct argument.  The location and width were reversed.

MFC in: 2 days
2004-08-22 14:02:43 +00:00
Justin T. Gibbs
4ddea3e2d4 Set AHD_BUSFREEREV_BUG in the bug field for Rev B chips, not the
feature field.

Reported by: Ken Westerback <krw@openbsd.org>
MFC in: 2 days
2004-08-22 13:54:27 +00:00
Eric Anholt
7eed267f0c Add support for Intel E7205 AGP.
PR:		kern/69858
Submitted by:	Jacobo Arvelo <unix4all at gulic dot org>
2004-08-22 03:55:04 +00:00
Nate Lawson
85bafe5ec3 Fix PCI link irq programming on resume. A logic bug prevented a device
match, inverting which links actually got resumed.

Submitted by:	Hiroyuki Aizu <eyes_at_navi.org>
MFC after:	3 days
2004-08-21 18:18:32 +00:00
David E. O'Brien
9295c6c555 Fix where my automated script blew the SCM ID format conversion. 2004-08-21 17:44:57 +00:00