summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire
Commit message (Collapse)AuthorAgeFilesLines
* Change the remainder of the drivers for DMA'ing devices enabled in themarius2007-01-211-1/+7
| | | | | | | | sparc64 GENERIC and the sound device drivers known working on sparc64 to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4), stge(4) and ti(4) these changes are runtime tested (unless I booted up the wrong kernels again...).
* Various bpf(4) related fixes to catch places up to the new bpf(4)jhb2006-12-291-2/+2
| | | | | | | | | | | | | semantics. - Stop testing bpf pointers for NULL. In some cases use bpf_peers_present() and then call the function directly inside the conditional block instead of the macro. - For places where the entire conditional block is the macro, remove the test and make the macro unconditional. - Use BPF_MTAP() in if_pfsync on FreeBSD instead of an expanded version of the old semantics. Reviewed by: csjp (older version)
* Correct a signedness bug which allowed members of the operatorcperciva2006-12-061-1/+1
| | | | | | group to read kernel memory. Security: FreeBSD-SA-06:25.kmem
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEmjacob2006-11-021-8/+0
| | | | | | as the default. Reviewed by multitudes.
* The first of 3 major steps to move the CAM layer forward to usingmjacob2006-10-311-4/+25
| | | | | | | | | | | | | | | | | | | | | the CAM_NEW_TRAN_CODE that has been in the tree for some years now. This first step consists solely of adding to or correcting CAM_NEW_TRAN_CODE pieces in the kernel source tree such that a both a GENERIC (at least on i386) and a LINT build with CAM_NEW_TRAN_CODE as an option will compile correctly and run (at least with some the h/w I have). After a short settle time, the other pieces (making CAM_NEW_TRAN_CODE the default and updating libcam and camcontrol) will be brought in. This will be an incompatible change in that the size of structures related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change in both size and content. However, basic system operation and basic system utilities work well enough with this change. Reviewed by: freebsd-scsi and specific stakeholders
* Better printfimp2006-06-121-1/+1
|
* Don't type pun accidentally. Instead, be explicit that we're typeimp2006-02-041-6/+8
| | | | punning with an union so that the compiler knows.
* Make tv_sec a time_t on all platforms but alpha. Brings us more in line withtrhodes2005-12-241-2/+2
| | | | | | | | | POSIX. This also makes the struct correct we ever implement an i386-time64 architecture. Not that we need too. Reviewed by: imp, brooks Approved by: njl (acpica), des (no objects, touches procfs) Tested with: make universe
* Fix panic when we cannot find self-id of probing nodes.simokawa2005-11-251-1/+3
| | | | | | | | | This shouldn't happen as far as the self-id buffer is vaild but some people have this problem. PR: kern/83999 Submitted by: Markus Wild <fbsd-lists@dudes.ch> MFC after: 3 days
* Fix typo.glebius2005-10-111-2/+1
| | | | | Submitted by: maxim MFC after: 3 days
* - Don't pollute opt_global.h with DEVICE_POLLING and introduceglebius2005-10-052-0/+6
| | | | | | | | | opt_device_polling.h - Include opt_device_polling.h into appropriate files. - Embrace with HAVE_KERNEL_OPTION_HEADERS the include in the files that can be compiled as loadable modules. Reviewed by: bde
* Big polling(4) cleanup.glebius2005-10-013-63/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Axe poll in trap. o Axe IFF_POLLING flag from if_flags. o Rework revision 1.21 (Giant removal), in such a way that poll_mtx is not dropped during call to polling handler. This fixes problem with idle polling. o Make registration and deregistration from polling in a functional way, insted of next tick/interrupt. o Obsolete kern.polling.enable. Polling is turned on/off with ifconfig. Detailed kern_poll.c changes: - Remove polling handler flags, introduced in 1.21. The are not needed now. - Forget and do not check if_flags, if_capenable and if_drv_flags. - Call all registered polling handlers unconditionally. - Do not drop poll_mtx, when entering polling handlers. - In ether_poll() NET_LOCK_GIANT prior to locking poll_mtx. - In netisr_poll() axe the block, where polling code asks drivers to unregister. - In netisr_poll() and ether_poll() do polling always, if any handlers are present. - In ether_poll_[de]register() remove a lot of error hiding code. Assert that arguments are correct, instead. - In ether_poll_[de]register() use standard return values in case of error or success. - Introduce poll_switch() that is a sysctl handler for kern.polling.enable. poll_switch() goes through interface list and enabled/disables polling. A message that kern.polling.enable is deprecated is printed. Detailed driver changes: - On attach driver announces IFCAP_POLLING in if_capabilities, but not in if_capenable. - On detach driver calls ether_poll_deregister() if polling is enabled. - In polling handler driver obtains its lock and checks IFF_DRV_RUNNING flag. If there is no, then unlocks and returns. - In ioctl handler driver checks for IFCAP_POLLING flag requested to be set or cleared. Driver first calls ether_poll_[de]register(), then obtains driver lock and [dis/en]ables interrupts. - In interrupt handler driver checks IFCAP_POLLING flag in if_capenable. If present, then returns.This is important to protect from spurious interrupts. Reviewed by: ru, sam, jhb
* Remove an unnecessicary bzero that was zeroing the softc's struct ifnetbrooks2005-08-171-1/+0
| | | | | | | pointer. Submitted by: brueffer Reviewed by: dfr
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-092-0/+50
| | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
* Merge the dev_clone and dev_clone_cred event handlers into a singlerwatson2005-08-082-2/+3
| | | | | | | | | | | | | event handler, dev_clone, which accepts a credential argument. Implementors of the event can ignore it if they're not interested, and most do. This avoids having multiple event handler types and fall-back/precedence logic in devfs. This changes the kernel API for /dev cloning, and may affect third party packages containg cloning kernel modules. Requested by: phk MFC after: 3 days
* The Sony i.LINK CXD1947 device is a firewire bridge, but it doesn'timp2005-07-171-2/+2
| | | | | | | implement the OHCI programming interface. Thus it probes, but fails to attach because of an invalid OHCI version. Rather than count on the downstream tests properly failing, print a message that this chipset isn't supported and fail the probe.
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-104-24/+39
| | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
* Recognize the integrated (though not necessarily enabled) FireWiremarius2005-05-202-0/+14
| | | | | | | | | | | | | | | controllers of Sun PCIO-2 chips which are used onboard in most of the newer PCI-based sun4u machines (cosmetic change as they were also already probed as generic FWOHCI without this). As with gem(4), hme(4) and ohci(4) detect whether their intpin register is valid and correct it if necessary, i.e. set the respective IVAR to the right value for allocating the IRQ resource, as some of them come up having it set to 0 (in fact in all machines I'm currently aware of the FireWire part being enabled). This fixes attaching affected controllers. Apporved by: simokawa Tested by: Michiel Boland <michiel@boland.org> MFC after: 1 month
* Explicitly hold a reference to the cdev we have just cloned. Thisphk2005-03-311-0/+1
| | | | | closes the race where the cdev was reclaimed before it ever made it back to devfs lookup.
* fix potential null ptr derefsam2005-03-291-4/+4
| | | | Submitted by: Coverity Prevent analysis tool
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-29/+29
|
* Clear PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN for broken hardware.simokawa2005-01-061-1/+2
| | | | | | Some amd64 laptops fail to boot with these flags. PR: kern/75482
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-0623-23/+23
|
* return after freeing data element, instead of falling through, and usingjmg2005-01-041-0/+1
| | | | | | the free'd element, and ultimate NULL deref of the failed allocation. MFC after: 1 week
* Fix malloc type in free().simokawa2004-11-101-1/+1
|
* Respect _BOOT flag.simokawa2004-10-222-6/+12
|
* Add a missing splx().simokawa2004-09-061-0/+1
|
* Remove an unused variable.simokawa2004-08-291-1/+1
|
* Assert Giant in fwe_start(), as it is not yet MPSAFE.rwatson2004-08-181-0/+2
|
* Since if_fwip doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-131-1/+2
| | | | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant. Approved by: dfr
* Set IFF_NEEDSGIANT for fwe network interface since the firewirerwatson2004-08-121-1/+2
| | | | | | framework isn't yet MPSAFE. Approved by: simokawa
* Fix and add deivce ID's.simokawa2004-08-042-4/+9
| | | | Obtained from: DragonFly BSD
* Avoid casts as lvalues.kan2004-07-281-1/+1
|
* Temporary fix for interoperability with Windows and OS X. A more completedfr2004-07-201-1/+1
| | | | | | fix will follow when its ready. Submitted by: simokawa
* Don't output too many debug messages for bootverbose.simokawa2004-07-203-11/+16
| | | | This driver seems to be fairly stable now.
* Initialize ifp->if_output for FreeBSD-4.simokawa2004-07-201-0/+3
|
* Adjust packet length correctly for FreeBSD-4.simokawa2004-07-201-2/+4
| | | | Submitted by: Joerg Sonnenberger <joerg@britannica.bec.de>
* Add some PCI IDs for OHCI chips.simokawa2004-07-172-0/+30
| | | | Obtained from: DragonFly BSD
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPphk2004-07-151-0/+2
| | | | | | | | 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".
* Trim a few things from the dmesg output and stick them under bootverbose tojhb2004-07-011-2/+3
| | | | | | | cut down on the clutter including PCI interrupt routing, MTRR, pcibios, etc. Discussed with: USENIX Cabal
* Remove the setting of the pci config variables on power state changes.imp2004-06-281-5/+0
| | | | The bus does this now.
* Fix the description of hw.firewire.sbp.exclusive_login.simokawa2004-06-181-1/+1
| | | | Submitted by: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
* Second half of the dev_t cleanup.phk2004-06-171-1/+1
| | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-164-22/+22
| | | | Bump __FreeBSD_version accordingly.
* Fix spelling.dfr2004-06-151-2/+2
|
* If we run out of transmission labels, just re-queue the packet for laterdfr2004-06-142-4/+17
| | | | | instead of printing endless error messages on the console and discarding the packet.
* Add configuration rom entries for IP over firewire.dfr2004-06-132-0/+28
|
* Add a new driver to support IP over firewire. This driver is intended todfr2004-06-132-0/+975
| | | | | | | | conform to the rfc2734 and rfc3146 standard for IP over firewire and should eventually supercede the fwe driver. Right now the broadcast channel number is hardwired and we don't support MCAP for multicast channel allocation - more infrastructure is required in the firewire code itself to fix these problems.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Don't try to copy out the result payload if there isn't one. This ioctldfr2004-05-231-6/+14
| | | | | interface really needs changing to split out the various async request types.
OpenPOWER on IntegriCloud