linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: csiostor: add module softdep on cxgb4
@ 2021-09-27 16:14 Rahul Lakkireddy
  2021-09-29  4:19 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Rahul Lakkireddy @ 2021-09-27 16:14 UTC (permalink / raw)
  To: martin.petersen; +Cc: linux-scsi, varun

Both cxgb4 and csiostor drivers run on their own independent Physical
Function. But, when cxgb4 and csiostor are both being loaded in
parallel via modprobe, there is a race when firmware upgrade is
attempted by both the drivers.

When the cxgb4 driver initiates the firmware upgrade, it halts the
firmware and the chip until upgrade is complete. When the csiostor
driver is coming up in parallel, the firmware mailbox communication
fails with timeouts and the csiostor driver probe fails.

Add a module soft dependency on cxgb4 driver to ensure loading
csiostor triggers cxgb4 to load first when available to avoid the
firmware upgrade race.

Fixes: a3667aaed569 ("[SCSI] csiostor: Chelsio FCoE offload driver")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/scsi/csiostor/csio_init.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
index 390b07bf92b9..ccbded3353bd 100644
--- a/drivers/scsi/csiostor/csio_init.c
+++ b/drivers/scsi/csiostor/csio_init.c
@@ -1254,3 +1254,4 @@ MODULE_DEVICE_TABLE(pci, csio_pci_tbl);
 MODULE_VERSION(CSIO_DRV_VERSION);
 MODULE_FIRMWARE(FW_FNAME_T5);
 MODULE_FIRMWARE(FW_FNAME_T6);
+MODULE_SOFTDEP("pre: cxgb4");
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: csiostor: add module softdep on cxgb4
  2021-09-27 16:14 [PATCH] scsi: csiostor: add module softdep on cxgb4 Rahul Lakkireddy
@ 2021-09-29  4:19 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-09-29  4:19 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: Martin K . Petersen, varun, linux-scsi

On Mon, 27 Sep 2021 21:44:08 +0530, Rahul Lakkireddy wrote:

> Both cxgb4 and csiostor drivers run on their own independent Physical
> Function. But, when cxgb4 and csiostor are both being loaded in
> parallel via modprobe, there is a race when firmware upgrade is
> attempted by both the drivers.
> 
> When the cxgb4 driver initiates the firmware upgrade, it halts the
> firmware and the chip until upgrade is complete. When the csiostor
> driver is coming up in parallel, the firmware mailbox communication
> fails with timeouts and the csiostor driver probe fails.
> 
> [...]

Applied to 5.15/scsi-fixes, thanks!

[1/1] scsi: csiostor: add module softdep on cxgb4
      https://git.kernel.org/mkp/scsi/c/79a7482249a7

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-29  4:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 16:14 [PATCH] scsi: csiostor: add module softdep on cxgb4 Rahul Lakkireddy
2021-09-29  4:19 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).