Commit Graph

15839 Commits

Author SHA1 Message Date
Warner Losh
3a5e8cefd3 mii_phy_dev_probe returns its third argument on match, not 0, so pass 0
in if we're going to test against 0.

Noticed by: marius@
2007-02-26 04:48:24 +00:00
Paolo Pisati
3b1afd0f92 Catch up with bus_setup_intr() modification and garbage collect two
references to INTR_FAST.
2007-02-25 15:02:03 +00:00
Alexander Leidinger
8f981688dd semi-automatic style(9) 2007-02-25 13:51:52 +00:00
Ariff Abdullah
b88d63a8ea Fix ALC883 microphone / recording issues. Setting high(er) VRef on
(external) microphone pin tend to screw it. Internal microphone (found
on several laptops) still need high VRef.

Tested by:	Pietro Cerutti <pietro.cerutti@gmail.com>
          	lenix <irc.freenode.net>
2007-02-25 06:17:56 +00:00
Sam Leffler
16d84e0140 don't call ath_reset when processing sysctl's before the device
is marked running; we don't have all the needed state in place

Noticed by:	Hugo Silva <hugo@barafranca.com>
MFC after:	1 week
2007-02-24 23:23:29 +00:00
Sam Leffler
8debcae44f set the antenna switch when fixing the tx antenna using the
dev.ath.X.txantenna sysctl; this is typically what folks
want but beware this has the side effect of disabling rx
diversity

MFC after:	2 weeks
2007-02-24 23:12:58 +00:00
Warner Losh
e2ae5821fe exca->pccarddev should always be non-null now. Only call it when the
device is actually attached.
2007-02-24 15:56:06 +00:00
Matt Jacob
5f53837698 Redo previous newbus related change to be kinder to
multi-release support.
2007-02-23 23:13:46 +00:00
John Baldwin
6e50e38fcc Use tsleep() rather than msleep() with a NULL mtx parameter. 2007-02-23 23:06:10 +00:00
John Baldwin
4a50bbc03e Whitespace fix. 2007-02-23 23:05:31 +00:00
Matt Jacob
af4394d40a Don't attempt to load illegal hard loop addresses into
an ICB. This shows up on card restarts, and usually for
2200-2300 cards. What happens is that we start up,
attempting to acquire a hard address. We end up instead
being an F-port topology, which reports out a loop id
of 0xff (or 0xffff for 2K Login f/w). Then, if we restart,
we end up telling the card to go off an acquire this loop
address, which the card then rejects. Bah.

Compilation fixes from Solaris port.
2007-02-23 21:59:21 +00:00
Paolo Pisati
e251ed48e9 o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Approved by: re (implicit?)
2007-02-23 20:11:27 +00:00
Ariff Abdullah
5583760956 - Revert arguments for several functions to pre bus_get_dma_tag()
changes. Each softc contains information about their own device_t,
  use that instead.
- bus_setup_intr() -> snd_setup_intr().
2007-02-23 19:41:16 +00:00
Ariff Abdullah
2cc08b748c - Compile time compatibility for pre/post newbus API (intr filter)
changes. This should ease the job of maintaining codebase since much
  of the regression tests are done across os versions.
- bus_setup_intr() -> snd_setup_intr().
2007-02-23 19:40:13 +00:00
Ariff Abdullah
78bb065b84 Use snd_setup_intr() instead of bus_setup_intr() , like other drivers. 2007-02-23 19:39:06 +00:00
Warner Losh
21ab16bd5b Catchup with filters 2007-02-23 19:34:52 +00:00
Warner Losh
6b73b37b95 Catchup to filters by piso. 2007-02-23 19:27:49 +00:00
John Baldwin
a96255b62d Use 'pause' in several places rather than trying to tsleep() on NULL (which
triggers a KASSERT) or local variables.  In the case of kern_ndis, the
tsleep() actually used a common sleep address (curproc) making it
susceptible to a premature wakeup.
2007-02-23 16:25:08 +00:00
Paolo Pisati
c2dfbfc5db o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

  o add an int return code to all fast handlers

  o retire INTR_FAST/IH_FAST

  For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

  Approved by: re (implicit?)
2007-02-23 15:55:37 +00:00
Alexander Leidinger
0b989078d7 MFp4 (114068):
Use bus_get_dma_tag() to obtain the parent DMA tag to make the drivers
        a little bit more non-ia32/amd64 friendly.

        There is no man page for bus_get_dma_tag, so this is modelled after
        rev. 1.62 of src/sys/dev/sound/pci/es137x.c by marius.

        Inspired by:	commit by marius
2007-02-23 13:47:34 +00:00
Paolo Pisati
ef544f6312 o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@
2007-02-23 12:19:07 +00:00
Matt Jacob
ffcf6651a0 Use the new xpt_rescan function to truly now have dynamic
attachment of new devices that arrive (and we notice them
via async Fibre Channel events). We've always had the
right thing (of sorts) happen when devices go away- this
is the corollary function that makes multipath failover
actually work.

MFC after:	2 weeks
2007-02-23 05:51:57 +00:00
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