| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Reviewed by: imp, jhb
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D50913
|
|
|
|
| |
Sponsored by: Netflix
|
|
|
|
|
|
|
|
|
|
| |
This is mostly to reduce the diff with CheriBSD which adds additional
constants to enum uio_rw, but also matches the normal style used for
uio_segflg.
Reviewed by: kib, emaste
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D45142
|
|
|
|
|
|
|
|
| |
Some of the I2C ioctl request structures contain pointers and need to
handle requests from 32-bit applications on 64-bit kernels.
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D42836
|
|
|
|
| |
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
|
|
|
|
|
|
|
|
| |
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=326255
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to prevent memory exhaustion and short allocations on 32-bit systems. Since iicrdwr is intended to be a workalike of a Linux i2c-dev call, use the same limit of 42 that Linux uses.
Also check the return value of copyin(9) to prevent unnecessary allocation in the failure case.
Submitted by: ngie
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5155
Notes:
svn path=/head/; revision=300258
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
negative array indexing in iicrdwr(..)
Differential Revision: https://reviews.freebsd.org/D5132
Obtained from: HardenedBSD
PR: 206754
Reported by: CTurt <cturt@hardenedbsd.org>
Submitted by: Madhi Moktari <mokhi64@gmail.com>
Sponsored by: EMC / Isilon Storage Division
Notes:
svn path=/head/; revision=295080
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--Allow multiple open iic fds by storing addressing state in cdevpriv
--Fix, as much as possible, the baked-in race conditions in the iic
ioctl interface by requesting bus ownership on I2CSTART, releasing it on
I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv
to use the I/O ioctls
--Reduce internal iic buffer size and remove 1K read/write limit by
iteratively calling iicbus_read/iicbus_write
--Eliminate dynamic allocation in I2CWRITE/I2CREAD
--Move handling of I2CRDWR to separate function and improve error handling
--Add new I2CSADDR ioctl to store address in current cdevpriv so that
I2CSTART is not needed for read(2)/write(2) to work
--Redesign iicbus_request_bus() and iicbus_release_bus():
--iicbus_request_bus() no longer falls through if the bus is already
owned by the requesting device. Multiple threads on the same device may
want exclusive access. Also, iicbus_release_bus() was never
device-recursive anyway.
--Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but
the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be
issued again
--Do not hold iicbus mtx during IICBUS_CALLBACK call. There are
several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed.
--Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns
EWOULDBLOCK; instead pass that to the caller so that it can retry if so
desired.
Differential Revision: https://reviews.freebsd.org/D2140
Reviewed by: imp, jhb, loos
Approved by: kib (mentor)
Notes:
svn path=/head/; revision=281828
|
|
|
|
|
|
|
| |
We should probably fix sys/gpio.h instead.
Notes:
svn path=/head/; revision=268564
|
|
|
|
|
|
|
|
|
|
| |
This lets us call iic(4) ioctls without needing the kernel source code
and follows the same model of GPIO.
MFC after: 3 weeks
Notes:
svn path=/head/; revision=268543
|
|
|
|
|
|
|
|
|
|
|
| |
master-only controller.
This fixes the iic bus scan with i2c(8) (on supported controllers).
Tested with gpioiic(4).
Notes:
svn path=/head/; revision=266923
|
|
|
|
| |
Notes:
svn path=/head/; revision=242947
|
|
|
|
|
|
|
|
| |
Suggested by: pjd
MFC after: 1 week
Notes:
svn path=/head/; revision=226442
|
|
|
|
|
|
|
|
|
| |
CID: 4203
Found with: Coverity Prevent(tm)
MFC after: 1 week
Notes:
svn path=/head/; revision=226398
|
|
|
|
|
|
|
|
|
|
| |
upcoming i2c(8) diag utility.
Reviewed by: bms, stas
Obtained from: Semihalf
Notes:
svn path=/head/; revision=187709
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
work when the bus attaches its own children. Instead of hardcoding a unit
number and returning BUS_PROBE_NOWILDCARD, which will break multiple iicbus
systems, check in the probe routine whether the device address is 0. Real
I2C devices will never have this address, but devices added with
BUS_ADD_CHILD() will.
Requested by: jhb
Reviewed by: jhb
Notes:
svn path=/head/; revision=187321
|
|
|
|
|
|
|
|
|
|
|
|
| |
subclasses as are available with PCI. Changes I2C device drivers without
real probe logic to return BUS_PROBE_NOWILDWARD to avoid interference with
firmware bus enumeration, and reduces the probe priority of the iicbus
base driver to allow subclass attachment at higher priority.
Discussed on: freebsd-arch
Notes:
svn path=/head/; revision=186833
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add an sx lock to the iic(4) driver to serialize open(), close(), read(),
and write and to protect sc_addr and sc_count in the softc.
- Use cdev->si_drv1 instead of using the minor number of the cdev to
lookup the softc via newbus in iic(4).
- Store the device_t in the softc to avoid a similar detour via minor
numbers in iic(4).
- Only add at most one instance of iic(4) and iicsmb(4) to each iicbus(4)
instance, and do it in the child driver.
- Add a mutex to the iicbus(4) softc to synchronize the request/release bus
stuff.
- Use __BUS_ACCESSOR() for IICBUS_ACCESSOR() instead of rolling our own.
- Add a mutex to the iicsmb(4) softc to protect softc state updated in the
interrupt handler.
- Remove Giant from all the smbus methods in iicsmb(4) now that all the
iicbus(4) backend is locked.
Notes:
svn path=/head/; revision=181304
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
some devices (and not others). To get instances onto the iicbus, one
now needs hints or an identify routine. We also do not probe the bus
for devices because many iic devices cannot be safely probed (and when
they can, the probe order turns out to be somewhat difficult to get
right).
# I'm not 100% sure that the iicsmb removal is right. Please contact me if
# this causes difficulty.
Notes:
svn path=/head/; revision=167856
|
|
|
|
|
|
|
| |
Tweak a comment while I'm here.
Notes:
svn path=/head/; revision=164501
|
|
|
|
|
|
|
| |
of M_WAITOK.
Notes:
svn path=/head/; revision=162074
|
|
|
|
| |
Notes:
svn path=/head/; revision=162072
|
|
|
|
|
|
|
|
|
|
|
|
| |
forcing all transfers to do the start read/write stop by hand. Some
smart bridges prefer this sort of operation, and this allows us to
support their features more easily. When bridges don't support it, we
fall back to using the old-style opertaions. Expand the ioctl
interface to expose this function. Unlike the old-style interface,
this interface is thread safe, even on old bridges.
Notes:
svn path=/head/; revision=160372
|
|
|
|
|
|
|
| |
Plus a minor formatting nit in nearby code.
Notes:
svn path=/head/; revision=157523
|
|
|
|
|
|
|
| |
we're actually doing.
Notes:
svn path=/head/; revision=157482
|
|
|
|
|
|
|
| |
Bump __FreeBSD_version accordingly.
Notes:
svn path=/head/; revision=130585
|
|
|
|
|
|
|
|
|
| |
transfers.
MFC after: 1 month
Notes:
svn path=/head/; revision=129291
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.
Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
Notes:
svn path=/head/; revision=126080
|
|
|
|
|
|
|
|
|
|
| |
Free approx 86 major numbers with a mostly automatically generated patch.
A number of strategic drivers have been left behind by caution, and a few
because they still (ab)use their major number.
Notes:
svn path=/head/; revision=126076
|
|
|
|
|
|
|
| |
We can have multiple instances.
Notes:
svn path=/head/; revision=118728
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
branches:
Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.
This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.
Approved by: re(scottl)
Notes:
svn path=/head/; revision=111815
|
|
|
|
|
|
|
| |
<dev/smbus/smb.h> - there is nothing MD about these ioctl definitions.
Notes:
svn path=/head/; revision=103588
|
|
|
|
|
|
|
|
|
|
|
| |
- VIA chipset SMBus controllers added
- alpm driver updated
- Support for dynamic modules added
- bktr FreeBSD smbus updated but not tested
- cleanup
Notes:
svn path=/head/; revision=93023
|
|
|
|
|
|
|
| |
also don't use ANSI string concatenation.
Notes:
svn path=/head/; revision=87599
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Notes:
svn path=/head/; revision=83366
|
|
|
|
|
|
|
| |
the bit-bucket.
Notes:
svn path=/head/; revision=74810
|
|
|
|
| |
Notes:
svn path=/head/; revision=67164
|
|
|
|
|
|
|
| |
Remove ~60 unneeded #include <sys/malloc.h>
Notes:
svn path=/head/; revision=59391
|
|
|
|
|
|
|
|
| |
Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks
by 924 bytes.
Notes:
svn path=/head/; revision=59368
|
|
|
|
|
|
|
|
| |
annoying 'iic is usurping iic's cdevsw' type messages. (Yes, there are
other ways to fix cdevsw_add(), but that is a doomed api)
Notes:
svn path=/head/; revision=53329
|
|
|
|
| |
Notes:
svn path=/head/; revision=53005
|
|
|
|
|
|
|
| |
takes care of the cdevsw_add() - it doesn't need to be done twice.
Notes:
svn path=/head/; revision=51936
|
|
|
|
|
|
|
|
|
|
|
| |
have been there in the first place. A GENERIC kernel shrinks almost 1k.
Add a slightly different safetybelt under nostop for tty drivers.
Add some missing FreeBSD tags
Notes:
svn path=/head/; revision=51658
|
|
|
|
| |
Notes:
svn path=/head/; revision=50477
|
|
|
|
| |
Notes:
svn path=/head/; revision=48557
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cdevsw_add() function now finds the major number(s) in the
struct cdevsw passed to it. cdevsw_add_generic() is no longer
needed, cdevsw_add() does the same thing.
cdevsw_add() will print an message if the d_maj field looks bogus.
Remove nblkdev and nchrdev variables. Most places they were used
bogusly. Instead check a dev_t for validity by seeing if devsw()
or bdevsw() returns NULL.
Move bdevsw() and devsw() functions to kern/kern_conf.c
Bump __FreeBSD_version to 400006
This commit removes:
72 bogus makedev() calls
26 bogus SYSINIT functions
if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.
I4b and vinum not changed. Patches emailed to authors. LINT
probably broken until they catch up.
Notes:
svn path=/head/; revision=47640
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reformat and initialize correctly all "struct cdevsw".
Initialize the d_maj and d_bmaj fields.
The d_reset field was not removed, although it is never used.
I used a program to do most of this, so all the files now use the
same consistent format. Please keep it that way.
Vinum and i4b not modified, patches emailed to respective authors.
Notes:
svn path=/head/; revision=47625
|