Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Sep 2012 21:21:15 GMT
From:      Axel Dörfler <axeld@pinc-software.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/171825: ale driver msix setup typo
Message-ID:  <201209202121.q8KLLFsC041859@red.freebsd.org>
Resent-Message-ID: <201209202130.q8KLU93u017177@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         171825
>Category:       misc
>Synopsis:       ale driver msix setup typo
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 20 21:30:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Axel Dörfler
>Release:        head
>Organization:
Haiku
>Environment:
>Description:
The number of MSI-X messages pci_alloc_msix() fills in (msixc) is never checked - instead, msic is checked. In r233888 the problem is in line 554, not sure if my patch manages to apply (it should be against the 9.0 release version where the line is 517).

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/src/add-ons/kernel/drivers/network/ar81xx/dev/ale/if_ale.c b/src/add-ons/kernel/drivers/network/ar81xx/dev/ale/if_ale.c
index 9c3dfd9..25da00a 100644
--- a/src/add-ons/kernel/drivers/network/ar81xx/dev/ale/if_ale.c
+++ b/src/add-ons/kernel/drivers/network/ar81xx/dev/ale/if_ale.c
@@ -514,7 +514,7 @@ ale_attach(device_t dev)
 	if (msix_disable == 0 || msi_disable == 0) {
 		if (msix_disable == 0 && msixc == ALE_MSIX_MESSAGES &&
 		    pci_alloc_msix(dev, &msixc) == 0) {
-			if (msic == ALE_MSIX_MESSAGES) {
+			if (msixc == ALE_MSIX_MESSAGES) {
 				device_printf(dev, "Using %d MSIX messages.\n",
 				    msixc);
 				sc->ale_flags |= ALE_FLAG_MSIX;


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209202121.q8KLLFsC041859>