Commit 44ef1604 authored by Martin K. Petersen's avatar Martin K. Petersen

Merge patch series "smartpqi updates"

Don Brace <don.brace@microchip.com> says:

These patches are based on Martin Petersen's 6.4/scsi-queue tree
  https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
  6.4/scsi-queue

This set of changes consists of:

 * Map entire BAR 0.  The driver was mapping up to and including the
   controller registers, but not all of BAR 0.

 * Add PCI IDs to support new controllers.

 * Clean up some code by removing unnecessary NULL checks.  This cleanup is
   a result of a Coverity report.

 * Correct a rare memory leak whenever pqi_sas_port_add_rhpy() returns an
   error. This was Suggested by: Yang Yingliang <yangyingliang@huawei.com>

 * Remove atomic operations on variable raid_bypass_cnt. Accuracy is not
   required for driver operation. Change type from atomic_t to unsigned
   int.

 * Correct a rare drive hot-plug removal issue where we get a NULL
   io_request. We added a check for this condition.

 * Turn on NCQ priority for AIO requests to disks comprising RAID devices.

 * Correct byte aligned writew() operations on some ARM servers. Changed
   the writew() to two writeb() operations.

 * Change how the driver checks for a sanitize operation in progress.  We
   were using TEST UNIT READY. We removed the TEST UNIT READY code and are
   now using the controller's firmware information in order to avoid issues
   caused by drives failing to complete TEST UNIT READY.

 * Some customers have been requesting that we add the NUMA node to
   /sys/block/sd<scsi device>/device like the nvme driver does.

 * Update the copyright information to match the current year.

 * Bump the driver version to 2.1.22-040.

Link: https://lore.kernel.org/r/20230428153712.297638-1-don.brace@microchip.comSigned-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parents 79c67c54 fcb40511
#
# Kernel configuration file for the SMARTPQI
#
# Copyright (c) 2019-2022 Microchip Technology Inc. and its subsidiaries
# Copyright (c) 2019-2023 Microchip Technology Inc. and its subsidiaries
# Copyright (c) 2017-2018 Microsemi Corporation
# Copyright (c) 2016 Microsemi Corporation
# Copyright (c) 2016 PMC-Sierra, Inc.
......
/* SPDX-License-Identifier: GPL-2.0 */
/*
* driver for Microchip PQI-based storage controllers
* Copyright (c) 2019-2022 Microchip Technology Inc. and its subsidiaries
* Copyright (c) 2019-2023 Microchip Technology Inc. and its subsidiaries
* Copyright (c) 2016-2018 Microsemi Corporation
* Copyright (c) 2016 PMC-Sierra, Inc.
*
......@@ -1108,6 +1108,7 @@ struct pqi_scsi_dev {
u8 volume_offline : 1;
u8 rescan : 1;
u8 ignore_device : 1;
u8 erase_in_progress : 1;
bool aio_enabled; /* only valid for physical disks */
bool in_remove;
bool device_offline;
......@@ -1147,7 +1148,7 @@ struct pqi_scsi_dev {
struct pqi_stream_data stream_data[NUM_STREAMS_PER_LUN];
atomic_t scsi_cmds_outstanding[PQI_MAX_LUNS_PER_DEVICE];
atomic_t raid_bypass_cnt;
unsigned int raid_bypass_cnt;
};
/* VPD inquiry pages */
......@@ -1357,6 +1358,7 @@ struct pqi_ctrl_info {
u32 max_write_raid_5_6;
u32 max_write_raid_1_10_2drive;
u32 max_write_raid_1_10_3drive;
int numa_node;
struct list_head scsi_device_list;
spinlock_t scsi_device_list_lock;
......
This diff is collapsed.
// SPDX-License-Identifier: GPL-2.0
/*
* driver for Microchip PQI-based storage controllers
* Copyright (c) 2019-2022 Microchip Technology Inc. and its subsidiaries
* Copyright (c) 2019-2023 Microchip Technology Inc. and its subsidiaries
* Copyright (c) 2016-2018 Microsemi Corporation
* Copyright (c) 2016 PMC-Sierra, Inc.
*
......@@ -92,25 +92,23 @@ static int pqi_sas_port_add_rphy(struct pqi_sas_port *pqi_sas_port,
identify = &rphy->identify;
identify->sas_address = pqi_sas_port->sas_address;
identify->phy_identifier = pqi_sas_port->device->phy_id;
identify->initiator_port_protocols = SAS_PROTOCOL_ALL;
identify->target_port_protocols = SAS_PROTOCOL_STP;
if (pqi_sas_port->device) {
identify->phy_identifier = pqi_sas_port->device->phy_id;
switch (pqi_sas_port->device->device_type) {
case SA_DEVICE_TYPE_SAS:
case SA_DEVICE_TYPE_SES:
case SA_DEVICE_TYPE_NVME:
identify->target_port_protocols = SAS_PROTOCOL_SSP;
break;
case SA_DEVICE_TYPE_EXPANDER_SMP:
identify->target_port_protocols = SAS_PROTOCOL_SMP;
break;
case SA_DEVICE_TYPE_SATA:
default:
break;
}
switch (pqi_sas_port->device->device_type) {
case SA_DEVICE_TYPE_SAS:
case SA_DEVICE_TYPE_SES:
case SA_DEVICE_TYPE_NVME:
identify->target_port_protocols = SAS_PROTOCOL_SSP;
break;
case SA_DEVICE_TYPE_EXPANDER_SMP:
identify->target_port_protocols = SAS_PROTOCOL_SMP;
break;
case SA_DEVICE_TYPE_SATA:
default:
break;
}
return sas_rphy_add(rphy);
......@@ -295,10 +293,12 @@ int pqi_add_sas_device(struct pqi_sas_node *pqi_sas_node,
rc = pqi_sas_port_add_rphy(pqi_sas_port, rphy);
if (rc)
goto free_sas_port;
goto free_sas_rphy;
return 0;
free_sas_rphy:
sas_rphy_free(rphy);
free_sas_port:
pqi_free_sas_port(pqi_sas_port);
device->sas_port = NULL;
......
// SPDX-License-Identifier: GPL-2.0
/*
* driver for Microchip PQI-based storage controllers
* Copyright (c) 2019-2022 Microchip Technology Inc. and its subsidiaries
* Copyright (c) 2019-2023 Microchip Technology Inc. and its subsidiaries
* Copyright (c) 2016-2018 Microsemi Corporation
* Copyright (c) 2016 PMC-Sierra, Inc.
*
......
/* SPDX-License-Identifier: GPL-2.0 */
/*
* driver for Microchip PQI-based storage controllers
* Copyright (c) 2019-2022 Microchip Technology Inc. and its subsidiaries
* Copyright (c) 2019-2023 Microchip Technology Inc. and its subsidiaries
* Copyright (c) 2016-2018 Microsemi Corporation
* Copyright (c) 2016 PMC-Sierra, Inc.
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment