aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mpr/mpr_sas.c
Commit message (Collapse)AuthorAgeFilesLines
* Introduce support of SCSI Command Priority.Alexander Motin2020-10-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SAM-3 specification introduced concept of Task Priority, that was renamed to Command Priority in SAM-4, and supported by all modern SCSI transports. It provides 15 levels of relative priorities: 1 - highest, 15 - lowest and 0 - default. SAT specification for SATA devices translates priorities 1-3 into NCQ high priority. This change adds new "priority" field into empty spots of struct ccb_scsiio and struct ccb_accept_tio of CAM and struct ctl_scsiio of CTL. Respective support is added into iscsi(4), isp(4), mpr(4), mps(4) and ocs_fc(4) drivers for both initiator and where applicable target roles. Minimal support was added to CTL to receive the priority value from different frontends, pass it between HA controllers and report in few places. This patch does not add consumers of this functionality, so nothing should really change yet, since the field is still set to 0 (default) on initiator and not actively used on target. Those are to be implemented separately. I've confirmed priority working on WD Red SATA disks connected via mpr(4) and properly transferred to CTL target via iscsi(4), isp(4) and ocs_fc(4). While there, added missing tag_action support to ocs_fc(4) initiator role. MFC after: 1 month Relnotes: yes Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=367044
* mpr: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-10/+5
| | | | Notes: svn path=/head/; revision=365204
* Remove extra memset() left after r342388.Alexander Motin2020-08-041-1/+0
| | | | | | | | | | | | | This memset() wiped MPI2_FUNCTION_SCSI_TASK_MGMT set by mprsas_alloc_tm(), that broke target reset on device removal, making later re-insertion into the same slot impossible, since firmware was still waiting for the driver to finish with the removed device. MFC after: 1 week Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=363852
* mpr(4), mps(4): Stop checking for failures from malloc(M_WAITOK).Mark Johnston2020-07-271-15/+0
| | | | | | | | | | | PR: 240545 Submitted by: Andrew Reiter <arr@watson.org> Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25766 Notes: svn path=/head/; revision=363608
* Increase buffer in mprsas_log_command() from 192 to 224 bytes.Alexander Motin2020-03-131-1/+1
| | | | | | | | | | | 192 bytes are not enough to print long commands, such as ATA COMMAND PASS THROUGH(16), that makes debug output difficult to read. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=358959
* Remove support for all pre FreeBSD 11.0 versions from mpr and mps.Warner Losh2020-02-261-405/+1
| | | | | | | | | | Remove a number of workarounds for older versions of FreeBSD. FreeBSD stable/10 was branched over 6 years ago. All of these changes date from about that time or earlier. These workarounds are extensive and get in the way of understanding the current flow in the driver. Notes: svn path=/head/; revision=358351
* Before issing the REMOVE_DEVICE command to the firmware, make sure that allWarner Losh2020-02-251-18/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commands have completed. It's not OK to force complete any pending commands before we send the REMOVE_DEVICE. Instead, make sure that all pending commands are complete before sending that. By trying to second guess the firmware here, we run the risk of completing commands twice, which leads to corruption. This removes the forced completion of commands introduced in r218811. So it's a partial backout of that commit, but replaces it with a more rebust mechanism. Either these commands will complete due to the TARGET RESET, or they will timeout and be aborted, but they will all complete. Add assert that all commands are complete to REMOVE_DEVICE completion routine. We attempt to assure this programatically, so we shouldn't have any commands in the queue because we've waited for them all. Any commands that make it into our action routine after we mark the target in removal will complete immediately with an error. When we're removing a target that's not a volume, advertise up the stack that it's actually gone, as opposed to having a transient selection error we should retry. Do this both in the action routine, and when we get a notification of an aborted command. We don't do this for volumes because the driver tries hard not to advertise to the OS a volume has disappeared. Apply these changes to both mpr and mps since they are based on quite similar designs. Discussed with: scottl@ Differential Revision: https://reviews.freebsd.org/D23768 Notes: svn path=/head/; revision=358308
* Fix leak in state machine for commands.Warner Losh2019-11-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When we get a device departed message from the firmware, we send a TARGET_REST to the device to let the firmware know we're done and as part of the recovery process. This will abort all the commands. While the documentation says the IOC is responsible for writing the completion message for all the commands pending with an aborted status, we sometimes have queued commands for the target that haven't been completed so are in the INQUEUE state. So, when we later complete the pending CCB as aborted, these commands are freed and we hit the "state not busy" panic. Elsewhere where we dequeue commands, we move the state to BUSY from INQUEUE. Do that here as well. In talking to Ken, Scott and Justin, they recommended a series of tests to see if this is 100% safe. Those tests are ongoing, but preliminary tests suggest this is safe as we see no duplicate completions when we hit this case at work. We have a machine that has a dodgy powersupply which usually doesn't apply power to a few drives, but sometimes does when the machine is under heavy load so we get a rash of the connect / disconnect messages over half an hour. Without this change, we'd see state not busy panic. With this change, the drives just annoyingly come and go without affecting the rest of the machine, but without a complete error injection test suite, it's hard to know if all edge cases are now covered or not. Discussed with: scottl, ken, gibbs Notes: svn path=/head/; revision=355056
* Fix bugs in recovery path and improve cm trackingWarner Losh2019-07-081-5/+7
| | | | | | | | | | | | | | | | | | | | | Eliminate the TIMEDOUT state. This state really conveyed two different concepts: I timed out during recovery (and my command got put on the recovery queue), and I timed out diring discovery (which doesn't). Separate those two concepts into two flags. Use the TIMEDOUT flag to fail requests as timed out. Use the on queue flag to remove them from the queue. In mps_intr_locked for MPI2_RPY_DESCRIPT_FLAGS_ADDRESS_REPLY message type, when completing commands, ignore the ones that are not in state INQUEUE. They were already completed as part of the recovery process. When we complete them twice, we wind up with entries on the free queue that are marked as busy, trigging asserts. Reviewed by: scottl (earlier version, just for mpr) Differential Revision: https://reviews.freebsd.org/D20785 Notes: svn path=/head/; revision=349849
* Update copyright informationKashyap D Desai2018-12-261-1/+2
| | | | | | | | | | | Submitted by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Notes: svn path=/head/; revision=342535
* Added support for NVMe Task ManagementKashyap D Desai2018-12-261-15/+45
| | | | | | | | | | | | | | | | | | | | Following list of changes done in the driver as a part of TM handling on the NVMe drives. Below changes are only applicable on NVMe drives and only when custom NVMe TM handling bit is set to zero by IOC. 1. Issue LUN reset & Target reset TMs with Target reset method field set to Protocol Level reset (0x3), 2. For LUN & target reset TMs use the timeout value as ControllerResetTO value provided by firmware using PCie Device Page 0, 3. If LUN reset fails to terminates the IO then directly escalate to host reset instead of going for target reset TM, 4. For Abort TM use the timeout value as NVMeAbortTO value given by the IOC using Manufacturing Page 11, 5. Log message "PCie Host Reset failed" message up on receiving P Submitted by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Reviewed by: Kashyap Desai <Kashyap.Desai@broadcom.com> Approved by: ken MFC after: 3 days Sponsored by: Broadcom Inc Notes: svn path=/head/; revision=342530
* Further refactoring for task management commands. Also fix a relatedScott Long2018-12-241-16/+17
| | | | | | | typo from the previous commit. Notes: svn path=/head/; revision=342388
* Commands for user-initated device resets should come from the high-priorityScott Long2018-12-241-2/+2
| | | | | | | allocator. Prior to this change, they would leak from the normal allocator. Notes: svn path=/head/; revision=342387
* First step in refactoring and fixing the error recovery and task managementScott Long2018-12-241-19/+12
| | | | | | | | code in the mpr and mps drivers. Eliminate duplicated code and fix some comments. Notes: svn path=/head/; revision=342386
* mps(4), mpr(4): Fix lifetime of command buffer for mp?sas_get_sata_identifyConrad Meyer2018-12-211-0/+6
| | | | | | | | | | | | | | In the event that the ID command timed out, mps(4)/mpr(4) did not free the command until it could be cancelled. However, it freed the associated buffer (cm_data). Fix the lifetime issue by freeing the associated buffer only after Abort Task or controller reset. Reviewed by: scottl Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D18612 Notes: svn path=/head/; revision=342354
* Make NVMe compatible with the original APIChuck Tuffli2018-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The original NVMe API used bit-fields to represent fields in data structures defined by the specification (e.g. the op-code in the command data structure). The implementation targeted x86_64 processors and defined the bit fields for little endian dwords (i.e. 32 bits). This approach does not work as-is for big endian architectures and was changed to use a combination of bit shifts and masks to support PowerPC. Unfortunately, this changed the NVMe API and forces #ifdef's based on the OS revision level in user space code. This change reverts to something that looks like the original API, but it uses bytes instead of bit-fields inside the packed command structure. As a bonus, this works as-is for both big and little endian CPU architectures. Bump __FreeBSD_version to 1200081 due to API change Reviewed by: imp, kbowling, smh, mav Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D16404 Notes: svn path=/head/; revision=338182
* Disable T10 Protection Information / EEDP handling for type 2 protection.Kenneth D. Merry2018-03-231-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mps(4) and mpr(4) drivers and hardware handle T10 Protection Information, which is a system of checksums and guard blocks to protect data while it is being transferred and while it is on disk. It is also known as T10 DIF. For more details, see section 4.22 of the SBC-4 spec. Supporting Type 2 protection requires using 32 byte CDBs, and filling in the fields in those CDBs. We don't yet support that in the da(4) driver. Type 1 and Type 3 protection don't require that, and can be handled by the mps(4)/mpr(4) driver's code and firmware without any additional input from the da(4) driver. If a drive has Type 2 protection enabled (you frequently see this with SAS drives shipped from Dell), don't set the various EEDP fields in the mps(4)/mpr(4) driver command fields. Otherwise, you wind up with errors like this that would otherwise make no sense: (da9:mpr0:0:18:0): READ(10). CDB: 28 00 00 00 00 00 00 02 00 00 (da9:mpr0:0:18:0): CAM status: SCSI Status Error (da9:mpr0:0:18:0): SCSI status: Check Condition (da9:mpr0:0:18:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid command operation code) (da9:mpr0:0:18:0): (da9:mpr0:0:18:0): Field Replaceable Unit: 0 (da9:mpr0:0:18:0): Command Specific Info: 0 (da9:mpr0:0:18:0): (da9:mpr0:0:18:0): Descriptor 0x80: f8 21 (da9:mpr0:0:18:0): Descriptor 0x81: 00 00 00 00 00 00 (da9:mpr0:0:18:0): Error 22, Unretryable error In other words, what kind of strange SAS hard drive doesn't support a standard 10 byte SCSI READ command? In this case, one that has Type 2 protection enabled. We can revisit this when we put Type 2 protection support in the da(4) driver, but for now this will help people who put Type 2 formatted drives in a system and wonder what in the world is going on. MFC after: 3 days Sponsored by: Spectra Logic Notes: svn path=/head/; revision=331422
* Update mpr(4) driver from v15 to v18 from Broadcom site.Alexander Motin2018-03-191-0/+1
| | | | | | | | | | | | | | Version 16 is just a number bump, since we already had those changes. Version 17 introduces new AdapterType value, that allows new user-space tools from Broadcom to differentiate adapter generations 3 and 3.5. Version 18 updates headers and adds SAS_DEVICE_DISCOVERY_ERROR reporting. MFC after: 2 weeks Notes: svn path=/head/; revision=331228
* NVMe: Add big-endian supportWojciech Macek2018-02-221-6/+10
| | | | | | | | | | | | | | | | Remove bitfields from defined structures as they are not portable. Instead use shift and mask macros in the driver and nvmecontrol application. NVMe is now working on powerpc64 host. Submitted by: Michal Stanek <mst@semihalf.com> Obtained from: Semihalf Reviewed by: imp, wma Sponsored by: IBM, QCM Technologies Differential revision: https://reviews.freebsd.org/D13916 Notes: svn path=/head/; revision=329824
* Improve command lifecycle debugging and detection of problems.Scott Long2018-02-181-7/+14
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=329522
* Teach mps(4) and mpr(4) drivers to autotune chain frames.Alexander Motin2018-02-101-19/+1
| | | | | | | | | | | | | | | | This is a first part of the change. It makes the drivers to calculate the required number of chain frames to satisfy worst case scenarios, but it does not change existing overly strict limits on them. The next step will be to rewrite the allocator to not require megabytes of physically contiguous address space, that may be problematic if done after boot, after doing which the limits can be removed. Until that this code can just correct user set limits, if they are set too high. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D14261 Notes: svn path=/head/; revision=329096
* Fix queue length reporting in mps(4) and mpr(4).Alexander Motin2018-02-061-3/+4
| | | | | | | | | | | | | | | Both drivers were found to report CAM bigger queue depth then they really can handle. It made them later under high load with many disks return some of submitted requests back with CAM_REQUEUE_REQ status for later resubmission. Reviewed by: scottl MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D14215 Notes: svn path=/head/; revision=328937
* Add infrastructure for allocating multiple MSI-X interrupts. AlsoScott Long2017-09-111-0/+3
| | | | | | | | | add more fine-tuned controls for allocating requests and replies. Sponsored by: Netflix Notes: svn path=/head/; revision=323412
* Fix intrhook release in MPR and MPS for EARLY_AP_STARTUP.Scott Long2017-09-101-6/+0
| | | | | | | | Reported by: Limelight Sponsored by: Netflix Notes: svn path=/head/; revision=323384
* Convert some in-line printing of diagnostic into tables.Scott Long2017-09-091-160/+19
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=323380
* Remove the unnecessary use of a temporary string buffer.Scott Long2017-09-091-9/+9
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=323370
* Checkpoint the next phase in debug message cleanup, this time focusing onScott Long2017-09-061-82/+110
| | | | | | | | | error recovery messages. Sponsored by: Netflix Notes: svn path=/head/; revision=323215
* Start overhauling debug printing in the MPS and MPR drivers. The focus of thisScott Long2017-08-271-9/+13
| | | | | | | | | | | commit it to make initiazation less chatty in the normal case, and more useful and informative when real debugging is turned on. Reviewed by: ken (earlier version) Sponsored by: Netflix Notes: svn path=/head/; revision=322943
* Changes to make mps(4) and mpr(4) handle reinit with reallocation.Kenneth D. Merry2017-08-101-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the mps(4) and mpr(4) drivers need to reinitialize the firmware, they sometimes need to reallocate all of the memory allocated by the driver. The reallocation happens whenever the IOC Facts change. That should only happen after a firmware upgrade. If the reinitialization happens as a result of a timed out command sent to the card, the command that timed out and triggered the reinit may have been freed if iocfacts_allocate() reallocated all memory. If the caller attempts to access the command after that, the kernel will panic because the caller will be dereferencing freed memory. The solution is to set a flag in the softc when we reallocate, and avoid dereferencing the command strucure if we've reallocated. The changes are largely the same in both drivers, since mpr(4) is a derivative of mps(4). o In iocfacts_allocate(), if the IOC Facts have changed and we need to reallocate, set the REALLOCATED flag in the softc. o Change wait_command() to take a struct mps_command ** instead of a struct mps_command *. This allows us to NULL out the caller's command pointer if we have to reinit the controller and the data structures get reallocated. (The REALLOCATED flag will be set in the softc if that has happened.) o In every place that calls wait_command(), make sure we handle the case where the command is NULL after the call. o The mpr(4) driver has mpr_request_polled() which can also reinitialize the card. Also check for reallocation there. Reviewed by: scottl, slm MFC after: 1 week Sponsored by: Spectra Logic Notes: svn path=/head/; revision=322364
* Quiet a message that sounds far more dire than it really is.Scott Long2017-07-261-1/+1
| | | | Notes: svn path=/head/; revision=321502
* Fix several problems with mapping code.Stephen McConnell2017-05-251-2/+26
| | | | | | | | | | Reviewed by: ken, scottl, asomers, ambrisko, mav Approved by: ken, mav MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10861 Notes: svn path=/head/; revision=318896
* Fix powerpc compiler error.Stephen McConnell2017-05-221-2/+2
| | | | | | | Approved by: ken Notes: svn path=/head/; revision=318679
* Add tri-mode support (SAS/SATA/PCIe).Stephen McConnell2017-05-171-24/+443
| | | | | | | | | | | | | | | | | | | | This includes NVMe device support and adds support for the following adapters: SAS 3408 SAS 3416 SAS 3508 SAS 3516 SAS 3616 SAS 3708 SAS 3716 Reviewed by: ken, scottl, asomers, mav Approved by: ken, scottl, mav MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D10095 Notes: svn path=/head/; revision=318427
* Improve error messages during command timeout for the mpr and mpsScott Long2017-05-111-4/+5
| | | | | | | | | drivers. Sponsored by: Netflix Notes: svn path=/head/; revision=318188
* Rework the debug print API. Event printing no longer gets special handling.Scott Long2017-01-191-1/+1
| | | | | | | | | | | | | | | | | All of the printing from the tables file now has wrappers so that the handling is cleaner and it's possible to print something out (say, during development) without having to fight the global debug flags. This re-org will also make it easier to have the tables be compiled out at build time if desired. Other than fixing some minor bugs, there are no user-visible changes from this change Sponsored by: Netflix, Inc. Differential Revision: D9238 Notes: svn path=/head/; revision=312437
* Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)Alan Somers2017-01-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Reviewed by: imp, sephe, slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9037 Differential Revision: https://reviews.freebsd.org/D9038 Notes: svn path=/head/; revision=311305
* misc minor fixes in mpr(4)Alan Somers2017-01-031-1/+6
| | | | | | | | | | | | | | | | | | | | | sys/dev/mpr/mpr_sas.c * Fix a potential null pointer dereference (CID 1305731) * Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID 1211934) sys/dev/mpr/mpr_sas_lsi.c * Nullify a dangling pointer in mprsas_get_sata_identify * Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935) Reported by: Coverity (partially) CID: 1305731 1211934 1211935 Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8880 Notes: svn path=/head/; revision=311160
* Record the LogInfo field when reporting the IOCStatus. Helps inScott Long2016-11-041-4/+6
| | | | | | | | | | | debugging errors. Submitted by: slm Obtained from: Netflix MFC after: 3 days Notes: svn path=/head/; revision=308301
* Use real values to calculate Max I/O size instead of guessing.Stephen McConnell2016-07-121-5/+17
| | | | | | | | | | Reviewed by: ken, scottl Approved by: ken, scottl, ambrisko (mentors) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D7043 Notes: svn path=/head/; revision=302673
* Disks can go missing until a reboot is done in some cases.Stephen McConnell2016-05-091-8/+2
| | | | | | | | | | | | | This is due to the DevHandle not being released, which causes the Firmware to not allow that disk to be re-added. Reviewed by: ken, scottl, ambrisko, asomers Approved by: ken, scottl, ambrisko MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6102 Notes: svn path=/head/; revision=299274
* Use callout_reset_sbt() instead of callout_reset() if FreeBSD ver is >= 1000029Stephen McConnell2016-05-091-0/+5
| | | | | | | | | | Reviewed by: ken, scottl, ambrisko, asomers Approved by: ken, scottl, ambrisko MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6101 Notes: svn path=/head/; revision=299271
* No need to set the MPRSAS_SHUTDOWN flag because it's never used.Stephen McConnell2016-05-091-1/+0
| | | | | | | | Approved by: ken, scottl, ambrisko MFC after: 1 week Notes: svn path=/head/; revision=299270
* Fix possible use of invalid pointer.Stephen McConnell2016-05-091-1/+4
| | | | | | | | | | | | | | It was possible to use an invalid pointer to get the target ID value. To fix this, initialize a local Target ID variable to an invalid value and change that variable to a valid value only if the pointer to the Target ID is not NULL. Reviewed by: ken, scottl, ambrisko, asomers Approved by: ken, scottl, ambrisko MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6100 Notes: svn path=/head/; revision=299269
* No log bit in IOCStatus and endian-safe changes.Stephen McConnell2016-05-091-6/+10
| | | | | | | | | | | | | Use MPI2_IOCSTATUS_MASK when checking IOCStatus to mask off the log bit, and make a few more things endian-safe. Reviewed by: ken, scottl, ambrisko, asomers Approved by: ken, scottl, ambrisko MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6097 Notes: svn path=/head/; revision=299267
* Add support for the Broadcom (Avago/LSI) 9305 16 and 24 port HBA's.Stephen McConnell2016-05-091-0/+4
| | | | | | | | | | | Reviewed by: ken, scottl, ambrisko, asomers Approved by: ken, scottl, ambrisko MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D6098 Notes: svn path=/head/; revision=299266
* Several style changes and add copyrights for 2016.Stephen McConnell2016-05-091-52/+43
| | | | | | | | | | Reviewed by: ken, scottl, ambrisko, asomers Approved by: ken, scottl, ambrisko MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6103 Notes: svn path=/head/; revision=299265
* mpr(4) and mps(4) shouldn't indefinitely retry for "terminated ioc" errorsAlan Somers2016-05-051-4/+13
| | | | | | | | | | | Submitted by: ken Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6210 Notes: svn path=/head/; revision=299121
* The wrong commit message was given with r283632. This is the correct message.Stephen McConnell2015-05-281-215/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Updated all files with 2015 Avago copyright, and updated LSI's copyright dates. - Changed all of the PCI device strings from LSI to Avago Technologies (LSI). - Added a sysctl variable to control how StartStopUnit behavior works. User can select to spin down disks based on if disk is SSD or HDD. - Inquiry data is required to tell if a disk will support SSU at shutdown or not. Due to the addition of mpssas_async, which gets Advanced Info but not Inquiry data, the setting of supports_SSU was moved to the mpssas_scsiio_complete function, which snoops for any Inquiry commands. And, since disks are shutdown as a target and not a LUN, this process was simplified by basing it on targets and not LUNs. - Added a sysctl variable that sets the amount of time to retry after sending a failed SATA ID command. This helps with some bad disks and large disks that require a lot of time to spin up. Part of this change was to add a callout to handle timeouts with the SATA ID command. The callout function is called mpssas_ata_id_timeout(). (Fixes PR 191348) - Changed the way resets work by allowing I/O to continue to devices that are not currently under a reset condition. This uses devq's instead of simq's and makes use of the MPSSAS_TARGET_INRESET flag. This change also adds a function called mpssas_prepare_tm(). - Some changes were made to reduce code duplication when getting a SAS address for a SATA disk. - Fixed some formatting and whitespace. - Bump version of mps driver to 9.255.01.00-fbsd PR: 191348 Reviewed by: ken, scottl Approved by: ken, scottl MFC after: 1 week Notes: svn path=/head/; revision=283661
* The wrong commit message was given with r283632. To get the correct commitStephen McConnell2015-05-281-261/+215
| | | | | | | | | | | message synced to the changes in r283632, those changes are now backed out. Another commit will be done that is exactly the same as r283632 except it will have to correct commit message. Approved by: ken, scottl, asomers, gibbs Notes: svn path=/head/; revision=283660
* This setting of stop_at_shutdown should have been removed with r279253Stephen McConnell2015-05-271-215/+261
| | | | | | | | Approved by: ken MFC after: 1 week Notes: svn path=/head/; revision=283632