Commit graph

10793 commits

Author SHA1 Message Date
Bill Paul cea179a3fe Implement support for single packet sends. The Intel Centrino driver
that Asus provides on its CDs has both a MiniportSend() routine
and a MiniportSendPackets() function. The Microsoft NDIS docs say
that if a driver has both, only the MiniportSendPackets() routine
will be used. Although I think I implemented the support correctly,
calling the MiniportSend() routine seems to result in no packets going
out on the air, even though no error status is returned. The
MiniportSendPackets() function does work though, so at least in
this case it doesn't matter.

In if_ndis.c:ndis_getstate_80211(), if ndis_get_assoc() returns
an error, don't bother trying to obtain any other state since the
calls may fail, or worse cause the underlying driver to crash.

(The above two changes make the Asus-supplied Centrino work.)

Also, when calling the OID_802_11_CONFIGURATION OID, remember
to initialize the structure lengths correctly.

In subr_ndis.c:ndis_open_file(), set the current working directory
to rootvnode if we're in a thread that doesn't have a current
working directory set.
2004-02-03 07:39:23 +00:00
Nate Lawson 526785c638 Notify the user (at kern.emerg) that the system will be shutting down if
it is still above the critical temperature on the next poll cycle.  This
is a 10 second advance notice by default.  Document the private
(non-standard) notify we will be using with devd(8).
2004-02-03 04:18:56 +00:00
Nate Lawson 322141f1e2 If the temperature is at _HOT or _CRT for 3 sequential readings, shutdown
the system.  Also, decrease the poll interval to 10 seconds from 30
seconds.  This is needed because some systems will report an invalid high
temperature for one poll cycle.  It is suspected this is due to the
embedded controller timing out.  A typical value is 138C for one cycle on a
system that is otherwise 65C.  This prevents the system from prematurely
shutting down after one invalid reading.  It will still shut down after 30
seconds of high temperature, which is the same as previous default
behavior.

Tested by:	Scott Lambert <lambert AT lambertfam.org>
2004-02-02 18:03:35 +00:00
Poul-Henning Kamp c740ae4b46 Add CRD_F_KEY_EXPLICIT which allows the key to be changed per
operation, just like it was possible to change the IV.

Currently supported on Hifn and software engines only.

Approved by:	sam@
2004-02-02 17:06:34 +00:00
Søren Schmidt b8f6dec455 Move the enabling of interrupt back to where it was some time ago.
This apparently was what broke the boot with some devices (liteon).
2004-02-02 15:49:01 +00:00
MIHIRA Sanpei Yoshiro e08f155b25 MFNetBSD: URL updates(rev.1.108) 2004-02-02 15:00:15 +00:00
Søren Schmidt 6595b49405 Fix support for the Promise TX4 on amd64.
Somehow the bridge on there shows up with another PCI id than
it does on x86, no idea why...
2004-02-02 14:05:57 +00:00
Peter Grehan aa1985722c Add new Apple GEM PCI id. 2004-02-02 01:11:39 +00:00
Bill Paul f0aed0dbd0 Use the OID_802_11_CONFIGURATION OID when deciding if the underlying driver
is for an 802.11 device or not. At least one driver I have does not
support the OID_802_11_NETWORK_TYPES_SUPPORTED OID.

Also, for now, don't do anything special in the ndis_suspend() method.
I originally wanted to shut down the NIC but leave the IFF_UP flag alone
since technically the interface is meant to remain up, but an interrupt
may be delivered to the ISR on suspend, and if this happens while the
NIC is halted, we will crash, since none of the miniport driver methods
will function.

This needs to be dealt with properly later, but for now this prevents
a panic, and the resume method properly re-inits the NIC.
2004-02-01 21:35:15 +00:00
Warner Losh 20d6d1bd21 Add the Canon N1240U to the mix. It appears to be similar to the
1220U and supported by sane

# someone should update the man page to include all the devices that
# uscanner supports.
2004-01-31 18:12:18 +00:00
Søren Schmidt 367d380b54 Be more robust in the probe. We dont want to get into a loop with
reinitting when we try to identify devices. If they dont interrupt
on identify we retry once. If this fails we simply ignore that device.
2004-01-30 19:16:08 +00:00
Hidetoshi Shimokawa dbc80c7bf2 Add NEC uPD72873.
Submitted by: Christian Laursen <xi@borderworlds.dk>
2004-01-30 14:30:19 +00:00
Hidetoshi Shimokawa b180671ce4 Use device_identify and bus_add_child methods to add a firewire
bus on fwohci. This should fix attach failure caused by a race
between firewire and fwochi initialization for the kernel module.
2004-01-30 14:28:11 +00:00
Scott Long 9148fa21dd Take the plunge and make this driver be INTR_FAST. This re-arranges the
interrupt handler so that no locks are needed, and schedules the
command completion routine with a taskqueue_fast.  This also corrects the
locking in the command thread and removes the need for operation flags.

Simple load tests show that this is now considerably faster than FreeBSD 4.x
in the SMP case when multiple i/o tasks are running.
2004-01-30 07:04:39 +00:00
Søren Schmidt f279a36c6e Cleanups/cosmetics. 2004-01-29 15:03:01 +00:00
Michael Reifenberger a905454644 Add dependency to snd_via8233 2004-01-29 14:11:03 +00:00
Matt Jacob eedb2dfec3 Fix a bug where we never managed to include the sense data we wanted to send. 2004-01-29 06:36:30 +00:00
Bill Paul e2402a9b9b Go back to using AUTHMODE_AUTO if WEP is on. In some cases, the Centrino
won't associate in BSS mode if you use AUTHMODE_SHARED. I probably don't
understand enough to know when SHARED should be used vs. OPEN or WPA.
For now, go back to what works.
2004-01-29 03:16:58 +00:00
Matt Jacob ac9d0a02cf Fix longstanding buglet- for centrally handled CTIO2s we were checking the wrong
bit for this being the  last CTIO2.  It didn't matter since it really was the
last CTIO2 and the resources recycled, but still....

Add in CTIO3 define for future DAC work.
2004-01-29 02:40:43 +00:00
Søren Schmidt 175352f07c Fix for those lost interrupts on probe on lots of controller types.
Note to self, just because an idea is good, it doesn't apply everywhere.
2004-01-28 21:54:40 +00:00
Søren Schmidt 816994ccc8 Use the biotask functionality in GEOM to put finished requests on
instead of taskqueue_swi. This shaves from 1 to 10% of the overhead.

Overhaul the locking once more, there was a few possible races that
are now closed.
2004-01-28 20:38:51 +00:00
Don Lewis 12e524a290 Change KASSERT() in feed_vchan16() into an explicit test and call to
panic() so that the buffer overflow just beyond this point is always
caught, even when the code is not compiled with INVARIANTS.

Change chn_setblocksize() buffer reallocation code to attempt to avoid
the feed_vchan16() buffer overflow by attempting to always keep the
bufsoft buffer at least as large as the bufhard buffer.

Print a diagnositic message
	Danger! %s bufsoft size increasing from %d to %d after CHANNEL_SETBLOCKSIZE()
if our best attempts fail.  If feed_vchan16() were to be called by
the interrupt handler while locks are dropped in chn_setblocksize()
to increase the size bufsoft to match the size of bufhard, the panic()
code in feed_vchan16() will be triggered.  If the diagnostic message
is printed, it is a warning that a panic is possible if the system
were to see events in an "unlucky" order.

Change the locking code to avoid the need for MTX_RECURSIVE mutexes.

Add the MTX_DUPOK option to the channel mutexes and change the locking
sequence to always lock the parent channel before its children to avoid
the possibility of deadlock.

Actually implement locking assertions for the channel mutexes and fix
the problems found by the resulting assertion violations.

Clean up the locking code in dsp_ioctl().

Allocate the channel buffers using the malloc() M_WAITOK option instead
of M_NOWAIT so that buffer allocation won't fail.  Drop locks across
the malloc() calls.

Add/modify KASSERTS() in attempt to detect problems early.

Abuse layering by adding a pointer to the snd_dbuf structure that points
back to the pcm_channel that owns it.  This allows sndbuf_resize() to do
proper locking without having to change the its API, which is used by
the hardware drivers.

Don't dereference a NULL pointer when setting hw.snd.maxautovchans
if a hardware driver is not loaded.  Noticed by Ryan Sommers
<ryans at gamersimpact.com>.

Tested by:	Stefan Ehmann <shoesoft AT gmx.net>
Tested by:	matk (Mathew Kanner)
Tested by:	Gordon Bergling <gbergling AT 0xfce3.net>
2004-01-28 08:02:15 +00:00
Peter Pentchev 1b8c233de3 Add an ACPI_FUNCTION_TRACE() to the newly-added acpi_Startup() routine
to get the ACPI_DEBUG case (and LINT in particular) to build.

Reviewed by:	jhb, njl
Approved by:	jhb
2004-01-28 07:48:03 +00:00
Dag-Erling Smørgrav 823261a3e1 While USB keyboards attach as ukbd[0-9]+, the device node created by
kbd_attach() is called kbd[0-9]+, with a different unit number.  This
makes it impossible to write a devd rule which will automatically
switch to a USB keyboard when one is attached, because there is no way
to guess the correct device node to pass to kbdcontrol.

Therefore, change kbd_attach() to create a device node using the
keyboard device's real name (atkbd0, ukbd0...), and create the
kbd[0-9]+ node as an alias for backward compatibility.
2004-01-27 15:40:30 +00:00
Bill Paul 5d2b8edda2 This should have been checked in as part of the last update to if_ndis.c:
add yet another member to the ndis_softc as part of the workaround for
the net80211 dain bramage.
2004-01-27 09:08:12 +00:00
Bill Paul 215e951637 Add a kludge to avoid having ndis_init() called needlessly by dhclient
on an SIOCSIFADDR (by way of brain damage in net80211).

Also, avoid trying to set NDIS_80211_AUTHMODE_AUTO since the Microsoft
documentation I have recommends not using it, and the Centrino driver
seems to dislike being told to use it.
2004-01-27 07:57:42 +00:00
Nate Lawson e0ccb58ad9 Add TUNABLE_STR to make "hw.acpi.os_name" more correct. However, the call
to getenv_string() still doesn't work.
2004-01-27 06:07:09 +00:00
Bill Paul 0a4ab0aeef Use the M_BZERO flag with malloc() in a couple of places. 2004-01-27 03:14:59 +00:00
John Baldwin bbc2815c8d Move the code to initialize ACPI-CA into a separate acpi_Startup() function
that other modules can call to initialize ACPI-CA before the new-bus probe
and change acpi_identify() to call it.

Reviewed by:	njl
2004-01-26 19:29:04 +00:00
Hartmut Brandt 3b3948e881 Get rid of the last two uses of NG_NODELEN + 1 in the base system by
replacing them with NG_NODESIZ.
2004-01-26 16:41:21 +00:00
Mathew Kanner e7245381b9 Fix a panic in dsp_clone when trying to access a sound
device that doesn't exists.  I'm using my discretion and
committing without mentor approval since Seigo is away.

Noticed by:	Maxime Henrion <mux@freebsd.org>
2004-01-25 22:46:22 +00:00
Bill Paul cf736ea0c7 Correct KASSERT() in ndis_destroy(): ndis_mtx is a pointer now.
Also add KASSERT() for ndis_intrmtx().
2004-01-25 00:13:07 +00:00
Maxim Sobolev e13f9ac88b Regen after rev. 1.161 of usbdevs. 2004-01-24 21:24:36 +00:00
Maxim Sobolev 0bc4abec87 Add support for Crystalfontz CFA-631 USB LCD (uftdi(4) driver).
For some very unclear reason this device contains a FTDI 8U232AM USB->COM
adapter, but reports different device id than original 8U232AM. At the same
time, it reports vendor id of FTDI.

Sponsored by:	Porta Software Ltd
MFC after:	2 weeks
2004-01-24 21:23:12 +00:00
MIHIRA Sanpei Yoshiro 7d825ee7ff Sync to 1.160 of usbdevs 2004-01-24 07:15:23 +00:00
MIHIRA Sanpei Yoshiro 21c5b9f9e5 Add Support
- 2nd type of GL641USB USB-IDE bridge	[1]
	- Plextor Plexwriter 40/12/40U		[2]

PR:		kern/61671	[1]
		kern/61803	[2]
Submitted by:	Ralf Wenk <RZ-FreeBSD0401@fh-karlsruhe.de>	[1]
		Feisal Mohammed <feisal@uwi.tt>			[2]
MFC after:	1 week
2004-01-24 07:14:07 +00:00
Bill Paul 6f56639b42 Add missing newlines to some device_printf()s.
Don't do anything in ndis_get_assoc() if the link isn't up (avoids
spurrious "couldn't get bssid" messages on the console).
2004-01-24 02:48:22 +00:00
Matt Jacob e23df011da If we have ISP_ROLE_INITIATOR set, make sure that we clear ICBOPT_INI_DISABLE
from the fwoptions. Likewise, we *set* ICBOPT_INI_DISABLE if we don't have
initiator role.
2004-01-23 23:23:31 +00:00
Matt Jacob 520b6299ac add MAKE_WWN_FROM_NODE_NAME macro 2004-01-23 23:22:35 +00:00
Matt Jacob a556b68e3a Add firmware major, minor and micro revsions to the ISP_FC_GETHINFO ioctl
structure.
2004-01-23 23:22:11 +00:00
Hidetoshi Shimokawa 1398a889e6 * fwohci_pci.c
Improve error message for attach failure.

* sbp_targ.c
	- Add speed in struct sbp_targ_login.
	- Remove unnecessary htonl().
2004-01-23 17:37:09 +00:00
Mathew Kanner 3c6b655dff Sync with DFBSD v.1.16. Add new codecs IDs, fix some spelling.
Approved by:    des (interim mentor)
2004-01-23 16:38:54 +00:00
Søren Schmidt 17cafb29a0 Fix breakage in PIO multisector support. 2004-01-23 10:38:56 +00:00
John Baldwin acf7d97237 Fix the PCI attach routine to properly setup the IRQ and port resource
rid's and to deallocate resources if a failure occurs during attach.  This
patch also fixes the driver to return failure if bus_alloc_resource() for
the IRQ fails rather than panic'ing on the next line by passing a NULL
resource to bus_setup_intr().  The other attachments already do all this.

Submitted by:	Jun Su <csujun@263.net>
2004-01-22 16:07:03 +00:00
Hidetoshi Shimokawa 4c790222f6 Add missing free() in exception handlers.
Reported by:    Stanford Metacompilation research group
2004-01-22 14:41:17 +00:00
Bill Paul a6ef105236 Add suspend and resume methods. I'm not certain this work correctly
since I can't easily test them on my laptop right now, but they
should do the right thing.
2004-01-22 03:00:59 +00:00
Bill Paul d74c903a6f Add support for TCP/IP checksum offload.
No, really.
2004-01-22 02:36:34 +00:00
Bill Paul 94215c94fe Fix multicast and promiscuous mode handling for Yukon devices.
Submitted by:	Jung-uk Kim <jkim@niksun.com>
2004-01-21 22:32:15 +00:00
Hajimu UMEMOTO 7a2e32cbe3 Sync to pccarddevs 1.81. 2004-01-21 16:03:40 +00:00
Hajimu UMEMOTO a950ec6208 There is PANASONIC KXLC005 which has another product id. 2004-01-21 16:02:20 +00:00