Commit b5d2caf
scsi: mpt3sas: Proper handling of set/clear of "ATA command pending" flag.
[ Upstream commit f49d4ae ]
1. In IO path, setting of "ATA command pending" flag early before device
removal, invalid device handle etc., checks causes any new commands
to be always returned with SAM_STAT_BUSY and when the driver removes
the drive the SML issues SYNC Cache command and that command is
always returned with SAM_STAT_BUSY and thus making SYNC Cache command
to requeued.
2. If the driver gets an ATA PT command for a SATA drive then the driver
set "ATA command pending" flag in device specific data structure not
to allow any further commands until the ATA PT command is completed.
However, after setting the flag if the driver decides to return the
command back to upper layers without actually issuing to the firmware
(i.e., returns from qcmd failure return paths) then the corresponding
flag is not cleared and this prevents the driver from sending any new
commands to the drive.
This patch fixes above two issues by setting of "ATA command pending"
flag after checking for whether device deleted, invalid device handle,
device busy with task management. And by setting "ATA command pending"
flag to false in all of the qcmd failure return paths after setting the
flag.
Signed-off-by: Chaitra P B <[email protected]>
Signed-off-by: Suganath Prabu S <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 3807b6f commit b5d2caf
1 file changed
+15
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4106 | 4106 | | |
4107 | 4107 | | |
4108 | 4108 | | |
4109 | | - | |
4110 | | - | |
4111 | | - | |
4112 | | - | |
4113 | | - | |
4114 | | - | |
4115 | | - | |
4116 | | - | |
4117 | | - | |
4118 | | - | |
4119 | | - | |
4120 | | - | |
4121 | | - | |
4122 | 4109 | | |
4123 | 4110 | | |
4124 | 4111 | | |
| |||
4144 | 4131 | | |
4145 | 4132 | | |
4146 | 4133 | | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
| 4140 | + | |
| 4141 | + | |
| 4142 | + | |
| 4143 | + | |
| 4144 | + | |
| 4145 | + | |
| 4146 | + | |
4147 | 4147 | | |
4148 | 4148 | | |
4149 | 4149 | | |
| |||
4170 | 4170 | | |
4171 | 4171 | | |
4172 | 4172 | | |
| 4173 | + | |
4173 | 4174 | | |
4174 | 4175 | | |
4175 | 4176 | | |
| |||
4200 | 4201 | | |
4201 | 4202 | | |
4202 | 4203 | | |
| 4204 | + | |
4203 | 4205 | | |
4204 | 4206 | | |
4205 | 4207 | | |
| |||
0 commit comments