Commit Graph

9441 Commits

Author SHA1 Message Date
skrll
959954eaf3 Add an XHCI_DISABLE_MSI option 2017-09-05 08:01:43 +00:00
msaitoh
b7bbade77e Fix 2500 KX media setting in last commit. 2017-08-31 02:48:55 +00:00
msaitoh
dc7f84c858 - Sync with FreeBSD r320688 (and up to r322865):
- Add C3000(Denvertion(-NS)) support.
  - Add bypass function support for bypass adapters. Sysctls are provided.
    Not tested because I have no any bypass adapter.
  - ixv(4): set RSS mapping.
  - Change EEE sysctl.
  - ixv(4): Add TSOv6.
  - ixv(4): Mailbox API 1.2 and more are implemented and comment says it
    negotiate with 1.2 but it really does 1.1...
  - Remove thermal test sysctl.
  - Fix unknown bugs.
- Print driver feature capabilities and enable bits when verbose boot.
2017-08-30 08:49:18 +00:00
msaitoh
c91dc6deb1 FreeBSD r320688 sorted a lot of functions. Merging that change by one commit
makes difficult to know what was really changed. To make change understandable,
commit only function sort and white space changes before real change.
2017-08-30 08:24:57 +00:00
msaitoh
07cce385bc Don't limit number of queue pair to 8. Take max TX queues and max RX queues
into account. 82598 has 32 TX queue and 64 RX queues. Others has 128 TX queues
and 128 RX queues. Number of MSI-X table entries is 64, so the max queue pairs
is 63 (64 minus the Others (e.g. link status change)).
2017-08-30 01:25:07 +00:00
macallan
a9c7e04328 Radeon PLLs can't have odd post dividers when used with digital outputs -
add a flag to track this in relevant functions.
Now DVI output works properly on my Mini 2
Needs testing on Mini 1 and other hardware...
2017-08-25 22:45:33 +00:00
msaitoh
0a15ee0de7 Remove unused counters. 2017-08-24 10:43:42 +00:00
macallan
3f623854c7 Mac Mini WIP:
- plug the external TMDS into the right CRTC when in use
- use the right output types for Mini configs
now VGA works properly ( and not just by accident ) on my Mini 2. DVI is still
garbled but at least produces output.
2017-08-23 19:47:39 +00:00
macallan
e0975726cb consistency... 2017-08-23 19:21:14 +00:00
maxv
e4957024d0 M_WAITOK cannot fail, so remove the test branches. Otherwise it looks
like leak/uninitialized area.
2017-08-20 10:55:37 +00:00
msaitoh
e38d44d138 Add C3000 devices. 2017-08-17 01:24:09 +00:00
msaitoh
3e4c5bfebb Regen. 2017-08-17 01:05:51 +00:00
msaitoh
e9a2d4fa2a Add C3000 devices. 2017-08-17 01:05:22 +00:00
mlelstv
d001a53273 tag arcmsr scsipi adapter and pci interrupt as MPSAFE. I/O is now done
without taking kernel lock.
2017-08-12 11:03:47 +00:00
macallan
0c7c75bc0c set display output parameters according to properties
Now VGA output works as intended on my Mini 2. DVI is still garbled ( but
visible ) and Mini 1 is untested.
2017-08-11 22:59:05 +00:00
mlelstv
5b68a5ee6d While ld(4) is MP safe, many backends are not.
Add a flag for backends that are MP safe. Take KERNEL_LOCK when calling
into a backend that doesn't have the flag set. Do the same for the
discard routine.

Fixes PR 52462.
2017-08-09 16:44:39 +00:00
cherry
da413d611f Reorg the virtio(4) config(9) code to be explicitly pci specific.
We'll later use this for a non-pci virtio(4) usecase.

ok martin
2017-08-02 08:39:14 +00:00
msaitoh
0bd083dcfb regen. 2017-08-02 07:35:47 +00:00
msaitoh
b3e4786cbc PCI device ID of Atom x5-Z8350's video is 0x22b0. ark.intel.com says 0x22b0 is
Intel HD Graphics 400.
2017-08-02 07:35:05 +00:00
knakahara
33735514f9 rename unclear functions. pointed out by msaitoh@n.o. 2017-07-31 06:41:01 +00:00
riastradh
c3e23e5d48 Null out sbuf->m on failure to avoid double-free later.
From Ilja Van Sprundel.

Also null out sbuf->map out of paranoia.
2017-07-29 01:54:56 +00:00
riastradh
e7c3d2d5fd Check for MCLGET failure in et_newbuf.
From Ilja Van Sprundel.
2017-07-29 01:47:48 +00:00
knakahara
e6aadd1b31 add comment about confusing wm_rxeof() calling.
pointed out by msaitoh@n.o.
2017-07-28 10:34:58 +00:00
msaitoh
6110fbb36a Check some wm_nvm_read()'s return vale. 2017-07-28 10:21:10 +00:00
msaitoh
2dca05ef1e Qemu's e1000e emulation (82574L)'s SPI has only 64 words. I've never seen on
real 82574 hardware with such small SPI ROM. Check sc->sc_nvm_wordsize before
accessing higer address words to prevent timeout.
2017-07-28 09:12:40 +00:00
nat
60fa90dcac Mixer device bounds checking.
Analysis by Ilja van Sprundel.
2017-07-28 01:36:40 +00:00
msaitoh
fd411f94be Add WM_F_WA_I210_CLSEM flag for a workaround. FreeBSD/Linux drivers say
"In rare circumstances, the SW semaphore may already be held unintentionally."
on I21[01]. PXE boot is one of the case.

XXX pullup-[678].
2017-07-27 03:21:42 +00:00
msaitoh
355f0a5677 Regen. 2017-07-26 08:58:45 +00:00
msaitoh
6f1b1c5bcd Add Intel 5520/X58 QuickPath from OpenBSD. 2017-07-26 08:57:24 +00:00
msaitoh
03a9e76b73 On 8254[17] with SPI ROM, wm_nvm_set_addrbits_size_eecd() calls wm_nvm_read(),
so it's required to set flags and functions before calling it. It was broken
again in if_wm.c rev. 1.530 (see also 1.313). Tested with Dell Power Edge 1850.
2017-07-26 08:09:59 +00:00
msaitoh
7c8895a613 - Our MII readreg/writereg API has not way to detect an error.
kmrn_{read,write}reg() are not used for MII API, so it's not required for
  these functions to use the same API. So,
  - Change return value as error code.
  - Change register vaule from int to uint16_t.
  - read: pass pointer for uint16_t as an argument.
  - Check return value on caller side.
- Check whether it's required to use MDIC workaround for 80003 or not in
  wm_reset(). If the workaround isn't required, don't use the workaround code
  in wm_gmii_i80003_{read,write}reg.
2017-07-26 06:48:49 +00:00
maya
74b72ff7da enable rt2860 power management code
adjust to fit netbsd:
make suspend,resume functions match desired pmf* prototypes
remove wakeup/activate wrapper functions

avoid jumping to NULL on resume by initializing if_stop

the problem machine has other issues on resume, so there might be further
issues, but it's an improvement over a jump to NULL.

tested by Riccardo Mottola
2017-07-25 23:17:20 +00:00
msaitoh
7763223482 Use new nvm.{acquire,release}() for semaphore. Almost the same except the
following:
 - 8257[12]: Don't directly access SPI but use EERD register.
 - 82575-I354: If the size of SPI ROM >= 32K words, use direct SPI access
   instead of EERD register access.
 - Add wm_nvm_eec_clock_raise() and wm_nvm_eec_clock_lower() and use them for
   Microwire/SPI bus control. Same as Linux and FreeBSD.
 - Redude timeout value for 80003 in wm_get_swfw_semaphore(). Same as
   Linux and FreeBSD.
2017-07-25 06:00:17 +00:00
para
e3902ee896 kmem_intr_free kmem_intr_[z]alloced memory
the underlying pools are the same but api-wise those should match
2017-07-23 10:55:00 +00:00
msaitoh
8887bae2a8 Regen. 2017-07-22 08:59:05 +00:00
msaitoh
26aff1d49f - Add some AMD devices.
- Add Broadcom BCM5762.
2017-07-22 08:58:24 +00:00
nakayama
437a457034 Apply workaround from FreeBSD to fix read data corruption observed
on Fire V100 and mSATA-SSD with mSATA to IDE adapter.

The patch is from port-sparc64@.
2017-07-21 21:01:13 +00:00
msaitoh
9da34e6a07 Fix a bug that sc->sc_flags can't be passed to igphy(4). This bug was added
in if_wm.c rev 1.527.
2017-07-20 10:00:25 +00:00
mlelstv
b5afb4ec18 Pull in some hardware support from FreeBSD. Also fix 5GHz mode by
adapting the method described in: https://forums.freebsd.org/threads/53574/.
2017-07-19 16:55:12 +00:00
msaitoh
5a852cf570 - Add wm_write_smbus_addr() to set SMBus address by software.
- Modify wm_gmii_hv_{read,write}reg_locked() to make them access HV_SMB_ADDR
  correctly.
- Enable wm_init_lcd_from_nvm() again. Tested by Thinkpad X220.
2017-07-18 08:22:55 +00:00
msaitoh
4cca5c5584 Move some initialization stuff in wm_attach() before wm_reset(). Some flags
and callback function is required to set correctly before wm_reset() because
wm_reset() and some helper functions refer them.
2017-07-18 08:05:03 +00:00
msaitoh
ade2dfcbc1 Remove wrong semaphore access in wm_nvm_{read,write}_{ich8,spt} to prevent
hungup. A semaphore is get/put in wm_nvm_{read,write}.
2017-07-18 08:01:07 +00:00
msaitoh
bab58959a3 Calling wm_init_lcd_from_nvm() makes hang on some machines reported by
Brad Harder. Until fix this problem correctly, Disable whole of
wm_init_lcd_from_nvm().
2017-07-14 04:34:29 +00:00
msaitoh
ab32461818 IF TX is not required to flush, RX is also not required to flush. Same as
other OSes.
2017-07-13 13:27:08 +00:00
msaitoh
a86419ff1e - Official shortname of LN Requester is LNR, so change PCI_EXTCAP_LN_REQ
to PCI_EXTCAP_LNR
- Use macro.
2017-07-13 08:41:19 +00:00
msaitoh
66ef30384e - Call wm_kmrn_lock_loss_workaround_ich8lan() before any PHY access in
wm_linkintr_gmii().
- Register access in wm_kmrn_lock_loss_workaround_ich8lan() now works
  correctly. Enable this function.
- Configure the LCD with the extended configuration region in NVM if it's
  required.
- Add debug printf.
2017-07-13 08:22:20 +00:00
msaitoh
1f27f8ba00 - Fix a bug that wm_gmii_i82544_{read,write}reg() didn't take care of page
select. PHY access from igphy() automatically did it, but accessing from
  wm(4) for wrokaround didn't work correctly. This change affects 8254[17],
  8257[12] ICH8, ICH9 and ICH10.
- Add diagnostic code.
2017-07-13 08:04:56 +00:00
msaitoh
25a246b36d - Use device_printf() instead of aprint_error_dev() for PHY read/write
functions because those are used not only in device attach.
- Add debug printf.
- Rename variables.
2017-07-13 07:50:49 +00:00
msaitoh
7944d7b2c4 Remove debug printf(). 2017-07-12 08:18:36 +00:00
msaitoh
03af119d23 Disable D0 LPLU on 8257[12356], 82580, I350 and I21[01], too. Before this commit,
above devices and non-PCIe devices accessed wrong register.
2017-07-12 08:15:31 +00:00