Commit Graph

11451 Commits

Author SHA1 Message Date
Scott Long
397fa34f51 Collapse aac_map_command() into aac_startio(). Check the AAC_QUEUE_FRZN in
every iteration of aac_startio().  This ensures that a command that is
deferred for lack of resources doesn't immediately get retried in the
aac_startio() loop.  This avoids an almost certain livelock.
2004-06-01 05:32:26 +00:00
Nicolas Souchu
4f16b8b190 Necessary modifications do get pcf working again for ISA. Tested with
my Elektor card. Note that the hints are necessary to specify the
IO base of the pcf chip. This enables to check the IO base when the
probe routine is called during ISA enumeration.

The interrupt driven code is mixed with polled mode, which is wrong
and produces supposed spurious interrupts at each access. I still have
to work on it.
2004-05-31 14:24:21 +00:00
Takanori Watanabe
92fae6e79e Devclass have to be shared with same 'pcm' devclass, or
unit management will corrupt.
2004-05-31 11:38:46 +00:00
Scott Long
2c81db6cb5 Turn down the queue size by 8 until I can figure out why the 512th command
keeps on getting lost.
2004-05-30 22:40:28 +00:00
Poul-Henning Kamp
77409fe148 Add missing #include <sys/module.h> 2004-05-30 20:34:58 +00:00
Poul-Henning Kamp
5dba30f15a add missing #include <sys/module.h> 2004-05-30 20:27:19 +00:00
Poul-Henning Kamp
fe12f24bb0 Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
Poul-Henning Kamp
f11d01c3bc Add missing <sys/module.h> includes 2004-05-30 20:00:41 +00:00
Poul-Henning Kamp
41ee9f1c69 Add some missing <sys/module.h> includes which are masked by the
one on death-row in <sys/kernel.h>
2004-05-30 17:57:46 +00:00
Scott Long
dd83a01e81 Use a unique malloc type rather than M_DEVBUF. 2004-05-30 04:01:29 +00:00
MIHIRA Sanpei Yoshiro
f7ec9a7547 check interface number
Kyocera AH-K3001V has 2 data interface.  But we could use only one
interface(id = 0)

PR:		kern/66779
Submitted by:	Togawa Satoshi <toga@puyo.org>
2004-05-30 01:48:04 +00:00
Marius Strobl
23465eaec2 In hme_init() call mii_mediachg() to make sure the current media is set.
This is part 2/2 of fixing autonegotiation on hme(4) using DP83840A PHYs.
It appears to also fix the occasional problems to establish a link on
hme(4) using LU6612 PHYs and shouldn't hurt on those using QS6612 PHYs.

Obtained from:	NetBSD
2004-05-29 18:29:53 +00:00
Marius Strobl
f0e531572d DP83840A on hme(4) don't advertise their media capabilities themselves
properly. This causes the autonegotiation to e.g. never establish a
100baseTX full-duplex link. The solution to this problem is to manually
write the capabilities from the BMSR to the ANAR every time a media
change occurs, even when already in autonegotiation mode.
The NetBSD way of doing this is to set their MIIF_FORCEANEG flag in the
NIC driver. This causes mii_phy_setmedia() to call mii_phy_auto() (which
will set the ANAR according to the BMSR) even when the PHY alread is in
autonegotiation mode. However, while doing the same on FreeBSD (which
involves porting the MIIF_FORCEANEG flag and converting nsphy.c to use
mii_phy_setmedia()) fixes autonegotiation, using mii_phy_setmedia()
causes this driver to no longer work properly in the other modes.
Another drawback of that approach is that this will also force writing
the ANAR on other PHYs whose drivers use mii_phy_setmedia() and which
are used with a NIC whose driver sets MIIF_FORCEANEG (e.g. hme(4) is
known to be used together with 3 different PHYs while only the DP83840A
require this workaround).
So instead of moving to MIIF_FORCEANEG, just call mii_phy_auto() in
nsphy_service() unconditionally when hanging off of a hme(4) and serving
a media change

This is part 1/2 of fixing autonegotiation on hme(4) using DP83840A PHYs.
2004-05-29 18:23:26 +00:00
Marius Strobl
b78791d37e Spelling fix in a comment. 2004-05-29 18:13:44 +00:00
Marius Strobl
50aa106108 Remove double __FBSDID and move the remaining one into a common place after
the license(s) and before the driver comment (the latter only in drivers not
having __FBSDID at that location).
2004-05-29 18:09:10 +00:00
Marius Strobl
c4386506c7 Move __FBSDID out from under a comment. 2004-05-29 17:45:45 +00:00
Marius Strobl
5aa5480919 Spelling fix in a comment. 2004-05-29 16:54:59 +00:00
Ian Dowse
94122d1695 In axe_stop(), close the pipes before calling axe_reset(). axe_reset()
changes the device configuration index, which should not be done
while there are pipes open.

Debugged with help from:	Luke Dean <LukeD@pobox.com>
2004-05-29 15:21:33 +00:00
Ian Dowse
93804be0d7 Refuse to change the configuration index if the device has open
pipes, since open pipes are linked off a usbd_interface structure
that is free()'d when the configuration index is changed. Attempting
to close or use such pipes later would access freed memory and
usually crash the system.

The only driver that is known to trigger this problem is if_axe,
which is itself at fault, but it is worth detecting the situation
to avoid the obscure crashes that result from this type of easily
made driver mistakes.
2004-05-29 14:51:23 +00:00
Roman Kurakin
24f6353dc4 Switch to using C99 sparse initialisers for the type methods array.
Requested by:	harti

MFC after:	1 week
2004-05-29 13:17:28 +00:00
Bill Paul
d1a5f43855 In subr_ndis.c, when searching for keys in our make-pretend registry,
make the key name matching case-insensitive. There are some drivers
and .inf files that have mismatched cases, e.g. the driver will look
for "AdhocBand" whereas the .inf file specifies a registry key to be
created called "AdHocBand." The mismatch is probably a typo that went
undetected (so much for QA), but since Windows seems to be case-insensitive,
we should be too.

In if_ndis.c, initialize rates and channels correctly so that specify
frequences correctly when trying to set channels in the 5Ghz band, and
so that 802.11b rates show up for some a/b/g cards (which otherwise
appear to have no 802.11b modes).

Also, when setting OID_802_11_CONFIGURATION in ndis_80211_setstate(),
provide default values for the beacon interval, ATIM window and dwelltime.
The Atheros "Aries" driver will crash if you try to select ad-hoc mode
and leave the beacon interval set to 0: it blindly uses this value and
does a division by 0 in the interrupt handler, causing an integer
divide trap.
2004-05-29 06:41:17 +00:00
Nate Lawson
2b9609ab9b Decrease sleep_delay default to 1 second now that the machines that
required the 5 second delay have been fixed.
2004-05-29 05:34:04 +00:00
Nate Lawson
5acd02180c Style cleanups, don't set the device description before the probe routine
has completed successfully.
2004-05-29 04:32:50 +00:00
Julian Elischer
f8aae7776f Switch to using C99 sparse initialisers for the type methods array.
Should make no binary difference.

Submitted by:	Gleb Smirnoff <glebius@cell.sick.ru>
Reviewed by:	Harti Brandt <harti@freebsd.org>
MFC after:	1 week
2004-05-29 00:51:19 +00:00
John Baldwin
91c14f698c Don't assume that the current setting (_CRS) of a PCI link device is
correct.  Instead, check it against the possible settings (_PRS) when
the link is probed.  This is important when using APIC mode but link
devices still have PIC mode settings.  This is also what Linux does.

Additional prodding by:	Len Brown len dot brown at intel dot com
2004-05-28 17:31:32 +00:00
Nate Lawson
e3aa81b84d Style fixes. 2004-05-28 16:38:37 +00:00
Nate Lawson
043498df33 Now that we properly disable GPEs before entering a sleep state, including
S5 (soft off), we don't need to disable ACPI when powering off.  This may
fix some systems that don't power off correctly.
2004-05-28 07:16:52 +00:00
Nate Lawson
54af2f27c7 Style cleanups. "extern" is unneeded for function prototypes. 2004-05-28 07:15:55 +00:00
Nate Lawson
cc85c78ce3 Update the new suspend/resume GPE methods to properly limit the GPE
based on the destination sleep state.  Add a method to restore the old
state on resume.  This is needed for the case of suspending to a very low
state disabling a GPE (i.e. S4), resuming, and then suspending to a higher
state (i.e. S3).  This case should now keep the proper GPEs enabled.
2004-05-28 07:04:09 +00:00
Nate Lawson
44b8ae7193 Pass a pointer to the sleep state instead of casting gymnastics to pass
the value itself in the pointer.
2004-05-28 06:32:16 +00:00
Nate Lawson
5c9ea25e69 Fix paste-o. 2004-05-28 06:29:30 +00:00
Nate Lawson
88a79fc05b Attach per-device sysctls to allow users to set whether or not a given
device can wake the system.  For example:

    dev.root0.nexus0.acpi0.acpi_lid0.wake: 1
    dev.root0.nexus0.acpi0.acpi_button0.wake: 1
    dev.root0.nexus0.acpi0.pcib0.wake: 0
    dev.root0.nexus0.acpi0.sio0.wake: 0
2004-05-28 06:28:55 +00:00
Scott Long
44eaf12c79 Remove a redundant include directive 2004-05-28 04:42:10 +00:00
Marcel Moolenaar
80c74f3d56 Fix LP64 environments: cast a pointer type to intptr_t before casting
to int and vice versa.
2004-05-28 02:50:43 +00:00
Warner Losh
3b8c0bec8a Don't nest includes here. There's no need and the subset included is lame.
Submitted by: bde
2004-05-28 02:24:07 +00:00
Warner Losh
33de92af3f Include required machine/bus.h 2004-05-28 02:23:10 +00:00
Paul Saab
10672bdf56 Define another HOTPLUG event. 2004-05-28 00:49:57 +00:00
Tony Ackerman
e03f8cdc4f First release of ixgb driver for the Intel(R) PRO/10GbE Family of Adapters. This driver has
been developed for use with FreeBSD, version 4.8 and later.

Submitted by:	Hema Joyce
Reviewed by: 	Prafulla Deuskar
Approved by: 	Prafulla Deuskar
MFC after:	1 week
2004-05-28 00:23:00 +00:00
Warner Losh
bc8d2181b3 Use rman_get_start in preference to reaching into the rman structure. 2004-05-27 22:43:10 +00:00
Nate Lawson
e8b4d56eb5 Restructure the wake GPE API. Now there are three functions:
acpi_wake_init:
    Evaluate _PRW and set the GPE type
acpi_wake_set_enable:
    Enable or disable a device's GPE.
acpi_wake_sleep_prep:
    Perform any last-minute changes to the device to prepare it for
    entering the given sleep state.

Also, walk the entire namespace when transitioning to a sleep state,
disabling any GPEs which aren't appropriate for the given state.  Transition
acpi_lid and acpi_button to the new API.

This clears the way for non-ACPI-aware devices to wake the system (i.e.
modems) and fixes a problem where systems power up after shutdown when a
GPE is triggered.
2004-05-27 18:38:45 +00:00
Warner Losh
9a7be62a1c Fixing disorder is the hardest thing in the world: Learn to sort :-)
Submitted by: bde
2004-05-27 15:21:51 +00:00
Yaroslav Tykhiy
44e0bc11b9 POLA dictates that VLAN_MTU be enabled by default.
In particular, disabling it was likely to break configurations
involving ng_vlan(4) since the latter couldn't control
the parent's VLAN_MTU in the way vlan(4) did.

Pointed out by:	ru
2004-05-27 14:36:58 +00:00
Joerg Wunsch
7351b0acf8 Make "envctrl" a known master driver for iicbus. 2004-05-27 13:29:09 +00:00
Warner Losh
2e31e339d1 Fix disordering of pccarddevs.h noticed by bde. Also remove a few
redundant includes and fix some of the include disordering.

Submitted by: bde
2004-05-27 03:49:45 +00:00
Warner Losh
54c9d8aabc These are now not needed, after repo copy and conversion. 2004-05-27 01:31:11 +00:00
Warner Losh
eb9482f4eb Sort includes, remove unnecssary ones.
Submitted by: bde
2004-05-27 01:27:04 +00:00
Pawel Jakub Dawidek
50a33b6aaa Those sysctls shouldn't be writtable from inside a jail. 2004-05-26 23:03:27 +00:00
Mathew Kanner
3858fd7a0c Add PCI ID for via 8237.
Submitted by:	Josh Elsasser <jre@vineyard.net>
Approved by:	tanimura (mentor)
PR:		kern/61730
2004-05-26 22:05:50 +00:00
Thomas Moestl
89eef2de47 It seems that clearing the MCR_IE bit in the modem control register
does not reliably prevent the triggering of interrupts for all supported
configurations. Thus, the FIFO size probe could cause an interrupt,
which could lead to an interrupt storm in the shared interrupt case.

To prevent this, change ns8250_bus_probe() to use the overflow bit in
the line status register instead of the RX ready bit in the interrupt
identification register to detect whether the FIFO has filled up.
This allows us to clear all bits in the interrupt enable register during
the probe, which should prevent interrupts reliably.
Additionally, the detected FIFO size may be a bit more accurate, because
the overflow bit is only set when the FIFO did actually fill up, while
interrupts would trigger a bit early.

Reviewed and tested on a lot of hardware by:	marcel
2004-05-26 21:59:01 +00:00
Josef El-Rayes
f50d9ea1d4 Unbreak build if
options BKTR_USE_FREEBSD_SMBUS
is defined in kernel configuration.

Submitted by:   Tom Convery <tpc@tomfoo.com>
PR:             kern/60458
Approved by:    imp
2004-05-26 20:18:58 +00:00