Module Name: src Committed By: phx Date: Sun Nov 6 00:28:12 UTC 2011
Modified Files: src/sys/arch/sandpoint: README.NAS src/sys/arch/sandpoint/pci: pci_machdep.c Log Message: Fixed PCI line to EPIC IRQ mapping for Iomega Storcenter. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sandpoint/README.NAS cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sandpoint/pci/pci_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/sandpoint/README.NAS diff -u src/sys/arch/sandpoint/README.NAS:1.20 src/sys/arch/sandpoint/README.NAS:1.21 --- src/sys/arch/sandpoint/README.NAS:1.20 Thu Apr 21 13:39:54 2011 +++ src/sys/arch/sandpoint/README.NAS Sun Nov 6 00:28:12 2011 @@ -1,4 +1,4 @@ -$NetBSD: README.NAS,v 1.20 2011/04/21 13:39:54 phx Exp $ +$NetBSD: README.NAS,v 1.21 2011/11/06 00:28:12 phx Exp $ //// MPC8241/8245 NAS products //// @@ -42,15 +42,16 @@ PCI line/pin and EPIC IRQ assignments Kurobox 11, 12, 13, 14 -> 0, 1, 4, 3 Synology 12, 13, 14, 15 -> 4, 0, 1, 2 QNAP 13, 14, 15, 16 -> 0, 1, 2, 3 -StorCenter 12, 13, 14, 15 -> 0, 1, 2, 3 -DLink 13, 14, 15, 16 -> 0, 1, 3, 4 +StorCenter 13, 14, 15 -> 1, *, 0 +DLink 13, 14, 15, 16 -> 0, *, 3, 4 NH230 13, 14, 15, 16 -> 0, 3, 1, 2 -- USB EHCI is a multiple function PCI device which has - pin assignment A, B and C. Special cases: - - IDSEL Pin EPIC IRQ - DLink 14 A, B, C -> 1, 1, 2 +- USB is a multiple function PCI device which has + pin assignment A (OHCI), B (OHCI) and C (EHCI). + Special cases (*): + IDSEL Pin EPIC IRQ + DLink 14 A, B, C -> 1, 1, 2 + StorCenter 14 A, B, C -> 2, 3, 4 //// e300 NAS products //// Index: src/sys/arch/sandpoint/pci/pci_machdep.c diff -u src/sys/arch/sandpoint/pci/pci_machdep.c:1.29 src/sys/arch/sandpoint/pci/pci_machdep.c:1.30 --- src/sys/arch/sandpoint/pci/pci_machdep.c:1.29 Fri Jul 1 19:16:41 2011 +++ src/sys/arch/sandpoint/pci/pci_machdep.c Sun Nov 6 00:28:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.29 2011/07/01 19:16:41 dyoung Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.30 2011/11/06 00:28:12 phx Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.29 2011/07/01 19:16:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.30 2011/11/06 00:28:12 phx Exp $"); #include "opt_pci.h" @@ -339,7 +339,7 @@ pci_intr_map(const struct pci_attach_arg *ihp = 2; break; case BRD_KUROBOX: - /* map line 11,12,13,14 to EPIC IRQ0,1,4,3 */ + /* map line 11,12,13,14 to EPIC IRQ 0,1,4,3 */ *ihp = (line == 13) ? 4 : line - 11; break; case BRD_QNAPTS: @@ -347,11 +347,11 @@ pci_intr_map(const struct pci_attach_arg *ihp = line - 13; break; case BRD_SYNOLOGY: - /* map line 12,13-15 to EPIC IRQ4,0-2 */ + /* map line 12,13-15 to EPIC IRQ 4,0-2 */ *ihp = (line == 12) ? 4 : line - 13; break; case BRD_DLINKDSM: - /* map line 13,14,15,16 to EPIC IRQ0,1,3,4 */ + /* map line 13,14A,14B,14C,15,16 to EPIC IRQ 0,1,1,2,3,4 */ *ihp = (line < 15) ? line - 13 : line - 12; if (line == 14 && pin == 3) *ihp += 1; /* USB pin C (EHCI) uses next IRQ */ @@ -363,8 +363,13 @@ pci_intr_map(const struct pci_attach_arg (line == 14) ? 3 : 0; break; case BRD_STORCENTER: + /* map line 13,14A,14B,14C,15 to EPIC IRQ 1,2,3,4,0 */ + *ihp = (line == 15) ? 0 : 1; + if (line == 14) + *ihp += pin; + break; default: - /* map line 12-15 to EPIC IRQ0-3 */ + /* simply map line 12-15 to EPIC IRQ0-3 */ *ihp = line - 12; break; }