Commit b1fa0c7
scsi: megaraid_sas: Block PCI config space access from userspace during OCR
ANBZ: torvalds#721
commit 78409d4 upstream.
While an online controller reset(OCR) is in progress, there is short
duration where all access to controller's PCI config space from the host
needs to be blocked. This is due to a hardware limitation of MegaRAID
controllers.
With this patch, driver will block all access to controller's config space
from userland applications by calling pci_cfg_access_lock() while OCR is in
progress and unlocking after controller comes back to ready state.
Added helper function which locks the config space before initiating OCR
and wait for controller to become READY.
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Liu Song <liusong@linux.alibaba.com>
Reviewed-by: Xunlei Pang <xlpang@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/5981 parent 2aefe79 commit b1fa0c7
File tree
3 files changed
+74
-10
lines changed- drivers/scsi/megaraid
3 files changed
+74
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2570 | 2570 | | |
2571 | 2571 | | |
2572 | 2572 | | |
| 2573 | + | |
| 2574 | + | |
| 2575 | + | |
2573 | 2576 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5303 | 5303 | | |
5304 | 5304 | | |
5305 | 5305 | | |
| 5306 | + | |
| 5307 | + | |
| 5308 | + | |
5306 | 5309 | | |
5307 | 5310 | | |
5308 | 5311 | | |
5309 | 5312 | | |
5310 | | - | |
5311 | | - | |
5312 | | - | |
| 5313 | + | |
| 5314 | + | |
5313 | 5315 | | |
5314 | 5316 | | |
5315 | 5317 | | |
| |||
5319 | 5321 | | |
5320 | 5322 | | |
5321 | 5323 | | |
5322 | | - | |
5323 | | - | |
5324 | | - | |
5325 | 5324 | | |
5326 | 5325 | | |
5327 | 5326 | | |
5328 | 5327 | | |
5329 | 5328 | | |
5330 | 5329 | | |
5331 | 5330 | | |
| 5331 | + | |
| 5332 | + | |
| 5333 | + | |
| 5334 | + | |
5332 | 5335 | | |
5333 | 5336 | | |
5334 | 5337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4506 | 4506 | | |
4507 | 4507 | | |
4508 | 4508 | | |
| 4509 | + | |
| 4510 | + | |
| 4511 | + | |
| 4512 | + | |
| 4513 | + | |
| 4514 | + | |
| 4515 | + | |
| 4516 | + | |
| 4517 | + | |
| 4518 | + | |
| 4519 | + | |
| 4520 | + | |
| 4521 | + | |
| 4522 | + | |
| 4523 | + | |
| 4524 | + | |
| 4525 | + | |
| 4526 | + | |
| 4527 | + | |
| 4528 | + | |
| 4529 | + | |
| 4530 | + | |
| 4531 | + | |
| 4532 | + | |
| 4533 | + | |
| 4534 | + | |
| 4535 | + | |
| 4536 | + | |
| 4537 | + | |
| 4538 | + | |
| 4539 | + | |
| 4540 | + | |
| 4541 | + | |
| 4542 | + | |
| 4543 | + | |
| 4544 | + | |
| 4545 | + | |
| 4546 | + | |
| 4547 | + | |
| 4548 | + | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
| 4552 | + | |
| 4553 | + | |
| 4554 | + | |
| 4555 | + | |
| 4556 | + | |
| 4557 | + | |
| 4558 | + | |
| 4559 | + | |
| 4560 | + | |
| 4561 | + | |
| 4562 | + | |
| 4563 | + | |
| 4564 | + | |
4509 | 4565 | | |
4510 | 4566 | | |
4511 | 4567 | | |
| |||
4646 | 4702 | | |
4647 | 4703 | | |
4648 | 4704 | | |
4649 | | - | |
4650 | | - | |
4651 | | - | |
4652 | | - | |
| 4705 | + | |
| 4706 | + | |
| 4707 | + | |
| 4708 | + | |
| 4709 | + | |
| 4710 | + | |
4653 | 4711 | | |
4654 | 4712 | | |
4655 | 4713 | | |
| |||
0 commit comments