History log of /src/sys/dev/ic/isp_target.c |
Revision | | Date | Author | Comments |
1.38 |
| 08-Sep-2024 |
rillig | fix a/an grammar in obvious cases
|
1.37 |
| 12-Dec-2021 |
andvar | fix various typos, mainly in comments.
|
1.36 |
| 21-Aug-2021 |
andvar | fix some more typos in comments/log messages, improve wording as well.
|
1.35 |
| 03-Sep-2018 |
riastradh | Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
|
1.34 |
| 26-Mar-2010 |
mjacob | branches: 1.34.58; 1.34.60; Synchronize with other platforms:
Strongly architect handles so we can more easily detect bogus handles. This switches us to a full 32 bits for all handles.
Handle the case of FC disks disappearing and then reappearing- at least at the FC transport level.
Some better and finer control of debug and non-debug printouts.
|
1.33 |
| 25-Jun-2009 |
mjacob | branches: 1.33.2; 1.33.4; Update ISP driver to latest and greatest. Includes support for the 8Gb part.
|
1.32 |
| 30-Jun-2008 |
perry | branches: 1.32.10; __FUNCTION__ -> __func__
|
1.31 |
| 11-Mar-2008 |
mjacob | branches: 1.31.4; 1.31.6; 1.31.8; Checkpoint of some fairly major isp(4) rototilling.
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.
|
1.30 |
| 24-May-2007 |
mjacob | branches: 1.30.8; 1.30.24; 1.30.28; Major update to isp(4) driver to bring it in line with external sources.
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.
|
1.29 |
| 13-Jan-2007 |
cube | branches: 1.29.6; 1.29.8; Make it compile with all the options.
|
1.28 |
| 11-Dec-2005 |
christos | branches: 1.28.20; merge ktrace-lwp.
|
1.27 |
| 27-Feb-2005 |
perry | branches: 1.27.4; nuke trailing whitespace
|
1.26 |
| 04-Dec-2003 |
keihan | branches: 1.26.8; 1.26.10; netbsd.org -> NetBSD.org
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.
|
1.25 |
| 02-Nov-2003 |
wiz | Fix some typos. From Tom Cosgrove via jmc@openbsd.
|
1.24 |
| 07-Aug-2003 |
mjacob | Various updates to sync with mainline code. Nothing of great significance to NetBSD, yet.
|
1.23 |
| 03-Mar-2003 |
mjacob | branches: 1.23.2; Propagate iid && rxid when we're putting back an ATIO for FC.
Spelling fixes.
|
1.22 |
| 20-Jan-2003 |
simonb | The Double-Semi-Colon Police.
|
1.21 |
| 06-Jan-2003 |
wiz | interrupt with two rs.
|
1.20 |
| 18-Oct-2002 |
mjacob | Some lint fixes.
|
1.19 |
| 15-Jun-2002 |
mjacob | keep target mode up to date.
|
1.18 |
| 21-Feb-2002 |
mjacob | branches: 1.18.8; Implement F/W crashdumps for 2200 && 2300 cards (kernel compile option).
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.
|
1.17 |
| 14-Dec-2001 |
mjacob | Major restructuring for swizzling to the request queue and unswizzling from 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.
|
1.16 |
| 13-Nov-2001 |
lukem | add/cleanup RCSID
|
1.15 |
| 05-Sep-2001 |
mjacob | Synchronize with FreeBSD/Linux.
|
1.14 |
| 16-May-2001 |
mjacob | branches: 1.14.2; Keep up with the Joneses.... further synchronization for the eventual implementation in NetBSD for target mode.
|
1.13 |
| 05-Apr-2001 |
mjacob | Keep up with the Joneses: sync with common core target mode code. Eventually we'll do something with it here.
|
1.12 |
| 14-Mar-2001 |
mjacob | ANSIfy source.
|
1.11 |
| 14-Mar-2001 |
mjacob | Clean up license && copyright a tad. ct_reserved should now be more properly called ct_syshandle.
|
1.10 |
| 23-Dec-2000 |
wiz | branches: 1.10.2; Fix pathnames in comment.
|
1.9 |
| 14-Aug-2000 |
mjacob | branches: 1.9.2; Add a maintenance note
|
1.8 |
| 08-Aug-2000 |
mjacob | Remove ispcmd_slow routine- SCBUSACCEL routine will set/clear tag/wide/sync. Make some changes about where some things sit in the softc.
|
1.7 |
| 01-Aug-2000 |
mjacob | Core version 2.0 (platform version 1.0) rewrite of ISP driver. Some 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.
|
1.6 |
| 19-Jul-2000 |
mjacob | zero result queue entry when done if debugging. don't do an isp_notify_ack if we're not at run state.
|
1.5 |
| 05-Jul-2000 |
mjacob | pick up FreeBSD changes
|
1.4 |
| 13-May-2000 |
he | branches: 1.4.4; Update from Matthew Jacob:
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.
|
1.3 |
| 19-Feb-2000 |
mjacob | Handle dual bus cases for immediate notify and enable lun commands.
|
1.2 |
| 12-Feb-2000 |
mjacob | some minor cleanups
|
1.1 |
| 05-Jan-2000 |
mjacob | Add in MI target mode code modules
|
1.4.4.1 |
| 28-Aug-2000 |
mjacob | Complete rewrite of internals for isp core version 2.0. Pullup to netbsd-1-5 approved by thorpej@netbsd.org.
|
1.9.2.5 |
| 21-Apr-2001 |
bouyer | Sync with HEAD
|
1.9.2.4 |
| 27-Mar-2001 |
bouyer | Sync with HEAD.
|
1.9.2.3 |
| 05-Jan-2001 |
bouyer | Sync with HEAD
|
1.9.2.2 |
| 20-Nov-2000 |
bouyer | Update thorpej_scsipi to -current as of a month ago A i386 GENERIC kernel compiles without the siop, ahc and bha drivers (will be updated later). i386 IDE/ATAPI and ncr work, as well as sparc/esp_sbus. alpha should work as well (untested yet). siop, ahc and bha will be updated once I've updated the branch to current -current, as well as machine-dependant code.
|
1.9.2.1 |
| 14-Aug-2000 |
bouyer | file isp_target.c was added on branch thorpej_scsipi on 2000-11-20 11:40:39 +0000
|
1.10.2.9 |
| 07-Jan-2003 |
thorpej | Sync with HEAD.
|
1.10.2.8 |
| 11-Nov-2002 |
nathanw | Catch up to -current
|
1.10.2.7 |
| 20-Jun-2002 |
nathanw | Catch up to -current.
|
1.10.2.6 |
| 28-Feb-2002 |
nathanw | Catch up to -current.
|
1.10.2.5 |
| 08-Jan-2002 |
nathanw | Catch up to -current.
|
1.10.2.4 |
| 14-Nov-2001 |
nathanw | Catch up to -current.
|
1.10.2.3 |
| 21-Sep-2001 |
nathanw | Catch up to -current.
|
1.10.2.2 |
| 21-Jun-2001 |
nathanw | Catch up to -current.
|
1.10.2.1 |
| 09-Apr-2001 |
nathanw | Catch up with -current.
|
1.14.2.4 |
| 23-Jun-2002 |
jdolecek | catch up with -current on kqueue branch
|
1.14.2.3 |
| 16-Mar-2002 |
jdolecek | Catch up with -current.
|
1.14.2.2 |
| 10-Jan-2002 |
thorpej | Sync kqueue branch with -current.
|
1.14.2.1 |
| 13-Sep-2001 |
thorpej | Update the kqueue branch to HEAD.
|
1.18.8.1 |
| 20-Jun-2002 |
gehenna | catch up with -current.
|
1.23.2.4 |
| 04-Mar-2005 |
skrll | Sync with HEAD.
Hi Perry!
|
1.23.2.3 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.23.2.2 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
1.23.2.1 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
1.26.10.1 |
| 19-Mar-2005 |
yamt | sync with head. xen and whitespace. xen part is not finished.
|
1.26.8.1 |
| 29-Apr-2005 |
kent | sync with -current
|
1.27.4.3 |
| 17-Mar-2008 |
yamt | sync with head.
|
1.27.4.2 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.27.4.1 |
| 26-Feb-2007 |
yamt | sync with head.
|
1.28.20.1 |
| 01-Feb-2007 |
ad | Sync with head.
|
1.29.8.1 |
| 11-Jul-2007 |
mjf | Sync with head.
|
1.29.6.2 |
| 15-Jul-2007 |
ad | Sync with head.
|
1.29.6.1 |
| 27-May-2007 |
ad | Sync with head.
|
1.30.28.2 |
| 02-Jul-2008 |
mjf | Sync with HEAD.
|
1.30.28.1 |
| 03-Apr-2008 |
mjf | Sync with HEAD.
|
1.30.24.1 |
| 24-Mar-2008 |
keiichi | sync with head.
|
1.30.8.1 |
| 23-Mar-2008 |
matt | sync with HEAD
|
1.31.8.1 |
| 03-Jul-2008 |
simonb | Sync with head.
|
1.31.6.1 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.31.4.3 |
| 11-Aug-2010 |
yamt | sync with head.
|
1.31.4.2 |
| 18-Jul-2009 |
yamt | sync with head.
|
1.31.4.1 |
| 04-May-2009 |
yamt | sync with head.
|
1.32.10.1 |
| 23-Jul-2009 |
jym | Sync with HEAD.
|
1.33.4.1 |
| 30-May-2010 |
rmind | sync with head
|
1.33.2.1 |
| 30-Apr-2010 |
uebayasi | Sync with HEAD.
|
1.34.60.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.34.58.1 |
| 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|