Skip to contentSkip to conversation

sfc: Fix sign of efx_mcdi_poll_reboot() error in efx_mcdi_poll()

PATCH Applied Ben Hutchings 2 participants 2 messages Feb 19, 2010 – Feb 20, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 sfc: Fix sign of efx_mcdi_poll_reboot() error in efx_mcdi_poll()

efx_mcdi_poll() uses positive error numbers, matching the MCDI protocol. It must negate the result of efx_mcdi_poll_reboot() which returns the usual negative error numbers.

---
 drivers/net/sfc/mcdi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/sfc/mcdi.c +1 -1
index 9f035b9..f66b3da 100644
@@ -127,7 +127,7 @@ static int efx_mcdi_poll(struct efx_nic *efx)
 	efx_dword_t reg;
 
 	/* Check for a reboot atomically with respect to efx_mcdi_copyout() */
-	rc = efx_mcdi_poll_reboot(efx);
+	rc = -efx_mcdi_poll_reboot(efx);
 	if (rc)
 		goto out;
 
Signature · 7 lines
1.6.2.5


-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
maintainer Applied
#1 lore raw

From: Ben Hutchings <[email protected]>
Date: Fri, 19 Feb 2010 23:29:27 +0000

Quoted 5 lines

efx_mcdi_poll() uses positive error numbers, matching the MCDI protocol. It must negate the result of efx_mcdi_poll_reboot() which returns the usual negative error numbers.

Applied.