summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:18:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:18:06 +0000
commit638a9e433ecd61e64761352dbec1fa4f5874c941 (patch)
treefdbff74a238d7a5a7d1cef071b7230bc064b9f25 /drivers/scsi/megaraid
parentReleasing progress-linux version 6.9.12-1~progress7.99u1. (diff)
downloadlinux-638a9e433ecd61e64761352dbec1fa4f5874c941.tar.xz
linux-638a9e433ecd61e64761352dbec1fa4f5874c941.zip
Merging upstream version 6.10.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/megaraid/Kconfig.megaraid113
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.h2
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c33
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c3
4 files changed, 78 insertions, 73 deletions
diff --git a/drivers/scsi/megaraid/Kconfig.megaraid b/drivers/scsi/megaraid/Kconfig.megaraid
index 3f2ce1eb08..56b76d7389 100644
--- a/drivers/scsi/megaraid/Kconfig.megaraid
+++ b/drivers/scsi/megaraid/Kconfig.megaraid
@@ -3,85 +3,84 @@ config MEGARAID_NEWGEN
bool "LSI Logic New Generation RAID Device Drivers"
depends on PCI && HAS_IOPORT && SCSI
help
- LSI Logic RAID Device Drivers
+ LSI Logic RAID Device Drivers
config MEGARAID_MM
tristate "LSI Logic Management Module (New Driver)"
depends on PCI && HAS_IOPORT && SCSI && MEGARAID_NEWGEN
help
- Management Module provides ioctl, sysfs support for LSI Logic
- RAID controllers.
- To compile this driver as a module, choose M here: the
- module will be called megaraid_mm
+ Management Module provides ioctl, sysfs support for LSI Logic
+ RAID controllers.
+ To compile this driver as a module, choose M here: the
+ module will be called megaraid_mm
config MEGARAID_MAILBOX
tristate "LSI Logic MegaRAID Driver (New Driver)"
depends on PCI && SCSI && MEGARAID_MM
help
- List of supported controllers
+ List of supported controllers
- OEM Product Name VID :DID :SVID:SSID
- --- ------------ ---- ---- ---- ----
- Dell PERC3/QC 101E:1960:1028:0471
- Dell PERC3/DC 101E:1960:1028:0493
- Dell PERC3/SC 101E:1960:1028:0475
- Dell PERC3/Di 1028:000E:1028:0123
- Dell PERC4/SC 1000:1960:1028:0520
- Dell PERC4/DC 1000:1960:1028:0518
- Dell PERC4/QC 1000:0407:1028:0531
- Dell PERC4/Di 1028:000F:1028:014A
- Dell PERC 4e/Si 1028:0013:1028:016c
- Dell PERC 4e/Di 1028:0013:1028:016d
- Dell PERC 4e/Di 1028:0013:1028:016e
- Dell PERC 4e/Di 1028:0013:1028:016f
- Dell PERC 4e/Di 1028:0013:1028:0170
- Dell PERC 4e/DC 1000:0408:1028:0002
- Dell PERC 4e/SC 1000:0408:1028:0001
- LSI MegaRAID SCSI 320-0 1000:1960:1000:A520
- LSI MegaRAID SCSI 320-1 1000:1960:1000:0520
- LSI MegaRAID SCSI 320-2 1000:1960:1000:0518
- LSI MegaRAID SCSI 320-0X 1000:0407:1000:0530
- LSI MegaRAID SCSI 320-2X 1000:0407:1000:0532
- LSI MegaRAID SCSI 320-4X 1000:0407:1000:0531
- LSI MegaRAID SCSI 320-1E 1000:0408:1000:0001
- LSI MegaRAID SCSI 320-2E 1000:0408:1000:0002
- LSI MegaRAID SATA 150-4 1000:1960:1000:4523
- LSI MegaRAID SATA 150-6 1000:1960:1000:0523
- LSI MegaRAID SATA 300-4X 1000:0409:1000:3004
- LSI MegaRAID SATA 300-8X 1000:0409:1000:3008
- INTEL RAID Controller SRCU42X 1000:0407:8086:0532
- INTEL RAID Controller SRCS16 1000:1960:8086:0523
- INTEL RAID Controller SRCU42E 1000:0408:8086:0002
- INTEL RAID Controller SRCZCRX 1000:0407:8086:0530
- INTEL RAID Controller SRCS28X 1000:0409:8086:3008
- INTEL RAID Controller SROMBU42E 1000:0408:8086:3431
- INTEL RAID Controller SROMBU42E 1000:0408:8086:3499
- INTEL RAID Controller SRCU51L 1000:1960:8086:0520
- FSC MegaRAID PCI Express ROMB 1000:0408:1734:1065
- ACER MegaRAID ROMB-2E 1000:0408:1025:004D
- NEC MegaRAID PCI Express ROMB 1000:0408:1033:8287
+ OEM Product Name VID :DID :SVID:SSID
+ --- ------------ ---- ---- ---- ----
+ Dell PERC3/QC 101E:1960:1028:0471
+ Dell PERC3/DC 101E:1960:1028:0493
+ Dell PERC3/SC 101E:1960:1028:0475
+ Dell PERC3/Di 1028:000E:1028:0123
+ Dell PERC4/SC 1000:1960:1028:0520
+ Dell PERC4/DC 1000:1960:1028:0518
+ Dell PERC4/QC 1000:0407:1028:0531
+ Dell PERC4/Di 1028:000F:1028:014A
+ Dell PERC 4e/Si 1028:0013:1028:016c
+ Dell PERC 4e/Di 1028:0013:1028:016d
+ Dell PERC 4e/Di 1028:0013:1028:016e
+ Dell PERC 4e/Di 1028:0013:1028:016f
+ Dell PERC 4e/Di 1028:0013:1028:0170
+ Dell PERC 4e/DC 1000:0408:1028:0002
+ Dell PERC 4e/SC 1000:0408:1028:0001
+ LSI MegaRAID SCSI 320-0 1000:1960:1000:A520
+ LSI MegaRAID SCSI 320-1 1000:1960:1000:0520
+ LSI MegaRAID SCSI 320-2 1000:1960:1000:0518
+ LSI MegaRAID SCSI 320-0X 1000:0407:1000:0530
+ LSI MegaRAID SCSI 320-2X 1000:0407:1000:0532
+ LSI MegaRAID SCSI 320-4X 1000:0407:1000:0531
+ LSI MegaRAID SCSI 320-1E 1000:0408:1000:0001
+ LSI MegaRAID SCSI 320-2E 1000:0408:1000:0002
+ LSI MegaRAID SATA 150-4 1000:1960:1000:4523
+ LSI MegaRAID SATA 150-6 1000:1960:1000:0523
+ LSI MegaRAID SATA 300-4X 1000:0409:1000:3004
+ LSI MegaRAID SATA 300-8X 1000:0409:1000:3008
+ INTEL RAID Controller SRCU42X 1000:0407:8086:0532
+ INTEL RAID Controller SRCS16 1000:1960:8086:0523
+ INTEL RAID Controller SRCU42E 1000:0408:8086:0002
+ INTEL RAID Controller SRCZCRX 1000:0407:8086:0530
+ INTEL RAID Controller SRCS28X 1000:0409:8086:3008
+ INTEL RAID Controller SROMBU42E 1000:0408:8086:3431
+ INTEL RAID Controller SROMBU42E 1000:0408:8086:3499
+ INTEL RAID Controller SRCU51L 1000:1960:8086:0520
+ FSC MegaRAID PCI Express ROMB 1000:0408:1734:1065
+ ACER MegaRAID ROMB-2E 1000:0408:1025:004D
+ NEC MegaRAID PCI Express ROMB 1000:0408:1033:8287
- To compile this driver as a module, choose M here: the
- module will be called megaraid_mbox
+ To compile this driver as a module, choose M here: the
+ module will be called megaraid_mbox
config MEGARAID_LEGACY
tristate "LSI Logic Legacy MegaRAID Driver"
depends on PCI && HAS_IOPORT && SCSI
help
- This driver supports the LSI MegaRAID 418, 428, 438, 466, 762, 490
- and 467 SCSI host adapters. This driver also support the all U320
- RAID controllers
+ This driver supports the LSI MegaRAID 418, 428, 438, 466, 762, 490
+ and 467 SCSI host adapters. This driver also support the all U320
+ RAID controllers
- To compile this driver as a module, choose M here: the
- module will be called megaraid
+ To compile this driver as a module, choose M here: the
+ module will be called megaraid
config MEGARAID_SAS
tristate "LSI Logic MegaRAID SAS RAID Module"
depends on PCI && SCSI
select IRQ_POLL
help
- Module for LSI Logic's SAS based RAID controllers.
- To compile this driver as a module, choose 'm' here.
- Module will be called megaraid_sas
-
+ Module for LSI Logic's SAS based RAID controllers.
+ To compile this driver as a module, choose 'm' here.
+ Module will be called megaraid_sas
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 56624cbf7f..5680c6cdb2 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -2701,7 +2701,7 @@ int megasas_get_ctrl_info(struct megasas_instance *instance);
int
megasas_sync_pd_seq_num(struct megasas_instance *instance, bool pend);
void megasas_set_dynamic_target_properties(struct scsi_device *sdev,
- bool is_target_prop);
+ struct queue_limits *lim, bool is_target_prop);
int megasas_get_target_prop(struct megasas_instance *instance,
struct scsi_device *sdev);
void megasas_get_snapdump_properties(struct megasas_instance *instance);
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 3d4f13da1a..88acefbf9a 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -1888,7 +1888,7 @@ static struct megasas_instance *megasas_lookup_instance(u16 host_no)
* Returns void
*/
void megasas_set_dynamic_target_properties(struct scsi_device *sdev,
- bool is_target_prop)
+ struct queue_limits *lim, bool is_target_prop)
{
u16 pd_index = 0, ld;
u32 device_id;
@@ -1915,8 +1915,10 @@ void megasas_set_dynamic_target_properties(struct scsi_device *sdev,
return;
raid = MR_LdRaidGet(ld, local_map_ptr);
- if (raid->capability.ldPiMode == MR_PROT_INFO_TYPE_CONTROLLER)
- blk_queue_update_dma_alignment(sdev->request_queue, 0x7);
+ if (raid->capability.ldPiMode == MR_PROT_INFO_TYPE_CONTROLLER) {
+ if (lim)
+ lim->dma_alignment = 0x7;
+ }
mr_device_priv_data->is_tm_capable =
raid->capability.tmCapable;
@@ -1967,7 +1969,8 @@ void megasas_set_dynamic_target_properties(struct scsi_device *sdev,
*
*/
static inline void
-megasas_set_nvme_device_properties(struct scsi_device *sdev, u32 max_io_size)
+megasas_set_nvme_device_properties(struct scsi_device *sdev,
+ struct queue_limits *lim, u32 max_io_size)
{
struct megasas_instance *instance;
u32 mr_nvme_pg_size;
@@ -1976,10 +1979,10 @@ megasas_set_nvme_device_properties(struct scsi_device *sdev, u32 max_io_size)
mr_nvme_pg_size = max_t(u32, instance->nvme_page_size,
MR_DEFAULT_NVME_PAGE_SIZE);
- blk_queue_max_hw_sectors(sdev->request_queue, (max_io_size / 512));
+ lim->max_hw_sectors = max_io_size / 512;
+ lim->virt_boundary_mask = mr_nvme_pg_size - 1;
blk_queue_flag_set(QUEUE_FLAG_NOMERGES, sdev->request_queue);
- blk_queue_virt_boundary(sdev->request_queue, mr_nvme_pg_size - 1);
}
/*
@@ -2041,7 +2044,7 @@ static void megasas_set_fw_assisted_qd(struct scsi_device *sdev,
* @is_target_prop true, if fw provided target properties.
*/
static void megasas_set_static_target_properties(struct scsi_device *sdev,
- bool is_target_prop)
+ struct queue_limits *lim, bool is_target_prop)
{
u32 max_io_size_kb = MR_DEFAULT_NVME_MDTS_KB;
struct megasas_instance *instance;
@@ -2060,13 +2063,15 @@ static void megasas_set_static_target_properties(struct scsi_device *sdev,
max_io_size_kb = le32_to_cpu(instance->tgt_prop->max_io_size_kb);
if (instance->nvme_page_size && max_io_size_kb)
- megasas_set_nvme_device_properties(sdev, (max_io_size_kb << 10));
+ megasas_set_nvme_device_properties(sdev, lim,
+ max_io_size_kb << 10);
megasas_set_fw_assisted_qd(sdev, is_target_prop);
}
-static int megasas_slave_configure(struct scsi_device *sdev)
+static int megasas_device_configure(struct scsi_device *sdev,
+ struct queue_limits *lim)
{
u16 pd_index = 0;
struct megasas_instance *instance;
@@ -2096,10 +2101,10 @@ static int megasas_slave_configure(struct scsi_device *sdev)
ret_target_prop = megasas_get_target_prop(instance, sdev);
is_target_prop = (ret_target_prop == DCMD_SUCCESS) ? true : false;
- megasas_set_static_target_properties(sdev, is_target_prop);
+ megasas_set_static_target_properties(sdev, lim, is_target_prop);
/* This sdev property may change post OCR */
- megasas_set_dynamic_target_properties(sdev, is_target_prop);
+ megasas_set_dynamic_target_properties(sdev, lim, is_target_prop);
mutex_unlock(&instance->reset_mutex);
@@ -3507,7 +3512,7 @@ static const struct scsi_host_template megasas_template = {
.module = THIS_MODULE,
.name = "Avago SAS based MegaRAID driver",
.proc_name = "megaraid_sas",
- .slave_configure = megasas_slave_configure,
+ .device_configure = megasas_device_configure,
.slave_alloc = megasas_slave_alloc,
.slave_destroy = megasas_slave_destroy,
.queuecommand = megasas_queue_command,
@@ -6300,7 +6305,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
}
if (!instance->msix_vectors) {
- i = pci_alloc_irq_vectors(instance->pdev, 1, 1, PCI_IRQ_LEGACY);
+ i = pci_alloc_irq_vectors(instance->pdev, 1, 1, PCI_IRQ_INTX);
if (i < 0)
goto fail_init_adapter;
}
@@ -7839,7 +7844,7 @@ megasas_resume(struct device *dev)
if (!instance->msix_vectors) {
rval = pci_alloc_irq_vectors(instance->pdev, 1, 1,
- PCI_IRQ_LEGACY);
+ PCI_IRQ_INTX);
if (rval < 0)
goto fail_reenable_msix;
}
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index c60014e07b..6c1fb81495 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -5119,7 +5119,8 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int reason)
ret_target_prop = megasas_get_target_prop(instance, sdev);
is_target_prop = (ret_target_prop == DCMD_SUCCESS) ? true : false;
- megasas_set_dynamic_target_properties(sdev, is_target_prop);
+ megasas_set_dynamic_target_properties(sdev, NULL,
+ is_target_prop);
}
status_reg = instance->instancet->read_fw_status_reg