Commit Graph

12953 Commits

Author SHA1 Message Date
Warner Losh
494f3ca182 Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 19:24:22 +00:00
Warner Losh
53ee71735f Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 19:06:12 +00:00
Warner Losh
538565c4a5 Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 18:30:12 +00:00
Warner Losh
b77e575e1d Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 18:17:35 +00:00
Warner Losh
6b9907e7f8 Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 18:10:49 +00:00
Maxime Henrion
29a8929dfa Add support for fxp(4) cards found in Sony FS570 laptops.
Submitted by:	Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
2005-03-05 13:52:28 +00:00
Marius Strobl
c90ff9ce5a - sparc64/fhc/fhc.c:
Change fhc(4) to use IRQ numbers instead of RIDs for allocating the
  IRQs of children. This works similar to e.g. sbus(4), i.e. add the
  IRQ resources as fully specified to the resource lists of the children,
  allocate them like normal. When establishing the interrupt search the
  interrupt maps of the children for a matching INO to determine which
  map we need to write the fully specified interrupt number to and to
  enable the mapping (before the RID was used to indicate which interrupt
  map to use).

- dev/puc/puc.c:
  Revert rev. 1.38, with the above change fhc(4) no longer needs special
  treatment for allocating IRQs.

Thanks to:	joerg for providing access to an E3500
2005-03-04 22:23:21 +00:00
Nate Lawson
5e517fee01 On i386 platforms at least, ACPI throttling is accomplished by the chipset
modulating the STPCLK# pin based on the duty cycle.  Since p4tcc uses the
same mechanism (but internal to the CPU), we triggered a hang on some
systems at low frequencies when both were in use.  Now, disable
acpi_throttle when p4tcc is also present.

Tested by:	Kevin Oberman
2005-03-04 18:59:54 +00:00
Scott Long
55a0283961 Fix the ioctl path by ensuring that amr_start1() gets called for commands
with no associated data.  Also revert previous changes that allocate off
of the stack instead of using malloc, as it's not needed.  Many thanks to
LSI for investigating and fixing these problems.

Submitted by: rajeshpr @ lsil . com
2005-03-04 06:11:00 +00:00
Nate Lawson
0716d65cef Check for some impossible frequencies that some systems use to indicate
they don't actually support Px states.
2005-03-04 05:29:56 +00:00
Maxime Henrion
6720ebcc9f Fix the panic recently reported on -current@ occuring when configuring
a vlan interface attached to a fxp(4) card when it has not been
initialized yet.  We now set the links from our internel TX descriptor
structure to the TX command blocks at attach time rather than at init
time.  While I'm here, slightly improve the style in fxp_attach().

PR:		kern/78112
Reported by:	Gavin Atkinson <gavin.atkinson@ury.york.ac.uk> and others
Tested by:	flz, Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
MFC after:	1 week
2005-03-03 00:22:59 +00:00
Joerg Wunsch
a5f50ef9e4 netchild's mega-patch to isolate compiler dependencies into a central
place.

This moves the dependency on GCC's and other compiler's features into
the central sys/cdefs.h file, while the individual source files can
then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to
refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42.

By now, GCC and ICC (the Intel compiler) have been actively tested on
IA32 platforms by netchild.  Extension to other compilers is supposed
to be possible, of course.

Submitted by:	netchild
Reviewed by:	various developers on arch@, some time ago
2005-03-02 21:33:29 +00:00
Scott Long
a6b86949fc The existing locking in the esp driver appears to be fairly adequate, so
set the interrupt handler to be INTR_MPSAFE now that xpt_done() can be
called without Giant.  Giant is still on the top half of the driver and
the timeout handlers.
2005-03-02 15:56:42 +00:00
Scott Long
f7f3900b9f Clean up the botching of the previous repo-copy. Reference the included
headers from the correct location.

Submitted by: Tai-hwa Liang
2005-03-02 15:13:37 +00:00
Marius Strobl
2682e7b661 - Allocate the interrupt resource as RF_SHAREABLE allowing uart(4) to work
with shared IRQs in case the bus code, MD interrupt code, etc. permits.
  Together with sys/sparc64/sparc64/intr_machdep.c rev. 1.21 this fixes
  an endless loop in uart_intr() when using the second NS16550 on the ISA
  bus of sparc64 machines.
- Destroy the hardware mutex on detach and in case attaching fails.

Approved by:	marcel
2005-03-02 11:30:14 +00:00
David E. O'Brien
dad97fee58 Fix SCM ID's. 2005-03-02 09:22:34 +00:00
Scott Long
d38d9c9e5e Move all of the hptmv files to /sys/dev/hptmv so that they won't be mistaken
for being on a CVS vendor branch.  The files were moved via a repo-copy.
2005-03-02 05:14:28 +00:00
Nate Lawson
2d81061879 Protect acpivar.h with _KERNEL. No user parts inside currently. 2005-03-02 04:36:24 +00:00
Matthew N. Dodd
ae9d8a2668 When resubmitting a timed out request, reset donecount.
Submitted by:	  Nate Lawson <nate AT root.org>
2005-03-02 04:01:37 +00:00
Matthew N. Dodd
a50519ed08 Handle PIO timeouts in ata_end_transaction() by immediately returning.
Failure to do this will result in following ata_pio_read() calls walking
off the end of the read buffer.

This resolves the "memory modified after free" panics common with Thinkpads
and CD/DVD drives.

Submitted by:	 Nate Lawson <nate AT root.org>
2005-03-02 03:59:28 +00:00
Matthew N. Dodd
6bacdeb7e0 In ata_generic_reset() while waiting for both master & slave to become
idle the 'mask' variable could be set to 0, resulting in the timeout loop
running for the full 31 seconds.

Handling this case eliminates long hangs on resume on some systems.

Submitted by:		Nate Lawson <nate AT root.org>
2005-03-02 03:34:51 +00:00
Marius Strobl
e12405280b - Fix braino introduced in rev. 1.17, unlike the X1032A (HME-ISP1040-combo)
and the X1034A (quad HME; QFE) cards the X1033A (single HME) don't have a
  PCI-PCI-bridge so we can't rely on the PCI slot number being useable as
  index for the network address to read from the VPD on the latter. Use
  the end tag to determine whether it is a QFE VPD with 4 NAs and only use
  the slot number as index in this case.
- Remove a useless check.

Prodded by:		joerg
Additional testing by:	joerg
MFC after:		1 day
2005-03-02 00:49:37 +00:00
Warner Losh
d2b677bb1a Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY in
preference to some random negative number to allow other drivers a
bite at the apple.
2005-03-01 08:58:06 +00:00
Maxim Sobolev
21a69c81c0 Merge from NetBSD.
o usb_subr.c, add delta 1.119:

  Move usb_get_string() and make it public.

o usbdi.c, bring on par with 1.106, this includes:

  - Make an iterator abstraction for looping through all descriptors.

  - Whine about not being able to figure out default language if we are debugging.

  - Move usb_get_string() and make it public.

o usbdi.h, bring on par with 1.64, this includes:

  - Make an iterator abstraction for looping through all descriptors.

  - Move usb_get_string() and make it public.

o usbdi_util.c, bring on par with 1.42, this includes:

  - Add usbd_get_protocol().

  - Use NULL instead of 0.

  - Fix (mostly harmless) typo.

  - Move utility routine from uirda.c to usbdi_util.c.

o usbdi_util.h, bring on par with 1.31, this includes:

  - Add usbd_get_protocol().

  - Move utility routine from uirda.c to usbdi_util.c.

MFC after:	3 days
2005-03-01 08:01:22 +00:00
Warner Losh
2ece8174c1 Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, return
BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx
both support so that xl will snarf them on up.
2005-03-01 07:50:12 +00:00
Maxim Sobolev
d524bc1aa1 Sync with 1.9 from NetBSD, this includes:
o Add Ethernet descriptor.

o Use attribute packed for on-the-wire data structures.

MFC after:	3 days
2005-03-01 06:35:04 +00:00
Ian Dowse
528433ba71 Save and restore the VGA state across a suspend-resume cycle. This
is particularly useful when VESA is available (either `options VESA'
or load the vesa module), as BIOSes in some notebooks may correctly
save and restore LCD panel settings using VESA in cases where calling
the video BIOS POST is not effective. On some systems it may also
be necessary to set the hw.acpi.reset_video sysctl to 0.
2005-02-28 21:06:14 +00:00
Bill Paul
55fc1315ca Use 0 instead if NULL for vm_offset_t argument to windrv_lookup() to
silence compiler warnings.
2005-02-28 16:47:54 +00:00
Poul-Henning Kamp
62da7a2d68 Add missing () 2005-02-28 13:49:06 +00:00
Nate Lawson
a885159fea Protect against multiple includes and use _KERNEL to protect the PCI fns. 2005-02-28 05:39:34 +00:00
Pyun YongHyeon
a7e943a456 Add missing va_end() in fdc_cmd.
0 -> NULL in arguments of fdc_sense_int().

Reminded by:	joerg
2005-02-28 05:14:45 +00:00
Warner Losh
af5e97c122 There were two calls to cardbus_do_cis when cardbus_do_cis changed,
yet I only changed one of them.  So when we loaded drivers, we'd fail
to allocate resources correct.

This pointed out that we were doing the wrong thing when we failed to
attach a child.  We released all the resources and almost deleted the
child.  Instead, we should keep the resources allocated so when/if a
driver is loaded, we can go w/o having to allocate them.  We use
pci_cfg_save/restore to restore the BARs with these resources.

This seems to fix the problems that we were seeing that I thought
might have magically gone away in the last revision of cardbus.c (but
really didn't).

Noticed by: avatar (nicely done!)
2005-02-28 01:27:24 +00:00
Warner Losh
c3c08f307c Expose pci_cfg_safe/restore for subclasses of pci to use. 2005-02-28 01:14:15 +00:00
David E. O'Brien
bb4e63066a Add FreeBSD ID. 2005-02-28 00:53:29 +00:00
Matthew N. Dodd
c58d5e62ad Use mss_{format,speed}() rather than chn_set{format,speed}() and hold
mss lock across call.

This allows my Thinkpad 600E to resume with the sound driver loaded and
vchans enabled.
2005-02-27 23:32:21 +00:00
Poul-Henning Kamp
4db0fda84e Use dynamic major number allocation. 2005-02-27 22:19:35 +00:00
Poul-Henning Kamp
80602ed932 Use dynamic major number allocation. 2005-02-27 22:17:51 +00:00
Poul-Henning Kamp
92d4c5d082 Use dynamic major number allocation. 2005-02-27 22:16:58 +00:00
Poul-Henning Kamp
e70377df79 Use dynamic major number allocation. 2005-02-27 22:16:30 +00:00
Poul-Henning Kamp
78b7c8d68d Use dynamic major number allocation. 2005-02-27 22:11:02 +00:00
Poul-Henning Kamp
3f8bb25bd0 Use dynamic major number allocation. 2005-02-27 22:01:09 +00:00
Poul-Henning Kamp
7ce296cf04 Remove debug printout of major/minor numbers, print name instead. 2005-02-27 21:16:26 +00:00
Marius Strobl
d74b306146 The zs(4) driver is superseded by uart(4) and broken in -CURRENT. Remove
it from the sparc64 kernel config files and delete its fhc(4) and sbus(4)
front-end.

Agreed with:	marcel
2005-02-27 15:23:58 +00:00
Maxime Henrion
93b6e2e6ff Fix a stupid bogon from myself, sc->revision wasn't initialized when
testing it to know whether we should enable the 82503 serial mode...
Move code to the right location and disallow the use of the 82503
serial mode if the sc->revision field is 0 again.  This makes fxp(4)
work correctly with ATMEL 350 93C46 cards (3 port 82559 based with a
82555 PHY), as well as with the older ATMEL 220 93C46 (same flavour)
and with the even older 10Mbps-only 82557 cards with the 82503 serial
interface.

Tested by:	Andre Albsmeier <andrer@albsmeier.net>, krion
MFC after:	2 weeks
2005-02-27 15:12:50 +00:00
Olivier Houchard
4ac78327de Add device id for the Ali M1671 host to AGP bridge. 2005-02-27 13:05:34 +00:00
Nate Lawson
97d31723e7 Make a pass through all drivers checking specs for desired behavior on
SMP systems.  It appears all drivers except ichss should attach to each
CPU and that settings should be performed on each CPU.  Add comments about
this.  Also, add a guard for p4tcc's identify method being called more than
once.
2005-02-27 02:43:02 +00:00
Nate Lawson
f81de92f96 Don't bother with cpufreq_register if we're info-only.
Suggested by:	Jung-uk Kim
2005-02-26 22:09:05 +00:00
Sam Leffler
ff69096233 plug memory leak
Noticed by:	Coverity Prevent analysis tool
2005-02-26 18:55:53 +00:00
Sam Leffler
729a4dd7f9 move ptr deref's to after null checks
Noticed by:	Coverity Prevent analysis tool
2005-02-26 18:52:54 +00:00
Marius Strobl
099894cc96 Declare the sbus(4) front-end of puc(4) also for fhc(4), allowing
uart(4) to support the Zilog 8530 SCCs which hang off of a FireHose
bus on Sun E4000/E5000 class machines.
Beside the fact that a puc_fhc.c would just be a copy of puc_sbus.c
with s,sbus,fhc,g the reason why the declaration for fhc(4) was
sticked into puc_sbus.c is that both of these front-ends for puc(4)
will go away once there is a scc(4).

Discussed with:	marcel
Tested by:	hrs, kris
MFC after:	3 days
2005-02-26 00:25:43 +00:00