Commit 341128d
scsi: st: Modify st.c to use the new scsi_error counters
Compare the stored values of por_ctr and new_media_ctr against the values
in the device struct. In case of mismatch, the Unit Attention corresponding
to the counter has happened. This is a safeguard against another ULD
catching the Unit Attention sense data.
Macros scsi_get_ua_new_media_ctr and scsi_get_ua_por_ctr are added to read
the current values of the counters.
Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Link: https://lore.kernel.org/r/20250120194925.44432-4-Kai.Makisara@kolumbus.fi
Reviewed-by: John Meneghini <jmeneghi@redhat.com>
Tested-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent a5d518c commit 341128d
3 files changed
Lines changed: 35 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
171 | 173 | | |
| |||
357 | 359 | | |
358 | 360 | | |
359 | 361 | | |
| 362 | + | |
360 | 363 | | |
361 | 364 | | |
362 | 365 | | |
363 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
364 | 374 | | |
365 | 375 | | |
366 | 376 | | |
| |||
413 | 423 | | |
414 | 424 | | |
415 | 425 | | |
416 | | - | |
| 426 | + | |
| 427 | + | |
417 | 428 | | |
418 | | - | |
419 | | - | |
| 429 | + | |
| 430 | + | |
420 | 431 | | |
421 | 432 | | |
422 | 433 | | |
| |||
968 | 979 | | |
969 | 980 | | |
970 | 981 | | |
| 982 | + | |
971 | 983 | | |
972 | 984 | | |
973 | 985 | | |
| |||
1024 | 1036 | | |
1025 | 1037 | | |
1026 | 1038 | | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
1027 | 1046 | | |
1028 | 1047 | | |
1029 | 1048 | | |
| |||
3639 | 3658 | | |
3640 | 3659 | | |
3641 | 3660 | | |
3642 | | - | |
3643 | | - | |
3644 | 3661 | | |
3645 | 3662 | | |
3646 | 3663 | | |
| |||
4402 | 4419 | | |
4403 | 4420 | | |
4404 | 4421 | | |
| 4422 | + | |
| 4423 | + | |
| 4424 | + | |
4405 | 4425 | | |
4406 | 4426 | | |
4407 | 4427 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
690 | 696 | | |
691 | 697 | | |
692 | 698 | | |
| |||
0 commit comments