Skip to content

Commit 227b5a2

Browse files
committed
Merge: scsi: mpt3sas driver update for RHEL9.8
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7588 JIRA: https://issues.redhat.com/browse/RHEL-101342 scsi: mpt3sas driver updates Upstream Status: Accepted Tested: Compiled and tested on Local Development Setup Signed-off-by: Chandrakanth Patil <chanpati@redhat.com> Approved-by: Tomas Henzl <thenzl@redhat.com> Approved-by: Maurizio Lombardi <mlombard@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Patrick Talbert <ptalbert@redhat.com>
2 parents 908fb5c + b6dff7b commit 227b5a2

File tree

5 files changed

+36
-12
lines changed

5 files changed

+36
-12
lines changed

drivers/scsi/mpt3sas/mpt3sas_base.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,13 @@ _base_display_reply_info(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
14201420

14211421
if (ioc_status & MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) {
14221422
loginfo = le32_to_cpu(mpi_reply->IOCLogInfo);
1423-
_base_sas_log_info(ioc, loginfo);
1423+
if (ioc->logging_level & MPT_DEBUG_REPLY)
1424+
_base_sas_log_info(ioc, loginfo);
1425+
else {
1426+
if (!((ioc_status & MPI2_IOCSTATUS_MASK) &
1427+
MPI2_IOCSTATUS_CONFIG_INVALID_PAGE))
1428+
_base_sas_log_info(ioc, loginfo);
1429+
}
14241430
}
14251431

14261432
if (ioc_status || loginfo) {

drivers/scsi/mpt3sas/mpt3sas_base.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
#define MPT3SAS_DRIVER_NAME "mpt3sas"
7878
#define MPT3SAS_AUTHOR "Avago Technologies <MPT-FusionLinux.pdl@avagotech.com>"
7979
#define MPT3SAS_DESCRIPTION "LSI MPT Fusion SAS 3.0 Device Driver"
80-
#define MPT3SAS_DRIVER_VERSION "52.100.00.00"
81-
#define MPT3SAS_MAJOR_VERSION 52
80+
#define MPT3SAS_DRIVER_VERSION "54.100.00.00"
81+
#define MPT3SAS_MAJOR_VERSION 54
8282
#define MPT3SAS_MINOR_VERSION 100
8383
#define MPT3SAS_BUILD_VERSION 00
8484
#define MPT3SAS_RELEASE_VERSION 00

drivers/scsi/mpt3sas/mpt3sas_ctl.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,8 +2869,9 @@ _ctl_get_mpt_mctp_passthru_adapter(int dev_index)
28692869
if (ioc->facts.IOCCapabilities & MPI26_IOCFACTS_CAPABILITY_MCTP_PASSTHRU) {
28702870
if (count == dev_index) {
28712871
spin_unlock(&gioc_lock);
2872-
return 0;
2872+
return ioc;
28732873
}
2874+
count++;
28742875
}
28752876
}
28762877
spin_unlock(&gioc_lock);
@@ -2913,7 +2914,6 @@ int mpt3sas_send_mctp_passthru_req(struct mpt3_passthru_command *command)
29132914
{
29142915
struct MPT3SAS_ADAPTER *ioc;
29152916
MPI2RequestHeader_t *mpi_request = NULL, *request;
2916-
MPI2DefaultReply_t *mpi_reply;
29172917
Mpi26MctpPassthroughRequest_t *mctp_passthru_req;
29182918
u16 smid;
29192919
unsigned long timeout;
@@ -3021,8 +3021,6 @@ int mpt3sas_send_mctp_passthru_req(struct mpt3_passthru_command *command)
30213021
goto issue_host_reset;
30223022
}
30233023

3024-
mpi_reply = ioc->ctl_cmds.reply;
3025-
30263024
/* copy out xdata to user */
30273025
if (data_in_sz)
30283026
memcpy(command->data_in_buf_ptr, data_in, data_in_sz);

drivers/scsi/mpt3sas/mpt3sas_scsih.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@ struct sense_info {
195195
#define MPT3SAS_PORT_ENABLE_COMPLETE (0xFFFD)
196196
#define MPT3SAS_ABRT_TASK_SET (0xFFFE)
197197
#define MPT3SAS_REMOVE_UNRESPONDING_DEVICES (0xFFFF)
198+
199+
/*
200+
* SAS Log info code for a NCQ collateral abort after an NCQ error:
201+
* IOC_LOGINFO_PREFIX_PL | PL_LOGINFO_CODE_SATA_NCQ_FAIL_ALL_CMDS_AFTR_ERR
202+
* See: drivers/message/fusion/lsi/mpi_log_sas.h
203+
*/
204+
#define IOC_LOGINFO_SATA_NCQ_FAIL_AFTER_ERR 0x31080000
205+
198206
/**
199207
* struct fw_event_work - firmware event struct
200208
* @list: link list framework
@@ -5828,6 +5836,17 @@ _scsih_io_done(struct MPT3SAS_ADAPTER *ioc, u16 smid, u8 msix_index, u32 reply)
58285836
scmd->result = DID_TRANSPORT_DISRUPTED << 16;
58295837
goto out;
58305838
}
5839+
if (log_info == IOC_LOGINFO_SATA_NCQ_FAIL_AFTER_ERR) {
5840+
/*
5841+
* This is a ATA NCQ command aborted due to another NCQ
5842+
* command failure. We must retry this command
5843+
* immediately but without incrementing its retry
5844+
* counter.
5845+
*/
5846+
WARN_ON_ONCE(xfer_cnt != 0);
5847+
scmd->result = DID_IMM_RETRY << 16;
5848+
break;
5849+
}
58315850
if (log_info == 0x31110630) {
58325851
if (scmd->retries > 2) {
58335852
scmd->result = DID_NO_CONNECT << 16;

drivers/scsi/mpt3sas/mpt3sas_transport.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ _transport_convert_phy_link_rate(u8 link_rate)
166166
case MPI25_SAS_NEG_LINK_RATE_12_0:
167167
rc = SAS_LINK_RATE_12_0_GBPS;
168168
break;
169+
case MPI26_SAS_NEG_LINK_RATE_22_5:
170+
rc = SAS_LINK_RATE_22_5_GBPS;
171+
break;
169172
case MPI2_SAS_NEG_LINK_RATE_PHY_DISABLED:
170173
rc = SAS_PHY_DISABLED;
171174
break;
@@ -987,11 +990,9 @@ mpt3sas_transport_port_remove(struct MPT3SAS_ADAPTER *ioc, u64 sas_address,
987990
list_for_each_entry_safe(mpt3sas_phy, next_phy,
988991
&mpt3sas_port->phy_list, port_siblings) {
989992
if ((ioc->logging_level & MPT_DEBUG_TRANSPORT))
990-
dev_printk(KERN_INFO, &mpt3sas_port->port->dev,
991-
"remove: sas_addr(0x%016llx), phy(%d)\n",
992-
(unsigned long long)
993-
mpt3sas_port->remote_identify.sas_address,
994-
mpt3sas_phy->phy_id);
993+
ioc_info(ioc, "remove: sas_addr(0x%016llx), phy(%d)\n",
994+
(unsigned long long) mpt3sas_port->remote_identify.sas_address,
995+
mpt3sas_phy->phy_id);
995996
mpt3sas_phy->phy_belongs_to_port = 0;
996997
if (!ioc->remove_host)
997998
sas_port_delete_phy(mpt3sas_port->port,

0 commit comments

Comments
 (0)