Commit Graph

71716 Commits

Author SHA1 Message Date
Warner Losh
62382a43c0 It turns out that the initialization is required since it sets up the
readout of the MAC address.
The 10ms delay was really needed.  Ooops.
2009-03-31 19:20:03 +00:00
Warner Losh
2365a961b1 o Minor tweaks to the AX88x90 probe routine, mostly related to comments.
o Don't run through the register initialization in the read mac routine
  for the AX88x90.  It duplicates other stuff that we do.
o Eliminate the 10ms delay after we reset the AX88x90.  We already wait for
  the appropriate bits to indicate reset is done.
2009-03-31 18:25:09 +00:00
Robert Noland
0351ecf9e4 Simplify the radeon microcode loading.
Submitted by:	Christoph Mallon
MFC after:	3 days
2009-03-31 17:52:05 +00:00
Weongyo Jeong
75b88cb05e fix a bug that it passed a incorrect flag BUS_DMA_ALLOCNOW to create
a device specific DMA tag.  On amd64 it could exhaust all of bounce
pages when bus_dma_tag_create(9) is called at malo_pci_attach() then as
result in next turn it returns ENOMEM.  This fix a attach fail on amd64.

Pointed by:	yongari
Tested by:	dchagin
MFC after:	3 days
2009-03-31 10:34:54 +00:00
Kevin Lo
2da462e383 Add another rum(4) device found in
http://www.fit-pc.com/new/whats-new.html
2009-03-31 07:40:36 +00:00
Pyun YongHyeon
bd9bede57a Partial revert r185756.
It seems that RTL8168D and RTL8102EL requires additional settle
time to complete RL_PHYAR register write. Accessing RL_PHYAR
register right after the write causes errors for subsequent PHY
register accesses.

Tested by:	george at luckytele dot com,
		Steve Wills < STEVE at stevenwills dot com >
2009-03-31 03:29:05 +00:00
Warner Losh
2b5b95c278 Go back to filtering all PHY addresses above 16 since at least two
cards still have issues with them.  Maybe this is a silicon rev?  In
any case, doing the filtering only for the AX88790 for the moment.
2009-03-31 02:50:41 +00:00
Warner Losh
f16f1caffc Hmmmm... This can't be right... But it looks like the DL100xx chips
don't have one of the clock cycles (the turn cycle) that the AX88x90
chips have.  Make this conditional.  But this seems totally crazy and
can't possibly be right.  Commit the fix for the moment until I can
explore this mystery more deeply.

On the plus side, the DL10022-based cards I have (D-Link DEF-670TXD
and SMC8040TX) work after this fix.
2009-03-31 01:59:47 +00:00
Alexander Motin
9cf4fe2ebe Integrate user/mav/ata branch:
Add ch_suspend/ch_resume methods for PCI controllers and implement them
for AHCI. Refactor AHCI channel initialization according to it.

Fix Port Multipliers operation. It is far from perfect yet, but works now.
Tested with JMicron JMB363 AHCI + SiI 3726 PMP pair.
Previous version was also tested with SiI 4726 PMP.

Hardware sponsored by: Vitsch Electronics / VEHosting.nl
2009-03-30 22:18:38 +00:00
Sam Leffler
f8ee854304 revert unintended change 2009-03-30 21:54:39 +00:00
Sam Leffler
339ccfb391 Hoist 802.11 encapsulation up into net80211:
o call ieee80211_encap in ieee80211_start so frames passed down to drivers
  are already encapsulated
o remove ieee80211_encap calls in drivers
o fixup wi so it recreates the 802.3 head it requires from the 802.11
  header contents
o move fast-frame aggregation from ath to net80211 (conditional on
  IEEE80211_SUPPORT_SUPERG):
  - aggregation is now done in ieee80211_start; it is enabled when the
    packets/sec exceeds ieee80211_ffppsmin (net.wlan.ffppsmin) and frames
    are held on a staging queue according to ieee80211_ffagemax
    (net.wlan.ffagemax) to wait for a frame to combine with
  - drivers must call back to age/flush the staging queue (ath does this
    on tx done, at swba, and on rx according to the state of the tx queues
    and/or the contents of the staging queue)
  - remove fast-frame-related data structures from ath
  - add ieee80211_ff_node_init and ieee80211_ff_node_cleanup to handle
    per-node fast-frames state (we reuse 11n tx ampdu state)
o change ieee80211_encap calling convention to include an explicit vap
  so frames coming through a WDS vap are recognized w/o setting M_WDS

With these changes any device able to tx/rx 3Kbyte+ frames can use fast-frames.

Reviewed by:	thompsa, rpaulo, avatar, imp, sephe
2009-03-30 21:53:27 +00:00
Rui Paulo
4f8cb6ff40 Fix typo in comment. 2009-03-30 21:46:50 +00:00
Rui Paulo
8407aa1494 MFP mesh11s:
Add mesh debugging bit replacing the now deprecated RADKEYS.
2009-03-30 21:41:06 +00:00
Sam Leffler
cf1c8d5f9c fake the association id so packets are not rejected in the tx path 2009-03-30 21:29:25 +00:00
Sam Leffler
584f7327f1 Remove ATH_SUPPORT_TDMA and use IEEE80211_SUPPORT_TDMA instead. It
doesn't make much sense to configure driver support w/o net80211.
Note this means ath now depends on opt_wlan.h.
2009-03-30 19:23:49 +00:00
Robert Noland
221478e4c6 We don't know what these pages are going to be used for, they should be
un-cached.  This got lost somewhere with all the bus_dma fixups.

MFC after:	3 days
2009-03-30 18:01:42 +00:00
Robert Noland
04edf5eaf1 Load the right microcode for RS780.
MFC after:	3 days
2009-03-30 17:49:21 +00:00
Warner Losh
0056b69f1f Two fixes:
(1) Delete all children when detaching to keep from adding a phy each
    driver reload.
(2) All AX88x90 chips have the RST issue.
2009-03-30 17:25:56 +00:00
Warner Losh
b1f0505378 This is a major reworking of the AX88x90 support.
o Introduce new chip_type AX88790.  There's a few places we need to know the
  exact chip for workaronds.
o Explain the AX88190 workaround for the ISR bits being stuck, and don't
  apply them to the AX88790.  The datasheet says the bits are fixed, and
  experience confirms.
o Fix mii bit-bang read code to read and discard the 'floating' bit.
o Remove empty ed_pccard_ax88x90_mii_reset routine
o Report error from mii_phy_probe
o Don't use ed_probe_Novel_generic for ax88x90 chips.  It puts them into
  an odd state sometimes.  Instead, use a more stream-lined version that
  avoids the trouble spots.  This was copied and tweaked from the original.
o Move chip reset into its own routine.
o Minor code optimiation on getting MAC address
o Add code for coping with AX88790 cards that are in power down state and
  need to be kicked before the PHY registers for the internal phy read right.
o Remove ugly cap of PHYs at 17.
o For AX88790, we need to set a special bit for accessig phy 16 (the internal
  phy) and clear it for all others according to a chip erratum.
o streamline the bit-bang code for AX88x90: the delays aren't needed according
  to the datasheet timing diagrams and also the Linux driver
o Fix minor bit definition for direction bit.
o Generally: Some comments reformatted
o Only try the toshiba probe on cards labelled as toshiba

# From another Akihabara card (this one from a few years ago from a
# friend in Japan).  Fix the Corega FEther II PCC-TXD.  This one is
# still on sale new, as of a few weeks ago.  should fix all other AX88x90
# based cards, but I have some testing left to finish on my collection...
2009-03-30 16:15:06 +00:00
Warner Losh
5fb1afd722 New PHY driver for the internal PHY found in the AX88790. There's a
number of quirks for this device, and this implements just the basics.
The 2.5s powerdown recommended in the datasheet will be next...
2009-03-30 16:01:09 +00:00
Christian Brueffer
1fa80eb15c Fix memory leak in semunload().
PR:		133064
Submitted by:	Mateusz Guzik <mjguzik@gmail.com>
MFC after:	1 week
2009-03-30 15:01:29 +00:00
Weongyo Jeong
136694a420 when it failed to inform rx/tx dma setup it should clean up allocated
dma-related buffers and tags.

MFC after:	3 days
2009-03-30 11:51:05 +00:00
Weongyo Jeong
da689ab8ca corrects a error message. 2009-03-30 11:23:14 +00:00
Weongyo Jeong
df1af10875 handles more exceptional cases when the driver failed to attach.
MFC after:	3 days
2009-03-30 08:48:33 +00:00
Konstantin Belousov
2b0b4ee359 Implement support for RTLD_NODELETE flag for dlopen() and -z nodelete
static linker option. Do it by incrementing reference count on the loaded
object and its dependencies.

Reviewed by:	davidxu, kan
2009-03-30 08:47:28 +00:00
Weongyo Jeong
dec9af5a2b fix a bug of uses after free.
Pointed by:	dchagin
MFC after:	3 days
2009-03-30 08:39:42 +00:00
Andrew Thompson
46b70f07bc Further rate limit the root wait status, it will be printed once per
root_mount_rel() wakeup.
2009-03-30 05:57:55 +00:00
Warner Losh
0b5af5520d Add PHY entry for the ASIX 88x90 internal PHYs. 2009-03-30 01:47:32 +00:00
Marcel Moolenaar
c146965cd1 Sharpen the saw:
o  PC98 uses 32-bit block numbers. Limit the scheme to 2^32-1
   blocks when the media is larger. The 32-bit block numbers
   are implicit (16-bit cylinder * 8-bit head * 8-bit sector).
2009-03-30 01:03:58 +00:00
Marcel Moolenaar
6154e492ec Sharpen the saw:
o  MBR uses 32-bit block numbers. Limit the scheme to 2^32-1
   blocks when the media is larger.
2009-03-30 00:53:46 +00:00
Marcel Moolenaar
f5f875ed84 Sharpen the saw:
o  EBR uses 32-bit block numbers. Limit the scheme to 2^32-1
   blocks when the media is larger.
o  Calculate the number of entries based on the rounded media
   size, rather than the raw media size.
2009-03-30 00:48:42 +00:00
Marcel Moolenaar
2a1c00ff2f Sharpen the saw:
o  Don't create a GPT scheme underneath another scheme when
   the probe doesn't allow it.
2009-03-30 00:33:43 +00:00
Alexander Kabaev
607fc40b04 Replace v_dd vnode pointer with v_cache_dd pointer to struct namecache
in directory vnodes. Allow namecache dotdot entry to be created pointing
from child vnode to parent vnode if no existing links in opposite
direction exist. Use direct link from parent to child for dotdot lookups
otherwise.

This restores more efficient dotdot caching in NFS filesystems which
was lost when vnodes stoppped being type stable.

Reviewed by:	kib
2009-03-29 21:25:40 +00:00
Sam Leffler
26d39e2c68 o add ic_rt to track the rate table for the current channel; this enables
calculation of packet transmit times to do things like check txop limits
o remove equivalent driver code and convert to use net80211 state
2009-03-29 21:17:08 +00:00
Sam Leffler
97fc5da03e toggling fast-frames requires clocking the state machine 2009-03-29 21:00:27 +00:00
Ed Schouten
7eac36ed3c Emulate the FIODGNAME ioctl in our 32-bit emulator.
It's quite strange that nobody reported this issue before. It turns out
functions like ttyname(), ptsname() and fdevname() don't work in
compat32. This means it't not even possible to run applications like
script(1) inside a 32-bit FreeBSD jail.

Fix this by converting 32-bit fiodgname_arg structures to their 64-bit
equivalent.

Reported by:	kris
Tested by:	kris
2009-03-29 20:09:51 +00:00
Sam Leffler
29aca94080 Eliminate ic_myaddr so changing the mac address of a device works correctly:
o remove ic_myaddr from ieee80211com
o change ieee80211_ifattach to take the mac address of the physical device
  and use that to setup the lladdr.
o replace all references to ic_myaddr in drivers by IF_LLADDR
o related cleanups (e.g. kill dead code)

PR:		kern/133178
Reviewed by:	thompsa, rpaulo
2009-03-29 17:59:14 +00:00
Edward Tomasz Napierala
6180d3185d Get rid of VSTAT and replace it with VSTAT_PERMS, which is somewhat
better defined.

Approved by:	rwatson (mentor)
2009-03-29 17:45:48 +00:00
Marius Strobl
49bbb93c07 Unbreak OF_interpret() and its standard implementation after r186347. 2009-03-29 15:10:49 +00:00
Michael Reifenberger
b1a0a22d44 Extend comment in copyright notice as requested by author.
Submitted by:	G.Otsuji
2009-03-29 13:35:20 +00:00
Alexander Motin
f7cdd867ec Fixup relative pointers after channel realloc. It fixes crash on systems
with several HDA codecs per controller.

While I am there, remove some unneeded dereferences.

Submitted by:	Tor Egge <Tor.Egge@cvsup.no.freebsd.org>
2009-03-29 07:10:52 +00:00
Robert Watson
ff8a07fda2 Add SDT DTrace probes for VFS vnode operations in the vfs:vop
provider namespace.  These are inserted dynamically into the
VOP_..._AP() functions created from vnode_if.src.  Each VOP has
entry and return probes, as arg0 the primary vnode, arg1 the
vnode operation argument structure pointer, providing access to
IN and OUT arguments, and for return probes, arg2 the return
value.

MFC after:	1 month
Sponsored by:	Google, Inc.
2009-03-29 03:30:15 +00:00
Bjoern A. Zeeb
f19dafc798 Mark the declaration of bus_space_map 'static' as the implementation is.
Follow one of the two most common indent schemes in this file.
This unbreaks a few mips kernel builds.
2009-03-28 23:24:34 +00:00
Bjoern A. Zeeb
bee7f5e646 For kernel builds reduce the impact of svnversion, just scanning
src/sys and not the entire src/ tree.

An earlier solution by peter had been comitted in r183528 and backed out
in r183566 due to problems with newvers.sh also called from other places
during world build. With the extra test this survived a make universe.
2009-03-28 23:17:18 +00:00
Ulf Lilleengen
bd9337ce80 - Add files that should have been added in r190507. 2009-03-28 21:06:59 +00:00
Sam Leffler
a51f44a7a6 enable setting the mac address of 802.11 devices 2009-03-28 17:36:56 +00:00
Ulf Lilleengen
c0b9797aa8 Import the gvinum work that have been done during and after Summer of Code 2007.
The work have been under testing and fixing since then, and it is mature enough
to be put into HEAD for further testing.

A lot have changed in this time, and here are the most important:
- Gvinum now uses one single workerthread instead of one thread for each
  volume and each plex. The reason for this is that the previous scheme was
  very complex, and was the cause of many of the bugs discovered in gvinum.
  Instead, gvinum now uses one worker thread with an event queue, quite
  similar to what used in gmirror.
- The rebuild/grow/initialize/parity check routines no longer runs in
  separate threads, but are run as regular I/O requests with special flags.
  This made it easier to support mounted growing and parity rebuild.
- Support for growing striped and raid5-plexes, meaning that one can extend the
  volumes for these plex types in addition to the concat type. Also works while
  the volume is mounted.
- Implementation of many of the missing commands from the old vinum:
  attach/detach, start (was partially implemented), stop (was partially
  implemented), concat, mirror, stripe, raid5 (shortcuts for creating volumes
  with one plex of these organizations).
- The parity check and rebuild no longer goes between userland/kernel, meaning
  that the gvinum command will not stay and wait forever for the rebuild to
  finish. You can instead watch the status with the list command.
- Many problems with gvinum have been reported since 5.x, and some has been hard
  to fix due to the complicated architecture. Hopefully, it should be more
  stable and better handle edge cases that previously made gvinum crash.
- Failed drives no longer disappears entirely, but now leave behind a dummy
  drive that makes sure the original state is not forgotten in case the system
  is rebooted between drive failures/swaps.
- Update manpage to reflect new commands and extend it with some examples.

Sponsored by:   Google Summer of Code 2007
Mentored by:    le
Tested by:      Rick C. Petty <rick-freebsd2008 -at- kiwi-computer.com>
2009-03-28 17:20:08 +00:00
Michael Reifenberger
24cd37102c Add support for Phenom (Family 10h) to cpufreq.
Its a newer version provided by the author than in the PR.

PR:		kern/128575
Submitted by:	Gen Otsuji annona2 [at] gmail.com
2009-03-28 08:54:47 +00:00
Pyun YongHyeon
06ca18c161 o Don't access VPD even if hardware advertised the capability.
It seems that some revision of controller hang while accessing
  the VPD. Because VPD access routine are unused, nuke it.
o Let TWSI reload EEPROM if VPD capability is detected. Reloading
  EEPROM will also set ethernet address so age(4) now reads AGE_PAR0
  and AGE_PAR1 register to get ethernet address. This removes a lot
  of hack and enhance readability a lot.
o Double PHY reset timeout as it takes more time to take PHY out of
  power-saving state.
o Explicitly check power-saving state by checking undocumented PHY
  registers. If link is not up, poke undocumented registers to take
  PHY out of power-saving state. This is the same way what Linux
  does. On resume, make sure to wake up PHY.
o Don't rely on auto-clearing feature of master reset bit, just wait
  1ms and check idle status of MAC.
o Add PCI device revision information in bootverbose mode.
This should fix occasional controller hang in device attach phase.

Reported by:	barbara < barbara.xxx1975 at libero DOT it >
Tested by:	barbara < barbara.xxx1975 at libero DOT it >
2009-03-28 07:39:35 +00:00
Warner Losh
84e924047d When reading via memory, read in (amount + 1) / 2 (to properly round
up) rather than amount + 1 / 2, which is the same as amount, or 2x too
many words which leads to data corruption.

# This fixes the sbdrop panics I was seeing with the Toshiba LANCT00A.
2009-03-28 06:22:11 +00:00