267655 |
20-Jun-2014 |
gjb |
Remove svn:mergeinfo carried over from stable/9.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
267654 |
20-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
263384 |
19-Mar-2014 |
dim |
MFC r259860 (by mjacob):
Harvest one no longer used constant string.
Remove another and place it into play in the normally ifdef protected zone it would be used int.
Noticed by: dim
|
259485 |
16-Dec-2013 |
andreast |
Fix the outstanding mergeinfo part of r249374.
|
254972 |
27-Aug-2013 |
ken |
Properly record mergeinfo for the merge of revision 254372 from head into stable/9.
This should have been done in change 254971.
Pointy hat to: ken
|
254971 |
27-Aug-2013 |
ken |
MFC 254372:
Export the maxio field in the CAM XPT_PATH_INQ CCB in the isp(4) driver.
This tells consumers up the stack the maximum I/O size that the controller can handle.
The I/O size is bounded by the number of scatter/gather segments the controller can handle and the page size. For an amd64 system, it works out to around 5MB.
Reviewed by: mjacob Sponsored by: Spectra Logic
|
254306 |
13-Aug-2013 |
scottl |
Merge r254263:
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit.
This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot.
Candidate for 9.2
Submitted by: jhb Reviewed by: jfv, marius, adrian, achim
|
253371 |
15-Jul-2013 |
mjacob |
MFC of 253330
When fiddling with options of which registers to copy out for a mailbox command and which registers to copy back in when the command completes, the bits being set need to not only specify what bits you want to add from the default from the table but also what bits you want *subtract* (mask) from the default from the table.
A failing ISP2200 command pointed this out.
Approved by: re
|
253037 |
08-Jul-2013 |
mav |
MFC r249468: Stop abusing xpt_periph in random plases that really have no periph related to CCB, for example, bus scanning. NULL value is fine in such cases and it is correctly logged in debug messages as "noperiph". If at some point we need some real XPT periphs (alike to pmpX now), quite likely they will be per-bus, and not a single global instance as xpt_periph now.
|
252778 |
05-Jul-2013 |
achim |
MFC r250963, r251013, r251056: Driver 'aacraid' added to support Adaptec by PMC RAID controller families Series 6, 7, 8 and upcoming products.
Approved by: emaste (co-mentor)
|
251946 |
18-Jun-2013 |
marius |
MFC: r247264
Turn off fast posting for the ISP2100- I'd forgotten that it actually might have been enabled for them- now that we use all 32 bits of handle. Fast Posting doesn't pass the full 32 bits.
|
251943 |
18-Jun-2013 |
marius |
MFC: r251373
Flag isp(4) as supporting unmapped I/O; all necessary conversion actually already has been done as part of r246713 (MFC'ed to stable/9 in r251874).
|
251874 |
18-Jun-2013 |
scottl |
Big MFC of the physbio changes necessary for unmapped I/O. These changes have been in production at Netflix for several months with significant success.
MFC r246713:
Reform the busdma API so that new types may be added without modifying every architecture's busdma_machdep.c. It is done by unifying the bus_dmamap_load_buffer() routines so that they may be called from MI code. The MD busdma is then given a chance to do any final processing in the complete() callback.
MFC r249538: Some compilers issue a warning when wider integer is casted to narrow pointer. Supposedly shut down the warning by casting through uintptr_t.
MFC r251479: Simplify the checking of flags for cam_periph_mapmem(). This gets rid of a lot of code redundancy and grossness at very minor expense.
MFC r251837: MFC r251842: Add infrastructure for doing compatibility shims, as has been sorely needed for the last 10 years. Far too much of the internal API is exposed, and every small adjustment causes applications to stop working. To kick this off, bump the API version to 0x17 as should have been done with r246713, but add shims to compensate. Thanks to the shims, there should be no visible change in application behavior.
Submitted by: kib, jeffr Approved by: kib Obtained from: Netflix
|
250248 |
04-May-2013 |
mdf |
MFC r248933:
Use a shared lock for VOP_GETEXTATTR, as it is a read-like operation.
|
250111 |
30-Apr-2013 |
gnn |
Improve error handling when unwrapping received data.
Submitted by: Rick Macklem
|
248665 |
23-Mar-2013 |
mckusick |
MFC of 246876 and 246877
MFC: 246876:
Add barrier write capability to the VFS buffer interface. A barrier write is a disk write request that tells the disk that the buffer being written must be committed to the media along with any writes that preceeded it before any future blocks may be written to the drive.
Barrier writes are provided by adding the functions bbarrierwrite (bwrite with barrier) and babarrierwrite (bawrite with barrier).
Following a bbarrierwrite the client knows that the requested buffer is on the media. It does not ensure that buffers written before that buffer are on the media. It only ensure that buffers written before that buffer will get to the media before any buffers written after that buffer. A flush command must be sent to the disk to ensure that all earlier written buffers are on the media.
Reviewed by: kib Tested by: Peter Holm
MFC 246877:
The UFS2 filesystem allocates new blocks of inodes as they are needed. When a cylinder group runs short of inodes, a new block for inodes is allocated, zero'ed, and written to the disk. The zero'ed inodes must be on the disk before the cylinder group can be updated to claim them. If the cylinder group claiming the new inodes were written before the zero'ed block of inodes, the system could crash with the filesystem in an unrecoverable state.
Rather than adding a soft updates dependency to ensure that the new inode block is written before it is claimed by the cylinder group map, we just do a barrier write of the zero'ed inode block to ensure that it will get written before the updated cylinder group map can be written. This change should only slow down bulk loading of newly created filesystems since that is the primary time that new inode blocks need to be created.
Reported by: Robert Watson Reviewed by: kib Tested by: Peter Holm
|
248626 |
22-Mar-2013 |
mckusick |
MFS of 246289:
For UFS2 i_blocks is unsigned. The current "sanity" check that it has gone below zero after the blocks in its inode are freed is a no-op which the compiler fails to warn about because of the use of the DIP macro. Change the sanity check to compare the number of blocks being freed against the value i_blocks. If the number of blocks being freed exceeds i_blocks, just set i_blocks to zero.
Reported by: Pedro Giffuni (pfg@)
|
247111 |
21-Feb-2013 |
mav |
MFC r230590 (by ken) except parts changing ABI: Add CAM infrastructure to allow reporting when a drive's long read capacity data changes.
|
245258 |
10-Jan-2013 |
ae |
MFC r244750: Add net.link.stf.permit_rfc1918 sysctl variable. It can be used to allow the use of private IPv4 addresses with stf(4).
MFC r244752: Add an ability to set net.link.stf.permit_rfc1918 from the loader.
|
244999 |
03-Jan-2013 |
gnn |
MFC: 234930
Fix so that ,usr and ,os work correctly with fixed function (IAF) counters.
|
243989 |
07-Dec-2012 |
gnn |
MFC: 238366, 240924
Initial commit of an I/O provider for DTrace on FreeBSD.
These probes are most useful when looking into the structures they provide, which are listed in io.d. For example:
dtrace -n 'io:kernel::start { printf("%d\n", args[0]->bio_bcount); }'
Note that the I/O systems in FreeBSD and Solaris/Illumos are sufficiently different that there is not a 1:1 mapping from scripts that work with one to the other.
This commit includes the fix so that our probes use "kernel" instead of the Solaris specific "genunix"
|
242920 |
12-Nov-2012 |
mjacob |
MFC 242479,242480: Force segments to 1 for mapping control spaces.
|
241681 |
18-Oct-2012 |
marius |
MFC: r239864
- Unlike cache invalidation and TLB demapping IPIs, reading registers from other CPUs doesn't require locking so get rid of it. As the latter is used for the timecounter on certain machine models, using a spin lock in this case can lead to a deadlock with the upcoming callout(9) rework. - Merge r134227/r167250 from x86: Avoid cross-IPI SMP deadlock by using the smp_ipi_mtx spin lock not only for smp_rendezvous_cpus() but also for the MD cache invalidation and TLB demapping IPIs. - Mark some unused function arguments as such.
|
241222 |
05-Oct-2012 |
jh |
MFC r239257:
Reserve room for the terminating NUL when setting or getting kernel environment variables. KENV_MNAMELEN and KENV_MVALLEN doesn't include space for the terminating NUL.
|
241194 |
04-Oct-2012 |
rmacklem |
MFC: r240720 Modify the NFSv4 client so that it can handle owner and owner_group strings that consist entirely of digits, interpreting them as the uid/gid number. This change was needed since new (>= 3.3) Linux servers reply with these strings by default. This change is mandated by the rfc3530bis draft. Reported on freebsd-stable@ under the Subject heading "Problem with Linux >= 3.3 as NFSv4 server" by Norbert Aschendorff on Aug. 20, 2012.
|
241112 |
01-Oct-2012 |
jhb |
MFC 239779: Shorten the name of the fast SWI taskqueue to "fast taskq" so that it fits.
|
241110 |
01-Oct-2012 |
jhb |
MFC 239008,239020: Improve the handling of static DMA buffers that use non-default memory attributes (currently just BUS_DMA_NOCACHE): - Don't call pmap_change_attr() on the returned address, instead use kmem_alloc_contig() to ask the VM system for memory with the requested attribute. - As a result, always use kmem_alloc_contig() for non-default memory attributes, even for sub-page allocations. This requires adjusting bus_dmamem_free()'s logic for determining which free routine to use. - For x86, add a new dummy bus_dmamap that is used for static DMA buffers allocated via kmem_alloc_contig(). bus_dmamem_free() can then use the map pointer to determine which free routine to use. - For powerpc, add a new flag to the allocated map (bus_dmamem_alloc() always creates a real map on powerpc) to indicate which free routine should be used.
Note that the BUS_DMA_NOCACHE handling in powerpc is currently #ifdef'd out. I have left it disabled but updated it to match x86.
|
241109 |
01-Oct-2012 |
jhb |
MFC 239771: Fix misspelled "Infiniband".
|
240977 |
26-Sep-2012 |
rmacklem |
MFC: r240289 Add a simple printf() based debug facility to the new nfs client. Use it for a printf() that can be harmlessly generated for mmap()'d files. It will be used extensively for the NFSv4.1 client. Debugging printf()s are enabled by setting vfs.nfs.debuglevel to a non-zero value. The higher the value, the more debugging printf()s.
|
240769 |
21-Sep-2012 |
mjacob |
MFC of 240219 - remove useless test.
|
240717 |
20-Sep-2012 |
mjacob |
MFC of 239502: Remove dependence on MAXPHYS.
|
240713 |
19-Sep-2012 |
mjacob |
MFC of 240580 and 240590- correct some comments.
|
240579 |
17-Sep-2012 |
eadler |
MFC r240518: Correct double "the the"
Approved by: cperciva (implicit)
|
240217 |
07-Sep-2012 |
thomas |
Merge rev. 239673 from head to stable/9: (g_multipath_rotate): Fix algorithm so that it does rotate over all good providers, not just the last two.
|
240159 |
06-Sep-2012 |
thomas |
MFC: merge rev. 239012 from head to stable/9 New command "gmultipath prefer" to force selection of a specified provider in an Active/Passive configuration.
|
240025 |
02-Sep-2012 |
mjacob |
MFC of 239023
Add detach logic to SBus variant.
|
240023 |
02-Sep-2012 |
mjacob |
MFC of 239010
Oops. We only do allocate room for extended commands and responses for 2300 cards are newer.
|
240022 |
02-Sep-2012 |
mjacob |
MFC of 238887- fix compilation on isp_sbus.c
|
240019 |
02-Sep-2012 |
mjacob |
MFC of 239330
On lun disable, complete all INOTs and ATIOs with CAM_REQ_ABORTED.
|
240018 |
02-Sep-2012 |
mjacob |
MFC of 239219
Remove extraneous newline.
|
240017 |
02-Sep-2012 |
mjacob |
MFC of 239218
Fix an oops where we wiped out DMA maps...
|
240016 |
02-Sep-2012 |
mjacob |
MFC of 239143
More rototilling with target mode in an attemp to get multiple...
|
240015 |
02-Sep-2012 |
mjacob |
MFC of 238859
Mega change for FC-Tape.
|
240014 |
02-Sep-2012 |
mjacob |
MFC of 228914
Fix target mode compilation issues that arose after a change in the sense data structures.
|
240013 |
02-Sep-2012 |
mjacob |
A belated MFC of 227126
Implement the sysctl's for fibre channel that are listed in the man page.
|
240012 |
02-Sep-2012 |
mjacob |
MFC of 237544
Unbreak register tests for parallel SCSI.
|
240010 |
02-Sep-2012 |
mjacob |
MFC of 237537
Clean up multi-id mode so it's driven by the f/w loaded,...
|
240009 |
02-Sep-2012 |
mjacob |
MFC of 237210
Prepare for FC-Tape support.
|
240008 |
02-Sep-2012 |
mjacob |
Very belated MFC of 227548
Was chasing down a failure to load f/w on a 2400. It turns out that the card is actually broken, or needs a BIOS upgrade for 64 bit loads, but this uncovered a couple of misplaced opcode definitions and some missing continual mbox command cases, so might as well update them here.
|
239920 |
30-Aug-2012 |
jhb |
MFC 239128: Don't try to stop the IPMI watchdog timer if it is not running. Starting or stopping the IPMI watchdog is rather expensive with the current implementation as all IPMI requests are bounced via thread. This is not viable during shutdown or dumps, and this avoids headache in the common case that the watchdog is not enabled. The IPMI watchdog should probably be reworked to not use a separate thread to fix this in the case when the watchdog timer is enabled.
|
239917 |
30-Aug-2012 |
jhb |
MFC 239103: Explicitly enable busmastering on PCI-PCI bridges. Transactions initiated on the secondary side of a bridge will not be propagated to the primary bus unless this is enabled. Busmastering is not enabled by default (we have relied on firmware to set this bit to date). The OS needs to set it for any bridges not configured by system firmware.
|
239915 |
30-Aug-2012 |
jhb |
MFC 238424: Make the interval timings for EVFILT_TIMER more accurate. tvtohz() always adds an extra tick to account for the current partial clock tick. However, that is not appropriate for a repeating timer when the exact tvtohz() value should be used for subsequent intervals. Fix repeating callouts for EVFILT_TIMER by subtracting 1 tick from the tvtohz() result similar to the fix used in realitexpire() for interval timers.
While here, update a few comments to note that if the EVFILT_TIMER code were to move out of kern_event.c, it should move to kern_time.c (where the interval timer code it mimics lives) rather than kern_timeout.c.
|
239914 |
30-Aug-2012 |
jhb |
MFC 238311: Add a clts() wrapper around the 'clts' instruction to <machine/cpufunc.h> on x86 and use that to implement stop_emulating() in the fpu/npx code. Reimplement start_emulating() in the non-XEN case by using load_cr0() and rcr0() instead of the 'lmsw' and 'smsw' instructions. Intel explicitly discourages the use of 'lmsw' and 'smsw' on 80386 and later processors in the description of these instructions in Volume 2 of the ADM.
|
239882 |
29-Aug-2012 |
jhb |
MFC 238142,238179: Now that our assembler supports the xsave family of instructions, use them natively rather than hand-assembled versions. For xgetbv/xsetbv, add a wrapper API to deal with xcr* registers: rxcr() and load_xcr().
|
239880 |
29-Aug-2012 |
jhb |
MFC 238310: Partially revert r217515 so that the mem_range_softc variable is always present on x86 kernels. This fixes the build of kernels that include 'device acpi' but do not include 'device mem'.
|
239879 |
29-Aug-2012 |
jhb |
MFC 238109,238166: Several fixes to the amd64 disassembler: - Decode the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', 'xsetbv', and 'rdtscp' instructions. - Add generic support for opcodes that are escape bytes used for multi-byte opcodes (such as the 0x0f prefix). Use this to replace the hard-coded 0x0f special case and add support for three-byte opcodes that use the 0x0f38 prefix. - Decode all Intel VMX instructions. invept and invvpid in particular are three-byte opcodes that use the 0x0f38 escape prefix. - Rework how the special 'SDEP' size flag works such that the default instruction name (i_name) is the instruction when the data size prefix (0x66) is not specified, and the alternate name in i_extra is used when the prefix is included. - Add a new 'ADEP' size flag similar to 'SDEP' except that it chooses between i_name and i_extra based on the address size prefix (0x67). Use this to fix the decoding for jrcxz vs jecxz which is determined by the address size prefix, not the operand size prefix. Also, jcxz is not possible in 64-bit mode, but jrcxz is the default instruction for that opcode. - Add support for handling instructions that have a mandatory 'rep' prefix (this means not outputting the 'repe ' prefix until determining if it is used as part of an opcode). Make 'pause' less of a special case this way. - Decode 'cmpxchg16b' and 'cdqe' which are variants of other instructions but with a REX.W prefix.
|
239874 |
29-Aug-2012 |
jhb |
MFC 238000,239584: Honor db_pager_quit in 'show malloc', 'show uma', and 'show witness'.
|
239866 |
29-Aug-2012 |
jhb |
MFC 238077: Fix panics triggered by older mfiutil binaries run on the new mfi(4) driver. The new driver changed the size of the mfi_dcmd_frame structure in such a way that a MFI_IOC_PASSTHRU ioctl from an old amd64 binary is treated as an MFI_IOC_PASSTHRU32 ioctl in the new driver. As a result, the user pointer is treated as the buffer length. mfi_user_command() doesn't have a bounds check on the buffer length, so it passes a really big value to malloc() which panics when it tries to exhaust the kmem_map. Fix this two ways: - Only honor MFI_IOC_PASSTHRU32 if the binary has the SV_ILP32 flag set, otherwise treat it as an unknown ioctl. - Add a bounds check on the buffer length passed by the user. For now it fails any user attempts to use a buffer larger than 1MB.
While here, fix a few other nits: - Remove an unnecessary check for a NULL return from malloc(M_WAITOK). - Use the ENOTTY errno for invalid ioctl commands instead of ENOENT.
|
239821 |
29-Aug-2012 |
jhb |
MFC 237338: Don't return an error if a kld does not contain any modules (e.g. a kld that only contained a sysctl). The kernel linker allows such modules, so the boot loader should not reject them.
|
239787 |
28-Aug-2012 |
jhb |
MFC 230782,237274: Refine the implementation of POSIX_FADV_NOREUSE to perform POSIX_FADV_DONTNEED requests on the currently accessed portion of the file on each read(2) or write(2) rather than using direct I/O. This gives much better performance including read-ahead and write clustering similar to normal read(2) and write(2) calls.
If subsequent read(2) and write(2) calls are sequential, then the POSIX_FADV_DONTNEED requests will cover the entire sequentially-accessed range.
|
239748 |
27-Aug-2012 |
jhb |
MFC 233040,233198,233870,234183: Add OFED and the associated options and drivers to x86 LINT builds: - Fix build with INET6 disabled. - Fix build of OFED bits with debugging options enabled. - Fix build on i386. - Mark 'sdp' as requiring 'inet'. - Always include "opt_inet.h" and "opt_inet6.h" and modify the IB driver Makefiles to honor WITH/WITHOUT_INET/INET6/_SUPPORT options to determine what should be enabled during a module build. - Fix the mlxen(4) driver and the core IB code to compile without if INET is disabled (including when both INET and INET6 are disabled).
|
239662 |
24-Aug-2012 |
jhb |
MFC 233872: Add descriptions after the 'device' line for several NICs to match the existing style.
|
239565 |
22-Aug-2012 |
mdf |
MFC r238502:
Fix a bug with memguard(9) on 32-bit architectures without a VM_KMEM_MAX_SIZE.
The code was not taking into account the size of the kernel_map, which the kmem_map is allocated from, so it could produce a sub-map size too large to fit. The simplest solution is to ignore VM_KMEM_MAX entirely and base the memguard map's size off the kernel_map's size, since this is always relevant and always smaller.
Found by: Justin Hibbits
|
239483 |
21-Aug-2012 |
marius |
MFC: r239079
Merge r236494 from x86:
Isolate the global TTE list lock from data and other locks to prevent false sharing within the cache.
|
238916 |
30-Jul-2012 |
jhb |
MFC 238164: Add another PS/2 keyboard PNP ID. This ID is listed as "Reserved by Microsoft" in the standard PNP ID table, but has been seen in the wild on at least one laptop.
Approved by: re (kib)
|
238904 |
30-Jul-2012 |
marius |
Pull the tier-2 card and change the sparc64 ZFS loader to no longer probe all diskN aliases for providers (which more or less corresponds to how the x86 version behaves) but instead probe only those listed in the boot-device OFW environment variable. This has the following advantages: - avoids otherwise unavoidable OFW warnings about failures to open disks for which aliases exist but no actual hardware is connected - avoids issues due to different diskN naming schemes - aligns us with Solaris
Approved by: re (kib)
|
238689 |
22-Jul-2012 |
marius |
MFC: r238621
Revert the use of BUS_DMA_ALLOCNOW when creating the DMA tag for user data introduced in r236061 (MFC'ed to stable/9 in r237186). Using that flag doesn't make that much sense on this case as the DMA maps using it are also created during sym_pci_attach(). Moreover, due to the maxsegsz parameter used, doing so may exhaust the bounce pages pool on architectures requiring bounce pages. [1] While at it, use a slightly more appropriate maxsegsz parameter.
PR: 169526 Submitted by: Mike Watters [1] Approved by: re (kib)
|
238586 |
18-Jul-2012 |
brueffer |
MFC: r238486
Fix typo in a message.
Approved by: re (hrs)
|
238047 |
03-Jul-2012 |
thompsa |
MFC r237852
Add the same check as vlan(4) where we ignore the ifnet departure event if the interface is just being renamed.
PR: kern/169557
|
238017 |
02-Jul-2012 |
marius |
MFC: r237547
Fix size of the bcopy when extracting ethernet address
Obtained from: DragonFly
|
238013 |
02-Jul-2012 |
marius |
MFC: r237546
Correct sizeof usage
Obtained from: DragonFly
|
238012 |
02-Jul-2012 |
marius |
MFC: r237842
Switch back to the 4BSD scheduler for now. There is some more or less recent regression with ULE, causing processes to get stuck in getblk as well as interrupt handler execution delays to rise above the command timeout of mpt(4).
|
237995 |
02-Jul-2012 |
bms |
Merge r237736 from HEAD: Kick the current-state report timer when a V1 group report would be triggered.
Submitted by: rpaulo@
|
237992 |
02-Jul-2012 |
bms |
Merge r237735 from HEAD: Fix a typo in MLD query exponent processing.
Submitted by: rpaulo@
|
237990 |
02-Jul-2012 |
bms |
Merge r237734 from HEAD: In MLDv2 general query processing, do not enforce the strict check on query origins.
Submitted by: Gu Yong
|
237839 |
30-Jun-2012 |
avg |
MFC r236503: free wdog_kern_pat calls in post-panic paths from under SW_WATCHDOG
|
237822 |
29-Jun-2012 |
jhb |
MFC 235024,235029,235556,235834,235845: Use MADT to match ACPI Processor objects to CPUs. MADT and DSDT/SSDTs may list CPUs in different orders, especially for disabled logical cores. Now we match ACPI IDs from the MADT with Processor objects, strictly order CPUs accordingly, and ignore disabled cores. This prevents us from executing methods for other CPUs, e. g., _PSS for disabled logical core, which may not exist. Unfortunately, it is known that there are a few systems with buggy BIOSes that do not have unique ACPI IDs for MADT and Processor objects. To work around these problems, 'debug.acpi.cpu_unordered' tunable is added. Set this to a non-zero value to restore the old behavior.
|
237815 |
29-Jun-2012 |
marius |
MFC: r236581
The loaddev environment variable is not modifiable once set, so it is not update for ZFS. It seems that this does not really affect anything except the help command. Nevertheless, rearrange things so loaddev is set only once in all cases in order to get it right. Pointed out by: avg
|
237805 |
29-Jun-2012 |
jhb |
MFC 233191: Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger than 4GB. Specifically, the inlined version of 'ptoa' of the the 'int' count of pages overflowed on 64-bit platforms. While here, change vm_object_madvise() to accept two vm_pindex_t parameters (start and end) rather than a (start, count) tuple to match other VM APIs as suggested by alc@.
|
237803 |
29-Jun-2012 |
jhb |
MFC 237334: Move the per-thread deferred user map entries list into a private list in vm_map_process_deferred() which is then iterated to release map entries. This avoids having a nested vm map unlock operation called from the loop body attempt to recuse into vm_map_process_deferred(). This can happen if the vm_map_remove() triggers the OOM killer.
|
237797 |
29-Jun-2012 |
jhb |
MFC 237008,237271,237272,237673: - Fix a couple of bugs that prevented windows in PCI-PCI bridges from growing "downward" (moving the start address down). First, an off by one error caused the end address to be moved down an extra alignment chunk unnecessarily. Second, when aligning the new candidate starting address, the wrong bits were masked off. - Add a 'wmask' variable to hold the expression '(1ul << w->step) - 1' in pcib_grow_window(). - For subtractively decoding bridges, don't try to grow windows but pass the request up the tree in order to be on the safe side. Growing windows in this case would mean to switch resources to positive decoding and it's unclear how to correctly handle this. At least with ALi/ULi M5249 PCI-PCI bridges, this also just doesn't work out of the box.
|
237771 |
29-Jun-2012 |
avg |
MFC r235390: zfs boot code: mark spa_t arguments as const where they are used as such
|
237770 |
29-Jun-2012 |
avg |
MFC r235392,235394,235395: fixes and cleanups for zfs boot MFC
|
237767 |
29-Jun-2012 |
avg |
MFC r235330: zfs boot: try to set vfs.root.mountfrom from currdev as a fallback
|
237766 |
29-Jun-2012 |
avg |
MFC r235329,235343,235361,235364: zfsboot/zfsloader: support accessing filesystems within a pool
|
237763 |
29-Jun-2012 |
avg |
MFC r235264: MFi386: improve argument passing via btxldr
|
237761 |
29-Jun-2012 |
avg |
MFC r235219: cdboot, pxeldr: make use of bootargs.h instead of redefining flag constants
|
237760 |
29-Jun-2012 |
avg |
MFC r235156: i386 zfsloader: rename LIBZFS to LIBZFSBOOT
|
237758 |
29-Jun-2012 |
avg |
MFC r235155: i386 boot: consolidate MAXBDDEV definition
|
237752 |
29-Jun-2012 |
avg |
MFC r235153: sys/boot: add common CTASSERT definition
|
237731 |
28-Jun-2012 |
jhb |
MFC 228161,230774,230822,236415: Add a new -e flag to pciconf(8)'s list mode to display PCI error details. Currently this dumps the status of any error bits in the PCI status register and PCI-express device status register. It also lists any errors indicated by version 1 of PCI-express Advanced Error Reporting (AER).
|
237727 |
28-Jun-2012 |
jhb |
MFC 236405: Remove unnecessary initializations. The BSS of boot2 is in fact zero'd when boot2 begins execution by the _start() routine in btxcsu.S.
|
237725 |
28-Jun-2012 |
jhb |
MFC 236404: Extend VERBOSE_SYSINIT to also print out the name of variables passed to SYSINIT routines if they can be resolved via symbol look up in DDB. To avoid false positives, only honor a name if the symbol resolves exactly to the pointer value (no offset).
|
237719 |
28-Jun-2012 |
jhb |
MFC 234494: Include the associated wait channel message for context switch ktrace records. kdump supports both the old and new messages.
|
237670 |
27-Jun-2012 |
thompsa |
MFC r236178
if_lagg: allow to invoke SIOCSLAGGPORT multiple times in a row
|
237669 |
27-Jun-2012 |
thompsa |
MFC r236062
Turn LACP debugging from a compile time option to a sysctl, it is very handy to be able to turn it on when negotiation to a switch misbehaves.
|
237663 |
27-Jun-2012 |
jhb |
MFC 233925,236357: Add new ktrace records for the start and end of VM faults. This gives a pair of records similar to syscall entry and return that a user can use to determine how long page faults take. The new ktrace records are enabled via the 'p' trace type, but are not enabled in the default set of trace points.
|
237543 |
25-Jun-2012 |
rmacklem |
MFC: r237244 Fix the NFSv4 client for the case where mmap'd files are written, but not msync'd by a process. A VOP_PUTPAGES() called when VOP_RECLAIM() happens will usually fail, since the NFSv4 Open has already been closed by VOP_INACTIVE(). Add a vm_object_page_clean() call to the NFSv4 client's VOP_INACTIVE(), so that the write happens before the NFSv4 Open is closed. kib@ suggested using vgone() instead and I will explore this, but this patch fixes things in the meantime. For some reason, the VOP_PUTPAGES() is still attaempted in VOP_RECLAIM(), but having this fail doesn't cause any problems except a "stateid0 in write" being logged.
|
237534 |
24-Jun-2012 |
rmacklem |
MFC: r237200 Move the nfsrpc_close() call in ncl_reclaim() for the NFSv4 client to below the vnode_destroy_vobject() call, since that is where writes are flushed.
|
237491 |
23-Jun-2012 |
marius |
MFC: r231616, r232497, r234337
Add __aeabi_read_tp function required for thread-local storage.
|
237444 |
22-Jun-2012 |
gnn |
MFC 230063 Clean up a switch statement for uncore events on Westmere processors.
Submitted by: Davide Italiano Reviewed by: gnn
|
237388 |
21-Jun-2012 |
marius |
MFC: r231617
Add ARM relocations types used for thread-local storage
Reviewed by: cognet
|
237386 |
21-Jun-2012 |
marius |
MFC: r235348, r236191, r236497
Add glue/support for the SAM9XE512-based Ethernut 5 boards. Currently, all integrated and on-board peripherals except NAND Flash (missing NAND framework/integration) are working.
|
237384 |
21-Jun-2012 |
marius |
MFC: r236496
- Loop up to 3 seconds when waiting for a device to get ready. [1] - Make the device description match the driver name. - Identify the chip variant based on the JEDEC and use that information to use the proper values for page count, offset and size instead of hardcoding a AT45DB642x with 2^N byte page support disabled. - Take advantage of bioq_takefirst(). - Given that CONTINUOUS_ARRAY_READ_HF (0x0b) command isn't even mentioned in Atmel's DataFlash Application Note, as suggested by the previous comment may not work on all all devices and actually doesn't properly on at least AT45DB321D (JEDEC 0x1f2701), rewrite at45d_task() to use CONTINUOUS_ARRAY_READ (0xe8) for reading instead. This rewrite is laid out in a way allowing to easily add support for BIO_DELETE later on. - Add support for reads and writes not starting on a page boundary. - Verify the flash content after writing. - Let at45d_task() gracefully handle errors on SPI transfers and the device not becoming ready afterwards again. [1] - Use DEVMETHOD_END. [1] - Use NULL instead of 0 for pointers. [1]
Additional testing by: Ian Lepore
Submitted by: Ian Lepore [1]
|
237382 |
21-Jun-2012 |
marius |
MFC: r237239
Revert the part of r236495 (MFC'ed to stable/9 in r237095) that introduced checking of SPI_SR_TXEMPTY for TX transfer completion as for reasons unknown this occasionally causes SPI_SR_RXBUFF and SPI_SR_ENDRX to not rise. In any case, once the RX part of the transfer is done it's obvious that the preceding TX part had finished and checking of SPI_SR_TXEMPTY was introduced to rule out a possible cause for the data corruption mentioned in r236495 but which didn't turn out to be the problem anyway.
|
237380 |
21-Jun-2012 |
marius |
MFC: r230242, r237102, r237236
- Add support for the FT2232 based egnite Turtelizer 2 JTAG/RS232 Adapter. This includes adding support for skipping FTDI interfaces used for JTAG leaving them for userland and just attaching to the RS232 half, similarly to how the corresponding Linux drivers handles these kind of adapters. While at it, sort uftdi_devs and return BUS_PROBE_SPECIFIC (because uftdi_probe() alters the instance variables for better or worse as do other probe routines of USB drivers) instead of 0. - Remove duplicated entries for BeagleBone. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. - Remove some stray lines.
|
237352 |
21-Jun-2012 |
mckusick |
MFC of 236937
In softdep_setup_inomapdep() we may have to allocate both inodedep and bmsafemap dependency structures in inodedep_lookup() and bmsafemap_lookup() respectively. The setup of these structures must be done while holding the soft-dependency mutex. If the inodedep is allocated first, it may be freed in the I/O completion callback when the mutex is released to allocate the bmsafemap. If the bmsafemap is allocated first, it may be freed in the I/O completion callback when the mutex is released to allocate the inodedep.
To resolve this problem, bmsafemap_lookup has had a parameter added that allows a pre-malloc'ed bmsafemap to be passed in so that it does not need to release the mutex to create a new bmsafemap. The softdep_setup_inomapdep() routine pre-malloc's a bmsafemap dependency before acquiring the mutex and starting to build the inodedep with a call to inodedep_lookup(). The subsequent call to bmsafemap_lookup() is passed this pre-allocated bmsafemap entry so that it need not release the mutex if it needs to create a new one.
Reported by: Peter Holm Tested by: Peter Holm
|
237351 |
21-Jun-2012 |
mckusick |
MFC of 236825
When synchronously syncing a device (MNT_WAIT), wait for buffers to become available. Otherwise we may excessively spin and fail with ``fsync: giving up on dirty''.
Reviewed by: kib Tested by: Peter Holm
|
237343 |
20-Jun-2012 |
rnoland |
MFC r236246
Add device ids for the Winbond 83627DHG-P chip and set the registers to trigger the keyboard reset line on timeout.
|
237342 |
20-Jun-2012 |
rnoland |
MFC r236245
Fix a typo in wbwd so that CRF5 is actually written to the data register rather than the index register.
|
237209 |
17-Jun-2012 |
mjacob |
MFC of 237135
If debug values were set, the default from tval floated down and triggered an attempt to set multiple virtual ports whether you wanted them or not.
|
237208 |
17-Jun-2012 |
mjacob |
MFC of r236427
Clean up and complete the incomplete deferred enable code. Make the default role NONE if target mode is selected. This allows ctl(8) to switch to/from target mode via knob settings. If we default to role 'none', this causes a reset of the 24XX f/w which then causes initiators to wake up and notice when we come online.
|
236655 |
06-Jun-2012 |
eadler |
MFC r236379: Adding missing dependancies for loading hptiop(4), hptmv(4) and isp(4) as modules.
PR: kern/166239 Approved by: cperciva (implicit)
|
235743 |
21-May-2012 |
jhb |
Toss bogus mergeinfo.
|
235738 |
21-May-2012 |
sbruno |
MFC r235634
Fix and update battery status bits according to linux driver
|
232140 |
25-Feb-2012 |
marius |
MFC: r231985
Fix memset sizeof
|
230019 |
12-Jan-2012 |
mav |
MFC r228461: Fix few bugs in isp(4) target mode support: - in destroy_lun_state() assert hold == 1 instead of 0, as it should receive hold taken by the create_lun_state() or get_lun_statep() before; - fix hold count leak inside rls_lun_statep() that also fired above assert; - in destroy_lun_state() use SIM bus number instead of SIM path id for ISP_GET_PC_ADDR(), as it was before r196008; - make isp_disable_lun() to set status in CCB; - make isp_target_mark_aborted() set status into the proper CCB.
Reviewed by: mjacob Sponsored by: iXsystems, inc.
|
229461 |
04-Jan-2012 |
eadler |
MFC r227458, r226436:
- change "is is" to "is" or "it is" - change "the the" to "the" - other typo fixes
Approved by: lstewart
|
226303 |
12-Oct-2011 |
marius |
MFC r226118:
Sync with ahc(4)/ahd(4)/sym(4) etc: Zero any sense not transferred by the device as the SCSI specification mandates that any untransferred data should be assumed to be zero.
Reviewed by: ken Approved by: re (kib)
|
226067 |
06-Oct-2011 |
ken |
MFC r225950:
Add descriptor sense support to CAM, and honor sense residuals properly in CAM.
Desriptor sense is a new sense data format that originated in SPC-3. Among other things, it allows for an 8-byte info field, which is necessary to pass back block numbers larger than 4 bytes.
This change adds a number of new functions to scsi_all.c (and therefore libcam) that abstract out most access to sense data.
This includes a bump of CAM_VERSION, because the CCB ABI has changed. Userland programs that use the CAM pass(4) driver will need to be recompiled.
camcontrol.c: Change uses of scsi_extract_sense() to use scsi_extract_sense_len().
Use scsi_get_sks() instead of accessing sense key specific data directly.
scsi_modes: Update the control mode page to the latest version (SPC-4).
scsi_cmds.c, scsi_target.c: Change references to struct scsi_sense_data to struct scsi_sense_data_fixed. This should be changed to allow the user to specify fixed or descriptor sense, and then use scsi_set_sense_data() to build the sense data.
ps3cdrom.c: Use scsi_set_sense_data() instead of setting sense data manually.
cam_periph.c: Use scsi_extract_sense_len() instead of using scsi_extract_sense() or accessing sense data directly.
cam_ccb.h: Bump the CAM_VERSION from 0x15 to 0x16. The change of struct scsi_sense_data from 32 to 252 bytes changes the size of struct ccb_scsiio, but not the size of union ccb. So the version must be bumped to prevent structure mis-matches.
scsi_all.h: Lots of updated SCSI sense data and other structures.
Add function prototypes for the new sense data functions.
Take out the inline implementation of scsi_extract_sense(). It is now too large to put in a header file.
Add macros to calculate whether fields are present and filled in fixed and descriptor sense data
scsi_all.c: In scsi_op_desc(), allow the user to pass in NULL inquiry data, and we'll assume a direct access device in that case.
Changed the SCSI RESERVED sense key name and description to COMPLETED, as it is now defined in the spec.
Change the error recovery action for a number of read errors to prevent lots of retries when the drive has said that the block isn't accessible. This speeds up reconstruction of the block by any RAID software running on top of the drive (e.g. ZFS).
In scsi_sense_desc(), allow for invalid sense key numbers. This allows calling this routine without checking the input values first.
Change scsi_error_action() to use scsi_extract_sense_len(), and handle things when invalid asc/ascq values are encountered.
Add a new routine, scsi_desc_iterate(), that will call the supplied function for every descriptor in descriptor format sense data.
Add scsi_set_sense_data(), and scsi_set_sense_data_va(), which build descriptor and fixed format sense data. They currently default to fixed format sense data.
Add a number of scsi_get_*() functions, which get different types of sense data fields from either fixed or descriptor format sense data, if the data is present.
Add a number of scsi_*_sbuf() functions, which print formatted versions of various sense data fields. These functions work for either fixed or descriptor sense.
Add a number of scsi_sense_*_sbuf() functions, which have a standard calling interface and print the indicated field. These functions take descriptors only.
Add scsi_sense_desc_sbuf(), which will print a formatted version of the given sense descriptor.
Pull out a majority of the scsi_sense_sbuf() function and put it into scsi_sense_only_sbuf(). This allows callers that don't use struct ccb_scsiio to easily utilize the printing routines. Revamp that function to handle descriptor sense and use the new sense fetching and printing routines.
Move scsi_extract_sense() into scsi_all.c, and implement it in terms of the new function, scsi_extract_sense_len(). The _len() version takes a length (which should be the sense length - residual) and can indicate which fields are present and valid in the sense data.
Add a couple of new scsi_get_*() routines to get the sense key, asc, and ascq only.
mly.c: Rename struct scsi_sense_data to struct scsi_sense_data_fixed.
sbp_targ.c: Use the new sense fetching routines to get sense data instead of accessing it directly.
sbp.c: Change the firewire/SCSI sense data transformation code to use struct scsi_sense_data_fixed instead of struct scsi_sense_data. This should be changed later to use scsi_set_sense_data().
ciss.c: Calculate the sense residual properly. Use scsi_get_sense_key() to fetch the sense key.
mps_sas.c, mpt_cam.c: Set the sense residual properly.
iir.c: Use scsi_set_sense_data() instead of building sense data by hand.
iscsi_subr.c: Use scsi_extract_sense_len() instead of grabbing sense data directly.
umass.c: Use scsi_set_sense_data() to build sense data.
Grab the sense key using scsi_get_sense_key().
Calculate the sense residual properly.
isp_freebsd.h: Use scsi_get_*() routines to grab asc, ascq, and sense key values.
Calculate and set the sense residual.
Approved by: re (kib) Sponsored by: Spectra Logic Corporation
|
225736 |
23-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
224856 |
13-Aug-2011 |
mjacob |
Most of these changes to isp are to allow for isp.ko unloading. We also revive loop down freezes. We also externaliz within isp isp_prt_endcmd so something outside the core module can print something about a command completing. Also some work in progress to assist in handling timed out commands better.
Partially Sponsored by: Panasas Approved by: re (kib) MFC after: 1 month
|
224804 |
12-Aug-2011 |
mjacob |
Fixes zombie device and loop down timers so that they work more than once. Use taskqueues to do the actual work.
Fix an offset line.
Fix isp_prt so that prints from just one buffer, which makes it appear cleanly cleanly in logs on SMP systems.
Approved by: re (kib) MFC after: 1 month
|
219471 |
11-Mar-2011 |
mjacob |
Add support QLE220 card- an 2500 lookalike.
Obtained mostly from: Roman && Konstantin MFC after: 1 week
|
219282 |
05-Mar-2011 |
mjacob |
Flush both reads *and* writes to registers.
Obtained from: Miod Vallat in OpenBSD MFC after: 1 week
|
219098 |
28-Feb-2011 |
mjacob |
Sync FreeBSD ISP with mercurial tree. Minor changes having to do with a macro for minima.
|
218691 |
14-Feb-2011 |
marius |
- Use the correct DMA tag/map pair for synchronize the FC scratch area. - Allocate coherent DMA memory for the request/response queue area and and the FC scratch area.
These changes allow isp(4) to work properly on sparc64 with usage of the IOMMU streaming buffers enabled.
Approved by: mjacob MFC after: 2 weeks
|
215951 |
27-Nov-2010 |
mjacob |
Partially revert 208119. We were overwriting tunable settings.
Obtained from: Oleg Sharoyko MFC after: 1 week
|
215034 |
09-Nov-2010 |
brucec |
Fix typos.
PR: bin/148894 Submitted by: olgeni
|
208997 |
10-Jun-2010 |
mjacob |
Don't pass a buffer directly as a printflike format string. Found by: clang MFC after: 1 month
|
208895 |
07-Jun-2010 |
mjacob |
Fix XPT_GET_TRAN_SETTING for FC which has been broken for while so that it will figure out the correct target to handle index and be able to find things like WWPN, etc.
MFC after: 2 weeks
|
208849 |
05-Jun-2010 |
mjacob |
Be more specific about which CDB length we're going to use. Not really a likely bug but we might as well be clearer.
Found with: Coverity Prevent(tm) CID: 3981
MFC after: 2 weeks
|
208809 |
05-Jun-2010 |
mjacob |
Make the internal target > SPC2 (so REPORT LUNS can be tested). Give the NIL inquiry data real values other than just plain 0x7f in the first byte.
MFC after: 2 weeks
|
208808 |
05-Jun-2010 |
mjacob |
I was getting panics in sleepq_add for the second sleep in isp_kthread. I don't know why- but it occurred to me in looking at the second sleep is that all I want is a pause- not an actual sleep. So do that instead.
MFC after: 2 weeks
|
208761 |
02-Jun-2010 |
mjacob |
Various minor and not so minor fixes suggested by Coverity. In at least one case, it's amazing that target mode worked at all.
Found by: Coverity. MFC after: 2 weeks
|
208582 |
26-May-2010 |
mjacob |
Add a new primitive, XPT_SCAN_TGT, to cover the range between scanning a whole bus (XPT_SCAN_BUS) and a single lun on that bus (XPT_SCAN_LUN).
It's less resource comsumptive than scanning a whole bus when the caller knows only one target has changes.
Reviewed by: scsi@ Sponsored by: Panasas MFC after: 1 month
|
208548 |
25-May-2010 |
mjacob |
Don't leak CCBs for every ABORT.
Submitted by: Ken Merry MFC after: One week
|
208543 |
25-May-2010 |
mjacob |
Remove extra break left by hand editing.
X-MFC: 208542 MFC after: One Month
|
208542 |
25-May-2010 |
mjacob |
Treat PRLI the same as PLOGI and make a database entry for it (target mode).
Obtained from: Ken Merry MFC after: One Month
|
208129 |
16-May-2010 |
mjacob |
Correct compilation error introduced in last commit.
X-MFC: 208119 MFC after: 1 week Sponsored By: Panasas Pointy Hat to: Me Noticed by: Rob
|
208119 |
15-May-2010 |
mjacob |
Whap. Hook up some wires that were forgotten a few months ago and restore the zombie device timeout code and the loop down time code and the fabric hysteresis code. MFC after: 1 week Sponsored By: Panasas
|
207579 |
03-May-2010 |
marius |
On sparc64 obtain the initiator ID from the Open Firmware device tree in order to match what the PROM built-in driver uses.
Approved by: mjacob
|
205712 |
26-Mar-2010 |
mjacob |
D'oh- isp_handle_index' logic was reversed (not used in FreeBSD).
MFC after: 1 week
|
205698 |
26-Mar-2010 |
mjacob |
Clean up some printing stuff so that we can have a bit finer control on debug output. Add a new platform function requirement to allow for printing based upon the ITL nexus instead of the isp unit plus channel, target and lun. This allows some printouts and error messages from the core code to appear in the same format as the platform's subsystem (in FreeBSD's case, CAM path).
MFC after: 1 week
|
205236 |
17-Mar-2010 |
mjacob |
Put gone device timer into a structure tag that can hold more than 32 seconds. Oops.
Untangle some of the confusion about what role means when it's in the FCPARAM/SDPARAM or isp_fc/isp_spi structures. This fixed a problem about seeing targets appear if you've turned off autologin and find them, or rather don't, via camcontrol rescan.
MFC after: 1 month
|
204397 |
27-Feb-2010 |
mjacob |
Revamp the pieces of some of the stuff I forgot to do when shifting to 32 bit handles. The RIO (reduced interrupt operation) and fast posting for the parallel SCSI cards were all 16 bit handles. Furthermore, target mode parallel SCSI only can have 16 bit handles.
Use part of a supplied patch to switch over to using 32 bit handles. Be a bit more conservative here and only do this for parallel SCSI for the 12160 (Ultra3) cards. There were a lot of marginal Ultra2 cards, and, frankly, few are findable now for testing.
Fix the target handle routine to only do 16 bit handles for parallel SCSI cards. This is okay because the upper sixteen bits of the new 32 bit handles is a sequence number to help protect against duplicate completions. This would be very unlikely to happen with parallel SCSI target mode, and wasn't present before, so we're no worse off than we used to be.
While we're at it, finally split the async mailbox completion handlers into FC and parallel SCSI functions. This makes it much cleaner and easier to figure out what is or isn't a legal async mailbox completion code for different card classes.
PR: kern/144250 Submitted partially by: Charles D MFC after: 1 week
|
204384 |
27-Feb-2010 |
mjacob |
Fix misallocation error in target mode.
MFC after: 1 day
|
204246 |
23-Feb-2010 |
mjacob |
xpt_rescan only honors a wildcard in the target field. Revert the previous change and have isp_make_here scan the whole bus which will then scan all luns.
I think xpt_rescan needs to be fixed, but that's a separable issue.
Suggested by: Alexander
|
204231 |
23-Feb-2010 |
mjacob |
When we rescan, just scan from logical unit 0. In other words, don't specify a wildcard lun here.
This unbreaks disk re-arrival.
MFC after: 2 days
|
204050 |
18-Feb-2010 |
mjacob |
Don't try and re-use a handle, even if the firmware tells you that's what is logged in.
PR: kern/144026 MFC after: 1 week
|
203478 |
04-Feb-2010 |
mjacob |
Yet another target mode compilation error.
|
203463 |
04-Feb-2010 |
mjacob |
Fix target mode compilation problem with previous delta
|
203444 |
03-Feb-2010 |
mjacob |
Redo how commands handles are created and managed and implement sequence numbers and handle types in rational way. This will better protect from (unwittingly) dealing with stale handles/commands.
Fix the watchdog timeout code to better protect itself from mistakes.
If we run an abort on a putatively timed out command, the command may in fact get completed, so check to make sure the command we're timing it out is still around. If the abort succeeds, btw, the command should get returned via a different path.
|
202418 |
15-Jan-2010 |
mjacob |
Amazingly we've been freeing a handle and using that which it refers to for years. Bad!
MFC after: 1 week
|
201758 |
07-Jan-2010 |
mbr |
Remove extraneous semicolons, no functional changes.
Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
|
201408 |
03-Jan-2010 |
mjacob |
Make sure that the WWNN is also created for 2100..2300 cards. MFC after: 1 day
|
201325 |
31-Dec-2009 |
mjacob |
Create a Node WWN from the *Port* WWN, not vice versa, for 2400s.
If the NAA is type 2, the Node WWN is the Port WWN with the 12 bits of port (48..60) cleared. This iff a wwn fetched from NVRAM is zero.
MFC after: 1 week
|
200089 |
04-Dec-2009 |
mjacob |
Fix cases where we've managed to get a Loop UP event prior to initializing the loop down counter, as well as other things. This was brought to my attention with a different fix, more for RELENG_7- this one covers the multiple channel case.
PR: 140438 MFC after: 1 month
|
198822 |
02-Nov-2009 |
mjacob |
Unbreak SBus cards which have been broken (apparently) for a while. Most of the pieces came from Marius- correct settings for channels and resource management. The one piece missing was that you cannot for SBus cards replace 32 bit operations with A64 operations- not supported.
Submitted by: marius MFC after: 3 days
|
197373 |
21-Sep-2009 |
mjacob |
(semiforced commit to add comment missed in last delta) Add a maximum response length for FCP RSPNS IUs.
Clarify some of the FC option words for setting parameters and try and disable automatic PRLI when in target mode- this should correct some cases of N-port topologies with 23XX cards where we put out an illegal PRLI (in target mode only we're not supposed to put out a PRLI).
|
197372 |
21-Sep-2009 |
mjacob |
Remove file unused in freebsd.
|
197214 |
15-Sep-2009 |
mjacob |
Accomodate old style XPT_IMMED_NOTIFY and XPT_NOTIFY_ACK so that we at least don't panic.
We don't really support dual role mode (INITIATOR/TARGET) any more. We should but it's broken and will take a fair amount of effort to fix and correctly manage both initiator and target roles sharing the port database. So, for now, disallow it.
|
196162 |
13-Aug-2009 |
mjacob |
Have at least *some* default WWN to fall back on, otherwise Sun branded FC cards won't configure.
Reviewed by: Ken, Scott Approved by: re
|
196008 |
01-Aug-2009 |
mjacob |
Add 8Gb support (isp_2500). Fix a fair number of configuration and firmware loading bugs.
Target mode support has received some serious attention to make it more usable and stable.
Some backward compatible additions to CAM have been made that make target mode async events easier to deal with have also been put into place.
Further refinement and better support for NP-IV (N-port Virtualization) is now in place.
Code for release prior to RELENG_7 has been stripped away for code clarity.
Sponsored by: Copan Systems
Reviewed by: scottl, ken, jung-uk kim Approved by: re
|
195534 |
10-Jul-2009 |
scottl |
Separate the parallel scsi knowledge out of the core of the XPT, and modularize it so that new transports can be created.
Add a transport for SATA
Add a periph+protocol layer for ATA
Add a driver for AHCI-compliant hardware.
Add a maxio field to CAM so that drivers can advertise their max I/O capability. Modify various drivers so that they are insulated from the value of MAXPHYS.
The new ATA/SATA code supports AHCI-compliant hardware, and will override the classic ATA driver if it is loaded as a module at boot time or compiled into the kernel. The stack now support NCQ (tagged queueing) for increased performance on modern SATA drives. It also supports port multipliers.
ATA drives are accessed via 'ada' device nodes. ATAPI drives are accessed via 'cd' device nodes. They can all be enumerated and manipulated via camcontrol, just like SCSI drives. SCSI commands are not translated to their ATA equivalents; ATA native commands are used throughout the entire stack, including camcontrol. See the camcontrol manpage for further details. Testing this code may require that you update your fstab, and possibly modify your BIOS to enable AHCI functionality, if available.
This code is very experimental at the moment. The userland ABI/API has changed, so applications will need to be recompiled. It may change further in the near future. The 'ada' device name may also change as more infrastructure is completed in this project. The goal is to eventually put all CAM busses and devices until newbus, allowing for interesting topology and management options.
Few functional changes will be seen with existing SCSI/SAS/FC drivers, though the userland ABI has still changed. In the future, transports specific modules for SAS and FC may appear in order to better support the topologies and capabilities of these technologies.
The modularization of CAM and the addition of the ATA/SATA modules is meant to break CAM out of the mold of being specific to SCSI, letting it grow to be a framework for arbitrary transports and protocols. It also allows drivers to be written to support discrete hardware without jeopardizing the stability of non-related hardware. While only an AHCI driver is provided now, a Silicon Image driver is also in the works. Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware is possible and encouraged. Help with new transports is also encouraged.
Submitted by: scottl, mav Approved by: re
|
191979 |
10-May-2009 |
marius |
Change uses of the struct ccb_hdr timeout_ch missed when isp(4) was adapted to MPSAFE cam(4) to a isp(4) specific callout structure. Thanks to Florian Smeets for providing access to a machine exhibiting this problem for debugging.
Approved by: mjacob MFC after: 3 days
|
186140 |
15-Dec-2008 |
marius |
Don't try reading the SXP_PINS_DIFF on the 10160 and 12160 SCSI controllers. Reading this register, for which there are indications that it doesn't really exist, returns 0 on at least some 12160 and doing so on Sun Fire V880 causes a data access error exception.
Reported and tested by: Beat Gaetzi Approved by: mjacob Obtained from: OpenBSD (modulo setting isp_lvdmode)
|
183397 |
27-Sep-2008 |
ed |
Replace all calls to minor() with dev2unit().
After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere.
This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware.
Reviewed by: kib
|
173359 |
05-Nov-2007 |
scottl |
Add missing locking for SBus controllers.
|
172836 |
20-Oct-2007 |
julian |
Rename the kthread_xxx (e.g. kthread_create()) calls to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first.
I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls.
|
172568 |
12-Oct-2007 |
kevlo |
Spelling fix for interupt -> interrupt
|
171997 |
28-Aug-2007 |
jkim |
Fix off-by-two errors. Both WWNN and WWPN are 64-bit unsigned integers and they are prefixed with "0x", which requires two more bytes each.
Submitted by: Danny Braniss (danny at cs dot huji dot ac dot il) via Matthew Jacob (lydianconcepts at gmail dot com) Approved by: re (bmah) MFC after: 3 days
|
171936 |
23-Aug-2007 |
jkim |
Export 4Gbps Fibre Channel link speed correctly with inquiry commands.
Approved by: re (kensmith) MFC after: 3 days
|
171337 |
10-Jul-2007 |
mjacob |
Get rid of a couple of Coverity found sign comparison errors.
Approved by: re (Ken) MFC after: 3 days
|
171336 |
10-Jul-2007 |
mjacob |
Be more conservative- turn off fast posting and RIO for 22XX cards.
Approved by: re (ken) MFC after: 3 days
|
171159 |
02-Jul-2007 |
mjacob |
Recover from some major omissions/problems with the 24XX port. First, we were never correctly checking for a 24XX Status Type 0 response- that cased us to fall through to evaluate status for commands as if this were a 2100/2200/2300 Status Type 0 response. This is *close*, but not quite the same. This has been reported to be apparent with some wierd lun configuration problems with some arrays. It became glaringly apparent on sparc64 where none of the correct byte swap things were done.
Fixing this omission then caused a whole universe shifting debug cycle of endian issues for the 2400. The manual for 24XX f/w turns out to be wrong about the endianness of a couple of entities. The lun and cdb fields for the type 7 request are *not* unconditionally big endian- they happen to be opposite of whatever the endian of the current machine type is. Same with the sense data for the 24XX type 0 response.
While we're at it investigate and resolve some NVRAM endian issues.
Approved by: re (ken) MFC after: 3 days
|
171057 |
26-Jun-2007 |
mjacob |
Pointy hat to me. Committed with building.
Approved by: re (ken, implicit)
|
171051 |
26-Jun-2007 |
mjacob |
Extension of previous commit- when we have 2k login firmware, we need to put out a ispreqt2e_t structure onto the request queue- not a ispreqt2_t structure. I forgot that the 23XX can use a t2 structure.
Approved by: re (ken, implicitly) MFC after: 3 days
|
171028 |
25-Jun-2007 |
mjacob |
Yet another bug- when we have 2k login firmware, we need to put out a ispreqt3e_t structure onto the request queue- not a ispreqt3_t structure. We weren't. This turns out only to really matter for big endian machines.
Approved by: re (ken) MFC after: 3 days
|
171014 |
24-Jun-2007 |
mjacob |
If we're going to (for 23XX and 24XX cards) DMA firmware from the request queues rather than shove it down a word at a time, we have to remember to put it into little endian format. Use the macros ISP_IOXPUT_{16,32} for this purpose. Otherwise, on sparc the firmware is loaded garbled and we get a (not surprisingly) firmware checksum failure and the card won't start and we don't attach it.
Approved by: re (bruce) MFC after: 3 days
|
170872 |
17-Jun-2007 |
scottl |
Prepare for future integration between CAM and newbus. xpt_bus_register now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE.
|
170570 |
11-Jun-2007 |
mjacob |
Remove some ioctls that were ill-thought out. There is no user impact as no softwware using these ioctls was ever committed.
Redo locking for ispioctl.
|
170563 |
11-Jun-2007 |
mjacob |
Only try and set a segment lim size to 1 << 32 iff bus_size_t > 4.
|
170412 |
08-Jun-2007 |
mjacob |
Quiet GCC 4.2 warning.
|
169530 |
13-May-2007 |
mjacob |
Temp workaround for config_intrhook_establish running the hook right away.
|
169472 |
11-May-2007 |
mjacob |
Bad merge.
|
169459 |
11-May-2007 |
mjacob |
Fix pointy-hat problem with BUS_DMA_ROOTARG macro that caused problems for sparc64. Candidate for immediate MFC.
Noticed by: Everyone-maxim contacted.
|
169292 |
05-May-2007 |
mjacob |
Make this an MP safe driver but also still be multi-release. 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
|
168831 |
18-Apr-2007 |
scottl |
Revert a driver API change to xpt_alloc_ccb that isn't necessary. Fix a couple of associated error checks.
|
168752 |
15-Apr-2007 |
scottl |
Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down.
The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled.
|
168240 |
02-Apr-2007 |
mjacob |
Temporarily desupport simultaneous target and initiator mode.
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.
|
168160 |
31-Mar-2007 |
mjacob |
Fix compilation problem (add a const) for pre-7.0 compiles.
|
168030 |
29-Mar-2007 |
mjacob |
some minor error message cleanups
|
167992 |
28-Mar-2007 |
mjacob |
Don't derference a pointer before setting it. Very Pointy Dunce Cap T o: me. Submitted by: Marcel MFC after: 3 days
|
167821 |
22-Mar-2007 |
mjacob |
MFP4: a) Some constification from NetBSD (gcc 4.1.2) b) Split default param fetching/setting into scsi and fibre functions and retry the fibre fetch more than once.
MFC after: 1 week
|
167521 |
14-Mar-2007 |
mjacob |
Don't call isp_intr from isp_start- this seems to, in rare cases, cause confusion with at least the 23XX chipsets where the output queue index pointer just gets a bit whacko.
MFC after: 1 day
|
167501 |
13-Mar-2007 |
mjacob |
Move bus_space_tag and bus_space_handle register access 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
|
167500 |
13-Mar-2007 |
mjacob |
Restore optr if you trash it for 24XX target mode.
MFC after: 3 days
|
167473 |
12-Mar-2007 |
mjacob |
Fix compilation issues found in RELENG_4 port and merge the diffs back to -current to keep versions identical.
|
167403 |
10-Mar-2007 |
mjacob |
Fix some stupid copyright mistakes that have been there for quite some time.
|
166935 |
23-Feb-2007 |
mjacob |
Redo previous newbus related change to be kinder to multi-release support.
|
166929 |
23-Feb-2007 |
mjacob |
Don't attempt to load illegal hard loop addresses into an ICB. This shows up on card restarts, and usually for 2200-2300 cards. What happens is that we start up, attempting to acquire a hard address. We end up instead being an F-port topology, which reports out a loop id of 0xff (or 0xffff for 2K Login f/w). Then, if we restart, we end up telling the card to go off an acquire this loop address, which the card then rejects. Bah.
Compilation fixes from Solaris port.
|
166901 |
23-Feb-2007 |
piso |
o break newbus api: add a new argument of type driver_filter_t to 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@
|
166897 |
23-Feb-2007 |
mjacob |
Use the new xpt_rescan function to truly now have dynamic attachment of new devices that arrive (and we notice them via async Fibre Channel events). We've always had the right thing (of sorts) happen when devices go away- this is the corollary function that makes multipath failover actually work.
MFC after: 2 weeks
|
166895 |
23-Feb-2007 |
mjacob |
There is a problem in setting/getting 'options'- if we check things early, we haven't set board type, so we can't correctly check for some options. Fix this by splitting option setting/getting into generic, pci and then later board specific, option setting/getting.
This was noticed when setting 'iid' (or 'hard loop id') didn't work all of a sudden.
Noticed by: Mike Drangula (thanks!) via Jung-uk Kim (thanks!)
|
166894 |
23-Feb-2007 |
mjacob |
Be a bit more restrictive about printing out 'bad' pdb entries during loop rescans. They're not bad so much as unstable, so don't print this stuff out unless ISP_LOGSANCFG is set.
|
166756 |
15-Feb-2007 |
luigi |
Cleanup and document the implementation of firmware(9) based on a version that i posted earlier on the -current mailing list, and subsequent feedback received.
The core of the change is just in sys/firmware.h and kern/subr_firmware.c, while other files are just adaptation of the clients to the ABI change (const-ification of some parameters and hiding of internal info, so this is fully compatible at the binary level).
In detail: - reduce the amount of information exported to clients in struct firmware, and constify the pointer;
- internally, document and simplify the implementation of the various functions, and make sure error conditions are dealt with properly.
The diffs are large, but the code is really straightforward now (i hope).
Note also that there is a subtle issue with the implementation of firmware_register(): currently, as in the previous version, we just store a reference to the 'imagename' argument, but we should rather copy it because there is no guarantee that this is a static string. I realised this while testing this code, but i prefer to fix it in a later commit -- there is no regression with respect to the past.
Note, too, that the version in RELENG_6 has various bugs including missing locks around the module release calls, mishandling of modules loaded by /boot/loader, and so on, so an MFC is absolutely necessary there. I was just postponing it until this cleanup to avoid doing things twice.
MFC after: 1 week
|
166615 |
10-Feb-2007 |
mjacob |
add a missing piece for 2432
|
166614 |
10-Feb-2007 |
mjacob |
Putative untested 2432 (PCI-E) support.
|
166177 |
23-Jan-2007 |
mjacob |
Clean up some of the various platform and release specific dma tag stuff so it is centralized in isp_freebsd.h.
Take out PCI posting flushed in qla2100/2200 register reads except for 2100s.
|
166165 |
21-Jan-2007 |
marius |
Change the remainder of the drivers for DMA'ing devices enabled in the 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...).
|
166127 |
20-Jan-2007 |
mjacob |
Grumble- let a linux-ism slip in and had an llx which then choked on a 64 bit platforms. Oops.
|
166120 |
20-Jan-2007 |
mjacob |
MFP4: Move default setting to the end of isp_reset instead of the front of isp_init so we can read NVRAM even if we're role ISP_NONE. Prepare for reintroduction of channels (for FC) for N-Port Virtualization.
Fix a botch in handle assignment that caused us to nuke one device when a new one arrives and end up with two devices with the same identity in the virtual target mapping table.
|
165818 |
05-Jan-2007 |
mjacob |
RELENG_6 compilation
|
165817 |
05-Jan-2007 |
mjacob |
error print cleanup && turn off ints if RISC is paused
|
165816 |
05-Jan-2007 |
mjacob |
Check the return from registering FC4 types with the fabric name server.
Don't complain about a hard loop id of 0xffff- we get this in point-to-point topologies with the 2300 and 2K Login firmware.
Up the timeout on register FC4 types commands.
|
165338 |
18-Dec-2006 |
mjacob |
Restore revision 1.126 that got accidentally nuked.
|
165337 |
18-Dec-2006 |
mjacob |
Add back some CAM_NEW_TRAN code to make backporting to RELENG_6 easier.
|
165308 |
17-Dec-2006 |
mjacob |
Try an experiment with using DMA to load firmware into a 2200- VERIFY CHECKSUM fails. Oh well, but keep a couple of the changes.
Avoid overflow in usec counters when waiting for mailbox completion.
|
165269 |
16-Dec-2006 |
mjacob |
Implement ISP_RESET0 for PCI and SBUS attachments- isp_reset has been modified to call ISP_RESET0 if it fails to do a reset. This gives us a chance to disable interrupts.
|
165061 |
10-Dec-2006 |
mjacob |
Remove dependency on ispfw and firmware as modules. 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.
|
165021 |
09-Dec-2006 |
mjacob |
clarify a comment slightly
|
165020 |
09-Dec-2006 |
mjacob |
Find another spot where tagged command queueing got accidentally nuked.
|
164909 |
05-Dec-2006 |
mjacob |
Make ISPCTL_PLOGX find a handle to log into the management server with- not hope for the best. Change some things which were gated off of 24XX to be gated off of 2K login support. Convert some isp_prt calls to xpt_print calls.
|
164908 |
05-Dec-2006 |
mjacob |
Add a chip timeout to ENABLE/MODIFY/DISABLE lun calls.
MFC after: 1 month
|
164845 |
03-Dec-2006 |
mjacob |
Fix XPT_GET_TRANSPORT_SETTINGS to zero validity and flags- this was causing us to not negotiate sync at all, or at random.
|
164370 |
18-Nov-2006 |
mjacob |
Make the SAN login/logout stuff more common between different chipsets and provied an isp_control entry point so that the outer layers can do PLOGI/LOGO explicitly. Add MS IOCB support. This completes the cycle for base support for SMI-S.
|
164361 |
17-Nov-2006 |
mjacob |
Disable code to set max read byte count on the 2400.
It caused a panic in writing the config register on a system. Turn it off until we take the time to understand it.
Reported by and Testing by: Anton
|
164318 |
16-Nov-2006 |
mjacob |
Increase the timeout for some SAN commands.
Only complain about FC Reponse errors if they're nonzero.
Shorten some PortID printouts for local loop.
Add an internal isp_xcmd_t data structure which we'll use for some CT-Passthru support as part of adding SMI-S.
|
164317 |
16-Nov-2006 |
mjacob |
minor change to reduce some diff noise
|
164272 |
14-Nov-2006 |
mjacob |
Push things closer to path failover by implementing loop down and gone device timers and zombie state entries. There are tunables that can be used to select a number of parameters.
loop_down_limit - how long to wait for loop to come back up before declaring all devices dead (default 300 seconds)
gone_device_time- how long to wait for a device that has appeared to leave the loop or fabric to reappear (default 30 seconds)
Internal tunables include (which should be externalized):
quick_boot_time- how long to wait when booting for loop to come up
change_is_bad- whether or not to accept devices with the same WWNN/WWPN that reappear at a different PortID as being the 'same' device.
Keen students of some of the subtle issues here will ask how one can keep devices from being re-accepted at all (the answer is to set a gone_device_time to zero- that effectively would be the same thing).
|
163899 |
02-Nov-2006 |
mjacob |
Add 4Gb (24XX) support and lay the foundation for a lot of new stuff.
|
163896 |
02-Nov-2006 |
mjacob |
2nd and final commit that moves us to CAM_NEW_TRAN_CODE as the default.
Reviewed by multitudes.
|
163816 |
31-Oct-2006 |
mjacob |
The first of 3 major steps to move the CAM layer forward to using the CAM_NEW_TRAN_CODE that has been in the tree for some years now.
This first step consists solely of adding to or correcting CAM_NEW_TRAN_CODE pieces in the kernel source tree such that a both a GENERIC (at least on i386) and a LINT build with CAM_NEW_TRAN_CODE as an option will compile correctly and run (at least with some the h/w I have).
After a short settle time, the other pieces (making CAM_NEW_TRAN_CODE the default and updating libcam and camcontrol) will be brought in.
This will be an incompatible change in that the size of structures related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change in both size and content. However, basic system operation and basic system utilities work well enough with this change.
Reviewed by: freebsd-scsi and specific stakeholders
|
162655 |
26-Sep-2006 |
mjacob |
Begin the process of moving info to sysctl stuff for FreeBSD by providing OIDs for WWNN/WWPN and Initiator ID.
|
161932 |
03-Sep-2006 |
mjacob |
Restore multi-version cleanliness.
|
161928 |
03-Sep-2006 |
jmg |
add a newbus method for obtaining the bus's bus_dma_tag_t... This is required by arches like sparc64 (not yet implemented) and sun4v where there are seperate IOMMU's for each PCI bus... For all other arches, it will end up returning NULL, which makes it a no-op...
Convert a few drivers (the ones we've been working w/ on sun4v) to the new convection... Eventually all drivers will need to replace the parent tag of NULL, w/ bus_get_dma_tag(dev), though dev is usually different for each driver, and will require hand inspection...
Reviewed by: scottl (earlier version)
|
161794 |
01-Sep-2006 |
mjacob |
More ispfwfunc definitions funnies which break pre-7.0 builds.
|
161792 |
01-Sep-2006 |
mjacob |
Add missing pre-7.0 firmware pointer. Oops.
|
161790 |
01-Sep-2006 |
mjacob |
fix bug in 2322 receive sequencer f/w load
|
161487 |
21-Aug-2006 |
mjacob |
Fix RELENG_4 code version- isp_roles wasn't getting initialized so it ended up defaulting to ISP_ROLE_NONE. My testing hadn't caught it because I was deliberatly setting role via ioctl.
Thanks to user Toni for lending me an alpha to test this on.
MFC after: 0 days
|
161271 |
14-Aug-2006 |
mjacob |
Fix 2KLOGIN code to specify *ibits* (not *obits*) so that the options field in register 10 will be deterministic, not random.
Correct the number of input bits for EXECUTE_FIRMWARE 0..1 to 0..2- the 2322 and 24XX cards use mailbox register 2 to specify whether the f/w being executed is freshly loaded or not.
Correct the number of input bits for {READ,WRITE}_RAM_WORD_EXTENDED so that register 8 gets picked up.
Fix the indexing and offset for the 2322 f/w download so that it correctly puts the different code segments where they belong.
Move VERIFY_CHECKSUM to be the 'else' clause to 2322 f/w downloads- the EXECUTE_FIRMWARE command for 2322 and 24XX cards will tell you if the f/w checksum is incorrect and VERIFY_CHECKSUM only works for RISC SRAM address < 64K so you can only do a VERIFY_CHECKSUM on the first of the 3 f/w segments for the 2322.
Shorten the delay for the continuation mailbox commands- 1ms is ridiculous (100us is more likely).
All of the more or less is really only for the 2322/6322 cards.
|
161270 |
14-Aug-2006 |
mjacob |
The register offset is within 4K, not 256 bytes, for some QLogic cards.
|
161269 |
14-Aug-2006 |
mjacob |
The macro IS_23XX should not mistakenly include 24XX cards.
|
160990 |
05-Aug-2006 |
mjacob |
Remove reference to PTI cards. They haven't been functioning or around for probably at least 5 years.
|
160979 |
04-Aug-2006 |
mjacob |
Increase local reserved (high && low) storage in each command structure from 2 to 3 words.
|
160978 |
04-Aug-2006 |
mjacob |
Fix na_fcentry_t to not have a lun field. Fix indentation in handly the notify structs. Fix messages in isp_got_msg_fc to print out the loop id of the sender- not the wwpn which will be synthesized later, if possible, in the outer layers. Put in debug printouts to pair a notify ack to a notify so one can see the start/close of an immediate notify event. Put in spsace for TASK MANAGEMENT response flags (which we don't do yet).
|
160977 |
04-Aug-2006 |
mjacob |
Initialize 2300 request/response pointers in isp_reset- not in isp_fibre_init.
|
160976 |
04-Aug-2006 |
mjacob |
Rename ioctl driven task management functions so they don't collide with task management definitions on other platforms.
|
160410 |
16-Jul-2006 |
mjacob |
Some rearrangement of headers to minimize diffs with outside of 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.
|
160338 |
14-Jul-2006 |
mjacob |
Don't attach 2422's yet. It just confuses everyone.
|
160337 |
14-Jul-2006 |
mjacob |
Add some missing braces.
Add MEMORY_BARRIER for the few scratch dma ops that were missing them plus add a couple of hi 32 bit dma ops (we could probably allow 64 bit scratch and request/response queue dma now).
|
160251 |
10-Jul-2006 |
mjacob |
Put in some missing target mode for 2KLOGIN f/w spots.
MFC after: 1 month
|
160250 |
10-Jul-2006 |
mjacob |
Clean up the ioctl to not process nonsense on SCSI isp cards.
MFC after: 1 month
|
160212 |
09-Jul-2006 |
mjacob |
Convert isp(4) and ispfw(4) to use firmware(9) to manage firmware 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
|
160088 |
03-Jul-2006 |
mjacob |
What the heck - make the last (most recent) 2200 f/w also do Hard Loop acquisition.
|
160080 |
03-Jul-2006 |
mjacob |
Do various fixes to support firmware loading for the 2322 (and by extension, the 2422).
One peculiar thing I've found with the 2322 is that if you don't force it to do Hard LoopID acquisition, the firmware crashes. This took a while to figure out.
While we're at it, fix various bugs having to do with NVRAM reading and option setting with respect to pieces of NVRAM.
|
159187 |
03-Jun-2006 |
mjacob |
allow this to compile cleanly under RELENG_4
|
159074 |
30-May-2006 |
mjacob |
Don't set CAM_DEV_QFRZN when we get an ABORT_TASK. Just by itself, this makes no sense.
|
158819 |
22-May-2006 |
mjacob |
Add missing case for RQSTYPE_CTIO3- neede for 64 bit target mode.
|
158817 |
22-May-2006 |
mjacob |
Remove bzero/bcopy vestiges
Be cognizant as to whether we're running 2KLogin f/w in target mode and do the appropriate loopid load based upon that.
Do a first cut (seems to work, at least for amd64) at 64 bit target mode for fibre channel cards. We could probably also do it for SPI cards, but that's not supported right now.
|
158816 |
22-May-2006 |
mjacob |
Remove bzero/bcopy vestiges.
Be cognizant as to whether we're running 2KLogin f/w in target mode and do the appropriate loopid load based upon that.
|
158815 |
22-May-2006 |
mjacob |
remove bzero/bcopy vestiges
|
158814 |
22-May-2006 |
mjacob |
add TGT_ANY define
|
158813 |
22-May-2006 |
mjacob |
Fix longstanding bug where exec throttle is 16 bits- not 8.
|
158656 |
16-May-2006 |
mjacob |
Move a define depending on __FreeBSD_versoin to after where it would be defined.
Submitted by: Ruslan Ermilov
|
158651 |
16-May-2006 |
phk |
Since DELAY() was moved, most <machine/clock.h> #includes have been unnecessary.
|
157945 |
21-Apr-2006 |
mjacob |
Redo some code based upon issues found by Coverity.
|
157943 |
21-Apr-2006 |
mjacob |
Some more gratuitous format and name changes.
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.
|
156236 |
03-Mar-2006 |
mjacob |
micro fix from justin
|
156040 |
26-Feb-2006 |
mjacob |
propagate role of device for ISP_GET_PDBINFO
|
155704 |
15-Feb-2006 |
mjacob |
a) clean up some declaration stuff (i.e., make more modern with respect 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
|
155285 |
04-Feb-2006 |
mjacob |
Actually, no, I had it wrong in 1.109. The arguments to bus_dma_create_tag are bus_addr_t, not bus_size_t.
In any case, turn off DAC support entirely until it is revamped to actually work *correctly* for 64 bit platforms (not using a PAE definition and for both initiator and target mode).
|
155273 |
04-Feb-2006 |
scottl |
i386/PAE defines bus_size_t to be 32-bits when it likely should be 64-bits. Fixing it is left for another day, so just hack around it for now.
|
155251 |
03-Feb-2006 |
marius |
- Don't shift the clock frequency in MHz left by 8 before assigning it 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
|
155228 |
02-Feb-2006 |
mjacob |
Remove use of inlines and use the functions as a library.
Larger code space, possibly performance hit, but more portable. Certainly less questionable use of inlining.
Suggested by: des
|
155206 |
02-Feb-2006 |
mjacob |
Make sure we don't pick up a loopid that's larger than our current portdb max (MAX_FC_TARG == 256) now that we support 2K Login f/w.
MFC after: 3 days
|
154879 |
27-Jan-2006 |
mjacob |
Hackamatic: turn off target mode on Sparc64 with KLD_MODULE- this triggers a compiler error I have no idea what its about.
This should unbreak tinderbox for now.
|
154850 |
26-Jan-2006 |
mjacob |
oops
|
154846 |
26-Jan-2006 |
mjacob |
Put in at least an attempt to ID the 2422 (4Gb part)
|
154704 |
23-Jan-2006 |
mjacob |
First of several commits as this driver is dusted off and maybe brought 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
|
153462 |
15-Dec-2005 |
jhb |
Use uintmax_t and %j to print bus dma segment members rather than casting to long long and using %ll.
|
153072 |
04-Dec-2005 |
ru |
Fix -Wundef.
|
151834 |
29-Oct-2005 |
mjacob |
Add an ioctl framework for doing FC task management functions from a user space tool- useful for doing FC target mode certification.
|
148609 |
31-Jul-2005 |
mjacob |
AT_MAKE_TAGID needs an instance as the 2nd arg- not just a 0.
|
146734 |
29-May-2005 |
nyan |
Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 and amd64. The optimization is a trivial on recent machines.
Reviewed by: -arch (imp, marcel, dfr)
|
146080 |
11-May-2005 |
mjacob |
Fix some incorrectly swapped fields in an ICB. Access a PCI register with correct width.
Obtained from: Dmitry Valeryevich Trikoz
|
146073 |
11-May-2005 |
mjacob |
Refactor isp_prt declaration so that platform requirements can stay in platform files.
|
143249 |
07-Mar-2005 |
stefanf |
Prefer <sys/cdefs.h>'s __printflike() macro to the recently added __GNUCLIKE_ATTRIBUTE_PRINTF.
Approved by: mjacob
|
143160 |
05-Mar-2005 |
imp |
Use BUS_PROBE_DEFAULT for pci probe return value
|
143063 |
02-Mar-2005 |
joerg |
netchild's mega-patch to isolate compiler dependencies into a central place.
This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42.
By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course.
Submitted by: netchild Reviewed by: various developers on arch@, some time ago
|
140684 |
23-Jan-2005 |
scottl |
Provide a needed argument to AT_MAKE_TAGID.
|
140652 |
23-Jan-2005 |
mjacob |
Add some macros for inserting tag ids.
MFC after: 2 weeks
|
140651 |
23-Jan-2005 |
mjacob |
Macroize the making of tag ids.
MFC after: 2 weeks
|
140650 |
23-Jan-2005 |
mjacob |
Roll minor number.
MFC after: 2 weeks
|
140649 |
23-Jan-2005 |
mjacob |
Don't set ZIO for 23XX for target mode (use fast posting instead). Use the correct number of handles for multihandle returns.
Very, very, rarely on some SMP systems we've seen an 'unstable' type in the response queue. I dunno whether or not it's a bug in our handling, or whether there's a cache incoherency issue, but try to guard against it.
MFC after: 2 weeks
|
140648 |
23-Jan-2005 |
mjacob |
Support the DELL OEM 2312 cards (1077,6312).
Many thanks to Stormweb for making the h/w available for testing.
MFC after: 2 days
|
139749 |
06-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
135594 |
23-Sep-2004 |
mjacob |
PAE support changes that included at least some minimal actual testing with a kernel that booted.
|
134895 |
07-Sep-2004 |
mjacob |
Do the small amount of tweaking to support PAE for at least initiator mode. I was unable to test this as the PAE kernel crashed with a "cannot copy LDT" before coming up. When this gets a bit more testing, I'll fix the PAE conf file to allow isp devices.
PR: 59728
|
134224 |
23-Aug-2004 |
mjacob |
Until I can get a clearer architecture from PHK about why he wants the geometry code to grab a mutex that prohibits any driver on the stack below it from sleeping, it's not safe to allow anything in the top half of isp to sleep (excepting the thread that Fibre Channel instances use to re-scan loops/fabrics).
|
133589 |
12-Aug-2004 |
marius |
- Introduce an ofw_bus kobj-interface for retrieving the OFW node and a 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
|
130585 |
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
130026 |
03-Jun-2004 |
phk |
Add missing <sys/module.h> includes currently relying on nested include in <sys/kernel.h>
|
129643 |
24-May-2004 |
njl |
Store the target handles in a separate list from normal commands. Add a CTIO fast post routine to handle CTIO completions.
Submitted by: mjacob
|
127346 |
23-Mar-2004 |
tmm |
Correct the boundary parameter to the bus_dma_tag_create() calls (it was (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>
|
127135 |
17-Mar-2004 |
njl |
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
|
126891 |
12-Mar-2004 |
trhodes |
These are changes to allow to use the Intel C/C++ compiler (lang/icc) to build the kernel. It doesn't affect the operation if gcc.
Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary.
Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c
1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c
1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c
and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes)
Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc.
Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: -arch Submitted by: netchild
|
126080 |
21-Feb-2004 |
phk |
Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION.
Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
|
126076 |
21-Feb-2004 |
phk |
Device megapatch 1/6:
Free approx 86 major numbers with a mostly automatically generated patch.
A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
|
125877 |
16-Feb-2004 |
mjacob |
We aren't D_TAPE. We aren't anything. The reasons why this was ever set at all is lost in the mists of time.
|
125597 |
08-Feb-2004 |
mjacob |
Remove condition variables and status associated with target mode enabling. Instead, go to an interrupt/polled model.
Fix get_lun_statep so we don't panic if there are no wildcard luns enabled.
MFC after: 6 days
|
125596 |
08-Feb-2004 |
mjacob |
Remove condition variables and status associated with target mode enabling. Instead, go to an interrupt/polled model.
MFC after: 6 days
|
125549 |
07-Feb-2004 |
mjacob |
Checkpoint of work in progress in cleaning up target mode. It actually seems to work well in RELENG_4. However, 5.X locking foo means that I'll have to do some quick redesign.
Add ioctl handlers for ISP_GETROLE and ISP_SETROLE ioctls.
|
125548 |
07-Feb-2004 |
mjacob |
add a count for inotifies as well as atios.
MFC after: 1 week
|
125547 |
07-Feb-2004 |
mjacob |
Reverse role defines for initiator and target mode to better match the class 3 service parameters we'd get.
Steal 8 bits out of the portid u_int32_t for role information (port ids are 24 bits anyway).
MFC after: 1 week
|
125546 |
07-Feb-2004 |
mjacob |
Add case to handle ISPCTL_GET_PDB.
MFC after: 1 week
|
125545 |
07-Feb-2004 |
mjacob |
If we're defined to have a default role for target mode, make it just ISP_ROLE_TARGET- not both.
MFC after: 1 week
|
125544 |
07-Feb-2004 |
mjacob |
Change role defines so that they better match class 3 service parameters. Add ISPCTL_GET_PDB isp_control operation.
MFC after: 1 week
|
125189 |
29-Jan-2004 |
mjacob |
Fix a bug where we never managed to include the sense data we wanted to send.
|
125187 |
29-Jan-2004 |
mjacob |
Fix longstanding buglet- for centrally handled CTIO2s we were checking the wrong bit for this being the last CTIO2. It didn't matter since it really was the last CTIO2 and the resources recycled, but still....
Add in CTIO3 define for future DAC work.
|
124894 |
23-Jan-2004 |
mjacob |
If we have ISP_ROLE_INITIATOR set, make sure that we clear ICBOPT_INI_DISABLE from the fwoptions. Likewise, we *set* ICBOPT_INI_DISABLE if we don't have initiator role.
|
124893 |
23-Jan-2004 |
mjacob |
add MAKE_WWN_FROM_NODE_NAME macro
|
124892 |
23-Jan-2004 |
mjacob |
Add firmware major, minor and micro revsions to the ISP_FC_GETHINFO ioctl structure.
|
122638 |
14-Nov-2003 |
mjacob |
fix broken _IOR usage
|
121317 |
21-Oct-2003 |
mjacob |
Turn off ISP_SMPLOCK- not to be turned on again.
Until we can have perfect knowledge that all callers above us think it's okay for us to sleep, releasing *our* locks of course, we don't dare try and sleep.
|
120506 |
27-Sep-2003 |
phk |
The present defaults for the open and close for device drivers which provide no methods does not make any sense, and is not used by any driver.
It is a pretty hard to come up with even a theoretical concept of a device driver which would always fail open and close with ENODEV.
Change the defaults to be nullopen() and nullclose() which simply does nothing.
Remove explicit initializations to these from the drivers which already used them.
|
120088 |
15-Sep-2003 |
markm |
Add a module dependancy. Now CAM will autoload when you load this.
OK'ed by: mdodd
|
120018 |
13-Sep-2003 |
mjacob |
NetBSD'er with time on their hands (dma->DMA)
|
120017 |
13-Sep-2003 |
mjacob |
Bland synchronization of common source with no effect on FreeBSD whatsomever.
|
120016 |
13-Sep-2003 |
mjacob |
Some ridiculous target mode botches- like having the wrong definitions for messages. Some spelling fixes. Some target mode structure cleanups to reflect reality.
|
120015 |
13-Sep-2003 |
mjacob |
Some canonicalization function cleanups based upon some target mode structure cleanups.
|
120014 |
13-Sep-2003 |
mjacob |
No time like the present to turn back on SMP locking.
|
120013 |
13-Sep-2003 |
mjacob |
Report correct active vs. nvram node/port WWNs in an ioctl.
|
120012 |
13-Sep-2003 |
mjacob |
On reset, make sure that we have some parameters set correctly. This fixes a longstanding issue WRT resetting the chip after startup- it would fail if we were connected as an F-port to a switch. If we were connected as an F-port, we got assigned a hard loop ID of 255, which is really a bogus loop id. Then when we turned around to reset ourselves, the firmware would reject the ICB_INIT request because the loop id was bogus. *sputter*
Minor fixlet from somebody in NetBSD with too much time on their hands (dma -> DMA).
|
119694 |
02-Sep-2003 |
marcel |
Move the inclusion of <machine/ofw_machdep.h> after the inclusion of <dev/ofw/openfirm.h> to allow the former to contain prototypes that use types defined in the latter.
Reviewed by: mjacob@
|
119459 |
25-Aug-2003 |
mjacob |
Revert previous commit. Violates Maintainer (O'Brien knows how to reach me directly), but more importantly, breaks compiles on non-FreeBSD platforms.
|
119418 |
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
119338 |
23-Aug-2003 |
imp |
s=include <ofw/=include <dev/ofw/= to reflect removal of -I$S/dev
|
119280 |
22-Aug-2003 |
imp |
Prefer new location of pci include files (which have only been in the tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
|
117126 |
01-Jul-2003 |
scottl |
Mega busdma API commit.
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
|
116351 |
14-Jun-2003 |
njl |
Merge common XPT_CALC_GEOMETRY functions into a single convenience function. Devices below may experience a change in geometry.
* Due to a bug, aic(4) never used extended geometry. Changes all drives >1G to now use extended translation. * sbp(4) drives exactly 1 GB in size now no longer use extended geometry. * umass(4) drives exactly 1 GB in size now no longer use extended geometry.
For all other controllers in this commit, this should be a no-op.
Looked over by: scottl
|
115630 |
01-Jun-2003 |
mjacob |
Restore parentheses removed inappropriately in last commit.
|
115521 |
31-May-2003 |
phk |
Remove unused variables Add /* FALLTHROUGH */
Found by: FlexeLint
|
112593 |
25-Mar-2003 |
mjacob |
Add an explanatory comment about what operational modes in xfwopt are.
|
111815 |
03-Mar-2003 |
phk |
Gigacommit to improve device-driver source compatibility between branches:
Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values.
This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386.
Approved by: re(scottl)
|
111119 |
19-Feb-2003 |
imp |
Back out M_* changes, per decision of the TRB.
Approved by: trb
|
111004 |
16-Feb-2003 |
mjacob |
Pointy hat- bad commit.
|
110973 |
16-Feb-2003 |
mjacob |
Make sure we propagate rxid && iid in isp_target_put_atio
|
110972 |
16-Feb-2003 |
mjacob |
Pick up some compilation warning fixes from NetBSD.
If we don't have ISP_FW_CRASH_DUMP defined, we have to do a isp_reinit in the core code- not the platform code- so fix the ISP_CONN_FATAL case.
|
109623 |
21-Jan-2003 |
alfred |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
108549 |
02-Jan-2003 |
mjacob |
Make compiles (LINT and/or ISP_TARGET_MODE options) happier by making sure printf type format args and actual args match.
Reviewed by: Sam Leffler <sam@errno.com>
|
108533 |
01-Jan-2003 |
schweikh |
Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, especially in troff files.
|
108470 |
30-Dec-2002 |
schweikh |
Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/ Add FreeBSD Id tag where missing.
|
105134 |
14-Oct-2002 |
mjacob |
LINT related fixes (as noticed by bde)
|
104916 |
11-Oct-2002 |
mjacob |
This should enable 10160 support. As best as I can tell, the same f/w as 12160 is used, and otherwise, this is just a single channel variant of the 10160.
MFC after: 0 days
|
104806 |
10-Oct-2002 |
mjacob |
From PHK's flex tool- we can get -1 returned from xpt_path_target_id, so don't index off of it.
MFC after: 1 day
|
104354 |
02-Oct-2002 |
scottl |
Some kernel threads try to do significant work, and the default KSTACK_PAGES doesn't give them enough stack to do much before blowing away the pcb. This adds MI and MD code to allow the allocation of an alternate kstack who's size can be speficied when calling kthread_create. Passing the value 0 prevents the alternate kstack from being created. Note that the ia64 MD code is missing for now, and PowerPC was only partially written due to the pmap.c being incomplete there. Though this patch does not modify anything to make use of the alternate kstack, acpi and usb are good candidates.
Reviewed by: jake, peter, jhb
|
103826 |
23-Sep-2002 |
mjacob |
Remove ISP_DMA_ADDR_T definition.
Instead, based upon whether ISP_DAC_SUPPORTED is defined, typedef isp_dma_addr_t appropriately.
If ISP_DAC_SUPPORTRED is defined, the DMA_WD2/DMA_WD3 macros do something useful, else they define to '0'.
|
103825 |
23-Sep-2002 |
mjacob |
Add MBOX_INIT_REQ_QUEUE_A64/MBOX_INIT_RES_QUEUE_A64 definitions. Define ispreq64_t to be the same as ispreqt3_t.
|
103823 |
23-Sep-2002 |
mjacob |
Redo dma tag creation to correctly reflect the boundary and segment limitations inherent to the isp1000 on SBus cards.
|
103822 |
23-Sep-2002 |
mjacob |
Re-specify the bus space creation such that if we have ISP_DAC_SUPPORTED defined, we set the address space limitation to BUS_SPACE_UNRESTRICTED, otherwise to BUS_SPACE_MAXADDR_32BIT.
If we have a 1240, ULTRA2 or better, or an FC card, the boundary limit is BUS_SPACE_UNRESTRICTED and segment limit is BUS_SPACE_MAXADDR_32BIT.
The older 1020/1040 cards have boundary and segment limits of BUS_SPACE_MAXADDR_24BIT.
|
103821 |
23-Sep-2002 |
mjacob |
Fix buglet in A64 CTIO3 structure copy.
|
103820 |
23-Sep-2002 |
mjacob |
Remove ISP_DMA_ADDR_T define (see ispvar.h) Add in commented out:
+/* #define ISP_DAC_SUPPORTED 1 */
|
103819 |
23-Sep-2002 |
mjacob |
If we have a 1240 or an ULTRA2 or better card, use MBOX_INIT_RES_QUEUE_A64 (preparation for DAC/A64 support)
|
103074 |
07-Sep-2002 |
mjacob |
The size argument to snprintf does not have to be backed off by one to account for a NULL byte.
Submitted by: Jacques A. Vidrine <nectar@celabo.org>
|
103035 |
06-Sep-2002 |
mjacob |
Remove STRNCAT (==>strncat) usage. Apparently I never read the man page correctly and it wasn't doing what I thought it was.
Noticed by: Brooks Davis <brooks@one-eyed-alien.net>
|
103034 |
06-Sep-2002 |
mjacob |
Tsk. Now that we're not using our own locks, we have to remember to grab Giant in isp_kthread so that msleep is *happy* that there's no lock being passed to it (as tsleep turns out to be...)
|
102884 |
03-Sep-2002 |
mjacob |
Turn off usage of SMP style locking until we sort out CAM.
|
102272 |
22-Aug-2002 |
mjacob |
Define ISP_DMA_ADDR_T to be a bus_addr_t, not a u_int32_t.
This is in preparation to completing A64 PCI support.
|
102271 |
22-Aug-2002 |
mjacob |
unused variable removal (pointed out by bde)
|
102016 |
17-Aug-2002 |
mjacob |
If we're using ancient (pre 1.17.0) 2100 f/w (for the cards that cannot load f/w images > 0x7fff words), set ISP_FW_ATTR_SCCLUN. We explicitly don't believe we can find attributes if f/w is < 1.17.0, so we have to set SCCLUN for the 1.15.37 f/w we're using manually- otherwise every target will replicate itself across all 16 supported luns for non-SCCLUN f/w.
Correctly set things up for 23XX and either fast posting or ZIO. The 23XX, it turns out, does not support RIO. If you put a non-zero value in xfwoptions, this will disable fast posting. If you put ICBXOPT_ZIO in xfwoptions, then the 23XX will do interrupt delays but post to the response queue- apparently QLogic *now* believes that reading multiple handles from registers is less of a win than writing (and delaying) multiple 64 byte responses to the response queue.
At the end of taking a a good f/w crash dump, send the ISPASYNC_FW_DUMPED event to the outer layers (who can then do things like wake a user daemon to *fetch* the crash image, etc.).
|
102015 |
17-Aug-2002 |
mjacob |
We only do isp_reinit from isp_async if ISP_FW_CRASH_DUMP is defined- otherwise the core code does this.
|
102014 |
17-Aug-2002 |
mjacob |
Fix the incorrect parsing of the Risc2Host isr. For RIO_16, fast posting command completion, and fast post CTIO completion, the upper half of Risc2Host is a copy of mailbox #1- *not* mailbox #0.
MFC after: 1 day
|
102013 |
17-Aug-2002 |
mjacob |
Add ICBXOPT_ZIO definition.
|
102012 |
17-Aug-2002 |
mjacob |
Add ISPASYNC_FW_DUMPED async event.
add ISP_FW_NEWER_THAN macro- makes the code easier to read.
|
100690 |
25-Jul-2002 |
mjacob |
Frequency default should be '25' for 25MHz, not 25000000.
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.
|
100689 |
25-Jul-2002 |
mjacob |
Don't test against default_iid being zero as a test for whether we set something- iid 0 is valid.
|
100680 |
25-Jul-2002 |
mjacob |
Make sure that if are in fact using 'full SMP', make the interrupt 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.
|
100679 |
25-Jul-2002 |
mjacob |
Put MODULE_VERSION back here so that ispfw is happy.
|
99758 |
11-Jul-2002 |
mjacob |
Remove a couple of debugging lines.
|
99756 |
11-Jul-2002 |
mjacob |
'Support' for ISP SBus cards.
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.
|
99599 |
08-Jul-2002 |
mjacob |
Add 2002 to copyright.
Oops; I forgot for previous delta... If we're and FC or ULTRA2 or better card, we can have a 1024 element request queue instead of 256.
MFC after: 1 week
|
99598 |
08-Jul-2002 |
mjacob |
Add get/set param ioctl support.
Remove sim queue freezes for resource shortages. I've had too many strange race conditions where I freeze on a resource shortage but never get unfrozen.
Consolidate the remaining sim queue freeze condition (for loopdown) into an inline with debug messages that allows us to track problems at ISP_LOGDEBUG0 level easier. Change a bunch of debug messages about loop down/up conditions to ISP_LOGDEBUG0 level.
Remove dead isp_relsim code.
Change some internal flag stuff for efficiency.
Complain vociferously if we try and use our FC scratch area while it's busy being used already (I mean, if we don't have solaris' ability to sleep as an interrupt thread which would allow us to just use a p/v semaphore, at least *say* when you've just borked yourself).
Add infrastructure to allow overrides of hard loopid && initiator id from boot variables.
Fix the usual quota of silly bugs:
+ 'ktmature' needs to be per-instance. Argh. + When entering isp_watchdog, set intsok to zero, preserving old value to restore later. It's not nice to try and sleep from splsoftclock. + Fix tick overflow buglet in checking timeout value.
MFC after: 1 week
|
99597 |
08-Jul-2002 |
mjacob |
Add get/set param ioctls.
MFC after: 1 week
|
99596 |
08-Jul-2002 |
mjacob |
Add override so that we can force set our hard loopdid.
MFC after: 1 week
|
99595 |
08-Jul-2002 |
mjacob |
Remove the 'bogus registrant' hack for fabric searches. It really turns out that there's something of a hole in our new fabric name server stuff. We ask the name server for entities that have registered as a specific type. That type is FC-SCSI. If the entity hasn't performed a REGISTER FC4 TYPES, the fabric nameserver won't return it.
This brings this driver to a bit of a fork in the road as to what the right thing to do is. For servicing the needs of accessing FC-SCSI devices, this method is fine, and to be preferred. It is extremely unlikely we're interested in fabric devices that *don't* register correctly. If I ever get around to adding an FC-IP stack, then asking for devices that have registers as FC-IP types is also the right thing to do.
So- asking the fabric nameserver for a specific type is fine, *as long as you are only interested in specific types*. If, on the other hand, you want to create (as for management tool support) a picture of everything on the fabric, this is *not* so fine. There are a large class of FC-SCSI *initiators* who *don't* correctly register, so we never will *see* them.
Is this a problem? Yes, but only a little one. If we want to do such management tool support, we should probably run a *different* fabric nameserver query algorithm. Better yet, we should talk to the management nameserver in Brocade switches instead of the standard FC-GS-2 fabric nameserver (which can be unwieldy).
Other changes: if we've overrrides marked, don't set some default values from reading NVRAM. This allows us to override things like EXEC throttle without having to ignore NVRAM entirely.
MFC after: 1 week
|
98290 |
16-Jun-2002 |
mjacob |
If the HBA is already 'touched', still set maxluns. Othewise for CAM_QUIRK_HILUN devices we loop thru 32bits of lun. Oops.
Switch to using USEC_DELAY rather than USEC_SLEEP at isp_reset time.
Try to paper around a defect in clients that don't correctly registers themeselves with the fabric nameserver.
Minor updates for Mirapoint support- they still use code that is not HANDLE_LOOPSTATE_IN_OUTER_LAYERS, and, surprise surprise, this old stuff had some bugs in it.
Clean up some target mode stuff.
MFC after: 1 week
|
98289 |
16-Jun-2002 |
mjacob |
Add support for ISP_FC_GETHINFO, which returns current connection topology, speed, loopid, WWPN/WWNN, etc.
Beef up target mode. Add isp_handle_platform_notify_scsi and isp_handle_platform_notify_fc platform handlers to handle immediate notifies (isp_handle_platform_notify_scsi is still stubbed out).
In implementation of isp_handle_platform_notify_fc, for IN_ABORT_TASK, peel off a pending XPT_IMMED_NOTIFY and call xpt_done on it and hope that somebody upstream is listening.
Make sure on final CTIO2s that we set residual correctly. These are absolutely crucial. Make sure we set relative offset for each CTIO2 based upon bytes we've already xferred. This is what the private adjunct datat to the original ATIO is. Note state of command so we can figure out where to find it if we get an ABORT from the firmware.
Make sure we *always* set CAM_TAG_ACTION_VALID for ATIO2s. Make sure we keep track of the original lun.
If se sent status (or we're otherwise done with the command), don't forget to free the adjunct structure.
|
98288 |
16-Jun-2002 |
mjacob |
Extend private adjunct to ATIO to have both tag lun, and extended state (so we can, when things get lost, find out who currently is processing on behalf of this open exchange. Invariably, when things are lost and wedged, it's CAM).
Keep an atio resource counter locally.
MFC after: 1 week
|
98287 |
16-Jun-2002 |
mjacob |
Force commit (last CVS comment was wrong).
Go back to *not* fully evaluating loop/fabric state if our role is ISP_ROLE_NONE.
|
98286 |
16-Jun-2002 |
mjacob |
Add ISP_FC_GETHINFO ioctl.
MFC after: 1 week
|
98285 |
16-Jun-2002 |
mjacob |
Set all 23XX cards as 'touched' (we have trouble, unpredictably, about running ABOUT FIRMWARE with some that were started by BIOS downloads).
Redo CTIO2 dma mapping- use continuation segments instead of multiple CTIO2s. Thanks to Veritas for sponsoring this work (in a different context).
MFC after: 1 week
|
98284 |
16-Jun-2002 |
mjacob |
Change isp_target_async to a function returning an integer.
Roll most immediate notifies into something the platform has to handle.
|
98283 |
16-Jun-2002 |
mjacob |
Set default command count to 0xfe. This tells the f/w essentially to *not* do flow control based upon resource counts for the firmware. Increase default immediate notify count to 16.
Change isp_target_async to a function returning an integer.
|
98282 |
16-Jun-2002 |
mjacob |
Add MBOX_DRIVER_HEARTBEAT/MBOX_FW_HEARTBEAT/FC4_FC_SVC defines.
MFC after: 1 week
|
98281 |
16-Jun-2002 |
mjacob |
Roll minor version. Add ISPASYNC_FW_RESTARTED async event. Add DEFAULT_FRAMESIZE && DEFAULT_EXEC_THROTTLE references.
MFC after: 1 week
|
95891 |
01-May-2002 |
mjacob |
If we get a DATA UNDERRUN error from QLogic FC cards, but the RQCS_RU bit is not set in the scsi completion status, or if the residual is clearly nonsense, then this was a command that suffered the loss of one or more FC frames in the middle of the exchange.
Set HBA_BOTCH and hope it will get retried. It's the only thing we can do.
MFC after: 1 day
|
95533 |
26-Apr-2002 |
mike |
Move the new byte order function prototypes from <sys/param.h> to <sys/endian.h>. This puts us in line with NetBSD and OpenBSD.
|
94867 |
16-Apr-2002 |
mjacob |
Scale back # of luns supported for SCC to 16384- oops- top 3 bits are a lun address modifier of sorts. Only an HP XP-512 seems to have cared.
Fix a few misplaced pointers for the new fabric goop, which has been demonstrated to work on newer Brocades and McData switches now. Put in commented out code which would run GFF_ID if the QLogic f/w allowed it.
Don't whine about not being able to find a handle for a command if it was a command aborted (by us).
|
93849 |
05-Apr-2002 |
mjacob |
Send 32 bytes out for fc4_types... Interestingly enough the Solaris/Sparc version worked fine, but Linux/Sparc && FreeBSD/Sparc choked.
MFC after: 1 week
|
93837 |
04-Apr-2002 |
mjacob |
Fix bus dma segment count to be based off of MAXPHYS, not BUS_SPACE_MAXSIZE. Grumble. I've seen better documented architectures out of Redmond.
Redo fabric evaluation to not use GET ALL NEXT (GA_NXT). Switches seem to be trying to wriggle out of supporting this well. Instead, use GID_FT to get a list of Port IDs and then use GPN_ID/GNN_ID to find the port and node wwn. This should make working on fabrics a bit cleaner and more stable.
This also caused some cleanup of SNS subcommand canonicalization so that we can actually check for FS_ACC and FS_RJT, and if we get an FS_RJT, print out the reason and explanation codes.
We'll keep the old GA_NXT method around if people want to uncomment a controlling definition in ispvar.h.
This also had us clean up ISPASYNC_FABRICDEV to use a local lportdb argument and to have the caller explicitly say that a device is at the end of the fabric list.
MFC after: 1 week
|
93818 |
04-Apr-2002 |
jhb |
Change callers of mtx_init() to pass in an appropriate lock type name. In most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.
Tested on: i386, alpha, sparc64
|
93706 |
02-Apr-2002 |
mjacob |
Redo stuff for sparc64- primarily fix bus dma implementation. The endian stuff was right, but the busdma stuff was massively not right.
Didn't really test on ia64 or i386- don't have the former h/w and my FreeBSD-current disk is unwell right now. Hope that this is okay.
MFC after: 1 week
|
92893 |
21-Mar-2002 |
mjacob |
Limit fabric search to a default 256 entries. This will all go away soon because it's just getting harder and harder to find switches that correctly implement the GET ALL NEXT subcommands for the SNS protocol.
Latch up result out pointer and set a busy flag when we're looking at the response queue. This allows for a cleaner way to make sure we don't get multiple CPUs trying to read the same response queue entries.
Change how isp_handle_other_response returns values (clarity).
Make PORT UNAVAILABLE the same as PORT LOGOUT (force a LIP).
Do some formatting changes.
MFC after: 0 days
|
92739 |
20-Mar-2002 |
alfred |
Remove __P.
|
91823 |
07-Mar-2002 |
mjacob |
Disable RIO (reduced interrupt operation) for 2200 boards- it seemed like it worked- but I ran into a case with a 2204 where commands were being lost right and left. Best be safe.
For target mode, or things called if we call isp_handle_other response- note that we might have dropped locks by changing the output pointer so we bail from the loop. It's the responsibility of the entity dropping the lock to make sure that we let the f/w know we've read thus far into the response queue (else we begin processing the same entries again- blech!).
MFC after: 1 day
|
91036 |
21-Feb-2002 |
mjacob |
Reorder some of the ioctls and add a few new ones.
MFC after: 1 day
|
91003 |
21-Feb-2002 |
mjacob |
Fix a problem where a local loop disk logs out- and we get a PORT LOGGED OUT status. We are, apparently, required to force the f/w to log back in if we want to try and talk to that disk again. This means either issuing a LOGIN LOCAL LOOP PORT mailbox command, or by issuing a LIP. I've elected to issue a LIP because this has a better chance of waking up the disk which clearly just crashed and burned.
These should not occur at all. If they do, they should be darned rare.
MFC after: 1 week
|
90813 |
18-Feb-2002 |
mjacob |
More for f/w crash dumps (bug fixing and adding ioctl entry points and hints to enable for specific units)
MFC after: 1 week
|
90754 |
17-Feb-2002 |
mjacob |
Support for f/w crash dumps (2200 && 23XX).
If you want QLogic to look at a potential f/w problem for FC cards, you really have to provide them info in the format they expect. This involves dumping a lot of hardware registers (> 300 16 bit registers) and a lot of SRAM (> 128KB minimum). Thus all of this code is #ifdef protected which will become an option so that the memory allocation of where to dump the crash image is pretty expensive. It's worth it if you have a reproducible problem because they have some tools that can tell them, given the f/w version, the precise state of everything.
MFC after: 1 week
|
90753 |
17-Feb-2002 |
mjacob |
Hints for WWN are now WWNN and/or WWPN.
MFC after: 1 week
|
90752 |
17-Feb-2002 |
mjacob |
Add in support firmware crash dumps. Change CFG options to split WWN into WWNN and WWPN.
MFC after: 1 week
|
90224 |
04-Feb-2002 |
mjacob |
+ A variety of 23XX changes: disable MWI on 2300
based on function code, set an 'isp_port' for the 2312- it's a separate instance, but the NVRAM is shared, and the second port's NVRAM is at offset 256.
+ Enable RIO operation for LVD SCSI cards. This makes a *big* difference as even under reasonable load we get batched completions of about 30 commands at a time on, say, an ISP1080.
+ Do 'continuation' mailbox commands- this allows us to specify a work area within the softc and 'continue' repeated mailbox commands. This is more or less on an ad hoc basis and is currently only used for firmware loading (which f/w now loads substantially faster becuase the calling thread is only woken when all the f/w words are loaded- not for each one of the 40000 f/w words that gets loaded).
+ If we're about to return from isp_intr with a 'bogus interrupt' indication, and we're not a 23XX card, check to see whether the semaphore register is currently *2* (not *1* as it should be) and whether there's an async completion sitting in outgoing mailbox0. This seems to capture cases of lost fast posting and RIO interrupts that the 12160 && 1080 have been known to pump out under extreme load (extreme, as in > 250 active commands).
+ FC_SCRATCH_ACQUIRE/FC_SCRATCH_RELEASE macros.
+ Endian correct swizzle/unswizzle of an ATIO2 that has a WWPN in it.
MFC after: 1 week
|
89274 |
11-Jan-2002 |
mjacob |
Add missing move of relative offset for CTIO2 updates.
|
88855 |
03-Jan-2002 |
mjacob |
Implement REDUCED INTERRUPT OPERATION usage form FC cards- this allows the firmware to delay completion of commands so that it can attempt to batch a bunch of completions at once- either returning 16 bit handles in mailbox registers, or in a resposne queue entry that has a whole wad of 16 bit handles.
Distinguish between 2300 and 2312 chipsets- if only because the revisions on the chips have different meanings.
Add more instrumentation plus ISP_GET_STATS and ISP_CLR_STATS ioctls. Run up the maximum number of response queue entities we'll look at per interrupt.
If we haven't set HBA role yet, always return success from isp_fc_runstate.
MFC after: 2 weeks
|
87671 |
11-Dec-2001 |
mjacob |
Explicitly decode GetAllNext SNS Response back *as* a GetAllNext response. Otherwise, we won't unswizzle it correctly. This was found on linux/PPC.
This mandated creating another inline: isp_get_gan_response.
|
87635 |
11-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). It also has to handle the SBus cards (for platforms that have them) which, while on a Big Endian machine, do *not* require *most* of the request/response queue entry fields to be swizzled or unswizzled.
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.
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).
MFC after: 2 weeks
|
85395 |
23-Oct-2001 |
mjacob |
Tra-La, another QLogic f/w funny- this time with the 2300. If we get a completion status of RQCS_QUEUE_FULL, it means that the internal queues are full. Other QLogic boards set the QFULL SCSI status. But *nooooooooooo*, not the 2300.
MFC after: 1 day
|
85112 |
18-Oct-2001 |
mjacob |
Protect against deranged fabric nameservers that spit out 10000 identical port numbers.
MFC after: 1 day
|
84631 |
07-Oct-2001 |
mjacob |
Add some somewhat vague documentation for this driver and a list of Hardware that might, in fact, work.
|
84629 |
07-Oct-2001 |
mjacob |
Some patches from Doug for ia64 support- the principle one being the appropriate cache flush that provides MEMORY_BARRIER in between handoffs between host && RISC processor for the shared memory request/response queues.
Submitted by: dfr@nlsystems.com
|
84598 |
06-Oct-2001 |
mjacob |
Misunderstanding documentation caused me to try and set 1Gbps/2Gps/Auto connection speed for the 2300 in the wrong offset in the ICB. Oops.
Respect some QLogic errat wrt PCI errors on certain shared host/RISC registers.
|
84597 |
06-Oct-2001 |
mjacob |
Whups- remember to zero the isr pointer arg.
|
84596 |
06-Oct-2001 |
mjacob |
Respect QLogic's errata- read BIU_ISR even on the 2300 to see if there's an interrupt (avoids PCI parity errors which can occur on the 2312 if you access some registers from the host at the same time the RISC on the 2312 is C accessing them).
MFC after: 1 day
|
84242 |
01-Oct-2001 |
mjacob |
Begin to implement target mode that for Fibre Channel has a private per-command component that we *don't* try and pass thru CAM. CAM just is too risky and too much of a pain- structures get copied, but not all info of interest can be considered safely transported thru all consumers (including user space) from the incoming ATIO to the outgoing CTIO- it's just much safer to have a buddy structure, identified by the command's tag which *does* make it thru safely.
Pay attention to link speed and report 200MB/s xfer speed for a 23XX card in 2GPs mode.
MFC after: 1 week
|
84241 |
01-Oct-2001 |
mjacob |
Implement a call to get the actual link data rate (if 23XX) so we can set whether it's a 2Gps or 1Gps link.
MFC after: 1 week
|
84149 |
29-Sep-2001 |
mjacob |
When calling isp_reset, set the request/response in/out pointers all at once so there isn't a window with the ones for the 23XX cards being wrong.
When being verbose, print out some more FC NVRAM values (like framesize).
MFC after: 1 week
|
83366 |
12-Sep-2001 |
julian |
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
|
83028 |
04-Sep-2001 |
mjacob |
I don't know what I was thinking- if I have two separate busses on on SIM (as is true for the 1280 and the 12160), then I have to have separate flags && status for *both* busses. *Whap*.
Implement condition variables for coordination with some target mode events. It's nice to use these and not panic in obscure little places in the kernel like 'propagate_priority' just because we went to sleep holding a mutex, or some other absurd thing.
Remove some bogus ISP_UNLOCK calls. *Whap*.
No longer require that somebody do a lun enable on the wildcard device to enable target mode. They are, in fact, orthogonal. A wildcard open is a statement that somebody upstream is willing to accept commands which are otherwise unrouteable. Now, for QLogic regular SCSI target mode, this won't matter for a damn because we'll never see ATIOs for luns we haven't enabled (are listening for, if you will). But for SCCLUN fibre channel SCSI, we get all kinds of ATIOs. We can either reflect them back here with minimal info (which is isp_target.c:isp_endcmd() is for), or the wildcard device (nominally targbh) can handle them.
Do further checking against firmware attributes to see whether we can, in fact, support target mode in Fibre Channel. For now, require SCCLUN f/w to supoprt FC target mode.
This is an awful lot of change, but target mode *still* isn't quite right.
MFC after: 4 weeks
|
83027 |
04-Sep-2001 |
mjacob |
Note for ATIOs returned because of BDRs or Bus Resets for which bus this applies to. Do more bus # foo things.
Acknowledge Immediate Notifies right away prior to throwing events upstream (where they're currently being ignored, *groan*)
Capture ASYNC_LIP_F8 as with ASYNC_LIP_OCCURRED. Don't percolate them upstream as if they were BUS RESETS- they're not.
|
83026 |
04-Sep-2001 |
mjacob |
If we're on an interrupt stack, mark things so that we don't try and cv_wait for mailbox commands to complete if we start them from here.
Fix residuals for target mode such that we only check the residual and set it in the CTIO if this is the last CTIO (when we're sending status).
MFC after: 4 weeks
|
83025 |
04-Sep-2001 |
mjacob |
I don't know what I was thinking- if I have two separate busses on on SIM (as is true for the 1280 and the 12160), then I have to have separate flags && status for *both* busses. *Whap*.
Implement condition variables for coordination with some target mode events. It's nice to use these and not panic in obscure little places in the kernel like 'propagate_priority' just because we went to sleep holding a mutex, or some other absurd thing.
MFC after: 4 weeks
|
83005 |
04-Sep-2001 |
mjacob |
Fix SET_IID_VAL/SET_BUS_VAL macros to usable.
MFC after: 4 weeks
|
82843 |
03-Sep-2001 |
mjacob |
Because we now store SCCLUN capabilities in firmware attributes, get rid of the silly test of isp_maxluns > 16 and use the attibutes directly.
MFC after: 4 weeks
|
82842 |
03-Sep-2001 |
mjacob |
Clarify issues about whether we have SCCLUN (65535 luns) or non-SCCLUN (16 luns) firmware for the Fibre Channel cards.
We used to assume that if we didn't download firmware, we couldn't know what the firmware capability with respect to SCCLUNs is- and it's important because the lun field changes in the request queue entry based upon which firmware it is.
At any rate, we *do* get back firmware attributes in mailbox register 6 when we do ABOUT FIRMWARE for all 2200/2300 cards- and for 2100 cards with at least 1.17.0 firmware. So- we now assume non-SCCLUN behaviour for 2100 cards with firmware < 1.17.0- and we check the firmware attributes for other cards (loaded firmware or not).
This also allows us to get rid of the crappy test of isp_maxluns > 16- we simply can check firmware attributes for SCCLUN behaviour.
This required an 'oops' fix to the outgoing mailbox count field for ABOUT FIRMWARE for FC cards.
Also- while here, hardwire firmware revisions for loaded code for SBus cards. Apparently the 1.35 or 1.37 f/w we've been loading into isp1000 just doesn't report firmware revisions out to mailbox regs 1, 2 and 3 like everyone else. Grumble. Not that this fix hardly matters for FreeBSD.
MFC after: 4 weeks
|
82841 |
03-Sep-2001 |
mjacob |
Add some more firmware revision macros. Add firmware attributes field to fcparam structure. MFC after: 4 weeks
|
82689 |
31-Aug-2001 |
mjacob |
Add 2 Gigabit Fibre Channel support (2300 && 2312 cards). This required some reworking (and consequent cleanup) of the interrupt service code.
Also begin to start a cleanup of target mode support that will (eventually) not require more inforamtion routed with the ATIO to come back with the CTIO other than tag.
MFC after: 4 weeks
|
81988 |
20-Aug-2001 |
mjacob |
Clean up some ways in which we set defaults for SCSI cards that do not have valid NVRAM. In particular, we were leaving a retry count set (to retry selection timeouts) when thats not really what we want. Do some constant string additions so that LOGDEBUG0 info is useful across all cards.
MFC after: 2 weeks
|
81987 |
20-Aug-2001 |
mjacob |
Add MBOX_GET_PCI_PARAMS alias.
MFC after: 2 weeks
|
81795 |
16-Aug-2001 |
mjacob |
oops- typo in a previous commit
|
81794 |
16-Aug-2001 |
mjacob |
Fix a spelling error in a comment.
|
81792 |
16-Aug-2001 |
mjacob |
Add more MBOX and ASYNC event defines.
MFC after: 2 weeks
|
81791 |
16-Aug-2001 |
mjacob |
Thanks to PHK for spotting: ISPASYNC_UNHANDLED_RESPONSE not handle in isp_async.
|
81790 |
16-Aug-2001 |
mjacob |
Enable LIP F8, LIP Reset async events. Be more chatty about SNS failures. Fix typo for skipped phase mesage. Correct MBOX_GET_PORT_QUEUE_PARAMS options in table.
MFC after: 2 weeks
|
80995 |
02-Aug-2001 |
mjacob |
Oops- don't set 'goal' twice when you mean to set 'nvrm' as well. This breaks bogus NVRAM boards.
MFC after: 1 day
|
80583 |
30-Jul-2001 |
mjacob |
Redo how we manage SCSI device settings- have a 3rd flags (nvram) that records either what's in NVRAM or what the safe defaults would be if we lack NVRAM. Then we rename cur_XXXX to actv_XXXX (these are the currently active settings) and the dev_XXX settings to goal_XXXX (these are the settings which we want cur_XXXX to converge to).
This probably isn't entirely final as yet- but it's a lot closer to now being what it should be, including allowing camcontrol to actually set specific settings.
|
80582 |
30-Jul-2001 |
mjacob |
Redo how we manage SCSI device settings- have a 3rd flags (nvram) that records either what's in NVRAM or what the safe defaults would be if we lack NVRAM. Then we rename cur_XXXX to actv_XXXX (these are the currently active settings) and the dev_XXX settings to goal_XXXX (these are the settings which we want cur_XXXX to converge to).
Roll core minor.
|
80581 |
30-Jul-2001 |
mjacob |
Redo how we manage SCSI device settings- have a 3rd flags (nvram) that records either what's in NVRAM or what the safe defaults would be if we lack NVRAM. Then we rename cur_XXXX to actv_XXXX (these are the currently active settings) and the dev_XXX settings to goal_XXXX (these are the settings which we want cur_XXXX to converge to).
|
80314 |
25-Jul-2001 |
mjacob |
Remove ISP_SMPLOCK stuff- we're just using locking now.
Correctly reintroduce loop_seen_once semantics- that is, if we've never seen good link, start bouncing commands with CAM_SEL_TIMEOUT. But we have to be careful to have let ourselves try (in isp_kthread) to check for loop up at least once.
PR: 28992 MFC after: 1 week
|
80313 |
25-Jul-2001 |
mjacob |
Roll minor version. Remove ISP_SMPLOCK nonsense. We're using full locking, and that's final.
MFC after: 1 week
|
79572 |
11-Jul-2001 |
mjacob |
Hmm. Let's try this on for size...
We originally had it such that if the connection topology was FL-loop (public loop), we never looked at any local loop addresses. The reason for not doing that was fear or concern that we'd see the same local loop disks reflected from the name server and we'd attach them twice.
However, when I recently hooked up a JBOD and a system to an ANCOR SA-8 switch, the disks did *not* show up on the fabric. So at least the ANCOR is screening those disks from appearing on the fabric. Now, it's possible this is a 'feature' of the ANCOR. When I get a chance, I'll check the Brocade (it's hard to do this on a low budget).
In any case, if they *do* also show up on the fabric, we should simply elect to not log into them because we already have an entry for the local loop. There is relatively unexercised code just for this case.
MFC after: 2 weeks
|
79338 |
05-Jul-2001 |
mjacob |
Oops- missed a CAMLOCK_2_ISP case.
|
79336 |
05-Jul-2001 |
mjacob |
Things have become cinched down more tightly about assertions for Giant. This uncovered some missing spots where I trade off between isp's lock and Giant as I enter CAM.
|
79241 |
04-Jul-2001 |
mjacob |
Add CAM_NEW_TRAN_CODE support. Use correct CAMLOCK_2_ISPLOCK macros.
For fibre channel, start going for the gusto and using AC_FOUND_DEVICE and AC_LOST_DEVICE calls to xpt_async when devices appear and disappear as the loop or fabric changes.
ISPASYNC_FW_CRASH is the async event code where the platform layer deals with a firmware crash.
|
79240 |
04-Jul-2001 |
mjacob |
Macroize request/response in/out queue pointer access.
|
79239 |
04-Jul-2001 |
mjacob |
Some possibly helpful casts.
|
79238 |
04-Jul-2001 |
mjacob |
Add a microcomment about how you'd use ispds64_t or ispdlist_t for CTIO3/CTIO4 entries.
|
79237 |
04-Jul-2001 |
mjacob |
Add a bunch of additional defines for completion codes. Define some of the RIO (reduced interrupt operation) stuff. Add 64 bit data list (DSD type 1) and arbitrary data list (DSD type 2) data structure defines.
Add macros that parameterize usage of the Request/Response in/out queue pointers. When we finish 2300 support, different registers will be accessed for the 2300.
|
79235 |
04-Jul-2001 |
mjacob |
Firmware crashes handled in platform specific code (isp_async call).
Fix longstanding silly buglet that left a hole in the debug log defines.
|
79234 |
04-Jul-2001 |
mjacob |
More 2300 support prep- the Request/Response in/out pointers are part of the PCI block for the 2300- not software convention usage of the mailbox registers- so we macrosize in/out pointer usage.
Only report that a LIP destroyed commands if it actually destroyed commands. Get the chan/tgt/lun order correct. Fix a longstanding stupid bug that caused us to try and issue a command with a tag on Channel B because we were checking the tagged capability for the target against Channel A.
A firmware crash is now vectored out to platform specific code as an async event.
Some minor formatting tweaks.
|
78233 |
15-Jun-2001 |
peter |
Fix warnings: 554: passing arg 4 of `resource_string_value' from incompatible pointer type 576: passing arg 4 of `resource_string_value' from incompatible pointer type 593: passing arg 4 of `resource_string_value' from incompatible pointer type
|
78221 |
14-Jun-2001 |
mjacob |
We've had problems with data corruption occuring on commands that complete (with no apparent error) after we receive a LIP. This has been observed mostly on Local Loop topologies. To be safe, let's just mark all active commands as dead if we get a LIP and we're on a private or public loop.
MFC after: 4 weeks
|
77776 |
05-Jun-2001 |
mjacob |
Fix botch for state levels. Role minor release. Start adding code for a 'force logout' path.
MFC after: 4 weeks
|
77365 |
28-May-2001 |
mjacob |
Spring MegaChange #1.
----
Make a device for each ISP- really usable only with devfs and add an ioctl entry point (this can be used to (re)set debug levels, reset the HBA, rescan the fabric, issue lips, etc).
----
Add in a kernel thread for Fibre Channel cards. The purpose of this thread is to be woken up to clean up after Fibre Channel events block things. Basically, any FC event that casts doubt on the location or identify of FC devices blocks the queues. When, and if, we get the PORT DATABASE CHANGED or NAME SERVER DATABASE CHANGED async event, we activate the kthread which will then, in full thread context, re-evaluate the local loop and/or the fabric. When it's satisfied that things are stable, it can then release the blocked queues and let commands flow again.
The prior mechanism was a lazy evaluation. That is, the next command to come down the pipe after change events would pay the full price for re-evaluation. And if this was done off of a softcall, it really could hang up the system.
These changes brings the FreeBSD port more in line with the Solaris, Linux and NetBSD ports. It also, more importantly, gets us being more proactive about topology changes which could then be reflected upwards to CAM so that the periph driver can be informed sooner rather than later when things arrive or depart.
---
Add in the (correct) usage of locking macros- we now have lock transition macros which allow us to transition from holding the CAM lock (Giant) and grabbing the softc lock and vice versa. Switch over to having this HBA do real locking. Some folks claim this won't be a win. They're right. But you have to start somewhere, and this will begin to teach us how to DTRT for HBAs, etc.
--
Start putting in prototype 2300 support. Add back in LIP and Loop Reset as async events that each platform will handle. Add in another int_bogus instrumentation point.
Do some more substantial target mode cleanups.
MFC after: 8 weeks
|
75200 |
04-Apr-2001 |
mjacob |
Redo a lot of the target mode infrastructure to be cognizant of Dual Bus cards like the 1280 && the 12160. Cleanup isp_target_putback_atio. Make sure bus and correct tag ids and firmware handles get propagated as needed.
|
75198 |
04-Apr-2001 |
mjacob |
Roll platform minor.
Change target mode state definitions to be aware of 'channel' (for the dualbus 1280/12160 cards).
|
75197 |
04-Apr-2001 |
mjacob |
Complete some Ansification. Check to make sure, in tdma_mk, that we won't overflow the request queue. The reason we want to do this is that we now push out completed CTIOs as we complete them- this gets the QLogic working on them quicker. So we need to know whether we can put the entire burrito out before we start.
We now support conjoint status with data for the last CTIO for both Fibre Channel and SCSI. Leave the old code in place in case we need to go back (minor 3 line ifdef).
Ultra-ultra important- *don't* set rq->req_seg_count for non-data target mode requests in isp_pci_dmasetup. D'oh- this is actually the tag value area for a CTIO. What *was* I thinking? Boy howdy does both aic7xxx and sym get awfully unhappy when on reconnect you give them a constant '1' for a tag value.
|
75196 |
04-Apr-2001 |
mjacob |
Perform some more Ansification. Remove and then replace the isp_putback_atio function- we did it a bit cleaner. We only use this if a CTIO completes with !CT_OK state. We now have managed to get away without having to poke around and trying to find the original ATIO- the csio we're using has the tag_id and lun values with it which is mostly what we need when we do the putback.
Make sure we correctly propagate AT_TQAE->CT_TQAE for tags. Make sure we call ISP_DMAFREE only if we had DATA to move.
|
75195 |
04-Apr-2001 |
mjacob |
Amazing. The bits to enable tagged queing in target mode, grok that a tag is active for an ATIO, and say that you want to reconnect with a tag value in a CTIO have *never* been exercised until now. This lossage derived from Solaris code where this stuff originally came from that is about 7 years old. Amazing.
We now bundle the incoming tag (legal values are 0..256) as the low 16 bits of the ccb_accept_tio's at_tagid while we put the firmware handle for this ATIO in the top 16 bits- define some macros to make this cleaner.
Complete some Ansification.
|
75194 |
04-Apr-2001 |
mjacob |
Add some target mode definitions and firmware (FC only) attribute definitions.
|
75193 |
04-Apr-2001 |
mjacob |
Ansification of source.
|
75192 |
04-Apr-2001 |
mjacob |
After loading f/w, for FC cards print out Firmware Attributes.
Redo establishment of default SCSI parameters whether or not we've been compiled for target mode. Unfortunately, the Qlogic f/w is confused so that if we set all targets to be 'safe' (i.e., narrow/async), it will also then report narrow, async if we're contacted in target mode from that target (acting in initiator role). D'oh!
Fix ISPCTL_TOGGLE_TMODE to correctly enable the right channel for dual channel cards. Add some more opcodes. Fix a stupid NULL pointer bug.
|
74914 |
28-Mar-2001 |
jhb |
Catch up to header include changes: - <sys/mutex.h> now requires <sys/systm.h> - <sys/mutex.h> and <sys/sx.h> now require <sys/lock.h>
|
74544 |
21-Mar-2001 |
mjacob |
For parallel SCSI, let us now do status with the final CTIO. For the 1080, I was hanging after sending a xfer CTIO and a status CTIO for a non-discon INQUIRY- the xfer CTIO was returned as completed OK, but the status CTIO was dropped on the floor. All the fields looked good. I don't know why it got dropped. But allowing status to go back with data xfer seemed to work. I also noticed that with a non-disconnecting command that the firmware handle in the ATIO is zero- this leads me to believe that the f/w really can only handle one CTIO at a time in the discon case, and it had no idea what to do with the second (status) CTIO.
|
74543 |
21-Mar-2001 |
mjacob |
Check CT2_SENDSTATUS/CT_SENDSTATUS against cto->ct_flags, not CAM_SEND_STATUS. Set a timeout of 2 seconds per CTIO. Make sure that the 'real' tag value is being checked against- not the one that also carries the firmware handle.
|
74232 |
14-Mar-2001 |
mjacob |
Clean up usage- ct_reserved is really ct_syshandle now.
|
74231 |
14-Mar-2001 |
mjacob |
First cut of target mode swizzling for non-little endian machines. It's probably wrong but it's a start.
|
74230 |
14-Mar-2001 |
mjacob |
Mote that how the pad bytes can be divided in half and used by either the target mode code or outer layers.
Increase cd_tagval to be 32 bits since it will have to now carry 16 bits of parallel SCSI ATIO handle as well as a normal tag (if any).
|
74229 |
14-Mar-2001 |
mjacob |
In order to save ourselves grief with the SUNPRO compiler under Solaris (which, for reasons unknown to me, chokes on u_int16_t as a typedef of unsigned short if used in a transitional (mixed K&R and ANSI) way), we'll go the extra mile and fully ANSIfy things.
|
73531 |
04-Mar-2001 |
mjacob |
more 32 to 16 bit handle conversions
|
73530 |
04-Mar-2001 |
mjacob |
More 32 to 16 bit handle stuff. Roll core minor version.
|
73529 |
04-Mar-2001 |
mjacob |
Remove a superfluous newline in a string (isp_prt adds this). Fix a missed conversion of 32 to 16 bit handles.
|
73319 |
02-Mar-2001 |
mjacob |
Switch to using 16 bit handles instead of 32 bit handles. This is a pretty invasive change, but there are three good reasons to do this:
1. We'll never have > 16 bits of handle. 2. We can (eventually) enable the RIO (Reduced Interrupt Operation) bits which return multiple completing 16 bit handles in mailbox registers. 3. The !)$*)$*~)@$*~)$* Qlogic target mode for parallel SCSI spec changed such that at_reserved (which was 32 bits) was split into two pieces- and one of which was a 16 bit handle id that functions like the at_rxid for Fibre Channel (a tag for the f/w to correlate CTIOs with a particular command). Since we had to muck with that and this changed the whole handler architecture, we might as well...
Propagate new at_handle on through int ct_fwhandle. Follow implications of changing to 16 bit handles.
These above changes at least get Qlogic 1040 cards working in target mode again. 1080/12160 cards don't work yet.
In isp.c: Prepare for doing all loop management in outer layers.
|
73311 |
02-Mar-2001 |
mjacob |
Fix isp_print_qentry to print all four lines- it's been broken for months.
|
73280 |
01-Mar-2001 |
markm |
Turn on interrupt-entropy harvesting for all/any mass storage devices I could find. I have no doubt missed a couple.
Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl.
|
73247 |
01-Mar-2001 |
mjacob |
Eliminate the use of the getenv_int stuff we'd been using (with a bitmap for selecting unit). Instead, use the resource hints mechanism.
One unfortunate situation here is that there is no resource_quad_value function- which is what I needed for WWN boot time replacement. Worse- you can't store the hint as just plain
hint.isp.0.nodewwn="0x50000000aaaa0001"
because this gets interpreted as an int- incorrectly because it can't be converted to an int. I can't even get this as a string. To work around this particular case for nodewwn && portwwn setting, this rather grotesque form will be used:
hint.isp.0.nodewwn="w50000000aaaa0001" hint.isp.0.portwwn="w50000000aaaa0002"
At the same time, if we have no hinted WWN, set the default WWN (which, btw, gets overridden if the card has valid NVRAM, which is usual) to 0x400000007F000009ull (which translates to NAA == IPv4, 127.0.0.9).
Eliminate more printf's and replace them either with device_printf or isp_prt calls.
|
73246 |
01-Mar-2001 |
mjacob |
Go to a default port and default node wwn model. Eliminate isp_name and isp_unit and just store the device_t, fer gosh sakes.... Include sys/bus.h for use by isp_pci.c.
|
73245 |
01-Mar-2001 |
mjacob |
Finally eliminate as many of the printf calls as possible (still leaving ones where we have a CAM path) and replacing them with calls to isp_prt.,
Eliminate isp_unit references- we no longer have an isp_unit- we now have an isp_dev that device_get_unit can work with.
|
73115 |
27-Feb-2001 |
mjacob |
Fix at2_entry_t to reflect what the firmware actually writes (instead of just deriving from SCSI at_entry_t). In this case, there is no 'suggested sense' for FC cards.
|
72938 |
23-Feb-2001 |
mjacob |
Fix a longstanding bug- we had the sense of what bit 14 for the ICB firmware options meant- *I* had taken it to mean that if you set it, Node Name would be ignored and derived from Port Name. Actually, it meant the opposite. As a consequence- change ICBOPT_USE_PORTNAME to the define ICBOPT_BOTH_WWNS- makes more sense.
Fix wrong input bitmap for MBOX_DUMP_RAM command. Call ISP_DUMPREGS if we get a f/w crash. Add ISPCTL_RUN_MBOXCMD control command (so outer layers can run a mailbox command directly) and add a ISPASYNC_UNHANDLED_RESPONSE hook so outer layers can understand response queue entries we might not know about.
|
72355 |
11-Feb-2001 |
mjacob |
Eliminate ISP2100_FABRIC- we always allow for fabric now. Add an isp_iid_set/isp_iid for fibre channel- this is because we now fake a port database entry for ourselves. Add the additional loop states between LOOP_PDB_RCVD and LOOP_READY.
Change and comment on a wad of Fibre Channel isp_control functions. Change and comment on some of the ISPASYNC Fibre Channel events.
|
72354 |
11-Feb-2001 |
mjacob |
Add structure defining FC-AL position maps. The only tool that I know of that really uses this is luxadm(8) under Solaris.
|
72353 |
11-Feb-2001 |
mjacob |
Shuffle around how we do isp_disable management- make sure we return 0 so the unit number doesn't get reused.
Make sure that if we've compiled for ISP_TARGET_MODE we set the default role to be ISP_ROLE_INITIATOR|ISP_ROLE_TARGET.
Do some misc other cleanups.
|
72352 |
11-Feb-2001 |
mjacob |
Add isp_fc_runstate function- this function's purpose is to, in stages, and depending on role, make sure link is up, scan the fabric (if we're connected to a fabric), scan the local loop (if appropriate), merge the results into the local port database then, check once again to make sure we have f/w at FW_READY state and the the loopstate is LOOP_READY.
|
72348 |
11-Feb-2001 |
mjacob |
Roll minor version. Remove ISP2100_FABRIC define (unneeded now).
Comment out usage of ISP_SMPLOCK- I have my doubts that this works sanely as yet because CAM itself still needs Giant. I *was* dropping my lock and grabbing Giant when doing the upcall for completion, but this is all seems ridiculous until CAM is fixed.
|
72347 |
11-Feb-2001 |
mjacob |
Do some cleanup based upon adapter role- mainly not enabling interrupts if we're ISP_ROLE_NONE. Change ISPASYNC_LOGGED_INOUT to ISPASYNC_PROMENADE. Make sure we note if something is a fabric device.
Target mode: Finally fix (to a first approximation) SCSI Target Mode again- we needed to correctly check against CAM_TARGET_WILDCARD and CAM_LUN_WILDCARD so that targbh won't confuse us. Comment out the drainqueue stuff for now. Use isp_fc_runstate instead if isp_control/ISPCTL_FCLINK_TEST.
|
72346 |
11-Feb-2001 |
mjacob |
Minor stuff:
Remove ISP2100_FABRIC defines- we always handle fabric now. Insert isp_getmap helper function (for getting Loop Position map). Make sure we (for our own benefit) mark req_state_flags with RQSF_GOT_SENSE for Fibre Channel if we got sense data- the !*$)!*$)~*$)*$ Qlogic f/w doesn't do so. Add ISPCTL_SCAN_FABRIC, ISPCTL_SCAN_LOOP, ISPCTL_SEND_LIP, and ISPCTL_GET_POSMAP isp_control functions. Correctly send async notifications upstream for changes in the name server, changes in the port database, and f/w crashes. Correctly set topology when we get a ASYNC_PTPMODE event.
Major stuff: Quite massively redo how we handle Loop events- we've now added several intermediate states between LOOP_PDB_RCVD and LOOP_READY. This allows us a lot finer control about how we scan fabric, whether we go further than scanning fabric, how we look at the local loop, and whether we merge entries at the level or not. This is the next to last step for moving managing loop state out of the core module entirely (whereupon loop && fabric events will simply freeze the command queue and a thread will run to figure out what's changed and *it* will re-enable the queu). This fine amount of control also gets us closer to having an external policy engine decide which fabric devices we really want to log into.
|
72200 |
09-Feb-2001 |
bmilekic |
Change and clean the mutex lock interface.
mtx_enter(lock, type) becomes:
mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)
similarily, for releasing a lock, we now have:
mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument.
The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind.
Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two:
MTX_QUIET and MTX_NOSWITCH
The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers:
mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively.
Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case.
Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled.
Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those.
Finally, caught up to the interface changes in all sys code.
Contributors: jake, jhb, jasone (in no particular order)
|
72082 |
06-Feb-2001 |
asmodai |
Fix typo: wierd -> weird.
There is no such thing as wierd in the english language.
|
71094 |
16-Jan-2001 |
mjacob |
Guard against overflow of the calculated timeout value.
|
71079 |
15-Jan-2001 |
mjacob |
Add was_fabric_dev/fabric_dev tags to our local FC database structure (so we can see rapidly whether something was a fabric device but is now gone).
Add a tag which says what role this adapter should take. It can take on the value of None, Target, Initiator or Both. None is useful for warm failover purposes. Remove the ISP_CFG_NOINIT silliness since a role of "None" does this.
Add a isp_lastmbxcmd tag to store the opcode for the last mailbox command used.
|
71078 |
15-Jan-2001 |
mjacob |
Put in offset definitions for FPM and FBM registers, plus just enough bits defined so we can reset them.
|
71077 |
15-Jan-2001 |
mjacob |
Set default adapter role.
|
71076 |
15-Jan-2001 |
mjacob |
Use the isp_lastmbxcmd tag to report timed out mailbox commands.
Arrrggghhhh! Very likely fix 22650 by remembering to, ahem, set CAM_AUTOSNS_VALID when one has sense data.
|
71075 |
15-Jan-2001 |
mjacob |
Do more cleanup of the usage of 0..125 for F-port topologies.
|
71074 |
15-Jan-2001 |
mjacob |
When resetting the Qlogic 2X00 units, reset the FPM (Fibre Protocol Module) and FBM (Fibre Buffer Modules). Also remember to clear the semaphore registers. Tell the RISC processor to not halt on FPM parity errors.
Throw out the ISP_CFG_NOINIT silliness and instead go to the use of adapter 'roles' to see whether one completes initialization or not (mostly for Fibre Channel). The ultimate intent, btw, of all of this is to have a warm standby adapter for failover reasons. Because we do roles now, setting of Target Capable Class 3 service parameters in the ICB for the 2x00 cards reflects from role. Also, in isp_start, if we're not supporting an initiator role, we bounce outgoing commands with a Selection Timeout error. Also clean out the TOGGLE_TMODE goop for FC- there is no toggling of target mode like there is for parallel SCSI cards.
Do more cleanup with respect to using target ids 0..125 in F-port topologies. Also keep track of things which *were* fabric devices so that when you rescan the fabric you can notify the outer layers when fabric devices go away.
Only force a LOGOUT for fabric devices if they're still logged in (i.e., you cat their Port Database entry. Clean up the Get All Next scanning.
Finally, use a new tag in the softc to store the opcode for the last mailbox command used so we can report which opcode timed out.
|
70825 |
09-Jan-2001 |
mjacob |
ISPASYNC_PDB_CHANGED -> ISPASYNC_LOGGED_INOUT.
|
70824 |
09-Jan-2001 |
mjacob |
Add some SNS "Register FC4 type" subcommand defines. Add some defines that are pertinetnt for state flags on Qlogic 2X00 status completion entries.
|
70823 |
09-Jan-2001 |
mjacob |
Up tsleep && poll time for mailbox commands from 2 to 10 seconds. Print out the mailbox command opcode if the command times out.
|
70822 |
09-Jan-2001 |
mjacob |
Follow the ISPASYNC_PDB_CHANGED -> ISPASYNC_LOGGED_INOUT change. Also, ISPASYNC_NOTIFY_CHANGE now is for both local loop && fabric changes.
|
70821 |
09-Jan-2001 |
mjacob |
Add a isp_register_fc4_type function so that we work with McData switches that require us to register our FC4 types of interest. Allow ourselves, in F-port topologies, to start logging in fabric devices in the target 0..125 range. Change ISPASYNC_PDB_CHANGED (misnamed) to ISPASYNC_LOGGED_INOUT. Fix (*SMACK*) again some default WWN stuff. This is *really* hard to get right across all the range of platforms.
|
70820 |
09-Jan-2001 |
mjacob |
add missing length argument
|
70546 |
31-Dec-2000 |
mjacob |
Fix problems with incomplete conversions from printf to isp_prt.
|
70516 |
30-Dec-2000 |
mjacob |
Change the modification of what could be a const string. Apparently the construct:
char *foo; ... foo = "XXX"; ... foo[1] = 'Y';
is wrong. IT blew up on NetBSD-sparc64 because that platform write-protects constant strings.
|
70490 |
29-Dec-2000 |
mjacob |
Add in Bill Sommerfeld's -Wformat stuff. Add a ISP_CFG_NOINIT option to keep from completing initialization when isp_init is called.
|
70489 |
29-Dec-2000 |
mjacob |
Add in Bill Sommerfelds -Wformat changes. Set up default node && port WWNs correctly (Again!) - this time for the case that we're not going to fully init the adapter if isp_init is called (with ISP_CFG_NOINIT set in options). The pupose for this is to bring the adapter up to almost ready to go, get info out of NVRAM, but to not start it up- leaving it until later to actually start things up if wanted (and possibly with different roles selected).
|
70488 |
29-Dec-2000 |
mjacob |
Set up to do a local interrupt fielding before calling common code- allows us to grab lock as we should.
|
70487 |
29-Dec-2000 |
mjacob |
Make sure we do locking if we call isp_intr. Make sure we enter Giant for now if we call into cam for completion.
|
70457 |
28-Dec-2000 |
mjacob |
add a couple off offset defines for ATIO2s
|
69781 |
08-Dec-2000 |
dwmalone |
Convert more malloc+bzero to malloc+M_ZERO.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
|
69598 |
05-Dec-2000 |
mjacob |
Only call ISP_UNLOCK/ISP_LOCK if isp->isp_osinfo.intsok in USEC_SLEEP. Add a test against isp->isp_osinfo.islocked prior to trying to see whether --isp->isp_osinfo.islocked is zero to cause us to unlock (non-SMPLOCK case).
|
69597 |
05-Dec-2000 |
mjacob |
Replace some more printfs with isp_prt's. Use isp_prt/ISP_LOGDEBUG0 for rate setting/getting printouts.
|
69596 |
05-Dec-2000 |
mjacob |
Remove more printfs and use either isp_prt or device_printf. Remember to set ISP_LOGINFO if bootverbose is set.
|
69557 |
03-Dec-2000 |
dwmalone |
More M_ZERO patches.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: mjacob
|
69525 |
02-Dec-2000 |
mjacob |
Add USEC_SLEEP macro support. Change the location at which we define ISP_LOCK/ISP_UNLOCK macros.
|
69523 |
02-Dec-2000 |
mjacob |
Make the Not RESPONSE in RESPONSE QUEUE message have a bit more info (specifically, how many entries we've looked at so far). Maintain interrupt instrumentation. Use USEC_SLEEP instead of USEC_DELAY in a number of places (this allows us to drop locks and sleep instead of spin). Track changes to configuration options for topology preference. Fix botched order of printout for Channel, Target, Lun.
|
69522 |
02-Dec-2000 |
mjacob |
Add interrupt instrumentation. Change ISP_CFG_NPORT config option to a set of options that allows specific loop, loop-only, nport, nport-only topology settings. Define a required macro for all platforms (USEC_SLEEP).
|
68040 |
31-Oct-2000 |
mjacob |
I'm dropping the MAINTAINER request and see what happens. If it becomes too hard for me to keep in sync with other platforms, FreeBSD will go it's own way.
|
67550 |
25-Oct-2000 |
mjacob |
Get rid of ridiculous ISP_PVS macro. Instead, just set an ISP_SMPLOCK define based on the previous 5.4 major/minor release define of PVS- because this allows us to turn it off easier.
|
67549 |
25-Oct-2000 |
mjacob |
Whoops! Forgot to commit this when I committed the other (turnin on locks) change. Sorry about that.
|
67365 |
20-Oct-2000 |
jhb |
Catch up to moving headers: - machine/ipl.h -> sys/ipl.h - machine/mutex.h -> sys/mutex.h
|
67258 |
17-Oct-2000 |
mjacob |
Roll minor revision- for once we'll use this because.... if revision >= 5.4, compile time will build in mutex locks, otherwise the old locking (splcam/splx with a recursion counter) will be compiled in.
We still depend on config_intr_hook to tell us when it's okay to call msleep instead of polling. It'd be real nice if we could do this early enough to not hang up a machine struggling with a bad Fibre Channel loop, but that's still to come.
|
67257 |
17-Oct-2000 |
mjacob |
remove "SERVICING_INTERRUPT" nonsense
|
67164 |
15-Oct-2000 |
phk |
Remove unneeded #include <machine/clock.h>
|
67049 |
12-Oct-2000 |
mjacob |
Make changes required by change in how default and usable node and port WWNS are made and used.
|
67048 |
12-Oct-2000 |
mjacob |
Redo how default Node and Port WWNs are determined (again!). This is so we don't stomp on the differences between ports for a Qlogic 2202.
|
67047 |
12-Oct-2000 |
mjacob |
Change some default macro usages/definitions/requirements.
|
66189 |
21-Sep-2000 |
mjacob |
some copyright cleanups
|
66173 |
21-Sep-2000 |
mjacob |
Inintialize the queue index stuff from what the f/w sends back- just in case it's insane enough to not do what you tell it to.
Print out (LOGINFO level) initiator ID.
|
65588 |
07-Sep-2000 |
mjacob |
Per msmith's request, don't attach to Qlogic 12160 id'd cards that have a certain SubVendorID.
|
65176 |
28-Aug-2000 |
dfr |
* Completely rewrite the alpha busspace to hide the implementation from the drivers. * Remove legacy inx/outx support from chipset and replace with macros which call busspace. * Rework pci config accesses to route through the pcib device instead of calling a MD function directly.
With these changes it is possible to cleanly support machines which have more than one independantly numbered PCI busses. As a bonus, the new busspace implementation should be measurably faster than the old one.
|
65141 |
27-Aug-2000 |
mjacob |
remove clause 3 licence
|
65140 |
27-Aug-2000 |
mjacob |
various fixes
|
64176 |
03-Aug-2000 |
mjacob |
Add a comment as to where stdarg.h applies.
|
64174 |
03-Aug-2000 |
jhb |
Use <machine/stdarg.h> instead of <stdarg.h> so that this will compile. While I'm at it, move the #include line up to the top of the file.
|
64096 |
01-Aug-2000 |
mjacob |
Add in macros && masks so that mailbox command errors can be selectively printed/supressed in isp_mboxcmd.
|
64095 |
01-Aug-2000 |
mjacob |
Major whacking for core version 2.0. A major motivator for 2.0 and these changes is that there's now a Solaris port of this driver, so some things in the core version had to change (not much, but some).
In order, from the top.....:
A lot of error strings are gathered in one place at the head of the file. This caused me to rewrite them to look consistent (with respect to things like 'Port 0x%' and 'Target %d' and 'Loop ID 0x%x'.
The major mailbox function, isp_mboxcmd, now takes a third argument, which is a mask that selectively says whether mailbox command failures will be logged. This will substantially reduce a lot of spurious noise from the driver.
At the first run through isp_reset we used to try and get the current running firmware's revision by issuing a mailbox command. This would invariably fail on alpha's with anything but a Qlogic 1040 since SRM doesn't *start* the f/w on these cards. Instead, we now see whether we're sitting ROM state before trying to get a running BIOS loaded f/w version.
All CFGPRINTF/PRINTF/IDPRINTF macros have been replaced with calls to isp_prt. There are seperate print levels that can be independently set (see ispvar.h), which include debugging, etc.
All SYS_DELAY macros are now USEC_DELAY macros. RQUEST_QUEUE_LEN and RESULT_QUEUE_LEN now take ispsoftc as a parameter- the Fibre Channel cards and the Ultra2/Ultra3 cards can have 16 bit request queue entry indices, so we can make a 1024 entry index for them instead of the 256 entries we've had until now.
A major change it to fix isp_fclink_test to actually only wait the delay of time specified in the microsecond argument being passed. The problem has always been that a call to isp_mboxcmd to get he current firmware state takes an unknown (sometimes long) amount of time- this is if the firmware is busy doing PLOGIs while we ask it what's up. So, up until now, the usdelay argument has been a joke. The net effect has been that if you boot without being plugged into a good loop or into a switch, you hang. Massively annonying, and hard to fix because the actual time delta was impossible to know from just guessing. Now, using the new GET_NANOTIME macros, a precise and measured amount of USEC_DELAY calls are done so that only the specified usecdelay is allowed to pass. This means that if the initial startup of the firmware if followed by a call from isp_freebsd.c:isp_attach to isp_control(isp, ISP_FCLINK_TEST, &tdelay) where tdelay is 2 * 1000000, no more than two seconds will actually elapse before we leave concluding that the cable is unhooked. Jeez. About time....
Change the ispscsicmd entry point to isp_start, and the XS_CMD_DONE macro to a call to the platform supplied isp_done (sane naming).
Limit our size of request queue completions we'll look at at interrupt time. Since we've increased the size of the Request Queue (and the size of the Response Queue proportionally), let's not create an interrupt stack overflow by having to keep a max completion list (forw links are not an option because this is common code with some platforms that don't have link space in their XS_T structures). A limit of 32 is not unreasonable- I doubt there'd be even this many request queue completions at a time- remember, most boards now use fast posting for normal command completion instead of filling out response queue entries.
In the isp_mboxcmd cleanup, also create an array of command names so that "ABOUT FIRMWARE" can be printed instead of "CMD #8".
Remove the isp_lostcmd function- it's been deprecated for a while. Remove isp_dumpregs- the ISP_DUMPREGS goes to the specific bus register dump fucntion.
Various other cleanups.
|
64093 |
01-Aug-2000 |
mjacob |
Core version 2.0 rewrite. In this file we replace isp_tdebug with isp_prt calls. We now use an argument to the ISPCTL_FCLINK_TEST call. We change all IDPRINTF macros to isp_prt calls. We add the isp_prt function here.
|
64092 |
01-Aug-2000 |
mjacob |
Core version 2.0 cleanup/rewrite. Things get rearranged and changed quite a bit so that all of the ports have a similar set of required macros/definitions (and in similar places in the isp_<platform>.h file).
Some new macros/functions added- Mailbox Acquire/Relase macros, NANOTIME macros, SNPRINTf and STRNCAT. MemoryBarrier beomes MEMORYBARRIER with much stronger types.
|
64091 |
01-Aug-2000 |
mjacob |
Remove isp_prtstst (now in case statement in isp.c). Remove isp2100_fw_statename as an INLINE (now a function in isp.c). Remove isp2100_pdb_statename (unused). Redo all ISP_SCSI_XFER_T as XS_T types. Change all RQUEST_QUEUE_LEN/RESULT_QUEUE_LEN macros to take a parameter. Add isp_print_bytes function.
|
64090 |
01-Aug-2000 |
mjacob |
Remove isp_tdebug. Change all PRINTF macros to the now common isp_prt logging function.
|
64089 |
01-Aug-2000 |
mjacob |
Fix typo. Remove isp_tdebug (we'll use ISP_LOGTDEBUG2 in isp->isp_dblev as a selector now). Change DFLT_CMD_CNT to a fixed amount for now.
|
64088 |
01-Aug-2000 |
mjacob |
Add in lengths of SBus or PCI registers.
|
64087 |
01-Aug-2000 |
mjacob |
Rewrite for version 2.0. Some structural changes, but also a substantial amount of commenting about what each platform specific definitions are supposed to be.
|
64086 |
01-Aug-2000 |
mjacob |
Part of major rewrite for core version 2.0- clarification of mdvec structure, removal of printf/CFGPRINTF in place of isp_prt calls. Parameterization of RQUEST_QUEUE_LEN/RESULT_QUEUE_LEN.
|
63390 |
18-Jul-2000 |
mjacob |
Add in some new IN_XXX and CT_XXXX flags in preparation for the rototilling that !*$)~@!$_@*_(~@$*_(~@$*~@$* Qlogic F/W changes will need.
|
63388 |
18-Jul-2000 |
mjacob |
If debugging set, zero out an incoming response entry when we're done reading it (makes checking things easier). Before calling isp_notify_ack make sure we're at RUNSTATE- elsewise we can be responding to LIPs or SCSI bus resets before we've finished some of the wiring.
|
63387 |
18-Jul-2000 |
mjacob |
The SERVICING_INTERRUPT isn't quite safe yet.
|
63385 |
18-Jul-2000 |
mjacob |
Add a isp_target_putback_atio- we aren't using CCINCR at this time, so we need a function that tells the Qlogic f/w that a target mode command is done, so increase the resource count for that lun. Add in a timeout function to kick the putback again if we fail to do it the first time (we may not have the request queue space for ATIO push). Split the function isp_handle_platform_ctio into two parts so that the timeout function for the ATIO push or isp_handle_platform_ctio can inform CAM that the requested CTIO(s) are now done.
Clean up (cough) residual handling. What we need for Fibre Channel is to preserve the at_datalen field from the original incoming ATIO so we can calculate a 'true' residual. Unfortunately, we're not guaranteed to get that back from CAM. We'll *try* to find it hiding in the periph_priv field (layering violation)- but if an ATIO was passed in from user land- forget it. This means that we'll probably get residuals wrong for Fibre Channel commands we're completing with an error. It's too late to 4.1 release to fix this- too bad. Luckily the only device we'd really care about this occurring on is a tape device and they're still so rare as FC attached devices that this can be considered an untested combination anyway.
Remove all CCINCR usage (resource autoreplenish). When we've proved to ourself that things are working properly, we can add it back in.
Make sure we propage 'suggested' sense data from the incoming ATIO into the created system ATIO- and set sense_len appropriately. Correctly propagate tag values.
Fall back to the model of generating (well, the functions in isp_pci.c do the work) multiple CTIOs based upon what we get from XPT. Instead of being able to pair Qlogic generated ATIOs with CAM ATIOs, and then to pair CAM CTIOs with Qlogic CTIOs, we have to take the CTIO passed to us from XPT, and if it implies that we have to generate extra Qlogic CTIOs, so be it. This means that we have to wait until the last CTIO in a sequence we generated completes before calling xpt_done.
Executive summary- target mode actually now pretty much works well enough to tell folks about.
|
63383 |
18-Jul-2000 |
mjacob |
Raise debug level for some messages. Fix botched inversion about MBOX_COMMAND_ERROR vs. MBOX_COMMAND_PARAM_ERROR.
|
63380 |
18-Jul-2000 |
mjacob |
Keep interrupts blocked for all of isp_pci_attach. Redo DMA routines for target mode for cleanliness and accuracy.
|
62619 |
05-Jul-2000 |
mjacob |
Oops! If we're deciding a command is now really dead, make *darned* sure that it really is by issuing a ISPCTL_ABORT_CMD just on the off chance the f/w will start it up again and, ha ha, start using the DMA resources we gave it but are now taking away.
|
62618 |
05-Jul-2000 |
mjacob |
Clean up ISPCTL_ABORT_CMD function to not be too chatty if it succeeds, or even if it fails with INVALID_PARM (which just means that the handle doesn't refer to an active commane).
|
62500 |
04-Jul-2000 |
mjacob |
Remove obsolete isp_dogactive tag.
|
62499 |
04-Jul-2000 |
mjacob |
Fix completely stupid and idiotiuc sprintfs in isp_inline.h with with the STRNCAT function.
|
62498 |
04-Jul-2000 |
mjacob |
Add in config_hook for catching when interrupts are safe- this allows us to not the ints are ok and also to (re)ENABLE isp interrupts. Remove all splcam()/splx() invocates and replace them with ISP_LOCK/ISP_UNLOCK macros.
|
62496 |
04-Jul-2000 |
mjacob |
Add in isp_lock/isp_unlock inlines. Add in an islocked/intsok flag to isp_osinfo substructure (all in prep for SMP). Define MBOX_WAIT_COMPLETE and MBOX_NOTIFY_COMPLETE macros so that we can now (temp) use tsleep to wait for mailbox completion. Requires us to guess whether we're servicing an interrupt or not- will use intr_nesting_level.
Add local strncat function.
|
62495 |
04-Jul-2000 |
mjacob |
Change delay loop in new isp_mboxcmd to the use of the new MBOX_WAIT_COMPLETE macro. Change notification of completion of a mailbox command in isp_intr to MBOX_NOTIFY_COMPLETE macro.
|
62493 |
04-Jul-2000 |
mjacob |
Change startup locking. Use new isp_handle_index function for indexing off of handles to get dma maps.
|
62174 |
27-Jun-2000 |
mjacob |
Fix usage of DELAY (SYS_DELAY is the platform independent local define). Fix stupidity wrt checking whether we've gone to LOOP_PDB_RCVD loopstate- it's okay to be greater than this state. D'oh! Protect calls to isp_pdb_sync and isp_fclink_state with IS_FC macros.
Completely redo mailbox command routine (in preparation to make this possibly wait rather than poll for completion).
Make a major attempt to solve the 'lost interrupt' problem
1. Problem
The Qlogic cards would appear to 'lose' interrupts, i.e., a legitimate regular SCSI command placed on the request queue would never complete and the watchdog routine in the driver would eventually wakeup and catch it. This would typically only happen on Alphas, although a couple folks with 700MHz Intel platforms have also seen this.
For a long time I thought it was a foulup with f/w negotiations of SYNC and/or WIDE as it always seemed to happen right after the platform it was running on had done a SET TARGET PARAMETERS mailbox command to (re)enable sync && wide (after initially forcing ASYNC/NARROW at startup). However, occasionally, the same thing would also occur for the Fibre Channel cards as well (which, ahem, have no SET TARGET PARAMETERS for transfer mode).
After finally putting in a better set of watchdog routines for the platforms for this driver, it seemed to be the case that the command in question (usually a READ CAPACITY) just had up and died- the watchdog routine would catch it after ~10 seconds. For some platforms (NetBSD/OpenBSD)- an ABORT COMMAND mailbox command was sent (which would always fail- indicating that the f/w denied knowledge of this command, i.e., the f/w thought it was a done command). In any case, retrying the command worked. But this whole problem needed to be really fixed.
2. A False Step That Went in The Right Direction
The mailbox code was completely rewritten to no longer try and grab the mailbox semaphore register and to try and 'by hand' complete async fast posting completions. It was also rewritten to now have separate in && out bitpatterns for registers to load to start and retrieve to complete. This means that isp_intr now handles mailbox completions.
This substantially simplifies the mailbox handling code, and carries things 90% toward getting this to be a non-polled routine for this driver.
This did not solve the problem, though.
3. Register Debouncing
I saw some comments in some errata sheets and some notes in a Qlogic produced Linux driver (for the Qlogic 2100) that seemed to indicate that debouncing of reads of the mailbox registers might be needed, so I added this. This did not affect the problem. In fact, it made the problem worse for non-2100 cards.
5. Interrupt masking/unmasking
The driver *used* to do a substantial amount of masking/unmasking of the interrupt control register. This was done to make sure that the core common code could just assume it would never get pre-empted.
This apparently substantially contributed to the lost interrupt problem. The rewrite of the ICR (Interrupt Control Register), which is a separate register from the ISR (Interrupt Status Register) should not have caused any change to interrupt assertions pending. The manual does not state that it will, and the register layout seems to imply that the ICR is just an active route gate. We only enable PCI Interrupts and RISC Interrupts- this should mean that when the f/w asserts a RISC interrupt and (and the ICR allows RISC Interrupts) and we have PCI Interrupts enabled, we should get a PCI interrupt. Apparently this is a latch- not a signal route.
Removing this got rid of *most* but not all, lost interrupts.
5. Watchdog Smartening
I made sure that the watchdog routine would catch cases where the Qlogic's ISR showed an interrupt assertion. The watchdog routine now calls the interrupt service routine if it sees this. Some additional internal state flags were added so that the watchdog routine could then know whether the command it was in the middle of burying (because we had time it out) was in fact completed by the interrupt service routine.
6. Occasional Constipation Of Commands..
In running some very strenous high IOPs tests (generating about 11000 interrupts/second across one Qlogic 1040, one Qlogic 1080 and one Qlogic 2200 on an Alpha PC164), I found that I would get occasional but regular 'watchdog timeouts' on both the 1080 and the 2100 cards. This is under FreeBSD, and the watchdog timeout routine just marks the command in error and retries it.
Invariably, right after this 'watchdog timeout' error, I'd get a command completion for the command that I had thought timed out. That is, I'd get a command completion, but the handle returned by the firmware mapped to no current command. The frequency of this problem is low under such a load- it would usually take an 30 minutes per 'lost' interrupt.
I doubled the timeout for commands to see if it just was an edge case of waiting too short a period. This has no effect.
I gathered and printed out microtimes for the watchdog completed command and the completion that couldn't find a command- it was always the case that the order of occurrence was "timeout, completion" separated by a time on the order of 100 to 150 ms.
This caused me to consider 'firmware constipation' as to be a possible culprit. That is, resubmission of a command to the device that had suffered a watchdog timeout seemed to cause the presumed dead command to show back up.
I added code in the watchdog routine that, when first entered for the command, marks the command with a flag, reissues a local timeout call for one second later, but also then issues a MARKER Request Queue entry to the Qlogic f/w. A MARKER entry is used typically after a Bus Reset to cause the f/w to get synchronized with respect to either a Bus, a Nexus or a Target.
Since I've added this code, I always now see the occasional watchdog timeout, but the command that was about to be terminated always now seems to be completed after the MARKER entry is issued (and before the timeout extension fires, which would come back and *really* terminate the command).
|
62173 |
27-Jun-2000 |
mjacob |
Add in the enabling of interrupts (to isp_attach). Clean up a busted comment. Check against firmware state- not loop state when enabling target mode. Other changes have to do with no longer enabling/disabling interrupts at will.
Rearchitect command watchdog timeouts-
First of all, set the timeout period for a command that has a timeout (in isp_action) to the period of time requested *plus* two seconds. We don't want the Qlogic firmware and the host system to race each other to report a dead command (the watchdog is there to catch dead and/or broken firmware).
Next, make sure that the command being watched isn't done yet. If it's not done yet, check for INT_PENDING and call isp_intr- if that said it serviced an interrupt, check to see whether the command is now done (this is what the "IN WATCHDOG" private flag is for- if isp_intr completes the command, it won't call xpt_done on it because isp_watchdog is still looking at the command).
If no interrupt was pending, or the command wasn't completed, check to see if we've set the private 'grace period' flag. If so, the command really *is* dead, so report it as dead and complete it with a CAM_CMD_TIMEOUT value.
If the grace period flag wasn't set, set it and issue a SYNCHRONIZE_ALL Marker Request Queue entry and re-set the timeout for one second from now (see Revision 1.45 isp.c notes for more on this) to give the firmware a final chance to complete this command.
|
62172 |
27-Jun-2000 |
mjacob |
Clean up private storage so that we can use the spriv_field0 to store a bitmask of whether we've set a value into ccb->ccb_h.status, whether we're in the watchdog routine for this command now, whether we've set a grace period for this command and whether this command is actually done.
See comments of rev 1.45 of isp.c for more complete information.
|
62171 |
27-Jun-2000 |
mjacob |
Add 8 bits of volatile mailbox busy mask- this will be the bitmask of output mailbox values we want to get back out of the chip once a mailbox command is done. Add storage for the maximum number of output mailbox registers to the softc.
Roll minor version number.
|
62170 |
27-Jun-2000 |
mjacob |
Add mailbox bitmask macros (numbers of available mailbox registers based upon Qlogic chip type). Define maximum mailboxes. Add INT_PENDING_MASK macro. Change mailbox offset macro name.
|
62169 |
27-Jun-2000 |
mjacob |
Add an isp_handle_index function- this is prepatory to loading more into the handle (i.e., generation number), so we will now need a function that will take a handle and return a flat index [ 0 .. maxhandles-1 ] for auxillary routines that need an index to get at buddy store values (like dma maps or xflist pointers).
|
61785 |
18-Jun-2000 |
mjacob |
Clean up firmware load issues and remove darn near all config options. Force alphas to prefer mem mapping as the default.
Basically, we have a pointer to a function which we can call which will return us a pointer to firmware for the card we have. We call this function (if it's non-NULL) with the address of our mdvec f/w pointer.
The way this works is that if ispfw (as a module or a static) is loaded, it initializes the pointer in isp_pci, so we can call into to it to fetch a pointer to a f/w set.
If ispfw is MOD_UNLOADed, it's retained a pointer to our mdvec f/w pointers, which then get zeroed out so we don't have any references to data that's now gone from kernel memory. Removing the f/w saves ~360KBytes.
Alas, there is no autounload mechanism that works for is here.
|
61778 |
18-Jun-2000 |
mjacob |
Removing this bulky one large f/w file. This f/w is now in dev/ispfw.
|
61776 |
18-Jun-2000 |
mjacob |
Once we have firmware running (if isp_reset) and this is the first time through, establish what our LUN width is. Unfortunately, we can't ask the f/w. If we loaded the f/w, we'll now assume we have expanded LUNs (SCCLUN for fibre channel, just plain 32 LUN for SCSI). If we didn't load firmware, assume 8 LUNs for SCSI and 1 LUN for Fibre Channel. We have to assume only one LUN for Fibre Channel because the LUN setting in Request Queue entries is in different places whether we have SCCLUN firmware or not, so the only LUN guaranteed to work for both is LUN 0.
Clean up the rest of isp.c so that ISP2100_SCCLUN defines aren't used- instead use run time determinants based upon isp->isp_maxluns.
After starting firmware, delay 500us to give it a chance to get rolling.
Fix the interrupt service routine to check for both isr && sema being zero before thinking this was a spurious interrupt. Following the manuals, allow for both Mailbox as well as Queue Reponse type interrupts for regular SCSI.
|
61775 |
18-Jun-2000 |
mjacob |
Remove all ISP2100_SCCLUN define protected code and replace it with runtime checks.
|
61774 |
18-Jun-2000 |
mjacob |
Remove all ISP2100_SCCLUN define based code and replace it with runtime comparisons against the tag isp_maxluns- if > 16, we're SCCLUN based.
On initial regular SCSI startup, disable auto-disconnect.
|
61773 |
18-Jun-2000 |
mjacob |
Roll platform minor number. Force definition of SCSI_ISP_FABRIC (we always support fabric now). Remove SCCLUN definition (we always support SCCLUN now, if we load the f/w). Add typedef definition of an external firmware fetch function.
|
61772 |
18-Jun-2000 |
mjacob |
Roll core minor version. Set ISP_MAX_LUNS to be off of new isp_maxluns tag in softc.
|
61771 |
18-Jun-2000 |
mjacob |
add "disable autodisconnect" flags
|
61769 |
18-Jun-2000 |
mjacob |
cleanup i_int_X vs. uint_X definitions
|
61766 |
18-Jun-2000 |
mjacob |
add MBOX_GET_RESOURCE_COUNT command
|
61595 |
12-Jun-2000 |
mjacob |
Fix breakage to target mode support.
What we'd like to know is whether or not we have a listener upstream that really hasn't configured yet. If we do, then we can give a more sensible reply here. If not, then we can reject this out of hand.
Choices for what to send were Not Ready, Unit Not Self-Configured Yet (0x2,0x3e,0x00) for the former and Illegal Request, Logical Unit Not Supported (0x5,0x25,0x00) for the latter.
We used to decide whether there was at least one listener based upon whether the black hole driver was configured.
However, recent config(8) changes have made this hard to do at this time.
Actually, we didn't use the above quite yet, but were sure considering it.
|
60224 |
09-May-2000 |
mjacob |
Fix some breakage about how we build WWNs. Do some other fabric related changes: consider a new PDB entry different if Class 3 service parameter roles change (!!!). Do some checking as we're getting a port database that traps whether things change while we're doing so. Handle N-port and F-ports correctly. Fix the fabric login loop to retain a login/binding if things haven't changed (I mean, why logout a device only to log it back in). No longer accept, after fabric logins, garbage if we can't get a PDB entry that matches the device we've just logged into- if it doesn't, log it out as it is very unlikely to still be what we thought it was. Get rid of some of the debounce loops because we could get stuck there.
|
60222 |
09-May-2000 |
mjacob |
roll platform minor
|
60221 |
09-May-2000 |
mjacob |
Roll core minor version. Change our 'fabdev' tag to 'loggedin'.
|
60220 |
09-May-2000 |
mjacob |
Add in a watchdog routine to catch cases where we've dropped the command. Apparently the f/w has finished the command, but somehow an interrupt is being lost. So, we just plain wedge when booting alphas.
This is a general routine we've needed for a while.
|
60218 |
09-May-2000 |
mjacob |
The storage for WWN from NVRAM is actually the PORT WWN, not the NODE WWN.
|
60217 |
09-May-2000 |
mjacob |
Conrrect a macro with parenthesis.
|
59472 |
21-Apr-2000 |
mjacob |
Now that we fixed the isp_sendmarker botch, we can now do initial bus resets for ULTRA2/ULTRA3 cards again (which were turned off really because of a botch for dual bus configurations).
|
59454 |
21-Apr-2000 |
mjacob |
Roll minor version. Increase size (and add defines for) topology storage.
|
59453 |
21-Apr-2000 |
mjacob |
Some minor tweaklets.
|
59452 |
21-Apr-2000 |
mjacob |
Add in the now required malloc.h include. I guess somebody was busy hackin' w/o checking kernel compiles.
|
59451 |
21-Apr-2000 |
mjacob |
Pick up topology more sanely at f/w startup. Change the restrictions of where we can have targets (based on topology).
Much more importantly, make sure all mods to isp_sendmarker or |= so we don't lose the marking of a bus that needs to have a marker sent for it.
|
59450 |
21-Apr-2000 |
mjacob |
Update (finally) 1.15.37 to 1.19.03 for the 2100. This allows us to not require full logins after a LIP, which always led to loop resets, and various other perturbations.
Update 2200 f/w from 2.01.00 release to 2.01.09 release.
|
59391 |
19-Apr-2000 |
phk |
Remove ~25 unneeded #include <sys/conf.h> Remove ~60 unneeded #include <sys/malloc.h>
|
58100 |
15-Mar-2000 |
mjacob |
roll platform versions to 5.0
|
58000 |
13-Mar-2000 |
mjacob |
Don't do bus resets for ULTRA2 or later cards because what seems to happen currently is that several commands issued *after* the bus reset are then reported destroyed.
|
57587 |
29-Feb-2000 |
mjacob |
Add in mailbox return codes for failed fabric logins (port_id_used, loop_id_used, etc...)
Do a more precise structure for Get All Next name server responses.
Approved: jkh
|
57586 |
29-Feb-2000 |
mjacob |
Minor non-FreeBSD changes (keeping source sync'd). Approved: jkh
|
57585 |
29-Feb-2000 |
mjacob |
Prettier print of fabric devices being attached- say what kind of port they are (e.g., F_Port vs. N_Port).
Approved: jkh
|
57584 |
29-Feb-2000 |
mjacob |
Slightly cleaner fabric support (whiter whites! redder reds!).. No, seriously- only attempt to logout a previously logged in fabric device.
Fix a longstanding bug for aborting overtime commands- handle halves have always been reversed.
Clean up some error messages to indicate channel number.
Approved:jkh
|
57583 |
29-Feb-2000 |
mjacob |
Clean up defines for correct 12160/1080 exclusion. Final 4.0. approved: JKH
|
57217 |
15-Feb-2000 |
mjacob |
Fix ITDEBUG macro. Approved: jkh
|
57216 |
15-Feb-2000 |
mjacob |
Correctly identify which bus of dual bus SCSI adapters some target mode commands (enable/disable/modify lun && immediate notify) we're talking about.
Approved: jkh
|
57215 |
15-Feb-2000 |
mjacob |
Clean up some target mode debug messages. Fix (finally, I believe) Andrew's problems with SCSI on some alphas- do not call isp_update directly to update parameters- just mark them as being ready to update for the next command- the system would just hang on a READ CAPACITY for a drive. Really annoying because it wouldn't even timeout (and it has a timeout) so either the SET PARAMETERS call was nuking things or the f/w was really dropping the ball.
approved: jkh
Reviewed by: gallatin@freebsd.org
|
57214 |
15-Feb-2000 |
mjacob |
If the CDB length is greater than 12 for parallel SCSI, ispscsicmd has made the initial queue entry a EXTENDED CMD queue entry, so we have to go straight to continuation segments for any data segments.
approved: jkh
|
57213 |
15-Feb-2000 |
mjacob |
Clean out residual bogosity for fast posting stuff- ISP_NO_FASTPOST_SCSI is gone as a define. We just don't support fast posting for anything less than the 1240/1080/1280/12160 or Fibre Channel cards.
Put in support for CDB's larger than 12 bytes for parallel SCSI (up to 44 bytes are allowed).
Approved: jkh
|
57152 |
11-Feb-2000 |
mjacob |
Add in 12160 (Ultra3) support. Redo things to use the newbus code.
Approved: jkh@freebsd.org
PR: 16141
|
57151 |
11-Feb-2000 |
mjacob |
Turn back on fast posting- the code that turns it off (for 1020/1040) is now in isp.c
Approved: jkh@freebsd.org
|
57150 |
11-Feb-2000 |
mjacob |
Correct a minor typo in error message.
Approved: jkh@freebsd.org
|
57149 |
11-Feb-2000 |
mjacob |
Add in new async mbox defines for 2200- point to point stuff. Add in definitions for the extended initialization control block (2200 only again).
Approved: jkh@freebsd.org
|
57148 |
11-Feb-2000 |
mjacob |
Add in 12160 (Ultra3) NVRAM definitions.
Approved: jkh@freebsd.org
|
57147 |
11-Feb-2000 |
mjacob |
Add in 12160 (Ultra3) firmware. Gawd, this file is bulky.
Approved: jkh@freebsd.org
|
57146 |
11-Feb-2000 |
mjacob |
Restructure nvram reading routine to split out to separate functions for 1020/1X80/12160/2X00- for readability. Add in 12160 (Ultra3) support- but not with PPR just yet. Fix and clarify fetching of return parameter for getting firmware rev which for the 2200 contains the connection topology (Private Loop (NL-port), N-port, FL-port, F-port). Synthesize the connection topology for the 2100 which can only be Private Loop or FL-port. Handle a couple of new async mailbox commands which signify connection in Point-to-Point mode (N-port or F-port) or indicate various toe stubbing getting to same.
Approved: jkh@freebsd.org
|
57145 |
11-Feb-2000 |
mjacob |
Add 12160 (Ultra3) defines. Add config option flag for forcing point-to-point instead of FC-AL (2200 only).
Approved: jkh@freebsd.org
|
56381 |
21-Jan-2000 |
mjacob |
There seems to be some problems, particularly on alpha, with FAST POSTING enabled for parallel SCSI. Be sure about things and disable it for now.
|
56026 |
15-Jan-2000 |
mjacob |
Remove compile warning not seen when compiling with target mode enabled.
|
56009 |
15-Jan-2000 |
mjacob |
Redo FC target mode dma routine to try and generate an extra CTIO in the not so odd case of Moving Data *AND* Sending Status in last CTIO *AND* status is a CHECK CONDITION *AND* we have Sense Data to send.
|
56008 |
15-Jan-2000 |
mjacob |
clean up for SBus Ultra (yes, we do not do that here yet)
|
56007 |
15-Jan-2000 |
mjacob |
a whale of a lot of target mode cleanup
|
56006 |
15-Jan-2000 |
mjacob |
cleanup- it was not MI code as it should have been
|
56005 |
15-Jan-2000 |
mjacob |
cleanup
|
56004 |
15-Jan-2000 |
mjacob |
include public target mode functions
|
56003 |
15-Jan-2000 |
mjacob |
public target mode stuff
|
56002 |
15-Jan-2000 |
mjacob |
tighten up printout
|
55927 |
13-Jan-2000 |
mjacob |
add MAINTAINER file for clarity
|
55689 |
09-Jan-2000 |
mjacob |
change debug printout lefvels for a couple of places
|
55396 |
04-Jan-2000 |
mjacob |
oop, use PRINTF not printf in MI code
|
55387 |
04-Jan-2000 |
mjacob |
Clean up some debug printing. Find the correct lun when SCCLUN is defined. If we complete with a check condition but no sense data, say we had an AUTOSENSE failure.
|
55386 |
04-Jan-2000 |
mjacob |
Make Fibre Channel cards correctly note the presence/absence of ARQ data and punt the dealing with its presence/absence to the platform layers.
|
55385 |
04-Jan-2000 |
mjacob |
set default target mode debug to 0
|
55384 |
04-Jan-2000 |
mjacob |
add clarifying tag define for FC
|
55383 |
04-Jan-2000 |
mjacob |
Add in an isp_tdebug environment variable. Clean up some debugging printouts for clarity.
|
55373 |
04-Jan-2000 |
mjacob |
These are platform independent functions for target mode support. This is just a first pass at this and is likely to change a bit over the next month.
|
55372 |
03-Jan-2000 |
mjacob |
These are platform independent definitions for target mode support- code gratefully borrowed from Patrick Stirling who did a lot of the grunt work on this years ago. There are also some beginnings of swizzle macros in case we go to a big endian machine. This is just a first pass at this and is likely to change a bit over the next
|
55371 |
03-Jan-2000 |
mjacob |
Make a static chain of isp softcs- gdb usage becomes a lot easier. Add in a very large amount of target mode support code- this is just a first pass at this. It's a difficult thing because some of the code can be in platform independent areas (see isp_target.?) but a lot has to be in platform dependent areas because of not only the tight coupling of received commands/events and the specific OS subsystem but because the platform independent code has (deliberately) no event/wait mechanisms.
|
55370 |
03-Jan-2000 |
mjacob |
Raise default FCP logintime to 60 seconds. Move the position of where we could have seen the loop up at least once so it makes sense. Change some stuff in ispscsicmd so we don't get stuck there if the loop has never come up yet. Add in some target mode support code.
|
55369 |
03-Jan-2000 |
mjacob |
Support target mode operations. This involves having some variant dma mapping callback routines to select from as target mode entries are handled a fair bit differently from normal initiator mode entries.
|
55366 |
03-Jan-2000 |
mjacob |
Role platform minor revision. Add in some target mode only private structure definitions.
|
55365 |
03-Jan-2000 |
mjacob |
add isp_print_qentry inline function
|
55364 |
03-Jan-2000 |
mjacob |
Roll minor revision number and add a more finalized list of target mode related enums.
|
55363 |
03-Jan-2000 |
mjacob |
Add missing target mode flag and fix the RQSTYPE_CTIO0 to be CTIO as it should be.
|
55138 |
27-Dec-1999 |
mjacob |
Add in missing ENABLE TARGET MODE opcode.
|
54977 |
22-Dec-1999 |
mjacob |
Oops- got the initiator and initiator/target f/w reversed for the 1080/1240/1280 case.
|
54860 |
20-Dec-1999 |
mjacob |
Clean up lun width determination based upon f/w revisions for the parallel SCSI cards (4.55..4.65 :: 8.55..8.65).
|
54859 |
20-Dec-1999 |
mjacob |
Clean up some f/w revision checking wrt enabling fast posting. Make sure we set defaults sanely for dual-bus adapters.
|
54858 |
20-Dec-1999 |
mjacob |
add initiator-only mode f/w for 1040 && 1080/1280/1240
|
54671 |
16-Dec-1999 |
mjacob |
Add Dual LVD bus (1280) support
|
54059 |
03-Dec-1999 |
mjacob |
roll platform minor
|
54058 |
03-Dec-1999 |
mjacob |
clean up sprintf and have buffer that won't overflow
|
54057 |
03-Dec-1999 |
mjacob |
turn some messages into CFGPRINT messages
|
53490 |
21-Nov-1999 |
mjacob |
Clean up stupidity in the isp_handle_other_response function- indexes of queue entries have to be at least 16 bits now! If we're running a 2100 less than rev 5, turn off loop fairness (per Qlogic errata). Fix typo in checking against 2200 F/W revision. Slightly fix/reorder fabric login stuff. Change to usage of isp_getrqentry for code clarity. Add some defensive dual bus assumptions. Various cleanups, etc...
|
53489 |
21-Nov-1999 |
mjacob |
Add storage/access for a default WWN. A miscellaneous tweak or two.
|
53488 |
21-Nov-1999 |
mjacob |
Add a isp_getrqentry inline function (that is, find the next available request queue entry if any are left).
|
53487 |
21-Nov-1999 |
mjacob |
Fix some includes for when we (eventually) get target mode working again. Role the core version minor number. Change the arguments to the dma setup function to use a u_int16_t for the output request loop pointer (truly amazing that this hasn't blown up in anyones face so far). Do some shuffling around of some items.
|
53486 |
21-Nov-1999 |
mjacob |
Put *back* the f/w, this time with a BSD style licence as approved by Qlogic. The firmware is now also kept from compiling by default unless some config options are set.
While we're at it, roll the 2200 f/w to 2.01.0. Still need to get the 1.17.26 2100 f/w working as it solves a lot of problems but it doesn't want to work yet with this driver (:-)).
|
53484 |
21-Nov-1999 |
mjacob |
Fix dmasetup functions to have 16 bit queue indices. Get the chip revision out of the PCI CLASS reg and store it in the softc. Use the getenv_quad function to get a WWN override from the environment. Look for a config value for same. Make slightly less lame the wwn seed construction.
|
52903 |
05-Nov-1999 |
gallatin |
Remove calls to alpha_register_pci_scsi(). After Mike's recent boot changes, it no longer exists and is preventing alpha kernels from building.
reviewed by: msmith
|
52733 |
01-Nov-1999 |
mjacob |
correct moronic typo
|
52685 |
30-Oct-1999 |
mjacob |
Organize things to cope with the (possible) lack of downloadable firmware a bit better.
|
52684 |
30-Oct-1999 |
mjacob |
Remove firmware from tree until a better copyright from Qlogic is forthcoming.
|
52682 |
30-Oct-1999 |
mjacob |
Use pointer to f/w in md structure as to whether f/w exists or not. If firmware length isn't specified, extract from the 4th short into the firmware.
|
52579 |
28-Oct-1999 |
mjacob |
I was misinformed. I cannot get away from specifying tags for FC. Some devices are happy w/o them- some are unhappy (IBM drives).
|
52537 |
26-Oct-1999 |
mjacob |
nuke a debug printout I thought I had already nuked
|
52437 |
22-Oct-1999 |
mjacob |
remember to initialize mailbox 2 for FC isp bus resets
|
52351 |
17-Oct-1999 |
mjacob |
Add in inclusion of machine/md_var.h (so alpha_scsi_bus_register or what have you is prototyped). Removed code versions in md struct- not used any more. Allocate transfer dma maps and xflist stuff in mbxdmasetup based upon isp->isp_maxcmds. Allow for multiple calls to mbxdmasetup (for isp_reset cases).
|
52350 |
17-Oct-1999 |
mjacob |
Remove some target mode stuff. It will get re-introduced in a different file later. Do some pencil-sharpening types of minor changes. Change how active commands are remembered (using new inline functions to get handles, etc..). Now do a GET FIRMWARE STATUS after firing up the f/w as outgoing mailbox 2 will tell you the f/w's notion of the max commands that can be supported. Attempt to retrieve loop topology. Add in the appropriate SWIZZLE/UNSWIZZLE macros calls (this is a no-op on Little Endian machines but is needed for sparc (on other platforms)). Move the temp port database we use to find out where things have moved to after a LIP to the softc and off the kernel stack. Follow Qlogic's hint and don't bother setting a tag for commands that don't have this enabled (presumably the f/w will do it's own selection then). Use an INT_PENDING macro to check for an interrupt. The call to ISP_DMAFREE now just takes the handle- not the 'handle-1' which was a layering violation. Use CFGPRINTF in a couple of places to make things less chatty if not booting verbose, or CAMDEBUG compiles, etc..
|
52349 |
17-Oct-1999 |
mjacob |
Add in isp_debug variable. It defaults to zero unless CAMDEBUG is defined where it defaults to one. Change simq width allocation to the max number of commands supported by the HBA after f/w fires up- not the constant MAXISPREQUEST value. Do some stylistic changes.
|
52348 |
17-Oct-1999 |
mjacob |
Roll platform major && minor (major now tracks FreeBSD major release). Add in null SWIZZLE definitions. Add in CFGPRINTF define. Change default debug level to refer to an external isp_debug variable. Remove inline functions as they're now in isp_inline.h and include that file.
|
52347 |
17-Oct-1999 |
mjacob |
Roll core version number. Do some stylistic changes. Ensure that the result queue length is never less than 64. Move (ick) temp port database used for post-LIP merging off the kernel stack and put it into the softc. Remove some target mode stuff which will come back later in a different file. Change how the list of outstanding commands are stored (now allocated at mailbox setup time to be just enough for the max for a specific HBA which can vary). Keep a rotating seed of the last index for this in the softc. Increase the count of active commands from 10 to 16 bits.
|
52346 |
17-Oct-1999 |
mjacob |
add in an INT_PENDING macro
|
52345 |
17-Oct-1999 |
mjacob |
Remove target mode definitions (they'll come back later in a different file).
|
52342 |
17-Oct-1999 |
mjacob |
Add a file where inline functions for the Qlogic isp cards can go. This reduces duplication in all the platform specific header files.
|
52341 |
17-Oct-1999 |
mjacob |
roll 10[24]0 and 1080/12X0 f/w
|
52264 |
15-Oct-1999 |
mjacob |
Until we actually support SBus, there's no reason to keep the f/w in the tree.
|
52138 |
11-Oct-1999 |
mjacob |
remove unnecessary includes
|
50477 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
50275 |
24-Aug-1999 |
bde |
Cast pointers to uintptr_t instead of casting them to u_long, and/or vice versa. Cosmetic.
|
49915 |
16-Aug-1999 |
mjacob |
Clarify and cleanup some CAM queueing breakages.
|
49913 |
16-Aug-1999 |
mjacob |
add in SIMQFRZ_TIMED && CMD_RQLATER defines
|
49910 |
16-Aug-1999 |
mjacob |
add in new ICB structure variant (for 2200)
|
49909 |
16-Aug-1999 |
mjacob |
Clarify lun limits for FC && SCSI.
|
49907 |
16-Aug-1999 |
mjacob |
More code cleanup. Go back to using FULL_LOGIN Fibre Chan if f/w is less than 1.17.0 level. Change where we do the loop database init. Add in the CMD_RQLATER return. Add some register debounce.
|
49905 |
16-Aug-1999 |
mjacob |
Set some correct return values. Prefer I/O map all the time unless configured otherwise.
|
49860 |
16-Aug-1999 |
gibbs |
Properly set the alignment argument to bus_dma_tag_create(). If we don't care about the alignment, set it to 1, meaning single byte alignment.
|
48616 |
06-Jul-1999 |
mjacob |
add in (controlled by option) 2200 Expanded Lun F/W
|
48611 |
06-Jul-1999 |
mjacob |
add in a boot environment isp_disable flag
|
48605 |
05-Jul-1999 |
mjacob |
Wow- too much breakage..wait until you compile it, buckwheat...
|
48604 |
05-Jul-1999 |
mjacob |
Oops- got sense of ifdef wrong
|
48602 |
05-Jul-1999 |
mjacob |
add 2200 f/w; fix botched define
|
48600 |
05-Jul-1999 |
mjacob |
add ISP_DISABLE_2200_SUPPORT defines; Add reference to 2200 F/W
|
48499 |
03-Jul-1999 |
mjacob |
Well, don't try and probe 65535 luns- things just don't really work well when this happens. Limit to 16 luns for the 2100/2200 for now.
|
48489 |
02-Jul-1999 |
mjacob |
Remove pre-CAM code. Add in getenv_int calls for variables isp_mem_map, isp_io_map, isp_no_fwload, isp_fwload, isp_no_nvram, isp_fcduplex which are all bitmaps of isp instances that should or shouldn't map memory space, I/O space, not load f/w, load f/w, ignore nvram, not ignore nvarm, set full duplex mode. Also have an isp_seed value that we can use to generate a pseudo seed for a synthetic WWN. Other minor cosmetic cleanup. Add in support for the Qlogic ISP 2200. Very important change where we actually check now to see whether we were successful in mapping request and response queues (and fibre channel scratch space).
|
48488 |
02-Jul-1999 |
mjacob |
Remove all pre-CAM code. Fix breakage for SCCLUN when it is in fact ISP2100_SCCLUN. Make changes for how ISPASYNC_PDB_CHANGE_COMPLETE is now ISPASYNC_PDB_CHANGED. Add in ISPASYNC_FABRIC_DEV case.
|
48487 |
02-Jul-1999 |
mjacob |
Merge defunct isp_freebsd_cam.h into this file. Do some appropriate changes like rolling minor revision levels and defines where we now do default WWN seeding in the platform files.
|
48486 |
02-Jul-1999 |
mjacob |
Roll revision levels. Add support for the Qlogic 2200 (warn about not having SCSI_ISP_SCCLUN config defined if we don't have f/w for the 2200- it's resident firmware uses SCCLUN (65535 luns)). Change the way the default LoopID is gathered (it's now a platform specific define so that some attempt at a synthetic WWN can be made in case NVRAM isn't readable).
Change initialization of options a bit- don't use ADISC. Set FullDuplex mode if config options tells us to do so. Do not use FULL_LOGIN after LIP- it's the right thing to do but it causes too much loop disruption (Loop Resets). Sanity check some default values. Redo construction of port and node WWNs based upon what we have- if we have 2 in the top nibble, we can have distinct port and node WWNs. Clean up some SCCLUN related code that we obviously had never compiled (:-(). Audit commands coming int ispscsicmd and don't throw commands at Fibre devices that do not have Class 3 service parameters TARGET ROLE defined.
Clean up f/w initialization a bit. Add Fabric support (or at least the first blush of it). Whew - way too much to describe here. Basically, after a LIP, hang out until we see a Loop Up or a Port DataBase Change async event, then see if we're on a Fabric (GET_PORT_NAME of FL_PORT_ID). If we are, try and scan the fabric controller for fabric devices using the GetAllNext SNS subcommand. As we find devices, announce them to the outer layer. Try and do some guard code for broken (Brocade) SNS servers (that get stuck in loops- gotta maybe do this a different way using the GP_ID3 cmd instead). Then do a scan of the lower (local loop) ids using a GET_PORT_NAME to see if the f/w has logged into anything at that loop id. If so, then do a GET_PORT_DATABASE command. Do this scan into a local database. At this point we can say the loop is 'Ready'. After this, we merge our local loop port database with our stored port database- in a as yet to be really fully exercised fashion we try and follow the logic of something having moved around. The first time we see something at a Loop ID, we fix it, for the purpose of this system instance, at that Loop ID. If things shift around so it ends up somewhere else, we still keep it at this Loop ID (our 'Target') but use the new (moved) Loop ID when we actually throw commands at it. Check for insane cases of different Loop IDs both claiming to have the same WWN- if that happens, invalidate both. Notify the outer layer of devices that have arrived and devices that have gone away. *Finally*, when this is done, search the softc's database of Fabric devices and perform logout/login actions. The Qlogic f/w maintains logout/login for all local loop devices. We have to maintain logout/login for fabric devices- total PITA. Expect to see this area undergo more change over time.
|
48484 |
02-Jul-1999 |
mjacob |
Roll revision levels. Move DEFAULT_LOOPID definition to platform files. Change some fcp parameter structures such that we can get the portid (24 bit value), get both node and port WWN, know whether we're on a fabric or not, note whether we've ever seen the loop up, and note the current state of the loop.
Replace the isp_pdb_t structure in fcparams with a reduced cost structure that maintains a static relationship to 'Target', but can have the actual loop ID used change (in case, post LIP, we discover things have moved around). This also retains portid and node/port WWNs. This array gets larger if we have fabric support compiled in.
Note special loop IDs that are invariate for this device- FL_PORT_ID (0x7e) which tells us if there's a fabric controller present, FC_PORT_ID and FC_SNS_ID (fabric controller port and fabric SNS server port). We don't use the latter two for anything. IDs above FC_SNS_ID up through 255 are available for mapping fabric devices to 'target' ids.
Add in a config define to set FC full duplex mode. Add in a define to recognize the Qlogic 2200 boards. Add comments about ISPCTL commands. Add and change some ISPASYNC enumes.
|
48481 |
02-Jul-1999 |
mjacob |
Add in SNS and Fabric login/logout commands. Clean up ICBOPT defines. Remove INVALID_PDB_OPTIONS defines. Define generic SNS request and response structures and the bare minimum GAN and GP3 subcommands.
|
48480 |
02-Jul-1999 |
mjacob |
This file is now obsolete.
|
48471 |
02-Jul-1999 |
mjacob |
roll firmware for FC
|
48197 |
24-Jun-1999 |
mjacob |
(corrections for type change in softc)
|
48195 |
24-Jun-1999 |
mjacob |
Bruce pointed out I was being silly with volatile. Submitted by: bde@freebsd.org
|
47073 |
12-May-1999 |
mjacob |
When asked to get the current transfer settings go do a dev_refresh isp_update call to get a better chance at seeing whether a recent settings change has latched up.
|
47072 |
12-May-1999 |
mjacob |
be a bit more chatty about some speed negotiations
|
46972 |
11-May-1999 |
mjacob |
A large set of changes to handle dual bus adapters.
|
46971 |
11-May-1999 |
mjacob |
Some massive thwunking in initialization to handle dual bus adapters. More massive thwunking to include an XS_CHANNEL value. Some changes of how parameters are reported to outer layers (including bus, e.g.). Yet more stirring around in isp_mboxcmd to try and get it right. Decode of 1080/1240 NVRAM.
|
46970 |
11-May-1999 |
mjacob |
Add in SCSI_QFULL definitions. Add in local storage for second SIM for dual bus adapters. Add in XS_CHANNEL macro to get at it.
|
46969 |
11-May-1999 |
mjacob |
Clean up some sprintfs. Add in a SCSI_QFULL an XS_CHANNEL definition for 2.X versions. Disable fast posting for FC.
|
46968 |
11-May-1999 |
mjacob |
Roll core minor number. Re-layout a lot of SCSI fields to accomodate multiple bus adapters.
|
46967 |
11-May-1999 |
mjacob |
Clean up some macros. Add in ISP 1080/1240 NVRAM layout definitions.
|
46966 |
11-May-1999 |
mjacob |
add a couple of missing commands
|
46964 |
11-May-1999 |
mjacob |
Clean up 2.2.X support (which might have to be cleaned up again after some of the previous commits). Add in support for the 1240 dual channel ISP card. Try the dance of unmapping a PCI interrupt if we don't configure (if that ever works it'll be helpful).
|
46954 |
11-May-1999 |
mjacob |
roll ISP 1080/1240 f/w
|
46813 |
09-May-1999 |
peter |
Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add: #define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data) .. to 2.2.x and 3.x if people think it's worth it. Driver writers can do this if it's not defined. (The reason for this is that I'm trying to progressively eliminate use of linker_sets where it hurts modularity and runtime load capability, and these DATA_SET's keep getting in the way.)
|
46581 |
06-May-1999 |
ken |
Add a number of interrelated CAM feature enhancements and bug fixes.
NOTE: These changes will require recompilation of any userland applications, like cdrecord, xmcd, etc., that use the CAM passthrough interface. A make world is recommended.
camcontrol.[c8]: - We now support two new commands, "tags" and "negotiate".
- The tags commands allows users to view the number of tagged openings for a device as well as a number of other related parameters, and it allows users to set tagged openings for a device.
- The negotiate command allows users to enable and disable disconnection and tagged queueing, set sync rates, offsets and bus width. Note that not all of those features are available for all controllers. Only the adv, ahc, and ncr drivers fully support all of the features at this point. Some cards do not allow the setting of sync rates, offsets and the like, and some of the drivers don't have any facilities to do so. Some drivers, like the adw driver, only support enabling or disabling sync negotiation, but do not support setting sync rates.
- new description in the camcontrol man page of how to format a disk - cleanup of the camcontrol inquiry command - add support in the 'devlist' command for skipping unconfigured devices if -v was not specified on the command line. - make use of the new base_transfer_speed in the path inquiry CCB. - fix CCB bzero cases
cam_xpt.c, cam_sim.[ch], cam_ccb.h:
- new flags on many CCB function codes to designate whether they're non-immediate, use a user-supplied CCB, and can only be passed from userland programs via the xpt device. Use these flags in the transport layer and pass driver to categorize CCBs.
- new flag in the transport layer device matching code for device nodes that indicates whether a device is unconfigured
- bump the CAM version from 0x10 to 0x11
- Change the CAM ioctls to use the version as their group code, so we can force users to recompile code even when the CCB size doesn't change.
- add + fill in a new value in the path inquiry CCB, base_transfer_speed. Remove a corresponding field from the cam_sim structure, and add code to every SIM to set this field to the proper value.
- Fix the set transfer settings code in the transport layer.
scsi_cd.c:
- make some variables volatile instead of just casting them in various places - fix a race condition in the changer code - attach unless we get a "logical unit not supported" error. This should fix all of the cases where people have devices that return weird errors when they don't have media in the drive.
scsi_da.c:
- attach unless we get a "logical unit not supported" error
scsi_pass.c:
- for immediate CCBs, just malloc a CCB to send the user request in. This gets rid of the 'held' count problem in camcontrol tags.
scsi_pass.h:
- change the CAM ioctls to use the CAM version as their group code.
adv driver:
- Allow changing the sync rate and offset separately.
adw driver
- Allow changing the sync rate and offset separately.
aha driver:
- Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.
ahc driver:
- Allow setting offset and sync rate separately
bt driver:
- Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.
NCR driver:
- Fix the ultra/ultra 2 negotiation bug - allow setting both the sync rate and offset separately
Other HBA drivers: - Put code in to set the base_transfer_speed field for XPT_GET_TRAN_SETTINGS CCBs.
Reviewed by: gibbs, mjacob (isp), imp (aha)
|
46024 |
24-Apr-1999 |
peter |
Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn't hurt the driver portability to 3.x too much for where drivers are shared.
|
45682 |
14-Apr-1999 |
mjacob |
temp fix for internal queue overflow problem
|
45573 |
11-Apr-1999 |
eivind |
Staticize.
|
45287 |
04-Apr-1999 |
mjacob |
Make firmware revision a triple. Clean up some FC init stuff for board versions with no BIOS. Separate mailbox interrupts from IOCB interrupts. Read OUTMAILBOX5 while RISC_INT is active- not after you clear it (potential race condition). Clear out older broken BIG_ENDIAN goop. Don't negotiate narrow/async for LVD busses at startup if already in LVD mode. Note usage of presumptive 1040C revision. For all the LIP, PDB Changed, Loop UP/DOWN async events, mark fw state as unknown as well as marking the need to do a getpdb on targets- after a LIP for certain the f/w has to do PRLI/PLOGI for all targets again and marking f/w state as unknown gives us a fighting chance to (start to) hold up for that to complete.
|
45286 |
04-Apr-1999 |
mjacob |
oops on this last
|
45285 |
04-Apr-1999 |
mjacob |
F/W revisions now a tuple (not a duple). Fix pre-CAM code.
|
45284 |
04-Apr-1999 |
mjacob |
Fix for pre-CAM kernels (again). Turn back on fast posting.
|
45283 |
04-Apr-1999 |
mjacob |
Remove incorrect BIG_ENDIAN defines and substitute in the SBus only macros that will SBusify an isp header or the lun/target portions of a request IOCB- and have these only valid iff __sparc__ (no non-sparc SBus machine that *I* know about).
|
45282 |
04-Apr-1999 |
mjacob |
Change f/w revision to major,minor,micro version. Add in ISP1040C definition.
|
45281 |
04-Apr-1999 |
mjacob |
roll ISP1040 and ISP2100 f/w to latest release
|
45280 |
04-Apr-1999 |
mjacob |
Read the board revision and trim cache line size back from 16 to 1 for early revision 2100 boards. Make sure to turn ROM off for these boards.
|
45045 |
26-Mar-1999 |
mjacob |
Annoying little nigglet- apparently *some* Qlogic temporarily ignore settings you've just sent them and return random values if you follow the set by a get. This causes problems when you latter run a Tag-enabled command when you've command tagged mode off.
|
45041 |
25-Mar-1999 |
mjacob |
enable 1080 LVD support
|
45040 |
25-Mar-1999 |
mjacob |
Add in 1080 LVD support and some basis also for the 1240. The port database printout is now enabled.
|
45039 |
25-Mar-1999 |
mjacob |
roll internal tag level
|
45038 |
25-Mar-1999 |
mjacob |
roll internal tag level
|
44820 |
17-Mar-1999 |
mjacob |
Prep for 1080/1240 support. Those fine h/w engineers at Qlogic gave yet another internal register layout model for what is *still* the same architecture. I hope they saved billyuns of gates 'coz otherwise this is *really* annoying.
|
44819 |
17-Mar-1999 |
mjacob |
A wad of changes- prepping for 1080/1240 support (which caused a massive thwank in register layout goop). A different mboxcmd approach. Some PDB change infrastructure. Some better management of loopdown/loopup events (keep them distinct from resource starvation for simq freeze/unfreeze actions).
|
43794 |
09-Feb-1999 |
mjacob |
Cleanup. Set all PCI parameters of importance. Set a define that will allow us via config options prefer mem space to I/O space.
|
43793 |
09-Feb-1999 |
mjacob |
Roll internal release tag. Roll core version minor. Fix broken DPARM_DEFAULT define. Add a new config flag param (ISP_CFG_NONVRAM) whose intent it is to cause NVRAM to be ignored. Add ISPASYNC_LOOP_DOWN and ISPASYNC_LOOP_UP isp_async enums.
Amazingly enough, I did all my scsi_sa work recently without realizing that I had a broken isp card whose (unchangeable- it's an old old old isp1020) NVRAM has sync mode enabled, but disconnect/reconnect disabled- the ISP_CFG_NONVRAM is definitely warranted when you want to bloody well ignore the NVRAM and set something sensible.
|
43792 |
09-Feb-1999 |
mjacob |
clean up some NVRAM defines
|
43791 |
09-Feb-1999 |
mjacob |
Add in defines that disable (temp) fast posting.
|
43790 |
09-Feb-1999 |
mjacob |
Allow fibre channel 'bus resets' to go through. Handle Loop Down/Loop Up events by freezing/unfreezing the simq- nice to have such control at this level! Do bus resets in attach layer (non-CAM defined code).
|
43789 |
09-Feb-1999 |
mjacob |
Roll internal release tag. Print out if we're in a 64 bit PCI slot. Use fast memory timing NVRAM parameter. Clean up and fix establishment of default target parameters. Don't use NVRAM if are flagged as not to do so (I had a busted NVRAM setup which I couldn't edit that enabled SYNC mode but disabled disconnect/reconnect and wide!!). Fix delays after resets. BUS resets not done in isp_init anymore- relegated to OS specific outer layers. Fix a buglet where you can get in a loop for a NULL xs in the completion list in isp_intr. Add in some defines that can disable fast posting. Add in code for Loop Up/Loop Down events that call into the outer layers as to what to do.
|
43788 |
09-Feb-1999 |
mjacob |
roll internal release tag
|
43420 |
30-Jan-1999 |
mjacob |
Implement and use Fast Posting for both parallel && fibre. Redo a bit of the startup code. Implement a call to outer framework function so that asynchronous events can be handled (e.g., speed negotiation, target mode).
Roll internal release tags.
|
43419 |
30-Jan-1999 |
mjacob |
Grrr.. Do the *correct* and *usable* 1.31 firmware. You have to power cycle to get rid of the old 1.31 firmware. *@!$&^@&$!&^&^!!!!!
But anyway comment it out and use new SBus 7.55 firmware. We get fast posting with this as well as 32 luns and target mode support.
(not that this is used yet in FreeBSD, but it's ready for FreeBSD-sparc whenever it happens....)
|
43417 |
30-Jan-1999 |
mjacob |
roll internal release tag
|
43416 |
30-Jan-1999 |
mjacob |
roll internal release tag
|
42472 |
10-Jan-1999 |
mjacob |
Suggested by bde@freebsd.org- memcpy not necessarily good to use. D'oh- not in the BSD DKI. Stop being lazy and finish the defines so MEMCPY becomes bzero for FreeBSD.
|
42462 |
10-Jan-1999 |
mjacob |
Add some prototype deadchip detection. Set FIFO bursting (1XX0 only- it's already on for the 2XX0) and detect the broken 1040A FIFO. Change bzero to MEMZERO (portability with **nux). Use memcpy for same reason.
Finally detect QUEUE FULL conditions and return this as an error that will get cam_periph_error to do it's 'tagged openings now XXX' dance.
|
42461 |
10-Jan-1999 |
mjacob |
up isp_fifo_threshold NVRAM storage to 3 bits (for future 128 bit)
|
42460 |
10-Jan-1999 |
mjacob |
add MEMZERO portability defines
|
42458 |
10-Jan-1999 |
mjacob |
Amazingly stupid forgetfullness had me forgetting to turn on FIFO bursts for the 1XX0 cards. That cost > 50% performance.
|
42132 |
28-Dec-1998 |
mjacob |
clarify headers;ansify
|
42131 |
28-Dec-1998 |
mjacob |
clarify headers;move uninit to outer layer;remove watchdog
|
41771 |
14-Dec-1998 |
dillon |
probe function changed from returning char * to const char *.
|
41525 |
05-Dec-1998 |
mjacob |
oops on last
|
41524 |
05-Dec-1998 |
mjacob |
Remove the Target mode functions until they're in better shape. Implement some suggested compilation cleanups from Eklund. Wire down a hard loop id if we are not on a platform that has the ability to get to a PCI BIOS (it still will float to the ID it gets after a LIP but at least we can try). Clarify that the expanded lun is based upon SCCLUN defines (in f/w).
|
41523 |
05-Dec-1998 |
mjacob |
make a real "done" func; clarify some LUN widths
|
41522 |
05-Dec-1998 |
mjacob |
compilation fixes from Eklund
|
41521 |
05-Dec-1998 |
mjacob |
compilation fixes from Eklund && move XS_CMD_DONE to be a real function
|
41520 |
05-Dec-1998 |
mjacob |
do a bit of cleanup on some target mode structures and clarify a couple other minro things
|
41519 |
05-Dec-1998 |
mjacob |
roll core version minor and wire a non-i386 default Loop ID to 113
|
41518 |
05-Dec-1998 |
mjacob |
offset was wrong for HARDLOOPID in NVRAM
|
41517 |
05-Dec-1998 |
mjacob |
Roll to 1.15 f/w level for Qlogic 2100. Leave all flavors in, but control which one gets compiled in by default. The default is private loop, non-expanded lun.
|
41516 |
05-Dec-1998 |
mjacob |
roll to 1.31 level
|
41515 |
05-Dec-1998 |
mjacob |
trivial header fix
|
41514 |
04-Dec-1998 |
archie |
Examine all occurrences of sprintf(), strcat(), and str[n]cpy() for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc.
These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer.
Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
|
40419 |
15-Oct-1998 |
gibbs |
-Wunused cleanup.
Submitted by: Poul-Henning Kamp <phk@freebsd.org>
|
40418 |
15-Oct-1998 |
gibbs |
Honor CAM_TAG_ACTION_NONE.
|
40353 |
14-Oct-1998 |
mjacob |
Andrew Gallatin reported some internal queue overflows with MAXISPREQUEST at 256. So- to be safe, let's roll back to 64 while we do some more investigating.
|
39683 |
26-Sep-1998 |
dfr |
Add hooks so that the alpha can detect which disk has the root partition.
|
39459 |
18-Sep-1998 |
mjacob |
Bump request queue size up to full amount (now that we have a contiguous CCB memory allocation).
|
39445 |
18-Sep-1998 |
mjacob |
(requested by gibbs) Remove the SCSI_CAM option (and rework the isp driver that had depended on it for compilation within or without CAM to use __FreeBSD_version instead).
|
39440 |
17-Sep-1998 |
mjacob |
per bde (who is right about this) that an inlined fucntion with const char * strings being returned defined in a header file included several places but only used in one module, is, uh, silly.
|
39439 |
17-Sep-1998 |
mjacob |
Cleanliness. Don't leave defined a const char array that's only used if target mode is defined (which it isn't, yet).
|
39435 |
17-Sep-1998 |
mjacob |
A major amount of cleaning up: + Change some messages about CCB memory allocation + Turn a failure to DMA map all of a transaction due to lack of ISP queue entries into a requeue operation (instead of the case where it had been treated the same as a DMA too big operation). + put back splsoftvm around bus_dmamap_load calls. + cleanup (and fix a glaring bug) in the and of the dma setup routine. Also, the dma setup routines either return CMD_QUEUED (for success) or CMD_COMPLETE (for failure) or CMD_EAGAIN (for requeuing for resource shortage reasons).
|
39434 |
17-Sep-1998 |
mjacob |
Clean up a comment. Make the default debugging level contingent upon CAMDEBUG.
|
39433 |
17-Sep-1998 |
mjacob |
Remove commented out and no longer pertinent EAGAIN message. Redo CMD_COMPLETE logic for returns from inner layer (just make sure that a CAM_REQ_INPROG doesn't get xpt_done'd).
|
39432 |
17-Sep-1998 |
mjacob |
ISP_DMASETUP now returns a value to be possibly punted to outer layers. Turn request queue overflow messages into debug messages. Ensure on isp_restarts that we nullify the xflist array.
|
39431 |
17-Sep-1998 |
mjacob |
Roll revision, clean up a comment.
|
39378 |
16-Sep-1998 |
mjacob |
Fix the (unported) resource shortage case- I'd done a xpt_freeze_simq but had never done a CAM_RELEASE_SIMQ to restart the queues.
|
39365 |
16-Sep-1998 |
mjacob |
Alpha port related fixes from Doug Rabson. Submitted by: dfr
|
39364 |
16-Sep-1998 |
mjacob |
alpha port fixes from Doug. Reviewed by: dfr
|
39315 |
15-Sep-1998 |
mjacob |
fix reported compile error flying blind- I do not have the new compiler yet
|
39247 |
15-Sep-1998 |
gibbs |
Convert ISP pci front end to CAM/bus space/dma.
Convert ncr driver to CAM.
|
39240 |
15-Sep-1998 |
gibbs |
Contents were duplicated.
|
39235 |
15-Sep-1998 |
gibbs |
Update QLogic ISP support for CAM. Add preliminary target mode support.
Submitted by: Matthew Jacob <mjacob@feral.com>
|
38232 |
10-Aug-1998 |
bde |
Use [u]intptr_t instead of [unsigned] long to convert and/or represent pointers.
This finishes fixing conversions between pointers and integers of possibly different sizes in GENERIC.
|
37858 |
25-Jul-1998 |
mjacob |
minphys means something different in FreeBSD than in NetBSD- not needed here and in the way
|
37618 |
13-Jul-1998 |
bde |
Fixed printf format errors (only 1 left in GENERIC now).
|
36767 |
08-Jun-1998 |
bde |
Fixed pedantic semantics errors (bitfields not of type int, signed int or unsigned int (this doesn't change the struct layout, size or alignment in any of the files changed in this commit, at least for gcc on i386's. Using bitfields of type u_char may affect size and alignment but not packing)).
|
35597 |
01-May-1998 |
bde |
Support compiling with `gcc -ansi'. Just use __inline instead of inline. [__]inline is only used to bloat the code here. It gives a separate copy of all the strings for each time this header is included...
Fixed misuse of __P(()).
|
35429 |
24-Apr-1998 |
mjacob |
Oops- osreldate.h is not around like I thought it would be... hmmm.. quick fix to get around this
|
35389 |
22-Apr-1998 |
mjacob |
Add support for the Qlogic ISP SCSI && FC/AL Adapters
|
35388 |
22-Apr-1998 |
mjacob |
Add support for the Qlogic ISP SCSI && FC/AL Adapters
|