summaryrefslogtreecommitdiff
path: root/sys/dev/ic/isp_target.h
AgeCommit message (Collapse)Author
2009-06-25Update ISP driver to latest and greatest. Includes support for the 8Gb part.mjacob
2008-03-11Checkpoint of some fairly major isp(4) rototilling.mjacob
Reintroduce more of a 'channel' concept in preparation for NP-IV support. This gets rid of the chanA/chanB concept as the 2400 can have up to 128 virtual channels. Actually, with MID firmware you can also have the 2200 and 2300 support 'channels, but they do it with an FL-Port topology. Because FC cards can now have 'channels', just about every support function for fibre channel had to be redone to have a channel index as well. Rototill isp_ioctl.h for channel stuff as well. Pick up a lot of work about fabric management (hopefully better) and keep work in place that will allow for dynamic attachment/detachment of devices (if I can figure out how to make the midlayer support it). Merge the target code with external trees. Eventually it might even be sorted out on NetBSD. Update some firmware stuff.
2007-05-24Major update to isp(4) driver to bring it in line with external sources.mjacob
The major changes are: + 4Gb (24XX) card support + Rewritten fabric and loop evaluation code + New f/w sets The 4Gb changes required major rototilling, which caused a rewrite of fabric and loop eval code. The latter can now be set up to tune for dynamic device arrival/departure if the framework is set up for it, or to be firm about waiting for devices. Testing has been principally on amd64, i386 and sparc64 and seems to not have broken things for me.
2007-01-13Make it compile with all the options.cube
2005-12-11merge ktrace-lwp.christos
2003-12-04netbsd.org -> NetBSD.orgkeihan
This was the last commit of this kind to src/sys, which is now totally "NetBSD.org clean". Thanks for the patiance, and sorry for all the commits.
2003-08-07Various updates to sync with mainline code. Nothing of great significancemjacob
to NetBSD, yet.
2002-08-12Various changes to allow for overriding just loopid and/or iid.mjacob
Fix a random 23XX ISR reading bug. Be chattier about HBA_BOTCH errors. More f/w cashdump layering.
2002-05-17Fix seveeral issues- but the most important of which is that we havemjacob
to check if we get a RQCS_DATA_UNDERRUN - if we're an FC card, we may not have RQCS_RU set- if it isn't set, we just lost a DATA XFR IU in the middle of the exchange. In this case, we have to bomb out the whole xfer. We had been getting silent data corruption before.
2002-02-21Implement F/W crashdumps for 2200 && 2300 cards (kernel compile option).mjacob
Distinguish between 2312 and 2300 cards (they *are* different). Enable RIO (Reduced Interrupt Operation) for the LVD cards (hey- I've seen batched completions of the 30 commands at a time with this,....)... If we get a Port Logout on local loop topologies, we have to force the f/w to log back in. The easiest way (for us) to do this is to force a LIP. This also will wake up the disk that probably just had a f/w crash. Implement mailbox 'continuations'- this allows interrupts to re-drive a mailbox command if it's one that just essentially repeats the previous mailbox command (e.g., f/w download). This saves a boatload of sleep/wakeup twitches. If we're not a 2300 and we're about to return with a 'bogus interrupt'- check the semaphore register to be non-zero at all and outgoing mailbox 0- this seems to be where some of the lost ISP1080 commands came from.
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 NetBSD, 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. 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-09-05Synchronize with FreeBSD/Linux.mjacob
2001-07-06Minor comment update.mjacob
2001-05-16Keep up with the Joneses.... further synchronization for the eventualmjacob
implementation in NetBSD for target mode.
2001-04-05Keep up with the Joneses: sync with common core target mode code. Eventuallymjacob
we'll do something with it here.
2001-03-14Clean up and update copyright (remove advertising clause). Cleanmjacob
up header guard. Clean up structure definition for at2_entry so it's correct rather than derived from at_entry- this is important for unswizzling purposes. Add a whole bunch of unswizzle macros- they're not quite right yet but at least they're a start. Note that we now have, for at_entry, a 16 bit firmware handle as part of what had been at_reserved- this is to correlate ATIOs with CTIOs- and this must be carried along as part of a tag value to use with all CTIOs we send in relation to this ATIO. ANSIfy.
2000-12-28add two minor ATIO2 offsetsmjacob
2000-12-23Fix pathnames in comment.wiz
2000-08-14Add a maintenance notemjacob
2000-08-01Core version 2.0 (platform version 1.0) rewrite of ISP driver. Somemjacob
interace cleanups, some new common functions. The major impact that will be noticeable right away is that if you boot with not Fibre connected to the FC cards, you no longer hang indefinitely.
2000-07-19add some more CTIO flagsmjacob
2000-07-05pick up FreeBSD changesmjacob
2000-05-13Update from Matthew Jacob:he
Correctly account for F-port vs. F-port (no FLOGI_ACC) topologies. Make sure we get a port database entry for the fabric name server. Preserve fabric logins if the device didn't change across fabric or port database changes, or the device has already logged into us (e.g., for target/initiator dual role devices like Veritas SANbox). Propagate class 3 service parameter changes where devices can change roles. Fix all occurrences of setting a sendmarker so that setting it for one bus on dual bus cards doesn't wipe a pending sendmarker for other busses on the same card :-;. Comments added and clarifications made in some of the target mode code.
2000-02-19Fix ITDEBUG macromjacob
2000-02-12A lot of cleanup and shrinkage. Some items moved to isp_tpublic.h.mjacob
2000-01-05Add in MI target mode code modulesmjacob