-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Optimizations to the AT keyboard driver to reduce unnecessary delays during the FreeBSD boot process #1826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bllgg
wants to merge
431
commits into
freebsd:main
Choose a base branch
from
bllgg:bllgg-dev-atkbd-psm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Optimizations to the AT keyboard driver to reduce unnecessary delays during the FreeBSD boot process #1826
Changes from 1 commit
Commits
Show all changes
431 commits
Select commit
Hold shift + click to select a range
d346229
Revert "pseudofs: defer initialization until first mount"
kevans91 407c4d1
openssl: Disable KTLS in bootstrap libraries
markjdb 7e97c6a
kerberos5: Fix the Heimdal pkgbase build
llfw b21629d
arm64: Make the padding in struct ms_page explicit
zxombie 59ddbef
arm64: Add padding to struct mdproc
zxombie e2761a8
rtw89: Remove an unneeded __DECONST
bsdjhb b3605a7
arm64: Add a macro to create cpu_feat
zxombie 9204a31
arm64: Add a sysctl to see if features are enabled
zxombie 4bc68fa
arm64: Support managing features from loader
zxombie c76b024
arm64: Add a function to check a range of CPU revs
zxombie 1ae3694
arm64: Clean up HW DBM errata detection
zxombie efb1c4b
arm64: Update the Neoverse-N1 1542419 errata check
zxombie 7156a5f
bridge: Print a warning if member_ifaddrs=1
llfw 93a734f
bridge: Set member_ifaddrs=1 by default
llfw f6d4c9c
arm64: Remove CPU_MATCH_RAW
zxombie 8df4dc9
arm64: Create a TLBI invalidate for the kernel
zxombie fa23bfb
arm64: Replace cpu_tlb_flushID in initarm
zxombie a884f69
arm64: Add a multiple TLBI workaround
zxombie 65688fc
share/sendmail: Use consistent ordering when processing files
markjdb 1bd74d2
jail: add kqueue(2) support for jails
d5dd6ad
Like for -P et al, state that -deElL are syscons only options.
a14d561
vtnet: Do "hardware" accounting for the total number of received octets
2a346c8
vtnet: Prefer "hardware" accounting for the multicast and total numbe…
851dc7f
jail: add jail descriptors
d4bfebf
snd_hda: Fix a sporadic panic during kldunload
TijlCoosemans aef8078
moused(8): Add support for evdev protocol
wulf7 641f525
cyapa(4): Add support for reporting data with sysmouse protocol
wulf7 3aa0a0a
tcp: add gone_in note for net.inet.tcp.sack.revised for fbsd16
rscheff 8b4e4c2
Update main to 16
cperciva 8ec7a83
jaildesc: fix a misplaced error check and a spurious finit call
f20d125
devd: Remove gross hack
bsdimp edd8c4c
moused: Fix movement of moused/moused to moused/moused/moused
bsdimp 4cb50d7
tcp: improve compilability
tuexen 2a0ed0b
kenv: Sprinkle const qualifiers where appropriate
gmshake 7bbfcc5
mtx: Sprinkle const qualifiers where appropriate
gmshake bec0532
rmlock: Sprinkle const qualifiers where appropriate
gmshake 3c3686b
rwlock: Sprinkle const qualifiers where appropriate
gmshake 306f0c4
sx: Sprinkle const qualifiers where appropriate
gmshake 0e88a0e
CI: Increase 'Setup QEMU' timeout to 15 minutes
tonyhutter 11b5c50
ci: use real head sha instead of GITHUB_SHA when generating CI type
Harry-Chen dfc2c32
ci: fix syntax issues in zfs-qemu.yml
Harry-Chen ffba31c
Add upcoming renaming notice for arc_summary and arcstat
Harry-Chen c69b7ea
Install zarcstat and zarcsummary symlinks in Makefile
Harry-Chen b9c6b0e
Install zarcstat and zarcsummary in deb / rpm build rules
Harry-Chen 7fa1552
sys/power.h: Add `_KERNEL` guards
obiwac 6714e12
gstripe: remove bio->bio_ma_n assignment
mcimerman a930cc8
GEOM_UNION: Should free sc in g_union_ctl_create when error happened.
wy-chung 3ed0cdf
Update vmimage.subr
Unicorn9x 8647a0b
bpi-r2-pro: added support dts for bpi-r2-pro
Martinfx 89ff068
x86: Fix bug in print_vmx_info()
liweitianux 1167a7d
GEOM: add a new function g_new_geom
wy-chung 656f7f4
call g_new_geom instead for callers that pass regular string to g_new…
wy-chung cacfd42
tests/sys/mqueue: use require.kmods property instead of ad-hoc checks
svmhdvn 215a065
tests/sys/netlink: use require.kmods property instead of ad-hoc checks
svmhdvn 308c9c9
tests/sys/opencrypto: use require.kmods property instead of ad-hoc ch…
svmhdvn 26d3dfa
tests/sys/aio: use require.kmods property instead of ad-hoc checks
svmhdvn c444bfc
tests/pf/ioctl: use require.kmods property instead of ad-hoc checks
svmhdvn 559b0f6
tests/sys/netmap: use require.kmods property instead of ad-hoc checks
svmhdvn 74898ce
tests/sndstat: use require.kmods property instead of ad-hoc checks
svmhdvn 7a1a6d1
tests/socket_accf: use require.kmods property instead of ad-hoc checks
svmhdvn 4079513
tests/sys/net: use require.kmods property instead of ad-hoc checks
svmhdvn 427be10
tests/sys/netinet: use require.kmods property instead of ad-hoc checks
svmhdvn f53228c
tests/vmm_cred_jail: use require.kmods property instead of ad-hoc checks
svmhdvn 9ae3c30
gpioled: use hw pin inversion if available
stephane-rochoy-stormshield 6a5c193
gpioled: document the invmode hint in gpioled(4)
stephane-rochoy-stormshield c23eda9
pf: fix possible pd->pcksum NULL deref
kprovost af60084
Add description for WITH_PTHREADS_ASSERTIONS
cperciva 9e792f7
sys/netinet6: Fix SLAAC for interfaces with no /64 LL address
910cf34
LinuxKPI: pci: implement for_each_pci_dev() and improve pci_get_device()
2f9064a
LinuxKPI: pci: implement pcim_iomap()
7e21158
LinuxKPI: pci: implement [linuxkpi_]pcim_request_all_regions()
bbeeb58
LinuxKPI: pci: allocate entire pci_dev hiereachy up to root port on a…
6272346
LinuxKPI: pci: allow children to be attached to a pci_dev
736b16e
LinuxKPI: correct the LINUXKPI_VERSION check for abs_diff()
c1264b6
LinuxKPI: acpi; fix type to acpi_get_handle()
81cb7c4
LinuxKPI: rename from_timer() to timer_container_of()
5cb64a1
LinuxKPI: timer KPI *_timer -> timer_*
39e9290
LinuxKPI: cleanup: implement __free() and DEFINE_FREE(); use for kfree()
3f48a0f
LinuxKPI: add DEFINE_LOCK_GUARD_0 for rcu
ff5bcb7
LinuxKPI: add __struct_size
70c508e
LinuxKPI: sync overflow.h from Linux v6.16
7c47393
LinuxKPI: kunit: add static_stub.h and more dummy headers
2a44e10
LinuxKPI: maths64: implement roundup_u64()
4ab64e3
LinuxKPI: devres: divorce dem_kfree from lkpi_devm_kmalloc_release
5e82eec
stand: Remove Spleen 32x64 fonts from INDEX
Jehops dff11c4
rtwn: enable seqno offload; migrate to use ieee80211_output_seqno_ass…
7c448f5
vtnet: fix compilation for NOIP configs
tuexen 0737e2a
sys/cpu.h: Some style(9) fixes
gmshake 7b4562e
git-blame-ignore-revs: sys/cpu.h style(9) fixes
gmshake ac2f284
BSD.usr.dist: remove obsolete usr/share/examples/drivers entry
DimitryAndric 4341f92
share/mk: Fix a heuristic in bsd.cpu.mk
markjdb 6d62463
newsyslog.conf(5): Don't suppress space after <compress> directive
DimitryAndric 11ace56
contrib/libxo: fix API header files inclusions in C++ source files
aokblast 5a01194
unbound: Update to 1.23.1
dag-erling 14b61b2
man: Add -l option
ischwarze d661670
[net80211] Quieten the logging from ieee80211_vht_get_vhtflags()
fdb3b69
Update the installed manpages to match OpenSSL 3.5.1
ngie-eign fd9e09c
kern: replace several EBADF with EINVAL
kostikbel dc38cf1
man: Fix usage message
dag-erling 3860afe
Revert "LinuxKPI: pci: allocate entire pci_dev hiereachy up to root p…
228302e
random: Make the min-entropy estimate configurable
markjdb 8635f86
random: Make the entropy source registration interface more uniform
markjdb c942d9e
random: Fix synchronization of hc_source_mask
markjdb 27e2afa
random.4: Document the kern.random.nist_healthtest_enabled tunable
markjdb f865264
random: Allow pure entropy sources to provide a min-entropy estimate
markjdb 480928a
random: Exclude the timestamp from healthtest for pure sources
markjdb 0cba688
makeobjops.awk: Style nits in generated files
gmshake ef083de
Add random Intel Elkhart Lake device IDs.
dmitryluhtionov ced72fd
tunables: remove legacy FreeBSD aliases
robn b2f5dc5
src.opts.mk: Remove REPRODUCIBLE_BUILD from the default list
markjdb 0143c9e
Revert "vtnet: fix compilation for NOIP configs"
tuexen f217bc7
Revert "vtnet: improve checksum offloading"
tuexen 3008f30
vtnet: improve checksum offloading
msvoelker 614e9b3
vtnet: fix compilation for NOIP configs
tuexen e3c3e86
Fix wrong dedup_table_size for legacy dedup
tuxoko 952ce99
nvme: Linux compat: don't filter & 0x3.
bsdimp 8266fa5
cmd: force zarcstat/zarc_summary recreation at install
robn 4729d5e
leap-seconds: Update to leap-seconds.3960835200 from IERS
e76e631
run: enable seqno offload
5d31e67
rsu: enable seqno offload
b73f52a
rsu: implement A-MPDU TX; add TODO items for further work
9bfb140
net80211: add support for drivers to disable sending NULL data frames
c745a68
iommu_get_requester(): make it more resilient against arbitrary dev arg
kostikbel f51d7d5
kern_thr_exit(): clear kASTs in advance
kostikbel b0474e1
geom: only set TDP_GEOM for user threads
kostikbel 54cc3da
moused: fix GCC build
VexedUXR d440953
vm_domainset: Only probe domains once when iterating, instead of up t…
OlCe2 d0b691a
vm_domainset: Simplify vm_domainset_iter_next()
OlCe2 637d985
vm_domainset: Refactor iterators, multiple fixes
OlCe2 f304c5b
bsdinstall: Drop outdated comments about ZFS dataset compression
michael-o 08356a7
qlnxe: Unconditionally enable extended media types
gmshake 6e3c8c0
qlnxe: Support SIOCGIFXMEDIA ioctl
gmshake e1c5e04
qlnxe: Report speeds in decimal format
gmshake 26d56de
certctl: Use __DECONST rather than reimplementing
jrtc27 2024887
certctl: Include sys/types.h
markjdb c1eff1d
sys: NOTES: Fix comment for wlan_* devices; GENERIC*: Re-order 'wlan_…
OlCe2 1cf67b5
NOTES: Fix whitespace in "options MAC_DO"
OlCe2 59f8f5d
zfs_vnops_os.c: Add support for the _PC_CLONE_BLKSIZE name
rmacklem de974a0
ddb ps: Print again the effective GID, separately
OlCe2 a242431
Fix the build on 32-bit FreeBSD with GCC
asomers 1c3c698
hwpmc: On attach, ensure owner is a target effective GID's member
OlCe2 1c40b15
hwpmc: On attach, fix allowing a PMC's owner to attach it to itself
OlCe2 d9e11f0
hwt: On attach, ensure owner is a target effective GID's member
OlCe2 67f8bd5
nfs: newnfs_setroot(): Remove an obsolete comment
OlCe2 71db323
nfscl: Restore sending the effective GID to the server
OlCe2 d859d4c
procfs: Restore printing the effective GID in 'status'
OlCe2 5568b44
imgact_elf: procstat groups: Restore sending the effective GID
OlCe2 63a40ca
kinfo_proc: Restore outputting the effective GID
OlCe2 7676df2
kvm_proclist(): Restore outputting the effective GID
OlCe2 faf7e99
'kern.proc.groups' sysctl knob: Restore outputting the effective GID
OlCe2 9bfbc68
sockstat: fix the -j option with piped output after libxo integration
asomers e29bfa5
Fix warnings about sha2_is_supported on FreeBSD/i386
asomers d81b84d
loader/efi: build with -Wall
VexedUXR 7d48a56
stand: remove unused variables
VexedUXR cd9b43e
loader/efi: return error from efi_find_framebuffer
VexedUXR b4c5d58
loader/efi: plug memory leak
VexedUXR 1814196
loader/efi: remove is_last parameter from find_currdev
VexedUXR 101a35e
efi: translate errno to EFI status on exit
VexedUXR 46347b3
ixgbe: Fix incomplete speed coverage in link status logging
bf-ybhosale 16f600d
jaildesc: replace EBADF with EINVAL
d8d5324
jaildesc: fix typo and style(9) violations.
cc6e21c
release: Remove a duplicate package listing in oracle.conf
markjdb 0adec3d
freebsd-update: sort options alphabetically
ngie-eign 4b83891
ZTS: Fix fault_limits timeouts
tonyhutter 9e5e95c
config: restore ZFS_AC_KERNEL_DENTRY tests
robn 7939bad
Linux 6.17: d_set_d_op() is no longer available
robn f113980
cpucontrol: fix -DDEBUG build
glebius 0833a3f
nanobsd: Alphebetize -I
bsdimp 90593b1
nanobsd: Expose do_image_prep on command line
bsdimp 685e60e
ngctl: Fix build without JAIL
gmshake 275f7d7
ixgbe: Remove unused function ixgbe_is_media_cage_present
bf-ybhosale 80661e2
loader/efi: fix non-x86 build
VexedUXR 9365a32
ports.7: Fix example of passing variables on the command line
0mp 6577e32
iflib: report output drops and handle ENOBUFS properly
f48b1a3
Fix possible out of bounds read in armv8_crc32c
w4123 3c152a3
fcntl(F_SETFL): Don't unconditionally invoke FIONBIO and FIOASYNC
bsdjhb 5f9a05e
tslog: Move sysinit_tslog_shim() into kern_tslog.c
gmshake 7099953
zfs: merge openzfs/zfs@7939bad5e
mmatuska 187ee62
dhclient: improve UDP checksum handling
tuexen 0b68e3c
libnv: Fix handling of nvlist_dump() and nvlist_send() for child nvlists
markjdb 3877025
dtrace: Use a size_t to represent a buffer size in the printm action
markjdb b653a28
re: Make sure re_rxeof() is called in net epoch context
markjdb 3d39856
vmm: Suspend the VM before destroying it
markjdb c1532f7
ixgbe: Correct ixgbe_link_speed_to_str comment
kev009 d549de7
libc: Remove readdir_r(3)
dag-erling dd8c666
src.sys.mk: Support src.conf in SRCTOP
dag-erling a8a18ee
packages: Turn off MANSPLITPKG by default
llfw c3d5387
tcp: minor cleanup
tuexen 9480465
pf: Remove dead code in pf_pull_hdr().
kprovost 6669467
pfctl: Use pfctl_fopen
kprovost 7aac81a
pfctl: support recusive printing of tables
kprovost d3020ca
pf tests: recusrive table printing test
kprovost 4889545
pfctl: fix killing state by source and destination address
kprovost 53e44c5
pf tests: test state killing by source and destination address
kprovost c8fb5a4
ifconfig: also fix removing IPv6 addresses without netlink
kprovost d81b337
jaildesc: remove file-mode-based access controls
fc68f8a
rmuser.sh: Improve prompt consistency with adduser
concussious 08b8843
pkg(7): Add support for pkg+ prefix to bootstrap pubkey
spmzt 2e72bd4
pci_vendors: update to 2025-07-11
bapt 70afc95
usb_vendors: update to 2025-07-26
bapt def2868
Lahiru: BOOT_PROF updated importing GENERIC
bllgg a9577ca
Reduced the delay in the test_controller(KBDC p)
bllgg 372c80f
Added the parameter from /boot/loader.conf named hw.atkbd.fast_delay
bllgg 4c8104d
Simplified the tunable delay conditions
bllgg 7119cd6
BOOT_PROF: added the variable atkbd_short_delay and macros ATKBD_DEL…
bllgg 3d612c3
BOOT_PROF: added ATKBD_DELAY to empty both buffers
bllgg f2936e4
BOOT_PROF: Cleared the code with FreeBSD styles and removed TS logs
bllgg fa0d7e7
BOOT_PROF: Cleared the code with FreeBSD styles and removed TS logs -…
bllgg 9fe27ed
BOOT_PROF: Instrument the device initialization with TSLOG to identif…
bllgg ecc8869
BOOT_PROF: Instrument the usb initialization with TSLOG to identify t…
bllgg 458007b
BOOT_PROF: Instrument the mount process of the root file system with …
bllgg 0862497
BOOT_PROF: Instrument the initialization process of AT keyboard and P…
bllgg 20a8b23
BOOT_PROF: Corrected the typo and shortened the long code lines
bllgg d962160
BOOT_PROF: Updated the man doc for atkbdc
bllgg 30fb0f4
Merge remote-tracking branch 'origin/bllgg-dev-atkbd-psm' into bllgg-…
bllgg 6207325
release: Made it possible to specify more attributes in metalog entries
markjdb 1d6b6ea
release: Create /firstboot in common VM image creation code
markjdb 682da5a
vendor/bc: upgrade to version 7.1.0
stesser fdc4a7c
contrib/bc upgrade to version 7.1.0
stesser 1a6ffcb
usr.bin/gh-bc: fix invocation of test scripts
stesser 2d06844
usr.bin/gh-bc: update for version 7.1.0
stesser d20c825
Revert "libc: Remove readdir_r(3)"
dag-erling 3c38dce
LinuxKPI: 802.11: avoid recursive wiphy lock
ed19c4f
loader.efi: improve StartImage error message
e584c46
sys/efi.h: Some style(9) tweaks
gmshake dd14103
git-blame-ignore-revs: sys/efi.h style(9) tweaks
gmshake 5daf8ed
ossl: Add GCM support on powerpc64/powerpc64le (POWER8+)
madscientist159 5ca390f
bnxt: Fix the request length in bnxt_hwrm_func_backing_store_cfg()
markjdb 3449a3a
ichwd: address unused function warning by marking as __unused
aokblast 7f81b25
snd_hda: Add patch for Framework 16 AMD Ryzen AI 300 Series
aokblast 9f3330f
nuageinit: Remove duplicate description of users.{user}.groups
DtxdF a5cc9b7
nuageinit: chmod sudoers directory instead of chmod (again) sudoers file
DtxdF 95230b2
nuageinit: Allow the use of network parameters from network-config
DtxdF 9a829e8
nuageinit: Add doas support
DtxdF 1855506
nuageinit: Add me to copyright list
DtxdF a74c8b8
backlight(9): add cross-ref to backlight(8)
bsdlme 55bd607
uptime: Mention libxo support in manual page
dag-erling 1014003
Revert "linux: fix reporting NL_RTM_DELLINK to Netlink sockets"
glebius 5a38857
cxgbe tom: Halve the size of offload transmit software descriptors
bsdjhb e2a2a75
cxgbe tom: Support sending "raw" WR mbufs on plain TCP and TLS sockets
bsdjhb a7aab22
cxgbe tom: Export alloc_raw_mbuf for use in other TOE drivers
bsdjhb d869395
cxgbe tom: Send auxiliary TLS work requests as raw WR mbufs
bsdjhb 8b41ba8
lib/msun: cpow{,f,l}(CMLX(0.0, 0.0)) should return 1.0
2223875
sys/bus.h: Some style(9) fixes
gmshake 64dca4e
git-blame-ignore-revs: sys/bus.h style(9) fixes
gmshake dbcaac1
jail: simplify EVFILT_JAIL events
317eb5d
BOOT_PROF: Reduced the dealy in AT keyboard and PS2 mouse initializat…
bllgg 54b1dbf
BOOT_PROF: Instrument the initialization process of AT keyboard and P…
bllgg 0873dc6
BOOT_PROF: Updated the man doc for atkbdc
bllgg 1525338
Merge remote-tracking branch 'origin/bllgg-dev-atkbd-psm' into bllgg-…
bllgg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,10 @@ | |
|
||
/* constants */ | ||
|
||
#define MAXKBDC 1 /* XXX */ | ||
#define MAXKBDC 1 /* XXX */ | ||
#define MILISECOND_MULTIPLIER 1000 /* micro second values will be multiplied to convert to mili seconds */ | ||
#define RESET_DELAY_DIVISION_FACTOR 40 /* keyboard reset delay time division factor */ | ||
|
||
|
||
/* macros */ | ||
|
||
|
@@ -80,6 +83,9 @@ | |
#define write_command(k, d) \ | ||
(bus_space_write_1((k)->iot, (k)->ioh1, 0, (d))) | ||
|
||
#define ATKBD_DELAY(x) (atkbd_short_delay ? (x) : (x) * MILISECOND_MULTIPLIER) | ||
#define RESET_DELAY(x) (atkbd_short_delay ? (x) * MILISECOND_MULTIPLIER : (x) * MILISECOND_MULTIPLIER / RESET_DELAY_DIVISION_FACTOR) | ||
|
||
|
||
/* local variables */ | ||
|
||
/* | ||
|
@@ -106,19 +112,19 @@ static int wait_for_kbd_ack(atkbdc_softc_t *kbdc); | |
static int wait_for_aux_data(atkbdc_softc_t *kbdc); | ||
static int wait_for_aux_ack(atkbdc_softc_t *kbdc); | ||
|
||
static int atkbd_fast_delay = 1; /* 1 = fast (default), 0 = slow */ | ||
static int atkbd_short_delay = 1; /* 1 = short delay (default), 0 = long delay */ | ||
|
||
/* Create hw.atkbd sysctl node (defines _hw_atkbd) */ | ||
SYSCTL_NODE(_hw, OID_AUTO, atkbd, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, | ||
"AT keyboard controller"); | ||
|
||
/* loader tunable: hw.atkbd.fast_delay */ | ||
TUNABLE_INT("hw.atkbd.fast_delay", &atkbd_fast_delay); | ||
/* loader tunable: hw.atkbd.short_delay */ | ||
TUNABLE_INT("hw.atkbd.short_delay", &atkbd_short_delay); | ||
|
||
/* sysctl knob: hw.atkbd.fast_delay */ | ||
/* sysctl knob: hw.atkbd.short_delay */ | ||
SYSCTL_DECL(_hw_atkbd); | ||
SYSCTL_INT(_hw_atkbd, OID_AUTO, fast_delay, CTLFLAG_RWTUN, | ||
&atkbd_fast_delay, 0, | ||
SYSCTL_INT(_hw_atkbd, OID_AUTO, short_delay, CTLFLAG_RWTUN, | ||
&atkbd_short_delay, 0, | ||
"Keyboard delays: 1=fast (default), 0=slow/conservative"); | ||
|
||
struct atkbdc_quirks { | ||
|
@@ -1025,8 +1031,8 @@ reset_kbd(KBDC p) | |
if (retry < 0) | ||
return FALSE; | ||
|
||
int delay_us = 5000; | ||
int max_wait_us = KBD_RESETDELAY*1000*KBD_MAXWAIT; | ||
int delay_us = RESET_DELAY(KBD_RESETDELAY); /* if the atkbd_short_delay is activated, delay will be shorten */ | ||
|
||
int max_wait_us = KBD_RESETDELAY * MILISECOND_MULTIPLIER * KBD_MAXWAIT; | ||
int attempts = max_wait_us / delay_us; | ||
|
||
while (attempts-- > 0) { | ||
|
@@ -1060,7 +1066,7 @@ reset_aux_dev(KBDC p) | |
emptyq(&p->aux); | ||
/* NOTE: Compaq Armada laptops require extra delay here. XXX */ | ||
for (again = KBD_MAXWAIT; again > 0; --again) { | ||
DELAY(atkbd_fast_delay ? KBD_RESETDELAY : KBD_RESETDELAY * 1000); | ||
DELAY(ATKBD_DELAY(KBD_RESETDELAY)); | ||
c = read_aux_data_no_wait(p); | ||
if (c != -1) | ||
break; | ||
|
@@ -1075,7 +1081,7 @@ reset_aux_dev(KBDC p) | |
|
||
for (again = KBD_MAXWAIT; again > 0; --again) { | ||
/* wait awhile, well, quite looooooooooooong */ | ||
DELAY(atkbd_fast_delay ? KBD_RESETDELAY : KBD_RESETDELAY * 1000); | ||
DELAY(ATKBD_DELAY(KBD_RESETDELAY)); | ||
c = read_aux_data_no_wait(p); /* RESET_DONE/RESET_FAIL */ | ||
if (c != -1) /* wait again if the controller is not ready */ | ||
break; | ||
|
@@ -1111,8 +1117,8 @@ test_controller(KBDC p) | |
|
||
emptyq(&p->kbd); | ||
|
||
int delay_us = 5000; | ||
int max_wait_us = KBD_RESETDELAY*1000*KBD_MAXWAIT; | ||
int delay_us = RESET_DELAY(KBD_RESETDELAY); | ||
int max_wait_us = KBD_RESETDELAY * MILISECOND_MULTIPLIER * KBD_MAXWAIT; | ||
int attempts = max_wait_us / delay_us; | ||
|
||
while (attempts-- > 0) { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo, 'milli'. also, be mindful about line lengths, in general, we want to fit into 80 chars