summaryrefslogtreecommitdiffstats
path: root/sys/dev/bktr
Commit message (Collapse)AuthorAgeFilesLines
* Use standard types in preference to BSD types so that these header filesgibbs2010-03-282-20/+20
| | | | | | can be used in applications compiled with only POSIX types visible. MFC after: 2 weeks
* Remove extraneous semicolons, no functional changes.mbr2010-01-071-1/+1
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.rnoland2009-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...
* Temporarily revert the new-bus locking for 8.0 release. It will bejhb2009-08-201-9/+2
| | | | | | reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio
* Make the newbus subsystem Giant free by adding the new newbus sxlock.attilio2009-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)
* Unbreak bktr(4).ed2009-05-261-1/+1
|
* Free the memory correctly in the error casebenjsc2009-05-261-1/+1
| | | | | | Submitted by: frtzkatz at yahoo.com Approved by: sam MFC after: 1 month
* Replace all calls to minor() with dev2unit().ed2008-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
* Add locking to the various iicbus(4) bridge drivers:jhb2008-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)
* Explicitly lock Giant in smbus_if methods in the bktr_i2c and iicsmbjhb2008-06-061-1/+26
| | | | | drivers for now. This can be replaced with driver locks when these drivers are locked.
* Rename the kthread_xxx (e.g. kthread_create()) callsjulian2007-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.
* o break newbus api: add a new argument of type driver_filter_t topiso2007-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@
* remove delays that have been unnecessary since 2002... The iicbb driverjmg2006-12-311-7/+0
| | | | has the proper delays...
* Update prototype for smbus callback change.jhb2006-09-181-1/+1
| | | | Reported by: Ian FREISLICH <if at hetzner dot co dot za>
* Minor overhaul of SMBus support:jhb2006-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)
* Commit the results of the typo hunt by Darren Pilgrim.yar2006-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
* Housekeeping. Update for maintainers who have handed in their commit bitsmarkm2006-07-011-5/+0
| | | | or (in my case) no longer feel that oversight is necessary.
* don't require a buffer if all we are doing is manipulating the GPIO pins...jmg2006-05-261-0/+9
| | | | MFC after: 3 weeks
* if we are compiling with smbus support, properly depend upon the iic andjmg2006-01-271-0/+7
| | | | | | smbus modules, otherwise as a module you can't kldload bktr... MFC after: 3 days
* Fix -Wundef from compiling the amd64 LINT.ru2005-12-042-3/+3
|
* Add some cards:netchild2005-11-134-5/+67
| | | | | | | | | | | | | | - several TerraTec TValue [1] - PixelView PlayTV Pro REV-4C [2] In case you have the PixelView card, please tell us the "pciconf -v -l" output on multimedia@FreeBSD.org if it works. There are revisions out there which may not work and we need to know which ones work. PR: 53383 [1], 76002 [2] Submitted by: Tanja Wittke <tawi@gruft.de> [1], barner [1], Dan Angelescu <mrhsaacdoh@yahoo.com> [2] MFC after: 2 months
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-296-6/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Don't set the tuner type to TUNER_MT2032 if BKTR_OVERRIDE_TUNER is defined orcognet2005-05-241-1/+4
| | | | if hw.bt848.tuner has been set, so that we can force the tuner.
* Fix one more misuse of u_long when uint32_t is actually meant.cognet2005-05-241-1/+1
| | | | | Submitted by: oliver MFC after: 3 days
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-4/+4
|
* Remove lots of tab/space errors introduced by massive cut-n-paste action.julian2005-02-101-234/+234
| | | | | Noticed from: diffs of the last commit. MFC after: 1 week
* Take into account that Pinnacle screwed up their PCI ID in the beginning..julian2005-02-101-4/+5
| | | | | | | | | Older cards have it reversed. Also, use some already defined values instead of magic numbers. PR: 73324 Submitted by: arne_woerner@yahoo.com MFC after: 1 week
* Fix a few printf problems on ia64 (and other 64-bit platforms).imp2005-01-271-4/+4
|
* Add code to do better auto detection of tuner types etc.julian2005-01-233-53/+51
| | | | | | PR: kern/75831 Submitted by: Branko Lankester <branko@euro.net> MFC after: 1 week
* Use uint32_t instead of u_long when appropriate.cognet2005-01-091-64/+64
| | | | | | That's enough to make my bt848 work on amd64. MFC after: 1 week
* Remove support for FreeBSD < 4.recent from this driver.imp2005-01-087-35/+1
|
* Remove vnode.h and adjust includes to compensate for pollution.imp2005-01-085-6/+13
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-069-9/+9
|
* Add support for the Pixelview PlayTVjulian2005-01-022-1/+14
| | | | | | PR: 68362 Submitted by: Carl Makin <carl@stagecraft.cx> MFC after: 1 week
* Roger is away, note that his maintainership isjulian2004-12-311-1/+4
| | | | | | on vacation until he gets back. (hopefully next year) Submitted by: linimon
* Add a missing prototype.julian2004-12-171-2/+1
| | | | MFC after: 1 week
* Allow /sys/dev/bktr to support Pinnacle PCTV Rave cardsjulian2004-12-164-17/+440
| | | | | | PR: 73669 Submitted by: arne_woerner at yahoo dot com MFC after: 1 week
* Add some locking for -currnet/5.xjulian2004-12-161-0/+6
| | | | | | PR: 74305 Submitted by: Anish Mistry <amistry at am-productions dot biz> MFC after: 1 week
* Fix build if both of BKTR_USE_FREEBSD_SMBUS and BKTR_NEW_MSP34XX_DRIVER aredwhite2004-09-111-0/+4
| | | | | | | defined. Thanks to Damian Gerow <dgerow@afflictions.org> for pointing out this problem. RELENG_5 candidate.
* Add support AOpen VA1000 video capture cardsanpei2004-08-082-2/+15
| | | | | | PR: kern/62146 Submitted by: HASHI Hiroaki <hasi@cskk-sv.co.jp> MFC after: 1 week
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPphk2004-07-151-0/+1
| | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything".
* Fix a tuner problem.schweikh2004-06-271-1/+3
| | | | | | PR: kern/66006 Submitted by: Josh Elsasser <jre@vineyard.net> MFC after: 1 week
* Do the dreaded s/dev_t/struct cdev */phk2004-06-164-15/+15
| | | | Bump __FreeBSD_version accordingly.
* Style cleanup.schweikh2004-06-111-64/+81
|
* * Fix typo in comment.schweikh2004-06-111-6/+4
| | | | | | * remove extraneous semicolon between function definitions. * vm_offset_t is not a pointer, so return 0, not NULL. This fixes two warnings.
* Add missing <sys/module.h> includesphk2004-05-302-0/+2
|
* Unbreak build ifjosef2004-05-261-1/+1
| | | | | | | | | options BKTR_USE_FREEBSD_SMBUS is defined in kernel configuration. Submitted by: Tom Convery <tpc@tomfoo.com> PR: kern/60458 Approved by: imp
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-5/+4
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | 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.
* Device megapatch 1/6:phk2004-02-211-2/+0
| | | | | | | 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.
OpenPOWER on IntegriCloud