Commit Graph

17971 Commits

Author SHA1 Message Date
Sam Leffler
411373ebc6 prepare for a new hal 2008-10-27 18:30:33 +00:00
Sam Leffler
46d4d74c94 o With the addition of HT rates the set of h/w codes has a much wider range
making the use of sc_hwmap to do direct mapping impractical.  Switch to
  indexing by the rate index instead of the rate code and adjust associated
  state and logic appropriately.  This has several benefits including
  simplification of the led code.
o fix radiotap capture of HT rates
o fix conditional compilation of HT radiotap support to be based on the
  hal having 5416 support; not the ABI version as hal builds may or may
  not include 5416 support
2008-10-27 18:22:44 +00:00
Sam Leffler
26041a143b prefer #define to naked constant 2008-10-27 18:05:26 +00:00
Sam Leffler
180f268d4d fix handling of HT rates; these overlap legacy rates and need to be
marked as MCS in the inverse mapping table
2008-10-27 18:02:47 +00:00
Sam Leffler
dd2a574e16 add hack to deal with Ubiquiti XR9 cards, they have a different mapping
between 900MHz and 2.4GHz frequencies than SR9 cards; they are distinguished
by different country codes
2008-10-27 18:00:43 +00:00
Sam Leffler
7b916f8948 install bssid for ahdemo mode too 2008-10-27 17:54:17 +00:00
Sam Leffler
5d61b5e8f0 fix comment 2008-10-27 17:53:34 +00:00
Sam Leffler
74eca0c26f correct callback status parameter; only indicate success when an ACK was
received
2008-10-27 17:52:41 +00:00
Sam Leffler
84784be1ae Fixup statistics:
o update tx rssi data only when an ACK was received
o return tx rssi from sampled data instead of the last frame
o track noise floor
o return rx rssi and noise floor (was broken)
2008-10-27 17:51:24 +00:00
Sam Leffler
ad80c0aa34 update the sta inactivity timer only if we actually received an ACK 2008-10-27 17:43:23 +00:00
Sam Leffler
96abcb94d7 Regdomain fixups:
o pass country code, outdoor indication, and ecm mode into the hal
  when requesting a channel list
o add a console msg when regulatory setup fails
o add placeholder code to map between Atheros sku's and 802.11 sku's
  that handles only the debug country code used to unlock the full
  channel list (to be used only for debugging)
o fix multiple instances of mismapping the 802.11 location to the
  outdoor indication (anywhere may be outdoor also)
2008-10-27 17:41:32 +00:00
Sam Leffler
033022a93b add regdomain debug msgs 2008-10-27 17:35:09 +00:00
Sam Leffler
577eaa6032 add sys.dev.ath.X.intmit knob to enable/disable ANI
(the intmit name is historical)
2008-10-27 17:22:46 +00:00
Sam Leffler
3297be131d shuffle debug setup to simplify debugging events during attach 2008-10-27 17:19:39 +00:00
Sam Leffler
80c07f2369 rename bf_flags to bf_txflags in preparation for the addition of flags
separate from the tx descriptor flags currently recorded
2008-10-27 17:16:46 +00:00
Sam Leffler
47db982fc9 use the ic's opmode instead of our hal equivalent to check for adhoc mode;
they are always the same
2008-10-27 17:14:39 +00:00
Sam Leffler
4b54a23144 intercept IEEE80211_IOC_TXPOWER and service tx power changes immediately 2008-10-27 17:12:41 +00:00
Sam Leffler
ec9ee5e727 move complaints about bad rate codes up a level so we can print
the h/w rate code and other useful info
2008-10-27 17:10:21 +00:00
Sam Leffler
c62362cbec remove driver-private equivalent of ni_txparms; it's now superfluous 2008-10-27 17:03:24 +00:00
Sam Leffler
1eb911a5cc now that the new association callback is used when joining a bss we can
eliminate the ath_rate_newassoc callback and associated code
2008-10-27 16:58:06 +00:00
Sam Leffler
e66b0905fc o use the new association callback to notify the driver when joining a bss
in sta and adhoc modes; this should've been done forever ago as most all
  drivers use this hook to set per-station transmit parameters such as for
  tx rate control
o adjust drivers to remove explicit calls to the driver newassoc method
2008-10-27 16:46:50 +00:00
Ed Schouten
c8978106d0 Remove unused consdev structure fields.
The cn_unit and cn_tp fields don't seem to be used anywhere. Some
drivers set them, while others don't. Just remove them, in an attempt to
make our consdev code a little easier to understand.
2008-10-27 11:45:31 +00:00
Søren Schmidt
2e9f7f6840 Only call dma.unload() if initialized.
Reported by: Stanislav Sedov
2008-10-27 09:26:24 +00:00
Nathan Whitehorn
b4dbc59983 Add ADB support. This provides support for the external ADB bus on the PowerMac
G3 as well as the internal ADB keyboard and mice in PowerBooks and iBooks. This
also brings in Mac GPIO support, for which we should eventually have a better
interface.

Obtained from:  NetBSD (CUDA and PMU drivers)
2008-10-26 19:37:38 +00:00
Robert Noland
bee8d4f213 drm/i915: fix ioremap of a user address for non-root (CVE-2008-3831)
Olaf Kirch noticed that the i915_set_status_page() function of the i915
kernel driver calls ioremap with an address offset that is supplied by
userspace via ioctl. The function zeroes the mapped memory via memset
and tells the hardware about the address. Turns out that access to that
ioctl is not restricted to root so users could probably exploit that to
do nasty things. We haven't tried to write actual exploit code though.

It only affects the Intel G33 series and newer.

Approved by:	bz (secteam)
Obtained from:	Intel drm repo
Security:	CVE-2008-3831
2008-10-25 16:29:28 +00:00
Dag-Erling Smørgrav
0db885bbaf Add an entry for the "SIIG Cyber 4 PCI 16550", which is a four-port card
based on the OX16PCI954 chip with a non-standard clock.

MFC after:	3 days
2008-10-25 10:55:49 +00:00
Alexander Motin
6b3a1c6a08 Fix spelling in comment. 2008-10-25 08:31:20 +00:00
Pyun YongHyeon
d2cd226334 Use auto-negotiation for manual media type selection. This fixes
establishment of 10/100Mbps link on Atheros AR8121(L1E).
2008-10-25 06:39:17 +00:00
Marcel Moolenaar
e00251b7ed Add a driver for flash memory that implements to the Common Flash
Memory Interface (CFI). The flash memory can be read and written
to through /dev/cfi# and an ioctl() exists so processes can read
the query information.
The driver supports the AMD and Intel command set, though only
the AMD command has been tested.

Obtained from:	Juniper Networks, Inc.
2008-10-25 06:18:12 +00:00
Nick Hibma
fb48c74147 Make the driver compile on FBSD6 as well.
Up the speed on the E220 ID as it is a part which is used in other
devices that are capable of HSPA speeds.
2008-10-24 21:52:50 +00:00
Alexander Motin
fe16530885 Add MSI support.
Tested on:	Acer TravelMate 6292 with 0x4229 chip.
Reviewed by:	sam@
2008-10-24 21:21:43 +00:00
Alexander Motin
6f6487c338 Bump the revision after the latest commits. 2008-10-24 19:36:28 +00:00
Alexander Motin
e1a5654741 Add some special handeling for AD1981HD codec. It has very unusual design
with several points unappropriate for the present parser. This patch
disables input-to-output analog monitoring but instead fixes recording.

Tested by Tobias Grosser on ThinkPad T61p.
2008-10-24 19:29:07 +00:00
Nick Hibma
fe75118b0f Add U3G_DEBUG to LINT 2008-10-24 07:16:13 +00:00
Nick Hibma
bebda7fab3 - Bugfix: Only claim interface after having checked all endpoints. This
might make Qualcomm and Option cards (which have all endpoints in 1
  interface) work.
- Change the USB buffer sizes to depend on the transfer speed. With UMTS
  we use a buffer 384k / 1000 frames/sec * 50msecs =~ 15kB for example.
- Add a MODULE_VERSION statement
2008-10-24 07:08:42 +00:00
Dag-Erling Smørgrav
e11e3f187d Fix a number of style issues in the MALLOC / FREE commit. I've tried to
be careful not to fix anything that was already broken; the NFSv4 code is
particularly bad in this respect.
2008-10-23 20:26:15 +00:00
Robert Noland
cdab8377da Replace calls to minor() with dev2unit(). Ed already fixed this once,
but I inadvertently overwrote the change when I synced to git.  Commit
the fix in both places, so this doesn't happen again.

Approved by:	jhb (mentor)
MFC after:	2 weeks
2008-10-23 20:23:03 +00:00
Robert Noland
fd3c63db72 This check is invalid and I disabled it once already. I accidentally
reintroduced it with the sync to git master.  Commit the fix in both
places this time.

Approved by:	jhb (mentor)
MFC after:	2 weeks
2008-10-23 20:19:56 +00:00
Andrew Gallatin
9e6287bf10 Update to Myri10GE Firmware 1.4.36.
This update fixes a transmit bug in the multi-queue (MSI-X) firmware
which happens when RDMAs complete out of order, and provides
improved support for the new Myri10GE NIC models (10G-PCIE-8Bx)

Sponsored by: Myricom Inc.

MFC after:3 days
2008-10-23 20:07:08 +00:00
Ed Schouten
237db0d46a Don't include <sys/clist.h> inside ucom(4) and ufoma(4).
After being ported to the MPSAFE TTY layer, these drivers do not use
clists anymore. Don't include their header files.
2008-10-23 19:16:57 +00:00
Ed Schouten
9b866e4e8b Fix detaching of uart(4) devices.
With our new TTY layer we use a two step device destruction procedure.
The TTY first gets abandoned by the device driver. When the TTY layer
notices all threads have left the TTY layer, it deallocates the TTY.

This means that the device unit number should not be reused before a
callback from the TTY layer to the device driver has been made. newbus
doesn't seem to support this concept (yet), so right now just add a
destructor with a big comment in it. It's not ideal, but at least it's
better than panicing.

Reported by:	rnoland
2008-10-23 19:11:44 +00:00
Alexander Motin
16c8eda0bd Add Intel ICH10 and SCH HDA controllers PCI IDs. 2008-10-23 18:30:06 +00:00
Dag-Erling Smørgrav
1ede983cc9 Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after:	3 months
2008-10-23 15:53:51 +00:00
Pyun YongHyeon
b8b068386a Correct PHY description and OUI of VSC8211. Previously VSC8211 was
not recognized by ciphy(4) due to the incorrect OUI.

Reported by:	nork
Tested by:	nork
2008-10-23 01:27:15 +00:00
Nick Hibma
924b35eba0 Remove a comment that belonged to a deleted if statement. 2008-10-22 20:18:47 +00:00
John Baldwin
ff80967485 Fix build with PPC_PROBE_CHIPSET enabled. 2008-10-22 19:39:16 +00:00
John Baldwin
f32b2a16a2 Fix build breakage.
Pointy hat:	jhb
2008-10-22 15:00:22 +00:00
Nick Hibma
8e6a6bfcce Remove the debug flag.
This makes the u3gstub lines and the Windows-driver CD-ROM devices
disappear.
2008-10-22 10:12:21 +00:00
Nick Hibma
ff91be3ee6 Add a device ID for the Ovation MC950D (Novatel Wireless HSUPA modem). 2008-10-21 22:14:22 +00:00
Alexander Motin
c5343d0981 Add HDA multimedia subclass. 2008-10-21 21:53:55 +00:00
Alexander Motin
a9217b5f74 Add "SD host controller" subclass name. 2008-10-21 20:55:41 +00:00
Alexander Motin
831f5dcf12 Import sdhci (PCI SD Host Controller) driver.
Driver supports PCI devices with class 8 and subclass 5 according to
SD Host Controller Specification.

Update NOTES, enable module and static build.
Enable related mmc and mmcsd modules build.

Discussed on:   mobile@, current@
2008-10-21 20:33:40 +00:00
John Baldwin
03befed82c Restore the default maximum segment size for the bus dma tag to 64k as it
is in 6.x and 7.x.  The typo caused 64k transactions to be unnecessarily
split up into two PRD entries.
2008-10-21 18:51:55 +00:00
John Baldwin
ae6b868a2a Several cleanups to remove the need for explicit unit numbers and a few
other fixes:
- Add pointers back to device_t objects in softc structures instead
  of storing the unit and using devclass_get_device().
- Add 'lpbb', 'pcf', 'pps', and 'vpo' child devices to every 'ppbus' device
  instead of just the first one.
- Store softc pointers in si_drv1 of character devices instead of
  pulling the unit number from the minor number and using
  devclass_get_softc() and devclass_get_device().
- Store the LP_BYPASS flag in si_drv2 instead of encoding it in the minor
  number.
- Destroy character devices for lpt(4) when detaching the device.
- Use bus_print_child_footer() instead of duplicating it in
  ppbus_print_child() and fix ppbus_print_child()'s return value.
- Remove unused AVM ivar from ppbus.
- Don't store the 'mode' ivar in the ppbus ivars since we always fetch it
  from the parent anyway.
- Try to detach all the child devices before deleting them in
  ppbus_detach().
- Use pause() instead of a tsleep() on a dummy address when polling the
  ppbus.
- Use if_printf() and device_printf() instead of explicit names with unit
  numbers.

Silence on:	current@
2008-10-21 18:30:10 +00:00
Kevin Lo
8dd3202c26 Remove unused age_txdq 2008-10-21 03:18:02 +00:00
Kevin Lo
381a7c1a83 No need to sync descriptors twice in age_rxintr() 2008-10-21 03:16:50 +00:00
Alexander Motin
5ce33ccf10 Make HDA PCM device boot and sndstat messages more alike to PCI device ones.
Move codec # out of the device name as it is a device address and not part of
device type name.
2008-10-20 18:37:10 +00:00
Alexander Motin
2ba3710257 Tune boot messages a bit.
Use <> brackets only at device name line.
2008-10-20 17:24:25 +00:00
Sam Leffler
1e63cecbbc fix static key wep; r183248 caused drivers to be called for keys to be
assigned to slots in the global key table but ath_key_alloc was not
updated to handle that
2008-10-19 21:34:49 +00:00
Alexander Motin
a7cf627487 Coalesce sequentional BIO_DELETE requests to slightly relax size and alignment
constraints required by the card.
2008-10-18 22:22:25 +00:00
Alexander Motin
3906d42d63 Implement BIO_DELETE command with MMC and SD erase commands.
Erase operation gives card's logic information about unused areas to help it
implement wear-leveling with lower overhead comparing to usual writing.
Erase is much faster then write and does not depends on data bus speed.
Also as result of hitting in-card write logic optimizations I have measured
up to 50% performance boost on writing undersized blocks into preerased areas.

At the same time there are strict limitations on size and allignment of erase
operations. We can erase only blocks aligned to the erase sector size and
with size multiple of it. Different cards has different erase sector size
which usually varies from 64KB to 4MB. SD cards actually allow to erase
smaller blocks, but it is much more expensive as it is implemented via
read-erase-write sequence and so not sutable for the BIO_DELETE purposes.

Reviewed by:	imp@
2008-10-18 16:17:04 +00:00
John Baldwin
dd8c8a8e43 - For chipsets that can't do 64k transfers, fall back to 32k transfers
(still a power of 2) rather than 63k transfers.  Even with 63k transfers
  some machines (such as Dell SC1435's) were experiencing chronic data
  corruption.
- Use the MIO method to talk to the Serverworks HT1000_S1 SATA controller
  like all the other SATA controllers rather than the compat PATA
  method.  This lets the controller see all 4 SATA ports and also
  matches the behavior of the Linux driver.

Silence from:	sos
MFC after:	3 days
2008-10-17 16:03:37 +00:00
Brooks Davis
554fad8449 Wireless Mouse device of Sony VGP-WRC1 mouse/keyboard receiver has the
same program interface as Microsoft Wireless Notebook Optical Mouse and
needs a quirk.

PR:		usb/122712
MFC after:	3 days
2008-10-17 14:37:58 +00:00
Kip Macy
9762ac4204 Track number of packets transmitted and number of packets received
PR:	125806
MFC after:	3 days
2008-10-17 07:04:29 +00:00
Pyun YongHyeon
b435227b7d Some 88E1149 PHY's page select is initialized to point to other
bank instead of copper/fiber bank which in turn resulted in
wrong registers were accessed during PHY operation. It is
believed that page 0 should be used for copper PHY so reinitialize
E1000_EADR to select default copper PHY.
This fixes link establishment issue of nfe(4) on Sun Fire X4140.

OpenBSD also has similimar patch but they just reset the E1000_EADR
register to page 0. However some Marvell PHYs((88E3082, 88E1000)
don't have the extended address register and the meaning of the
register is quite different for each PHY model. So selecting copper
PHY is limited to 88E1149 PHY which seems to be the only one that
exhibits link establishment problem. If parent device know the type
of PHY(either copper or fiber) that information should be notified
to PHY driver but there is no good way to pass this information yet.

Reported by:	thompsa
Reviewed by:	thompsa
2008-10-17 05:26:51 +00:00
Nick Hibma
4f68abd1cb Rewrite the driver to better support the Huawei devices. It should now support
the Sierra and Novatel devices, ignore all umass devices and hide the umass
devices that represent the CD ROM devices (but not the SD card slot in the
Huawei Mobile dongle).

Note: This driver in FBSD7 seems to suffer from memory corruption when used
with an Option GT Quad. The E220 however works flawlessly.

Also add the ID for the Option GTMaxHSUPA, provided by Olivier Fromme.
2008-10-15 21:25:11 +00:00
Marius Strobl
c00cf72245 Use bus_{read,write}_4(9) instead of bus_space_{read,write}_4(9)
in order to get rid of the bus space handle and tag in the softc.

MFC after:	1 month
2008-10-14 20:28:42 +00:00
Marius Strobl
1675bf71ae Use xpt_register_async() in order to remove code duplication.
MFC after:	1 month
2008-10-14 20:18:57 +00:00
Alexander Motin
7be3ed1dfe Add all Sigmatel/IDT codecs I could find.
Add IDT and Intel unknown codecs.

PR:		kern/125822
2008-10-14 19:58:26 +00:00
Andrew Thompson
657197c42e Remove the 'old' Novatel MC950D entry which was slightly incorrect, NetBSD has
already picked up the new name so run with it.
2008-10-14 18:24:40 +00:00
Jean-Sébastien Pédron
19ff29fb35 Rewrite Synaptics touchpads support with the following goals in mind:
o  better quality of the movement smoothing
    o  more features such as tap-hold and virtual scrolling

Support must still be enabled with this line in your /boot/loader.conf:
    hw.psm.synaptics_support="1"

The following sysctls were removed:
    hw.psm.synaptics.low_speed_threshold
    hw.psm.synaptics.min_movement
    hw.psm.synaptics.squelch_level

An overview of this new driver and a short documentation about the added
sysctls is available on the wiki:
http://wiki.freebsd.org/SynapticsTouchpad
2008-10-14 17:48:36 +00:00
Nick Hibma
5d4bf57eea Add back in the (incorrect) entry for the MC950D, as requested by Andrew
Thompson. They should not be removed in support of 3rd party software.
2008-10-14 15:19:02 +00:00
Nathan Whitehorn
51d163d3e9 Convert PowerPC AIM PCI and nexus busses to standard OFW bus interface. This
simplifies certain device attachments (Kauai ATA, for instance), and makes
possible others on new hardware.

On G5 systems, there are several otherwise standard PCI devices
(Serverworks SATA) that will not allow their interrupt properties to be
written, so this information must be supplied directly from Open Firmware.

Obtained from:	sparc64
2008-10-14 14:54:14 +00:00
Nick Hibma
c0fb8e1476 Move all the hacks for the Huawei, Novatel and Qualcomm cards into a stub
driver.

This stub also hides the devices until they are ready to be used to avoid
confusion (commented out for now).
2008-10-14 08:41:54 +00:00
Nick Hibma
84fc65da9f Fix a comment.
Submitted by:	Nick Mann
2008-10-14 07:52:47 +00:00
Nick Hibma
caae4b7f29 - Fix the naming of the MC950D device.
- Remove the (unimplemented) U3GFL_EJECT quirk as this won't be implemented in
  the u3g driver anyway (most probably as an entry in devd.conf)
2008-10-14 07:45:11 +00:00
Rafal Jaworowski
9f55f5f5cf Marvell Gigabit Ethernet controller driver.
This supports 1Gbps Ethernet engine found on ARM-based SOCs (Orion, Kirkwood,
Discovery), as well as on system controllers for PowerPC processors (MV64430,
MV6446x).

The following advanced features are supported:

  - multicast
  - VLAN tagging
  - IP/TCP/UDP checksum calculation offloading
  - polling
  - interrupt coalescing

Obtained from:	Marvell, Semihalf
2008-10-14 07:24:18 +00:00
Rafal Jaworowski
f7ef7369fa Mbus attachment for USB EHCI integrated controller on Marvell chips.
This includes workarounds required for the ehci(4) to handle some non-standard
behaviour of these devices.

Obtained from:	Marvell, Semihalf
2008-10-14 07:05:20 +00:00
Pyun YongHyeon
08c23fcaae Make sure to read the last byte of EEPROM descriptor. Previously
the last byte of the ethernet address was not read which in turn
resulted in getting 5 out of the 6 bytes of ethernet address and
always returned ENOENT. I did not notice the bug on FPGA version
because of additional configuration data in EEPROM.

Pointed out by:	bouyer at NetBSD
2008-10-14 00:54:15 +00:00
Nick Hibma
1e5edb1552 - Add better support for Huawei cards, by attaching as an interface driver.
- Be bold and add Novatel cards to the list of supported devices. One person
  reported success with the Novatal U950D.
2008-10-13 20:41:11 +00:00
Nick Hibma
b8dba4a89a - Only refuse to attach to the first interface on the Huawei cards as for
example the Huawei Mobile has an SD card slot on the second interface.
- Do not attach to Qualcomm and Novatel cards. If ignored these cards will
  switch to modem mode automatically it seems.
- Reduce the priority on generic attachment to the appropriate level.

Note: A better solution is to send an eject command straightaway, but that can
be left till later.
2008-10-13 20:38:33 +00:00
Rafal Jaworowski
373bbe25ff Introduce basic support for Marvell families of system-on-chip ARM devices:
*  Orion
     - 88F5181
     - 88F5182
     - 88F5281

  * Kirkwood
     - 88F6281

  * Discovery
     - MV78100

The above families of SOCs are built around CPU cores compliant with ARMv5TE
instruction set architecture definition. They share a number of integrated
peripherals. This commit brings support for the following basic elements:

  * GPIO
  * Interrupt controller
  * L1, L2 cache
  * Timers, watchdog, RTC
  * TWSI (I2C)
  * UART

Other peripherals drivers will be introduced separately.

Reviewed by:	imp, marcel, stass (Thanks guys!)
Obtained from:	Marvell, Semihalf
2008-10-13 20:07:13 +00:00
Robert Noland
206267e7bb Correct memory leak of info->rects. Previously we would free info, but
but abandon info->rects.

Approved by:	jhb (mentor)
2008-10-13 18:06:33 +00:00
Robert Noland
f00755f06b Rework memory allocation to allocate memory with different type names. This
will ease the identification of memory leaks as the OS will be able to track
allocations for us by malloc type.  vmstat -m will show all of the
allocations.

Convert the calls to drm_alloc() and friends, which are used in shared code
to static __inline__ while we are here.

Approved by:	jhb (mentor)
2008-10-13 18:03:27 +00:00
Robert Noland
b470dd86f8 The linux list compat code had an error which prevented list_for_each_safe()
from operating on a list with a single item.  This code is used much more by
the i915 driver with xorg-7.4.  Correct it to match the actual linux
implementation.

Approved by:	jhb (mentor)
2008-10-13 17:52:41 +00:00
Robert Noland
41c257c7bf Correct the interrupt handling in the Intel i915 driver.
Approved by:	jhb (mentor)
2008-10-13 17:47:13 +00:00
Robert Noland
af2da6a40e Several of the newer radeon cards have moved around the registers for enabling
busmastering support.  This also adds register definitions for MSI support,
which we will be using shortly.

Approved by:	jhb (mentor)
Obtained from:	drm git master
2008-10-13 17:43:39 +00:00
Robert Noland
b8865a7993 Add support for Radeon rs740 (HD 2100)
Approved by:	jhb (mentor)
Obtained from:	drm git master
2008-10-13 17:38:04 +00:00
Nathan Whitehorn
1209e7e538 Change the way we enable the BMAC cell in macio. Instead of calling the
macio's enable-enet word, which apparently does nothing on some machines,
open an OF instance of the ethernet controller. This fixes cold booting
from disk on my Blue & White G3.

MFC after:	3 days
2008-10-13 17:33:55 +00:00
Dag-Erling Smørgrav
c44bdcb048 Revert r179409; it breaks all OX16PCI954-based cards except the SIIG 4.
MFC after:	3 days
2008-10-13 12:28:33 +00:00
Pyun YongHyeon
a8061cb7e2 Read PCI device id instead of PCI revision id. Also checks the read
device id is JMC260 family. Previously it just verified the deivce
is JMC260 Rev A0. This will make it easy for newer JMC2xx support.

Pointed out by:	bouyer at NetBSD
2008-10-13 01:11:28 +00:00
Alexander Motin
f5803010bb Bump driver revision after the previous commit. 2008-10-12 21:46:11 +00:00
Alexander Motin
bbbf908dad Fix bug in a second call of the channel allocation function.
This should fix crash on systems where two audio codecs connected
to the same HDA bus.
2008-10-12 21:42:21 +00:00
Alexander Motin
58bb626051 Use GB suffix only from 10GB instead of 1GB.
There are lot of cards with uneven sizes and too strong rounding
will lead to very significant rounding errors.

Reviewed by:	imp@
2008-10-12 19:19:26 +00:00
Warner Losh
b231f5d9b1 style(9): spaces around operators. 2008-10-12 07:30:05 +00:00
Warner Losh
a0075e5860 Print the cards natural size.
Move nested tertiary operator expressions into their own function.
Remove extra blank line.
cache sd->disk in 'd' to make the code easier to read.
2008-10-12 07:24:31 +00:00
Alexander Motin
eecec5bd59 SELECT_CARD command with zero RCA deselects all cards and so has no reply. 2008-10-11 17:30:02 +00:00
Alexander Motin
67d752c3d4 Give mmcsd driver a bit more information about card. It allows to reorganize
log message in a way a bit more common for disk devices. Also it will allow
mmcsd driver to use MMC/SD specific commands when needed.
2008-10-11 13:05:13 +00:00
Rui Paulo
cc33506b6a Move Qualcomm ZTE CDMA from ubsa(4) to u3g(4).
Reviewed by:	n_hibma
2008-10-11 10:47:18 +00:00
Nick Hibma
6b386d393c Typo. 2008-10-10 20:05:15 +00:00
Nick Hibma
9c86351529 Typo in ifdef.
Submitted by:	Andrew Thompson
2008-10-10 07:16:44 +00:00
Nick Hibma
483b9e4739 Say hello to the u3g driver, implementing support for 3G modems.
This was located in the ubsa driver, but should be moved into a separate
driver:

- 3G modems provide multiple serial ports to allow AT commands while the PPP
  connection is up.
- 3G modems do not provide baud rate or other serial port settings.
- Huawei cards need specific initialisation.
- ubsa is for Belkin adapters, an Linuxy choice for another device like 3G.

Speeds achieved here with a weak signal at best is ~40kb/s (UMTS). No spooky
STALLED messages as well.

Next: Move over all entries for Sierra and Novatel cards once I have found
testers, and implemented serial port enumeration for Sierra (or rather have
Andrea Guzzo do it). They list all endpoints in 1 iface instead of 4 ifaces.

Submitted by:	aguzzo@anywi.com
MFC after:	3 weeks
2008-10-09 21:25:01 +00:00
Nick Hibma
bd48866fd8 uark/ucom: Minor code cleanup.
umass; Remove duplicated code.
ukbd: Fill in the arg parameter on the through call.
2008-10-09 20:51:25 +00:00
Alexander Motin
fa5f41d31c Add high capacity MMC cards support. 2008-10-09 20:09:56 +00:00
Warner Losh
4871891e2c o Use seprate routines to decode cid and csd for sd and mmc cards. All they
have in common right now is a memset.  This saves a parameter to
  these routines, as well as a level of indentation.
o Make mmc_get_bits a little clearer...  It really only works on 128-bit
  registers right now.
2008-10-09 19:47:28 +00:00
Nick Hibma
5d4621f495 Add modules for the HCI part of USB. This is convenient when having a UHCI
controller in your laptop but inserting a (OHCI-based) Option Cardbus card.
2008-10-09 19:22:00 +00:00
Joseph Koshy
789140c0e7 - Sparsely number enumerations 'pmc_cputype' and 'pmc_event' in order to
reduce ABI disruptions when new cpu types and new PMC events are added
  in the future.
- Support alternate spellings for PMC events.  Derive the canonical
  spelling of an event name from its enumeration name in 'enum pmc_event'.
- Provide a way for users to disambiguate between identically named events
  supported by multiple classes of PMCs in a CPU.
- Change libpmc's machine-dependent event specifier parsing code to
  better support CPUs containing two or more classes of PMC resources.
2008-10-09 14:55:45 +00:00
Søren Schmidt
13014ca04a This is the roumored ATA modulerisation works, and it needs a little explanation.
If you just config KERNEL as usual there should be no apparent changes, you'll get all chipset support code compiled in.

However there is now a way to only compile in code for chipsets needed on a pr vendor basis. ATA now has the following "device" entries:

atacore:	ATA core functionality, always needed for any ATA setup

atacard:	CARDBUS support
atacbus:	PC98 cbus support
ataisa:		ISA bus support
atapci:		PCI bus support only generic chipset support.

ataahci:	AHCI support, also pulled in by some vendor modules.

ataacard, ataacerlabs, ataadaptec, ataamd, ataati, atacenatek, atacypress, atacyrix, atahighpoint, ataintel, ataite, atajmicron, atamarvell, atamicron, atanational, atanetcell, atanvidia, atapromise, ataserverworks, atasiliconimage, atasis, atavia;	Vendor support, ie atavia for VIA chipsets

atadisk:	ATA disk driver
ataraid:	ATA softraid driver

atapicd:	ATAPI cd/dvd driver
atapifd:	ATAPI floppy/flashdisk driver
atapist:	ATAPI tape driver

atausb:		ATA<>USB bridge
atapicam:	ATA<>CAM bridge

This makes it possible to config a kernel with just VIA chipset support by having the following ATA lines in the kernel config file:

device          atacore
device          atapci
device          atavia

And then you need the atadisk, atapicd etc lines in there just as usual.

If you use ATA as modules loaded at boot there is few changes except the rename of the "ata" module to "atacore", things looks just as usual.
However under atapci you now have a whole bunch of vendor specific drivers, that you can kldload individually depending on you needs. Drivers have the same names as used in the kernel config explained above.
2008-10-09 12:56:57 +00:00
Joseph Koshy
e7518209e7 Rework pmc-dependent flag handling. 2008-10-09 06:19:42 +00:00
Alexander Motin
49dd20d149 Only voltage bits should be zero in send_op_cond argument to ignore busy. 2008-10-08 21:10:55 +00:00
Alexander Motin
8d66abb099 Generic SD Host Controller driver going to be named sdhci. 2008-10-08 20:00:51 +00:00
Alexander Motin
07492efe64 Fix bit offset in mmc_sd_switch(). 2008-10-08 18:13:14 +00:00
Alexander Motin
c18f1e2627 Set of mmc layer improvements:
- add MMC support.
 - add SDHC support.
 - add 4 and 8 bit bus width support.
 - add High Speed bus timing support.
2008-10-08 17:35:41 +00:00
Poul-Henning Kamp
0072533acb Quirks for SDS-infrared.com "Hotfind-D" camera.
PR:		127943
2008-10-08 13:53:47 +00:00
Warner Losh
e21f22596b Add a note about a bug in how sio manages its softc. This was
discovered by Dorr H. Clark.  I'm not at all sure how to fix it, but
wanted to document it at the very least...
2008-10-08 08:08:03 +00:00
Warner Losh
81ea17f095 Pass bus_get_dma_tag() into the first argument of bus_dma_create_tag()
rather than NULL.
2008-10-07 23:55:32 +00:00
Xin LI
c94526e26d Limit DMA memory to lower addressable 4GB, without this patch, we
can reliably provoke data corruption on systems equipped with a
plenty of memory during high load.

Reported by:	gnn via iXsystems
MFC candidate:	RELENG_7_1, RELENG_7
2008-10-06 22:34:17 +00:00
Joseph Koshy
8fb796642a Correct a typo. 2008-10-06 10:34:44 +00:00
Robert Noland
6059e92408 Don't explicitly bzer driver softc
new-bus already handles this for us.

Suggested by jhb@

Approved by:	jhb (mentor)
2008-10-04 14:51:14 +00:00
Robert Noland
e0b8582173 Use M_WAITOK when allocating driver memory
We don't explicity check for error here and M_WAITOK will just put the
process to sleep waiting on resources to become available.

Suggested by jhb@

Approved by:	jhb (mentor)
2008-10-04 14:48:40 +00:00
Robert Noland
4d3ad1c1a6 Change drm_order() to use ffsl()
pointed out by jhb@

Approved by:	jhb (mentor)
2008-10-04 14:45:34 +00:00
Antoine Brodin
61d9c8fa17 - Spell cam correctly (scbus), this makes it possible to compile hptiop
in GENERIC and LINT. [1]
- Rename hpt_dbg_level to hpt_iop_dbg_level to avoid multiple definition
of hpt_dbg_level (hptmv also has hpt_dbg_level).

PR:		127551 [1]
Reviewed by:	scottl@
MFC after:	1 month
2008-10-04 10:39:31 +00:00
Joseph Koshy
75111b3638 Fix a typo. 2008-10-04 07:19:26 +00:00
Weongyo Jeong
db102f9a37 sc->ndis_txidx should be cycle between 0 and sc->ndis_maxpkts, not
NDIS_TXPKTS and don't allocate unused extra spaces for sc->ndis_txarray
and sc->ndis_txpool.

PR:		kern/127644
Submitted by:	Antoine Pelisse <apelisse_at_gmail.com>
MFC after:	1 week
2008-10-04 04:15:39 +00:00
Robert Noland
4cd2e9581f resync to git master
This reverts a private patch which is causing issues with many Intel chipsets.
I will review that patch and see what we need to do to fix it up later, but
for the time being, we will just get these chips working again.

This update contains a lot of code cleanup and is post gem merge
(no, we don't have gem support).  It should prove much easier to read the
code now.  A lot of thanks goes to vehemens for that work.  I have adapted
the code to use cdevpriv for tracking per open file data.  That alleviates
the old ugly hack that we used to try and accomplish the task and helped to
clean up the open / close behavior a good bit.  This also replaces the hack
that was put in place a year or so ago to prevent radeons from locking up
with AIGLX enabled.  I have had a couple of radeon testers report that it
still works as expected, though I no longer have radeon hardware to test with
myself.  Other various fixes from the linux crew and Intel, many of
which are muddled in with the gem merge.

Approved by:	jhb (mentor)
Obtained from:	mesa/drm git master
MFC after:	2 weeks
2008-10-03 16:59:11 +00:00
Stanislav Sedov
ba26d470bd - Add driver for Attansic L2 FastEthernet controller found on
Asus EeePC and some Asus mainboards.

Reviewed by:	yongari, rpaulo, jhb
Tested by:	many
Approved by:	kib (mentor)
MFC after:	1 week
2008-10-03 10:31:31 +00:00
Pyun YongHyeon
17d022beb2 Add hardware MAC statistics support. Register information was
obtained from Linux forcedeth driver.
While I'm here move creating a sysctl node for process_limit to
function nfe_sysctl_node().

Tested by:	"Arno J. Klaassen" < arno <at> heho dot snv dot jussieu dot fr >
2008-10-03 03:58:16 +00:00
Kip Macy
5ec372d1fa Fix bug in LRO on T304 whereby a packet could be sent to the wrong interface's ifp.
Submitted by:	Chelsio Inc.
MFC after:	1 day
2008-10-03 00:50:26 +00:00
Warner Losh
a3f223e26a Return BUS_PROBE_GENERIC rather BUS_PROBE_DEFAULT for generic CBB we match.
Reviewed by:	jhb@
2008-10-02 22:50:11 +00:00
Robert Noland
06aaad6aaa Correctly handle Intel g33 chips and add support for g45 chips
g33 based chips use a different method of identifying the gtt size.
g45 based chips gtt is located in a different area of stolen memory.

Approved by:	jhb (mentor)
MFC after:	2 weeks
2008-10-02 20:29:45 +00:00
Søren Schmidt
0cf07094ca Add ICH10 PCI id's.
Submitted by:	Xin Li

Fix the number of PATA ports on newer ICHX chips, they have just 1 port not 2.
2008-10-02 19:18:28 +00:00
Marko Zec
8b615593fc Step 1.5 of importing the network stack virtualization infrastructure
from the vimage project, as per plan established at devsummit 08/08:
http://wiki.freebsd.org/Image/Notes200808DevSummit

Introduce INIT_VNET_*() initializer macros, VNET_FOREACH() iterator
macros, and CURVNET_SET() context setting macros, all currently
resolving to NOPs.

Prepare for virtualization of selected SYSCTL objects by introducing a
family of SYSCTL_V_*() macros, currently resolving to their global
counterparts, i.e. SYSCTL_V_INT() == SYSCTL_INT().

Move selected #defines from sys/sys/vimage.h to newly introduced header
files specific to virtualized subsystems (sys/net/vnet.h,
sys/netinet/vinet.h etc.).

All the changes are verified to have zero functional impact at this
point in time by doing MD5 comparision between pre- and post-change
object files(*).

(*) netipsec/keysock.c did not validate depending on compile time options.

Implemented by:	julian, bz, brooks, zec
Reviewed by:	julian, bz, brooks, kris, rwatson, ...
Approved by:	julian (mentor)
Obtained from:	//depot/projects/vimage-commit2/...
X-MFC after:	never
Sponsored by:	NLnet Foundation, The FreeBSD Foundation
2008-10-02 15:37:58 +00:00
Warner Losh
38c51cbe85 Define and use MMC_SECTOR_SIZE.
Make mmc_get_media_size now return an off_t and remove now useless cast.
2008-10-02 07:06:59 +00:00
Warner Losh
a84f3c7af9 MAXPHYS seems more stable on the AT91RM9200 boards that I have. We
may need to ask the host controller for the right number to use
here...
2008-10-02 07:00:31 +00:00
Warner Losh
6e31e5ebde Don't forget to match on a CLASS of PCIC_BRIDGE as well as subclass
PCIS_BRIDGE_CARDBUS.  Otherwise, we may hit a few false positives....
2008-10-02 06:29:45 +00:00
Joseph Koshy
3d8d41b7c3 Correct misspellings. 2008-10-02 06:18:09 +00:00
Andrew Gallatin
88843c5481 Update to Myri10GE firmware version 1.4.33 from 1.4.29. Relevant changes include:
- Support for Myricom 10G-PCIE-8B NICs

- multi-slice firmware: fix a bug when the presence of 32-bit or
 64-bit DMA addresses for interrupt queues and data is not uniform across
 slices.

- Improves automatic selection between ethp_z8e/eth_z8e

Sponsored by: Myricom Inc.
2008-10-01 16:23:35 +00:00
Pyun YongHyeon
be38e61a52 Add device ids for MCP77/79 and set appropriate support flags.
Obtained from:  OpenBSD
PR:		kern/127529
2008-10-01 00:17:54 +00:00
Kip Macy
1cfe52493f update callers of vm_fault_hold_user_pages
MFC after:	1 week
2008-09-30 23:45:22 +00:00
Kip Macy
7585919a7f Refactor vm_fault_hold_user_pages:
- simplify page hold logic
- allow pages for processes other than that of curthread to
  have pages held
- normalize the interface to more closely resemble the functions in
  sys/vm

MFC after:	1 week
2008-09-30 23:44:44 +00:00
Kip Macy
41509ecd3a Make sure that optical PHYs work ...
Submitted by:	Chelsio Inc.
MFC after:	1 day
2008-09-30 21:21:52 +00:00
Marius Strobl
36bef328f5 cosmetic changes and style fixes 2008-09-30 20:53:15 +00:00
Marius Strobl
2d3c782de1 Use bus_get_dma_tag() so fatm(4) works on platforms requiring it.
Reported and tested by:	Sean Thomas Caron
MFC after:		3 days
2008-09-30 18:52:43 +00:00
Pyun YongHyeon
10bace3e92 Save extended address register prior to switching to 1000BASE-X
only mode and restore original value of extended address register
instead of overwriting it with page 1. There are still instance
information passing issue(e.g configured media type: fiber or
copper) from driver to PHY layer but this change make the selected
PHY work with 88E1112 PHY.

Reported by:	Krzysztof Jedruczyk < beaker <at> hot dot pl >
Tested by:	Krzysztof Jedruczyk < beaker <at> hot dot pl >
2008-09-30 08:18:38 +00:00
Pyun YongHyeon
fdf7d60d6a Add Vitesse VSC8211 PHY which is found on Planex GU-1000T.
HW donated by:	nork
2008-09-30 07:30:05 +00:00
Pyun YongHyeon
f350b4e7cf Explicitly mark IFM_HDX for half-duplex media. 2008-09-30 07:24:20 +00:00
Pyun YongHyeon
937982244e Report current link state while auto-negotiation is in progress. 2008-09-30 07:22:02 +00:00
Pyun YongHyeon
eb10e72371 Use mii_anegticks instead of hardcoded MII_ANEGTICKS. 2008-09-30 07:20:26 +00:00
Pyun YongHyeon
138b38fffa Announce link loss right after it happens. 2008-09-30 07:19:01 +00:00
Pyun YongHyeon
ad415775a1 If mbuf is not writable get a writable copy before invoking
m_pullup(9).

Tested by:	Garrett Cooper < yanefbsd <at> gmail dot com >
2008-09-30 04:52:30 +00:00
Pyun YongHyeon
925da971b8 Always pullup mbuf prior to accessing TCP header.
This should fix occasional Tx checksum corruption issue.

Reported by:	Garrett Cooper < yanefbsd <at> gmail dot com >
Tested by:	Garrett Cooper < yanefbsd <at> gmail dot com >
2008-09-30 04:47:49 +00:00
Warner Losh
0c0903b1e1 Improve support for multiple block read/write. This code is currently
disabled by default because there's problems with it on AT91RM9200,
currently the only host controller in the tree.  I've not had time to
track those problems to ground.  I'm committing because this is
important for other host controllers that are in the pipeline.

Submitted by:	mav@
2008-09-30 02:34:45 +00:00
Kip Macy
e2b2d0e9d5 vm_fault_hold_user_pages will not return if an address in the range passed in is mapped RO
but an RW mapping exists for the underlying page. This change fixes the bug by using the
page / NULL returned from pmap_extract_and_hold to determine whether or not vm_fault needs
to be called.

The bug was pointed out by alc.

MFC after:	3 days
2008-09-29 22:13:29 +00:00
Warner Losh
051bc8ead2 Make the media size return the block rather than the bytes on the device. 2008-09-29 18:55:45 +00:00
Warner Losh
4e0efe35fa Explicitly set data to NULL rather than relying mmc_wait_for_cmd() to
do it for us.  There may be commands we have to wait for that need to
set data.

Submitted by:	mav@
2008-09-29 18:33:08 +00:00
Warner Losh
dece39ab88 Minor style fixes from mav@ (with similar problems fixed where I noticed
them):
	#define<tab>
	zero memory when we allocate it
	Put device name in error message.

Submitted by:	mav@
2008-09-29 18:17:23 +00:00
Warner Losh
128d0ff2c4 Conform to style(9) for return (foo); The files were a mix before.
Submitted by:	mav@
2008-09-29 18:05:26 +00:00
Warner Losh
6fdacf52be Convert all C++ comments to C style. There's lots of folks that don't
like them and they don't add enough to be worth standing out.
2008-09-29 01:32:21 +00:00
Warner Losh
e9bb9da34d The parameters to the MMCBR_ACQUIRE_HOST and MMCBR_RELEAES_HOST were
the device in question, rather than the bus doing the requesting.  Fix
it so that it is the bus.

Submitted by:	mav@
2008-09-29 01:28:30 +00:00
Warner Losh
bd2bbf2483 Add "caps" word to host bridge. 2008-09-28 23:37:06 +00:00
Warner Losh
5d2f651035 Implement power down, and power down the bus on detach.
Submitted by:	mav@
2008-09-28 23:24:52 +00:00
Warner Losh
08eb9a9be8 When a device is read only, fail all non-read BIO requests.
Submitted by:	mav@
2008-09-28 22:42:29 +00:00
Warner Losh
40fab6e7c7 Propigate read-only status of cards. Right now it is read only at
device attach time.  We may need to read this more often in the
future, but for now simplicity of implementation wins.

Submitted by:	mav@
2008-09-28 22:40:11 +00:00
Warner Losh
8aaa15e202 The OCR register defines both acceptable voltage bits, as well as bits
for other things.  Mask out the voltage only bits when returning the
Vdd mask for voltage computation.

Submitted by:	mav@
2008-09-28 22:27:29 +00:00
Warner Losh
2703cdbb1b Other busses on the system use the official capitalization for the
technology.  Make mmc conform to that.

Submitted by:	mav@
2008-09-28 22:23:06 +00:00
Warner Losh
752fe3b39e Fix line continuation whitespace.
Submitted by:	mav@
2008-09-28 22:21:53 +00:00
Warner Losh
750595ef63 Change while (cond)\n\t\t; to while (cond)\n\t\tcontinue; since the
former more explicitly tells the compiler that you want an empty loop.
There are some lint programs that use this hint to avoid generating
warnings.

No functional change...
2008-09-28 03:33:01 +00:00
Ed Schouten
6bfa9a2d66 Replace all calls to minor() with dev2unit().
After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by:	kib
2008-09-27 08:51:18 +00:00
Ed Schouten
d3ce832719 Remove unit2minor() use from kernel code.
When I changed kern_conf.c three months ago I made device unit numbers
equal to (unneeded) device minor numbers. We used to require
bitshifting, because there were eight bits in the middle that were
reserved for a device major number. Not very long after I turned
dev2unit(), minor(), unit2minor() and minor2unit() into macro's.
The unit2minor() and minor2unit() macro's were no-ops.

We'd better not remove these four macro's from the kernel, because there
is a lot of (external) code that may still depend on them. For now it's
harmless to remove all invocations of unit2minor() and minor2unit().

Reviewed by:	kib
2008-09-26 14:19:52 +00:00
Søren Schmidt
ed0c85e094 Add support for the ITE 8213 controller.
Thanks goes to ITE who provided docs and feedback and made this possible.

Minor fixups to the Intel ICH code for bugs found while doing this.
(ITE8213 is very semilar to an Intel ICH)

MFC after: 1 week
2008-09-26 07:29:48 +00:00
Warner Losh
767b32095f Use some casting to get the right addresses. This is likely unwise
code, but will be OK until there's a 64-bit siba...

With this change, SENTRY5 kernel now compiles for mips, the last of
the holdouts.
2008-09-26 05:40:56 +00:00
Warner Losh
6f079ba163 Catch up to latest tty, kdb and SYSINIT changes. Modeled after the
dev/ofw changes, since this driver appears to have used that as a
start years ago...
2008-09-26 05:37:54 +00:00
Kip Macy
920ba15bf9 Update xen/interface includes to the latest in mercurial
MFC after:	1 month
2008-09-26 05:29:39 +00:00
Warner Losh
8e8ee9aaba The Ultra2 never had a CFE console or CFE boot loader. Kill obvious
cut-n-paste leftover.
2008-09-26 05:10:57 +00:00
Warner Losh
fefa89c863 Support for the siba bus found in many broadcom products.
Submitted by:	bms@
Obtained from:	p4 mips branch
2008-09-26 03:57:23 +00:00
Warner Losh
ae36cccd6e Support for CFE boot loaders. Initially the support is for MIPS, but
other processors will work too.

Submitted by:	bms@
Obtained from:	p4 mips2 branch
2008-09-26 03:53:10 +00:00
Poul-Henning Kamp
4d4ef06993 Tell umass to leave Huawei radio devices alone so ubsa(4) will
be able to kick them into shape.
2008-09-25 12:16:18 +00:00
Poul-Henning Kamp
7164022370 Make the ubsa(4) work with Huawei Exxx (tested with E169) 3G radio devices:
Kick the device into the right mode if it comes up as a flash-disk.

Set the buffers to a sensible 1024 bytes instead of a far too small
default.

Don't attempt to change speed, baud, parity and such, the device does
not understand it.
2008-09-25 12:00:56 +00:00
Pyun YongHyeon
83c04c93b6 Add another hardware bug workaround for Yukon II controllers that
have hardware ram buffer. The silicon bug seem to be triggered by
pause frames if receive buffer is not aligned on FIFO word(8 bytes).
To workaround the issue, make sure to align Rx buffers on 8 bytes.
Unfortunately this workaround requires yet another Rx fixup for
strict alignment architecture machines to align IP header.

For newer hardwares that lacks ram buffer may not have this bug so
check number of available ram buffer size to see the existence of
ram buffer.

Reported by:	Ian Freislich (ianf <at> clue dot co dot za), das
Tested by:	Ian Freislich (ianf <at> clue dot co dot za)
2008-09-25 07:31:45 +00:00
Kip Macy
646787d94f reflect header change in netfront
MFC after:	1 month
2008-09-25 07:02:00 +00:00
Kip Macy
82c2cf3b05 fix insta-panic:
- determine which ext_arg offsets to use based on the version number

Submitted by:	Chelsio Inc.
MFC after:	1 day
2008-09-25 06:46:28 +00:00
Marius Strobl
c75c2a68a7 - Use bus_{read,write}_*(9) instead of bus_space_{read,write}_*(9) etc
and take advantage of rman_get_rid(9) in order to save some softc
  members.
- Provide and consume module dependency information for lebuffer(4).
2008-09-24 21:26:46 +00:00
Kip Macy
a7db7fbd35 - Remove default NIC dependency on ulp headers
- make toe module build dependent on kernel support

Submitted by:	Chelsio Inc.
MFC after:	1 week
2008-09-24 01:19:08 +00:00
Kip Macy
79775f8f1b Update cxgb include paths to not require prefixing with dev/cxgb
Submitted by:	Chelsio Inc.
2008-09-23 03:16:54 +00:00
Kip Macy
e97121da99 Allow cxgb to be unified across versions by making newer features conditional
Submitted by:	Chelsio Inc
MFC after:	3 days
2008-09-23 02:22:24 +00:00
Nathan Whitehorn
f1dea04adb Change the DBDMA API to allow DBDMA registers in a subregion of a resource. This is necessary to allow future support of DMA for the various Apple on-board ATA controllers.
MFC after:	1 week
2008-09-23 02:12:47 +00:00
Kip Macy
9f58ea1678 - Fix flag check
- Fix adaptive thread sleep
- set oactive when queue is full
2008-09-23 01:55:36 +00:00
Kip Macy
c7e1ab2e4c - Track number of times that the transmit queue overflowed
- Trivial whitespace cleanup

MFC after:	3 days
2008-09-23 01:27:19 +00:00
Maksim Yevmenkin
352d011bcc Use Giant for kbdmux(4) locking. This is to workaround the problem
where interrupt handlers may race with kbdmux(4) in polling mode.

PR:		kern/127446
Reported by:	Eygene Ryabinkin rea-fbsd at codelabs dot ru
Tested by:	Eygene Ryabinkin rea-fbsd at codelabs dot ru
MFC after:	1 week
2008-09-22 22:08:43 +00:00
Marius Strobl
852c67f994 - Don't read the identifier string from the VPD if there's no chip
containing an Ethernet address fitted as this is yet another thing
  that fails in that case in order to avoid the one second delay
  until pci_read_vpd_reg() times out.
- Const'ify the bge_devs array.
2008-09-22 20:55:19 +00:00
Joseph Koshy
122ccdc1ca Support sparsely numbered CPUs.
Requested by:	obrien, alfred (long ago)
2008-09-22 10:37:02 +00:00
Pyun YongHyeon
cf8f254faa Add workaround for occasional packet loss issue of JMC250 A2
when it runs on half-duplex media.
While I'm here add register definition for GPREG1. ATM the GPREG1
register is only valid for JMC250 A1/A2.

Submitted by:	Ethan at JMicron
2008-09-22 06:17:21 +00:00
Sam Leffler
e6e547d57b Crypto api changes:
o don't use the key index to identify when the driver has been
  asked to allocate a key slot, use an explicit flag; allows
  drivers to force s/w fallback for entries in the global table
o change callback api to allocate driver resources for a crypto key:
  - de-const the key parameter so drivers can muck with the flags
  - on callback failure don't automatically try to setup s/w crypto;
    instead the driver must now mark the key entry for s/w crypto and
    the caller will re-attach the cipher module

NB: api change permits drivers more control over fallback to s/w
    crypto (e.g. based on a limited number of h/w key slots)
2008-09-21 23:16:19 +00:00
Sam Leffler
3627e32112 fix compilation on 64-bit platform w/ ATH_DEBUG 2008-09-21 00:30:33 +00:00
Sam Leffler
90dce2467e fix memory smash on lp64 platforms; mostly noticeable in user mode
as being unable to associate
2008-09-21 00:28:54 +00:00
Kip Macy
023d231918 Fix issue with tom loading by moving cxgb_log_tcb in to tom
MFC after:	3 days
2008-09-19 21:12:19 +00:00
Robert Noland
6be0323d97 pci_setup_intr() will only enable MSI/MSI-X for direct children. Add methods
to vga_pci.c to request on behalf of it's children.  This causes vgapci to show
up as the interrupt owner in vmstat -i, rather than the child device.

Approved by:	jhb(mentor)
2008-09-19 19:11:35 +00:00
Jung-uk Kim
d1dfacc2c8 Clean up DSDT and XSDT correctly instead of FADT when the tables are bad.
Submitted by:	jhb
Tested by:	olli
MFC after:	3 days
2008-09-19 15:25:13 +00:00
Ed Schouten
873da6a7fa Even though snp(4) in SVN is still broken, remove the unneeded D_NEEDMINOR.
kib@ and I have decided we will MFC the bpf(4)/snp(4) fixes after we've
released 7.1. Make sure the code in HEAD doesn't refer to a flag we
don't need anyway.

snp(4) in the MPSAFE TTY P4 branch already works, but still needs some
polishing before it can be integrated to SVN.
2008-09-19 10:21:30 +00:00
Kevin Lo
2024887d2f Add a vendor ID for 3G Green Green Globe Co., Ltd, found in
D-Link DPG-1200 remote control.
2008-09-19 09:04:06 +00:00