History log of /netbsd-current/sys/dev/hdaudio/hdaudio.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.18 07-Apr-2022 andvar

fix various typos in comments.


# 1.17 28-Mar-2022 riastradh

driver(9): devsw_detach never fails. Make it return void.

Prune a whole lotta dead branches as a result of this. (Some logic
calling this is also wrong for other reasons; devsw_detach is final
-- you should never have any reason to decide to roll it back. To be
cleaned up in subsequent commits...)

XXX kernel ABI change to devsw_detach signature requires bump


Revision tags: thorpej-i2c-spi-conf2-base
# 1.16 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base thorpej-i2c-spi-conf-base
# 1.15 29-Jun-2021 pgoyette

branches: 1.15.2;
Rework the xxxVERBOSE option to share the common module-hook-based
verbose mechanism with MIIVERBOSE. This reduces some duplicated code
and allows us to once again permit auto-unload of MIIVERBOSE.

Change details:
* Update dev/devlist2h.awk to accomodate miidevs, including generation
of MII_STR_oui_model definitions and use of oui and model rather than
vendor and product. This also changes the compressed data in the
xxxdevs_data.h files to uint32_t (since mii oui's are up to 6 hex
digits long)
* Update a couple of phy drivers to use new calls to get verbose data
* Regen all of the xxxdevs{,_data}.h files (separate commit, coming
very soon)
* Update mii/mii_verbose.[ch] and mii/mii_physubr.c to use the various
DEV_VERBOSE_xxx macros
* Update the pci, usb, and hdaudio code as needed, to #include the
xxxdevs.h files (in order to get the proper printf format strings)
* Since dev/dev_verbose.c now uses non-literal printf format strings,
(to deal with the vendor/product vs oui/model issue), we need to
make sure it gets compiled with -Wno-error=format-nonliteral, even
in userland's libpci and librumpdev!
* Bump kernel version for the change in module interfaces

Welcome to 9.99.86!

XXX It might be useful in the future to extend the MII_STR_oui_model
XXX definitions to PCI as well (and perhaps USB and HDAUDIO). This
XXX would allow for a single centralized location for the products'
XXX descriptions, rather than being dispersed among individual
XXX drivers' xxx_match tables.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.14 24-Apr-2021 thorpej

branches: 1.14.2;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.13 28-Dec-2020 jmcneill

branches: 1.13.2;
If the Subordinate Node Count returns 0 nodes, complain and return instead
of trying to kmem_zalloc 0 bytes later on.


# 1.12 28-Dec-2020 jmcneill

Initialize DMA memory when allocating it. Should fix PR# 51734 (hdaudio
"RIRB timeout" on boot).


# 1.11 11-Jun-2020 thorpej

branches: 1.11.2;
Update for proplib(3) API changes.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
# 1.10 08-Feb-2020 jmcneill

Read GCAP and version regs after taking the controller out of reset. Fixes
stream counts on my Radeon HD 7850.


Revision tags: netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.9 26-Jul-2019 jmcneill

branches: 1.9.2; 1.9.4;
Even though the spec says SRST should read back as 1 after being set, this
does not appear to be the case with QEMU when using single byte accesses.

Instead of printing an error and giving up, continue and try to leave
stream reset state even if setting SRST times out.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.8 24-Nov-2017 jmcneill

branches: 1.8.2; 1.8.6;
Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.

XXX pullup


# 1.7 24-Nov-2017 jmcneill

Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.


# 1.6 24-Nov-2017 jmcneill

Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.

XXX pullup


Revision tags: nick-nhusb-base-20170825 perseant-stdc-iso10646-base
# 1.5 04-Jun-2017 pgoyette

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module. Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

branches: 1.4.8; 1.4.10;
get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.


# 1.17 28-Mar-2022 riastradh

driver(9): devsw_detach never fails. Make it return void.

Prune a whole lotta dead branches as a result of this. (Some logic
calling this is also wrong for other reasons; devsw_detach is final
-- you should never have any reason to decide to roll it back. To be
cleaned up in subsequent commits...)

XXX kernel ABI change to devsw_detach signature requires bump


Revision tags: thorpej-i2c-spi-conf2-base
# 1.16 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base thorpej-i2c-spi-conf-base
# 1.15 29-Jun-2021 pgoyette

branches: 1.15.2;
Rework the xxxVERBOSE option to share the common module-hook-based
verbose mechanism with MIIVERBOSE. This reduces some duplicated code
and allows us to once again permit auto-unload of MIIVERBOSE.

Change details:
* Update dev/devlist2h.awk to accomodate miidevs, including generation
of MII_STR_oui_model definitions and use of oui and model rather than
vendor and product. This also changes the compressed data in the
xxxdevs_data.h files to uint32_t (since mii oui's are up to 6 hex
digits long)
* Update a couple of phy drivers to use new calls to get verbose data
* Regen all of the xxxdevs{,_data}.h files (separate commit, coming
very soon)
* Update mii/mii_verbose.[ch] and mii/mii_physubr.c to use the various
DEV_VERBOSE_xxx macros
* Update the pci, usb, and hdaudio code as needed, to #include the
xxxdevs.h files (in order to get the proper printf format strings)
* Since dev/dev_verbose.c now uses non-literal printf format strings,
(to deal with the vendor/product vs oui/model issue), we need to
make sure it gets compiled with -Wno-error=format-nonliteral, even
in userland's libpci and librumpdev!
* Bump kernel version for the change in module interfaces

Welcome to 9.99.86!

XXX It might be useful in the future to extend the MII_STR_oui_model
XXX definitions to PCI as well (and perhaps USB and HDAUDIO). This
XXX would allow for a single centralized location for the products'
XXX descriptions, rather than being dispersed among individual
XXX drivers' xxx_match tables.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.14 24-Apr-2021 thorpej

branches: 1.14.2;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.13 28-Dec-2020 jmcneill

branches: 1.13.2;
If the Subordinate Node Count returns 0 nodes, complain and return instead
of trying to kmem_zalloc 0 bytes later on.


# 1.12 28-Dec-2020 jmcneill

Initialize DMA memory when allocating it. Should fix PR# 51734 (hdaudio
"RIRB timeout" on boot).


# 1.11 11-Jun-2020 thorpej

branches: 1.11.2;
Update for proplib(3) API changes.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
# 1.10 08-Feb-2020 jmcneill

Read GCAP and version regs after taking the controller out of reset. Fixes
stream counts on my Radeon HD 7850.


Revision tags: netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.9 26-Jul-2019 jmcneill

branches: 1.9.2; 1.9.4;
Even though the spec says SRST should read back as 1 after being set, this
does not appear to be the case with QEMU when using single byte accesses.

Instead of printing an error and giving up, continue and try to leave
stream reset state even if setting SRST times out.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.8 24-Nov-2017 jmcneill

branches: 1.8.2; 1.8.6;
Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.

XXX pullup


# 1.7 24-Nov-2017 jmcneill

Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.


# 1.6 24-Nov-2017 jmcneill

Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.

XXX pullup


Revision tags: nick-nhusb-base-20170825 perseant-stdc-iso10646-base
# 1.5 04-Jun-2017 pgoyette

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module. Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

branches: 1.4.8; 1.4.10;
get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.


# 1.16 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base thorpej-i2c-spi-conf-base
# 1.15 29-Jun-2021 pgoyette

branches: 1.15.2;
Rework the xxxVERBOSE option to share the common module-hook-based
verbose mechanism with MIIVERBOSE. This reduces some duplicated code
and allows us to once again permit auto-unload of MIIVERBOSE.

Change details:
* Update dev/devlist2h.awk to accomodate miidevs, including generation
of MII_STR_oui_model definitions and use of oui and model rather than
vendor and product. This also changes the compressed data in the
xxxdevs_data.h files to uint32_t (since mii oui's are up to 6 hex
digits long)
* Update a couple of phy drivers to use new calls to get verbose data
* Regen all of the xxxdevs{,_data}.h files (separate commit, coming
very soon)
* Update mii/mii_verbose.[ch] and mii/mii_physubr.c to use the various
DEV_VERBOSE_xxx macros
* Update the pci, usb, and hdaudio code as needed, to #include the
xxxdevs.h files (in order to get the proper printf format strings)
* Since dev/dev_verbose.c now uses non-literal printf format strings,
(to deal with the vendor/product vs oui/model issue), we need to
make sure it gets compiled with -Wno-error=format-nonliteral, even
in userland's libpci and librumpdev!
* Bump kernel version for the change in module interfaces

Welcome to 9.99.86!

XXX It might be useful in the future to extend the MII_STR_oui_model
XXX definitions to PCI as well (and perhaps USB and HDAUDIO). This
XXX would allow for a single centralized location for the products'
XXX descriptions, rather than being dispersed among individual
XXX drivers' xxx_match tables.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.14 24-Apr-2021 thorpej

branches: 1.14.2;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.13 28-Dec-2020 jmcneill

branches: 1.13.2;
If the Subordinate Node Count returns 0 nodes, complain and return instead
of trying to kmem_zalloc 0 bytes later on.


# 1.12 28-Dec-2020 jmcneill

Initialize DMA memory when allocating it. Should fix PR# 51734 (hdaudio
"RIRB timeout" on boot).


# 1.11 11-Jun-2020 thorpej

branches: 1.11.2;
Update for proplib(3) API changes.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
# 1.10 08-Feb-2020 jmcneill

Read GCAP and version regs after taking the controller out of reset. Fixes
stream counts on my Radeon HD 7850.


Revision tags: netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.9 26-Jul-2019 jmcneill

branches: 1.9.2; 1.9.4;
Even though the spec says SRST should read back as 1 after being set, this
does not appear to be the case with QEMU when using single byte accesses.

Instead of printing an error and giving up, continue and try to leave
stream reset state even if setting SRST times out.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.8 24-Nov-2017 jmcneill

branches: 1.8.2; 1.8.6;
Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.

XXX pullup


# 1.7 24-Nov-2017 jmcneill

Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.


# 1.6 24-Nov-2017 jmcneill

Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.

XXX pullup


Revision tags: nick-nhusb-base-20170825 perseant-stdc-iso10646-base
# 1.5 04-Jun-2017 pgoyette

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module. Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

branches: 1.4.8; 1.4.10;
get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.


# 1.15 29-Jun-2021 pgoyette

Rework the xxxVERBOSE option to share the common module-hook-based
verbose mechanism with MIIVERBOSE. This reduces some duplicated code
and allows us to once again permit auto-unload of MIIVERBOSE.

Change details:
* Update dev/devlist2h.awk to accomodate miidevs, including generation
of MII_STR_oui_model definitions and use of oui and model rather than
vendor and product. This also changes the compressed data in the
xxxdevs_data.h files to uint32_t (since mii oui's are up to 6 hex
digits long)
* Update a couple of phy drivers to use new calls to get verbose data
* Regen all of the xxxdevs{,_data}.h files (separate commit, coming
very soon)
* Update mii/mii_verbose.[ch] and mii/mii_physubr.c to use the various
DEV_VERBOSE_xxx macros
* Update the pci, usb, and hdaudio code as needed, to #include the
xxxdevs.h files (in order to get the proper printf format strings)
* Since dev/dev_verbose.c now uses non-literal printf format strings,
(to deal with the vendor/product vs oui/model issue), we need to
make sure it gets compiled with -Wno-error=format-nonliteral, even
in userland's libpci and librumpdev!
* Bump kernel version for the change in module interfaces

Welcome to 9.99.86!

XXX It might be useful in the future to extend the MII_STR_oui_model
XXX definitions to PCI as well (and perhaps USB and HDAUDIO). This
XXX would allow for a single centralized location for the products'
XXX descriptions, rather than being dispersed among individual
XXX drivers' xxx_match tables.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base
# 1.14 24-Apr-2021 thorpej

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.13 28-Dec-2020 jmcneill

branches: 1.13.2;
If the Subordinate Node Count returns 0 nodes, complain and return instead
of trying to kmem_zalloc 0 bytes later on.


# 1.12 28-Dec-2020 jmcneill

Initialize DMA memory when allocating it. Should fix PR# 51734 (hdaudio
"RIRB timeout" on boot).


# 1.11 11-Jun-2020 thorpej

branches: 1.11.2;
Update for proplib(3) API changes.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
# 1.10 08-Feb-2020 jmcneill

Read GCAP and version regs after taking the controller out of reset. Fixes
stream counts on my Radeon HD 7850.


Revision tags: netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.9 26-Jul-2019 jmcneill

branches: 1.9.2; 1.9.4;
Even though the spec says SRST should read back as 1 after being set, this
does not appear to be the case with QEMU when using single byte accesses.

Instead of printing an error and giving up, continue and try to leave
stream reset state even if setting SRST times out.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.8 24-Nov-2017 jmcneill

branches: 1.8.2; 1.8.6;
Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.

XXX pullup


# 1.7 24-Nov-2017 jmcneill

Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.


# 1.6 24-Nov-2017 jmcneill

Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.

XXX pullup


Revision tags: nick-nhusb-base-20170825 perseant-stdc-iso10646-base
# 1.5 04-Jun-2017 pgoyette

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module. Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

branches: 1.4.8; 1.4.10;
get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.


# 1.14 24-Apr-2021 thorpej

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).


Revision tags: thorpej-cfargs-base thorpej-futex-base
# 1.13 28-Dec-2020 jmcneill

branches: 1.13.2;
If the Subordinate Node Count returns 0 nodes, complain and return instead
of trying to kmem_zalloc 0 bytes later on.


# 1.12 28-Dec-2020 jmcneill

Initialize DMA memory when allocating it. Should fix PR# 51734 (hdaudio
"RIRB timeout" on boot).


# 1.11 11-Jun-2020 thorpej

branches: 1.11.2;
Update for proplib(3) API changes.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
# 1.10 08-Feb-2020 jmcneill

Read GCAP and version regs after taking the controller out of reset. Fixes
stream counts on my Radeon HD 7850.


Revision tags: netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.9 26-Jul-2019 jmcneill

branches: 1.9.2; 1.9.4;
Even though the spec says SRST should read back as 1 after being set, this
does not appear to be the case with QEMU when using single byte accesses.

Instead of printing an error and giving up, continue and try to leave
stream reset state even if setting SRST times out.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.8 24-Nov-2017 jmcneill

branches: 1.8.2; 1.8.6;
Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.

XXX pullup


# 1.7 24-Nov-2017 jmcneill

Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.


# 1.6 24-Nov-2017 jmcneill

Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.

XXX pullup


Revision tags: nick-nhusb-base-20170825 perseant-stdc-iso10646-base
# 1.5 04-Jun-2017 pgoyette

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module. Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

branches: 1.4.8; 1.4.10;
get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.


# 1.13 28-Dec-2020 jmcneill

If the Subordinate Node Count returns 0 nodes, complain and return instead
of trying to kmem_zalloc 0 bytes later on.


# 1.12 28-Dec-2020 jmcneill

Initialize DMA memory when allocating it. Should fix PR# 51734 (hdaudio
"RIRB timeout" on boot).


Revision tags: thorpej-futex-base
# 1.11 11-Jun-2020 thorpej

Update for proplib(3) API changes.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
# 1.10 08-Feb-2020 jmcneill

Read GCAP and version regs after taking the controller out of reset. Fixes
stream counts on my Radeon HD 7850.


Revision tags: netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.9 26-Jul-2019 jmcneill

branches: 1.9.2; 1.9.4;
Even though the spec says SRST should read back as 1 after being set, this
does not appear to be the case with QEMU when using single byte accesses.

Instead of printing an error and giving up, continue and try to leave
stream reset state even if setting SRST times out.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.8 24-Nov-2017 jmcneill

branches: 1.8.2; 1.8.6;
Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.

XXX pullup


# 1.7 24-Nov-2017 jmcneill

Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.


# 1.6 24-Nov-2017 jmcneill

Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.

XXX pullup


Revision tags: nick-nhusb-base-20170825 perseant-stdc-iso10646-base
# 1.5 04-Jun-2017 pgoyette

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module. Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

branches: 1.4.8; 1.4.10;
get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.


# 1.11 11-Jun-2020 thorpej

Update for proplib(3) API changes.


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
# 1.10 08-Feb-2020 jmcneill

Read GCAP and version regs after taking the controller out of reset. Fixes
stream counts on my Radeon HD 7850.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.9 26-Jul-2019 jmcneill

branches: 1.9.4;
Even though the spec says SRST should read back as 1 after being set, this
does not appear to be the case with QEMU when using single byte accesses.

Instead of printing an error and giving up, continue and try to leave
stream reset state even if setting SRST times out.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.8 24-Nov-2017 jmcneill

branches: 1.8.2; 1.8.6;
Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.

XXX pullup


# 1.7 24-Nov-2017 jmcneill

Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.


# 1.6 24-Nov-2017 jmcneill

Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.

XXX pullup


Revision tags: nick-nhusb-base-20170825 perseant-stdc-iso10646-base
# 1.5 04-Jun-2017 pgoyette

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module. Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

branches: 1.4.8; 1.4.10;
get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.


# 1.10 08-Feb-2020 jmcneill

Read GCAP and version regs after taking the controller out of reset. Fixes
stream counts on my Radeon HD 7850.


Revision tags: netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.9 26-Jul-2019 jmcneill

Even though the spec says SRST should read back as 1 after being set, this
does not appear to be the case with QEMU when using single byte accesses.

Instead of printing an error and giving up, continue and try to leave
stream reset state even if setting SRST times out.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.8 24-Nov-2017 jmcneill

branches: 1.8.2;
Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.

XXX pullup


# 1.7 24-Nov-2017 jmcneill

Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.


# 1.6 24-Nov-2017 jmcneill

Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.

XXX pullup


Revision tags: nick-nhusb-base-20170825 perseant-stdc-iso10646-base
# 1.5 04-Jun-2017 pgoyette

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module. Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

branches: 1.4.8; 1.4.10;
get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.


# 1.9 26-Jul-2019 jmcneill

Even though the spec says SRST should read back as 1 after being set, this
does not appear to be the case with QEMU when using single byte accesses.

Instead of printing an error and giving up, continue and try to leave
stream reset state even if setting SRST times out.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.8 24-Nov-2017 jmcneill

branches: 1.8.2;
Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.

XXX pullup


# 1.7 24-Nov-2017 jmcneill

Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.


# 1.6 24-Nov-2017 jmcneill

Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.

XXX pullup


Revision tags: nick-nhusb-base-20170825 perseant-stdc-iso10646-base
# 1.5 04-Jun-2017 pgoyette

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module. Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

branches: 1.4.8; 1.4.10;
get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.


Revision tags: tls-maxphys-base-20171202
# 1.8 24-Nov-2017 jmcneill

branches: 1.8.2;
Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.

XXX pullup


# 1.7 24-Nov-2017 jmcneill

Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.


# 1.6 24-Nov-2017 jmcneill

Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.

XXX pullup


Revision tags: nick-nhusb-base-20170825 perseant-stdc-iso10646-base
# 1.5 04-Jun-2017 pgoyette

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module. Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

branches: 1.4.8; 1.4.10;
get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.


# 1.5 04-Jun-2017 pgoyette

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module. Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

branches: 1.4.8; 1.4.10;
get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.4 23-Dec-2015 jmcneill

get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack


Revision tags: nick-nhusb-base-20150921
# 1.3 26-Jul-2015 jmcneill

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.


Revision tags: nick-nhusb-base-20150606
# 1.2 20-May-2015 riastradh

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.


Revision tags: nick-nhusb-base-20150406
# 1.1 28-Mar-2015 jmcneill

branches: 1.1.2;
Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.