Commit Graph

19781 Commits

Author SHA1 Message Date
sam
fb76cfd34b move attach debug msg to the rf backend 2009-02-24 01:16:40 +00:00
sam
dce1c351b5 Add PCIE power control api:
o add ah_configPCIE and ah_disablePCIE for drivers to configure PCIE
  power save operation (modeled after ath9k, may need changes)
o add private state flag to indicate if device is PCIE (replaces private
  hack in 5212 code)
o add serdes programming ini bits for 5416 and later parts and setup
  for each part (5416 and 9160 logic hand-crafted from existing routines);
  5212 remains open-coded but is now hooked in via ah_configPCIE
o add PCIE workaround gunk
o add ar5416AttachPCIE for iodomatic code used by 5416 and later parts
2009-02-24 01:07:06 +00:00
sam
e10f01b24b Fill in gpio support for 5416 and later parts:
o add output mux support
o gpio pin count is chip-dependent
o 9280 and 9285 do input handling different
o hookup gpio interrupts
o no need to save/restore soft led state around reset
2009-02-24 00:33:08 +00:00
sam
44e443ab8d misc fixups, mostly for code not compiled yet 2009-02-24 00:29:32 +00:00
sam
1bb0a46d4d 5416 and later parts mux the gpio outputs; extend the api to include
a signal type that's used to select the appropriate mux
2009-02-24 00:12:16 +00:00
sam
0c3d0ae510 move eeprom attach above first reset as the reset code checks the
eeprom contents for 9280 and later parts
2009-02-24 00:03:14 +00:00
sam
9b20a16012 attach methods don't need to be public, make 'em static 2009-02-23 23:58:37 +00:00
sam
fdb4cb08bc 5416 and later parts get the radio rev differently; add ar5416GetRadioRev
to do it the right way
2009-02-23 23:54:08 +00:00
sam
35472ccdb1 remove private copies of gpio methods that were needed when the hal
was an independent entity
2009-02-23 23:48:17 +00:00
thompsa
6782952c0d Make sure at least two tx slots are free before sending the mbuf since an
additional frame may be sent for 80211 protection.
2009-02-23 23:46:56 +00:00
sam
d673ad903b print mac+rf part names; drop the printing 2ghz rf stuff (might come back) 2009-02-23 23:41:12 +00:00
mav
ab8cd68dd6 Fix non-AHCI channels detection on combined JMicron controllers,
broken by r188694.
2009-02-23 22:13:05 +00:00
thompsa
d44ed63bdc Move the uaudio and ata-usb drivers into their correct locations. 2009-02-23 21:19:18 +00:00
thompsa
de29f650e6 Move two missed usb drivers out to the graveyard location under sys/legacy/dev. 2009-02-23 21:07:20 +00:00
thompsa
7f097ca97c Reintroduce r188878, provide compat typedefs for usb1. 2009-02-23 19:06:47 +00:00
thompsa
111a707d99 Move the new USB stack into its new home. 2009-02-23 18:31:00 +00:00
emaste
b76fb8bc54 SVN rev 188743 modified aac_rx_get_fwstatus to use the AAC_RX_OMR0
register instead of AAC_RX_FWSTATUS, as that is the way it's done in
Adaptec's vendor driver and in the Linux drivers.  (The same applies
to aac_rkt_get_fwstatus as well.)

However, a concern has been raised about the compatibility of this
change and old hardware / firmware versions.  In the absense of
specific information, revert to the original behaviour if the firmware
does not support the "New comm." interface.  Users of old cards or
firmware haven't reported the problems that are potentially solved by
switching to OMR0.
2009-02-23 18:22:06 +00:00
thompsa
44cdb003f7 Move usb to a graveyard location under sys/legacy/dev, it is intended that the
new USB2 stack will fully replace this for 8.0.

Remove kernel modules, a subsequent commit will update conf/files. Unhook
usbdevs from the build.
2009-02-23 18:16:17 +00:00
mav
dcb65e8ff9 Do not call devices probe/attach if there is nothing new was found. 2009-02-23 08:58:29 +00:00
mav
cd92a84897 Fix spelling.
Submitted by:	gavin
2009-02-23 08:19:30 +00:00
mav
f7385ac83d Tune AHCI verbose messages to make log more readable. 2009-02-22 14:08:20 +00:00
mav
dad2147aeb Remove one more place of master/slave terms usage. 2009-02-22 10:26:02 +00:00
alc
737844bb9e Remove unnecessary page queues locking around vm_page_wakeup(). (This
change is applicable to RELENG_7 but not RELENG_6.)

MFC after:	1 week
2009-02-22 02:50:31 +00:00
thompsa
8f77bce477 Use root_mount_hold and root_mount_rel to allow the USB bus to be explored
before trying to mount root. Unlike USB1 the busses are not explored at attach
but rather after threads are running.
2009-02-22 01:02:25 +00:00
mav
3bc203445d Use only higher half of device signature to identify device type. Some
devices return incorrect values in lower part confusing detection, while
higher part itself gives enough information for proper detetion.
2009-02-21 23:46:34 +00:00
mav
5ac2ce8471 Increase initial busy waiting time. If drive was hot-plugged, it may need
much time to spin-up.
2009-02-21 23:42:28 +00:00
mav
96ec4168f2 Improve ata_reinit():
- protect againtst recursions,
 - add new devices detection using ata_identify().

Improve ata_identify():
 - do not add duplicate device if device already exist.

Rework SATA hot-plug events handling. Instead of unsafe duplicate
implementation use common ata_reinit() to handle all state changes.

All together this gives quite stable and robust cold- and hot-plug operation,
invariant to false, lost and duplicate events.
2009-02-21 22:57:26 +00:00
mav
d6b23ce153 Teach device drivers' ata_reinit() methods, that there can be more then two
devices per channel.
2009-02-21 16:39:26 +00:00
attilio
bfa5bd4228 Sync with the official Adaptec vendor driver:
[1]	Add the support for the NARK controller which seems a variant of
	the i960Rx.
[2]	Split up memory regions and other resources in 2 different parts
	as long as NARK uses them separately (it is not clear to me
	why though as long as there are no more informations available
	on this controller). Please note that in all the other cases,
	the regions overlaps leaving the default behaviour for all the
	other controllers.
[3]	Implement a clock daemon responsible for maintain updated the
	wall clock time of the controller (run any 30 minutes)*.

Submitted by:	Adaptec (driver build 15317 [1, 2] and 15727 [3])
Reviewed by:	emaste
Tested by:	emaste
Sponsored by:	Sandvine Incorporated

* Please note that originally, in the Adaptec driver, the clock daemon
  is not implemented with callouts as in our in-tree driver.
2009-02-21 15:40:03 +00:00
thompsa
b1620f0ed9 Revert r188878 for the moment, this breaks kdump. 2009-02-21 03:06:29 +00:00
thompsa
50f9851d72 Provide compat typedefs for usb1. 2009-02-21 01:14:49 +00:00
mav
1348b6bf73 Disable port hardware on detach. First switch it to slumber mode to
power-down peer transmitter, then disable completely.
Side effect of this is saving about 0.5W of power per detached device.
2009-02-20 23:17:52 +00:00
marcel
29e2f2f76e Don't read the TOC for DIOCGPROVIDERALIAS. This causes the
acd code to create new provider (?), but not from an expected
context, which results in a panic (GEOM topology not held).
2009-02-20 23:01:27 +00:00
mav
5369399ef9 Fix typo: s/SLUMPER/SLUMBER/ 2009-02-20 22:46:24 +00:00
sam
ba7e159e0c correct SIFS setting; there is a 2usec adjustment between the calculated
value and what the hardware requires (based on inspection of INI values)

Submitted by:	Jiri Fojtasek <jiri.fojtasek@hlohovec.net>
2009-02-20 22:06:58 +00:00
sam
ebd2f49d0d don't adjust core clk conversions for 1/2 and 1/4 rate channels; the
mac runs at full speed so doing this breaks conversion for ifs parameters

Submitted by:	Felix Fietkau <nbd@openwrt.org>
2009-02-20 22:05:08 +00:00
mav
00cf46451c Reduce soft-reset assertion time from 5ms to 50us.
ATA specification declares minimal reset time of 5us. SATA keeps it, but
requires devices to handle commands transmitted even one by one without
any gap.
2009-02-20 20:29:32 +00:00
mav
b2740187db Disable port interrupts before doing PHY reset.
PHY reset causes drive connect/disconnect events, unwanted at this moment.
2009-02-20 20:20:00 +00:00
mav
69ca5576d6 Fix pc98 build error due to missing variable.
Submitted by:	avg
2009-02-20 14:10:23 +00:00
mav
0b676e2d8d Handle nForce MCP67 and MCP73 SATA controllers as AHCI. They report itself
as ATA RAID, but generic ATAPCI driver unable to detect drives there. AHCI
driver reported to handle them fine. Linux does the same.

Submitted by:	Andrey V. Elsukov on stable@
2009-02-20 08:49:56 +00:00
scottl
25970e49c4 Tell CAM that CISS logical devices support tagged queueing. This fixes
the low "max device openings" count that has led to poor performance in
FreeBSD 7.0 and 7.1
2009-02-20 07:43:43 +00:00
scottl
9894622a1c Tell CAM that SPI disconnect works, which in turn will let it use tags.
This fixes the low "max device openings" count that has lead to poor
performance in FreeBSD 7.0 and 7.1.

Extra thanks goes to Mike Tancsa at Sentex for providing a debug system for
this.
2009-02-20 07:40:54 +00:00
scottl
261fc57b26 Add basic support for DDF, often found on Adaptec HostRAID controllers.
Spares and rebuilds are not supported, so this code should be considered
for entertainment purposes only.
2009-02-20 06:10:12 +00:00
avg
8ee3583cc8 acpi_cpu: fixup for PIIX4E PCI config related to C2
This is triggered only if BIOS configures ACPI_BITREG_BUS_MASTER_RLD
aka BRLD_EN_BM to 1.
Rationale:
1. we do not support C3 on PIIX4E
2. bus master activity need not break out of C2 state
3. because of CPU_QUIRK_NO_BM_CTRL quirk we may reset bus master
   status which would result in immediate break out from C2

So if you have seen
cpu0: too many short sleeps, backing off to C1
with this chipset before you may want to try cx_lowest of C2 again.

Reviewed by: rpaulo (mentor), njl
Approved by: rpaulo (mentor)
2009-02-19 14:39:52 +00:00
mav
6127a7d95a Use channel driver's attach/detach routines instead of ata_attach()/
ata_detach() to implement IOCATAATTACH/IOCATADETACH ioctls.
This will permit channel drivers to properly shutdown port hardware on channel
detach and init it on attach.
2009-02-19 12:47:24 +00:00
sam
e97897ada3 remove private support for IEEE80211_MODE_HALF and IEEE80211_MODE_QUARTER
now that net80211 has them
2009-02-19 05:22:40 +00:00
sam
dc72869d2f Cleanup ath_hal_computetxtime's handling of 1/2 and 1/4-width channels:
o mark phy type to indicate 1/2 or 1/4-rate operation
o use phy type instead of channel attributes to identify 1/2 and 1/4-rate
  operation
o general cleanup of code including move phy constants to ah_internal.h

Eventually this code should go away and we should use the net0211 equivalents.
2009-02-19 04:24:22 +00:00
sam
59775ab419 add HAL_DIAG_SETREGS to write registers via the diag api 2009-02-19 04:15:14 +00:00
sam
234c48a69e whitespace 2009-02-19 04:10:51 +00:00
mav
049011f572 Quite mechanical ch_detach implementations for all atapci subdrivers.
Some dmainit call fixes for previous commit.
2009-02-19 00:32:55 +00:00
rwatson
b25019649c if_cx is currently disconnected from the build due to a dependence on
the old TTY implementation; however, take a cut at stripping its
optional Giant-protected code paths enabled using debug.cx.mpsafenet,
which will no longer work once IFF_NEEDSGIANT is removed.
2009-02-19 00:06:01 +00:00
mav
f10246717a As soon as they called in only same one place (ata_pcichannel_attach()),
join allocate() and dmainit() atapci subdriver's channel initialization
methods into single ch_attach() method.

As opposite to ch_attach() add new ch_detach() method to deallocate/disable
channel.
2009-02-18 22:17:48 +00:00
mav
d65edba75b Make ch->dma.free() called symmetrically to ch->dma.alloc(). 2009-02-18 21:12:48 +00:00
mav
06c33a48b8 Implement proper attach/detach routines for ISA driver. 2009-02-18 20:42:42 +00:00
sbruno
41356ea1ed Enhance debugging mode by storing the string "BB:TT:LL" once and use
it instead of overloading sbp_show_sdev_info().

replace calls to printf with calls to device_printf and cleanup debug
messages

Remove a bit of dead, commented out code.

Reviewed by:	scottl(mentor)
MFC after:	2 weeks
2009-02-18 18:41:34 +00:00
mav
bcff264488 Remove unused variable.
Submitted by:	ganbold
2009-02-18 18:36:13 +00:00
thompsa
f18e7859f5 Switch over to usbdevs.h generated at compile time. 2009-02-18 06:33:10 +00:00
emaste
f48f569733 Use outbound message register 0 instead of mailbox 7 in
aac_{rx,rkt}_get_fwstatus, as done in Adaptec's vendor driver as well as
the Linux drivers.

Submitted by:   jkim, from Adaptec's driver
2009-02-18 01:36:20 +00:00
sam
efbc0075d9 fix whitespace 2009-02-17 23:43:17 +00:00
mav
62a9b004fc Adaptively increase control command timeout when drive is spun down.
This should fix, for example, cache flush timeout error on shutdown, if
some drives are not mounted.

PR:		kern/111023
2009-02-17 23:20:04 +00:00
gallatin
0df1aedf21 Fix cut/paste error in previous commit and use the
correct value for SFP+ reserved media type.

MFC after:  1 week
2009-02-17 22:25:19 +00:00
gallatin
6bae60e426 Better support for recent Myricom 10GbE NICs
- Update to firmware 1.4.39 for dual-chip NIC (10G-PCIE2-xxx)
  support, and SFP+ i2c support

- Identify newer "B" NICs (10G-PCIEx-8B-x) correctly, rather than
  mis-identifying them as "A" NICs (cosmetic only)

- Identify the IFM_10G_LRM ifmedia type, where applicable.

- Identify ifmedia types for SFP+ based NICs

- Update copyright

Sponsored by: Myricom
MFC after: 1 week
2009-02-17 22:15:58 +00:00
mav
1bb2d9bb68 Remove useless return, that left from previous commit. 2009-02-17 21:35:17 +00:00
mav
9d001280ae ata_interrupt() does not need to return anything. It is not it's business
to report request completion, expecially when it is not reliable.
2009-02-17 21:17:21 +00:00
sbruno
a834b964e0 Introduce 1394a-2000 extended PHY Self ID packets.
Deprecate unused phy_delay Self ID field as it was removed
by 1394a-2000.

Attempt to parse extended Self ID PHY packets if they are detected

Reviewed by:	scottl (mentor)
MFC after:	2 weeks
2009-02-17 19:37:04 +00:00
mav
f6a3e9dd83 Add kernel dumping support. Works fine with sdhci controller driver. 2009-02-17 19:17:25 +00:00
mav
bf68918fb6 Add support for interruptless kernel dumping. 2009-02-17 19:12:15 +00:00
sbruno
64b4392c37 Simplify some debugging messages and try to consolodate some of the more
interesting conditional printf's into single device_printf's

Change a couple of variable names so that I don't have to trace what they
acutally do anymore.

Enable the display of the Self ID PHY packet if firewire_debug > 0
Reviewed by:	scottl(mentor)
MFC after:	2 weeks
2009-02-17 17:46:43 +00:00
raj
d55c3e0672 tsec(4) cosmetics. 2009-02-17 16:02:45 +00:00
raj
bcfd84f152 tsec(4): Always try to resume the receiver.
This helps recover from RX stall under heavy loads.

Submitted by:	Piotr Ziecik kosmo ! semihalf dot com
2009-02-17 15:59:27 +00:00
raj
1166819402 tsec(4): do not clear interrupt events register before use.
Prior to this fix, IEVENT register was always cleared before calling
tsec_error_intr_locked(), which prevented error recovery actions from
happening with polling enabled (and could lead to serious problems, including
controller hang).

Submitted by:	Marcin Ligenza marcinl ! pacomp dot com dot pl
2009-02-17 15:47:13 +00:00
raj
3fe0ff5e6c Handle mbuf exhaustion scenario in tsec(4).
Without this fix the system would hang under heavy networking load.

Submitted by:	Leon Theunissen leon ! parsec dot co dot za
2009-02-17 15:39:16 +00:00
raj
fbfe9d5998 tsec(4) style improvements and clean-up. 2009-02-17 14:59:47 +00:00
raj
fe8e0abcf5 Additional features for the tsec(4) Ethernet driver.
- interrupt coalescing
  - polling
  - jumbo frames
  - multicast
  - VLAN tagging

The enhanced version of the chip (eTSEC) can also take advantage of:

  - TCP/IP checksum calculation h/w offloading

Obtained from:	Freescale, Semihalf
2009-02-17 14:57:05 +00:00
sbruno
925ee6b32d Synopsis:
If speed of link between two devices is slower than the reported max
speed of both endpoints, the current driver will fail and be unable to
negotiate.

Summary:
Test negotiated speed by reading the CSRROM into a dummy variable.
If that read fails, decrement our speed and retry.  If all else fails,
go to lowest speed possible(0).

Report speed to the user.
Add display of the Bus Info Block when debug.firewire_debug > 1
Support the Bus Info Block(1394a-2000) method of speed detection.

I also should note that I am moving "hold_count" to 0 for future
releases.

This variable determines how many bus resets to "hold" a removed
firewire device before deletion.  I don't feel this is useful and will
probably drop support for this sysctl in the future.

Reviewed by:    scottl(mentor)
MFC after:      2 weeks
2009-02-17 04:08:08 +00:00
imp
94a321d142 Hold off root mounting until we've gone through the loop of our thread
almost once.  After we've configured the devices that were present the
first time through, then we know that we're done.  If the device has
other devices that are deferred, then it must do a similar dance.
This catches both PC Cards and CardBus cards.
2009-02-17 02:14:04 +00:00
mav
84129dcd67 Make core dumping to ad not to freeze even if interrupts, not disabled
for some reason, stealing our events.
2009-02-16 22:25:39 +00:00
ed
0b1127509e The streams ptm code is pretty awful and likely incorrect. I don't know
anything about streams, so I'm not going to fix it. Just a small comment
to redirect folks to posix_openpt().
2009-02-16 20:12:28 +00:00
mav
2faabf52c8 Give atapci knowledge about set of implemented AHCI ports. It is possible
to not allocate them after the recent ata channels enumeration changes.
It allows to save some resources, not bother user with unexisting hardware
and not check unimplemented ports status on every interrupt.
2009-02-16 19:10:07 +00:00
thompsa
19dd2e95bc Make uslcom compile, cut'n'paste errors from uplcom. 2009-02-15 23:38:58 +00:00
rwatson
206de182c9 Remove debug.ce.mpsafenet: we no longer support running the network
stack with conditional Giant acquisition, and IFF_NEEDSGIANT will
be removed in the near future.
2009-02-15 23:29:13 +00:00
rwatson
30dc79114a Remove debug.ctau.mpsafenet: we no longer support running the network
stack with conditional Giant acquisition, and IFF_NEEDSGIANT will
be removed in the near future.
2009-02-15 23:21:52 +00:00
rwatson
7f5a38d86d Remove debug.cp.mpsafenet: we no longer support running the network
stack with conditional Giant acquisition, and IFF_NEEDSGIANT will
be removed in the near future.
2009-02-15 23:18:29 +00:00
mav
19b1b2f405 Remove unneeded AND operation. We have already checked that bit is set. 2009-02-15 21:54:16 +00:00
mav
48f397827d Enable MSI support by default. Still can be disabled using device.hints. 2009-02-15 21:17:21 +00:00
mav
9f9ad318fe Add initial single-vector MSI support into atapci driver.
Works fine with AHCI and theoretically other MSI capable devices.

At this moment support disabled by default. To enable it, set
"hint.atapci.X.msi=1" device hint.
2009-02-15 20:37:55 +00:00
mav
1685dd7b40 Add workaround for some ATI chips, failing to soft-reset
when port multiplicator supported, but absent.
2009-02-15 16:05:48 +00:00
mav
d0e411faf1 Add SATA and PCI Advanced Features capabilities constants. 2009-02-15 09:49:21 +00:00
thompsa
8152f4da8d MFp4 //depot/projects/usb@157699
Add two new functions to the libusb20 API and required kernel ioctls.

- libusb20_dev_get_iface_desc
- libusb20_dev_get_info

New command to usbconfig, "show_ifdrv", which will print out the kernel driver
attached to the given USB device aswell.

See "man libusb20" for a detailed description.

Some minor style corrections long-line wrapping.

Submitted by:	Hans Petter Selasky
2009-02-14 23:20:00 +00:00
mav
f35949f29c Tunes to AHCI reset sequences:
- specification claims that 1 second is just a maximum controller reset time;
implement controller reset properly to save almost 1 second of boot, and
about half second of resume time;
- enable channel interrupts only after channel status reset to fix duplicate
device creation on resume due to unwanted device connection event;
- as described in specification, wait for disk ready status after channel
power-up; it is not so important when disk already touched by BIOS, but
solves device not ready problems on resume and probably some other cases.
- uncomment channel stop/start on soft-reset as it is declared mandatory by
specification; it was commented due to some random drive detection problems
on VIA and JMicron controllers, but I hope it is fixed by previous point.
2009-02-14 23:02:59 +00:00
thompsa
fd0c89ec85 - ieee80211_chan2ieee returns an int
- avoid null deref in detach
- update pause timings

Obtained from:	//depot/projects/usb
2009-02-14 22:29:54 +00:00
mav
200ea85159 DEVICE_PROBE(9) claims that we must not initialize softc on probe stage.
Move channel softc initialization from ata_XXX_probe() to ata_XXX_attach().

Instead of calculating ata channel number as position in child device list,
pass it's real number directly from controller probe routine using ivars.
It is simpler and IMHO more correct.
2009-02-14 21:54:44 +00:00
ed
900dd11db2 Remove unneeded execute-permissions from the USB2 device node.
Giving a charactere device execute permissions doesn't have any use.
Right now there isn't a single device node in /dev that has it, except
the USB2 device node, so remove it.

Approved by:	hps, thompsa
2009-02-14 19:46:28 +00:00
rrs
d22f1350d2 This commit fixes the issue with alias_sctp.c. No
longer do we require SCTP to be in the kernel for the
lib to be able to handle SCTP. We do this by moving
the CRC32c checksum into libkern/crc32.c and then adjusting
all routines to use the common methods. Note that this
will improve the performance of iSCSI since they were
using the old single 256 bit table lookup versus the
slicing 8 algorithm (which gives a 4x speed up in
CRC32c calculation :-D)

Reviewed by:rwatson, gnn, scottl, paolo
MFC after:	4 week? (assuming we MFC the alias_sctp changes)
2009-02-14 11:34:57 +00:00
thompsa
5537532d1b Since r188030 the error value for attach is returned, this means if kbdmux
fails to attach (possibly due to disable hints) then we get called back for
unload. Correctly handle the case where the keyboard isnt found rather than
calling panic.
2009-02-13 23:36:08 +00:00
thompsa
b0881f5ec6 - ieee80211_chan2ieee returns an int
- set ic_update_promisc to the same callback as mcast
- avoid null deref in zyd_detach

Obtained from:	//depot/projects/usb
2009-02-13 21:45:19 +00:00
thompsa
4324b99ee6 MFp4 //depot/projects/usb; 157501, 157608, 157609
- Make usb2_transfer_pending() part of the USB core header file.
 - Make usb2_transfer_pending() NULL safe.
 - Make sure that USB process functions return if the process has been drained.
 - Remove two unused functions.

Submitted by:   Hans Petter Selasky
2009-02-13 20:57:43 +00:00
n_hibma
da8f4523b8 Add support for CMOTECH devices (not sure whether this is the correct
name) (not sure whether this works correctly, but should be close).

Fix the stub attach phase for some Novatel cards. They expect the CSW
(repsonse to CBW, SCSI eject command) to be fetched before switching to
modem mode.

MFC after:	2 weeks
2009-02-13 19:49:51 +00:00
thompsa
046c5b5698 Add the Novatel U760. 2009-02-13 18:45:36 +00:00
sbruno
482df37a9e Update the Self ID structure to conform to 1394a-2000.
Delete the unused defines.

Reviewed by:	scottl
2009-02-13 17:45:09 +00:00
sbruno
8c071e7985 Remove redundant while () from loop.
Submitted by:	 Ganbold <ganbold@micom.mng.net>
Reviewed by:	 scottl
2009-02-13 17:44:07 +00:00
sam
864c05817a remove references to ic_stats
Spotted by:	Lucius Windschuh <lwindschuh@googlemail.com>
2009-02-13 16:17:05 +00:00
sam
73d051056b add SIOCZATHSTATS ioctl to zero driver statistics 2009-02-13 05:38:03 +00:00
sam
ca6a964ab3 add driver stat to count tx drops due to insufficient frag buffers 2009-02-13 05:30:22 +00:00
thompsa
ee4191ddcf Restore some of the link handling code that was inadvertently removed in
r188412, this broke the GU-1000T adapters.

Submitted by:	yongari
Pointy hat:	me
2009-02-13 03:38:08 +00:00
thompsa
34849d644c Add module dependency on miibus.
Submitted by:	yongari
2009-02-13 02:48:32 +00:00
yongari
a018b9ee88 Receving VLAN oversized frames raise SIS_ISR_RX_ERR interrupt, so
make sis_rxeof() handle that too. Previously it used to receive the
frame and reset controller.

PR:	kern/131414
2009-02-13 02:08:20 +00:00
sam
d59038e2ab Recognize AR5212_AR2317_REV2 in ar5312Probe()
Submitted by:	Pavel Roskin <proski@gnu.org>
2009-02-13 01:50:04 +00:00
rwatson
cd0250bb8b Remove unused ifaddr and ifreq local variables.
MFC after:	3 days
2009-02-12 23:55:35 +00:00
rdivacky
cc499f763e Remove obsolete C preprocessor assertions.
Approved by:    kib (mentor)
2009-02-12 18:33:56 +00:00
kevlo
b600a85653 Add support for the Sunix SUN1889-based dual parallel port card.
PR: kern/128219
Submitted by: Thinker K.F. Li <thinker at branda dot to>
2009-02-12 10:39:19 +00:00
mav
9770977c8f s/succeded/succeeded/ in comments. 2009-02-12 09:37:45 +00:00
sbruno
2a2a8639b1 Enhance debug messages and attempt to unify them into one format where possible.
Reviewed by:	scottl
2009-02-12 03:26:05 +00:00
sbruno
ed8ca37ec7 Update comments around various structs.
Add speeds S800, S1600 and S3200
2009-02-12 03:05:42 +00:00
sam
a648074191 fix both instances of name
Pointy hat:	sam
2009-02-11 22:34:22 +00:00
sam
32a5c53f3b fix typo in AH_CHIP definition
Submitted by:	Pavel Roskin <proski@gnu.org>
2009-02-11 22:18:03 +00:00
sam
f6d409ff3b gcc 4.3.2 examines getLowerUpperIndex() and concludes that it's not
guaranteed to initialize its two last arguments.  Therefore, there is a
warning in the subsequent caller ar5416FillVpdTable(), which doesn't
initialize those arguments.

Change getLowerUpperIndex() to assign values to indexL and indexR even
in the case of assertion failure.

Submitted by:	Pavel Roskin <proski@gnu.org>
2009-02-11 22:15:37 +00:00
jhb
7f7a900649 Fix lptopen() and lptclose() to not trash the state of the HAVEBUS flag
in 'sc_state'.  This allows the lpt_release_ppbus() calls in those two
routines to actually release the ppbus and thus fixes the hangs noticed
with the lpt(4) driver since the recent ppbus changes.  The old lpt(4)
driver didn't actually check the HAVEBUS flag in lpt_release_ppbus() which
is why these bugs weren't noticed before.
2009-02-11 14:25:09 +00:00
netchild
fe70f373f0 All open fixes and improvements from Konstantin for which users had to
use patches so far:
 + Envy24:
   - fix: broken init data for M Audio Delta DiO 2496
   - add: support for M Audio Delta 44
   - add: support for M Audio Delta 1010LT
     Tested by:	Dominique Goncalves, dominique.goncalves at gmail.com
   - add: support for Terratec EWX 2496
     Tested by:	Stefan Sperling, stsp at stsp.name
   - add: support for M Audio Delta 66
     Tested by:	Richard Bown, richard.bown at blueyonder.co.uk
   - add: support for M Audio Delta 1010
     Tested by:	Andrew Reilly, areilly at bigpond.net.au
 + Envy24HT:
   - add: support for Terrasoniq TS22PCI
   - fix: M-Audio Revolution 5.1 sound volume is very low
     Reported by:	Oliver Hartmann, ohartman at zedat.fu-berlin.de
                 	Andrey Slusar, anrays at gmail.com
     Tested by:		Andrey Slusar, anrays at gmail.com
               		Rusu Silviu, arol.the at gmail.com
   - fix: M-Audio Revolution 7.1 sound is distorted and very quiet
     Reported by:	Olev Hannula, hannula at gmail.com
     Tested by:		Olev Hannula, hannula at gmail.com
               		Stanislav Belansky, stanislav at icmail.ru
   - fix: Terratec PHASE 22 codec is power-off due to wrong init data
     Reported by:	Philipp Ost, pj at smo.de
     Tested by:		Philipp Ost, pj at smo.de
 + SpicDS:
   - fix: AK4381 produce hiss sound on 192kHz sample rate
   - fix: stupid bug with volume control for AK4396

Submitted by:	 	Konstantin Dimitrov <kosio.dimitrov@gmail.com>
2009-02-11 10:29:45 +00:00
yongari
7c51c6c0f1 Allocating 2 MSI messages do not seem to work on certain controllers
so use just 1 MSI message. This fixes regression introduced in
r188381.

Tested by:	many
2009-02-11 00:23:56 +00:00
kaiw
ed3597a696 Added entries for Lava SP-PCI (1 serial + 1 parallel) PCI card. The
card is a multifunction PCI and report itself as two logical devices.
2009-02-11 00:08:03 +00:00
sam
7388d289a6 don't do phantom beacon miss checking for s/w beacon miss handling,
this can mistakenly drop events that cause the s/w bmiss timer to
never get re-armed
2009-02-10 23:48:29 +00:00
imp
556b4fb046 Fix shutdown prototypes. 2009-02-10 23:17:20 +00:00
imp
36ef8e5ed3 Fix read_ivar prototype. 2009-02-10 23:13:48 +00:00
imp
201a4a90d9 Fix iicbus_intr, iicbus_write and device_read_ivar prototypes... 2009-02-10 22:50:23 +00:00
imp
474c2e23d2 fix arcmsr_attach, probe, detach, and shutdown prototypes to match newbus. 2009-02-10 22:46:36 +00:00
marius
05ddd147f8 Don't reset the PHY probe retry counter within the loop so
it will eventually terminate as intended.

Submitted by:	Helen Zhang
2009-02-10 21:54:23 +00:00
sam
50792711b6 mark the CLR key installed for open auth stations such that it is reclaimed
when net80211 tears down station state; without this we leak keycache slots
2009-02-10 19:27:50 +00:00
sam
80e7762b02 add hw.ath.bstuck to control the stuck beacon threshold 2009-02-10 19:26:42 +00:00
sam
22d9ca334e on resume ah_curchan may be NULL if no channel change has been done;
workaround this by passing net80211's channel as we know it'll never
be null

Submitted by:	trasz
2009-02-10 19:25:11 +00:00
sam
35694b6825 consolidate conditional code 2009-02-10 19:23:25 +00:00
cognet
2212d2d35f Hmm... "base? base : 0" and "base" should be equivalent.
Pointy hat to:	cognet

MFC after:	3 days
2009-02-09 22:59:22 +00:00
thompsa
7c2973ccba Remove usb2_config_td.[ch], they are no longer used. 2009-02-09 22:23:01 +00:00
thompsa
cbf7feac50 MFp4 //depot/projects/usb; 157429, 157433, 157443
Various changes wrt. usb procs and tasks.

Submitted by:	Hans Petter Selasky
2009-02-09 22:18:11 +00:00
thompsa
050cf3fd9c Correct sources for r188417
MFp4 //depot/projects/usb; 157412

Sync from svn.freebsd.org/base/user/thompsa/usb which is a minimal changeset
from oldUSB (no config_td).

This excludes the taskqueue changes (for the moment) as requested.
2009-02-09 22:14:38 +00:00
thompsa
1ef0c422a1 MFp4 //depot/projects/usb; 157412
Sync from svn.freebsd.org/base/user/thompsa/usb which is a minimal changeset
from oldUSB (no config_td).

This excludes the taskqueue changes (for the moment) as requested.
2009-02-09 22:12:47 +00:00
thompsa
5adda1462b MFp4 //depot/projects/usb; 157069, 157255
- Change "usb2_pause_mtx" so that it takes the timeout value in ticks
 - Make sure that attach waits for the generic probe to leave room for firware
   loader drivers and device specific USB Audio drivers like USB phone adapters

Submitted by:	Hans Petter Selasky
2009-02-09 22:11:02 +00:00
thompsa
fe2d94b798 MFp4 //depot/projects/usb; 157203
- Remove CAM layer quirks

Submitted by:	Hans Petter Selasky
2009-02-09 22:09:21 +00:00
thompsa
85679689c7 MFp4 //depot/projects/usb; 157069
- Change "usb2_pause_mtx" so that it takes the timeout value in ticks

Submitted by:	Hans Petter Selasky
2009-02-09 22:06:52 +00:00
thompsa
eb6da0bd1d MFp4 //depot/projects/usb; 157069, 157136, 157143, 157145, 157429
- USB serial drivers cleanup, factor out code
 - Simplify line state programming
 - Integrate uslcom from old USB stack

Submitted by:	Hans Petter Selasky
2009-02-09 22:05:25 +00:00
thompsa
cf8291f423 MFp4 //depot/projects/usb; 157100
1. Move most of the ifnet logic into the usb2_ethernet module, this includes,
 - make all usb ethernet interfaces named ue%d
 - handle all threading in usb2_ethernet
 - provide default ioctl handler
 - handle mbuf rx
 - provide locked callbacks for init,start,stop,etc

2. Cleanup CDC-Ethernet driver.

Submitted by:	Hans Petter Selasky
Obtained from:	svn.freebsd.org/base/user/thompsa/usb [1]
2009-02-09 22:02:38 +00:00
thompsa
1267fde951 MFp4 //depot/projects/usb; 157069, 157429, 157430
- Change "usb2_pause_mtx" so that it takes the timeout value in ticks
 - Factor out USB ethernet and USB serial driver specific control request.
 - USB process naming cleanup.

Submitted by:	Hans Petter Selasky
2009-02-09 21:56:33 +00:00
thompsa
1f67e30baf MFp4 //depot/projects/usb
- Bring in ehci2_ixp4xx.c and ehci2_mbus.c from dev/usb.

Submitted by:	Hans Petter Selasky
2009-02-09 21:50:04 +00:00
thompsa
306b60ddba MFp4 //depot/projects/usb; 157069,157296,157375,157384,157430
- Change "usb2_pause_mtx" so that it takes the timeout value in ticks
 - USB controller: EHCI High Speed Interrupt endpoint fix.
 - Fix OHCI and EHCI counting bug when multiple TD's are involved in
   a short USB transfer and a short packet happens on the non-last TD in the
   USB transfer frame.
 - USB process naming cleanup.

Submitted by:	Hans Petter Selasky
2009-02-09 21:47:39 +00:00
fjoe
6de6ef2c05 tulip_busdma_cleanup: pass correct vaddr (2nd arg) to bus_dmamem_free()
Found with:	Coverity Prevent(tm)
CID:		1998
2009-02-09 17:07:29 +00:00
fjoe
7dcae63658 Do not self-initialize a variable.
Found with:	Coverity Prevent(tm)
CID:		3864, 3865
2009-02-09 16:58:18 +00:00
fjoe
aec292fbe0 Remove unused variable.
Found with:	Coverity Prevent(tm)
CID:		3693
2009-02-09 16:57:07 +00:00
ed
95eb58b803 Properly implement GIO_ATTR and CONS_GETINFO.
It seems I didn't implement these two ioctl()'s properly, which meant
vidcontrol couldn't properly obtain certain terminal parameters.
2009-02-09 15:55:21 +00:00
yongari
001e930ccf Reclaim transmitted frames in re_tick(). This is for PCIe
controllers that lose Tx completion interrupts under certain
conditions. With this change it's safe to use MSI on PCIe
controllers so enable MSI on these controllers.
2009-02-09 04:59:13 +00:00
imp
719ba982f2 When bouncing pages, allow a new option to preserve the intra-page
offset.  This is needed for the ehci hardware buffer rings that assume
this behavior.

This is an interim solution, and a more general one is being worked
on.  This solution doesn't break anything that doesn't ask for it
directly.  The mbuf and uio variants with this flag likely don't work
and haven't been tested.

Universe builds with these changes.  I don't have a huge-memory
machine to test these changes with, but will be happy to work with
folks that do and hps if this changes turns out not to be sufficient.

Submitted by:	alfred@ from Hans Peter Selasky's original
2009-02-08 22:54:58 +00:00
thompsa
616dc8027b The NRL value in the queue head must be zero for interrupt transfers. This was
diagnosed using a USB analyser obtained through a FreeBSD Foundation grant.

Thanks to:	FreeBSD Foundation
2009-02-08 21:08:00 +00:00
sam
17606abd64 fix typo
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
2009-02-08 20:29:37 +00:00
thompsa
093a3609e4 Fix build, sigh. 2009-02-07 15:51:32 +00:00
thompsa
804c089571 Dont hold the lock over the controller init, we are still attaching. 2009-02-07 06:27:16 +00:00
sam
61f77d6544 count stuck beacon events 2009-02-07 05:34:41 +00:00
sam
1e003b5a3f fix building w/o CFI_ARMEDANDDANGEROUS 2009-02-07 05:32:19 +00:00
sam
9c81682488 expand CFI_ARMEDANDDANGEROUS to include writing the user segment
of the PR; this register is actually write-once so deserves the
safety-belt as much as the PLR
2009-02-07 05:03:25 +00:00
wkoszek
3312f12f71 si_cmdname() is defined only when SI_DEBUG is enabled, thus
using this function in simple printf() causes compile-time
problems. Use conditionally enabled DPRINT() macro instead.
2009-02-07 02:14:27 +00:00
sam
4b8982cf33 fix 11n channel construction 2009-02-07 01:54:57 +00:00
sam
f7b39f5e66 add macro for future regulatory mods 2009-02-07 01:53:44 +00:00
nwhitehorn
149d70c667 Rearrange this code slightly to pass softcs around instead of device_t,
solving a possible panic when snd_ai2s is loaded at boot time. Also change
the device setup to indicate to the pcm layer that the device is MPSAFE.

Submitted by:	Marco Trillo
Suggestions by: Ariff Abdullah
2009-02-07 01:15:13 +00:00
wkoszek
a6c32bcda6 Fix AGP debugging code:
- correct format strings
- fill opt_agp.h if AGP_DEBUG is defined
- bring AGP_DEBUG to LINT by mentioning it in NOTES

This should hopefully fix a warning that was...

Found by:	Coverity Prevent(tm)
CID:		3676
Tested on:	amd64, i386
2009-02-06 20:57:10 +00:00
kevlo
974ef5e843 In urtw_init() call urtw_stop(ifp, 0) rather than urtw_stop(ifp, 1)
to stop the device.
2009-02-06 15:27:40 +00:00
kevlo
1029fa8a52 Regen 2009-02-06 15:04:06 +00:00
kevlo
9fbefbe96f Add the Buffalo WLI-U2-SG54HG 2009-02-06 15:03:17 +00:00
imp
fdc03cf101 fix spelling error
Submitted by:	trasz
2009-02-06 09:34:17 +00:00
imp
8448edb36a Store the entire funce for disk type functions (eg CF cards and the
like).
2009-02-06 07:49:03 +00:00
wkoszek
3d93b85eb4 Remove unused variable.
Found with:	Coverity Prevent(tm)
CID:		4138
2009-02-06 00:55:19 +00:00
sam
d40450f670 add PSB channels to the calibration list 2009-02-06 00:48:56 +00:00
wkoszek
4d019c63b6 Bring consistent debugging output for all values that are supposed
to be printed in a hexadecimal format. Otherwise, '270' doesn't say
much.

Reviewed by:	imp
2009-02-05 23:51:11 +00:00
kmacy
f8d6e74e3a fix non-witness compile 2009-02-05 21:18:39 +00:00
sam
336cb9e99f eliminate gainFCorrection; just have ar5212GetGainFCorrection return
the calculated value as it's only used in one place
2009-02-05 21:13:31 +00:00
sam
18819a0562 Minor packet drop improvements:
o change tdma packet drop msg when ack required to ATH_DEBUG_TDMA
  (ATH_DEBUG_XMIT is too noisy)
o add a debug msg for raw packet drop due to interface down/invalid
o add stats for these two cases
o explain how another drop case is handled
2009-02-05 21:02:40 +00:00
sam
5b2183aa12 improve IQ cal debug msgs; in particular don't scare people by screaming
"MISGATED IQ CAL!" when it's not
2009-02-05 20:56:33 +00:00
sam
d9b4eedcd5 fill in ar5212ResetCalValid; reset the IQ valid flag on the channel
so IQ calibration will be started on the next periodic cal
2009-02-05 20:51:53 +00:00
sam
3eb0ca6204 style 2009-02-05 20:49:13 +00:00
sam
1434b839c9 replace r/w idiom with OS_REG_SET_BIT (to match other code) 2009-02-05 20:48:30 +00:00
imp
0129b996aa Don't check for mapping above 4GB on 32-bit platforms. 2009-02-05 20:44:06 +00:00
imp
5370f72626 do_product_lookup should return a const struct pccard_product *. 2009-02-05 19:39:07 +00:00
imp
7730d077dc Fix parameter types for set_res_flags and read_ivars 2009-02-05 19:38:31 +00:00
imp
3a5200e02e shutdown returns an int 2009-02-05 19:37:49 +00:00
imp
519fc8678e shutdown returns an int 2009-02-05 19:36:14 +00:00
imp
c3297b3cc4 writereg returns an int. 2009-02-05 19:33:35 +00:00
imp
1ce99eeccb writereg returns an int. 2009-02-05 19:33:20 +00:00
imp
49862b4836 Make iclear return int, since that matches all function definitions of it. 2009-02-05 19:32:34 +00:00
imp
10f81d10bb reset_epp and ecp_sync both return int. 2009-02-05 19:31:55 +00:00
imp
41dda7f4c2 Shutdown returns an int. 2009-02-05 19:30:55 +00:00
imp
1d8d2a7ac9 Add some additional debugging for the memory code. 2009-02-05 18:51:14 +00:00
imp
062d78912f device_shutdown returns an int. 2009-02-05 18:43:13 +00:00
imp
0751bde8b4 pcib_read_config and pcib_write_config take u_int params. 2009-02-05 18:40:42 +00:00
imp
935c541038 device_shutdown returns int. 2009-02-05 18:39:33 +00:00
imp
93f8c41e18 bus_add_child takes a const char *. 2009-02-05 18:38:39 +00:00
sam
a7490070eb Add support for frobbing Intel StrataFlash Protection Registers:
o add CFI_SUPPORT_STRATAFLASH compile option to enable support
o add new ioctls to get/set the factory and user/oem segments of the PR
  and to get/set Protection Lock Register that fuses the user segment
o add #defines for bits in the status register
o update cfi_wait_ready to take an offset so it can be used to wait for
  PR write completion and replace constants w/ symbolic names

Note: writing the user segment isn't correct; committing now to get review.

Sponsored by:	Carlson Wireless
Reviewed by:	imp, Chris Anderson
2009-02-05 18:12:07 +00:00
nwhitehorn
420044c9bd Fix bm_shutdown() KOBJ method to correspond to return int, as it should.
Found by:	Andriy Gapon
2009-02-04 22:16:27 +00:00
imp
f0da128350 Correct signatures to match kobj function definitions. 2009-02-04 21:11:31 +00:00
imp
d59ba59489 Shutdown routine returns int. 2009-02-04 20:39:45 +00:00
imp
00c586aa2b detach doesn't return an unsinged int, but returns an int. 2009-02-04 20:35:22 +00:00
imp
f2d1b16468 Fix shutdown routine to return 0 and change signature from void return
to int.
2009-02-04 20:26:27 +00:00
imp
26fa1c42bc Correct signature for the identify routine. The bad parameter wasn't
used at all, so this is just a tidiness excersize.
2009-02-04 20:23:42 +00:00
ed
85ebf97341 Slightly improve the design of the TTY buffer.
The TTY buffers used the standard <sys/queue.h> lists. Unfortunately
they have a big shortcoming. If you want to have a double linked list,
but no tail pointer, it's still not possible to obtain the previous
element in the list. Inside the buffers we don't need them. This is why
I switched to custom linked list macros. The macros will also keep track
of the amount of items in the list. Because it doesn't use a sentinel,
we can just initialize the queues with zero.

In its simplest form (the output queue), we will only keep two
references to blocks in the queue, namely the head of the list and the
last block in use. All free blocks are stored behind the last block in
use.

I noticed there was a very subtle bug in the previous code: in a very
uncommon corner case, it would uma_zfree() a block in the queue before
calling memcpy() to extract the data from the block.
2009-02-03 19:58:28 +00:00
jhb
51fa332ba9 Trim what we expose to userland in <dev/ppbus/ppbconf.h> to just the
constants used for the ppi(4) ioctls for bits in the control and status
registers.

Reviewed by:	db
2009-02-03 19:49:21 +00:00
sam
f50ddbb389 add Roel's copyright as he did the initial version 2009-02-03 19:21:15 +00:00
sam
1c7231d291 honor any interface width (e.g. setup by the bus shim) and don't probe;
this is needed for the moment to workaround bus shim issues
2009-02-03 19:09:16 +00:00
sam
1e53abb0ad reorg ioctl code to simplify adding new requests 2009-02-03 19:07:41 +00:00
sam
39a3163400 fix compilation w/ AH_DEBUG 2009-02-03 19:00:56 +00:00
sbruno
074cfd048f Delete fwohci_filt() as it is now unused
Obtained from:	Marius Strobl <marius@alchemy.franken.de>
MFC after:	2 weeks
2009-02-03 17:13:37 +00:00
jhb
fc0f6469f6 Don't right-adjust the SMBus slave address for SSIF IPMI BMCs enumerated
via ACPI either.  This is somewhat academic since we don't currently
support such devices though.
2009-02-03 16:39:51 +00:00
jhb
5515d5597b - Change ichsmb(4) to follow the format of all the other smbus controllers
for slave addressing by using left-adjusted slave addresses (i.e.
  xxxxxxx0b).
- Require the low bit of the slave address to always be zero in smb(4) to
  help catch broken applications.
- Adjust some code in the IPMI driver to not convert the slave address for
  SSIF to a right-adjusted address.  I (or possibly ambrisko@) added this in
  the past to (unknowingly) work around the bug in ichsmb(4).

Submitted by:	 Andriy Gapon <avg of icyb.net.ua> (1,2)
MFC after:	1 month
2009-02-03 16:14:37 +00:00
thompsa
02f472a38c - Keep the same sorting on usb_errstr_table as the enum.
- Use c99 array initializers for usb_quirk_str so the indexing isnt critical.
2009-02-03 16:00:20 +00:00
thompsa
47467836cf Add missing string table for the usb quirk enum.
Pointy hat:	me
Submitted by:	rrs
2009-02-03 15:24:00 +00:00
rrs
2688c69180 Adds support for SCTP checksum offload. This means
we, like TCP and UDP, move the checksum calculation
into the IP routines when there is no hardware support
we call into the normal SCTP checksum routine.

The next round of SCTP updates will use
this functionality. Of course the IGB driver needs
a few updates to support the new intel controller set
that actually does SCTP csum offload too.

Reviewed by:	gnn, rwatson, kmacy
2009-02-03 11:00:43 +00:00
thompsa
7c53da752d Move away from autogenerated enums, these values never change and its helpful
to be able to look them up.
2009-02-03 05:50:36 +00:00
imp
5177438e9d o Define some symbols for a few items that are bare constants in the
code.
o Use NULL in preference to 0 for a few pointers.
o default to bus timing normal, like we default to bus_width_1.
2009-02-03 04:28:45 +00:00
kmacy
797fe35608 break out of loop if we run out of mbufs 2009-02-02 23:04:20 +00:00
jhb
e2a8bf2aec Goof, catch up to constant rename (I renamed it to match the overall PCI
style of having register offsets start with PCIR_* rather than PCI_*).

Submitted by:	rss
2009-02-02 22:06:20 +00:00
emax
058ee71e32 Properly retun error core from kbdmux_modevent()
Reported by:	Christoph Mallon < christoph -dot- mallon -at- gmx -dot- de >
MFC after:	1 week
2009-02-02 21:34:04 +00:00
jhb
fafb6ced88 - Add a new ioctl to /dev/pci to fetch details on an individual BAR of a
device.  The details include the current value of the BAR (including all
  the flag bits and the current base address), its length, and whether or not
  it is enabled.  Since this operation is not invasive, non-root users are
  allowed to use it (unlike manual config register access which requires
  root).  The intention is that userland apps (such as Xorg) will use this
  interface rather than dangerously frobbing the BARs from userland to
  obtain this information.
- Add a new sub-mode to the 'list' mode of pciconf.  The -b flag when used
  with -l will now list all the active BARs for each device.

MFC after:	1 month
2009-02-02 19:54:16 +00:00
sam
286b1aea9d o make SAVE_CCK slightly less error prone by always writing the _flag
value used later by RESTORE_CCK
o swap arg order in RESTORE_CCK to slightly reduce cost
2009-02-02 16:56:58 +00:00
sam
cf42d4143e restore variable initialization removed in r187831; this broke
the horrible SAVE/RESTORE_CCK macros used by swan/nala cards to
implement 11b using 11g
2009-02-02 16:55:57 +00:00
alfred
cbd30dee28 src/usr.bin/usbhidaction/usbhidaction.c
src/usr.bin/usbhidctl/usbhid.c
src/sys/dev/usb2/include/usb2_hid.h
src/sys/dev/usb2/input/uhid2.c
src/lib/libusbhid/Makefile
src/lib/libusbhid/descr.c
src/lib/libusbhid/descr_compat.c
src/lib/libusbhid/usbhid.3
src/lib/libusbhid/usbhid.h
src/lib/libusbhid/usbvar.h

Patches to make libusbhid and HID userland utilities compatible with
the new USB stack. All HID ioctls should go through the libusbhid
library to ensure compatibility. I have found at least one piece of
software in /usr/ports which needs to get updated before USB HID
devices will work. This is the X joystick input driver.

Reported and tested by:

Daichi GOTO and Masanori OZAWA.

src/sys/dev/usb2/core/usb2_process.c

Correct USB process names.

Reported by:

Andre Guibert de Bruet

src/sys/dev/usb2/serial/uftdi2.c

Integrate changes from old USB stack.

Submitted by:	hps
2009-02-02 00:49:39 +00:00
sbruno
70a17b78b0 Some updates and bug squashing in the firewire stack.
Move the interupt handler to a driver_intr_t type function as it was trying
to do way to much for a lightweight filter interrupt function.

Introduce much more locking around fc->mtx.  Tested this for lock reversals
and other such lockups.  Locking seems to be working better, but there
is much more to do with regard to locking.  The most significant lock is
in the BUS RESET handler.  It was possible, before this checkin, to set
a bus reset via "fwcontrol -r" and have the BUS RESET handler fire before
the code responsible for asserting BUS RESET was complete.  This locking
fixes that issue.

Move some of the memory allocations in the fc struct to the attach function
in firewire.c

Rework the businfo.generation indicator to be merely a on/off bit now.
It's purpose according to spec is to notify the bus that the config ROM
has changed.  That's it.

Catch and squash a possible panic in SBP where in the SBP_LOCK was held
during a possible error case.  The error handling code would definitely
panic as it would try to acquire the SBP_LOCK on entrance.

Catch and squash a camcontrol/device lockup when firewire drives go away.
When a firewire device was powered off or disconnected from the firewire
bus, a "camcontrol rescan all" would hang trying to poll removed devices
as they were not properly detached.  Don't do that.

Approved by:	scottl
MFC after:	2 weeks
2009-02-01 23:28:52 +00:00
thompsa
c304504261 Revert part of r187970, the NULL check was removed from
udbp_bulk_read_complete() as well as udbp_attach.
2009-02-01 01:07:15 +00:00
thompsa
ee1591cd11 Remove check for null softc in attach, it can never happen. 2009-02-01 00:51:25 +00:00
mav
717b3d8e55 Fix bug in hint.hdac.X.config parsing. 2009-01-31 08:24:09 +00:00
jhb
37ae761d1d Use si_drv1 to hold the softc for the adb_mouse character device instead of
using devclass_get_softc().

Tested by:	nwhitehorn
2009-01-29 16:18:49 +00:00
ed
db7ede5c50 Make adb_mouse use dev2unit() instead of minor().
A real fix would be to migrate it to si_drv0 to store the softc
directly, but this is the quickest way to fix it right now.
2009-01-29 05:59:42 +00:00
mav
5a32ea0090 Add one more debug level. 2009-01-28 23:18:21 +00:00
mav
77bcbda080 Add hw.sdhci.debug sysctl to control debug level. 2009-01-28 22:53:41 +00:00
mav
3feadc7bee Improve mmc driver verbose logging.
Make requests logging controllable by hw.mmc.debug sysctl.
2009-01-28 22:09:00 +00:00
emax
4a6b5fa378 Update ubtbcmfw2 (aka usb2_bluetooth_fw) driver
Reviewed by:	HPS
2009-01-28 20:06:02 +00:00
emax
d26423e9d2 Make ng_ubt2 (aka usb2_bluetooth_ng) driver only attach as "generic" driver
Reviewed by:	HPS
2009-01-28 20:04:39 +00:00
sam
4d97934ead Overhaul regulatory support:
o remove HAL_CHANNEL; convert the hal to use net80211 channels; this
  mostly involves mechanical changes to variable names and channel
  attribute macros
o gut HAL_CHANNEL_PRIVATE as most of the contents are now redundant
  with the net80211 channel available
o change api for ath_hal_init_channels: no more reglass id's, no more outdoor
  indication (was a noop), anM contents
o add ath_hal_getchannels to have the hal construct a channel list without
  altering runtime state; this is used to retrieve the calibration list for
  the device in ath_getradiocaps
o add ath_hal_set_channels to take a channel list and regulatory data from
  above and construct internal state to match (maps frequencies for 900MHz
  cards, setup for CTL lookups, etc)
o compact the private channel table: we keep one private channel
  per frequency instead of one per HAL_CHANNEL; this gives a big
  space savings and potentially improves ani and calibration by
  sharing state (to be seen; didn't see anything in testing); a new config
  option AH_MAXCHAN controls the table size (default to 96 which
  was chosen to be ~3x the largest expected size)
o shrink ani state and change to mirror private channel table (one entry per
  frequency indexed by ic_devdata)
o move ani state flags to private channel state
o remove country codes; use net80211 definitions instead
o remove GSM regulatory support; it's no longer needed now that we
  pass in channel lists from above
o consolidate ADHOC_NO_11A attribute with DISALLOW_ADHOC_11A
o simplify initial channel list construction based on the EEPROM contents;
  we preserve country code support for now but may want to just fallback
  to a WWR sku and dispatch the discovered country code up to user space
  so the channel list can be constructed using the master regdomain tables
o defer to net80211 for max antenna gain
o eliminate sorting of internal channel table; now that we use ic_devdata
  as an index, table lookups are O(1)
o remove internal copy of the country code; the public one is sufficient
o remove AH_SUPPORT_11D conditional compilation; we always support 11d
o remove ath_hal_ispublicsafetysku; not needed any more
o remove ath_hal_isgsmsku; no more GSM stuff
o move Conformance Test Limit (CTL) state from private channel to a lookup
  using per-band pointers cached in the private state block
o remove regulatory class id support; was unused and belongs in net80211
o fix channel list construction to set IEEE80211_CHAN_NOADHOC,
  IEEE80211_CHAN_NOHOSTAP, and IEEE80211_CHAN_4MSXMIT
o remove private channel flags CHANNEL_DFS and CHANNEL_4MS_LIMIT; these are
  now set in the constructed net80211 channel
o store CHANNEL_NFCREQUIRED (Noise Floor Required) channel attribute in one
  of the driver-private flag bits of the net80211 channel
o move 900MHz frequency mapping into the hal; the mapped frequency is stored
  in the private channel and used throughout the hal (no more mapping in the
  driver and/or net80211)
o remove ath_hal_mhz2ieee; it's no longer needed as net80211 does the
  calculation and available in the net80211 channel
o change noise floor calibration logic to work with compacted private channel
  table setup; this may require revisiting as we no longer can distinguish
  channel attributes (e.g. 11b vs 11g vs turbo) but since the data is used
  only to calculate status data we can live with it for now
o change ah_getChipPowerLimits internal method to operate on a single channel
  instead of all channels in the private channel table
o add ath_hal_gethwchannel to map a net80211 channel to a h/w frequency
  (always the same except for 900MHz channels)
o add HAL_EEBADREG and HAL_EEBADCC status codes to better identify regulatory
  problems
o remove CTRY_DEBUG and CTRY_DEFAULT enum's; these come from net80211 now
o change ath_hal_getwirelessmodes to really return wireless modes supported
  by the hardware (was previously applying regulatory constraints)
o return channel interference status with IEEE80211_CHANSTATE_CWINT (should
  change to a callback so hal api's can take const pointers)
o remove some #define's no longer needed with the inclusion of
  <net80211/_ieee80211.h>

Sponsored by:   Carlson Wireless
2009-01-28 18:00:22 +00:00
ed
a964306db9 Last step of splitting up minor and unit numbers: remove minor().
Inside the kernel, the minor() function was responsible for obtaining
the device minor number of a character device. Because we made device
numbers dynamically allocated and independent of the unit number passed
to make_dev() a long time ago, it was actually a misnomer. If you really
want to obtain the device number, you should use dev2udev().

We already converted all the drivers to use dev2unit() to obtain the
device unit number, which is still used by a lot of drivers. I've
noticed not a single driver passes NULL to dev2unit(). Even if they
would, its behaviour would make little sense. This is why I've removed
the NULL check.

Ths commit removes minor(), minor2unit() and unit2minor() from the
kernel. Because there was a naming collision with uminor(), we can
rename umajor() and uminor() back to major() and minor(). This means
that the makedev(3) manual page also applies to kernel space code now.

I suspect umajor() and uminor() isn't used that often in external code,
but to make it easier for other parties to port their code, I've
increased __FreeBSD_version to 800062.
2009-01-28 17:57:16 +00:00
sam
b9b96b31bd change ic_getradiocaps driver callback to include the max # channels
so callers know the size of the array passed down
2009-01-27 23:19:36 +00:00
n_hibma
1390224b8b Fix the input buffer at 1024. The previous calculated buffer size
exceeded the maximum size of 1 page for OHCI controllers. Other serial
drivers use the same size, so I assume this should be enough (1MB/s
throughput?).
2009-01-27 19:37:30 +00:00
stas
5b66cc0d53 - Add support for Moxa Technologies CP-168EL/PCIe card.
Submitted by:	dmarck
MFC after:	1 week
2009-01-27 09:38:44 +00:00
jeff
ca96799f52 - Add support for nehalem/corei7 cpus. This supports all of the core
counters defined in the reference manual.  It does not support the
   'uncore' events.

Reviewed by:	jkoshy
Sponsored by:	Nokia
2009-01-27 07:29:37 +00:00
emax
3b088cf816 Clean up ng_ubt2. Get rid of excessive use of NG_NODE_REF/UNREF().
Make detach() completely synchronous. Properly handle stalled USB
transfers (use internal mechanism instead of submitting own control
transfers). Rename/remove a couple of variables and update comments.
This work was done in close collaboration with HPS.

Reviewed by:	HPS
2009-01-26 20:59:41 +00:00
jhb
311c01fa8a Don't unlock the parent ppc lock until after releasing the ppbus.
Submitted by:	csjp
2009-01-26 20:58:05 +00:00
thompsa
1319af0e18 MFp4 //depot/projects/usb/ @156706
Adjust an UHCI portreset delay.

Submitted by:	Hans Petter Selasky
2009-01-26 17:55:07 +00:00
thompsa
008f67991f Regen. 2009-01-26 17:50:20 +00:00
thompsa
23e475fdba MFp4 //depot/projects/usb/ @156522,156530
UHCI SOF Quirk. Makes some broken USB devices work again.  Reported by several
 people. Patch made by me.

Submitted by:	Hans Petter Selasky
2009-01-26 17:49:58 +00:00
thompsa
2c5a7eae69 MFp4 //depot/projects/usb/ @156521
U3G regression issue. Patch to support multiple modem instances per logical
 USB interface.

Submitted by:	Hans Petter Selasky
2009-01-26 17:47:32 +00:00
thompsa
c03ada1388 Fix up USB_GET_REPORT_DESC ioctl.
Submitted by:	daichi
2009-01-26 17:45:50 +00:00
thompsa
34c525af41 Add umass quirk.
Submitted by:	Hans Petter Selasky
2009-01-26 17:43:58 +00:00
thompsa
920a393456 Add a usb hid quirk.
Submitted by:	Andre Guibert de Bruet
2009-01-26 17:42:02 +00:00
mav
00fe6cef69 Specify analog beep pin widget for several AD codecs.
It gives working speaker control for that systems.
2009-01-26 15:55:15 +00:00
nwhitehorn
13afe7a515 Change the way our softc is stored to use the devinfo facility provided by pcm
instead of the regular device softc interface. This brings the AOA driver in
line with the other pcm drivers.

Requested by:	ariff
2009-01-26 14:43:18 +00:00
jhb
3b0fbe3800 Add missing locking around setting the ppc interrupt handler IVAR.
Reported by:	    many
2009-01-26 14:12:12 +00:00
raj
65b10fa5be Teach iic(4) the 'repeated start' I2C condition. This will be used by the
upcoming i2c(8) diag utility.

Reviewed by:	bms, stas
Obtained from:	Semihalf
2009-01-26 13:53:39 +00:00