Commit Graph

16007 Commits

Author SHA1 Message Date
Kip Macy
7d9ca96411 add cxgb_config.h to define values that are defined in the Makefile when compiled as a
module

move prefetch out of cxgb_sge.c into header under arch conditional compilation
2007-03-14 06:35:38 +00:00
Kip Macy
1940bc694e move taskqueue_enqueue of tx clean operation out of the start path 2007-03-14 06:34:10 +00:00
Kip Macy
b9d6bc3b79 make desc_reclaimable macro safe to arbitrary arguments 2007-03-14 06:33:28 +00:00
Matt Jacob
f6a6ae8f5c Don't call isp_intr from isp_start- this seems to, in rare cases,
cause confusion with at least the 23XX chipsets where the output
queue index pointer just gets a bit whacko.

MFC after:	1 day
2007-03-14 05:58:07 +00:00
Kip Macy
cc57017c60 Add firmware for cxgb 2007-03-14 02:44:48 +00:00
Kip Macy
b6d90eb779 First of several commits for driver support for the Chelsio T3B 10 Gigabit
Ethernet adapter.

Reviewed by: scottl, sam

For those interested in the preliminary performance work see below.

Plots of mxge vs. cxgb running netpipe:

blocksize vs. bandwidth:
http://www.fsmware.com/chelsio.random/bsvsbw.gif

blocksize vs. RTT:
First of several commits for driver support for the Chelsio T3B 10 Gigabit
Ethernet adapter.

Reviewed by: scottl, sam

For those interested in the preliminary performance work see below.

Plots of mxge vs. cxgb running netpipe:

blocksize vs. bandwidth:
http://www.fsmware.com/chelsio.random/bsvsbw.gif

blocksize vs. RTT:
http://www.fsmware.com/chelsio.random/bsvstime.gif

blocksize vs. RTT for block sizes <= 10kb:
http://www.fsmware.com/chelsio.random/bsvstime_10kb.gif
http://www.fsmware.com/chelsio.random/bsvstime_10kb3.gif
2007-03-14 02:37:44 +00:00
Kevin Lo
dc0a8e318e Make it compile 2007-03-14 01:59:00 +00:00
Thomas Quinot
c9b9952154 (atapi_action): Improve error reporting by removing ATA_R_QUIET flag
from ATAPI requests. If CAM debugging is enabled, also mark ATAPI
 requests with ATA_R_DEBUG flag.

(atapi_cb): Report ATAPI timeouts to the CAM layer.
 Fix incorrect debugging traces in the presence of ATAPI errors.

PR:		kern/103602
MFC after:	2 weeks
2007-03-13 20:42:49 +00:00
Thomas Quinot
8810211656 (reinit_bus): When the ATAPI bus is reset, do not schedule an automated
CAM rescan if the ATAPI device entries have not changed.

The ATAPI bus may be reset for a variety of reasons, including any time an
ATAPI request times out. It is not necessary to rescan at the CAM level
in such a case, unless a device has appeared or disappeared, or has
otherwise changed.

PR:		kern/103602
MFC after:	2 weeks
2007-03-13 20:38:16 +00:00
Thomas Quinot
3a5f6750df (ata_completed): When REQUEST SENSE is automatically issued after a failed
ATAPI request, do not clear the ATA_R_DEBUG flag. This allows a request
 marked as requiring debug traces to produce these traces also during
 the completion of the autosense processing.

Reviewed by:	sos
MFC after:	2 weeks
2007-03-13 20:31:56 +00:00
Nick Hibma
07cc71882a In one of the previous commits I accidentally removed the enabling of the
watchdog chip.

Noticed by:	Mike Tancsa
Tested by:	Mike Tancsa
MFC after:	1 week
2007-03-13 15:54:26 +00:00
Ariff Abdullah
0585c315b7 Add AC97 inverted external amplifier quirk for ASUS A6R laptop.
PR:		kern/110244
MFC after:	3 days
2007-03-13 15:20:33 +00:00
Matt Jacob
6a7d12e1a8 Move bus_space_tag and bus_space_handle register access
tokens into the common isp_osinfo structure instead of being
in bus specific structures. This allows us to implement
a SYNC_REG MEMORYBARRIER call (using bus_space_barrier)
and also reduce the amount of bus specific wrapper structure
usages in isp_pci && isp_sbus.

MFC after:	3 days
2007-03-13 06:46:08 +00:00
Matt Jacob
9418a60cb0 Restore optr if you trash it for 24XX target mode.
MFC after:	3 days
2007-03-13 06:44:07 +00:00
Scott Long
06e83c7e86 Fix some OID names and minor style as per feedback from various people.
Also, apparently quad support is broken in the sysctl infrastructure, so don't
pretend that it works.

Submitted by: ru, bde
2007-03-13 00:41:55 +00:00
Søren Schmidt
9642d2661b Fix writes on siiprb type chips. 2007-03-12 15:34:08 +00:00
Scott Long
763757b2a4 Add MAC, RX, and TX stats reporting via sysctl. 2007-03-12 09:25:57 +00:00
Søren Schmidt
e9827ac415 Fix support for the VIA8237A SATA part.
HW sponsored by: Bob Bishop
2007-03-12 09:13:13 +00:00
Matt Jacob
46a7789ea6 Forced commit to note that the previous CVS comment is
incorrect. The MODULE_DEPENDS lines were put in (by me)
in 1.14 and removed in 1.15. The facts should be correctly
reported.
2007-03-12 05:10:29 +00:00
Scott Long
d3cf342ddb Add back in MODULE_DEPEND() lines that were lost in the rev 13 update. 2007-03-12 05:02:42 +00:00
Matt Jacob
70273f9064 Fix compilation issues found in RELENG_4 port and merge the
diffs back to -current to keep versions identical.
2007-03-12 04:54:30 +00:00
Sam Leffler
fa393cd523 allow net80211 to fillin rate sets
MFC after:	2 weeks
2007-03-11 22:43:35 +00:00
Sam Leffler
6dbd16f1cc change ic_modecaps to a bit vector and use setbit, et. al. 2007-03-11 22:37:32 +00:00
Ariff Abdullah
c0dc2ab241 Fix analog CD connectivity. HP decided to screw pinconfig settings in
their latest Compaq V3000 BIOS (revision F.22). As a result, analog CD
connectivity is gone to the oblivion. Even if they decide to fix it in
future revisions, the damage has been done.
2007-03-11 15:26:49 +00:00
Christian Brueffer
cc249a3fce my(4) doesn't need miibus(4).
Approved by:	rwatson (mentor)
Obtained from:	DragonFly
MFC after:	1 week
2007-03-11 15:20:04 +00:00
Matt Jacob
fa80feee0e feedback from RELENG_5 port 2007-03-11 01:59:44 +00:00
Matt Jacob
e48b2487a0 Fix some stupid copyright mistakes that have been there for quite some time. 2007-03-10 02:39:54 +00:00
Søren Schmidt
b9842b47e6 Add support for the Silicon Image SiI 3124 and SiI 3132.
HW donated by: Adriaan de Groot
2007-03-09 22:23:39 +00:00
Søren Schmidt
031fcf925c More SATA phy/reset cleanup and simplification.
Fix a long standing bogon in the sii_reset code.
2007-03-09 18:45:45 +00:00
Ariff Abdullah
018b991e1d Fix long standing multi playback/recording issues, caused by
excessive interrupt clock timer reset, screwing interrupt generation
for already active channels. Track moving DMA pointer and call buffer
interrupt on each blocksize boundary.

PR:		kern/109791
MFC after:	3 days
2007-03-09 05:35:20 +00:00
Jung-uk Kim
0c4a1ef8dc Add more chipset revision IDs.
Obtained from:	OpenBSD
2007-03-09 01:30:23 +00:00
Søren Schmidt
f449d80b7c Refine ahci_status to be more simple. 2007-03-08 20:21:42 +00:00
Andrew Gallatin
21b49cfcaa Update mxge's firmware from a fairly old version (1.4.6) to the most
recent version (1.4.12).

Firmware changelogs are available on Myricom's web site at:
http://www.myri.com/scs/CHANGES/CHANGES.myri10ge-firmware

Sponsored by: Myricom Inc.
2007-03-08 17:49:06 +00:00
Søren Schmidt
895671548e Cleanup the channel/phy reset code. 2007-03-08 16:39:25 +00:00
Jung-uk Kim
39153c5a23 Use correct bits to stop firmware when ASF mode is enabled. 2007-03-08 00:49:26 +00:00
Jung-uk Kim
0c8aa4eacd Fix more style(9) bugs.
- Remove some excessive parentheses around shift operators.
- Use macro instead of magic number where it is applicable.
- Change lower-case hexdecimals to upper cases to match wpaul's style.
- Revert some unnecessary line wraps and changes from the previous commit.

Pointed out by:	bde
2007-03-08 00:29:18 +00:00
Marius Strobl
33368e9fe8 Rototill the sparc64 nexus(4) (actually this brings in the code the
sun4v nexus(4) in turn is based on):
o Change nexus(4) to manage the resources of its children so the
  respective device drivers don't need to figure them out of OFW
  themselves.
o Change nexus(4) to provide the ofw_bus KOBJ interface instead of
  using IVARs for supplying the OFW node and the subset of standard
  properties of its children. Together with the previous change this
  also allows to fully take advantage of newbus in that drivers like
  fhc(4), which attach on multiple parent busses, no longer require
  different bus front-ends as obtaining the OFW node and properties
  as well as resource allocation works the same for all supported
  busses. As such this change also is part 4/4 of allowing creator(4)
  to work in USIII-based machines as it allows this driver to attach
  on both nexus(4) and upa(4). On the other hand removing these IVARs
  breaks API compatibility with the powerpc nexus(4) but which isn't
  that bad as a) sparc64 currently doesn't share any device driver
  hanging off of nexus(4) with powerpc and b) they were no longer
  compatible regarding OFW-related extensions at the pci(4) level
  since quite some time.
o Provide bus_get_dma_tag methods in nexus(4) and its children in
  order to handle DMA tags in a hierarchical way and get rid of the
  sparc64_root_dma_tag kludge. Together with the previous two items
  this changes also allows to completely get rid of the nexus(4)
  IVAR interface. It also includes:
  - pushing the constraints previously specified by the nexus_dmatag
    down into the DMA tags of psycho(4) and sbus(4) as it's their
    IOMMUs which induce these restrictions (and nothing at the
    nexus(4) or anything that would warrant specifying them there),
  - fixing some obviously wrong constraints of the psycho(4) and
    sbus(4) DMA tags, which happened to not actually be used with
    the sparc64_root_dma_tag kludge in place and therefore didn't
    cause problems so far,
  - replacing magic constants for constraints with macros as far
    as it is obvious as to where they come from.
  This doesn't include taking advantage of the newbus way to get
  the parent DMA tags implemented by this change in order to divorce
  the IOTSBs of the PCI and SBus IOMMUs or for implementing the
  workaround for the DMA sync bug in Sabre (and Tomatillo) bridges,
  yet, though.
o Get rid of the notion that nexus(4) (mostly) reflects an UPA bus
  by replacing ofw_upa.h and with ofw_nexus.h (which was repo-copied
  from ofw_upa.h) and renaming its content, which actually applies to
  all of Fireplane/Safari, JBus and UPA (in the host bus case), as
  appropriate.
o Just use M_DEVBUF instead of a separate M_NEXUS malloc type for
  allocating the device info for the children of nexus(4). This is
  done in order to not need to export M_NEXUS when deriving drivers
  for subordinate busses from the nexus(4) class.
o Use the DEFINE_CLASS_0() macro to declare the nexus(4) driver so
  we can derive subclasses from it.
o Const'ify the nexus_excl_name and nexus_excl_type arrays as well
  as add 'associations' and 'rsc', which are pseudo-devices without
  resources and therefore of no real interest for nexus(4), to the
  former.
o Let the nexus(4) device memory rman manage the entire 64-bit address
  space instead of just the UPA_MEMSTART to UPA_MEMEND subregion as
  Fireplane/Safari- and JBus-based machines use multiple ranges,
  which can't be as easily divided as in the case of UPA (limiting
  the address space only served for sanity checking anyway).
o Use M_WAITOK instead of M_NOWAIT when allocating the device info
  for children of nexus(4) in order to give one less opportunity
  for adding devices to nexus(4) to fail.
o While adapting the drivers affected by the above nexus(4) changes,
  change them to take advantage of rman_get_rid() instead of caching
  the RIDs assigned to allocated resources, now that the RIDs of
  resources are correctly set.
o In iommu(4) and nexus(4) replace hard-coded functions names, which
  actually became outdated in several places, in panic strings and
  status massages with __func__. [1]
o Use driver_filter_t in prototypes where appropriate.
o Add my copyright to creator(4), fhc(4), nexus(4), psycho(4) and
  sbus(4) as I changed considerable amounts of these drivers as well
  as added a bunch of new features, workarounds for silicon bugs etc.
o Fix some white space nits.

Due to lack of access to Exx00 hardware, these changes, i.e. central(4)
and fhc(4), couldn't be runtime tested on such a machine. Exx00 are
currently reported to panic before trying to attach nexus(4) anyway
though.

PR:		76052 [1]
Approved by:	re (kensmith)
2007-03-07 21:13:51 +00:00
Kevin Lo
32d6c6993c Use M_NOWAIT instead of M_WAITOK to cause malloc() to return NULL. 2007-03-07 05:28:42 +00:00
Marcel Moolenaar
233c5a5d6d Remove zs(4). Its functionality has been superseded by uart(4) for
a while now; including on PowerPC.
2007-03-07 00:39:13 +00:00
Jung-uk Kim
6098821ce7 Fix style(9) and consistency. 2007-03-06 20:14:48 +00:00
Jung-uk Kim
4e35d186f1 Pollute bge(4) with #if's and #ifdef's to make MFC easier.
MFC after:	3 days
2007-03-06 19:15:16 +00:00
Paolo Pisati
ec383c971f Remove a useless cast from void * to struct ppb_device *. 2007-03-06 11:44:11 +00:00
Paolo Pisati
72565ac3e8 o Wrap ppc_setup_intr() at 80.
o Fix a bit the indentation.
2007-03-06 11:36:33 +00:00
Ariff Abdullah
f0c4d27278 Enable tone / 3D controls for YAMAHA YMF743, 753 and 752 (partially).
PR:		kern/109599
Submitted by:	Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
2007-03-06 02:36:54 +00:00
Scott Long
dc3a205bc4 Better fix for the errors under high load. Returning CAM_SCSI_BUSY is almost
never correct as CAM has no real understanding of it, and will just immediately
retry the command.  This leads to undesirable cycling of the camisr as well as
a high possibility for the command to exhaust its retries before the driver
can get around to servicing it.

The better fix, as demonstrated here, is to freeze the simq and mark the
command as needing to be tried.  Then when driver can service the command,
the simq gets unfrozen.  This is correct, and documented here to help reduce
the mystery.  However, it also points out a shortcoming in CAM error handling
that makes writing drivers harder.

Submitted by: Erich Chen
2007-03-06 01:12:15 +00:00
Sam Leffler
1fba0fdc15 Change mtx's to use the formulated name as type so witness does not
complain on nested tx q lock acquisitions when processing the cab q.

MFC after:	2 weeks
2007-03-05 21:56:33 +00:00
Sam Leffler
cd196bb2d5 Kick tx after processing rx'd frames; this fixes latency issues
for processing frames from the power save queue when operating
in ap mode.  This is especially noticeable for realtime data going
to devices like voip phones.

Submitted by:	"J.R. Oldroyd" <jr@opal.com>
MFC after:	2 weeks
2007-03-05 21:53:49 +00:00
Nate Lawson
4d44d81742 Check the _TMP value for sanity also. On some systems (HP NX laptops), the
EC occasionally times out and provides bogus values (3000C).  This change
prevents those systems from prematurely shutting down while we work on the
underlying problem.  Also, bump the sanity value to 0...200C from 0...150C.
2007-03-05 21:39:53 +00:00
Thomas Quinot
1471588a2f Fix typo in comment. 2007-03-05 21:21:03 +00:00
John Baldwin
d8a4c26cde - Use constants for VPD capability register offsets.
- Add missing ()'s around return values.
2007-03-05 16:21:59 +00:00
John Baldwin
976c400776 - Flesh out list of UART simple comms programming interfaces.
- Add list of PIC base peripheral programming interfaces.
- Add VPD capability register offsets.

MFC after:	3 days
2007-03-05 16:18:31 +00:00
Ariff Abdullah
9622f4d439 Quick bandaid for possible broken multiple playback channels implementation.
Reported/Tested by:	Oliver Iberien <odilist@sonic.net>
2007-03-05 07:45:38 +00:00
Warner Losh
a9d4f3ded4 Use different wait channel name for second of two sleeps. Minor commentary
addition.
2007-03-05 05:40:24 +00:00
Warner Losh
8c6c85bef3 Reduce the number of retries to 10 from 20 for not_a_card retry test.
Add some comments to explain how 10 was picked.  20 was completely
arbitrary, at least 10 has some reasoning behind it.

Also, update the comments about how long we sleep to reflect the new,
shorter timeout we use.
2007-03-04 19:33:12 +00:00
Christian S.J. Peron
59a0d28bac Catch up the rest of the drivers with the ether_vlan_mtap modifications.
If these drivers are setting M_VLANTAG because they are stripping the
layer 2 802.1Q headers, then they need to be re-inserting them so any
bpf(4) peers can properly decode them.

It should be noted that this is compiled tested only.

MFC after:	3 weeks
2007-03-04 03:38:08 +00:00
Søren Schmidt
82f45ed29d Add support for the 3 (PATA) channel on the VIA 6421 chip.
HW donated by: Fabian Peters
2007-03-01 21:18:27 +00:00
Ruslan Ermilov
9620e9dd97 Revert previous change and take back a pointy hat. 2007-02-28 09:04:46 +00:00
Ruslan Ermilov
7b6b0e6d24 Fix panic on boot caused by setting up a NULL interrupt handler.
Submitted by:	Goran Gajic
Pointy hat to:	piso
2007-02-28 05:29:23 +00:00
Warner Losh
76ddd31f5a Some USB mass storage devices return the number of sectors in response
to a READ_CAPACITY request rather than the maximum sector (off by one
problem).  This causes a huge cascade of errors as the geom tasting
code tries to read the last sector (which isn't really there in the
face of this error).  automated tools that manipulate disk labels and
such also have issues.

Create a new quirk READ_CAPACITY_OFFBY1 and add a quirk for the
SanDISK ImageMate that I have that suffers from this problem (the
SDDR-31).  It intercepts the READ_CAPACITY response and adjusts it
from number of sectors to max sector for devices with this quirk.

Reading the Linux source suggests that there are a host of
other devices with this issue, including iPods and some popular
cameras.  I've not added quirks for them, since I don't have the
devices in front of me to test.
2007-02-27 22:33:50 +00:00
Warner Losh
9995cc7a29 Entries sorted by id number, not name 2007-02-27 22:27:53 +00:00
John Baldwin
3d4c1b5744 Use taskqueue_drain() to wait for any pending tasks to complete rather
than just pausing for a second.
2007-02-27 18:45:37 +00:00
John Baldwin
8410d79dd1 Use pause() instead of tsleep()'s on the softc pointer that have no
corresponding wakeups.  Also, at least some of the comments nearby indicate
that these are fixed-length I/O sleeps.
2007-02-27 17:27:23 +00:00
John Baldwin
4d70511ac3 Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
John Baldwin
f36511e7f8 Use pause() rather than using tsleep() on a dummy variable. 2007-02-27 17:19:33 +00:00
John Baldwin
5f6fcd82a2 Always protect the kthread flags with the lock and close a race with
module unload and kthread_exit().

MFC after:	3 days
2007-02-27 17:16:52 +00:00
Paolo Pisati
fe59e41138 Add proper return codes to zs_intr() filter, and fix accordinlgly zs_intr()
prototype.
2007-02-27 15:31:11 +00:00
Thomas Quinot
4647ebfc01 (cam_rescan): Do not reference ccb->ccb_h.path in CAM_DEBUG call before
it is initialized; use path instead.

This change fixes a panic when using atapicam in conjunction with CAMDEBUG,
which has been described under kern/103602.

Thanks to Josh Carroll <josh.carroll@gmail.com> for providing the traces
that allowed identifying this problem.

PR:		kern/103602
MFC after:	1 week
2007-02-27 09:00:51 +00:00
Nate Lawson
ef2374f700 Rework EC I/O approach. Implement burst mode, including proper handling of
case where it asynchronously exits burst mode on its own.  Handle different
values of hz in sleep loop.  Provide more debugging options to tune EC
behavior.  These tunables/sysctls may be temporary and are not for user
access if the EC is working properly.  Burst mode is now on by default for
testing and the poll interval has been increased from 100 to 500 us and
total timeout from 100 to 500 ms.

Hopefully this should be the first step of addressing reports of timeout
errors during battery or thermal access, especially on HP/Compaq laptops.
It is reasonably stable and should not cause a loss of functionality or
performance on systems that were previously working.  Testing shows an
increase of responsiveness by ~75% on one system.

PR:		kern/98171
2007-02-27 00:14:20 +00:00
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
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
Warner Losh
9b4f44b31e Fix memory leak of devinfo. The leak itself was documented in
PR/108719, but there's a simpler fix: free it after it is used, and
then get rid of the redundant frees this causes.  Other leaks in this
PR not yet fixed.

While I'm here, remove NetBSD/OpenBSD code and some of the portability
#defines that were getting in the way of understanding this code.  The
devinfo bug was harder to spot because one needed to know that
device_set_desc_copy() was used inside of one of them (one that didn't
take an argument!).

Prefer device_printf(sc->sc_dev, "...") to printf("%s:...",
device_get_nameunit(sc->sc_dev)).  This saves almost 300 bytes.

PR: 108719
Submitted by: Antoine Brodin
2007-02-03 16:19:28 +00:00