Page MenuHomeFreeBSD

avg (Andriy Gapon)
User

Projects

User Details

User Since
Jun 4 2014, 6:42 AM (547 w, 6 d)

Recent Activity

Wed, Nov 27

avg added inline comments to D47780: sound: Do not access cv_waiters.
Wed, Nov 27, 6:38 PM
avg added inline comments to D47780: sound: Do not access cv_waiters.
Wed, Nov 27, 6:13 PM
avg accepted D47780: sound: Do not access cv_waiters.

Looks goof to me.
Thank you!

Wed, Nov 27, 6:11 PM
avg added a comment to D47779: condvar: Add cv_waiters() macro.

I guess the same is true for PCM_RELEASE.

Wed, Nov 27, 3:53 PM
avg added a comment to D47779: condvar: Add cv_waiters() macro.

Alright. There are other places in the sound driver that cv_waiters is still accessed directly, so I will see how I can fix those as well.

Wed, Nov 27, 3:48 PM
avg added a comment to D47779: condvar: Add cv_waiters() macro.

Is there a reason (except maybe layering violations) that we do not want to do it this way and it's better to implement an additional counter in the driver?

Wed, Nov 27, 3:43 PM
avg added a comment to D47779: condvar: Add cv_waiters() macro.

Also, cv_wmesg is kind of semi-private and it's used only for diagnostics (tracing).
So, I don't think that it's precedent for general access to cv implementation details.

Wed, Nov 27, 3:40 PM
avg added a comment to D47779: condvar: Add cv_waiters() macro.

As I noted in the email thread, there is only one consumer outside of condvar implementation.

Wed, Nov 27, 3:37 PM

Fri, Nov 15

avg committed R11:71a3e9d15a4e: sysutils/i2c-tools: update to 4.3 (authored by avg).
sysutils/i2c-tools: update to 4.3
Fri, Nov 15, 2:33 PM

Thu, Nov 14

avg added a comment to D47571: Add support for Nuvoton NCT6122D/NCT6126D..
In D47571#1084984, @avg wrote:

If you have added this from a diff, could you please re-do the diff with -U 9999 option?
That's to have a lot more context lines which would be useful when reviewing.

Done.

Thu, Nov 14, 4:49 PM
avg added a comment to D47571: Add support for Nuvoton NCT6122D/NCT6126D..

If you have added this from a diff, could you please re-do the diff with -U 9999 option?
That's to have a lot more context lines which would be useful when reviewing.

Thu, Nov 14, 4:23 PM

Nov 1 2024

avg added inline comments to D47253: GPIO: Add ACPI _AEI support.
Nov 1 2024, 3:04 PM
avg added inline comments to D47253: GPIO: Add ACPI _AEI support.
Nov 1 2024, 2:59 PM

Oct 12 2024

avg committed R9:20cf32ba3dc3: pgpkeys: update my (avg) key (authored by avg).
pgpkeys: update my (avg) key
Oct 12 2024, 10:00 PM

Oct 5 2024

avg accepted D46421: x86: Refactor kernel-mode NMI handling .
Oct 5 2024, 6:44 PM

Sep 25 2024

avg added a comment to D46421: x86: Refactor kernel-mode NMI handling .

Oh, thinking about this triggered some old memories and I've dug up my old musings on this topic.
The code was never really tested and I cannot guarantee that it's correct, but it seemed correct to the younger me and it still seems correct the now me.
https://people.freebsd.org/~avg/wfhandler.v8.h

Sep 25 2024, 8:43 PM
avg added a comment to D46421: x86: Refactor kernel-mode NMI handling .
In D46421#1066706, @avg wrote:

Another general suggestion is that using CK_SLIST from ConcurrencyKit (included into FreeBSD) might help to make the code more compact and expressive.
But I haven't thought through details, so please feel free to ignore this suggestion if CK does not provide something that could be readily used.
The proposed code is completely good too.

Sep 25 2024, 8:32 PM
avg accepted D46421: x86: Refactor kernel-mode NMI handling .

Another general suggestion is that using CK_SLIST from ConcurrencyKit (included into FreeBSD) might help to make the code more compact and expressive.
But I haven't thought through details, so please feel free to ignore this suggestion if CK does not provide something that could be readily used.
The proposed code is completely good too.

Sep 25 2024, 8:14 PM
avg added a comment to D39970: it8613hwm(4): Add new driver for ITE IT8613 hardware monitor.

I am not sure that such a OS/ACPI (firmware) mutex is possible.

Sep 25 2024, 5:11 AM

Sep 19 2024

avg added inline comments to D46421: x86: Refactor kernel-mode NMI handling .
Sep 19 2024, 12:54 PM
avg added a comment to D46421: x86: Refactor kernel-mode NMI handling .

My only concern with the current deregistration approach is a hypothetical situation where a handler resides in a loadable module and, thus, can be unloaded after deregistration.
I like the clever simplicity of the current code where list elements are never removed and only the head pointer can ever be modified.
But maybe it would be good for nmi_remove_handler to wait for a completion of the handler if it's running.
E.g., we could add an atomic counter to struct nmi_handler which would be incremented when the handler is started and decremented when the handler is done.
Then, nmi_remove_handler could spin-wait on that counter if it's not zero (after having cleared func field to prevent future calls).

Sep 19 2024, 12:51 PM

Sep 15 2024

avg accepted D46674: dtrace tests: Add a test case which validates FBT probe arguments.
Sep 15 2024, 8:10 PM
avg accepted D46673: dtrace_test: Remove the dependency on dtraceall.
Sep 15 2024, 9:10 AM
avg accepted D46674: dtrace tests: Add a test case which validates FBT probe arguments.

LGTM

Sep 15 2024, 9:09 AM
avg accepted D46675: dtrace/amd64: Remove the dtrace_invop_callsite symbol.
Sep 15 2024, 8:57 AM
avg accepted D46672: dtrace/amd64: Fix probe argument fetching.

I like how using t_dtrace_trapframe both eliminates the search for the frame below the trap frame and the assumption on the position of the trap frame.

Sep 15 2024, 8:55 AM

Aug 27 2024

avg added inline comments to D23378: sysctl(9): add CTLFLAG_NEEDGIANT flag.
Aug 27 2024, 3:21 PM

Aug 12 2024

avg added inline comments to D45179: mt7601U: Importing if_mtw from OpenBSD.
Aug 12 2024, 5:39 AM

Jun 27 2024

avg committed rGa743e280ea05: rk_i2c: use the register read mode even if the read ends with IIC_M_NOSTOP (authored by avg).
rk_i2c: use the register read mode even if the read ends with IIC_M_NOSTOP
Jun 27 2024, 10:33 AM
avg committed rG0deaf4be346f: rk_i2c: emulate repeated start (authored by avg).
rk_i2c: emulate repeated start
Jun 27 2024, 10:33 AM

Jun 20 2024

avg accepted D45649: dtrace: Add a partial implementation of dtrace_getarg() on arm64.
Jun 20 2024, 4:58 AM
avg accepted D45647: Document and subtlely change the zfs.mount_snapshot jail parameter.

I would subtly change the title :-)
Otherwise, looks good to me.

Jun 20 2024, 4:57 AM · Jails, ZFS

Jun 14 2024

avg accepted D44483: sdt: Prototype implementation of SDT probes using hot-patching.
Jun 14 2024, 9:12 AM

Jun 5 2024

avg accepted D45494: powerof2: replace loops with fls or ilog2.

Looks good to me.

Jun 5 2024, 7:23 AM

Jun 4 2024

avg accepted D45483: x86: simplify ceil(log2(x)) function.

Looks good to me.
A bit ashamed that I could not figure that fls(x - 1) does the job if zero is handled as a special case.

Jun 4 2024, 5:30 PM

Apr 21 2024

avg committed rG43bf62a364c1: aw_gpio: temporarily switch to input function if read in eint mode (authored by avg).
aw_gpio: temporarily switch to input function if read in eint mode
Apr 21 2024, 12:32 PM
avg committed rG9c444571ab94: aw_gpio: temporarily switch to input function if read in eint mode (authored by avg).
aw_gpio: temporarily switch to input function if read in eint mode
Apr 21 2024, 12:32 PM
avg added a comment to D33647: dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag.

All should be done. Thank you for reporting and diagnosing the problem.

Apr 21 2024, 12:30 PM
avg added a reverting change for rGe92491d95ff3: dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag: rGf12a50fed2df: Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag".
Apr 21 2024, 12:29 PM
avg committed rGf12a50fed2df: Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag" (authored by avg).
Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag"
Apr 21 2024, 12:29 PM
avg added a reverting change for rGe92491d95ff3: dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag: rG73c9d514236e: Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag".
Apr 21 2024, 12:29 PM
avg committed rG73c9d514236e: Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag" (authored by avg).
Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag"
Apr 21 2024, 12:28 PM
avg added a reverting change for rGe92491d95ff3: dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag: rGb9827c007a7a: Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag".
Apr 21 2024, 12:27 PM
avg committed rGb9827c007a7a: Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag" (authored by avg).
Revert "dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag"
Apr 21 2024, 12:27 PM

Apr 8 2024

avg added a comment to D33647: dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag.

Looks like I assumed too much without paying attention to the scratch buffer.
I'll revert the change.

Apr 8 2024, 2:04 PM

Mar 16 2024

avg committed rG0cb72c25b01a: psci: split off psci_reboot from psci_shutdown (authored by avg).
psci: split off psci_reboot from psci_shutdown
Mar 16 2024, 3:17 PM
avg committed rGbf11fee6a5cf: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs (authored by avg).
ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs
Mar 16 2024, 3:17 PM
avg committed rG721b91d1715e: syscon_power: do reboot after shutdown_panic is executed (authored by avg).
syscon_power: do reboot after shutdown_panic is executed
Mar 16 2024, 3:17 PM
avg committed rG50aa22323424: scsi_da: add 4K quirks for Samsung SSD 860 and 870 (authored by avg).
scsi_da: add 4K quirks for Samsung SSD 860 and 870
Mar 16 2024, 3:17 PM
avg committed rG1269b002038c: rk8xx_poweroff: enable power-cycling on support hardware (authored by avg).
rk8xx_poweroff: enable power-cycling on support hardware
Mar 16 2024, 3:17 PM
avg committed rG98ee1305b692: ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver (authored by avg).
ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver
Mar 16 2024, 3:17 PM
avg committed rGd463f7c7a726: psci: split off psci_reboot from psci_shutdown (authored by avg).
psci: split off psci_reboot from psci_shutdown
Mar 16 2024, 3:17 PM
avg committed rGb2681df2294b: syscon_power: do reboot after shutdown_panic is executed (authored by avg).
syscon_power: do reboot after shutdown_panic is executed
Mar 16 2024, 3:17 PM
avg committed rG4eab6e77fc2a: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs (authored by avg).
ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs
Mar 16 2024, 3:17 PM
avg committed rG2e88c5c4b426: scsi_da: add 4K quirks for Samsung SSD 860 and 870 (authored by avg).
scsi_da: add 4K quirks for Samsung SSD 860 and 870
Mar 16 2024, 3:17 PM
avg committed rG5578ace4a174: ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver (authored by avg).
ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver
Mar 16 2024, 3:17 PM

Feb 19 2024

avg closed D43960: ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver.
Feb 19 2024, 10:45 AM
avg committed rG8f374fa528d7: ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver (authored by avg).
ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver
Feb 19 2024, 10:45 AM
avg committed rGb7dce5b8e988: scsi_da: add 4K quirks for Samsung SSD 860 and 870 (authored by avg).
scsi_da: add 4K quirks for Samsung SSD 860 and 870
Feb 19 2024, 10:28 AM
avg committed rGc01af41c3c8f: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs (authored by avg).
ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs
Feb 19 2024, 10:09 AM
avg closed D43961: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs.
Feb 19 2024, 10:09 AM
avg updated the diff for D43961: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs.

update description

Feb 19 2024, 10:03 AM
avg added a comment to D43961: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs.

Based on earlier entries for Samsung 8x0 drives in ata_da.c and scsi_da.c it seems that a separate entry per model line was a preference.
But combing multiple entries is also okay.
However, I'd like to do it as a separate commit a bit later, unless you want to do that yourself.

Feb 19 2024, 9:56 AM
avg committed rG75316a59b39e: rdmsr_safe/wrmsr_safe: handle pcb_onfault nesting (authored by avg).
rdmsr_safe/wrmsr_safe: handle pcb_onfault nesting
Feb 19 2024, 9:52 AM

Feb 18 2024

avg added a comment to D43961: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs.
In D43961#1002853, @imp wrote:

These aren't listed in Linux but I'm OK with them here

Feb 18 2024, 4:57 PM
avg added a comment to D43961: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs.

The controller is

ahci2@pci0:0:17:0:      class=0x010601 rev=0x40 hdr=0x00 vendor=0x1002 device=0x4391 subvendor=0x1043 subdevice=0x84dd
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]'
    class      = mass storage
    subclass   = SATA
Feb 18 2024, 4:47 PM
avg added a comment to D43961: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs.

Just want to comment that based on the errors I initially thought that the problem was a bad cable or SATA port, so I tried a few cables and a few ports on the motherboard, all with the same result.
Then I searched the internet and found some reports for the SSD model.
Then I tried attaching the SSD to an LSI SAS 2308 controller and all problem immediately went away.
Then I added the quirk and the problem got fixed for connecting to on-board SATA as well.

Feb 18 2024, 4:42 PM
avg committed rGa044cf60bd37: rk8xx_poweroff: add parentheses missed in 8b408fc6f2 (authored by avg).
rk8xx_poweroff: add parentheses missed in 8b408fc6f2
Feb 18 2024, 4:30 PM
avg added a comment to D43961: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs.

I should clarify that I didn't see just silent data corruption, there were read and write errors as well.

Feb 18 2024, 3:56 PM
avg added a comment to D43961: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs.

I first-hand experienced problems with a device identified as Samsung SSD 870 EVO 250GB SVT02B6Q.
I inferred that 860 is also affected based on the Linux bug report and on a similar problem with 850 as well.

Feb 18 2024, 3:51 PM
avg requested review of D43961: ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs.
Feb 18 2024, 3:47 PM
avg added inline comments to D43960: ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver.
Feb 18 2024, 3:45 PM
avg requested review of D43960: ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver.
Feb 18 2024, 2:50 PM
avg committed rG5f7312a0d70c: syscon_power: do reboot after shutdown_panic is executed (authored by avg).
syscon_power: do reboot after shutdown_panic is executed
Feb 18 2024, 2:39 PM
avg committed rG0f354b2b588b: psci: split off psci_reboot from psci_shutdown (authored by avg).
psci: split off psci_reboot from psci_shutdown
Feb 18 2024, 2:39 PM
avg committed rG8b408fc6f2f6: rk8xx_poweroff: enable power-cycling on support hardware (authored by avg).
rk8xx_poweroff: enable power-cycling on support hardware
Feb 18 2024, 2:09 PM
avg committed rGb98558e69b0a: aw_gpio: temporarily switch to input function if read in eint mode (authored by avg).
aw_gpio: temporarily switch to input function if read in eint mode
Feb 18 2024, 1:58 PM

Feb 17 2024

avg committed rG854db1db3f81: run acpi_shutdown_final later to give other handlers a chance (authored by avg).
run acpi_shutdown_final later to give other handlers a chance
Feb 17 2024, 7:59 PM
avg committed rG5d24ae53b622: rdmsr_safe/wrmsr_safe: handle pcb_onfault nesting (authored by avg).
rdmsr_safe/wrmsr_safe: handle pcb_onfault nesting
Feb 17 2024, 7:23 PM
avg committed rGa669851b3516: subr_bus: report DEVICE_SUSPEND failures (authored by avg).
subr_bus: report DEVICE_SUSPEND failures
Feb 17 2024, 7:23 PM
avg committed rG1b92999e67b6: efibootmgr: fix potential endless loop with -v (authored by avg).
efibootmgr: fix potential endless loop with -v
Feb 17 2024, 7:23 PM
avg committed rGf0ed49921c28: dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag (authored by avg).
dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag
Feb 17 2024, 7:23 PM
avg committed rG4df1b9cc2bff: hdaa_pcmchannel_setup: do not advertise AC3 8+0 (authored by avg).
hdaa_pcmchannel_setup: do not advertise AC3 8+0
Feb 17 2024, 7:23 PM
avg committed rGfaa59e9ab402: ichsmb: fix block read operation (authored by avg).
ichsmb: fix block read operation
Feb 17 2024, 7:23 PM
avg committed rG9ca7451d86dc: change ipmi watchdog to awlays stop when system is halted (authored by avg).
change ipmi watchdog to awlays stop when system is halted
Feb 17 2024, 7:23 PM
avg committed rG392953c490da: fix signature of ipmi_shutdown_event (authored by avg).
fix signature of ipmi_shutdown_event
Feb 17 2024, 7:23 PM
avg committed rGa4e1bf22796a: mmc_fdt_parse: remove redundant bootverbose check (authored by avg).
mmc_fdt_parse: remove redundant bootverbose check
Feb 17 2024, 7:23 PM
avg committed rGb44d933e2617: dwmmc: fix a typo (authored by avg).
dwmmc: fix a typo
Feb 17 2024, 7:23 PM
avg committed rG929db0457513: gpiopower: trigger low, high and both edges (authored by avg).
gpiopower: trigger low, high and both edges
Feb 17 2024, 7:23 PM
avg committed rGbad04f1ebc3a: add allwinner overlays for enabling additional USB ports (authored by avg).
add allwinner overlays for enabling additional USB ports
Feb 17 2024, 7:23 PM
avg committed rGbd51dc9408d2: usbdevs: add Ralink RT7601 aka MT7601 (authored by avg).
usbdevs: add Ralink RT7601 aka MT7601
Feb 17 2024, 7:23 PM
avg committed rGac918f4354e0: ds1307: restore hints-based configuration on FDT systems (authored by avg).
ds1307: restore hints-based configuration on FDT systems
Feb 17 2024, 7:22 PM
avg committed rGb46dedfa48ef: run acpi_shutdown_final later to give other handlers a chance (authored by avg).
run acpi_shutdown_final later to give other handlers a chance
Feb 17 2024, 3:28 PM
avg committed rG007b84e6c159: rdmsr_safe/wrmsr_safe: handle pcb_onfault nesting (authored by avg).
rdmsr_safe/wrmsr_safe: handle pcb_onfault nesting
Feb 17 2024, 3:14 PM
avg committed rG4cb348eaf6ac: subr_bus: report DEVICE_SUSPEND failures (authored by avg).
subr_bus: report DEVICE_SUSPEND failures
Feb 17 2024, 3:13 PM
avg committed rG191462cb674c: efibootmgr: fix potential endless loop with -v (authored by avg).
efibootmgr: fix potential endless loop with -v
Feb 17 2024, 3:13 PM
avg committed rG782b71ccfb1c: hdaa_pcmchannel_setup: do not advertise AC3 8+0 (authored by avg).
hdaa_pcmchannel_setup: do not advertise AC3 8+0
Feb 17 2024, 3:13 PM
avg committed rGfb9c50f983ff: dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag (authored by avg).
dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag
Feb 17 2024, 3:13 PM
avg committed rGa9bab712eb10: ichsmb: fix block read operation (authored by avg).
ichsmb: fix block read operation
Feb 17 2024, 3:13 PM
avg committed rGb5d826b1b6bc: change ipmi watchdog to awlays stop when system is halted (authored by avg).
change ipmi watchdog to awlays stop when system is halted
Feb 17 2024, 3:13 PM