Commit Graph

15817 Commits

Author SHA1 Message Date
Matt Jacob
336b56124b There is a problem in setting/getting 'options'- if we check things
early, we haven't set board type, so we can't correctly check for
some options.  Fix this by splitting option setting/getting into
generic, pci and then later board specific, option setting/getting.

This was noticed when setting 'iid' (or 'hard loop id') didn't work
all of a sudden.

Noticed by: Mike Drangula (thanks!) via Jung-uk Kim (thanks!)
2007-02-23 05:42:41 +00:00
Matt Jacob
1b960c0b77 Be a bit more restrictive about printing out 'bad' pdb entries
during loop rescans. They're not bad so much as unstable, so
don't print this stuff out unless ISP_LOGSANCFG is set.
2007-02-23 05:39:58 +00:00
Nate Lawson
c7c42f0abb Improve readability of the version string. 2007-02-22 05:59:23 +00:00
Søren Schmidt
129230b816 Update copyright headers. 2007-02-21 19:07:19 +00:00
Søren Schmidt
4471f79eb4 Try again with supporting AHCI chipsets with partly implemented ports. 2007-02-21 19:03:34 +00:00
John Baldwin
f7a66f06ec Restore support for the 5706C bce(4) phy that was broken during the
addition of SerDes support.  According to the docs, the 5706C and 5708C
phys are supposed to use the same MII model that is separate from the
SerDes parts, but the 5706C actually uses the MII model of the SerDes
parts.  To fix this, readd the old 5706C entry to miidevs and add a
special check in brgphy_probe() for phys that match the 5706C ID.  If
the phy is supported by the gentbi(4) driver, then it's a SerDes phy, so
we fail the probe and let gentbi(4) grab it.  Otherwise, it's a 5706C phy,
so we let brgphy(4) grab it.

In coordination with:	dwhite
2007-02-21 18:17:44 +00:00
Andrew Gallatin
b824b7d86a Work around a firmware bug where broadcast frames would be incorrectly
treated as multicast frames and filtered, but when only when "adopting"
running firmware.  By "adopting", I mean using pre-existing firmware
loaded from eeprom at PCI reset, rather than firmware loaded by the
driver.
2007-02-21 17:34:05 +00:00
Søren Schmidt
7d5609f105 Be a little less stringent in getting progress report data. 2007-02-21 14:06:51 +00:00
Søren Schmidt
ceeb99652d Temporarily disable the support for some incarnations of the ICH8 chip that has
non consecutively numbered ports.
This should fix current SATA problems.
Support AHCI chips where the ports are not consecutively numbered as in
some incarnations of the ICH8 chip.
2007-02-21 14:05:57 +00:00
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