summaryrefslogtreecommitdiff
path: root/sys/dev/pci
AgeCommit message (Collapse)Author
2023-07-07virtio(4): Fix byte order of DMA data for armeb in the same manner asrin
aarch64eb. Fix comments to explain what is going on for {arm,aarch64}eb on QEMU. This is not due to QEMU bugs; it correctly configures everything for little-endian environment, and we forcibly change byte order only for CPU cores during kernel bootstrap.
2023-06-27correct register function annotation as it's for receive coalesce.nisimura
2023-06-24Fix typo in comment.msaitoh
2023-06-23Add missing read to count Circuit Breaker Rx Dropped Packet correctly.msaitoh
2023-06-02follow the steps of Andrew Doran (ad) commit and fix more s/loose/lose/ typos.andvar
also s/beyound/beyond/ and few others along the way, mainly in comments.
2023-05-30Use device_printf() instead of aprint_error_dev().msaitoh
2023-05-29aq(4): if_transmit: Invoke softint_schedule(9) with kpreempt disabled.rin
XXX Pull up to netbsd-10 and netbsd-9.
2023-05-17Update URL of the technical manual.tsutsui
2023-05-15Count the number of link down events in the MAC using with LINK_DN_CNT.msaitoh
- Add new event counter "link_dn_cnt" to count the number of link down events in the MAC. - The LINK_DN_CNT register (at 0x0403c) is described only in the Denverton's datasheet, so use it only on ixgbe_mac_X550EM_a.
2023-05-13fix typo in unused definition s/ESA_KDATA_OUEUE_LEFT/ESA_KDATA_QUEUE_LEFT/.andvar
2023-05-13fix typos in comments.andvar
2023-05-11Fix typo. s/ictxact/ictxatc/. No functional change.msaitoh
2023-05-11 Use WM_IS_ICHPCH(). No functional change.msaitoh
2023-05-11Fix prc511's comment and description.msaitoh
2023-05-11Add SOICZIFDATA (ifconfig -z) support for evcnt(9).msaitoh
First update the statistics data, then clear the event counters, and finally copy and clear if_data via ether_ioctl().
2023-05-11 Move statistics updating code from wm_tick() to new wm_update_stats().msaitoh
- To reuse. - No functional change.
2023-05-11Add some new event counters.msaitoh
Add the following counters for 82575 and newer except 80003, ICHs and PCHs: - Only 82576 document describes about the circuit breaker, so the following two might be only for 82575: - Circuit Breaker TX Manageability Packet - Circuit Breaker RX Dropped Packet - 82575's document doesn't describe the following two, but we can see the same value as GO{T,R}C have: - Host Good Octets RX - Host Good Octets TX - 82575's document doesn't describe the LENERRS (Length Errors) counter. I don't know if it has. - Perhaps Non-SerDes/SGMII devices don't have SCVPC (SerDes/SGMII Code Violation Packet) register. We don't care if it's SerDes/SGMII or not for now. - HRMPC (Header Redirection Missed Packet) appears only once in 8257[56]'s datasheet. FreeBSD's igb counts it, so we do, too. - Count the following two for I350 and newer. I don't know if PCHs have: - EEE TX LPI - EEE RX LPI
2023-05-11 Some statistics registers were replaced with new counters.msaitoh
- 0x403c was CEXTERR(Carrier Extension Error). 82575 and newer except 80003, ICHs and PCHs have HTDPMC(Host Tx Discarded Packets by MAC). I don't really know for 82575. The 82575 datasheet say nothing about it. - The following two are changed for circuit breaker. Only 82576's datasheet describes abut it, so the registers might be only for 82576. Use those registers for 82575 and newer except 80003, ICHs and PCHs just in case. - 0x40fc was TSCTFC(TCP Segmentation Context Tx Fail). It was replaced by the CBRMPC(Circuit Breaker Rx Manageability Packet) register. - 0x4124 was ICRXOC(Interrupt Cause Receiver Overrun). It was replaced by the HTCBDPC(Host Tx Circuit Breaker Dropped Packet) register. - From 0x4104 to 0x4124: - For 0x4124, 82575's datasheet says it's not changed(ICRXOC). I don't know if it's correct. We use new HTCBDPC register for 82575. - 82576 and newer changed the meaning. - I don't know for 80003, ICHs and PCHs. Don't count those registers. At least, those registers in PCH2 and PCH_CNP are all zero.
2023-05-11Don't add "Count" for event counter's description.msaitoh
2023-05-11Fix a bug that the transmit underrun counter is incorrectly counted.msaitoh
The transmit underrun bit in the transmit status filed is only for 82544 (and older?), so don't use the counter for newer chips. The bit is reserved for newer chips, but the bit sometimes set on 82575 at least.
2023-05-11IC{TX,RX}*C registers are for older than 82575.msaitoh
2023-05-11Sort lines. No functional change.msaitoh
Reorder evcnt_attach_dynamic(), WM_EVCNT_ADD() and evcnt_detach() to match.
2023-05-11Sort lines. No functional change.msaitoh
Rearrange the order of the registers so that they are roughly in ascending order.
2023-05-11Add note for the TORL register.msaitoh
The TOR register includes error, flow control and broadcast rejected.
2023-05-11Count some 64bit counters correctly.msaitoh
- Fix calculation of GORC, GOTC, TOR and TOT counters correctly. - Found by knakahara.
2023-05-11Fix missing check for netq->netq_stopping in vioif_rx_intr()yamaguchi
Reported-by: syzbot+5120b7a1f97a3f5ca052@syzkaller.appspotmail.com https://syzkaller.appspot.com/bug?id=243cf4115808e49774a49294f63200770399660b
2023-05-10ismt(4): Use config_detach_children.riastradh
2023-05-10esa(4): Use config_detach_children.riastradh
2023-05-10emuxki(4): Use config_detach_children.riastradh
2023-05-10cxdtv(4): Use config_detach_children.riastradh
2023-05-10auich(4): Use config_detach_children.riastradh
2023-05-06few more typos in the word "register", mainly s/resister/register/.andvar
In one comment I assume that it was meant to be pull-up resistor.
2023-05-06s/Regiser/Register/ and s/regester/register/ in comments.andvar
2023-04-21virtio(4): change members of struct vring_desc_extra before free a slotyamaguchi
This prevents the following race condition. 1. Thread-A: calls virtio_dequeue_commit() and puts a slot into free descriptor chain in vq_free_slot() 2. Thread-B: calls virtio_enqueue_prep() and get the slot stored by Thread-A 3. Thread-B: calls virtio_enqueue_reserve() and changes desc_base and desc_free_idx for the slot 4. Thread-A: changes the same members updated by Thread-B reported by hannken, thanks.
2023-04-19virtio(4): change variable name, nfcyamaguchi
2023-04-19Fix not to allocate unnecessary descriptoryamaguchi
fixes PR/57358
2023-04-19Use enumeration for state of a child driver instead of flagsyamaguchi
and check its detaching by using sc->sc_child in virtio_softc pointed out by riastradh, thanks. fixes PR/57357
2023-04-16virtio@pci: Fix assertion on detach.riastradh
If the child never attached in the first place, it's OK for it to not have detached. XXX This should not be a set of flags; this should be a state enumeration, because some flags make no sense, like FINISHED|FAILED. XXX This should not be asserted separately in each bus; there should be a single place in virtio.c to assert this, uniformly in all buses. PR kern/57357 XXX pullup-10
2023-04-12ichsmb(4), tco(4): Add support for TCO on newer Intel chipsets.riastradh
TCO (`Total Cost of Ownership', Intel's bizarre name for a watchdog timer) used to hang off the Intel I/O platform controller hub's (ICH) low-pin-count interface bridge (LPC IB), or ichlpcib(4). On newer devices, it hangs off the ICH SMBus instead. Tested on INTEL 100SERIES_SMB (works) and INTEL 100SERIES_LP_SMB (doesn't work, still not sure why). XXX kernel revbump: This breaks the module ABI -- tco(4) modules older than the change to make ta_has_rcba into ta_version will incorrectly attach at buses they do not understand. (However, the tco(4) driver is statically built into GENERIC, so maybe it's safe for pullup since the module wouldn't have worked anyway.)
2023-04-06Regen.msaitoh
2023-04-06The SAATA device ID for Apollo Lake is not 0x5ae0 but 0x5ae3.msaitoh
2023-03-31Added flags to store status of attaching a virtio deviceyamaguchi
This prevents a panic on reboot after a virtio device had called virtio_child_attach_failed().
2023-03-31Use descriptor chain for free slots instead of vq_entry listyamaguchi
Descriptors can be chained by themself. And descriptors added to avail ring or used ring are already chained. But it was not used for unused descriptors and another linked list structure named vq_entry was used. The chain is also used for unused descriptors to make virtio(4) simpler.
2023-03-29virtio(4): Use flexible array members, not zero-length arrays.riastradh
This enables the compiler to detect sizeof mistakes like PR kern/57304.
2023-03-29virtio(4): Fix sizing of virtqueue allocation.riastradh
vq->vq_avail[0].ring is a zero-length array, and thus sizeof is zero; likewise vq->vq_used[0].ring. Use vq->vq_avail[0].ring[0] and vq->vq_used[0].ring[0] to fix this and restore the previous allocation sizing logic. XXX We shouldn't use zero-length arrays here -- they are asking for trouble like this, and C99 has a standard way to express what we're actually trying to get at it, flexible array members. PR kern/57304 Reported-by: syzbot+7fb1047f5dfa33b26331@syzkaller.appspotmail.com
2023-03-27Use PRIuBUSSIZE to print bus_size_t variables.nakayama
2023-03-27virtio(4): Avoid name collision with global intrhand on sparc64.riastradh
Pacifies -Werror=shadow. No functional change intended.
2023-03-26fix various typos in documentation, comments and sysctl device description.andvar
mainly aion -> ation and inlude -> include.
2023-03-25Mark as MPSAFE.mlelstv
2023-03-25Fix 32bit overflow when calculating balloon size.mlelstv
Don't make uvm_pglistalloc wait, it will wait forever. Instead rely on the retries by this driver. This also allows to cancel the request. Increase inflate speed by factor 10 (same as deflate).