summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp/isp_sbus.c
Commit message (Collapse)AuthorAgeFilesLines
* Add missing locking for SBus controllers.scottl2007-11-051-0/+5
|
* Bad merge.mjacob2007-05-111-1/+1
|
* Fix pointy-hat problem with BUS_DMA_ROOTARG macro that caused problems for ↵mjacob2007-05-111-2/+2
| | | | | | | | sparc64. Candidate for immediate MFC. Noticed by: Everyone-maxim contacted.
* Make this an MP safe driver but also still be multi-release.mjacob2007-05-051-81/+46
| | | | | | | | Seems to work on RELENG_4 through -current and also on sparc64 now. There may still be some issues with the auto attach/detach code to sort out. MFC after: 3 days
* Temporarily desupport simultaneous target and initiator mode.mjacob2007-04-021-3/+5
| | | | | | | | | | | | | | | | | | | | | | | When the linux port changes were imported which split the target command list to be separate from the initiator command list and the handle format changed to encode a type in the handle the implications to the function isp_handle_index (which only the NetBSD/OpenBSD/FreeBSD ports use) were overlooked. The fault is twofold: first, the index into the DMA maps in isp_pci is wrong because a target command handle with the type bit left in place caused a bad index (and panic) into dma map. Secondly, the assumption of the array of DMA maps in either PCS or SBUS attachment structures is that there is a linear mapping between handle index and DMA map index. This can no longer be true if there are overlapping index spaces for initiator mode and target mode commands. These changes bandaid around the problem by forcing us to not have simultaneous dual roles and doing the appropriate masking to make sure things are indexed correctly. A longer term fix is being devloped.
* Don't derference a pointer before setting it.mjacob2007-03-281-2/+2
| | | | | | Very Pointy Dunce Cap T o: me. Submitted by: Marcel MFC after: 3 days
* Move bus_space_tag and bus_space_handle register accessmjacob2007-03-131-8/+6
| | | | | | | | | | tokens into the common isp_osinfo structure instead of being in bus specific structures. This allows us to implement a SYNC_REG MEMORYBARRIER call (using bus_space_barrier) and also reduce the amount of bus specific wrapper structure usages in isp_pci && isp_sbus. MFC after: 3 days
* Redo previous newbus related change to be kinder tomjacob2007-02-231-1/+1
| | | | multi-release support.
* 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@
* Clean up some of the various platform and release specific dma tagmjacob2007-01-231-22/+4
| | | | | | | stuff so it is centralized in isp_freebsd.h. Take out PCI posting flushed in qla2100/2200 register reads except for 2100s.
* Change the remainder of the drivers for DMA'ing devices enabled in themarius2007-01-211-2/+14
| | | | | | | | 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...).
* Implement ISP_RESET0 for PCI and SBUS attachments- isp_reset hasmjacob2006-12-161-1/+8
| | | | | been modified to call ISP_RESET0 if it fails to do a reset. This gives us a chance to disable interrupts.
* Remove dependency on ispfw and firmware as modules.mjacob2006-12-101-3/+1
| | | | | | | | | | | | | | | | | Either they're there early and the ispfw sets have registered themselves, or they're not. The module dependency stuff isn't quite what we want anyway. If the user doesn't want the load placed on system memory by loading the firmware, they don't specify it to be loaded (either by being linked in or via being a module to be loaded and then hooked in with firmware(9)). It doesn't then make sense to then override what they want by pulling it in anyway. This might be able to work if we were able to pull in just exactly what we needed for the card we have- but that's an optimization left for the future.
* Add 4Gb (24XX) support and lay the foundation for a lot of new stuff.mjacob2006-11-021-56/+47
|
* More ispfwfunc definitions funnies which break pre-7.0 builds.mjacob2006-09-011-1/+0
|
* Some rearrangement of headers to minimize diffs with outside ofmjacob2006-07-161-3/+4
| | | | | | | | FreeBSD repository and to clean up the license header so as to not pollute the license with file function. Zero all mailbox structures prior to use (just in case). Change the outgoing mailbox count for INIT_FIRMWARE to be correct.
* Convert isp(4) and ispfw(4) to use firmware(9) to manage firmwaremjacob2006-07-091-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loading for the QLogic cards. Because isp(4) exists before the root is mounted, it's not really possible for us to use the kernel's linker to load modules directly from disk- that's really too bad. However, the this is still a net win in in that the firmware has been split up on a per chip (and in some cases, functionality) basis, so the amount of stuff loaded *can* be substantially less than the 1.5MB of firmware images that ispfw now manages. That is, each specific f/w set is now also built as a module. For example, QLogic 2322 f/w is built as isp_2322.ko and Initiator/Target 1080 firmware is built as isp_1080_it.ko. For compatibility purposes (i.e., to perturb folks the least), we also still build all of the firmware as one ispfw.ko module. This allows us to let 'ispfw_LOAD' keep on working in existing loader.conf files. If you now want to strip this down to just the firmware for your h/w, you can then change loader.conf to load the f/w you specifically want. We also still allow for ispfw to be statically built (e.g., for PAE and sparc64). Future changes will look at f/w unloading and also role switching that then uses the kernel linker to load different ips f/w sets. MFC after: 2 months
* Some more gratuitous format and name changes.mjacob2006-04-211-23/+23
| | | | | | | Pull in some target mode changes from a private branch. Pull in some more RELENG_4 compilation changes. A lot of lines changed, but not much content change yet.
* a) clean up some declaration stuff (i.e., make more modern with respectmjacob2006-02-151-20/+20
| | | | | | | | | | | | | | | to getting rid u_int for uint and so on). b) Turn back on 64 bit DAC support. Cheeze it a bit in that we have two DMA callback functions- one when we have bus_addr_t > 4 bits in width and the other which should be normal. Even Cheezier in that we turn off setting up DMA maps to be BUS_SPACE_MAXADDR if we're in ISP_TARGET_MODE. More work on this in a week or so. c) Tested under amd64 and 1MB DFLTPHYS, sparc64, i386 (PAE, but insufficient memory to really test > 4GB). LINT check under amd64. MFC after: 1 month
* - Don't shift the clock frequency in MHz left by 8 before assigning itmarius2006-02-031-11/+7
| | | | | | | | | | | | | | to sbus_mdvec.dv_clock as sbus_mdvec.dv_clock is meant to be specified in MHz. While this was a bug it shouldn't have affected FreeBSD/sparc64 as sbus_mdvec.dv_clock is used to limit the clock rate of chips when a machine isn't able to support them at maximum speed which isn't the case for sun4u machines. - Remove the code that checks whether the clock frequency returned by sbus_get_clockfreq() is 0 and falls back to 25MHz if it is as that's already done in sbus(4). Approved by: mjacob MFC after: 3 days
* First of several commits as this driver is dusted off and maybe broughtmjacob2006-01-231-1/+2
| | | | | | | | | | | | | | | | | | up to date. Principle changes for this reelase is to support 2K Port Login firmware. This allows us to support the 2322 (and 2422 4Gb) cards which only come with the 2K Port Login firmware. The 2322 should now work- but we don't have firmware sets for it in ispfw (as the change to load 2K Port Login f/w hasn't been made- that f/w is so big it has to be loaded in more than one chunk). Other changes are the beginnings of cleaning up some long standing target mode issues. The next changes here will incorporate a lot of bug fixes from others. Finally, some copyright cleanup and attempts to make the parts of the driver that are FreeBSD specific start conforming more to FreeBSD style. MFC after: 1 month
* - Introduce an ofw_bus kobj-interface for retrieving the OFW node and amarius2004-08-121-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subset ("compatible", "device_type", "model" and "name") of the standard properties in drivers for devices on Open Firmware supported busses. The standard properties "reg", "interrupts" und "address" are not covered by this interface because they are only of interest in the respective bridge code. There's a remaining standard property "status" which is unclear how to support properly but which also isn't used in FreeBSD at present. This ofw_bus kobj-interface allows to replace the various (ebus_get_node(), ofw_pci_get_node(), etc.) and partially inconsistent (central_get_type() vs. sbus_get_device_type(), etc.) existing IVAR ones with a common one. This in turn allows to simplify and remove code-duplication in drivers for devices that can hang off of more than one OFW supported bus. - Convert the sparc64 Central, EBus, FHC, PCI and SBus bus drivers and the drivers for their children to use the ofw_bus kobj-interface. The IVAR- interfaces of the Central, EBus and FHC are entirely replaced by this. The PCI bus driver used its own kobj-interface and now also uses the ofw_bus one. The IVARs special to the SBus, e.g. for retrieving the burst size, remain. Beware: this causes an ABI-breakage for modules of drivers which used the IVAR-interfaces, i.e. esp(4), hme(4), isp(4) and uart(4), which need to be recompiled. The style-inconsistencies introduced in some of the bus drivers will be fixed by tmm@ in a generic clean-up of the respective drivers later (he requested to add the changes in the "new" style). - Convert the powerpc MacIO bus driver and the drivers for its children to use the ofw_bus kobj-interface. This invloves removing the IVARs related to the "reg" property which were unused and a leftover from the NetBSD origini of the code. There's no ABI-breakage caused by this because none of these driver are currently built as modules. There are other powerpc bus drivers which can be converted to the ofw_bus kobj-interface, e.g. the PCI bus driver, which should be done together with converting powerpc to use the OFW PCI code from sparc64. - Make the SBus and FHC front-end of zs(4) and the sparc64 eeprom(4) take advantage of the ofw_bus kobj-interface and simplify them a bit. Reviewed by: grehan, tmm Approved by: re (scottl) Discussed with: tmm Tested with: Sun AX1105, AXe, Ultra 2, Ultra 60; PPC cross-build on i386
* Add missing <sys/module.h> includes currently relying on nested includephk2004-06-031-0/+1
| | | | in <sys/kernel.h>
* Correct the boundary parameter to the bus_dma_tag_create() calls (it wastmm2004-03-231-2/+2
| | | | | | | (1 << 24) - 2 instead of 1 << 24, which it was obviously intended to be). This fixes SBus isp(4)s on sparc64 machines. Report and testing: Marius Strobl <marius@alchemy.franken.de>
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-3/+3
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Move the inclusion of <machine/ofw_machdep.h> after the inclusion ofmarcel2003-09-021-1/+1
| | | | | | | <dev/ofw/openfirm.h> to allow the former to contain prototypes that use types defined in the latter. Reviewed by: mjacob@
* Use __FBSDID().obrien2003-08-241-2/+3
| | | | Also some minor style cleanups.
* s=include <ofw/=include <dev/ofw/= to reflect removal of -I$S/devimp2003-08-231-1/+1
|
* Mega busdma API commit.scottl2003-07-011-2/+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
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Redo dma tag creation to correctly reflect the boundary and segmentmjacob2002-09-231-8/+7
| | | | limitations inherent to the isp1000 on SBus cards.
* Frequency default should be '25' for 25MHz, not 25000000.mjacob2002-07-251-7/+23
| | | | | | | | | | Through the PITA of endiannness, clock has to be MHz freq << 8. Don't trust NVRAM on SBus cards. Set a default initiator ID sensibly. SBus/ISP now working, what with the change to sbus.c earlier today.
* Make sure that if are in fact using 'full SMP', make the interruptmjacob2002-07-251-6/+9
| | | | | | | | | flags include INTR_MPSAFE. Put the flags in a common place so that both isp_sbus && isp_pci DTRT. In isp_mbxdma setup, drop any locks prior to calling things like bus_dmatag_create. This gets rid of these obnoxious WITNESS messages about 'sleeping with locks held' blah blah blah blah blah.
* Remove a couple of debugging lines.mjacob2002-07-111-7/+0
|
* 'Support' for ISP SBus cards.mjacob2002-07-111-0/+841
This code does not imply that SBus cards work yet. They hang for me. But I can't netboot the latest snapshot on my ultra1e, and things hang at bus_setup_intr time. Since I'm offline for a while, I thought I'd toss this in in case somebody else who has a bit better luck wants to fart around with it. Please try and wait until I get back to check things in.
OpenPOWER on IntegriCloud