Skip to content

Commit 749652a

Browse files
Merge patch series "smartpqi updates"
Don Brace <don.brace@microchip.com> says: cat smartpqi_6.6_cover_letter These patches are based on Martin Petersen's 6.6/scsi-queue tree https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git 6.6/scsi-queue The biggest functional change to smartpqi is the addition of an abort handler. Some customers were complaining about I/O stalls to all devices when only one device is reset. Adding an abort handler helps to prevent I/O stalls to all devices. All of the reset of the patches are small changes to logging messages, MACRO and variable name changes, and one minor change for LUN assignments. This set of changes consists of: * smartpqi-add-abort-handler When a device reset occurs, the SML pauses I/O to all devices presented by a controller instance causing some performance issues. To only affect device with a problematic request, we added an abort handler. The abort handler is implemented by using a device reset, but I/O to the other devices is no longer affected. * smartpqi-refactor-rename-MACRO-to-clarify-purpose The MACRO SOP_RC_INCORRECT_LOGICAL_UNIT was used to check for a condition where a TMF was sent an incorrect LUN. We renamed this MACRO to SOP_TMF_INCORRECT_LOGICAL_UNIT for clarity. * smartpqi-refactor-rename-pciinfo-to-pci_info Change the pciinfo variable to pci_info to make more readable code. No functional changes. * smartpqi-simplify-lun_number-assignment We simplified the conditional expression used to populate LUN numbers for requests. * smartpqi-enhance-shutdown-notification Clarify controller cache flush errors. We added in more precise information to the cache flush informational message. No functional changes. * smartpqi-enhance-controller-offline-notification The driver can offline a controller for multiple reasons. We added a description of why these rare offline actions are taken. And a function to provide the specific details of the shutdown. * smartpqi-enhance-error-messages We added host:bus:target:lun to messages emitted in our reset/abort handlers. No functional changes. * smartpqi-change-driver-version-to-2.1.24-046 Link: https://lore.kernel.org/r/20230824155812.789913-1-don.brace@microchip.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2 parents efcf965 + 08b7ad5 commit 749652a

File tree

2 files changed

+215
-55
lines changed

2 files changed

+215
-55
lines changed

drivers/scsi/smartpqi/smartpqi.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ typedef u32 pqi_index_t;
710710
#define SOP_TMF_COMPLETE 0x0
711711
#define SOP_TMF_REJECTED 0x4
712712
#define SOP_TMF_FUNCTION_SUCCEEDED 0x8
713-
#define SOP_RC_INCORRECT_LOGICAL_UNIT 0x9
713+
#define SOP_TMF_INCORRECT_LOGICAL_UNIT 0x9
714714

715715
/* additional CDB bytes usage field codes */
716716
#define SOP_ADDITIONAL_CDB_BYTES_0 0 /* 16-byte CDB */
@@ -1085,7 +1085,16 @@ struct pqi_stream_data {
10851085
u32 last_accessed;
10861086
};
10871087

1088-
#define PQI_MAX_LUNS_PER_DEVICE 256
1088+
#define PQI_MAX_LUNS_PER_DEVICE 256
1089+
1090+
struct pqi_tmf_work {
1091+
struct work_struct work_struct;
1092+
struct scsi_cmnd *scmd;
1093+
struct pqi_ctrl_info *ctrl_info;
1094+
struct pqi_scsi_dev *device;
1095+
u8 lun;
1096+
u8 scsi_opcode;
1097+
};
10891098

10901099
struct pqi_scsi_dev {
10911100
int devtype; /* as reported by INQUIRY command */
@@ -1111,6 +1120,7 @@ struct pqi_scsi_dev {
11111120
u8 erase_in_progress : 1;
11121121
bool aio_enabled; /* only valid for physical disks */
11131122
bool in_remove;
1123+
bool in_reset[PQI_MAX_LUNS_PER_DEVICE];
11141124
bool device_offline;
11151125
u8 vendor[8]; /* bytes 8-15 of inquiry data */
11161126
u8 model[16]; /* bytes 16-31 of inquiry data */
@@ -1149,6 +1159,8 @@ struct pqi_scsi_dev {
11491159
struct pqi_stream_data stream_data[NUM_STREAMS_PER_LUN];
11501160
atomic_t scsi_cmds_outstanding[PQI_MAX_LUNS_PER_DEVICE];
11511161
unsigned int raid_bypass_cnt;
1162+
1163+
struct pqi_tmf_work tmf_work[PQI_MAX_LUNS_PER_DEVICE];
11521164
};
11531165

11541166
/* VPD inquiry pages */

0 commit comments

Comments
 (0)