aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pbio
Commit message (Collapse)AuthorAgeFilesLines
* chore: replace {0, 0} with {DEV,KOBJ}METHOD_ENDEnji Cooper2026-02-251-1/+1
| | | | | | | | | | | | | | Both of the aforementioned macros have been present in FreeBSD for well over a decade: 2009 for `KOBJMETHOD_END`; 2011 for `DEVMETHOD_END`. Adapt all hardcoded references of `{0, 0}` with `DEVMETHOD_END` and `KOBJMETHOD_END` as appropriate. This helps ensure that future adaptations to drivers following patterns documented in driver(9) can be made more easily/without issue. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55414
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-122-2/+2
| | | | | | | | | 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
* pbio: Remove unused devclass argument to DRIVER_MODULE.John Baldwin2022-05-091-3/+1
|
* pbio: Add locking and remove D_NEEDGIANT.John Baldwin2022-05-051-23/+31
| | | | | | | | | | | Use a sx lock to permit uiomove directly into/out of the the per-port buffers. In addition, the sx lock provides a stronger guarantee that I think this driver wants which is to single-thread read and write calls even while paused. Finally, replace tsleep with dummy wait channels with calls to pause_sig to more clearly communicate the intent. Differential Revision: https://reviews.freebsd.org/D35081
* pbio: Return BUS_PROBE_DEFAULT from probe instead of 0.John Baldwin2022-05-051-1/+1
| | | | | | | 0 should only be returned from probe in legacy drivers that need to preserve softc state between probe and attach. Differential Revision: https://reviews.freebsd.org/D35080
* pbio: Axe bus_space tag/handle using bus_read/write_1 instead.John Baldwin2022-05-051-8/+2
| | | | Differential Revision: https://reviews.freebsd.org/D35079
* pbio: Store softc in si_drv1 for character devices.John Baldwin2022-05-051-51/+23
| | | | | | | | | | | The port number is still stored in the unit (si_drv0) but is the entire unit value now. While here, removed checks for NULL softc since those can never happen from cdevsw routines. This also resulted in the close method becoming a no-op, so it has been removed. Differential Revision: https://reviews.freebsd.org/D35078
* pbio: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-10/+9
| | | | Notes: svn path=/head/; revision=365182
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-272-0/+4
| | | | | | | | | | | | | | | 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
* Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().Justin Hibbits2016-02-271-4/+4
| | | | | | | | | | | Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 Notes: svn path=/head/; revision=296137
* Replace all calls to minor() with dev2unit().Ed Schouten2008-09-271-2/+2
| | | | | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib Notes: svn path=/head/; revision=183397
* Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp2006-05-161-1/+0
| | | | | | | unnecessary. Notes: svn path=/head/; revision=158651
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-291-1/+0
| | | | | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
* Skip PNP probes. If there are isapnp or pnpbios instances of this driver,Warner Losh2005-02-111-0/+3
| | | | | | | | then we can support them later. This keeps the pbio probe from claiming lots of otherwise unused pnpbios devices on my laptop. Notes: svn path=/head/; revision=141680
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-062-2/+2
| | | | Notes: svn path=/head/; revision=139749
* Catch up with the header repo copy.David E. O'Brien2004-11-111-1/+1
| | | | Notes: svn path=/head/; revision=137585
* Fix conflicts I didn't fix before I committed my busspace changes.Warner Losh2004-10-111-4/+2
| | | | | | | Noticed by: ru@ (and likely tinderbox, I haven't checked) Notes: svn path=/head/; revision=136362
* Convert to newbus. (chances are we could now move this to dev/pbioWarner Losh2004-10-101-46/+61
| | | | | | | | | since I believe it is now MI, but that hasn't been done yet). Reviewed by: dds Notes: svn path=/head/; revision=136341
* style(9)David E. O'Brien2004-10-091-57/+51
| | | | Notes: svn path=/head/; revision=136305
* Port pbio to HEAD.Warner Losh2004-10-072-0/+509
OK'd by: dds Notes: svn path=/head/; revision=136230