Skip to content

Commit 84e4697

Browse files
mpemartinkpetersen
authored andcommitted
scsi: ipr: Remove obsolete check for old CPUs
The IPR driver has a routine to check whether it's running on certain CPU versions and if so whether the adapter is supported on that CPU. But none of the CPUs it checks for are supported by Linux anymore. The most recent CPU it checks for is Power4+ which was removed in commit 471d7ff ("powerpc/64s: Remove POWER4 support"). So drop the check. That makes the "testmode" module parameter unused, so remove it as well. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20231127111740.1288463-1-mpe@ellerman.id.au Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 712b3f4 commit 84e4697

1 file changed

Lines changed: 0 additions & 55 deletions

File tree

drivers/scsi/ipr.c

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
static LIST_HEAD(ipr_ioa_head);
7878
static unsigned int ipr_log_level = IPR_DEFAULT_LOG_LEVEL;
7979
static unsigned int ipr_max_speed = 1;
80-
static int ipr_testmode = 0;
8180
static unsigned int ipr_fastfail = 0;
8281
static unsigned int ipr_transop_timeout = 0;
8382
static unsigned int ipr_debug = 0;
@@ -193,8 +192,6 @@ module_param_named(max_speed, ipr_max_speed, uint, 0);
193192
MODULE_PARM_DESC(max_speed, "Maximum bus speed (0-2). Default: 1=U160. Speeds: 0=80 MB/s, 1=U160, 2=U320");
194193
module_param_named(log_level, ipr_log_level, uint, 0);
195194
MODULE_PARM_DESC(log_level, "Set to 0 - 4 for increasing verbosity of device driver");
196-
module_param_named(testmode, ipr_testmode, int, 0);
197-
MODULE_PARM_DESC(testmode, "DANGEROUS!!! Allows unsupported configurations");
198195
module_param_named(fastfail, ipr_fastfail, int, S_IRUGO | S_IWUSR);
199196
MODULE_PARM_DESC(fastfail, "Reduce timeouts and retries");
200197
module_param_named(transop_timeout, ipr_transop_timeout, int, 0);
@@ -6416,45 +6413,6 @@ static const struct scsi_host_template driver_template = {
64166413
.proc_name = IPR_NAME,
64176414
};
64186415

6419-
#ifdef CONFIG_PPC_PSERIES
6420-
static const u16 ipr_blocked_processors[] = {
6421-
PVR_NORTHSTAR,
6422-
PVR_PULSAR,
6423-
PVR_POWER4,
6424-
PVR_ICESTAR,
6425-
PVR_SSTAR,
6426-
PVR_POWER4p,
6427-
PVR_630,
6428-
PVR_630p
6429-
};
6430-
6431-
/**
6432-
* ipr_invalid_adapter - Determine if this adapter is supported on this hardware
6433-
* @ioa_cfg: ioa cfg struct
6434-
*
6435-
* Adapters that use Gemstone revision < 3.1 do not work reliably on
6436-
* certain pSeries hardware. This function determines if the given
6437-
* adapter is in one of these confgurations or not.
6438-
*
6439-
* Return value:
6440-
* 1 if adapter is not supported / 0 if adapter is supported
6441-
**/
6442-
static int ipr_invalid_adapter(struct ipr_ioa_cfg *ioa_cfg)
6443-
{
6444-
int i;
6445-
6446-
if ((ioa_cfg->type == 0x5702) && (ioa_cfg->pdev->revision < 4)) {
6447-
for (i = 0; i < ARRAY_SIZE(ipr_blocked_processors); i++) {
6448-
if (pvr_version_is(ipr_blocked_processors[i]))
6449-
return 1;
6450-
}
6451-
}
6452-
return 0;
6453-
}
6454-
#else
6455-
#define ipr_invalid_adapter(ioa_cfg) 0
6456-
#endif
6457-
64586416
/**
64596417
* ipr_ioa_bringdown_done - IOA bring down completion.
64606418
* @ipr_cmd: ipr command struct
@@ -7385,19 +7343,6 @@ static int ipr_ioafp_page0_inquiry(struct ipr_cmnd *ipr_cmd)
73857343
type[4] = '\0';
73867344
ioa_cfg->type = simple_strtoul((char *)type, NULL, 16);
73877345

7388-
if (ipr_invalid_adapter(ioa_cfg)) {
7389-
dev_err(&ioa_cfg->pdev->dev,
7390-
"Adapter not supported in this hardware configuration.\n");
7391-
7392-
if (!ipr_testmode) {
7393-
ioa_cfg->reset_retries += IPR_NUM_RESET_RELOAD_RETRIES;
7394-
ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE);
7395-
list_add_tail(&ipr_cmd->queue,
7396-
&ioa_cfg->hrrq->hrrq_free_q);
7397-
return IPR_RC_JOB_RETURN;
7398-
}
7399-
}
7400-
74017346
ipr_cmd->job_step = ipr_ioafp_page3_inquiry;
74027347

74037348
ipr_ioafp_inquiry(ipr_cmd, 1, 0,

0 commit comments

Comments
 (0)