Commit Graph

15808 Commits

Author SHA1 Message Date
Philip Paeps
0754972c5c Optimize set_origin() use in some screensavers to stop them eating
cpu power when the origin hasn't changed.

PR:		kern/100683
Submitted by:	Gareth McCaughan <gareth -dot- mccaughan -at- pobox.com>
MFC after:	3 days
2007-02-21 12:27:12 +00:00
Christian Brueffer
99baad9da2 Complete the support for altq(4).
Tested by:	J.R. Oldroyd
Reviewed by:	mlaier
Approved by:	rwatson (mentor)
MFC after:	1 week
2007-02-21 09:57:27 +00:00
Nick Hibma
814ee007c3 Initialise {transport,protocol}{,_version} fields during a PATH_INQ to avoid a
warning message.
2007-02-21 07:46:40 +00:00
Luigi Rizzo
560a65051c Rename IWI_LOCK_ASSERT to IWI_LOCK_CHECK per Sam's suggestion,
and make it print under debug.iwi control same as other debugging stuff.

Remove the device_printf() in iwi_ioctl() and replace with this:

        /*
         * wait until pending iwi_cmd() are completed, to avoid races
         * that could cause problems.
         */
        while (sc->flags & IWI_FLAG_BUSY)
                msleep(sc, &sc->sc_mtx, 0, "iwiioctl", hz);

This at least prevents what has become an almost systematic failure for my
system, presumably due to a previous iwi_cmd() not complete yet by the
time iwi_ioctl() is called.

It has been pointed to my attention that the real problem could be
calling ieee80211_ioctl() with the lock held. If that is true,
there might still be a possibility for a race condition e.g. an
interrupt coming while the ioctl is sleeping.
Need to investigate further on what changes are required to release
the lock before calling ieee80211_ioctl
2007-02-20 17:32:30 +00:00
Luigi Rizzo
484f6530e9 Address a few issues with the iwi driver, namely:
+ do not release the dma-ble region used for downloading firmware.
  This should fix the problems that some people were seeing, due to
  memory becoming too fragmented which prevented subsequent allocations
  of a suitable contiguous region of memory;

+ document the firmware format and usage in if_iwivar.h

+ use a loop to allocate the four tx rings, instead of replicating
  the body of the loop.

+ add debugging code IWI_LOCK_ASSERT() to detect missing locks.
  These only do a printf, and should go away once we figure out why
  the driver sometimes freezes the system due to a (yet unidentified)
  race condition.

+ add a device_printf() in iwi_ioctl() in certain conditions
  (see comment in the code).  This helps preventing the race condition
  mentioned above, and makes the system survive. This printf will
  also go away once fixing this bug is completed.

+ change iwi_getfw() to return 0 on success, 1 on error, consistently
  with other functions.

+ fix the argument of a sizeof() in iwi_get_firmware()

+ use le32toh() to access little-endian fields

+ simplify error handling in iwi_load_firmware() and iwi_init_locked()

The bugs fixed by this commit (the freezing one especially) are serious
enough to call for a quick MFC

MFC after: 3 days
2007-02-20 15:45:59 +00:00
Luigi Rizzo
b8c4cc421e Document the endiannes of firmware headers
(in preparation for changes in the C code).
2007-02-20 14:29:09 +00:00
Ceri Davies
e1854a84ad Correct typos containing my login name (plus one more in expr.y).
Found courtesy of a recursive grep in the wrong directory.
2007-02-18 19:48:59 +00:00
Søren Schmidt
cfaed55fd5 Add support for chipsets that has NULL'd BAR's for legacy ports.
This allows DMA to be used on a fine little geode system I got here and
most like on lots of older systems like that.

HW donated by:  Paul Ghering
2007-02-17 16:56:39 +00:00
Ariff Abdullah
885d6cfbc1 Add codec id for Sigmatel STAC9271D.
Submitted by:	Michael Fuckner <michael@fuckner.net>
2007-02-16 17:43:29 +00:00
Warner Losh
12cb46ce81 CompUSA mutli-format pcmica flash reader/writer 2007-02-16 07:51:23 +00:00
Warner Losh
a7542e03ec Updated tuple list, kinda 2007-02-16 07:00:50 +00:00
Warner Losh
7a30609254 Add poitner to JEDEC publication 106 2007-02-16 06:46:36 +00:00
Warner Losh
ca29e6e128 Two changes:
(1) change debounce period from 1s to 250ms.  This appears to be fine and
    speeds things up a little.
(2) In the middle of cbb_pcic_power_disable_socket we write 0 to the EXCA_INTR
    register to put the card into reset.  However, this turns off CSC
    interrupts for TI bridges (and maybe others).  So no further card
    insertion events would be noticed.  To compensate, after we've gone
    through the entire power down sequence, turn on EXCA_INTR_ENABLE so
    that CSC events happen.

#2 should fix the 'dead slot' problem that has been reported after
card ejection (but only 16-bit cards).
2007-02-16 05:36:59 +00:00
Warner Losh
33d7325a5f Fix typo in comment 2007-02-16 05:24:19 +00:00
Søren Schmidt
233fcaed71 Support AHCI chips where the ports are not consecutively numbered as in
some incarnations of the ICH8 chip.
Also fix the panic introduced by the last commit.
2007-02-15 21:51:42 +00:00
Luigi Rizzo
33d5497079 Cleanup and document the implementation of firmware(9) based on
a version that i posted earlier on the -current mailing list,
and subsequent feedback received.

The core of the change is just in sys/firmware.h and kern/subr_firmware.c,
while other files are just adaptation of the clients to the ABI change
(const-ification of some parameters and hiding of internal info,
so this is fully compatible at the binary level).

In detail:
- reduce the amount of information exported to clients in struct firmware,
  and constify the pointer;

- internally, document and simplify the implementation of the various
  functions, and make sure error conditions are dealt with properly.

The diffs are large, but the code is really straightforward now (i hope).

Note also that there is a subtle issue with the implementation of
firmware_register(): currently, as in the previous version, we just
store a reference to the 'imagename' argument, but we should rather
copy it because there is no guarantee that this is a static string.
I realised this while testing this code, but i prefer to fix it in
a later commit -- there is no regression with respect to the past.

Note, too, that the version in RELENG_6 has various bugs including
missing locks around the module release calls, mishandling of modules
loaded by /boot/loader, and so on, so an MFC is absolutely necessary
there.  I was just postponing it until this cleanup to avoid doing
things twice.

MFC after: 1 week
2007-02-15 17:21:31 +00:00
Scott Long
f48f00a13a Fix spurious I/O errors when under high load.
Submitted by: Erich Chen
2007-02-15 15:36:15 +00:00
Warner Losh
21de43a1ec It turns out that it is easier to not NULL out pccard and cardbus
device pointers.  They don't change as the children device drivers
come and go.  Rather, check to see if the device is attached where we
would have checked ! NULL.  This solves many asymmetries in the code
that likely could lead to crashes when loading/unloading cbb without
one or more of the expected children's driver not present.
2007-02-15 07:22:27 +00:00
Warner Losh
9d101a9556 Fix three bugs:
o When detaching all children, try really hard to get all the children
  list before giving up.  This is based on an observation by hans petter
  selasky in his usb p4 branch.
o When rescanning devices after a driver is added, abort if we can't get
  the child list with a message.
o when rescanning devices, if the reprobe/attach is successful, save the
  device for cardbus/pccard.
2007-02-15 07:13:38 +00:00
Pyun YongHyeon
71e8866707 Unbreak non-H/W VLAN extraction case.
Unlike other GigEs Yukon II always set VLAN bit when it detects VLAN
tagged packet regardless of H/W VLAN processing configuration state.
So it need to check IFCAP_VLAN_HWTAGGING bit to know whether driver
is configured to take advantage of H/W VLAN processing. If H/W VLAN
processing was disabled don't adjust received packet length such that
subsequent validation logic works for software VLAN processing.

Reported by:	bms
Tested by:	bms
2007-02-15 06:21:34 +00:00
John Baldwin
f13fc7c893 Adjust the global MSI blacklisting strategy so we don't have to explicitly
blacklist a bunch of old chipsets.  If a system contains a PCI-PCI bridge
that supports PCI-X, assume the chipset supports PCI-X.  If a system
contains a PCI-express root port, assume the chipset supports PCI-express.
If the chipset doesn't support either PCI-X or PCI-express, then blacklist
it by default.  We should now only need to explicitly blacklist PCI-X or
PCI-express chipsets that don't properly handle MSI.
2007-02-14 22:36:27 +00:00
John Baldwin
ea3f508362 - Fix an off by one error in pci_remap_msix_method() that effectively
broke the method as all the MSI-X table indices were off by one in
  the backend MD code.
- Fix a cosmetic nit in the bootverbose printf in pci_alloc_msix_method().
2007-02-14 22:32:55 +00:00
John Baldwin
4ccac64eed Catch up to MSI-X API changes. Tested with both MSI and MSI-X. 2007-02-14 22:31:21 +00:00
Jung-uk Kim
464223f762 Use bge_writereg_ind() to do global reset as we did before 1.159 for certain
chipsets.  It was causing 'firmware handshake timed out' errors for some
chips.

Discussed with:	scottl
2007-02-14 19:44:15 +00:00
Jung-uk Kim
8117907083 Fix two typos in comments. 2007-02-14 19:01:33 +00:00
Jung-uk Kim
b0e42d5c0c Fix a typo from the previous commit.
Pointed out by:	brad@openbsd.org
2007-02-14 18:21:32 +00:00
John Baldwin
8474d26b81 Add missing 'break' that in this case is harmless. 2007-02-14 17:02:15 +00:00
Ariff Abdullah
d82080b4cd Fix compilation for statically linked snd_envy24{ht}/spicds. Use explicit
struct mtx rather than void pointer.

PR:	kern/109147
2007-02-14 15:23:44 +00:00
Luoqi Chen
1a681311da The return value of aac_alloc_command() was misinterpreted in aac_ioctl_event().
Once triggered this would leak away all available commands and starve the rest
of the driver.

Reviewed by: scottl
2007-02-14 09:10:37 +00:00
Jung-uk Kim
5033133005 Fix typos in comments while I am here. 2007-02-13 00:34:32 +00:00
Jung-uk Kim
1ec4c3a889 Add BCM5701 A0/B0 CRC bug workaround. Magic values taken from Linux driver. 2007-02-12 23:58:52 +00:00
Jung-uk Kim
797b2220ae Fix style(9).
Pointed out by:	many
2007-02-12 23:33:05 +00:00
Jung-uk Kim
08bf8bb7c1 Add PHY DSP code for BCM5755M.
Obtained from:	OpenBSD
2007-02-12 22:51:25 +00:00
Jung-uk Kim
bef098d808 BCM5701 PHY cannot read-modify-write. Just re-use the magic number from DSP
init code.
2007-02-12 20:26:56 +00:00
Jung-uk Kim
7ca000fd87 Replace magic numbers with corresponding definitions. 2007-02-12 19:33:22 +00:00
Søren Schmidt
4bba89b85e Rearrange the SATA connect logic so that we so that we pickup ATAPI devices.
The rest of the logic should be in place for most supporting chipsets.
2007-02-12 17:17:31 +00:00
Matt Jacob
392695e05c add a missing piece for 2432 2007-02-10 04:00:57 +00:00
Matt Jacob
41675df008 Putative untested 2432 (PCI-E) support. 2007-02-10 03:33:09 +00:00
Lukas Ertl
c24406ad47 Add support for Huawei Technologies Mobile card (3G).
Submitted by:  Thorsten Schroeder <ths_AT_dev.io>
MFC in:        3 days
2007-02-09 15:59:28 +00:00
Warner Losh
6d2b26f4a0 Fix problem with RTL8201L PHY. From submitter:
Bugfix for the Realtek PHY driver... an RTL8201L standalone PHY
    needs different handling than the integrated ones in terms of
    speed detection.  There was a bogus test based on the parent
    device driver name string controlling which speed register to
    query.  That test began failing when the rl driver was split into
    separate rl and re drivers some time ago.  Apparently nobody ever
    noticed because the buggy code only executes if NWAY negotiation
    failed.  Since we happen to be testing with an ancient dumb hub
    rather than a modern switch, we found it.

    To fix it all, have the attach() routine notice whether we're
    dealing with an integrated PHY or an RTL8201L and store that info
    in a struct accessible to the status() routine that needs to know
    which register to query.

I touched up the fixes because they were relative to RELENG_6 and to
bring a few nits into line with style(9).

MFC After: 2 weeks
Submitted by: Ian Lepore
2007-02-08 19:16:15 +00:00
Robert Watson
7222b40265 As VPD support still causes hard hangs on boot with some hardware, add a
tunable allowing automatic parsing of VPD data to be disabled.  The
default is left as-is; if you are having problems with hard hangs at boot
due to VPD, try setting hw.pci.enable_vpd=0.  A proper architectural
solution has been under discussion for some time, but this allows me to
boot my test machines in the mean time.

Submitted by:	bz
Head nod:	jmg
2007-02-08 14:33:07 +00:00
Lukas Ertl
92fb2d84f5 Add support for another 3G card and update man page accordingly.
The patch from the PR was a little outdated w/regards to the
Vodafone vendor string.

PR:            kern/106033
Submitted by:  Volker Werth <volker_AT_vwsoft.com>
MFC in:        3 days
2007-02-04 22:14:18 +00:00
Jean-Sébastien Pédron
5a10830e1a Synaptics TouchPad seems to go back to Relative Mode after the call
to set_controller_command_byte() call; by issueing a Read Mode Byte
command, the touchpad is in Absolute Mode again.

This problem occursed at least on Asus V6V laptops.
2007-02-04 12:47:52 +00:00
Joel Dahl
5bcbb3c5e8 Orion originally wrote and added these files in 2002/2003, so with his
approval, change the copyright statement to point at him instead of
"FreeBSD, Inc".

Encouraged by:	rwatson
Reviewed by:	imp
Discussed with and approved by:	orion
2007-02-04 06:52:33 +00:00
Florent Thoumie
2b5fb13e20 Fix build (sc->dev => sc->sc_dev). 2007-02-03 21:11:11 +00:00
Rink Springer
cece26a63a Add support for the NetCell NC3000/5000 series SATA RAID cards.
Reviewed by:	sos
Approved by:	imp (mentor)
MFC after:	1 week
2007-02-03 20:12:00 +00:00
Warner Losh
df96f93d49 It turns out we were mallocing too early, so move the allocation so we
don't leak.
2007-02-03 19:11:09 +00:00
Warner Losh
5f1413947b Fix memory leak of devinfop
PR: 108719
Submitted by: Antoine Brodin
2007-02-03 16:41:55 +00:00
Warner Losh
f254d5b0d1 Fix possible memory leaks of devinfo.
PR: 108719
Submitted by: Antoine Brodin
2007-02-03 16:38:32 +00:00
Warner Losh
881c241ce3 Fix non-use, but not memory leak, of devinfop. Set the device's
description here.  The fix in the PR isn't necessary at all for memory
leaks, but we weren't setting the device description.

While I'm here, remove some of the obfuscating macros in attach.

PR: 108719
2007-02-03 16:33:47 +00:00