summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire/fwohci_pci.c
Commit message (Collapse)AuthorAgeFilesLines
* MFp4: MPSAFE firewire stack.simokawa2007-06-061-5/+8
| | | | | | | | | | | | | - lock its own locks and drop Giant. - create its own taskqueue thread. - split interrupt routine - use interrupt filter as a fast interrupt. - run watchdog timer in taskqueue so that it should be serialized with the bottom half. - add extra sanity check for transaction labels. disable ad-hoc workaround for unknown tlabels. - add sleep/wakeup synchronization primitives - don't reset OHCI in fwohci_stop()
* Teardown interrupt only when sc->ih is not NULL.simokawa2007-03-301-11/+10
| | | | MFC after: 3 days
* Poll only while interrupt is disabled.simokawa2007-03-191-4/+6
| | | | MFC: 3 days after
* Don't mess with PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN.simokawa2007-03-151-3/+1
| | | | | | | This will fix 'NMI RAM parity error' while booting on some machines. PR: kern/95077 MFC after: 3 days
* 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@
* 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...).
* Better printfimp2006-06-121-1/+1
|
* 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.
* Recognize the integrated (though not necessarily enabled) FireWiremarius2005-05-201-0/+12
| | | | | | | | | | | | | | | 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
* 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-061-1/+1
|
* Fix and add deivce ID's.simokawa2004-08-041-3/+7
| | | | Obtained from: DragonFly BSD
* Don't output too many debug messages for bootverbose.simokawa2004-07-201-0/+2
| | | | This driver seems to be fairly stable now.
* Add some PCI IDs for OHCI chips.simokawa2004-07-171-0/+21
| | | | Obtained from: DragonFly BSD
* 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.
* Change u_intXX_t to uintXX_t. Change a couple of 'unsigned long's todfr2004-05-221-2/+2
| | | | uint32_t where appropriate.
* MFp4: FireWiresimokawa2004-03-261-8/+30
| | | | | | | | | | | | | | | | | | | * all - s/__FUNCTION__/__func__/. Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> - Compatibility for RELENG_4 and DragonFly. * firewire - Timestamp just before queuing. - Retry bus probe if it fails. - Use device_printf() for debug message. - Invalidiate CROM while update. - Don't process minimum/invalid CROM. * sbp - Add ORB_SHORTAGE flag. - Add sbp.tags tunable. - Revive doorbell support. It's not enabled by default.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-3/+2
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Add NEC uPD72873.simokawa2004-01-301-0/+4
| | | | Submitted by: Christian Laursen <xi@borderworlds.dk>
* Use device_identify and bus_add_child methods to add a firewiresimokawa2004-01-301-25/+44
| | | | | bus on fwohci. This should fix attach failure caused by a race between firewire and fwochi initialization for the kernel module.
* * fwohci_pci.csimokawa2004-01-231-3/+9
| | | | | | | | Improve error message for attach failure. * sbp_targ.c - Add speed in struct sbp_targ_login. - Remove unnecessary htonl().
* MFp4:simokawa2004-01-051-1/+1
| | | | | | | | | | | * firewire - Remove pending list. - Ignore timeout for the FWXF_START state. - Define M_FWMEM for debugging. - Comment out DELAY() in fw_asybusy(). - Improve debugging messages * sbp - Freeze simq while bus reset.
* Sometimes cardbus attachments don't attach, so while we track downimp2003-11-281-0/+1
| | | | | | | | this problem put these lines back in. While they should be unnecessary, they appear to be sometimes necessary. Reviewed in concept: dfr Approved by: re (scottl@)
* Remove explicit cardbus attachments from drivers where this is identicaldfr2003-11-031-1/+0
| | | | | | | to the pci attachment. Cardbus is a derived class of pci so all pci drivers are automatically available for matching against cardbus devices. Reviewed by: imp
* Fix fwmem_strategy() race in 4-stable.simokawa2003-10-251-1/+5
|
* Make this compiled on RELENG_4.simokawa2003-08-221-0/+5
|
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* - Don't mess with TX queue in fwohci_stop() if we failed to attach the device.simokawa2003-08-041-6/+7
| | | | | | | | Tested by: wilko - Detect memory mapping failure of registers by checking OHCI version. Tested by: KONDOU, Kazuhiro <kazuhiro@alib.jp>
* Clean up include files.simokawa2003-07-181-0/+2
|
* Add compatibility for FreeBSD-4.simokawa2003-07-041-1/+4
|
* All current uses of pci_set_powerstate are bogus, at least in theory.imp2003-07-031-0/+2
| | | | | | | | | | However, they are presently necessary due to bigger bogusness in the pci bus layer not doing the right thing on suspend/resume or on initial device probe. This is exactly the sort of thing that the BURN_BRIDGES option was invented for. Mark all of them as BURN_BRIDGES. As soon as I have the powerstate stuff properly integrated into the pci bus code, I intend to remove all these workarounds.
* Mega busdma API commit.scottl2003-07-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs
* Include file clean up.simokawa2003-06-301-0/+4
|
* Fix several problems related to resume:simokawa2003-06-281-1/+3
| | | | | | | | - Initialize fc->status to process bus reset correctly after resume. - Initialize AT ring buffer pointer. - Requeue stdma to stfree for active IR buffer. - Stop DMA before suspend for safe. - Set powerstate after resume.
* - Use fwohci_poll() instead of fwohci_intr() to process the first bus reest.simokawa2003-06-271-1/+2
| | | | - Wait 2 cycles before starting the process for fast machines.
* Add id for TI's 1394b link chip.simokawa2003-06-041-0/+4
|
* Add some IEEE 1394 OHCI chips.simokawa2003-04-241-0/+20
| | | | | Partially submitted by: Tetsuya Ryuchi <ryuchi@ryuchi.org> PR: misc/51336
* MFp4(simokawa_firewire):simokawa2003-04-171-25/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many internal structure changes for the FireWire driver. - Compute CRC in CROM parsing. - Add support for configuration ROM build. - Simplify dummy buffer handling. - busdma conversion - Use swi_taskqueue_giant for -current. Mark the interrupt routine as MPSAFE. - AR buffer handling. Don't reallocate AR buffer but just recycle it. Don't malloc and copy per packet in fwohci_arcv(). Pass packet to fw_rcv() using iovec. Application must prepare receiving buffer in advance. - Change fw_bind API so that application should pre-allocate xfer structure. - Add fw_xfer_unload() for recycling struct fw_xfer. - Add post_busreset hook - Remove unused 'sub' and 'act_type' in struct fw_xfer. - Remove npacket from struct fw_bulkxfer. - Don't call back handlers in fwochi_arcv() if the packet has not drained in AT queue - Make firewire works on big endian platform. - Use native endian for packet header and remove unnecessary ntohX/htonX. - Remove FWXFERQ_PACKET mode. We don't use it anymore. - Remove unnecessary restriction of FWSTMAXCHUNK. - Don't set root node for phy config packet if the root node is not cycle master capable but set myself for root node. We should be the root node after next bus reset. Spotted by: Yoshihiro Tabira <tabira@scd.mei.co.jp> - Improve self id handling Tested on: i386, sparc64 and i386 with forced bounce buffer
* Safe PCI configuration.simokawa2003-03-241-2/+6
| | | | | | | | | | | - Clear PCIM_CMD_MWRICEN: some chips seem to have problem with write invalidate. clearing this bit fixes SBP timeout problem. Tested by: Michael Reifenberger <Michael.Reifenberger@Plaut.de> - Set PCIM_CMD_SERRESPEN and PCIM_CMD_PERRESPEN - Moderate value for latency timer.
* Use pci_get_devid().simokawa2003-02-181-1/+1
|
* Add 'uPD72871/2 IEEE1394 1-Chip OHCI Host Controller'.simokawa2003-02-181-0/+4
|
* Protect calling fwohci_intr() with splfw() for 4-stable.simokawa2003-02-151-1/+3
|
* Clear the bus reset event flag as soon as possible aftersimokawa2003-02-141-0/+9
| | | | | the initialization has completed to start transactions even when interrupt is disabled during the boot process.
* Define new malloc type M_FW and use it.simokawa2003-02-011-0/+1
|
* SBP related changes.simokawa2003-01-311-3/+4
| | | | | - Issue LOGOUT command on detach and shutdown. - Rename some functions.
* Syntax fix in fwohci_pci_suspend().simokawa2003-01-051-1/+2
|
* - Replace printf() with device_printf().simokawa2003-01-041-1/+0
| | | | | | | | | - Separate fc->dev (i.e. fwohci0) and fc->bdev (i.e. firewire0). - Remove unused firewirebusreg.h. - Reduce size of descriptor block for asynchronous transmit and check the number of descriptor when copying from mbuf. - Skip mbuf whose length is zero. NFS seems passing such mbuf and some chips generates unrecoverable error.
* - Propagate suspend/resume to child devices.simokawa2003-01-041-24/+49
| | | | | | | | | - Restore pci config registers after resume. - Reinitialize and start rx buffers after resume. - Don't reallocate memory in fwohci_db_init() if the dbch is already initialized. - Fix typo. - Some clean up.
OpenPOWER on IntegriCloud