Skip to content

Commit 8e46782

Browse files
Hao Dongdongopsiff
authored andcommitted
scsi: leapraid: update driver to v2.00.01.05
leapraid driver changes from v2.00.01.02 to v2.00.01.05. This update includes: - recovery wait and hard reset flow stabilization - improved timeout diagnostics with per-command context logging - MSI-X/IRQ CPU affinity fixes - SAS topology and event bitmap alignment fixes - transport and task-management error-path cleanup - config-page stack usage reduction and adapter info cleanup - ioctl compatibility cleanup - resource cleanup and failure-path hardening Signed-off-by: Hao Dongdong <doubled@leap-io-kernel.com>
1 parent 0ec8ab4 commit 8e46782

6 files changed

Lines changed: 192 additions & 287 deletions

File tree

drivers/scsi/leapraid/leapraid.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
/* Maximum number of retries waiting for doorbell to become operational. */
2828
#define LEAPRAID_DB_WAIT_OP_SHORT 10
2929
#define LEAPRAID_DB_WAIT_OP_LONG 200
30-
/* Sleep interval (in seconds) between doorbell polls. */
31-
#define LEAPRAID_DB_POLL_INTERVAL_S 1
3230

3331
/* Maximum number of retries waiting for host to end recovery. */
3432
#define LEAPRAID_WAIT_SHOST_RECOVERY 400
@@ -180,7 +178,6 @@
180178
#define LEAPRAID_CFG_PAGE_NUM_DEV0 0x0
181179

182180
/* SAS device page 0 flags. */
183-
#define LEAPRAID_SAS_DEV_P0_FLG_FP_CAP 0x2000
184181
#define LEAPRAID_SAS_DEV_P0_FLG_SATA_SMART 0x0040
185182
#define LEAPRAID_SAS_DEV_P0_FLG_ENC_LEVEL_VALID 0x0002
186183
#define LEAPRAID_SAS_DEV_P0_FLG_DEV_PRESENT 0x0001
@@ -207,15 +204,9 @@
207204
/* Physical disk page number. */
208205
#define LEAPRAID_CFG_PAGE_NUM_PD0 0x0
209206

210-
/* Adapter page number. */
211-
#define LEAPRAID_CFG_PAGE_NUM_ADAPTER1 0x1
212-
213207
#define LEAPRAID_CFG_UNIT_SIZE 4
214208

215209
/* Raid volume type and state. */
216-
#define LEAPRAID_VOL_STATE_MISSING 0x00
217-
#define LEAPRAID_VOL_STATE_FAILED 0x01
218-
#define LEAPRAID_VOL_STATE_INITIALIZING 0x02
219210
#define LEAPRAID_VOL_STATE_ONLINE 0x03
220211
#define LEAPRAID_VOL_STATE_DEGRADED 0x04
221212
#define LEAPRAID_VOL_STATE_OPTIMAL 0x05
@@ -231,10 +222,6 @@
231222
#define LEAPRAID_RAIDCFG_P0_EFLG_HOT_SPARE_ELEMENT 0x0002
232223
#define LEAPRAID_RAIDCFG_P0_EFLG_OCE_ELEMENT 0x0003
233224

234-
/* Raid action. */
235-
#define LEAPRAID_RAID_ACT_SYSTEM_SHUTDOWN_INITIATED 0x20
236-
#define LEAPRAID_RAID_ACT_PHYSDISK_HIDDEN 0x24
237-
238225
/* SAS negotiated link rates. */
239226
#define LEAPRAID_SAS_NEG_LINK_RATE_MASK_PHYSICAL 0x0F
240227
#define LEAPRAID_SAS_NEG_LINK_RATE_UNKNOWN_LINK_RATE 0x00
@@ -290,8 +277,6 @@
290277

291278
#define LEAPRAID_TM_MSGFLAGS_LINK_RESET 0x00
292279
#define LEAPRAID_TM_RSP_INVALID_FRAME 0x02
293-
#define LEAPRAID_TM_RSP_TM_SUCCEEDED 0x08
294-
#define LEAPRAID_TM_RSP_IO_QUEUED_ON_ADAPTER 0x80
295280

296281
/* SCSI enclosure processor request defines. */
297282
#define LEAPRAID_SEP_REQ_ACT_WRITE_STATUS 0x00
@@ -301,8 +286,6 @@
301286

302287
/* The capabilities of the adapter. */
303288
#define LEAPRAID_ADAPTER_FEATURES_CAP_ATOMIC_REQ 0x00080000
304-
#define LEAPRAID_ADAPTER_FEATURES_CAP_RDPQ_ARRAY_CAPABLE 0x00040000
305-
#define LEAPRAID_ADAPTER_FEATURES_CAP_EVENT_REPLAY 0x00002000
306289
#define LEAPRAID_ADAPTER_FEATURES_CAP_INTEGRATED_RAID 0x00001000
307290

308291
/* Event code definitions for the firmware. */
@@ -338,10 +321,6 @@
338321
#define LEAPRAID_EVT_SAS_TOPO_RC_TARG_ADDED 0x01
339322
#define LEAPRAID_EVT_SAS_TOPO_RC_TARG_NOT_RESPONDING 0x02
340323

341-
/* SAS discovery event defines. */
342-
#define LEAPRAID_EVT_SAS_DISC_RC_STARTED 0x01
343-
#define LEAPRAID_EVT_SAS_DISC_RC_COMPLETED 0x02
344-
345324
/* Enclosure device status change event. */
346325
#define LEAPRAID_EVT_SAS_ENCL_RC_ADDED 0x01
347326
#define LEAPRAID_EVT_SAS_ENCL_RC_NOT_RESPONDING 0x02

drivers/scsi/leapraid/leapraid_app.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ static int leapraid_ctl_do_command(struct leapraid_adapter *adapter,
388388
dev_err(&adapter->pdev->dev,
389389
"%s: ctl_cmd timeout, status=0x%x\n",
390390
__func__, adapter->driver_cmds.ctl_cmd.status);
391+
leapraid_log_req_context(adapter, taskid, ctl_sp_mpi_req);
391392
}
392393

393394
if ((leap_mpi_req->func == LEAPRAID_FUNC_SMP_PASSTHROUGH ||
@@ -590,7 +591,7 @@ static int leapraid_ctl_ioctl_main(struct file *file, unsigned int cmd,
590591
break;
591592
}
592593

593-
if (karg.hdr.adapter_id != ioctl_header.adapter_id) {
594+
if (karg.hdr.adapter_id != ioctl_header.adapter_id) {
594595
rc = -EINVAL;
595596
break;
596597
}
@@ -621,11 +622,6 @@ static int leapraid_ctl_ioctl_main(struct file *file, unsigned int cmd,
621622
return rc;
622623
}
623624

624-
static long bad_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
625-
{
626-
return -ENOTTY;
627-
}
628-
629625
static long leapraid_ctl_ioctl(struct file *file, unsigned int cmd,
630626
unsigned long arg)
631627
{
@@ -679,7 +675,6 @@ static const struct file_operations leapraid_ctl_fops = {
679675
.owner = THIS_MODULE,
680676
.unlocked_ioctl = leapraid_ctl_ioctl,
681677
.mmap = leapraid_fw_mmap,
682-
.compat_ioctl = bad_ioctl,
683678
};
684679

685680
static struct miscdevice leapraid_ctl_dev = {

0 commit comments

Comments
 (0)