Commit 153c45dd authored by Kevin Barnett's avatar Kevin Barnett Committed by Martin K. Petersen

scsi: smartpqi: Add abort handler

Implement aborts as resets.

Avoid I/O stalls across all devices attached to a controller when device
I/O requests time out.
Reviewed-by: default avatarMahesh Rajashekhara <mahesh.rajashekhara@microchip.com>
Reviewed-by: default avatarScott Teel <scott.teel@microchip.com>
Reviewed-by: default avatarScott Benesh <scott.benesh@microchip.com>
Reviewed-by: default avatarMike McGowen <mike.mcgowen@microchip.com>
Signed-off-by: default avatarKevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: default avatarDon Brace <don.brace@microchip.com>
Link: https://lore.kernel.org/r/20230824155812.789913-2-don.brace@microchip.comSigned-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 06c2afb8
......@@ -1085,7 +1085,16 @@ struct pqi_stream_data {
u32 last_accessed;
};
#define PQI_MAX_LUNS_PER_DEVICE 256
#define PQI_MAX_LUNS_PER_DEVICE 256
struct pqi_tmf_work {
struct work_struct work_struct;
struct scsi_cmnd *scmd;
struct pqi_ctrl_info *ctrl_info;
struct pqi_scsi_dev *device;
u8 lun;
u8 scsi_opcode;
};
struct pqi_scsi_dev {
int devtype; /* as reported by INQUIRY command */
......@@ -1111,6 +1120,7 @@ struct pqi_scsi_dev {
u8 erase_in_progress : 1;
bool aio_enabled; /* only valid for physical disks */
bool in_remove;
bool in_reset[PQI_MAX_LUNS_PER_DEVICE];
bool device_offline;
u8 vendor[8]; /* bytes 8-15 of inquiry data */
u8 model[16]; /* bytes 16-31 of inquiry data */
......@@ -1149,6 +1159,8 @@ struct pqi_scsi_dev {
struct pqi_stream_data stream_data[NUM_STREAMS_PER_LUN];
atomic_t scsi_cmds_outstanding[PQI_MAX_LUNS_PER_DEVICE];
unsigned int raid_bypass_cnt;
struct pqi_tmf_work tmf_work[PQI_MAX_LUNS_PER_DEVICE];
};
/* VPD inquiry pages */
......
This diff is collapsed.
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