Commit Graph

19011 Commits

Author SHA1 Message Date
Andrew Thompson
5cbbd666e1 Catch up with usb2_config struct layout changes. 2009-04-05 18:26:19 +00:00
Andrew Thompson
9f2b42e596 MFp4 //depot/projects/usb@160056
Remove code for unused and unlikely quirk, "uq_power_claim"

Submitted by:	Hans Petter Selasky
2009-04-05 18:22:13 +00:00
Andrew Thompson
afa07055be MFp4 //depot/projects/usb@160052
Wait until line configuration is complete before starting data transfers.

Submitted by:	Hans Petter Selasky
2009-04-05 18:22:03 +00:00
Andrew Thompson
de967835e0 MFp4 //depot/projects/usb@159995
- add support for more complicated HID descriptors which can have multiple
  definitions of the same field.
- remove old modulo patch in ums, which I think is due to bad HID parsing,
  which should be fixed now.

Reported by:	netchild
Submitted by:	Hans Petter Selasky
2009-04-05 18:21:51 +00:00
Andrew Thompson
03797f3300 MFp4 //depot/projects/usb@159948
Add more debugging output on enumeration failures.

Submitted by:	Hans Petter Selasky
2009-04-05 18:21:31 +00:00
Andrew Thompson
4565300d56 MFp4 //depot/projects/usb@159946
Some cancelable flags are always true.  Substitute these away. These cancelable
flags were mostly useful with the root HUB which is now handled differently.

Submitted by:	Hans Petter Selasky
2009-04-05 18:21:21 +00:00
Andrew Thompson
3b01d5130c MFp4 //depot/projects/usb@159926
Minor code factorisation in atmegadci.c

Submitted by:	Hans Petter Selasky
2009-04-05 18:21:08 +00:00
Andrew Thompson
c48fb077ea MFp4 //depot/projects/usb@159925
Cast variables properly for non-32-bit platforms.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:58 +00:00
Andrew Thompson
3930731567 MFp4 //depot/projects/usb@159922
Refactor how we interface with the root HUB. This cuts around 1200 lines of
code totally and saves one thread per USB bus.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:49 +00:00
Andrew Thompson
4eae601ebd MFp4 //depot/projects/usb@159909
- make usb2_power_mask_t 16-bit
- remove "usb2_config_sub" structure from "usb2_config". To compensate for this
  "usb2_config" has a new field called "usb_mode" which select for which mode
  the current xfer entry is active. Options are: a) Device mode only b) Host
  mode only (default-by-zero) c) Both modes.  This change was scripted using
  the following sed script: "s/\.mh\././g".
- the standard packet size table in "usb_transfer.c" is now a function, hence
  the code for the function uses less memory than the table itself.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:38 +00:00
Andrew Thompson
3b52b6f172 MFp4 //depot/projects/usb@159908
Reduce the amount of memory used by better sizing buffer arrays.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:24 +00:00
Andrew Thompson
51ec16035f MFp4 //depot/projects/usb@159897
Add new endpoint direction values for use with usb2_config

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:13 +00:00
Andrew Thompson
63521bbc5a MFp4 //depot/projects/usb@159871
- bugfixes after the memory usage reduction patch
- Use "udev->pipes_max" instead of USB_EP_MAX
- Use correct "bmRequestType" for getting the config descriptor.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:03 +00:00
Andrew Thompson
bdd4120608 MFp4 //depot/projects/usb@159866
- memory usage reduction by only allocating the required USB pipes and USB
  interfaces.
- cleanup some USB parsing functions to be more flexible.

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:52 +00:00
Andrew Thompson
0ed53d4515 MFp4 //depot/projects/usb@159864
Fix possible deadlock with UGEN at detach.

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:42 +00:00
Andrew Thompson
dab47558c8 MFp4 //depot/projects/usb@159863
Speed up the endpoint descriptor search

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:30 +00:00
Andrew Thompson
7efaaa9a91 MFp4 //depot/projects/usb@159811
First patch in a series of memory save patches.

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:19 +00:00
Andrew Thompson
ab32485fd9 MFp4 //depot/projects/usb@159806
Properly name usb2_uref_location() so that it is not confused with
usb2_unref_location() .

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:10 +00:00
Andrew Thompson
9e6e0ec449 MFp4 //depot/projects/usb@159797
Remove unused field in "struct usb2_pipe".

Submitted by:	Hans Petter Selasky
2009-04-05 18:19:00 +00:00
Andrew Thompson
684e3f2245 MFp4 //depot/projects/usb@159700
Get rid of the last CALLOUT_RETURNUNLOCKED reference.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:47 +00:00
Andrew Thompson
72b532e501 MFp4 //depot/projects/usb@159677
Remove redundant locking.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:36 +00:00
Andrew Thompson
eb846b4eb5 MFp4 //depot/projects/usb@159674
Fix more corner cases around reception of SETUP packets.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:25 +00:00
Andrew Thompson
f3464815ee MFp4 //depot/projects/usb@159673
Fix a corner case around stalling SETUP packets in device side mode.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:16 +00:00
Andrew Thompson
df075012e8 MFp4 //depot/projects/usb@159671
Fix interrupt register setting on the atmegadci controller.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:07 +00:00
Andrew Thompson
01e1df136a MFp4 //depot/projects/usb@159562
Reapply r190173 with compilation fixed on 64bit arches.

Submitted by:	Hans Petter Selasky
2009-04-05 18:18:01 +00:00
Attilio Rao
4060f1bbd0 - Add the support for the Asus A3F and A3E device
- Fix style for A3N and for a comment

Submitted by:	Akira Funahashi <funa@funa.org>
Tested by:	Marcin Nowak <marcin.nowak@simplusnet.pl>,
		Diego Sardina <diego.sardina@gmx.com>
PR:		kern/128634
2009-04-04 17:01:32 +00:00
Weongyo Jeong
dc60165b73 Add uath(4) wireless USB driver for Atheros AR5005UG and AR5005UX
chipsets.

Reviewed by:	sam
2009-04-04 11:23:00 +00:00
Nathan Whitehorn
95b2008950 The Serverworks SATA chipsets used in Apple G5 systems require requiring
the ATA status register with a 4-byte read request. This updates it, and
subsequent 1-byte reads will return the correct result.

This commit adds a hack to do this, which is currently ifdef'd powerpc,
although Linux and Darwin do this unconditionally on all platforms.
2009-04-04 00:26:01 +00:00
Nathan Whitehorn
1c96bdd146 Add support for 64-bit PowerPC CPUs operating in the 64-bit bridge mode
provided, for example, on the PowerPC 970 (G5), as well as on related CPUs
like the POWER3 and POWER4.

This also adds support for various built-in hardware found on Apple G5
hardware (e.g. the IBM CPC925 northbridge).

Reviewed by:    grehan
2009-04-04 00:22:44 +00:00
Andrew Thompson
626fc9fe3d Add a how argument to root_mount_hold() so it can be passed NOWAIT and be called
in situations where sleeping isnt allowed.
2009-04-03 19:46:12 +00:00
Robert Noland
27b31641fb Add support for RV790 (HD 4890) asics
MFC after:	3 days
2009-04-03 19:23:14 +00:00
Robert Noland
47c63e764d A little more cleanup from AMD, if we don't have the right microcode
there is no reason to mess with the chip.

MFC after:	3 days
2009-04-03 19:21:39 +00:00
Stanislav Sedov
c130439940 - Fix spacing in the comment.
Reported by:	jhb
2009-04-03 13:35:54 +00:00
Stanislav Sedov
3dc489ee95 - Correct the comment.
MFC after:	3 days
2009-04-03 10:15:00 +00:00
Warner Losh
bd8536f83a Remove more debug... 2009-04-03 02:28:11 +00:00
Warner Losh
ab4e6b4899 Retire two flags that haven't been used since OLDCARD was retired
(well, since before OLDCARD was retired, since I removed their use
somewhat before that).
2009-04-02 19:27:56 +00:00
Warner Losh
11a77295d3 Kill debug that crept in. 2009-04-02 18:11:21 +00:00
Warner Losh
f43675aea8 Minor tweaks in the names to match the chips more closely. 2009-04-02 18:02:00 +00:00
Warner Losh
42e607776b Minor DLINK DL100xx support tweaks:
The DIROUT bit difference between the 19 and 22 is annoying.  We can
set both bits on both parts without ill effect.  Use this trick to
simplify the code.

The DELAYS in the MII bus bit-bang code for the DL100xx parts aren't
needed.  Eliminate them.
2009-04-02 17:15:49 +00:00
Warner Losh
3ef95f9cb7 The AX88190 has 64k of external SRAM, of which 62k can be used for
packet data.  However, the AX88190A moves this on-chip and reduces it
to the more traditional 16k from 16k-32k.  The AX88790 follows the
'190A.  Probe memory above 32k to see which flavor of the '190 we have
and use the extra memory if we have it.

Eliminate the kludgy read eeprom for the ID code.  It really is just a
memory read at location 0x400, so just use that instead.  Makes the
code easier to understand as well as eliminates some magic numbers.
2009-04-02 17:08:54 +00:00
Warner Losh
4065f42763 Force an autonegotiation at attach time for all the attached PHYs for
ed cards.  There's a number of minor nits in a lot of the PHYs on the
PC Cards that use the Axis AX88190 or DLink DL10019 and DL10022 chips.
Forcing the autonegotiation doesn't seem to cause problems on the
cards that have sane PHYs, but makes several cards I have work without
further workarounds.

I'm not 100% sure that kicking the PHY and resetting them is the right
thing to do on the media change callback.  Other NICs seem to need
this and do similar things.
2009-04-02 16:58:45 +00:00
Alexander Motin
cb11662602 Add some more logic for AD1986A codec input tracing. Use mic preamplifier
only for mic-type inputs. This gives better chances to use it.

Change default configuration for some AD1986A codec based ASUS boards,
use it also for ASUS P5PL2 board. This makes front mic preamplifier working.

Tested by:	Vadim Frolov <frolov@frolov.ck.ua>
2009-04-01 18:55:08 +00:00
Doug Rabson
3e33218d77 Fix the Xen build for i386 PV mode. 2009-04-01 17:06:28 +00:00
Warner Losh
b54b7a7334 Add additional data on the MIIBUS WTF that I committed earlier. 2009-03-31 19:23:59 +00:00
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
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
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
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
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
Warner Losh
0b5af5520d Add PHY entry for the ASIX 88x90 internal PHYs. 2009-03-30 01:47:32 +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
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
Marius Strobl
49bbb93c07 Unbreak OF_interpret() and its standard implementation after r186347. 2009-03-29 15:10:49 +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
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
Warner Losh
669697b4ea It turns out that the Toshiba LANCT00A PC Card is really like the
Toshiba PCETC ISA card, and even has the same board type code in the
card ID (0x14).  So, for this card, call ed_probe_WD80x3_generic after
setting things up apropriately.  This makes the card attach and kinda
work (I'm seeing panics in sbdrop).  Since history has shown that the
WD80x3 probe routine is dangerous, only do it for this card.  Also,
disable the memory range check to make sure it is an valid ISA memory.
I think that it is bogus, but I'm not 100% sure, for these cards.

I removed probing for the WD80x3 in 2005 when I added support for the
AX88x90 and DL100xx cards since none of my cards had ever matched it
and PAO3 removed it and none of the cards in their database died.

It is possible there are other quirks about this card too, since no
other open source OS supports it, or even claims to support it.  But
it was a fun half hour hack...
2009-03-28 04:56:56 +00:00
Warner Losh
5b4fb02615 Sort NECINFORTIA correctly. 2009-03-27 20:40:17 +00:00
Warner Losh
b4de4d78e7 Add bromax axnet based cards to the mix. This was harvested from the linux
driver.  Not sure who sold it/rebadged it.

Add stub entries for Mitsubishi B8895 and Toshiba LANCT00A to the
driver with a comment that they don't work /* NG */.[*] These are
DP83902A based cards, which should work, but don't seem to.  Likely
they are from the days before the ne2000 roamed the earth and use a
non-standard hookup (see if_ed_isa or if_ed_cbus for some examples).
Unless I happen to stumble into the right one, these may never work,
but I'm tired of omitting them from commits.

[*] The Japanese adopted OK from English, but also use NG for its
opposite.
2009-03-27 19:15:28 +00:00
Warner Losh
0324af86de Harvest a previously unknown Bromax design based on the AX88x90 from
the Linux axnet driver.
2009-03-27 19:08:15 +00:00
Andrew Thompson
b3e9a2aaac The buffer start and end phys addresses should be 0x0 for an OHCI zero length
packet, this fixes LS/FS devices on the Gateworks 2348 XScale board.

Reviewed by:	HPS
2009-03-27 16:56:01 +00:00
Juli Mallett
607158eb35 Put the "%d retries" debug message in the transmit path behind WPI_DEBUG_TX
rather than behind a seemingly accidental constant likely left over from one of
the related drivers which uses log levels rather than per-facility debugging
flags.  This should get rid of contextless messages on the console for people
who have not set (or cleared the default) debugging flags.
2009-03-27 05:44:53 +00:00
Juli Mallett
fcec677d3d o) Check that no overrun or CRC errors were encountered in receiving a
packet.  Linux, OpenBSD and our iwn(4) all do this.  It also results in
   a huge performance improvement (and the rejection of a fair number of
   apparently-bad packets on receive) on my hardware.
o) Like the wpi(4) driver in OpenBSD, and like our iwn(4), also drop runt
   packets.
o) Don't bother doing IFQ_POLL and then IFQ_DRV_DEQUEUE, just do
   IFQ_DRV_DEQUEUE outright.  This is more similar to how OpenBSD and our
   iwn(4) work.

Reviewed by:	sam
2009-03-27 03:17:25 +00:00
John Baldwin
ea66717737 Move the code to update cpu_cx_count out of acpi_cpu_generic_cx_probe() and
into acpi_cpu_startup() which is where all the other code to update this
global variable lives.  This fixes a bug where cpu_cx_count was not updated
correctly if acpi_cpu_generic_cx_probe() returned early.

PR:		kern/108581
Debugged by:	Bruce Cran
Reviewed by:	avg, njl, sepotvin
MFC after:	3 days
2009-03-26 21:10:35 +00:00
Warner Losh
ba32f0ff83 Allow the attach routine to fail gracefully and not panic the system. 2009-03-26 17:36:19 +00:00
Doug Ambrisko
d2b2128a28 Add stuff to support upcoming BMC/IPMI flashing of newer Dell machine
via the Linux tool.
     -  Add Linux shim to ipmi(4)
     -  Create a partitions file to linprocfs to make Linux fdisk see
        disks.  This file is dynamic so we can see disks come and go.
     -  Convert msdosfs to vfat in mtab since Linux uses that for
        msdosfs.
     -  In the Linux mount path convert vfat passed in to msdosfs
        so Linux mount works on FreeBSD.  Note that tasting works
        so that if da0 is a msdos file system
                /compat/linux/bin/mount /dev/da0 /mnt
        works.
     -  fix a 64it bug for l_off_t.
Grabing sh, mount, fdisk, df from Linux, creating a symlink of mtab to
/compat/linux/etc/mtab and then some careful unpacking of the Linux bmc
update tool and hacking makes it work on newer Dell boxes.  Note, probably
if you can't figure out how to do this, then you probably shouldn't be
doing it :-)
2009-03-26 17:14:22 +00:00
Robert Noland
b0f6d6b6bb Fix up waiting on vblank again... This reverts a last minute change that
I made on the last patch, it seems to upset suspend/resume and shutdown.

MFC after:	3 days
2009-03-26 02:10:18 +00:00
Warner Losh
7f01d0bfcd Tweak comments. 2009-03-25 22:21:53 +00:00
Warner Losh
7bd7880964 Add RIOS PCCARD 3. 2009-03-25 22:21:38 +00:00
Warner Losh
a47bf9d7df RIOS Systems co was naughty and used a 'random' id. Use it with the
PCCARD3 name to describe the RIOS PC Card III Ethernet that I have.
2009-03-25 22:20:36 +00:00
Warner Losh
f066fc09ea It appears that the TDK LAK CD011 works with fe driver. I don't have
a dongle for the card, but it passes the sanity testsin the
probe/attach routines and returns the correct MAC address.
2009-03-25 22:12:07 +00:00
Warner Losh
a8eaa9a1b4 Another akihabra find: Mitsubishi B8895. 2009-03-25 07:26:24 +00:00
Pyun YongHyeon
79dd979a7d Fix typo. 2009-03-25 07:05:23 +00:00
Xin LI
d8d1cb5b8f Use __packed from cdefs.h
Submitted by:	pyunyh
Reviewed by:	Shaowei WANG <wsw1wsw2 gmail com>
MFC after:	2 weeks
2009-03-25 06:27:56 +00:00
Robert Noland
24c6d24b27 Rework the management of vblank interrupts a bit.
When a vt switch occurs the irq handler is uninstalled.  Interrupts
and the state tracking of what was enabled/disabled wasn't working
properly.  This should resolve the reports of "slow windows" after a
vt switch, among other things.  The radeon 2d driver seems to work a
bit more correctly than the Intel driver.  With the Intel driver,
vblank interrupts will be enabled at system startup and will only
be disabled after an additional modeset (vt switch, dpms, randr event).

With this patch, I am able to run glxgears synced to vblank and
vt switch while it is running without ill effects.

MFC after:	3 days
2009-03-25 01:50:56 +00:00
Robert Noland
a13575a303 Intel handled the management of the breadcrumb counter inconsistently.
Make sure that we always handle it the same way.

MFC after:	3 days
2009-03-25 01:44:16 +00:00
Robert Noland
eccb3bb8f6 The GART allocations are a propery of the gart, not of scatter-gather
memory.  Track them in the appropriate structure.

MFC after:	3 days
2009-03-25 01:41:56 +00:00
Xin LI
e88ad97fcd Use __attribute__((packed)) for the structure so that hptiop management
utility would work.

Submitted by:	Shaowei WANG <wsw1wsw2 gmail com>
MFC after:	2 weeks
2009-03-25 00:57:09 +00:00
Weongyo Jeong
c4f82f895d set NULL after free to avoid duplicate free.
Tested by:	Ganbold <ganbold_at_micom.mng.net>
2009-03-24 04:20:17 +00:00
Sam Leffler
aa28501a67 fix build w/ AH_DEBUG 2009-03-24 00:09:35 +00:00
Juli Mallett
1b344bf7d7 Remove gratuitous unlock in error case.
Reviewed by:	sam
2009-03-24 00:08:58 +00:00
Jung-uk Kim
0755473ba2 Add a function to reset system time after resuming, which will be used
by amd64 shortly.  It can be turned off by setting "debug.acpi.reset_clock"
tunable to zero.
2009-03-23 22:12:33 +00:00
Jung-uk Kim
d42f0ad883 Check whether devd is running before calling resume notifier and
reshuffle code to reduce unnecessary locking coverage.
2009-03-23 22:06:09 +00:00
George V. Neville-Neil
0c1ff9c605 Minor updates to the Chelsio driver, including removing an LOR.
Submitted by:	Navdeep Parhar at Chelsio
Reviewed by:	gnn
MFC after: 	3 weeks
2009-03-23 19:58:26 +00:00
John Baldwin
f7c701d528 Reenable 64-bit DMA for twa(4) controllers, but use a boundary of 4GB to
prevent individual transactions from crossing a 4GB address boundary.  Due
to bus_size_t type limitations, the driver uses a 2GB boundary in PAE
kernels.

Reviewed by:	scottl
MFC after:	1 week
2009-03-23 19:27:23 +00:00
Andrew Thompson
91f72cedda Fix order of debug printf items, addr and config# were swapped. 2009-03-23 19:10:38 +00:00
John Baldwin
1241692334 Release driver lock at the end of the watchdog routine instead of trying to
acquire it again.

Submitted by:	bland
MFC after:	3 days
2009-03-23 17:51:07 +00:00
Marius Strobl
c9ffd9f058 - Ensure that INTx isn't disabled, as these chips apparently have a
quirk requiring it to be enabled even when using MSI. This makes
  the latter work again after r189285.
- Remove a comment which no longer applies since r190194.
2009-03-23 14:36:50 +00:00
Pyun YongHyeon
6d6588a152 Togging ALLMULTI does not require controller reset so have Rx
filtering handle this. Introduce a new function msk_rxfilter that
handles Rx filter configuration and multicast setup as well as
promiscuous mode. This simplifies code a lot.
Promiscuous mode always have preference to any other Rx
filtering so don't disable the mode when ALLMULTI is set.
2009-03-23 05:46:28 +00:00
Alexander Kabaev
62a5f39429 Do not pass uninitialized data buffer to devctl_queue_data function.
This was botched in revision 190191.
2009-03-23 01:24:17 +00:00
Pyun YongHyeon
df284b3c3a Fix inversed logic. pci_find_extcap() returns 0 when it finds
specified capability.
2009-03-23 00:27:46 +00:00
Robert Noland
746871c800 Fix up the flags to bus_dmamem again. The man page incorrectly showed
the BUS_DMA_NOCACHE flags as being a valid flag for load instead of alloc.

Discussed with:	kib
MFC after:	3 days
2009-03-22 20:58:29 +00:00
Andrew Thompson
2989a67790 Set the endpoint on the preallocated fifo so it doesnt get matched as an
endpoint fifo.

Reported by:	Pieter de Goeje
2009-03-22 17:09:56 +00:00
Warner Losh
e952f9cf75 NO_INQUIRY is wrong for this device. Alternatively, if it is right,
it is right for only a tiny fraction of these devices and this
wild-card entry is too broad.

# I run a kernel without this entry at all without ill effects...
2009-03-22 13:17:46 +00:00
Andrew Thompson
cba3049682 Improve debugging output around ioctls. 2009-03-22 04:19:36 +00:00
George V. Neville-Neil
6b6e256ae1 Fix a bug in the recent update to the Chelsio driver.
The tick routine was not being restarted in the init_locked routine
which could resulted in loss of carrier when updating the MTU.

Submitted by:	Navdeep Parhar at Chelsio
MFC after:	3 weeks
2009-03-21 17:09:00 +00:00
Andrew Thompson
96a7948cf6 Revert r190173 as it breaks 64bit arches. 2009-03-21 05:44:22 +00:00
Marius Strobl
4f09c4c7e5 - In bge_ifmedia_upd_locked() take advantrage of LIST_FOREACH().
- If boot verbose, print asicrev, chiprev and bus type on attach.
- For PCI Express devices:
  1) Adjust max read request size to 4Kbytes
  2) Turn on FIFO_LONG_BURST in RDMA during bge_blockinit()
  Though 1) does not seem to have much to do with the poor TX performance
  observed on PCI Express bge(4), 2) does fix the problem. [1]
- Nuke the RX CPU self-diag, which prevents working cards from working
  (Linux tg3 does not have this diag neither does OpenBSD's bge(4)).
  The increasing of the firmware handshaking timeout to 20000 retries
  done as part of the original commit isn't merged as way already have a
  way higher BGE_TIMEOUT of 100000.

PR:		119361 [1]
Obtained from:	tg3 via DragonflyBSD [1], DragonflyBSD
2009-03-21 00:23:07 +00:00
Andrew Thompson
8755859a43 Fix compile with USB_HAVE_BUSDMA/USB_HAVE_UGEN/USB_HAVE_STRINGS.
Submitted by:	Hans Petter Selasky
2009-03-20 23:12:14 +00:00
Andrew Thompson
d891ddcaea Add umass quirk.
PR:			usb/132799
Reported by:		Yoshihiro Ota
Submitted by:		Hans Petter Selasky
2009-03-20 22:17:27 +00:00
Andrew Thompson
01cf783140 MFp4 //depot/projects/usb @159423, 159497
- Return a Zero Length packet on read errors.
- Allow for smaller buffer size.

Submitted by:	Hans Petter Selasky
2009-03-20 22:15:22 +00:00
Andrew Thompson
80536a485c MFp4 //depot/projects/usb@159446
Remove unused and depreciated function: usb2_get_devid().

Submitted by:	Hans Petter Selasky
2009-03-20 22:12:15 +00:00
Andrew Thompson
090f65a6f6 MFp4 //depot/projects/usb@159517
Fix warnings with the IAR compiler.

Submitted by:	Hans Petter Selasky
2009-03-20 22:10:36 +00:00
Andrew Thompson
bafdb74c0b MFp4 //depot/projects/usb
Sync usb_core.h after header changes.

Submitted by:	Hans Petter Selasky
2009-03-20 22:04:33 +00:00
Andrew Thompson
e1ccac965c MFp4 //depot/projects/usb @159479,159502,159516,159522,159529
Workaround for buggy USB hardware not handling new SETUP packet before STATUS
stage is complete, this allows xfers to endpoint0 to return a short frame.

Submitted by: Hans Petter Selasky
Reported by:  me
2009-03-20 22:01:45 +00:00
Andrew Thompson
0f7d454847 MFp4 //depot/projects/usb @159479,159502,159516,159522,159529
Workaround for buggy USB hardware not handling new SETUP packet before STATUS
stage is complete, this allows xfers to endpoint0 to return a short frame.

Submitted by:	Hans Petter Selasky
Reported by:	me
2009-03-20 21:57:54 +00:00
Andrew Thompson
578d0eff90 MFp4 //depot/projects/usb @159431,159437,159438
- start using the new USB typedefs in the USB core
- Remove usage of USB_ADD_BYTES()

Submitted by:	Hans Petter Selasky
2009-03-20 21:50:54 +00:00
Andrew Thompson
bdc081c60f MFp4 //depot/projects/usb@159392
Add ifdefs for making parts of usb conditional.

Submitted by:	Hans Petter Selasky
2009-03-20 21:48:11 +00:00
Andrew Thompson
ab42e8b2df MFp4 //depot/projects/usb @159430
- Move tunable defines into usb_core.h and dependancy towards usb_defs.h
- Leave hardcoded defines in "usb_defs.h".
- Allow overriding all tunable defines.
- Add more customisable typedefs.
- Correct maximum device number.

Submitted by:	Hans Petter Selasky
2009-03-20 19:04:31 +00:00
Andrew Thompson
c629193176 MFp4 //depot/projects/usb @159379,159380
Fixes for 8-bit and 16-bit compilation.

Submitted by:	Hans Petter Selasky
2009-03-20 18:59:53 +00:00
Andrew Thompson
296ade6016 MFp4 //depot/projects/usb @159375,159376,159377
Further remove dependancy towards Giant.

Submitted by:	Hans Petter Selasky
2009-03-20 18:56:27 +00:00
Robert Noland
a80ca4341a vm_offset_t is unsigned, so compare of >= 0 is not needed.
Found with:	Coverity Prevent(tm)
CID:		2259

MFC after:	3 days
2009-03-20 18:35:16 +00:00
Robert Noland
45d0290a5d vm_offset_t is unsigned and therefore can not be negative.
Avoid unnessecary compares.

Found with:	Coverity Prevent(tm)
CID:		2362,4215,4214,4209,4208,2363,4211,4210,4213,4212

MFC after:	3 days
2009-03-20 18:30:20 +00:00
Robert Noland
0bbcd5ca68 Remove the DRM_ERROR to fix build. It didn't make any sense anyway.
MFC after:	3 days
2009-03-20 18:01:32 +00:00
Robert Noland
c8264c8ee2 Fix what appears to be a typo, and restore the registers correctly.
Found with:	Coverity Prevent(tm)
CID: 		2454
2009-03-20 17:51:26 +00:00
Robert Noland
363fec5d16 Don't deref dev->dev_private before checking that it exists.
Found with:	Coverity Prevent(tm)
CID:		2940

MFC after:	3 days
2009-03-20 17:48:36 +00:00
Ed Schouten
d50321fd3a Small cleanup to previous commit.
Just use % 8, instead of & 0x7. This makes it easier to understand.
2009-03-20 14:32:51 +00:00
Ed Schouten
3e1720f5e0 Just use default behaviour on tabstops when using too many columns.
It seems I didn't fix this issue before committing teken to the tree. My
initial idea was to somehow add an error mechanism to instruct the video
driver author to increase T_NUMCOL when using very big terminals. It
turns out we have platforms where we have gigantic consoles on systems
like the Apple PowerMac G5, which means we crash there right now.

Just ignore tabstops placed beyond column 160. Just force tabs to be
placed on each 8 columns.

Reported by:	nwhitehorn
2009-03-20 14:31:08 +00:00
Robert Noland
c20a7fc9f6 Only issue the wakeup and store the counter if vblank is enabled on
the pipe.

MFC after:	3 days
2009-03-20 04:53:12 +00:00
Robert Noland
c2dd8f68b0 Add a couple of radeon pci ids.
MFC after:	3 days
2009-03-20 04:49:48 +00:00
Robert Noland
9f85b82ccc Adjust the flags to bus_dmamem around here too.
MFC after:	3 days
2009-03-20 04:48:27 +00:00
Marius Strobl
b54282f61e - Set MIIF_NOLOOP and don't add IFM_LOOP as loopback apparently isn't
supported with these pseudo-PHYs. The MIIF_NOLOOP flag currently triggers
  nothing but hopefully will be respected by mii_phy_setmedia() later on.
- Don't add IFM_NONE as isolation isn't supported by these pseudo-PHYs.
- Use mii_phy_add_media() instead of mii_add_media() so the latter can
  be eventually retired.
2009-03-19 22:34:55 +00:00
Andrew Thompson
2b78d30630 Remove the uscanner(4) driver, this follows the removal of the kernel scanner
driver in Linux 2.6. uscanner was just a simple wrapper around a fifo and
contained no logic, the default interface is now libusb (supported by sane).

Reviewed by:	HPS
2009-03-19 20:33:26 +00:00
Sam Leffler
c4d3fad2ec purge hal abi support; now that the hal is merged w/ the driver
we cannot be out of sync

MFC after:	1 week
2009-03-19 19:29:10 +00:00
Renato Botelho
102bad657b - Add Sun Type 7 keyboard
- Rename Type 6 entry (following NetBSD)
- Add Sun Type 7 Keyboard USB Hub

PR:		usb/132811
Reviewed by:	thompsa
Approved by:	thompsa
2009-03-19 17:16:33 +00:00
Dag-Erling Smørgrav
5f9672e15d Rename two functions to make their purpose clearer. Add tons of comments.
Generated code is identical after stripping .comment section.

Suggested by:	Andriy Gapon <avg@icyb.net.ua>
MFC after:	2 weeks
2009-03-19 12:39:13 +00:00
Robert Noland
470fac3a17 Add some debugging so I can see when syscalls are being restarted
consistantly.  After a lengthy irc discussion it seems like we
shouldn't need to worry about them, but it's nice to know about.

MFC after:	3 days
2009-03-19 08:36:08 +00:00
Robert Noland
ea196ecaaa Rework vblank handling to try to resolve some reports of "slow" windows
after vt switch or suspend.  I can't really test this on Intel right now
but I think I've heard reports of it on radeon as well.  I can't break
it on the radeon here.

MFC after:	3 days
2009-03-19 08:34:04 +00:00
Robert Noland
324a23e9a2 Sync up the rest of the code that we use with what Intel is shipping
-Some irq/vblank related changes that hopefully will help.
	-A little more cleanup while I'm here.

MFC after:	3 days
2009-03-19 08:28:36 +00:00
Robert Noland
5a6ba2ffbc Pull in some suspend / resume changes from Intel's code
Tested by:	mav@
MFC after:	3 days
2009-03-19 08:22:56 +00:00
Sam Leffler
2bc3ce7732 Minor cleanups of tdma protocol handling:
o break out version-related code to simplify rev'ing the protocol
o add parameter validation macros so checks that appear multiple places
  are consistent (and easy to change)
o add protocol version check when looking for a scan candidate
o improve scan debug output format
o rewrite beacon update handling to calculate a bitmask of changed values
  and pass that down through the driver callback so drivers can optimize work
o do slot bounds check before use when parsing received beacons
2009-03-18 19:28:17 +00:00
Weongyo Jeong
577b9fa3f8 Some NDIS USB drivers try to call URB funcs like URB_FUNCTION_VENDOR_xxx
or URB_FUNCTION_CLASS_xxx with HAL preemption lock that means it's
non-sleepable during USB requests though usb2_do_request() requires a
sleep so it needs to send queries to the default pipe without those
interfaces to avoid sleep.
2009-03-18 02:38:35 +00:00
Sean Bruno
450fa4f83a Reviewed by: scott (scottl@freebsd.org)
Obtained from:	Hideotshi Shimokawa

This update is based on comments from Hidetoshi.

Changeset 183550 removed the call to crom_load() in fw_busreset().  Restore
that call such that the Configuration ROM is valid.

Stash and update fwdev settings in fw_explore_node() so that negotiation
works again.
2009-03-17 13:07:11 +00:00
Robert Noland
b38c31bf40 Cast to (unsigned long) to make printf happy on i386
MFC after:	3 days
2009-03-17 05:10:12 +00:00
Robert Noland
c921ffc089 Add support for matching solely on vendor id.
We will use this method with nouveau

MFC after:	3 days
2009-03-17 03:53:44 +00:00
Robert Noland
f29130e3c2 Improve the debugging output of drm_mmap
MFC after:	3 days
2009-03-17 03:50:35 +00:00
Robert Noland
41a7f04fda Add list_for_each_prev to our linux compatibility.
We need this for nouveau

MFC after:	3 days
2009-03-17 03:49:24 +00:00
Robert Noland
a4501e547e Minor code cleanup
MFC after:	3 days
2009-03-17 03:46:37 +00:00
Robert Noland
d87f6722c5 We can have more than 3 pci resources
MFC after:	3 days
2009-03-17 03:44:36 +00:00
Robert Noland
ce3aaf8d2d Cast register maps and offsets to vm_offset_t
MFC after:	3 days
2009-03-17 03:39:09 +00:00
Robert Noland
b2a9095767 Change the logic around to match ati_pcigart.
MFC after:	3 days
2009-03-17 03:36:24 +00:00
Robert Noland
162e0ab8c1 Use flsl() here rather than ffsl()
I discovered that we were computing page_order differently than linux.

MFC after:	3 days
2009-03-17 03:32:12 +00:00
Andrew Thompson
7214348f57 MFp4 //depot/projects/usb 159225,159241,159292
Fix regression issue in the USB file system interface.
 - Use cdev_privdata pointer as indicator of correct file handle.
 - Remove redundant FIFO opened flags.

Don't send ZLP at close for ulpt and uscanner devices as this causes some
models to stop working. This reverts back to the USB1 behaviour.

Submitted by:	Hans Petter Selasky
2009-03-17 01:46:40 +00:00
Andrew Thompson
39fcd91bb5 MFp4 //depot/projects/usb 159238,159275
Add umass quirks.

Submitted by:	Michael Gmelin
2009-03-17 01:42:46 +00:00
Andrew Thompson
d3db083bcc Add Supertop IDE adapter and Quickcam entries. 2009-03-17 01:38:51 +00:00
Jung-uk Kim
c66d2b38c8 Initial suspend/resume support for amd64.
This code is heavily inspired by Takanori Watanabe's experimental SMP patch
for i386 and large portion was shamelessly cut and pasted from Peter Wemm's
AP boot code.
2009-03-17 00:48:11 +00:00
Robert Noland
6443904ee1 Use the right MSI_REARM for RS600.
MFC after:	3 days
2009-03-16 19:09:59 +00:00
Alexander Motin
83c59ed283 Remove CD input hack for ALC268 based Acer systems. Latest systems does not
implement CD input in hardware, while unconditional showing it confuse users.
Also it was made in the way that sometimes improper with present driver.

Add patch for ALC268 based Acer TM5320 to make headphones jack sensing work.
Default configuration defines two separate playback associations, which
current driver unable to trace properly due to order they are defined and
limited codec uniformity.

Submitted by:	G. Mirov <g.mirov AT gmail.com>
2009-03-16 15:50:29 +00:00
Alexander Motin
ad7de3aafb Fix spelling in message. 2009-03-16 12:42:23 +00:00
Robert Noland
910ac6da21 Teach psm about O_ASYNC
This makes Xorg happy if you aren't using moused.

MFC after:	3 days
2009-03-16 08:21:51 +00:00
Robert Noland
85c5cd4b94 Get rid of any remaining PZERO flags in mtx_sleep()
Also, clean up some ifdef mess while I'm here.

MFC after:	3 days
2009-03-16 08:19:11 +00:00
Robert Noland
96deaed545 Fix R600 writeback across suspend/resume.
This is likely a NOOP for us, since I haven't ported the suspend/resume
code yet.

MFC after:	3 days
2009-03-16 08:15:35 +00:00
Warner Losh
9dffe835eb Don't adjust ranges at all for subtractive bridges. The simple-minded
stuff we're doing is too simple-minded, so back it out for now.
2009-03-15 06:40:57 +00:00
Warner Losh
d557a26b80 Generalize the workaround for the Hitachi HT-4840-11. The Contec
C-NET(PC) has a cfe at location 1 that has both an odd irq mask (it
matches pc98 machines, so maybe it was a flag for pc98 operation) as
well as a memory map.  Since this driver doesn't know how to cope, we
start with cfe2, which is purely an I/O space mapped and that seems to
make it work.  I say 'seems' here, because the card I have doesn't
seem to have the right dongle for full testing...
2009-03-15 02:31:34 +00:00
Warner Losh
795dceffa2 Two fixes:
(1) Fix pcib_read/write_config prototypes.
(2) When contrainting a resource request for a 'subtractive' bridge,
    it is important to select a range outside the base/limit
    registers, since those are the only values known to not
    possibly work.  On my HP laptop, the base bridge excludes I/O
    ports 0xa000-0xafff, however that was the range we were passing
    up the tree.  Instead, when a range spans the "hole" we now
    arbitrarily pick the range just above the hole to allocate from.

All of my rl and xl cards, at a minimum, started working again on this
laptop with those fixes.
2009-03-14 14:08:53 +00:00
Andrew Thompson
3f67dc0f46 HID usage minimum can be equal to the maximum.
Submitted by:	Hans Petter Selasky
Tested by:	Andreas Tobler
2009-03-13 22:28:37 +00:00
Rui Paulo
869041cd77 Fix comment explaining where this driver came from.
MFC after:	2 weeks
2009-03-13 16:43:31 +00:00
Rui Paulo
454e82d77e Rename all the variables/function names/structs/etc. to reflect the
driver name change.
While there, update copyright.

MFC after:	2 weeks
2009-03-13 16:28:25 +00:00
Rui Paulo
fc1f75e512 Rename the k8temp driver to amdtemp.
MFC after:	2 weeks
2009-03-13 16:08:08 +00:00
Warner Losh
e6d3b1bd2a Minorly improved debugging. Use the DEVPRINTF macro and report the
offset for memory when mapping in the CIS.
2009-03-13 05:31:27 +00:00
Warner Losh
3fdd7f1605 We need to initialize the console for dcons to work.
Submitted by:	nork@
2009-03-13 02:15:49 +00:00
Rui Paulo
834772014b Add support for 10h and 11h family of processors. Also, make the sysctl
look like a temperature.

This driver will most likely be renamed to something more meaningful in
the near future.

Submitted by:	nork
MFC after:	2 weeks
2009-03-12 18:59:39 +00:00
Sam Leffler
4a948799c2 preliminary ar9280 support:
o add 9280 attach that sets up ini, cal, etc.
o new rf backend for 9280 and later parts
o split ini setup and spur mitigation support out to methods
  and provide 9280-specific support
o minor fixups to shared code to handle 9280-specific work

Obtained from:	Atheros (ini values and some code)
2009-03-12 18:18:28 +00:00
Warner Losh
afb1ec6d56 Move the deactivation of the device's BAR to before the loop where we
turn deactivate the resources.  While this likely doesn't matter, it
is likely to be safer.
2009-03-12 08:42:27 +00:00
Warner Losh
b1db3b7a40 Fix the whitespace in this file to be consistent with itself and with
the rest of the project's files.

s/sn_/fe_/ in a routine name that I copied from sn.
2009-03-12 07:18:27 +00:00
Warner Losh
125da88acd read_ivar takes a uintptr_t * not a u_char *. 2009-03-12 06:36:44 +00:00
Warner Losh
bb7cc1aa22 o writereg needs to return a vlue.
o Add TJ PTJ-LAN_T card.  Some more work may be needed to make this
  actually function correctly.
2009-03-12 06:35:00 +00:00
Warner Losh
34a53f3f6b Make the bit-bang callbacks for i2c implementation match their prototypes. 2009-03-12 06:32:30 +00:00
Warner Losh
aef30cdbf5 Check the Disk FUNCE recorded in the CIS to see if we should probe for
both disks, or if we should suppress the slave drive.  Default to
suppressing the slave, in the case that this REQIURED tuple turns out
to not actually be present...
2009-03-12 06:30:59 +00:00
Warner Losh
bca6fb928e Better name for this routine... it doesn't reset the card, but resets
the power to the card...
2009-03-12 06:25:30 +00:00
Weongyo Jeong
2c964f43b6 o change a lock model based on HAL preemption lock to a normal mtx.
Based on the HAL preemption lock there is a problem on SMP machines
  and causes a panic.
o When a device detached the current tactic to detach NDIS USB driver is
  to call SURPRISE_REMOVED event.  So it don't need to call
  ndis_halt_nic() again.  This fixes some page faults when some drivers
  work abnormal.
o it assumes now that URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER is in
  DISPATCH_LEVEL (non-sleepable) and as further work
  URB_FUNCTION_VENDOR_XXX and URB_FUNCTION_CLASS_XXX should be.

Reviewed by:	Hans Petter Selasky <hselasky_at_freebsd.org>
Tested by:	Paul B. Mahol <onemda_at_gmail.com>
2009-03-12 02:51:55 +00:00
Andrew Thompson
46364b29a8 MFp4 //depot/projects/usb 159004,159053,159091
More HID parsing fixes for usb mice.
 - be less strict on the last HID item usage.
 - preserve item size and count accross items
 - improve default HID usage selection.

Tested by:	ache
Submitted by:	Hans Petter Selasky
2009-03-12 02:32:54 +00:00
Pyun YongHyeon
c92b9c8898 bus_dma(9) conversion and make txp(4) work on all architectures.
o Header file cleanup.
o bus_dma(9) conversion.
  - Removed all consumers of vtophys(9) and converted to use
    bus_dma(9).
  - Typhoon2 functional specification says the controller supports
    64bit DMA addressing. However all Typhoon controllers are known
    to lack of DAC support so 64bit DMA support was disabled.
  - The hardware can't handle more 16 fragmented Tx DMA segments so
    teach txp(4) to collapse these segments to be less than 16.
  - Added Rx buffer alignment requirements(4 bytes alignment) and
    implemented fixup code to align receive frame. Previously
    txp(4) always copied Rx frame to align it on 2 byte boundary
    but its copy overhead is much higher than unaligned access on
    i386/amd64. Alignment fixup code is now applied only for
    strict-alignment architectures. With this change i386 and
    amd64 will get instant Rx performance boost. Typhoon2 datasheet
    mentions a command that pads arbitrary bytes in Rx buffer but
    that command does not work.
  - Nuked pointer trick in descriptor ring. This does not work on
    sparc64 and replaced it with bcopy. Alternatively txp(4) can
    embed a 32 bits index value into the descriptor and compute
    real buffer address but it may make code complicated.
  - Added endianness support code in various Tx/Rx/command/response
    descriptor access. With this change txp(4) should work on all
    architectures.
o Added comments for known firmware bugs(Tx checksum offloading,
  TSO, VLAN stripping and Rx buffer padding control).
o Prefer faster memory space register access to I/O space access.
  Added fall-back mechanism to use alternative I/O space access.
  The hardware supports both memory and I/O mapped access. Users
  can still force to use old I/O space access by setting
  hw.txp.prefer_iomap tunable to 1 in /boot/loader.conf.
o Added experimental suspend/resume methods.
o Nuke error prone Rx buffer handling code and implemented local
  buffer management with TAILQ. Be definition the controller can't
  pass the last received frame to host if no Rx free buffers are
  available to use as head and tail pointer of Rx descriptor ring
  can't have the same value. In that case the Rx buffer pointer in
  Rx buffer ring still holds a valid buffer and txp_rxbuf_reclaim()
  can't fill Rx buffers as the first buffer is still valid. Instead
  of relying on the value of Rx buffer ring, introduce local buffer
  management code to handle empty buffer situation. This should fix
  a long standing bug which completely hangs the controller under
  high network load. I could easily trigger the issue by sending 64
  bytes UDP frames with netperf. I have no idea how this bugs was
  not fixed for a long time.
o Converted ithread interrupt handler to filter based one.
o Rearranged txp_detach routine such that it's now used for general
  clean-up routine.
o Show sleep image version on device attach time. This will help
  to know what action should be taken depending on sleep image
  version. The version information in datasheet was wrong for newer
  NV images so I followed Linux which seems to correctly extract
  version numbers from response descriptors.
o Firmware image is no longer downloaded in device attach time. Now
  it is reloaded whenever if_init is invoked. This is to ensure
  correct operation of hardware when something goes wrong.
  Previously the controller always run without regard to running
  state of firmware. This change will add additional controller
  initialization time but it give more robust operation as txp(4)
  always start off from a known state. The controller is put into
  sleep state until administrator explicitly up the interface.
o As firmware is loaded in if_init handler, it's now possible to
  implement real watchdog timeout handler. When watchdog timer is
  expired, full-reset the controller and initialize the hardware
  again as most other drivers do. While I'm here use our own timer
  for watchdog instead of using if_watchdog/if_timer interface.
o Instead of masking specific interrupts with TXP_IMR register,
  program TXP_IER register with the interrupts to be raised and
  use TXP_IMR to toggle interrupt generation.
o Implemented txp_wait() to wait a specific state of a controller.
o Separate boot related code from txp_download_fw() and name it
  txp_boot() to handle boot process.
o Added bus_barrier(9) to host to ARM communication.
o Added endianness to all typhoon command processing. The ARM93C
  always expects little-endian format of command/data.
o Removed __STRICT_ALIGNMENT which is not valid on FreeBSD.
  __NO_STRICT_ALIGNMENT is provided for that purpose on FreeBSD.
  Previously __STRICT_ALIGNMENT was unconditionally defined for
  all architectures.
o Rewrote SIOCSIFCAP ioctl handler such that each capability can be
  controlled by ifconfig(8). Note, disabling VLAN hardware tagging
  has no effect due to the bug of firmware.
o Don't send TXP_CMD_CLEAR_STATISTICS to clear MAC statistics in
  txp_tick(). The command is not atomic. Instead, just read the
  statistics and reflect saved statistics to the statistics.
  dev.txp.%d.stats sysctl node provides detailed MAC statistics.
  This also reduces a lot of waste of CPU cycles as processing a
  command ring takes a very long time on ARM93C. Note, Rx
  multicast and broadcast statistics does not seem to right. It
  might be another bug of firmware.
o Implemented link state change handling in txp_tick(). Now sending
  packets is allowed only after establishing a valid link. Also
  invoke link state change notification whenever its state is
  changed so pseudo drivers like lagg(4) that relies on link state
  can work with failover or link aggregation without hacks.
  if_baudrate is updated to resolved speed so SNMP agents can get
  correct bandwidth parameters.
o Overhauled Tx routine such that it now honors number of allowable
  DMA segments and checks for 4 free descriptors before trying to
  send a frame. A frame may require  4 descriptors(1 frame
  descriptor, 1 or more frame descriptors, 1 TSO option descriptor,
  one free descriptor to prevent descriptor wrap-around) at least
  so it's necessary to check available free descriptors prior to
  setting up DMA operation.
o Added a sysctl variable dev.txp.%d.process_limit to control
  how many received frames should be served in Rx handler. Valid
  ranges are 16 to 128(default 64) in unit of frames.
o Added ALTQ(4) support.
o Added missing IFCAP_VLAN_HWCSUM as txp(4) can offload checksum
  calculation as well as VLAN tag insertion/stripping.
o Fixed media header length for VLAN.
o Don't set if_mtu in device attach, it's already set in
  ether_ifattach().
o Enabled MWI.
o Fixed module unload panic when bpf listeners are active.
o Rearranged ethernet address programming logic such that it works
   on strict-alignment architectures.
o Removed unused member variables in softc.
o Added support for WOL.
o Removed now unused TXP_PCI_LOMEM/TXP_PCI_LOIO.
o Added wakeup command TXP_BOOTCMD_WAKEUP definition.
o Added a new firmware version query command, TXP_CMD_READ_VERSION.
o Removed volatile keyword in softc as bus_dmamap_sync(9) should
  take care of this.
o Removed embedded union trick of a structure used to to access
  a pointer on LP64 systems.
o Added a few TSO related definitions for struct txp_tcpseg_desc.
  However TSO is not used at all due to the limitation of hardware.
o Redefined PKT_MAX_PKTLEN to theoretical maximum size of a frame.
o Switched from bus_space_{read|write}_4 to bus_{read|write}_4.
o Added a new macro TXP_DESC_INC to compute next descriptor index.

Tested by:	don.nasco <> gmail dot com
2009-03-12 01:14:47 +00:00
Sam Leffler
d9bde68623 add asserts 2009-03-12 00:09:29 +00:00
Doug Rabson
1267802438 Merge in support for Xen HVM on amd64 architecture. 2009-03-11 15:30:12 +00:00
John Baldwin
33fc362512 Add a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that a
filesystem supports additional operations using shared vnode locks.
Currently this is used to enable shared locks for open() and close() of
read-only file descriptors.
- When an ISOPEN namei() request is performed with LOCKSHARED, use a
  shared vnode lock for the leaf vnode only if the mount point has the
  extended shared flag set.
- Set LOCKSHARED in vn_open_cred() for requests that specify O_RDONLY but
  not O_CREAT.
- Use a shared vnode lock around VOP_CLOSE() if the file was opened with
  O_RDONLY and the mountpoint has the extended shared flag set.
- Adjust md(4) to upgrade the vnode lock on the vnode it gets back from
  vn_open() since it now may only have a shared vnode lock.
- Don't enable shared vnode locks on FIFO vnodes in ZFS and UFS since
  FIFO's require exclusive vnode locks for their open() and close()
  routines.  (My recent MPSAFE patches for UDF and cd9660 already included
  this change.)
- Enable extended shared operations on UFS, cd9660, and UDF.

Submitted by:	ups
Reviewed by:	pjd (ZFS bits)
MFC after:	1 month
2009-03-11 14:13:47 +00:00
Pyun YongHyeon
05dc172526 Replace local CRC32 routine with ether_crc32_be(). This should
have happened long time ago. Also simplify Rx filter logic.
2009-03-11 09:57:11 +00:00
Pyun YongHyeon
017bb6e5ee s/u_int8_t/uint8_t/g
s/u_int16_t/uint16_t/g
s/u_int32_t/uint32_t/g
s/u_int64_t/uint64_t/g
2009-03-11 09:06:39 +00:00
Pyun YongHyeon
40b9562f15 style(9) - space after keywords. 2009-03-11 08:49:17 +00:00
Pyun YongHyeon
223de9429e Remove return statement at the end of function that returns void. 2009-03-11 08:41:57 +00:00
Pyun YongHyeon
2c81d278e7 Remove extra tab characters. 2009-03-11 08:28:24 +00:00
Pyun YongHyeon
9475e437a3 K&R -> ANSI C function definitions. 2009-03-11 08:25:18 +00:00
Warner Losh
381bbcb826 Remove old compat method that's no longer needed (and hasn't been
since just before 6.0).
2009-03-11 08:15:17 +00:00
Warner Losh
3ef22bdd2f Allow zero length memroy space descriptor sections. It is apparently
legal in the spec.  Add newline to the verbose messages we print when
debugging when this happens.  The Hitachi HT-4840-11 is the only card
to hit these in years, and it works well enough if we're liberal about
what we accept.
2009-03-11 08:14:44 +00:00
Warner Losh
3ca789f14a Add support for Hitachi HT-4840-11. This card is supposedly just like
the J181, but not quite.  This card's CIS has some quirks that means
we have to ignore CFE's 1-9.
2009-03-11 08:12:28 +00:00
Warner Losh
ccd1b0f54d Add entry for Hitachi HT-4840-11, which is a fe-based card. 2009-03-11 08:11:11 +00:00
Warner Losh
edee63f77b Add 3 new cards that I found today in akihabara...
Toshiba LANCT00A
TDK LAK-CD011
TJ PTJ-LAN/T PC-NIC ENCC 990010759-001A
2009-03-11 07:22:11 +00:00
Andrew Thompson
d59dbd0a3d MFp4 //depot/projects/usb 158981,159016,159024
Sync support for ATMEGA DCI parts.

Submitted by:	Hans Petter Selasky
2009-03-11 04:58:21 +00:00
Andrew Thompson
1be5bf51d3 Fix a possible NULL pointer access at controller attach.
Submitted by:	Hans Petter Selasky
2009-03-11 04:56:30 +00:00
Robert Watson
a6c19108c5 Prefer ENETDOWN to ENXIO when returning queuing errors due to a link
down, interface down, etc, with if_cxgb's if_transmit routine.

MFC after:	3 days
Reviewed by:	kmacy
2009-03-10 22:35:45 +00:00
Sam Leffler
7bed4560f3 choose the size of the last region for d_stripsize instead of the first;
this fixes geom_redboot on boards that have multiple parts/regions as it
uses the value to locate the FIS directory which is in the last erase
region of flash
2009-03-10 22:29:42 +00:00
Warner Losh
41f0c91517 Restore blank line removed when fixing my earlier botch. Never do
just one last change before bed...

Pointy had to: imp
2009-03-10 22:04:52 +00:00
Andrew Thompson
b1e14b53e3 Make sure HID has a default usage, this fixes recent mouse problems.
Tested by:	Renato Botelho
Tested by:	beech (earlier version)
Submitted by:	Hans Petter Selasky
2009-03-10 19:35:41 +00:00
George V. Neville-Neil
f2d8ff04fe Update the Chelsio driver to the latest bits from Chelsio
Firmware upgraded to 7.1.0 (from 5.0.0).
T3C EEPROM and SRAM added; Code to update eeprom/sram fixed.
fl_empty and rx_fifo_ovfl counters can be observed via sysctl.
Two new cxgbtool commands to get uP logic analyzer info and uP IOQs
Synced up with Chelsio's "common code" (as of 03/03/09)

Submitted by:	 Navdeep Parhar at Chelsio
Reviewed by:	gnn
MFC after:	2 weeks
2009-03-10 19:22:45 +00:00
George V. Neville-Neil
7b77311219 Complete removal of cardbus_write_ivar which was left hanging. 2009-03-10 17:54:04 +00:00
Warner Losh
161832a1cf When freeing all the resources of the card, it is better to turn off
the PORTEN and MEMEN bits in the command register than to zero the
bars.

Use pci_write_ivar directly instead of a one-line wrapper that adds no
value.

Track verbosity changes in pci.

Remove a stray blank line.
2009-03-10 12:10:50 +00:00
Ed Schouten
630b9bf23f Make a 1:1 mapping between syscons stats and terminal emulators.
After I imported libteken into the source tree, I noticed syscons didn't
store the cursor position inside the terminal emulator, but inside the
virtual terminal stat. This is not very useful, because when you
implement more complex forms of line wrapping, you need to keep track of
more state than just the cursor position.

Because the kernel messages didn't share the same terminal emulator as
ttyv0, this caused a lot of strange things, like kernel messages being
misplaced and a missing notification to resize the terminal emulator for
kernel messages never to be resized when using vidcontrol.

This patch just removes kernel_console_ts and adds a special parameter
to te_puts to determine whether messages should be printed using regular
colors or the ones for kernel messages.

Reported by:	ache
Tested by:	nyan, garga (older version)
2009-03-10 11:28:54 +00:00
Marcel Moolenaar
d175be464e Fix a buglet in revision 189401: when restoring a 64-bit BAR,
write the upper 32-bits in the adjacent bar. The consequences
of the buglet were severe enough though: a machine check.
2009-03-10 06:21:52 +00:00
Sam Leffler
f2c6781bfd Add cfid, a disk interface to CFI flash devices; this enables construction
of flash-based filesystems.

Note this is not interlocked against the raw CFI device.
2009-03-09 23:16:02 +00:00
Sam Leffler
2e986da5f1 replace if_watchdog w/ private callout; probably can merge this with the
calibration work sometime in the future
2009-03-09 23:10:19 +00:00
Sam Leffler
dfc86af7d7 remove ar9160Detach; it does nothing 2009-03-09 23:04:06 +00:00
Alexander Motin
79ca9100fd Add type specific suspend/resume ata channel functions. Add checks to avoid
crash on detached channel resume. Add placeholder for possible type-specific
suspend/resume routines.
2009-03-09 20:48:57 +00:00
Andrew Thompson
0f6e8f934f MFp4 //depot/projects/usb 158942,158948
Allow USB to be compiled without ugen support.

Submitted by:	Hans Petter Selasky
2009-03-09 20:08:08 +00:00
Andrew Thompson
07bf38d7cf Fix musb_otg.h include filename.
Submitted by:	Hans Petter Selasky
2009-03-09 20:05:46 +00:00
Ed Schouten
8ddd1f723d Don't call into the TTY layer when inside kdb.
We should just leave the underlying TTY objects alone when scrolling
around in KDB. It should be handled by Syscons exclusively.

Reported by:	pluknet gmail com
2009-03-09 19:46:19 +00:00
Andrew Thompson
bf87f556ac MFp4 //depot/projects/usb@158916
USB mouse patch to address complicated data reporting descriptors.

Reported by:	Boris Kotzev
Submitted by:	Hans Petter Selasky
2009-03-09 15:25:46 +00:00
Warner Losh
b29df1b26d Make generic_intr routines match prototype. 2009-03-09 13:30:00 +00:00
Warner Losh
d3ec8e547e __LP64__ is what's defined, not _LP64_, according to the manual (and
also experience).
2009-03-09 13:29:13 +00:00
Warner Losh
cd6d5177a7 Fix prototypes to be consistent. 2009-03-09 13:27:33 +00:00
Warner Losh
aa11a83ce3 remove now-redunant cardbus attachment lines. 2009-03-09 13:25:34 +00:00
Warner Losh
155a83e87a remove now-redunant cardbus attachment. 2009-03-09 13:23:54 +00:00
Pyun YongHyeon
8fc8651306 For IP1001 PHYs, read auto-negotiation advertisement register to
get default next page configuration. While I'm here explicitly set
IP1000PHY_ANAR_CSMA bit. This bit is read-only and always set
by hardware so setting it has no effect but it would clear the
intention. With this change controllers that couldn't establish
1000baseT link should work.

PR:	kern/130846
2009-03-09 08:17:46 +00:00
Pyun YongHyeon
34e4a32dc0 Use mii_phy_add_media() and remove setting each media type.
While I'm here, don't set mii_anegticks as it's set by
mii_phy_add_media().
2009-03-09 08:09:06 +00:00
Pyun YongHyeon
dba0afd605 For unknown speed, explicitly set IFM_NONE. 2009-03-09 08:01:40 +00:00
Pyun YongHyeon
cf9becf1f6 Report current link state while auto-negotiation is in progress. 2009-03-09 07:56:40 +00:00
Robert Noland
f0eb29f4a6 Consistently use kdev for the kernel device.
Submitted by:	vehemens <vehemens@verizon.net>
MFC after:	3 days
2009-03-09 07:55:18 +00:00
Robert Noland
4d4420bda8 Clean up the printing on amd64. Should also be consistent on i386.
MFC after:	3 days
2009-03-09 07:50:27 +00:00
Robert Noland
d3f8d87d33 There is no need to sync these buffers to swap.
MFC after:	3 days
2009-03-09 07:49:13 +00:00
Robert Noland
254c58f9fd Change the flags to bus_dmamem around to allow it to sleep waiting for
resources during allocation, but not during map load.  Also, zero the
buffers here.

MFC after:	3 days
2009-03-09 07:47:03 +00:00
Robert Noland
00a55e42d6 Fix the flags to bus_dmamem_* to allow the allocation to sleep while
waiting for resources.  It is really the load that we can't defer.
BUS_DMA_NOCACHE belongs on bus_dmamap_load() as well.

MFC after:	3 days
2009-03-09 07:38:22 +00:00
Robert Noland
bf32f93e11 -Make the PCI(E)/AGP calculations consistent
-Calculate the scratch address correctly

MFC after:	10 days
2009-03-09 07:33:35 +00:00
Robert Noland
566be5d4e1 Call the right function for the right chipset.
MFC after:	10 days
2009-03-09 07:24:32 +00:00
Pyun YongHyeon
2c21710b27 Add a new tunable hw.re.prefer_iomap which disables memory register
mapping. The tunable is OFF for all controllers except RTL8169SC
family. RTL8169SC seems to require more magic to use memory
register mapping. r187483 added a fix for RTL8169SCe controller but
it does not looke like fix other variants of RTL8169SC.

Tested by:	Gavin Stone-Tolcher g.stone-tolcher <> its dot uq dot edu dot au
2009-03-09 06:02:55 +00:00
Sam Leffler
f11fe89814 Fix TXPMGT handling:
o correct dBm<->mW conversion logic
o set net80211 TXPMGT capability only if driver reports it is capable

PR:		kern/132342
Submitted by:	"Paul B. Mahol" <onemda@gmail.com>
2009-03-09 02:37:52 +00:00
Andrew Thompson
da6c1373fa MFp4 //depot/projects/usb@158868
Fix bugs and improve HID parsing.
- fix possible memory leak found
- fix possible NULL pointer access
- fix possible invalid memory read
- parsing improvements
- reset item data position when a new report ID is detected.

Submitted by:	Hans Petter Selasky
2009-03-08 22:58:19 +00:00
Andrew Thompson
4309a3fb19 MFp4 //depot/projects/usb@158869
Fix sael init code.

Reported by:	Alberto Mijares
Submitted by:	Hans Petter Selasky
2009-03-08 22:55:17 +00:00
Andrew Thompson
75fd0939b4 Move m_getcl() into its own function. This also fixes a bug where the m_adj for
ETHER_ALIGN was having no effect since m_len had not been set.
2009-03-08 06:56:13 +00:00
Andrew Thompson
36002e92e9 Fix endian conversion from htole16 to htole32.
Tested with:	ARM xscale
2009-03-08 06:03:28 +00:00
Robert Noland
4fcda8938e Import support for ATI Radeon R600 and R700 series chips.
Tested on an HD3850 (RV670) on loan from Warren Block.

Currently, you need one of the following for this to be useful:

	x11-drivers/xf86-video-radeonhd-devel (not tested)
	xf86-video-ati from git (EXA works, xv is too fast)
	xf86-video-radeonhd from git (EXA works, xv works)

There is no 3d support available from dri just yet.

MFC after:	2 weeks
2009-03-07 21:36:57 +00:00
Andrew Thompson
e55e1ebc35 (re)merge r186415,186416 from the old usb stack;
o add Transaction Translator support (still missing ISOC xfers)
o add EHCI_SCFLG_BIGEMMIO flag to force big-endian byte-select to be
  set in USBMODE
o split reset work into new public routine ehci_reset so bus shim drivers
  can force big-endian byte-select before ehci_init
o enable TT and big-endian MMIO
o force a reset before ehci_init to get byte-select setup

Also go back to using USB_EHCI_BIG_ENDIAN_DESC at compile time to enable the
byteswapping and reduce diffs to the original commits.

This fixes the new USB stack on the Cambria board.
2009-03-07 19:49:47 +00:00
Andrew Thompson
5f1286689c Fix some missed htole32 conversions to htoehci32.
Reviewed by:	hps
2009-03-07 18:08:59 +00:00
Weongyo Jeong
6affafd098 o port NDIS USB support from USB1 to the new usb(USB2).
o implement URB_FUNCTION_ABORT_PIPE handling.
o remove unused code related with canceling the timer list for USB
  drivers.
o whitespace cleanup and style(9)

Obtained from:	hps's original patch
2009-03-07 07:26:22 +00:00
Andrew Thompson
d1864afbac MFp4 //depot/projects/usb@158692
Workaround a EHCI performance problem by issuing a doorbell after queueing a
bulk xfer.

Submitted by:	Hans Petter Selasky
2009-03-06 17:13:12 +00:00
Andrew Thompson
d953f72075 Ensure the cached rq pointer is still valid before waking up the address, the
zyd_cmd function may have timed out. It wouldnt cause a panic but could wakeup
someone.

Spotted by:	HPS
2009-03-06 17:04:47 +00:00