aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bktr
Commit message (Collapse)AuthorAgeFilesLines
* Remove bktr(4)Warner Losh2020-03-0119-13297/+0
| | | | | | | | | | Remove the brooktree driver as discussed on arch@. Bump FreeBSD version to 1300082, though I doubt anything will care. Relnote: yes Notes: svn path=/head/; revision=358497
* add deprecation notice for bktr driver.Warner Losh2020-02-291-0/+1
| | | | | | | | | We plan to remove bktr(4) in FreeBSD 13. Document that here. Relnotes: yes Notes: svn path=/head/; revision=358474
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-1/+2
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* Don't use generic PCI_VENDOR and PCI_PRODUCT macros. Prefix them withWarner Losh2018-06-243-17/+17
| | | | | | | BKTR_ to avoid possible conflicts. Notes: svn path=/head/; revision=335606
* bktr: Support WinFast Tv2000 & PHILIPS FI1216Eitan Adler2018-05-284-2/+26
| | | | | | | | | | | | - Add support for Leadtek WinFast Tv2000 XP bktr card - Add support for PHILIPS FI1216 PR: 94369 Submitted by: Angelescu Ovidiu <mrhsaacdoh@yahoo.com> Submitted on: 2006-03-11 19:30 UTC Notes: svn path=/head/; revision=334285
* Remove unused definition bl_dfp; fix build with bktr compiled into kernelThomas Zander2018-04-211-4/+0
| | | | | | | | | | | PR: 216566 Submitted by: mail@fbsd.e4m.org Reviewed by: riggs, cognet Approved by: cognet MFC after: 3 days Notes: svn path=/head/; revision=332861
* bktr: correct Japan IF frequencyEd Maste2018-03-081-5/+3
| | | | | | | | | PR: 36451 Submitted by: Hijiri Umemoto <hijiri at umemoto.org> MFC after: 2 weeks Notes: svn path=/head/; revision=330668
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2717-0/+34
| | | | | | | | | | | | | | | 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
* ioctl METEORGBRIG in bktr_core.c forgets to add 128 to valueJosh Paetzel2017-06-271-1/+1
| | | | | | | | PR: 59289 Submitted by: Danovitsch@Vitsch.net Notes: svn path=/head/; revision=320394
* driver incorrectly handles the setting of frame ratesJosh Paetzel2017-06-271-10/+8
| | | | | | | | PR: 36415 Submitted by: brandt@fokus.gmd.de Notes: svn path=/head/; revision=320393
* bktr(4): double assignment.Pedro F. Giffuni2017-02-231-1/+0
| | | | | | | | | | First assignment is obviously overwritten by the next line. Leave newest assignment: it was introduced in r29233. Found with: coccinelle (da.cocci) Notes: svn path=/head/; revision=314147
* Consistently use `device_t`Jean-Sébastien Pédron2016-08-092-5/+15
| | | | | | | | | | | | | | | | | | Several files use the internal name of `struct device` instead of `device_t` which is part of the public API. This patch changes all `struct device *` to `device_t`. The remaining occurrences of `struct device` are those referring to the Linux or OpenBSD version of the structure, or the code is not built on FreeBSD and it's unclear what to do. Submitted by: Matthew Macy <mmacy@nextbsd.org> (previous version) Approved by: emaste, jhibbits, sbruno MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D7447 Notes: svn path=/head/; revision=303890
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-037-18/+18
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* sys/dev: use our nitems() macro when it is avaliable through param.h.Pedro F. Giffuni2016-04-191-3/+2
| | | | | | | | | | No functional change, only trivial cases are done in this sweep, Drivers that can get further enhancements will be done independently. Discussed in: freebsd-current Notes: svn path=/head/; revision=298307
* Cleanup unnecessary semicolons from the kernel.Pedro F. Giffuni2016-04-102-3/+3
| | | | | | | Found with devel/coccinelle. Notes: svn path=/head/; revision=297793
* Replace cvsweb link wihg svnweb URL in bktr(4) release notes.Gavin Atkinson2014-08-301-1/+1
| | | | Notes: svn path=/head/; revision=270854
* Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thisEitan Adler2013-11-301-1/+1
| | | | | | | | | | | | | | | | shifts into the sign bit. Instead use (1U << 31) which gets the expected result. This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Discussed with: -arch, rdivacky Reviewed by: cperciva Notes: svn path=/head/; revision=258780
* Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIScott Long2013-08-121-4/+1
| | | | | | | | | | | | | | | | | | | | command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit. This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot. Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day Notes: svn path=/head/; revision=254263
* Replace kernel virtual address space allocation with vmem. This providesJeff Roberson2013-08-071-2/+5
| | | | | | | | | | | | | | | | transparent layering and better fragmentation. - Normalize functions that allocate memory to use kmem_* - Those that allocate address space are named kva_* - Those that operate on maps are named kmap_* - Implement recursive allocation handling for kmem_arena in vmem. Reviewed by: alc Tested by: pho Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=254025
* Pass a format string to kproc_create() [1] and thus fix the build withSergey Kandaurov2013-04-301-10/+1
| | | | | | | | | | | | -DBKTR_NEW_MSP34XX_DRIVER and -Wformat-security. This also allows to eliminates a superfluous malloc/snprintf/free on intermediate buffer. PR: kern/175546 MFC after: 1 week Notes: svn path=/head/; revision=250088
* Fix white spaces.Jung-uk Kim2013-04-231-1/+1
| | | | Notes: svn path=/head/; revision=249816
* Make temp, temp1 the same type that they will later be used for.Eitan Adler2013-04-231-1/+1
| | | | | | | | | | PR: kern/176712 Submitted by: Hiren Panchasara <hiren.panchasara@gmail.com> Reviewed by: jmg (earlier version) Approved by: cperciva (mentor) Notes: svn path=/head/; revision=249798
* - Corrrect mispellings of word usefulGabor Kovesdan2013-04-172-2/+2
| | | | | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail) Notes: svn path=/head/; revision=249585
* Clean some 'svn:executable' properties in the tree.Pedro F. Giffuni2013-01-261-0/+0
| | | | | | | | Submitted by: Christoph Mallon MFC after: 3 days Notes: svn path=/head/; revision=245952
* Fix typo; s/ouput/outputKevin Lo2012-11-071-1/+1
| | | | Notes: svn path=/head/; revision=242692
* Revert previous commit...Kevin Lo2012-10-101-1/+1
| | | | | | | Pointyhat to: kevlo (myself) Notes: svn path=/head/; revision=241394
* Prefer NULL over 0 for pointersKevin Lo2012-10-091-1/+1
| | | | Notes: svn path=/head/; revision=241370
* Remove a few bits of FreeBSD 2.x compatibility code.Robert Millan2011-11-141-4/+0
| | | | | | | Approved by: kib (mentor) Notes: svn path=/head/; revision=227503
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.Ed Schouten2011-11-071-1/+1
| | | | | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static. Notes: svn path=/head/; revision=227309
* In order to maximize the re-usability of kernel code in user space thisKip Macy2011-09-161-1/+1
| | | | | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz) Notes: svn path=/head/; revision=225617
* Fix typos - remove duplicate "the".Rebecca Cran2011-02-211-1/+1
| | | | | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days Notes: svn path=/head/; revision=218909
* Fix build on architectures where PAGE_SIZE is a long (sparc64, powerpc).Nathan Whitehorn2010-07-131-4/+3
| | | | Notes: svn path=/head/; revision=210010
* Use standard types in preference to BSD types so that these header filesJustin T. Gibbs2010-03-282-20/+20
| | | | | | | | | can be used in applications compiled with only POSIX types visible. MFC after: 2 weeks Notes: svn path=/head/; revision=205781
* Remove extraneous semicolons, no functional changes.Martin Blapp2010-01-071-1/+1
| | | | | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week Notes: svn path=/head/; revision=201758
* Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.Robert Noland2009-12-291-1/+2
| | | | | | | | | | | | | | | | This replaces d_mmap() with the d_mmap2() implementation and also changes the type of offset to vm_ooffset_t. Purge d_mmap2(). All driver modules will need to be rebuilt since D_VERSION is also bumped. Reviewed by: jhb@ MFC after: Not in this lifetime... Notes: svn path=/head/; revision=201223
* Temporarily revert the new-bus locking for 8.0 release. It will beJohn Baldwin2009-08-201-9/+2
| | | | | | | | | reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio Notes: svn path=/head/; revision=196403
* Make the newbus subsystem Giant free by adding the new newbus sxlock.Attilio Rao2009-08-021-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races. Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped. For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens. Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing. Bump __FreeBSD_version in order to reflect the newbus lock introduction. Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com> Sponsored by: Yahoo! Incorporated Approved by: re (ksmith) Notes: svn path=/head/; revision=196037
* Unbreak bktr(4).Ed Schouten2009-05-261-1/+1
| | | | Notes: svn path=/head/; revision=192805
* Free the memory correctly in the error caseBenjamin Close2009-05-261-1/+1
| | | | | | | | | Submitted by: frtzkatz at yahoo.com Approved by: sam MFC after: 1 month Notes: svn path=/head/; revision=192784
* Replace all calls to minor() with dev2unit().Ed Schouten2008-09-271-14/+14
| | | | | | | | | | | | | | | | | | 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
* Add locking to the various iicbus(4) bridge drivers:John Baldwin2008-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Just grab Giant in the ixp425_iic(4) driver since this driver uses a shared address/data register window pair to access the actual I2C registers. None of the other ixp425 drivers lock access to these shared address/data registers yet and that would need to be done before this could use any meaningful locking. - Add locking to the interrupt handler and 'iicbus_reset' methods of the at91_twi(4) driver. - Add locking to the pcf(4) driver. Other pcf(4) fixes include: - Don't needlessly zero the softc. - Use bus_foo rather than bus_space_foo and remove bus space tag and handle from softc. - The lpbb(4) driver just grabs Giant for now. This will be refined later when ppbus(4) is locked. - As was done with smbus earlier, move the DRIVER_MODULE() lines to match the bus driver (either iicbus or iicbb) to the bridge driver into the bridge drivers. Tested by: sam (arm/ixp425) Notes: svn path=/head/; revision=181303
* Explicitly lock Giant in smbus_if methods in the bktr_i2c and iicsmbJohn Baldwin2008-06-061-1/+26
| | | | | | | | drivers for now. This can be replaced with driver locks when these drivers are locked. Notes: svn path=/head/; revision=179624
* Rename the kthread_xxx (e.g. kthread_create()) callsJulian Elischer2007-10-201-4/+4
| | | | | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls. Notes: svn path=/head/; revision=172836
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-1/+1
| | | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* remove delays that have been unnecessary since 2002... The iicbb driverJohn-Mark Gurney2006-12-311-7/+0
| | | | | | | has the proper delays... Notes: svn path=/head/; revision=165707
* Update prototype for smbus callback change.John Baldwin2006-09-181-1/+1
| | | | | | | Reported by: Ian FREISLICH <if at hetzner dot co dot za> Notes: svn path=/head/; revision=162421
* Minor overhaul of SMBus support:John Baldwin2006-09-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Change smbus_callback() to pass a void * rather than caddr_t. - Change smbus_bread() to pass a pointer to the count and have it be an in/out parameter. The input is the size of the buffer (same as before), but on return it will contain the actual amount of data read back from the bus. Note that this value may be larger than the input value. It is up to the caller to treat this as an error if desired. - Change the SMB_BREAD ioctl to write out the updated struct smbcmd which will contain the actual number of bytes read in the 'count' field. To preserve the previous ABI, the old ioctl value is mapped to SMB_OLD_BREAD which doesn't copy the updated smbcmd back out to userland. I doubt anyone actually used the old BREAD anyway as it was rediculous to do a bulk-read but not tell the using program how much data was actually read. - Make the smbus driver and devclass public in the smbus module and push all the DRIVER_MODULE()'s for attaching the smbus driver to various foosmb drivers out into the foosmb modules. This makes all the foosmb logic centralized and allows new foosmb modules to be self-contained w/o having to hack smbus.c everytime a new smbus driver is added. - Add a new SMB_EINVAL error bit and use it in place of EINVAL to return an error for bad arguments (such as invalid counts for bread and bwrite). - Map SMB bus error bits to EIO in smbus_error(). - Make the smbus driver call bus_generic_probe() and require child drivers such as smb(4) to create device_t's via identify routines. Previously, smbus just created one anonymous device during attach, and if you had multiple drivers that could attach it was just random chance as to which driver got to probe for the sole device_t first. - Add a mutex to the smbus(4) softc and use it in place of dummy splhigh() to protect the 'owner' field and perform necessary synchronization for smbus_request_bus() and smbus_release_bus(). - Change the bread() and bwrite() methods of alpm(4), amdpm(4), and viapm(4) to only perform a single transaction and not try to use a loop of multiple transactions for a large request. The framing and commands to use for a large transaction depend on the upper-layer protocol (such as SSIF for IPMI over SMBus) from what I can tell, and the smb(4) driver never allowed bulk read/writes of more than 32-bytes anyway. The other smb drivers only performed single transactions. - Fix buffer overflows in the bread() methods of ichsmb(4), alpm(4), amdpm(4), amdsmb(4), intpm(4), and nfsmb(4). - Use SMB_xxx errors in viapm(4). - Destroy ichsmb(4)'s mutex after bus_generic_detach() to avoid problems from child devices making smb upcalls that would use the mutex during their detach methods. MFC after: 1 week Reviewed by: jmg (mostly) Notes: svn path=/head/; revision=162234
* Commit the results of the typo hunt by Darren Pilgrim.Yaroslav Tykhiy2006-08-041-1/+1
| | | | | | | | | | | | | This change affects documentation and comments only, no real code involved. PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week Notes: svn path=/head/; revision=160964
* Housekeeping. Update for maintainers who have handed in their commit bitsMark Murray2006-07-011-5/+0
| | | | | | | or (in my case) no longer feel that oversight is necessary. Notes: svn path=/head/; revision=160063
* don't require a buffer if all we are doing is manipulating the GPIO pins...John-Mark Gurney2006-05-261-0/+9
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=158937