misc/171825: ale driver msix setup typo

Axel Dörfler axeld at pinc-software.de
Thu Sep 20 21:30:10 UTC 2012


>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:


More information about the freebsd-bugs mailing list