All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Switchtec Miscellaneous Fixes and Improvements
@ 2021-09-24 10:24 kelvin.cao
  2021-09-24 10:24 ` [PATCH 1/5] PCI/switchtec: Error out MRPC execution when no GAS access kelvin.cao
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: kelvin.cao @ 2021-09-24 10:24 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

From: Kelvin Cao <kelvin.cao@microchip.com>

Hi,

Please find a bunch of patches for the switchtec driver collected over the
last few months.

The first 2 patches fix two minor bugs. Patch 3 updates the method of
getting management VEP instance ID based on a new firmware change. Patch
4 replaces ENOTSUPP with EOPNOTSUPP to follow the preference of kernel.
And the last patch adds check of event support to align with new firmware
implementation.

This patchset is based on v5.15-rc2.

Thanks,
Kelvin

Kelvin Cao (4):
  PCI/switchtec: Error out MRPC execution when no GAS access
  PCI/switchtec: Fix a MRPC error status handling issue
  PCI/switchtec: Update the way of getting management VEP instance ID
  PCI/switchtec: Replace ENOTSUPP with EOPNOTSUPP

Logan Gunthorpe (1):
  PCI/switchtec: Add check of event support

 drivers/pci/switch/switchtec.c | 87 +++++++++++++++++++++++++++-------
 include/linux/switchtec.h      |  1 +
 2 files changed, 71 insertions(+), 17 deletions(-)

-- 
2.25.1

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 0/5] Switchtec Fixes and Improvements
@ 2021-09-24 11:08 kelvin.cao
  2021-09-24 11:08 ` [PATCH 3/5] PCI/switchtec: Update the way of getting management VEP instance ID kelvin.cao
  0 siblings, 1 reply; 8+ messages in thread
From: kelvin.cao @ 2021-09-24 11:08 UTC (permalink / raw)
  To: kurt.schwemmer, logang, bhelgaas, linux-pci, linux-kernel
  Cc: kelvin.cao, kelvincao

From: Kelvin Cao <kelvin.cao@microchip.com>

Hi,

Please find a bunch of patches for the switchtec driver collected over the
last few months.

The first 2 patches fix two minor bugs. Patch 3 updates the method of
getting management VEP instance ID based on a new firmware change. Patch
4 replaces ENOTSUPP with EOPNOTSUPP to follow the preference of kernel.
And the last patch adds check of event support to align with new firmware
implementation.

This patchset is based on v5.15-rc2.

Thanks,
Kelvin

Kelvin Cao (4):
  PCI/switchtec: Error out MRPC execution when no GAS access
  PCI/switchtec: Fix a MRPC error status handling issue
  PCI/switchtec: Update the way of getting management VEP instance ID
  PCI/switchtec: Replace ENOTSUPP with EOPNOTSUPP

Logan Gunthorpe (1):
  PCI/switchtec: Add check of event support

 drivers/pci/switch/switchtec.c | 87 +++++++++++++++++++++++++++-------
 include/linux/switchtec.h      |  1 +
 2 files changed, 71 insertions(+), 17 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 2/5] PCI/switchtec: Fix a MRPC error status handling issue
@ 2021-09-24 10:22 kelvin.cao
  2021-09-24 10:22 ` [PATCH 3/5] PCI/switchtec: Update the way of getting management VEP instance ID kelvin.cao
  0 siblings, 1 reply; 8+ messages in thread
From: kelvin.cao @ 2021-09-24 10:22 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1458 bytes --]

From: Kelvin Cao <kelvin.cao@microchip.com>

If an error is encountered when executing a MRPC command, the firmware
will set the status register to SWITCHTEC_MRPC_STATUS_ERROR and return
the error code in the return value register.

Add handling of SWITCHTEC_MRPC_STATUS_ERROR on status register when
completing a MRPC command.

Signed-off-by: Kelvin Cao <kelvin.cao@microchip.com>
---
 drivers/pci/switch/switchtec.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 092653487021..76f14ed15445 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -230,7 +230,8 @@ static void mrpc_complete_cmd(struct switchtec_dev *stdev)
 	stuser_set_state(stuser, MRPC_DONE);
 	stuser->return_code = 0;
 
-	if (stuser->status != SWITCHTEC_MRPC_STATUS_DONE)
+	if (stuser->status != SWITCHTEC_MRPC_STATUS_DONE &&
+	    stuser->status != SWITCHTEC_MRPC_STATUS_ERROR)
 		goto out;
 
 	if (stdev->dma_mrpc)
@@ -614,7 +615,8 @@ static ssize_t switchtec_dev_read(struct file *filp, char __user *data,
 out:
 	mutex_unlock(&stdev->mrpc_mutex);
 
-	if (stuser->status == SWITCHTEC_MRPC_STATUS_DONE)
+	if (stuser->status == SWITCHTEC_MRPC_STATUS_DONE ||
+	    stuser->status == SWITCHTEC_MRPC_STATUS_ERROR)
 		return size;
 	else if (stuser->status == SWITCHTEC_MRPC_STATUS_INTERRUPTED)
 		return -ENXIO;
-- 
2.25.1

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

end of thread, other threads:[~2021-09-24 10:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24 10:24 [PATCH 0/5] Switchtec Miscellaneous Fixes and Improvements kelvin.cao
2021-09-24 10:24 ` [PATCH 1/5] PCI/switchtec: Error out MRPC execution when no GAS access kelvin.cao
2021-09-24 10:24 ` [PATCH 2/5] PCI/switchtec: Fix a MRPC error status handling issue kelvin.cao
2021-09-24 10:24 ` [PATCH 3/5] PCI/switchtec: Update the way of getting management VEP instance ID kelvin.cao
2021-09-24 10:24 ` [PATCH 4/5] PCI/switchtec: Replace ENOTSUPP with EOPNOTSUPP kelvin.cao
2021-09-24 10:24 ` [PATCH 5/5] PCI/switchtec: Add check of event support kelvin.cao
  -- strict thread matches above, loose matches on Subject: below --
2021-09-24 11:08 [PATCH 0/5] Switchtec Fixes and Improvements kelvin.cao
2021-09-24 11:08 ` [PATCH 3/5] PCI/switchtec: Update the way of getting management VEP instance ID kelvin.cao
2021-09-24 10:22 [PATCH 2/5] PCI/switchtec: Fix a MRPC error status handling issue kelvin.cao
2021-09-24 10:22 ` [PATCH 3/5] PCI/switchtec: Update the way of getting management VEP instance ID kelvin.cao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.