348483 |
31-May-2019 |
ken |
MFC r348247: ------------------------------------------------------------------------ r348247 | ken | 2019-05-24 13:58:29 -0400 (Fri, 24 May 2019) | 57 lines
Fix FC-Tape bugs caused in part by r345008.
The point of r345008 was to reset the Command Reference Number (CRN) in some situations where a device stayed in the topology, but had changed somehow.
This can include moving from a switch connection to a direct connection or vice versa, or a device that temporarily goes away and comes back. (e.g. moving to a different switch port)
There were a couple of bugs in that change: - We were reporting that a device had not changed whenever the Establish Image Pair bit was not set. That is not quite correct. Instead, if the Establish Image Pair bit stays the same (set or not), the device hasn't changed in that way.
- We weren't setting PRLI Word0 in the port database when a new device arrived, so comparisons with the old value for the Establish Image Pair bit weren't really possible. So, make sure PRLI Word0 is set in the port database for new devices.
- We were resetting the CRN whenever the Establish Image Pair bit was set for a device, even when the device had stayed the same and the value of the bit hadn't changed. Now, only reset the CRN for devices that have changed, not devices that sayed the same.
The result of all of this was that if we had a single FC device on an FC port and it went away and came back, we would wind up correctly resetting the CRN.
But, if we had multiple devices connected via a switch, and there was any change in one or more of those devices, all of the devices that stayed the same would also have their CRN values reset.
The result, from a user standpoint, is that the tape drives, etc. would all start to time out commands and the initiator would send aborts.
sys/dev/isp/isp.c: In isp_pdb_add_update(), look at whether the Establish Image Pair bit has changed as part of the check to determine whether a device is still the same. This was causing erroneous change notifications. Also, when creating a new port database entry, initialize the PRLI Word 0 values.
sys/dev/isp/isp_freebsd.c: In isp_async(), in the changed/stayed case, instead of looking at the Establish Image Pair bit to determine whether to reset the CRN, look at the command value. (Changed vs. Stayed.) Only reset the CRN for devices that have changed. ------------------------------------------------------------------------
Sponsored by: Spectra Logic Approved by: re (gjb) |
347894 |
16-May-2019 |
ken |
MFC r345008: ------------------------------------------------------------------------ r345008 | ken | 2019-03-11 10:21:14 -0400 (Mon, 11 Mar 2019) | 59 lines
Fix CRN resets in the isp(4) driver in certain situations.
The Command Reference Number (CRN) is part of the FC-Tape features that we enable when talking to tape drives. It starts at 1, and goes to 255 and wraps around to 1. There are a number of reset type conditions that result in the CRN getting reset to 1. These are detailed in section 4.10 (table 8) of the FCP-4r02b specification.
One of the conditions is when a PRLI (Process Login) is sent by the initiator, and the Establish Image Pair bit is set in Word 0 of the PRLI.
Previously, the isp(4) driver core sent a notification via isp_async() that the target had changed or stayed in place, but there was no indication of whether a PRLI was sent and whether the Establish Image Pair bit was set.
The result of this was that in some situations, notably switching back and forth between a direct connection and a switch connection to a tape drive, the isp(4) driver would fail to reset the CRN in situations that require it according to the spec. When the CRN isn't reset in a situation that requires it, the tape drive then rejects every subsequent command that is sent to the drive. It is assuming that the commands are being sent out of order.
So, modify the isp(4) driver to include Word 0 of the PRLI command when it sends isp_async() notifications of target changes. Look at the Establish Image Pair bit, and reset the CRN if that bit is set.
With this change, I am able to switch a tape drive back and forth between a direct connection and a switch connection, and the isp(4) driver resets the CRN when it should.
sys/dev/isp_stds.h: Add bit definitions for PRLI Word 0.
sys/dev/ispmbox.h: Add PRLI Word 0 to the port database type, isp_pdb_t.
sys/dev/ispvar.h Add PRLI Word 0 to fcportdb_t.
sys/dev/isp.c: Populate the new prli_word0 parameter in the port database.
In isp_pdb_add_update(), add a check to see if the Establish Image Pair bit is set in PRLI Word 0. If it is, then that is an additional reason to create a change notification.
sys/dev/isp_freebsd.c: In isp_async(), if the device changed or stayed, look at PRLI Word 0 to see if the Establish Image Pair bit is set. If it is, reset the CRN if we haven't already.
Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D19472
------------------------------------------------------------------------ |
344911 |
08-Mar-2019 |
mav |
MFC r344661, r344669: Limit 24xx adapters to only MSI interrupts by default.
This was actually the known good configuration we used before. Single MSI-X configuration doesn't even work there on my tests, just due to lack of documentation not sure whether by design or I am doing something wrong.
PR: 233654 |
344909 |
08-Mar-2019 |
mav |
MFC r344660: Add to isp(4) tunables to limit MSI/MSI-X usage.
There are some problem reports possibly related to the new driver use of multiple interrupts on older cards. Hopefully this allow to workaround them. |
331722 |
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re) |
331634 |
27-Mar-2018 |
brooks |
MFC r330876, r330945
r330876: Fix ISP_FC_LIP and ISP_RESCAN on big-endian 64-bit systems.
For _IO() ioctls, addr is a pointer to uap->data which is a caddr_t. When the caddr_t stores an int, dereferencing addr as an (int *) results in truncation on little-endian 64-bit systems and corruption (owing to extracting top bits) on big-endian 64-bit systems. In practice the value of chan was probably always zero on systems of the latter type as all such FreeBSD platforms use a register-based calling convention.
Reviewed by: mav Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14673
r330945: Add opt_compat.h to isp(4) as required by r330876. |
331335 |
22-Mar-2018 |
mav |
MFC r330963: Increase ABOUT FIRMWARE command timeout to 5s.
It seems default timeout of 100ms is not enough for my 2694L card, while it was perfectly fine for others, even for full-height 2694. |
330897 |
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg |
330888 |
14-Mar-2018 |
mav |
MFC r330121: Add support for Enhanced Gen 5 (16Gb) and Gen 6 (32Gb) QLogic FC HBAs.
Sponsored by: iXsystems, Inc. |
323013 |
30-Aug-2017 |
mav |
MFC r322821: Add missing restart_queue initialization. |
321944 |
02-Aug-2017 |
ken |
MFC r321622, r321623:
------------------------------------------------------------------------ r321622 | ken | 2017-07-27 09:33:57 -0600 (Thu, 27 Jul 2017) | 44 lines
Fix probing FC targets with hard addressing turned on.
This largely reverts FreeBSD SVN change 289937 from October 25th, 2015.
The intent of that change was to keep loop IDs persistent across chip reinits.
The problem is that the change turned on the PREVLOOP / PREV_ADDRESS bit (bit 7 in Firmware Options 2), which tells the Qlogic chip to not participate in the loop if it can't get the requested loop address. It also turned off soft addressing on 2400 (4Gb) and newer controllers.
The isp(4) driver defaults to loop address 0, and the tape drives I have tested default to loop address 0 if hard addressing is turned on. So when hard loop addressing is turned on on the drive, the isp(4) driver just refuses to participate in the loop.
The solution is to largely revert that change. I left some elements in place that are related to virtual ports, since they were new.
This does work with IBM tape drives with hard and soft addressing turned on. I have tested it with 4Gb, 8Gb, and 16Gb controllers.
sys/dev/isp.c: Largely revert FreeBSD SVN change 289937. I left the ispmbox.h changes in place.
Don't use the PREV_ADDRESS bit on initialization. It tells the chip to not participate if it can't get the requested loop ID.
Do use soft addressing on 2400 and newer chips.
Use hard addressing when the user has requested a specific initiator ID. (hint.isp.X.iid=N in /boot/loader.conf)
Leave some of the virtual port options from that change in place, but don't turn on the PREV_ADDRESS bit.
Reviewed by: mav Sponsored by: Spectra Logic
------------------------------------------------------------------------ r321623 | ken | 2017-07-27 09:51:56 -0600 (Thu, 27 Jul 2017) | 6 lines
Remove duplicate assignments from r321622.
Submitted by: mav Sponsored by: Spectra Logic
------------------------------------------------------------------------ |
321870 |
01-Aug-2017 |
mav |
MFC r320604, r320865: Switch fabric scans from GID_FT to GID_PT+GFF_ID/GFT_ID.
Instead of using GID_FT SNS request to get list of registered FCP ports, use GID_PT to get list of all Nx_Ports, and then use GFF_ID and/or GFT_ID requests to find whether they are FCP and target capable.
The problem with old approach is that GID_FT does not report ports without FC-4 type registered. In particular it was impossible to boot OS from FreeBSD FC target using QLogic FC BIOS, since one does not register FC-4 type even on new cards and so ignored by old code as incompatible.
As a side bonus this allows initiator to skip pointless logins to other initiators by fetching that information from SNS instead.
In case some switches do not implement GFF_ID/GFT_ID correctly, add sysctls to disable that functionality. I handled broken GFF_ID of my Brocade 200E, but there may be other switches with different bugs.
Linux also uses GID_PT, but GFF_ID is disabled by default there, and GFT_ID is not supported.
Sponsored by: iXsystems, Inc. |
321869 |
01-Aug-2017 |
mav |
MFC r320575: Move comment respecting previous commit. |
321868 |
01-Aug-2017 |
mav |
MFC r320574: Slightly unify SNS requests for post- and pre-24xx. |
321867 |
01-Aug-2017 |
mav |
MFC r320492: Polish target_id/target_lun setting for ATIOs/INOTs.
For ATIOs it is pointless to report isp_loopid to CAM, since in other places it operates with port database record IDs, not with loop IDs.
For INOTs target_id/target_lun seems were never set, so wildcard INOTs probably were not working correctly when LUN IDs were important. |
318148 |
10-May-2017 |
ken |
MFC r317740:
Correct loop mode CRN resets to adhere to FCP-4 section 4.10
Prior to this change, the CRN (Command Reference Number) is reset on any firmware LIP, LOOP DOWN, or LOOP RESET event in violation of FCP-4 which specifies that the CRN should only be reset in response to a LIP Reset (LIPyx) primitive. FCP-4 also indicates PLOGI/LOGO and PRLI/PRLO ELS actions as conditions for resetting the CRN for the associated initiator port.
These violations manifest themselves when the HBA is removed from the loop, or a target device is removed (especially during an outstanding command) without power cycling. If the HBA and and the target device determine upon re-establishing the loop that no PLOGI or PRLI is required, and the target does not issue a LIPxy to the initiator, the CRN for the target will have been improperly reset by the isp driver. As a result, the target port will silently ignore all FCP commands issued during the device probe (which will time out) preventing the device from attaching.
This change corrects thie CRN reset behavior in response to loop state changes, also introduces CRN resets for the above mentioned ELS actions as encountered through async PDB change events.
This change also adds cleanup of outstanding commands in isp_loop_dead() that was previously missing.
sys/dev/isp/isp.c Add the last login state to debug output when syncing the pdb
sys/dev/isp/isp_freebsd.c Replace binary statement setting aborted ccb status in isp_watchdog() with the XS_SETERR macro used elsewhere
In isp_loop_dead(), abort or complete pending commands as done in isp_watchdog()
In isp_async(), segregate the ISPASYNC_LOOP_RESET action from ISPASYNC_LIP, ISPASYNC_LOOP_DOWN, and ISPASYNC_LOOP_UP fallthroughs, and only reset the CRN in the RESET case. Also add checks to handle false LOOP RESET actions that do not have a proper associated LIP primitive, and log the primitive in the debug messages
In isp_async(), remove the goto from ISP_ASYNC_DEV_STAYED, and only reset the CRN in the DEV_CHANGED action
In isp_async(), when processing an ISPASYNC_CHANGE_PDB status, reset CRN(s) for the associated nphdl (or all ports) if the change reason is some form of ELS login/logout. Also remove assignment to fc since it is not used in the scope
sys/dev/isp/ispmbox.h Add macro definition for the global N-Port handle, and correct a macro typo 'PDB24XX_AE_PRLI_DONJE'
sys/dev/isp/ispvar.h Add macros FCP_AL_DA_ALL, FCP_AL_PA, and FCP_IS_DEST_ALPD for more legible code when determining if an AL_PD port matches the portid for a given struct fcparam* by value or by virtue of the AL_PD port being 0xFF
Submitted by: Reid Linnemann Sponsored by: Spectra Logic |
317635 |
01-May-2017 |
mav |
MFC r317356: Switch isp_reset to scratchpad not requiring ISP_MBOXDMASETUP. |
317362 |
24-Apr-2017 |
mav |
MFC r315913: Add brackets to fix incorrect macro expansion. |
317360 |
24-Apr-2017 |
mav |
MFC r315908: Unify initiator and target DMA setup and command sending.
The code is so alike that it is pointless to keep it separate. |
317359 |
24-Apr-2017 |
mav |
MFC r315870: isp field in struct isp_pcmd is also unused. |
317358 |
24-Apr-2017 |
mav |
MFC r315869: Remove write-only crn field from struct isp_pcmd. |
317357 |
24-Apr-2017 |
mav |
MFC r315708: Cleanup response queue processing. |
317321 |
23-Apr-2017 |
mav |
MFC r316652: Fix few minor issues found by Clang Analyzer. |
316411 |
02-Apr-2017 |
mav |
MFC r315709: Switch from using periph_links to sim_links.
periph_links field belongs to periph drivers and must not be used here. |
316408 |
02-Apr-2017 |
mav |
MFC r315682, r315683: Remove some dead code left after r246713. |
316406 |
02-Apr-2017 |
mav |
MFC r315681: Improve command timeout handling.
Let firmware do its best first, and if it can't, try software recovery. I would remove software timeout handler completely, but found bunch of complains on command timeout on sparc64 mailing list few years ago, so better be safe in case of interrupt loss. |
316404 |
02-Apr-2017 |
mav |
MFC r315678: Remove questionable reqp->req_time access. |
316402 |
02-Apr-2017 |
mav |
MFC r315677: Clean/unify some macro usage. |
316400 |
02-Apr-2017 |
mav |
MFC r315587, r315652: Remove some dead/useless code. |
316398 |
02-Apr-2017 |
mav |
MFC r315579, r315670: Add initial support for multiple MSI-X vectors.
For 24xx and above use 2 vectors (default and response queue). For 26xx and above use 3 vectors (default, response and ATIO queues). Due to global lock interrupt hardlers never run simultaneously now, but at least this allows to save one regitster read per interrupt. |
316168 |
29-Mar-2017 |
mav |
MFC r315545: Remove hackish code delaying ATIOs to unknown virtual port.
Since we support RQSTYPE_RPT_ID_ACQ, that functionality is only useful in loop mode, which probably doesn't worth having this hack in 2017. |
316166 |
29-Mar-2017 |
mav |
MFC r315536: Move <= 23xx PDB workaround to generic code.
It is chip-specific and has nothing to do with platform. |
316164 |
29-Mar-2017 |
mav |
MFC r315534: Remove some dead stuff. |
316162 |
29-Mar-2017 |
mav |
MFC r315533: Move 24xx RQSTYPE_NOTIFY handling to generic code.
This code has nothing to do with specific platform. |
316161 |
29-Mar-2017 |
mav |
MFC r315507: Reorganize RQSTYPE_NOTIFY handling for chips <= 23xx.
There were two copies of the code: one in generic code was half-broken, and another in platform code was never called. Leave only one in generic code and working. |
316158 |
29-Mar-2017 |
mav |
MFC r315489: Move RQSTYPE_ABTS_RCVD parsing into generic code. |
316156 |
29-Mar-2017 |
mav |
MFC r315488: Extend nt_lun to full 8 byte. |
316154 |
29-Mar-2017 |
mav |
MFC r315485: Remove dead remnants of SPI target. |
316152 |
29-Mar-2017 |
mav |
MFC r315482: Use isp_target_put_entry() in places where it can be.
This unifies the code and removes some duplication. |
316149 |
29-Mar-2017 |
mav |
MFC r315478: Do some notify acks cleanup.
ISPASYNC_TARGET_NOTIFY_ACK makes no sense without argument. |
316147 |
29-Mar-2017 |
mav |
MFC r315327: Remove not very useful ATIO/INOT stats.
While there polish respective debug logging. |
316145 |
29-Mar-2017 |
mav |
MFC r315307: Refactor interrupt handling.
Instead of single isp_intr() function doing all possible magic, introduce four different functions to handle mailbox operation completions, async events, response and ATIO queues. The goal is to isolate different code paths to make code more readable, and to make easier support for multiple interrupt vectors. Even oldest hardware in many cases can identify what code path it should run on interrupt. Contemporary hardware can assign them to different interrupt vectors. |
316143 |
29-Mar-2017 |
mav |
MFC r315303: Fix panic when SIM dereferenced before allocation. |
316141 |
29-Mar-2017 |
mav |
MFC r315298: Fix ancient bug from r84597, which broke 23xx after r315234. |
316092 |
28-Mar-2017 |
mav |
MFC r315279: Remove some dead/broken code paths around async handling |
316090 |
28-Mar-2017 |
mav |
MFC r315273: Remove tangled isp_mbox_continue() mechanism.
It was implemented to reduce context switches when uploading firmware to card's RAM. But this mechanism is not used last 10 years since all mbox operations are now polled, and it was never used for cards produced in last 15 years. Newer cards can use DMA to upload firmware. |
316088 |
28-Mar-2017 |
mav |
MFC r315236: Remove dangerous and questionable isp_mboxcmd_qnw() call. |
316084 |
28-Mar-2017 |
mav |
MFC r315234: Improvements around attach, reset and detach.
This change fixes DMA resource leak on driver unload. Also it removes DMA resources allocation for hardcoded number of requests before fetching the real number from firmware. Also it prepares ground for more flexible IRQs allocation according to firmware capabilities. |
316014 |
27-Mar-2017 |
mav |
MFC 315229: Remove remnant of r315163. |
315979 |
26-Mar-2017 |
mav |
MFC r315161: Try to slight untangle I/O and loop status handling. |
315977 |
26-Mar-2017 |
mav |
MFC r315160: Remove code for unsupported FreeBSD versions. |
315975 |
26-Mar-2017 |
mav |
MFC r315163: Remove strange config_intrhook_establish() magic.
Interrupts are enabled as part of chip reset just during driver attach. Later "enabling" of already enabled interrupts is useless. |
315812 |
23-Mar-2017 |
mav |
MFC r311305 (by asomers): Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)
The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. However, the kernel doesn't null-terminate them. A bunch of copy-pasted code uses strncpy to write them, and doesn't guarantee null-termination. For at least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually overflows. You can see the result by doing "camcontrol negotiate da0 -v".
This change null-terminates those fields everywhere they're set in the kernel. It also shortens a few strings to ensure they'll fit within the 16-character field.
PR: 215474 Reported by: Coverity CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 CID: 1010035 1010036 1010042 1010041 1010040 1010039 |
315221 |
14-Mar-2017 |
pfg |
MFC r313982, r314068: sys: Replace zero with NULL for pointers.
Found with: devel/coccinelle |
314764 |
06-Mar-2017 |
mav |
MFC r314326: Send TERMINATE to firmware when aborting active ATIO. |
314758 |
06-Mar-2017 |
mav |
MFC r314302: Return better error code in case of too long CDB.
Its more important for SPI HBAs, as they don't support CDBs above 12 bytes. The new error code makes CAM to fall back to alternative commands. |
314756 |
06-Mar-2017 |
mav |
MFC r314299, r314300: Fix residual length reporting in target mode.
This allows to properly handle cases when target wants to receive or send more data then initiator wants to send or receive. Previously in such cases isp(4) returned CAM_DATA_RUN_ERR, while now it returns resid > 0. |
314746 |
06-Mar-2017 |
mav |
MFC r314208: Respecting r314204 tighten ATIO cleanup requirements.
Every ATIO must complete with either successfully sent status or XPT_ABORT. |
314742 |
06-Mar-2017 |
mav |
MFC r314203: Fix missing xpt_done() for ATIO/INOT on missing LUN. |
314734 |
06-Mar-2017 |
mav |
MFC r314088: Slightly polish isp_dump_atpd(). |
314732 |
06-Mar-2017 |
mav |
MFC r314086: Fix multiple problems around LUN disable under load.
- Move private data about ATIOs/INOTs from per-LUN to per-channel data. This allows active commands to continue operation after LUN destruction. This also simplifies lookup of the data by tag in some situations. - Unify three restart_queue processing implementations. - Complete all ATIOs from restart_queue on LUN disable. - Delete ATIO private data when command completed or aborted, not depending on the ATIO being requeued, that was ugly hack and could never happen. CAM should always call ether XPT_CONT_TARGET_IO with status or XPT_ABORT. - Implement XPT_ABORT for queued ATIOs/INOTs to allow CAM do graceful shutdown, not depending on LUN disable, as it is done in ahd(4)/targ(4). - Unify isp_endcmd() arguments to make it more usable in generic code. - Remove never really used LUN state reference counter. |
314730 |
06-Mar-2017 |
mav |
MFC r314045: Remove duplicate INOT allocation.
For some reason isp_handle_platform_notify_fc() allocated INOT just before calling isp_handle_platform_target_tmf(), which also allocates INOT. It seems to be a braino introduced in r196008. |
314728 |
06-Mar-2017 |
mav |
MFC r314038: Remove ancient __FreeBSD_version checks. |
314697 |
05-Mar-2017 |
mav |
MFC r313936, r313937: Move CTIO waitq from per-LUN to per-channel.
All resources lack of which may put CTIO into the queue are either per-channel or potentially per-queue, but none of them are per-LUN.
This is a first step to fix live LUN disabling. Before this change any CTIOs held in a queue in time of disabling were just leaked. |
314695 |
05-Mar-2017 |
mav |
MFC r313945: Remove broken remnants of obsolete INOT API. |
313699 |
13-Feb-2017 |
ken |
MFC r313568:
------------------------------------------------------------------------ r313568 | ken | 2017-02-10 15:02:45 -0700 (Fri, 10 Feb 2017) | 68 lines
Change the isp(4) driver to not adjust the tag type for REQUEST SENSE.
The isp(4) driver was changing the tag type for REQUEST SENSE commands to Head of Queue, when the CAM CCB flag CAM_TAG_ACTION_VALID was NOT set. CAM_TAG_ACTION_VALID is set when the tag action in the XPT_SCSI_IO is not CAM_TAG_ACTION_NONE and when the target has tagged queueing turned on.
In most cases when CAM_TAG_ACTION_VALID is not set, it is because the target is not doing tagged queueing. In those cases, trying to send a Head of Queue tag may cause problems. Instead, default to sending a simple tag.
IBM tape drives claim to support tagged queueing in their standard Inquiry data, but have the DQue bit set in the control mode page (mode page 10). CAM correctly detects that these drives do not support tagged queueing, and clears the CAM_TAG_ACTION_VALID flag on CCBs sent down to the drives.
This caused the isp(4) driver to go down the path of setting the tag action to a default value, and for Request Sense commands only, set the tag action to Head of Queue.
If an IBM tape drive does get a Head of Queue tag, it rejects it with Invalid Message Error (0x49,0x00). (The Qlogic firmware translates that to a Transport Error, which the driver translates to an Unrecoverable HBA Error, or CAM_UNREC_HBA_ERROR.) So, by default, it wasn't possible to get a good response from a REQUEST SENSE to an FC-attached IBM tape drive with the isp(4) driver.
IBM tape drives (tested on an LTO-5 with G9N1 firmware and a TS1150 with 4470 firmware) also have a bug in that sending a command with a non-simple tag attribute breaks the tape drive's Command Reference Number (CRN) accounting and causes it to ignore all subsequent commands because it and the initiator disagree about the next expected CRN. The drives do reject the initial command with a head of queue tag with an Invalid Message Error (0x49,0x00), but after that they ignore any subsequent commands. IBM confirmed that it is a bug, and sent me test firmware that fixes the bug. However tape drives in the field will still exhibit the bug until they are upgraded.
Request Sense is not often sent to targets because most errors are reported automatically through autosense in Fibre Channel and other modern transports. ("Modern" meaning post SCSI-2.) So this is not an error that would crop up frequently. But Request Sense is useful on tape devices to report status information, aside from error reporting.
This problem is less serious without FC-Tape features turned on, specifically precise delivery of commands (which enables Command Reference Numbers), enabled on the target and initiator. Without FC-Tape features turned on, the target would return an error and things would continue on.
And it also does not cause problems for targets that do tagged queueing, because in those cases the isp(4) driver just uses the tag type that is specified in the CCB, assuming the CAM_TAG_ACTION_VALID flag is set, and defaults to sending a Simple tag action if it isn't an ordered or head of queue tag.
sys/dev/isp/isp.c: In isp_start(), don't try to send Request Sense commands with the Head of Queue tag attribute if the CCB doesn't have a valid tag action. The tag action likely isn't valid because the target doesn't support tagged queueing.
Sponsored by: Spectra Logic
------------------------------------------------------------------------ |
310483 |
23-Dec-2016 |
ken |
MFC, r310338: ------------------------------------------------------------------------ r310338 | ken | 2016-12-20 14:17:07 -0700 (Tue, 20 Dec 2016) | 37 lines
Turn on FC-Tape by default in the isp(4) driver.
FC-Tape provides additional link level error recovery, and is highly recommended for tape devices. It will only be turned on for a given target if the target supports it.
Without this setting, we default to whatever FC-Tape setting is in NVRAM on the card.
This can be overridden by setting the following loader tunable, for example for isp0:
hint.isp.0.nofctape=1
sys/conf/options: Add a new kernel config option, ISP_FCTAPE_OFF, that defaults the FC-Tape configuration to off.
sys/dev/isp/isp_pci.c: If ISP_FCTAPE_OFF is defined, turn off FC-Tape. Otherwise, turn it on if the card supports it.
share/man/man4/isp.4: Add a description of FC-Tape to the isp(4) man page.
Add descriptions of the fctape and nofctape options, as well as the ISP_FCTAPE_OFF kernel configuration option.
Add the ispfw module and kernel drivers to the suggested configurations at the top of the man page so that users are less likely to leave it out. The driver works well with the included firmware, but may not work at all with whatever firmware the user has flashed on their card.
Sponsored by: Spectra Logic
------------------------------------------------------------------------ Sponsored by: Spectra Logic |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
300296 |
20-May-2016 |
mav |
Pass proper for 23xx arguments to isp_endcmd().
|
300293 |
20-May-2016 |
mav |
Pass task management response information from CTL through CAM to isp(4), utilizing previously unused arg field of struct ccb_notify_acknowledge.
This makes new QUERY TASK, QUERY TASK SET and QUERY ASYNC EVENT requests really functional for CAM target mode drivers.
|
300222 |
19-May-2016 |
mav |
Fix delaying requests to unknown virtual ports 2s after init.
This code was originally implemented 7 years ago, but never really worked due to trivial error. I think this functionality may be not required. Initiators supporting optional periodic command status checks detected those terminated commands and retried them 3 seconds later. But thinking about less featured initiators and the fact that it is our race makes virtual ports "unknown" it may be good to have this feature.
|
300218 |
19-May-2016 |
mav |
Add proper reporting for early task management errors.
This covers unknown requests and requests to unknown virtual ports. Previously it "worked" only because of timeout handling on initiator.
|
300217 |
19-May-2016 |
mav |
Add IOCB debugging for ISPCTL_RESET_DEV and ISPCTL_ABORT_CMD.
|
300157 |
18-May-2016 |
mav |
Unify Multi ID target code by reusing isp_find_chan_by_did().
|
300058 |
17-May-2016 |
mav |
Make RQCS_PORT_LOGGED_OUT for ZOMBIE ports retriable.
It is normal for ZOMBIE ports to be logged out. This status is not really an error until Gone Device Timeout expires, so make CAM retry after delay.
MFC after: 1 week
|
300052 |
17-May-2016 |
mav |
Completely remove broken now autologin port flag.
Firmware automatically logs in only to local loop ports, and those ports can be easily identified without extra flag by zero domain and area IDs.
MFC after: 1 week
|
299957 |
16-May-2016 |
mav |
Reduce verbosity of "now sending synthesized status" message.
MFC after: 1 week
|
299955 |
16-May-2016 |
mav |
No need to check login status for ZOMBIE ports.
ZOMBIE ports are always logged out, and so initiator may try to relogin.
MFC after: 1 weeks
|
299849 |
15-May-2016 |
trasz |
Remove NULL checks after M_WAITOK allocations from isp(4).
MFC after: 1 month Sponsored by: The FreeBSD Foundation
|
299691 |
13-May-2016 |
mav |
Fix FCP_CMD LENGTH mask in ATIO7 IOCB.
This caused "long IU length (16384) ignored" errors following by others.
MFC after: 2 weeks
|
298955 |
03-May-2016 |
pfg |
sys/dev: minor spelling fixes.
Most affect comments, very few have user-visible effects.
|
298103 |
16-Apr-2016 |
mav |
Simplify memory allocation for NS requests.
Since we no longer need additional buffers for request and response IOCBs, we can increase receive space by 192 bytes, that is enough for fetching 48 more ports. The new limit is 1020 fabric ports per virtual port.
MFC after: 1 month
|
297991 |
14-Apr-2016 |
mav |
Extract virtual port address from RQSTYPE_RPT_ID_ACQ.
This should close the race between request arriving on new target mode virtual port and its scanner thread finally fetch its address for request routing.
|
297915 |
13-Apr-2016 |
mav |
Filter Port Database Changed notifications.
For some reason firmware sends Port Database Changed notifications in case of explicit login requests from the driver when target port is unavailabe. Those notifications don't give driver any new information, but only cause infinite scan loop.
|
297912 |
13-Apr-2016 |
mav |
Respect NVRAM topology settings on 24xx and above chips.
|
297867 |
12-Apr-2016 |
mav |
Make all CT Pass-Through (name server requests) asynchronous.
Previously we had to do it synchronously because we could not drop the lock due to potential scratch memory use conflicts. Previous commits fixed that collision, so here it goes -- slower and less reliable external requests are executed asynchronously without spinning in tight loop and with more safe timeout handling.
|
297859 |
12-Apr-2016 |
mav |
Switch isp_getpdb() to synchronous IOCB DMA area.
While technically it is not IOCB, it is synchronous and can be called from different places, so calling FC_SCRATCH_ACQUIRE() here is inconvenient.
|
297858 |
12-Apr-2016 |
mav |
Allocate separate DMA area for synchronous IOCB execution.
Usually IOCBs should be put on queue for asynchronous processing and should not require additional DMA memory. But there are some cases like aborts and resets that for external reasons has to be synchronous. Give those cases separate 2*64 byte DMA area to decouple them from other DMA scratch area users, using it for asynchronous requests.
|
297856 |
12-Apr-2016 |
mav |
Reimplement ISP_TSK_MGMT IOCTL via asynchronous request.
I am not sure this code is not completely dead, but it used DMA scratch are without good reason and asked to be refactored.
|
297854 |
12-Apr-2016 |
mav |
Add couple missing memory barriers.
|
297817 |
11-Apr-2016 |
mav |
Polish debugging IOCB dumping.
Add few more missing cases, unify byte order.
MFC after: 1 month
|
297751 |
09-Apr-2016 |
mav |
Register symbolic port/node names in FC name server.
This is cosmetics that simplifies identification of new ports on FC switch.
It would be good to use target name from CTL here instead of hostname, but it is not passed here through CAM now.
MFC after: 2 weeks
|
297741 |
09-Apr-2016 |
mav |
Reduce code duplication when executing Passthrough IOCB.
MFC after: 2 weeks
|
296604 |
10-Mar-2016 |
imp |
Move to new value for XPT_GET_SIM_KNOB to avoid clash with XPT_ATA_IO.
|
292765 |
27-Dec-2015 |
mav |
Allocate separate scratch space for scanner purposes.
This space does not require DMA syncing. It reduces lock scope of the DMA scratch space. It allows whole DMA scratch space to be used to I/O, so now we can fetch up to ~1000 ports from SNS.
Due to the last fact, increase maximal number of ports from 256 to 1024.
|
292764 |
27-Dec-2015 |
mav |
Split DMA buffers for request, response and ATIO queues.
|
292745 |
26-Dec-2015 |
mav |
Use single DMA tag for scratch areas of all virtual ports.
|
292741 |
26-Dec-2015 |
mav |
Make port logins asynchronous, following r292739 logic.
This is even more important since it involves more network operations and more prone to delays and timeouts.
|
292739 |
26-Dec-2015 |
mav |
Make virtual ports control asynchronous.
Before this change virtual ports control IOCBs were executed synchronously via Execute IOCB mailbox command. It required exclusive use of scratch space of driver and mailbox registers of the hardware. Because of that shared resources use this code could not really sleep, having to spin for completion, blocking any other operation.
This change introduces new asynchronous design, sending the IOCBs directly on request queue and gracefully waiting for their return on response queue. Returned IOCBs are identified with unified handle space from r292725.
|
292725 |
25-Dec-2015 |
mav |
Unify handles allocation for initiator and target IOCBs.
I am not sure why this was split long ago, but I see no reason for it. At this point this unification just slightly reduces memory usage, but as next step I plan to reuse shared handle space for other IOCB types.
|
292715 |
25-Dec-2015 |
mav |
Clear virtual port's port database when disabling it.
Previously it was done only on full chip reinit, that caused old ports resurrect in case of virtual port reenabling.
|
292690 |
24-Dec-2015 |
mav |
Some polishing for command timeouts handling.
|
292610 |
22-Dec-2015 |
mav |
Fix speed setting by NVRAM for 24xx and above chips.
|
292249 |
15-Dec-2015 |
mav |
Add MSI-X support for 26XX cards.
Unlike previous, this generation does not support regular MSIs any more.
|
292041 |
10-Dec-2015 |
mav |
Guess NVRAM address for 16Gbps Qlogic cards.
I have feeling this approach is wrong, but it works for me so far and it is better then nothing.
|
292034 |
09-Dec-2015 |
mav |
Add PCI ID for 16G QLogic chips in FCoE mode.
I haven't tested FCoE really yet, but the driver attaches fine.
|
291872 |
05-Dec-2015 |
mav |
There is no priority request queue on 16Gig chips.
|
291868 |
05-Dec-2015 |
mav |
Rework WWNs generation to make cards without NVRAM more useful.
|
291821 |
04-Dec-2015 |
mav |
Make 16Gig chips to use new queue pointer registers.
While 24xx-style ATIO and reply queue registers seems like still working, request queue doesn't. So instead of that use registers from PCI BAR(4).
|
291730 |
04-Dec-2015 |
mav |
Update isp_put_icb_2400() for new structure fields.
|
291727 |
03-Dec-2015 |
mav |
Enable interrupt handshake for 16Gig chips.
We don't support MSI-X so far, so it is always required.
|
291654 |
02-Dec-2015 |
mav |
Add initial support for 16Gbps FC QLogic chips.
I still don't know how to read NVRAM there, so WWNs and other parameters are incorrect, but other then that driver seems like attaching normally.
|
291369 |
26-Nov-2015 |
mav |
Remove residual functions declaration left after r291365.
|
291365 |
26-Nov-2015 |
mav |
One more round of port scanner rewrite.
- Make scan aborted by event restart immediately and infinitely. - Improve handling of some loop events from firmware. - Remove loop down timer, adding its functionality to scanner thread. - Some more unification and simplification.
|
291265 |
24-Nov-2015 |
mav |
Rename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV.
New name better repsents its meaning for modern chips.
|
291221 |
23-Nov-2015 |
mav |
Remove "disable" hint, which duplicates system-wide "disabled".
|
291209 |
23-Nov-2015 |
mav |
Fix target mode support for Qlogic 2200 FC adapters.
Now target mode works for all supported FC adapters except ancient 2100, which is not tested.
|
291188 |
23-Nov-2015 |
mav |
Rip off target mode support for parallel SCSI QLogic adapters.
Hacks to enable target mode there complicated code, while didn't really work. And for outdated hardware fixing it is not really interesting.
Initiator mode tested with Qlogic 1080 adapter is still working fine.
|
291163 |
22-Nov-2015 |
mav |
Explicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode.
While later firmware always registers for RSCN requests, older one does it only in initiator mode. But in target mode there RSCN can be the only way to detect gone intiator.
|
291162 |
22-Nov-2015 |
mav |
Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.
This makes port scanner fix absent port ID for added initiator.
|
291161 |
22-Nov-2015 |
mav |
Gracefully stop firmware before resetting chip when changing role.
|
291160 |
22-Nov-2015 |
mav |
Add some more asynchronous event status codes.
|
291159 |
22-Nov-2015 |
mav |
Add mode mailbox command codes.
|
291147 |
21-Nov-2015 |
mav |
Increase maximal value of vports tunable to 254.
I am not sure this value is really viable yet, but that is what chips officially support in NPIV mode (in loop mode maximum is 125).
|
291144 |
21-Nov-2015 |
mav |
Fix target mode with fabric for pre-24xx chips.
For those chips we are not receiving login events, adding initiators based on ATIO requests. But there is no port ID in that structure, so in fabric mode we have to explicitly fetch it from firmware to be able to do normal scan after that.
|
291099 |
20-Nov-2015 |
mav |
Some cosmetics for ancient cards.
|
291092 |
20-Nov-2015 |
mav |
Optimize SNS_GID_FT request scratch memory usage.
Now with present 4K of scratch we can fetch up to 508 ports (16 more).
|
291080 |
19-Nov-2015 |
mav |
Another round of port scanner rewrite.
This change simplifies and unifies port adding/updating for loop and fabric scanners. It also fixes problems with scanning restarts due to concurrent port databases changes. It also fixes many cosmetic issues.
|
291014 |
18-Nov-2015 |
mav |
Simplify fabric tasting code.
Except cosmetic changes this removes fabric ports from our port database. It is always firmware duty to manage them, so driver don't need to worry.
|
291013 |
18-Nov-2015 |
mav |
Remove some confusions between loopid and nphdl.
Modern cards in most cases operate abstract port handles, that have no any relation to real loop IDs. Leave loopid used only where it really goes about local loop IDs.
While there, fix few more cases where LUNs were still printed in decimal.
|
291000 |
17-Nov-2015 |
mav |
Register our FC4 Features in SNS.
|
290994 |
17-Nov-2015 |
mav |
Cosmetic addition to r290993.
|
290993 |
17-Nov-2015 |
mav |
Unify and cleanup FC ports scan.
|
290981 |
17-Nov-2015 |
mav |
Off-by-one correctiont to r290980.
|
290980 |
17-Nov-2015 |
mav |
Make firmware handle virtual ports SNS logins for us.
|
290978 |
17-Nov-2015 |
mav |
Add real initial support for RQSTYPE_RPT_ID_ACQ.
|
290830 |
14-Nov-2015 |
mav |
Fix/improve CRN tracking.
|
290507 |
07-Nov-2015 |
mav |
Rework r290504.
|
290506 |
07-Nov-2015 |
mav |
Specify VP when sending a marker.
|
290504 |
07-Nov-2015 |
mav |
Make ISP_SLEEP() really sleep instead of spinning.
While there, simplify the wait logic.
|
290160 |
29-Oct-2015 |
mav |
Remove some unneeded code.
|
290159 |
29-Oct-2015 |
mav |
Remove reset delays for which I see neither explanation nor need.
|
290147 |
29-Oct-2015 |
mav |
Fix and improve error masking and reporting.
|
290118 |
28-Oct-2015 |
mav |
Change the way how target mode is enabled on 23xx chips.
Without docs I am not completely sure about this, but on my tests new method works better then previous, at least with our latest firmware.
|
290104 |
28-Oct-2015 |
mav |
Improve/fix loop scanning routine.
For the most of chips (except anscient ones) port handlers have no relation to port IDs. In such situation old code scanning first 125 handlers was quite naive. Instead of doing that, send to chip single request to get full list of port handlers available on specific virtual port and scan only them.
Old code had problems with case of several virtual ports enabled, when port handlers allocated from global address space could easily go above 125. This change was successfully tested on 23xx, 24xx and 25xx chips in loop mode with 4 virtual initiator ports, each seing 50 virtual target ports.
|
290054 |
27-Oct-2015 |
mav |
Reimplement next port handle generation.
For some reason port handles should be allocated from HBA-global space, while old code was not very specific, mixing per-HBA and per-VP logic.
|
290042 |
27-Oct-2015 |
mav |
Fix error code that looks like wrong.
|
290018 |
26-Oct-2015 |
mav |
Reimplement enable and implement disable of virtual ports.
Now on 24xx and above chips it is really possible to simulate several virtual FC ports with single physical one. For example, it allows to configure several targets in ctl.conf, assign each of them to separate virtual port, and let user to control access to them with switch zoning.
I still doubt that all problems are solved there, but at now it passes at least basic tests.
|
289942 |
25-Oct-2015 |
mav |
Deliver INOTs only to enabled virtual ports.
|
289939 |
25-Oct-2015 |
mav |
Rework r289933 using already existing macro.
|
289937 |
25-Oct-2015 |
mav |
Try to keep Loop IDs persistent across chip reinits.
|
289933 |
25-Oct-2015 |
mav |
Improve Port Database Changed handling and reporting.
|
289930 |
25-Oct-2015 |
mav |
Formalize/unify chip (re-)inits.
|
289890 |
24-Oct-2015 |
mav |
Skip reserved IP Broadcast handle from using.
|
289886 |
24-Oct-2015 |
mav |
Add new field to Abort IOCB.
|
289882 |
24-Oct-2015 |
mav |
Add PIM_EXTLUNS support to isp(4) driver.
Now 24xx and above chips support full 8-byte LUN address space. Older FC chips may support up to 16K LUNs when firmware allows. Tested in both initiator and target modes for 23xx, 24xx and 25xx.
|
289877 |
24-Oct-2015 |
mav |
Remove ISP_INTERNAL_TARGET code.
We have CTL now, which is real and much more functional then this joke.
|
289875 |
24-Oct-2015 |
mav |
Decode few more response info codes.
Though CAM still does not send any requests that would require those.
|
289855 |
23-Oct-2015 |
mav |
Minor additions to Status Type 0 IOCB.
|
289852 |
23-Oct-2015 |
mav |
Missed addition for r289812.
|
289843 |
23-Oct-2015 |
mav |
Add partial support for QUERY TMF to CAM and isp(4).
This change allows to decode respective functions in isp(4) in target mode and pass them through CAM to CTL. Unfortunately neither CAM nor isp(4) support returning response info for those task management functions now.
On the other side I just have no initiator to test this functionality.
|
289838 |
23-Oct-2015 |
mav |
Improve INOTs handling for 24xx and above chips.
|
289817 |
23-Oct-2015 |
mav |
Disable full bus scan by CAM for FC adapters.
FC port database code already notifies CAM about all devices. Additional full scan is just a waste of time, that by definition won't find anything that is not present in port database.
|
289812 |
23-Oct-2015 |
mav |
Some polishing and unification in ISR code.
|
289681 |
21-Oct-2015 |
mav |
Some more defines and polishing for INIT_FIRMWARE.
|
289626 |
20-Oct-2015 |
mav |
Update firmware images for Qlogic 24xx/25xx from 5.5.0 to 7.3.0.
This also removes separate "_multi" images, since this funcationality is now in base, and there is simply no new images without it for years.
|
289622 |
20-Oct-2015 |
mav |
Zero mbox[0] for INIT_FIRMWARE to fix version 7.3 firmware.
While there, add new fields to isp_icb_2400_t structure.
|
289620 |
20-Oct-2015 |
mav |
Decode more firmware attributes.
|
289219 |
13-Oct-2015 |
mav |
Export bunch of state variables as sysctls.
|
285600 |
15-Jul-2015 |
mav |
MULTI_ID supported does not mean it is used.
|
285510 |
13-Jul-2015 |
mav |
Switch initiator IDs in target mode to the same address space as target IDs in initiator mode -- index in port database instead of handlers.
This makes initiator IDs persist across role changes and firmware resets, when handlers previously assigned by firmware are lost and reused.
Sponsored by: iXsystems, Inc.
|
285481 |
13-Jul-2015 |
mav |
Make role sysctl handling from r284727 less strict.
|
285459 |
13-Jul-2015 |
mav |
Unify port database use for target and initiator roles.
Aside from cleaner and more consistent code, this allows ports to be both target and initiator same time, and easily switch from any role to any.
Sponsored by: iXsystems, Inc.
|
285155 |
05-Jul-2015 |
mav |
Make first step toward supporting target and initiator roles same time.
To avoid conflicts between target and initiator devices in CAM, make CTL use target ID reported by HBA as its initiator_id in XPT_PATH_INQ. That target ID is known to never be used for initiator role, so it won't conflict. For Fibre Channel and FireWire HBAs this specific ID choice is irrelevant since all target IDs there are virtual. Same time for SPI HBAs it seems could be even requirement to use same target ID for both initiator and target roles.
While there are some more things to polish in isp(4) driver, first tests of using both roles same time on the same port appeared successfull:
# camcontrol devlist -v scbus0 on isp0 bus 0: <FREEBSD CTLDISK 0001> at scbus0 target 1 lun 0 (da20,pass21) <> at scbus0 target 256 lun 0 (ctl0) <> at scbus0 target -1 lun ffffffff (ctl1)
|
285154 |
05-Jul-2015 |
mav |
Remove extra level of target ID indirection (isp_dev_map).
FreeBSD never had limitation on number of target IDs, and there is no any other requirement to allocate them densely. Since slots of port database already populated just sequentially, there is no much need for another indirection to allocate sequentially too.
|
285147 |
04-Jul-2015 |
mav |
Change comment added in r284540.
This appeared to be not card's issue, but driver's, though solution is the same so far.
|
285146 |
04-Jul-2015 |
mav |
Drop discovered targets when initiator role is disabled.
|
284808 |
25-Jun-2015 |
mav |
Remove limitations on setting WWNNs starting from 2.
It is odd that driver first tries to generate synthetic WWNN based on WWPN starting from 2, but then refuses to use it. If we don't trust generated WWNN, we should probably not generate it. Same time this limitation prevents potentially valid WWNN setting by user.
|
284748 |
24-Jun-2015 |
mav |
Fix reported_gone setting, missed in some cases.
This makes driver better track reported CAM_SEL_TIMEOUTs to properly report device reappearance later. This fixes target 0 not reappearing after initiator mode disabled and then reenabled.
MFC after: 3 days
|
284727 |
23-Jun-2015 |
mav |
Add dev.isp.X.role sysctl in addition to tunable.
It (mostly) allows to enable/disable initiator mode in run time. Target mode control is blocked here to force coordination with CTL.
While there, add separate tunables/sysctls for virtual channels.
|
284698 |
22-Jun-2015 |
mav |
Dump additional config bytes for INIT_FIRMWARE_MULTI_ID.
|
284697 |
22-Jun-2015 |
mav |
Add logging of executed mailbox command names.
Previously those commands were logged only as part of register dump, that is not very readable.
|
284681 |
21-Jun-2015 |
mav |
Rewrite port database handling for target mode.
Previous implementation was too fragile to initiator parameters changes. In case of port role change it could not survive different handle assigned to the same initiator by firmware, even though initiator was logged out. The new implementation should be more resillient to this kind of problems, trying to work in any situation and only warn user about suspisious events.
MFC after: 1 week Sponsored by: iXsystems, Inc.
|
284540 |
18-Jun-2015 |
mav |
In case of target mode disable at least ISP2532 return invalid zero ct_rxid value on CTIO completion. Try to workaround that using tag_id from the CCB, pointed by still valid ct_syshandle.
I don't know whether this is valid fix or dirty hack, but considering that alternative is indefinitely stuck command -- it worth trying.
MFC after: 1 week
|
277515 |
21-Jan-2015 |
will |
Fix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards.
The newer boards don't have the response field that indicates whether the SCSI status byte is present. You have to just look to see whether it is non-zero.
The code was looking to see whether the sense length was valid before propagating the SCSI status byte (and sense information) up the stack. With a status like Reservation Conflict, there is no sense information, only the SCSI status byte. So it wasn't getting correctly returned.
isp.c: In isp_intr(), if we are on a 2400 or 2500 type board and get a response, look at the actual contents of the SCSI status value and set the RQSF_GOT_STATUS flag accordingly so that return any SCSI status value we get. The RQSF_GOT_SENSE flag will get set later on if there is actual sense information returned.
Submitted by: ken MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1112791 on 2015/01/15
|
277514 |
21-Jan-2015 |
will |
Force commit to record the correct log for r277513.
If the user sends an XPT_RESET_DEV CCB, make sure to reset the Fibre Channel Command Reference Number if we're running on a FC controller.
We send a SCSI Target Reset when we get this CCB, and as a result need to reset the CRN to 1 on the next command.
isp_freebsd.c: In the XPT_RESET_DEV implementation in isp_action(), reset the CRN if we're on a FC controller.
Submitted by: ken MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1112787 on 2015/01/15
|
277513 |
21-Jan-2015 |
will |
Change 1112791 by kenm@ken.spectrabsd8 on 2015/01/15 16:45:13
Fix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards.
The newer boards don't have the response field that indicates whether the SCSI status byte is present. You have to just look to see whether it is non-zero.
The code was looking to see whether the sense length was valid before propagating the SCSI status byte (and sense information) up the stack. With a status like Reservation Conflict, there is no sense information, only the SCSI status byte. So it wasn't getting correctly returned.
isp.c: In isp_intr(), if we are on a 2400 or 2500 type board and get a response, look at the actual contents of the SCSI status value and set the RQSF_GOT_STATUS flag accordingly so that return any SCSI status value we get. The RQSF_GOT_SENSE flag will get set later on if there is actual sense information returned.
Submitted by: ken MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1112791 on 2015/01/15
|
276842 |
08-Jan-2015 |
ken |
Close a race in the isp(4) driver that caused devices to disappear and not automatically come back if they were gone for a short period of time.
The isp(4) driver has a 30 second gone device timer that gets activated whenever a device goes away. If the device comes back before the timer expires, we don't send a notification to CAM that it has gone away. If, however, there is a command sent to the device while it is gone and before it comes back, the isp(4) driver sends the command back with CAM_SEL_TIMEOUT status.
CAM responds to the CAM_SEL_TIMEOUT status by removing the device. In the case where a device comes back within the 30 second gone device timer window, though, we weren't telling CAM the device came back.
So, fix this by tracking whether we have told CAM the device is gone, and if we have, send a rescan if it comes back within the 30 second window.
ispvar.h: In the fcportdb_t structure, add a new bitfield, reported_gone. This gets set whenever we return a command with CAM_SEL_TIMEOUT status on a Fibre Channel device.
isp_freebsd.c: In isp_done(), if we're sending CAM_SEL_TIMEOUT for for a command sent to a FC device, set the reported_gone bit.
In isp_async(), in the ISPASYNC_DEV_STAYED case, rescan the device in question if it is mapped to a target ID and has been reported gone.
In isp_make_here(), take a port database entry argument, and clear the reported_gone bit when we send a rescan to CAM.
In isp_make_gone(), take a port database entry as an argument, and set the reported_gone bit when we send an async event telling CAM consumers that the device is gone.
Sponsored by: Spectra Logic MFC after: 1 week
|
276839 |
08-Jan-2015 |
ken |
Fix Fibre Channel Command Reference Number handling in the isp(4) driver.
The Command Reference Number is used for precise delivery of commands, and is part of the FC-Tape functionality set. (This is only enabled for devices that support precise delivery of commands.) It is an 8-bit unsigned number that increments from 1 to 255. The commands sent by the initiator must be processed by the target in CRN order if the CRN is non-zero.
There are certain scenarios where the Command Reference Number sequence needs to be reset. When the target is power cycled, for instance, the initiator needs to reset the CRN to 1. The initiator will know this because it will see a LIP (when directly connected) or get a logout/login event (when connected to a switch).
The isp(4) driver was not resetting the CRN when a target went away and came back. When it saw the target again after a power cycle, it would continue the CRN sequence where it left off. The target would ignore the command because the CRN sequence is supposed to be reset to 1 after a power cycle or other similar event.
The symptom that the user would see is that there would be lots of aborted INQUIRY commands after a tape library was power cycled, and the library would fail to probe. The INQUIRY commands were being ignored by the tape drive due to the CRN issue mentioned above.
isp_freebsd.c: Add a new function, isp_fcp_reset_crn(). This will reset all of the CRNs for a given port, or the CRNs for all LUNs on a target.
Reset the CRNs for all targets on a port when we get a LIP, loop reset, or loop down event.
Reset the CRN for a particular target when it arrives, is changed or departs. This is less precise behavior than the clearing behavior specified in the FCP-4 spec (which says that it should be reset for PRLI, PRLO, PLOGI and LOGO), but this is the level of information we have here. If this is insufficient, then we will need to add more precise notification from the lower level isp(4) code.
isp_freebsd.h: Add a prototype for isp_fcp_reset_crn().
Sponsored by: Spectra Logic MFC after: 1 week
|
275124 |
26-Nov-2014 |
mav |
Fix WWNN/WWPN generation for virtual channels.
MFC after: 1 week
|
275123 |
26-Nov-2014 |
mav |
Fix incorrect check, blocking MULTIID functionality.
MFC after: 1 week
|
275118 |
26-Nov-2014 |
mav |
Some microoptimizations.
MFC after: 1 month
|
275112 |
26-Nov-2014 |
mav |
Make isp_find_pdb_by_*() search for targets in portdb in reverse order.
Records with target_mode == 1 are allocated from the end of portdb, so it seems logical to start search from the end not traverse whole array.
MFC after: 1 month
|
274708 |
19-Nov-2014 |
mav |
Fix build without INVARIANTS, broken by r274675.
|
274675 |
18-Nov-2014 |
jhb |
Convert the refire_notify_ack timer from timeout(9) to callout(9).
Tested by: no one
|
273051 |
13-Oct-2014 |
imp |
Use the C99 flexible array construct to denote a variable amount of data rather than the old-school [1] construct. We have required c99 compilers for some time.
|
272937 |
11-Oct-2014 |
mav |
Fix r272936 build with old GCC.
MFC after: 1 week
|
272936 |
11-Oct-2014 |
mav |
Update isp_tgt_map and send new arrival notification if target that departed earlier has returned. Previously that code worked only once, confusing CTL.
MFC after: 1 month
|
271731 |
18-Sep-2014 |
will |
Fix a kernel panic when unloading isp(4).
In the current implementation, the isp_kthread() threads never exit.
The target threads do have an exit mode from isp_attach(), but it is not invoked from isp_detach().
Ensure isp_detach() notifies threads started for each channel, such that they exit before their parent device softc detaches, and thus before the module does. Otherwise, a page fault panic occurs later in:
sysctl_kern_proc sysctl_out_proc kern_proc_out fill_kinfo_proc fill_kinfo_thread strlcpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg));
For isp_kthread() (and isp(4) target threads), td->td_wmesg references now-unmapped memory after the module has been unloaded. These threads are typically msleep()ing at the time of unload, but they could also attempt to execute now-unmapped code segments.
MFC after: 1 month Sponsored by: Spectra Logic MFSpectraBSD: r1070921 on 2014/06/22 13:01:17
|
268395 |
08-Jul-2014 |
mav |
Pass correct command that should be aborted to ISPCTL_ABORT_CMD.
This makes XPT_ABORT to work for me on initiator side of isp(4). Previous code was trying to abort the XPT_ABORT itself and failed.
MFC after: 1 week
|
267446 |
13-Jun-2014 |
jhb |
Add missing calls to bus_dmamap_unload() when freeing static DMA allocations.
Reviewed by: scottl
|
261515 |
05-Feb-2014 |
mav |
Fix I/O freezes in some cases, caused by r257916.
Delaying isp_reqodx update, we should be ready to update it every time we read it. Otherwise requests using several indexes may be requeued ndefinitely without ever updating the variable.
MFC after: 3 days
|
259860 |
25-Dec-2013 |
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
|
257932 |
11-Nov-2013 |
mav |
Use relaxed (write-only) memory barriers when writing some of queue index registers (for now on ISP2400+). We never read those registers back and AFAIK their semantics does not require any immediate reaction on write.
|
257930 |
10-Nov-2013 |
mav |
Some more registers access optimizations: - Process ATIO queue only if interrupt status tells so; - Do not update queue out pointers after each processed command, do it only once at the end of the loop.
|
257916 |
10-Nov-2013 |
mav |
Save one more register read per command by not reading rqstoutrp register every time. The purpose of that register is unlikely output queue overflow detection, so read it only when its last known (and probably stale now) value signals overflow.
This reduces CPU load and lock congestion and rises bottleneck in CTL while doing target mode via two 8Gbps ports from 100K to 120K IOPS.
|
257381 |
30-Oct-2013 |
nwhitehorn |
Adjust various SCSI drivers to handle either a 32-bit or 64-bit lun_id_t, mostly by adjustments to debugging printf() format specifiers. For high numbered LUNs, also switch to printing them in hex as per SAM-5.
MFC after: 2 weeks
|
256843 |
21-Oct-2013 |
mav |
Merge CAM locking changes from the projects/camlock branch to radically reduce lock congestion and improve SMP scalability of the SCSI/ATA stack, preparing the ground for the coming next GEOM direct dispatch support.
Replace big per-SIM locks with bunch of smaller ones: - per-LUN locks to protect device and peripheral drivers state; - per-target locks to protect list of LUNs on target; - per-bus locks to protect reference counting; - per-send queue locks to protect queue of CCBs to be sent; - per-done queue locks to protect queue of completed CCBs; - remaining per-SIM locks now protect only HBA driver internals.
While holding LUN lock it is allowed (while not recommended for performance reasons) to take SIM lock. The opposite acquisition order is forbidden. All the other locks are leaf locks, that can be taken anywhere, but should not be cascaded. Many functions, such as: xpt_action(), xpt_done(), xpt_async(), xpt_create_path(), etc. are no longer require (but allow) SIM lock to be held.
To keep compatibility and solve cases where SIM lock can't be dropped, all xpt_async() calls in addition to xpt_done() calls are queued to completion threads for async processing in clean environment without SIM lock held.
Instead of single CAM SWI thread, used for commands completion processing before, use multiple (depending on number of CPUs) threads. Load balanced between them using "hash" of the device B:T:L address.
HBA drivers that can drop SIM lock during completion processing and have sufficient number of completion threads to efficiently scale to multiple CPUs can use new function xpt_done_direct() to avoid extra context switch. Make ahci(4) driver to use this mechanism depending on hardware setup.
Sponsored by: iXsystems, Inc. MFC after: 2 months
|
256826 |
21-Oct-2013 |
mav |
Partial MFproject/camlock r256671: Fix several target mode SIMs to not blindly clear ccb_h.flags field of ATIO CCBs. Not all CCB flags there belong to them.
|
256705 |
17-Oct-2013 |
mav |
Optimize isp(4) to reduce CPU usage, especially in target mode: - Remove two excessive and slow register reads from isp_intr(). Instead of rereading value every time, assume that registers contain what we have written there. - Avoid sequential search through 4096 array elements when looking for command tag. Use hash of lists to store active tags separately from free ones and so greatly speedup the searches.
Reviewed by: mjacob
|
254372 |
15-Aug-2013 |
ken |
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 MFC after: 3 days Sponsored by: Spectra Logic
|
254263 |
12-Aug-2013 |
scottl |
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.
Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day
|
253330 |
13-Jul-2013 |
mjacob |
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.
Much appreciation to: marius, who persisted and narrowed down what the failure delta was, and shamed me into actually fixing it. MFC after: 1 week
|
251373 |
04-Jun-2013 |
marius |
Flag isp(4) as supporting unmapped I/O; all necessary conversion actually already has been done as part of r246713.
Reviewed by: mjacob
|
249468 |
14-Apr-2013 |
mav |
MFprojects/camlock r248982: 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.
|
247356 |
26-Feb-2013 |
mjacob |
Remove redundant xpt_alloc_ccb in isp_target_thread that was causing leakage.
Pointed out by: Sascha Wildner of DragonFly BSD MFC after: 1 week
|
247264 |
25-Feb-2013 |
mjacob |
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.
Noticed by: Bugs in NetBSD. Only a NetBSD user might actually still use such old hardware. MFC after: 1 week
|
246713 |
12-Feb-2013 |
kib |
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.
The cam changes unify the bus_dmamap_load* handling in cam drivers.
The arm and mips implementations are updated to track virtual addresses for sync(). Previously this was done in a type specific way. Now it is done in a generic way by recording the list of virtuals in the map.
Submitted by: jeff (sponsored by EMC/Isilon) Reviewed by: kan (previous version), scottl, mjacob (isp(4), no objections for target mode changes) Discussed with: ian (arm changes) Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
|
242480 |
02-Nov-2012 |
mjacob |
Don't allow for more than one segment for the control space since we're not set up to deal with that.
X-MFC: 242479 MFC after: 1 week
|
242479 |
02-Nov-2012 |
mjacob |
Don't allow for more than one segment for the control space since we're not set up to deal with that.
MFC after: 1 week
|
240590 |
17-Sep-2012 |
mjacob |
Minor correction.
MFC after: 1 day
|
240589 |
17-Sep-2012 |
mjacob |
Add some edits to the changed comments so that they make more sense.
MFC after: 1 day
|
240518 |
14-Sep-2012 |
eadler |
Correct double "the the"
Approved by: cperciva MFC after: 3 days
|
240219 |
07-Sep-2012 |
mjacob |
Remove useless extra test.
Pointed out by: Sascha of DragonFly BSD MFC after: 2 weeks
|
239502 |
21-Aug-2012 |
mjacob |
Remove dependence on MAXPHYS.
MFC after: 1 month
|
239330 |
16-Aug-2012 |
mjacob |
On lun disable, complete all INOTs and ATIOs with CAM_REQ_ABORTED.
Reviewed by: ken (silently), chuck MFC after: 3 weeks
|
239219 |
12-Aug-2012 |
mjacob |
Remove extraneous newline.
MFC after: 1 month
|
239218 |
12-Aug-2012 |
mjacob |
Fix an oops where we wiped out DMA maps. Don't allocate extended command space for anything less than a 2300.
MFC after: 1 month X-MFC: 238869
|
239143 |
08-Aug-2012 |
mjacob |
More rototilling with target mode in an attemp to get multiple CCB at a time outstanding reliable. It's not there yet, but this is the direction to go in so might as well commit. So far, multiple at a time CCBs work (see ISP_INTERNAL_TARGET test mode), but it fails if there are more downstream than the SIM wants to handle and SRR is sort of confused when this happens, plus it is not entirely quite clear what one does if a CCB/CTIO fails and you have more in flight (that don't fail, say) and more queued up at the SIM level that haven't been started yet.
Some of this is driven because there apparently is no flow control to requeue XPT_CONTINUE_IO requests like there are for XPT_SCSI_IO requests. It is also more driven in that the few target mode periph drivers there are are not really set up for handling pushback- heck most of them don't even check for errors (and what would they really do with them anyway? It's the initiator's problem, really....).
The data transfer arithmetic has been worked over again to handle multiple outstanding commands, so you have a notion of what's been moved already as well as what's currently in flight. It turns that this led to uncovering a REPORT_LUNS bug in the ISP_INTERNAL_TARGET code which was sending back 24 bytes of rpl data instead of the specified 16. What happened furthermore here is that sending back 16 bytes and reporting an overrun of 8 bytes made the initiator (running FC-Tape aware f/w) mad enough to request, and keep requesting, another FCP response (I guess it didn't like the answer so kept asking for it again).
Sponsored by: Spectralogic MFC after: 1 month
|
239023 |
04-Aug-2012 |
mjacob |
Add detach logic to SBus variant.
Obtained from: Marius MFC after: 1 month
|
239010 |
03-Aug-2012 |
mjacob |
Oops. We only do allocate room for extended commands and responses for 2300 cards are newer.
Sponsored by: Spectralogic Noticed by: Our Friend Manfred MFC after: 1 month X-MFC: 238869
|
238887 |
29-Jul-2012 |
mjacob |
Grr.!$()!$$ I missed checking this in even though I *did* run a tinderbox myself and caught the error.
Change to isp_send_cmd needs a final ecmd argument.
Sponsored by: Spectralogic MFC after: 1 month X-MFC: 238869
|
238869 |
28-Jul-2012 |
mjacob |
----------- MISC CHANGES
Add a new async event- ISP_TARGET_NOTIFY_ACK, that will guarantee eventual delivery of a NOTIFY ACK. This is tons better than just ignoring the return from isp_notify_ack and hoping for the best.
Clean up the lower level lun enable code to be a bit more sensible.
Fix a botch in isp_endcmd which was messing up the sense data.
Fix notify ack for SRR to use a sensible error code in the case of a reject.
Clean up and make clear what kind of firmware we've loaded and what capabilities it has. ----------- FULL (252 byte) SENSE DATA
In CTIOs for the ISP, there's only a limimted amount of space to load SENSE DATA for associated CHECK CONDITIONS (24 or 26 bytes). This makes it difficult to send full SENSE DATA that can be up to 252 bytes.
Implement MODE 2 responses which have us build the FCP Response in system memory which the ISP will put onto the wire directly.
On the initiator side, the same problem occurs in that a command status response only has a limited amount of space for SENSE DATA. This data is supplemented by status continuation responses that the ISP pushes onto the response queue after the status response. We now pull them all together so that full sense data can be returned to the periph driver.
This is supported on 23XX, 24XX and 25XX cards.
This is also preparation for doing >16 byte CDBs.
----------- FC TAPE
Implement full FC-TAPE on both initiator and target mode side. This capability is driven by firmware loaded, board type, board NVRAM settings, or hint configuration options to enable or disable. This is supported for 23XX, 24XX and 25XX cards.
On the initiator side, we pretty much just have to generate a command reference number for each command we send out. This is FCP-4 compliant in that we do this per ITL nexus to generate the allowed 1 thru 255 CRN.
In order to support the target side of FC-TAPE, we now pay attention to more of the PRLI word 3 parameters which will tell us whether an initiator wants confirmed responses. While we're at it, we'll pay attention to the initiator view too and report it.
On sending back CTIOs, we will notice whether the initiator wants confirmed responses and we'll set up flags to do so.
If a response or data frame is lost the initiator sends us an SRR (Sequence Retransmit Request) ELS which shows up as an SRR notify and all outstanding CTIOs are nuked with SRR Received status. The SRR notify contains the offset that the initiator wants us to restart the data transfer from or to retransmit the response frame.
If the ISP driver still has the CCB around for which the data segment or response applies, it will retransmit.
However, we typically don't know about a lost data frame until we send the FCP Response and the initiator totes up counters for data moved and notices missing segments. In this case we've already completed the data CCBs already and sent themn back up to the periph driver. Because there's no really clean mechanism yet in CAM to handle this, a hack has been put into place to complete the CTIO CCB with the CAM_MESSAGE_RECV status which will have a MODIFY DATA POINTER extended message in it. The internal ISP target groks this and ctl(8) will be modified to deal with this as well.
At any rate, the data is retransmitted and an an FCP response is sent. The whole point here is to successfully complete a command so that you don't have to depend on ULP (SCSI) to have to recover, which in the case of tape is not really possible (hence the name FC-TAPE).
Sponsored by: Spectralogic MFC after: 1 month
|
238486 |
15-Jul-2012 |
brueffer |
Fix typo in a message.
Obtained from: DragonFly BSD (change 7a817ab191e4898404a9037c55850e47d177308c) MFC after: 3 days
|
237544 |
25-Jun-2012 |
mjacob |
Unbreak register tests for parallel SCSI. You can't overwrite registers 7 and 8. MFC after: 3 days
|
237537 |
24-Jun-2012 |
mjacob |
Clean up multi-id mode so it's driven by the f/w loaded, not by some hint setting. Do more preparations for FC-Tape. Clean up resource counting for 24XX or later chipsets so we find out after EXEC_FIRMWARE what is actually supported. Set target mode exchange count based upon whether or not we are supporting simultaneous target/initiator mode. Clean up some old (pre-24XX) xfwoption and zfwoption issues.
Sponsored by: Spectralogic MFC after: 3 days
|
237210 |
17-Jun-2012 |
mjacob |
Prepare for FC-Tape support. This involved doing a lot of little cleanups and crosschecks against firmware documentation. We now check and report FC firmware attributes and at least are now prepared for the upper 48 bits of f/w attributes (which are probably for the 8100 or later cards). This involed changing how inbits and outbits are calculated for varios commands, hopefully clearer and cleaner. This also caused me to clean up the actual mailbox register usage. Finally, we are now unconditionally using a CRN for initiator mode.
A longstanding issue with the 2400/2500 is that they do *not* support a "Prefer PTP followed by loop", which explains why enabling that caused the f/w to crash.
A slightly more invasive change is to let the firmware load entirely drive whether multi_id support is enabled or not.
Sponsored by: Spectralogic MFC after: 1 week
|
237135 |
15-Jun-2012 |
mjacob |
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.
MFC after: 3 days
|
236427 |
01-Jun-2012 |
mjacob |
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.
Reviewed by: kdm MFC after: 2 weeks Sponsored by: Spectralogic
|
236379 |
01-Jun-2012 |
eadler |
Adding missing dependancies for loading hptiop(4), hptmv(4) and isp(4) as modules.
PR: kern/166239 Submitted by: Pavel Timofeev <timp87@gmail.com> Discussed on: -stable, -scsi Reviewed by: scottl No objection from: mjacob Approved by: cperciva MFC after: 3 days
|
231985 |
22-Feb-2012 |
kevlo |
Fix memset sizeof
|
228914 |
27-Dec-2011 |
mjacob |
Fix target mode compilation issues that arose after a change in the sense data structures.
MFC after: 1 week
|
228461 |
13-Dec-2011 |
mav |
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. MFC after: 1 month
|
227548 |
16-Nov-2011 |
mjacob |
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.
|
227458 |
11-Nov-2011 |
eadler |
- add a missing "be" and "in" - fix other errors introduced when committing r226436 - add 'function' to a sentence where it makes sense
Submitted by: delphij Submitted by: dougb Submitted by: jhb Approved by: dougb Approved by: jhb
|
227126 |
06-Nov-2011 |
mjacob |
Implement the sysctl's for fibre channel that are listed in the man page.
MFC after: 3 days
|
226436 |
16-Oct-2011 |
eadler |
- change "is is" to "is" or "it is" - change "the the" to "the"
Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days
|
226118 |
07-Oct-2011 |
marius |
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
|
225950 |
03-Oct-2011 |
ken |
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.
MFC after: 3 days Sponsored by: Spectra Logic Corporation
|
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
|