From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Hacker Date: Thu, 19 May 2011 18:16:57 +0600 Subject: [ath9k-devel] AR9380 MSI In-Reply-To: References: <20110518010903.28970.qmail@stuge.se> <20110519003204.9375.qmail@stuge.se> <20110519060138.GA6239@infinet.ru> Message-ID: <20110519121657.GA8358@infinet.ru> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Thu, May 19, 2011 at 04:35:59PM +0800, Sucheta ROY wrote: > Hi, > > I believe you have AR9380 card installed in your PC? > > You have to build your kernel with CONFIG_PCI_MSI option enabled. "CONFIG_PCI_MSI" Depends on: PCI [=y] && ARCH_SUPPORTS_MSI [=y]. Also you have to include > int pci_enable_msi(struct pci_dev *dev) function in pci.c file of ath9k. This function should be called before the driver calls request_irq().With a successful call the device will be switched from pin-based legacy interrupt mode to MSI mode. The dev->irq number will be changed to a new number which represents the message signaled interrupt. > > Also can you please let me know PCI Vendor Id/Device Id of this card ie AR9380? > > Thanks in advance for your support. > > Regards, > Sucheta The results I got below. If I do something wrong advise me what I should do. --- pci.c.old 2011-05-19 17:59:59.000000000 +0600 +++ pci.c 2011-05-19 18:00:14.000000000 +0600 @@ -221,6 +221,9 @@ /* Will be cleared in ath9k_start() */ sc->sc_flags |= SC_OP_INVALID; +printk("pci_enable_msi=%d.\n",pci_enable_msi(pdev)); +printk("pdev->irq=%d.\n",pdev->irq); + ret = request_irq(pdev->irq, ath_isr, IRQF_SHARED, "ath9k", sc); if (ret) { # cat /proc/interrupts dev_err(&pdev->dev, "request_irq failed\n"); CPU0 CPU1 0: 393 2628 IO-APIC-edge timer 1: 35884 676360 IO-APIC-edge i8042 4: 45 262178 IO-APIC-edge serial 8: 1 0 IO-APIC-edge rtc0 9: 0 0 IO-APIC-fasteoi acpi 14: 0 0 IO-APIC-edge ata_piix 15: 0 0 IO-APIC-edge ata_piix 16: 30197 110785854 IO-APIC-fasteoi uhci_hcd:usb5 18: 0 0 IO-APIC-fasteoi uhci_hcd:usb4 19: 173216 10744489 IO-APIC-fasteoi ata_piix, uhci_hcd:usb3 20: 191379417 133 IO-APIC-fasteoi eth0 23: 776135 27633305 IO-APIC-fasteoi ehci_hcd:usb1, uhci_hcd:usb2 42: 0 0 PCI-MSI-edge ath9k NMI: 0 0 Non-maskable interrupts LOC: 527052638 535023710 Local timer interrupts SPU: 0 0 Spurious interrupts PMI: 0 0 Performance monitoring interrupts IWI: 0 0 IRQ work interrupts RES: 3026801 3065734 Rescheduling interrupts CAL: 14585 15117 Function call interrupts TLB: 78368 128713 TLB shootdowns TRM: 0 0 Thermal event interrupts THR: 0 0 Threshold APIC interrupts MCE: 0 0 Machine check exceptions MCP: 2981 2981 Machine check polls ERR: 1 MIS: 0 # lspci -vvn 02:00.0 Class 0280: 168c:0030 (rev 01) Subsystem: 168c:3112 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- GSI 16 (level, low) -> IRQ 16 May 19 17:51:00 hacker kernel: ath9k 0000:02:00.0: setting latency timer to 64 May 19 17:51:00 hacker kernel: ath9k 0000:02:00.0: irq 42 for MSI/MSI-X May 19 17:51:00 hacker kernel: pci_enable_msi=0. May 19 17:51:00 hacker kernel: pdev->irq=42. May 19 17:51:00 hacker kernel: ath: EEPROM regdomain: 0x0 May 19 17:51:00 hacker kernel: ath: EEPROM indicates default country code should be used May 19 17:51:00 hacker kernel: ath: doing EEPROM country->regdmn map search May 19 17:51:00 hacker kernel: ath: country maps to regdmn code: 0x3a May 19 17:51:00 hacker kernel: ath: Country alpha2 being used: US May 19 17:51:00 hacker kernel: ath: Regpair used: 0x3a May 19 17:51:00 hacker kernel: ieee80211 phy1: Selected rate control algorithm 'ath9k_rate_control' May 19 17:51:00 hacker kernel: Registered led device: ath9k-phy1::radio May 19 17:51:00 hacker kernel: Registered led device: ath9k-phy1::assoc May 19 17:51:00 hacker kernel: Registered led device: ath9k-phy1::tx May 19 17:51:00 hacker kernel: Registered led device: ath9k-phy1::rx May 19 17:51:00 hacker kernel: ieee80211 phy1: Atheros AR9300 Rev:3 mem=0xf8640000, irq=42 May 19 17:53:59 hacker kernel: do_IRQ: 0.120 No irq handler for vector (irq -1) May 19 17:53:59 hacker kernel: do_IRQ: 1.120 No irq handler for vector (irq -1) May 19 17:53:59 hacker kernel: do_IRQ: 1.120 No irq handler for vector (irq -1) May 19 17:54:06 hacker kernel: device wlan0 entered promiscuous mode Does not work.