From: NeilBrown <neil@brown.name>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org , linux-kernel@vger.kernel.org
Subject: [PATCH] staging: mt7621-pci: Hack 2 more PCI interrupts for gnubee1
Date: Mon, 02 Apr 2018 10:20:15 +1000 [thread overview]
Message-ID: <87sh8e1mtc.fsf@notabene.neil.brown.name> (raw)
[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]
The mt7621-pci support 3 pci devices and has 3 interrupts.
Each of these need to be enabled by the same sort of hack to
map hwirq number to virq number.
This is a hack which will go as soon as I understand how this is
supposed to work.
Signed-off-by: NeilBrown <neil@brown.name>
---
drivers/staging/mt7621-pci/pci-mt7621.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index 1fa41eb8a87f..602321522198 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -441,11 +441,16 @@ pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
/*
* 'irq' here is a hwirq, but a virq is needed. Until we know how and where
* to convert one to the other, we have this hack for the GNUBEE1
+ * Similarly 31->23 and 32->24.
*/
- return irq == 11 ? 22 : irq;
-#else
- return irq;
+ if (irq == 11)
+ return 22;
+ if (irq == 31)
+ return 23;
+ if (irq == 32)
+ return 24;
#endif
+ return irq;
}
void
--
2.14.0.rc0.dirty
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
reply other threads:[~2018-04-02 0:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sh8e1mtc.fsf@notabene.neil.brown.name \
--to=neil@brown.name \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®