summaryrefslogtreecommitdiff
path: root/sys/dev/ic/isp_openbsd.h
AgeCommit message (Collapse)Author
2004-08-02Use some horrible macros to uninline a few functions that are expensiveArtur Grabowski
when inlined and shave a few k from the kernel size. The goal here was not to make the nicest diff possible, but the smallest. deraadt@ drahn@ ok
2004-06-24This moves access to wall and uptime variables in MI code,Thorsten Lockert
encapsulating all such access into wall-defined functions that makes sure locking is done as needed. It also cleans up some uses of wall time vs. uptime some places, but there is sure to be more of these needed as well, particularily in MD code. Also, many current calls to microtime() should probably be changed to getmicrotime(), or to the {,get}microuptime() versions. ok art@ deraadt@ aaron@ matthieu@ beck@ sturm@ millert@ others "Oh, that is not your problem!" from miod@
2003-03-30Delete unused local version of strncat.Kenneth R Westerback
ok mjacob@.
2003-03-06Remove double include of scsi_all.hmjacob
2003-03-03Remove STRNCAT define.mjacob
2002-05-17Accomodate changes to fabric stuff as well as other core code changes.mjacob
Fix a buglet in delaying && waiting for mailbox completion.
2002-03-06Get the offsets and lengths right when sync'n dma maps; patch from mjacobJason Wright
2002-02-15Much simpler timeout calculation.Artur Grabowski
2001-12-14Major restructuring for swizzling to the request queue and unswizzling frommjacob
the response queue. Instead of the ad hoc ISP_SWIZZLE_REQUEST, we now have a complete set of inline functions in isp_inline.h. Each platform is responsible for providing just one of a set of ISP_IOX_{GET,PUT}{8,16,32} macros. The reason this needs to be done is that we need to have a single set of functions that will work correctly on multiple architectures for both little and big endian machines. It also needs to work correctly in the case that we have the request or response queues in memory that has to be treated specially (e.g., have ddi_dma_sync called on it for Solaris after we update it or before we read from it). One thing that falls out of this is that we no longer build requests in the request queue itself. Instead, we build the request locally (e.g., on the stack) and then as part of the swizzling operation, copy it to the request queue entry we've allocated. I thought long and hard about whether this was too expensive a change to make as it in a lot of cases requires an extra copy. On balance, the flexbility is worth it. With any luck, the entry that we build locally stays in a processor writeback cache (after all, it's only 64 bytes) so that the cost of actually flushing it to the memory area that is the shared queue with the PCI device is not all that expensive. We may examine this again and try to get clever in the future to try and avoid copies. Another change that falls out of this is that MEMORYBARRIER should be taken a lot more seriously. The macro ISP_ADD_REQUEST does a MEMORYBARRIER on the entry being added. But there had been many other places this had been missing. It's now very important that it be done. For OpenSD, it does a ddi_dmamap_sync as appropriate. This gets us out of the explicit ddi_dmamap_sync on the whole response queue that we did for SBus cards at each interrupt. Now, because SBus/sparc doesn't use bus_dma, some shenanigans were done to support this. But Jason was nice enough to test the SBus/sparcv9 changes for me, and they did the right thing as well. Set things up so that platforms that cannot have an SBus don't get a lot of the SBus code checks (dead coded out). Additional changes: Fix a longstanding buglet of sorts. When we get an entry via isp_getrqentry, the iptr value that gets returned is the value we intend to eventually plug into the ISP registers as the entry *one past* the last one we've written- *not* the current entry we're updating. All along we've been calling sync functions on the wrong index value. Argh. The 'fix' here is to rename all 'iptr' variables as 'nxti' to remember that this is the 'next' pointer- not the current pointer. Devote a single bit to mboxbsy- and set aside bits for output mbox registers that we need to pick up- we can have at least one command which does not have any defined output registers (MBOX_EXECUTE_FIRMWARE). Explicitly decode GetAllNext SNS Response back *as* a GetAllNext response. Otherwise, we won't unswizzle it correctly. Nuke some additional __P macros.
2001-11-06Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.Miod Vallat
(Look ma, I might have broken the tree)
2001-09-01Catch up with mainline of code development.mjacob
Add support for 2 Gigabit cards (2300/2312). This necessitated a change in how interrupts are down- the 23XX has not only a different place to check for an interrupt, but unlike all other QLogic cards, you have to read the status as a 32 bit word- not 16 bit words. Rather than have device specific functions as called from the core module (in isp_intr), it makes more sense to have the platform/bus modules do the gruntwork of splitting out the isr, semaphore register and the first outgoing mailbox register (if needed) *prior* to calling isp_intr (if calling isp_intr is necessary at all). Rearchitect how regular SCSI parameters are stored or used.
2001-08-12absolutely no need to include vm_parm.h after vm.hMichael Shalayeff
2001-08-12remove some of the redundant vm includesMichael Shalayeff
2001-04-04Roll platform major/minor. Ansify. Add the appropriate bits formjacob
going to a synchronous restart queue blockage model. Add bits that say that scsi xfer has a timer active. Ha. ha ha. Add the bits that note that we have sense data when we get it.
2001-02-12Roll platform minor. Remove ISP2100_FABRIC defines (we don't caremjacob
anymore). Fix mailbox timeouts to correctly print out timing out command.
2000-12-06Update isp codebase to current common head- USEC_SLEEP macro added,mjacob
instrumentation for interrupts, specific topology preferences for the 2200. Fix the hole in the OpenBSD port becuause there'd been no maxluns limit from the midlayer and have the command routine bounce commands > the maxluns for a particular controller (in particular, Qlogic FC cards where we can't tell when it hasn't been us that have loaded the F/W whether or not SCCLUN is in effect or not).
2000-10-16Update OpenBSD with respect to Solaris/FreeBSD/NetBSD/Linux versions.mjacob
Major rewrite of a lot of internals- far too many to list. Cleaner locking, more paramaterization, an isp_prt logging function that handles debugging as well as error printouts. We also should no longer hang if there is no Loop for Fibre Channel when booting. The file ispvar.h now contains a list of all platform required macros and explanation as to what they're for. This should make maintenance easier.
2000-07-06Resync with FreeBSD/NetBSD. Salient features are that the mailbox commandmjacob
routines are not necessarily polled now- this should cut down on some of the spurious lost commands that have occurred. Also, we now watchdog each command and make sure that command constipation doesn't occur (which it has been documented to do on the QLA2100 cards).
2000-03-05roll minor revision levelmjacob
2000-02-20Add 12160 (Ultra3) support. Add files and changes for target mode support.mjacob
Do some SNS fabric suppor tchanges. Roll revision levels. Tested on GENERIC i386 && sparc.
1999-12-16Roll platform version. Add a second scsi_link struct in the privatemjacob
area (for dual bus support). Add in a proper XS_CHANNEL macro. Reorder the printf level ifdefs- DEBUG should come before DIAGNOSTIC
1999-11-23make CFGPRINTF only available for SCSIDEBUG/DEBUG kernelsmjacob
1999-11-22Far too many things to note- a complete new revision coming in includingmjacob
FABRIC support...
1999-03-25roll internal revision levels and enable 1080 supportmjacob
1999-03-17fix OpenBSD headersmjacob
1999-03-17complete update of ISP driver- includes 2100 FC supportmjacob