<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/ppbus, branch releng/12.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2021-11-28T11:45:05Z</updated>
<entry>
<title>ppbus(4): Fix a typo in source code comment</title>
<updated>2021-11-28T11:45:05Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2021-11-19T18:19:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fb93bffd8ab5db20049177665275ca6591a8869b'/>
<id>urn:sha1:fb93bffd8ab5db20049177665275ca6591a8869b</id>
<content type='text'>
- s/quering/querying/

Obtained from:	NetBSD

(cherry picked from commit 975e2e3f84b0b7425185c9bb43722da779e8cd98)
</content>
</entry>
<entry>
<title>ppbus: Set the lock for pps interface, update to latest api</title>
<updated>2021-10-02T16:43:21Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2021-09-01T19:37:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0c02dd569c72d9a053199385777ea73b21684a13'/>
<id>urn:sha1:0c02dd569c72d9a053199385777ea73b21684a13</id>
<content type='text'>
Since we take a lock when we enter the ioctl, we need to set driver_mtx
in the pps structure so it can be dropped while sleeping during a call
to timepps_fetch() with a non-zero timeout (PPS_CANWAIT feature).

MFC After:		5 days
Sponsored by:		Netflix
Reviewed by:		ian
Differential Revision:	https://reviews.freebsd.org/D31763

(cherry picked from commit c62aa65b2a7a6492e712a69c58a35347aa441a98)
</content>
</entry>
<entry>
<title>MFC r357393</title>
<updated>2020-02-06T16:22:16Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2020-02-06T16:22:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=497e1a40c935bac77b07a16345cbdb1b497ea370'/>
<id>urn:sha1:497e1a40c935bac77b07a16345cbdb1b497ea370</id>
<content type='text'>
However, fix the wording to match the same that we used elsewhere in the NIC
deprecation efforts. It was bogus when I committed to to -current.
</content>
</entry>
<entry>
<title>SPDX: use the Beerware identifier.</title>
<updated>2017-11-30T20:33:45Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-30T20:33:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=64de3fdd5893e55c8aa20df2dcf1d9e86d851b34'/>
<id>urn:sha1:64de3fdd5893e55c8aa20df2dcf1d9e86d851b34</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sys/dev: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-27T14:52:40Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-27T14:52:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=718cf2ccb9956613756ab15d7a0e28f2c8e91cab'/>
<id>urn:sha1:718cf2ccb9956613756ab15d7a0e28f2c8e91cab</id>
<content type='text'>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
</content>
</entry>
<entry>
<title>spdx: initial adoption of licensing ID tags.</title>
<updated>2017-11-18T14:26:50Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-18T14:26:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=df57947f083046d50552e99b91074927d2458708'/>
<id>urn:sha1:df57947f083046d50552e99b91074927d2458708</id>
<content type='text'>
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

Initially, only tag files that use BSD 4-Clause "Original" license.

RelNotes:	yes
Differential Revision:	https://reviews.freebsd.org/D13133
</content>
</entry>
<entry>
<title>Remove register keyword from sys/ and ANSIfy prototypes</title>
<updated>2017-05-17T00:34:34Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2017-05-17T00:34:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3e85b721d653d65a5b6ff655ed1551113f0e0d5b'/>
<id>urn:sha1:3e85b721d653d65a5b6ff655ed1551113f0e0d5b</id>
<content type='text'>
A long long time ago the register keyword told the compiler to store
the corresponding variable in a CPU register, but it is not relevant
for any compiler used in the FreeBSD world today.

ANSIfy related prototypes while here.

Reviewed by:	cem, jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10193
</content>
</entry>
<entry>
<title>sys/dev: Replace zero with NULL for pointers.</title>
<updated>2017-02-20T03:43:12Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-02-20T03:43:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4d24901ac9131267fd188c5e1ee19a219847238a'/>
<id>urn:sha1:4d24901ac9131267fd188c5e1ee19a219847238a</id>
<content type='text'>
Makes things easier to read, plus architectures may set NULL to something
different than zero.

Found with:	devel/coccinelle
MFC after:	3 weeks
</content>
</entry>
<entry>
<title>Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)</title>
<updated>2017-01-04T20:26:42Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2017-01-04T20:26:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4195c7de2471d6212744bcbf128d659e94801d17'/>
<id>urn:sha1:4195c7de2471d6212744bcbf128d659e94801d17</id>
<content type='text'>
The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are
fixed-length strings. AFAICT the only place they're read is in
sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated.
However, the kernel doesn't null-terminate them. A bunch of copy-pasted code
uses strncpy to write them, and doesn't guarantee null-termination. For at
least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually
overflows. You can see the result by doing "camcontrol negotiate da0 -v".

This change null-terminates those fields everywhere they're set in the
kernel. It also shortens a few strings to ensure they'll fit within the
16-character field.

PR:		215474
Reported by:	Coverity
CID:		1009997 1010000 1010001 1010002 1010003 1010004 1010005
CID:		1331519 1010006 1215097 1010007 1288967 1010008 1306000
CID:		1211924 1010009 1010010 1010011 1010012 1010013 1010014
CID:		1147190 1010017 1010016 1010018 1216435 1010020 1010021
CID:		1010022 1009666 1018185 1010023 1010025 1010026 1010027
CID:		1010028 1010029 1010030 1010031 1010033 1018186 1018187
CID:		1010035 1010036 1010042 1010041 1010040 1010039
Reviewed by:	imp, sephe, slm
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D9037
Differential Revision:	https://reviews.freebsd.org/D9038
</content>
</entry>
<entry>
<title>With clang 3.9.0, compiling ppbus(4) results in the following warnings:</title>
<updated>2016-09-03T13:48:44Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2016-09-03T13:48:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3128fa9a5a5240e71d514f95f92f35af30280d1c'/>
<id>urn:sha1:3128fa9a5a5240e71d514f95f92f35af30280d1c</id>
<content type='text'>
sys/dev/ppbus/ppb_1284.c:296:46: error: implicit conversion from 'int'
to 'char' changes value from 144 to -112 [-Werror,-Wconstant-conversion]
        if ((error = do_peripheral_wait(bus, SELECT | nBUSY, 0))) {
                     ~~~~~~~~~~~~~~~~~~      ~~~~~~~^~~~~~~
sys/dev/ppbus/ppb_1284.c:785:48: error: implicit conversion from 'int'
to 'char' changes value from 240 to -16 [-Werror,-Wconstant-conversion]
                if (do_1284_wait(bus, nACK | SELECT | PERROR | nBUSY,
                    ~~~~~~~~~~~~      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
sys/dev/ppbus/ppb_1284.c:786:29: error: implicit conversion from 'int'
to 'char' changes value from 240 to -16 [-Werror,-Wconstant-conversion]
                                        nACK | SELECT | PERROR | nBUSY)) {
                                        ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

This is because nBUSY is 0x80, so the plain char argument is wrapped to
a negative value.  Fix this in a minimal fashion, by using uint8_t in a
few places.

Reviewed by:	emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D7771
</content>
</entry>
</feed>
