All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sucheta ROY <sucheta.roy@st.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] AR9380 MSI
Date: Fri, 20 May 2011 17:30:27 +0800	[thread overview]
Message-ID: <F6259B467C2CCE44A8F3D92A9BFE1D3D64BAD4A39E@EAPEX1MAIL1.st.com> (raw)
In-Reply-To: <20110519121657.GA8358@infinet.ru>

Hi,

Whatever you have done looks OK to me. Can you please let me know:
1.  #define AR_PCIE_MSI and #define AR_PCIE_MSI_ENABLE part in reg.h file.
2.  lspci -xxx capture.

Also from PCI Vendor ID/Device Id, I see you have AR9300 in your PC instead of AR9380.

Regards,
Sucheta

-----Original Message-----
From: ath9k-devel-bounces@lists.ath9k.org [mailto:ath9k-devel-bounces at lists.ath9k.org] On Behalf Of Alex Hacker
Sent: Thursday, May 19, 2011 5:47 PM
To: ath9k-devel at venema.h4ckr.net
Subject: Re: [ath9k-devel] AR9380 MSI

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- <TAbort- <MAbort- >SERR- <PERR-
	Latency: 0, cache line size 08
	Interrupt: pin A routed to IRQ 42
	Region 0: Memory at feae0000 (64-bit, non-prefetchable) [size=128K]
	Expansion ROM@fead0000 [disabled] [size=64K]
	Capabilities: [40] Power Management version 3
		Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA PME(D0+,D1+,D2-,D3hot+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [50] Message Signalled Interrupts: 64bit+ Queue=0/2 Enable+
		Address: 00000000fee0300c  Data: 4179
	Capabilities: [70] #10 [0002]

# modprobe ath9k
# iw dev wlan0 set freq 5240
# iw dev wlan0 set monitor none
# ifconfig wlan0 up
# dmesg

May 19 17:51:00 hacker kernel: ath9k 0000:02:00.0: PCI INT A -> 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.
_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

  reply	other threads:[~2011-05-20  9:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 11:16 [ath9k-devel] setting AR_NAV register Andrés García Saavedra
2011-05-17 13:29 ` [ath9k-devel] AR9285 MSI Sucheta ROY
2011-05-17 14:39   ` Mohammed Shafi
2011-05-17 14:41   ` Mohammed Shafi
2011-05-18  1:09     ` Peter Stuge
2011-05-18  2:15       ` Adrian Chadd
2011-05-18  4:28         ` Sucheta ROY
2011-05-18  9:29         ` Sucheta ROY
2011-05-18 10:54           ` Senthilkumar Balasubramanian
2011-05-19  0:32             ` Peter Stuge
2011-05-19  4:33               ` Sucheta ROY
2011-05-19  6:01                 ` Alex Hacker
2011-05-19  8:35                   ` [ath9k-devel] AR9380 MSI Sucheta ROY
2011-05-19 11:06                     ` Falk-Moritz Schaefer
2011-05-19 12:02                       ` Sucheta ROY
2011-05-19 12:32                         ` Falk-Moritz Schaefer
2011-05-19 12:16                     ` Alex Hacker
2011-05-20  9:30                       ` Sucheta ROY [this message]
2011-05-20 10:15                         ` Alex Hacker
2011-05-19  8:41                   ` [ath9k-devel] AR9285 MSI Sucheta ROY
2011-05-18  4:45       ` Mohammed Shafi
2011-05-17 14:27 ` [ath9k-devel] setting AR_NAV register Mohammed Shafi
2011-08-09 12:37   ` Manuel Sáez
2011-06-28 22:12 [ath9k-devel] [RFC/RFT] ath9k: support for multiple beacon intervals Steve Brown
2011-06-29  1:31 ` Adrian Chadd
2011-06-29 13:22   ` Steve Brown
2011-06-29 17:15     ` Adrian Chadd
2011-06-29 18:56       ` [ath9k-devel] AR9380 MSI Matevz Langus
2011-06-30  4:50 Alex Hacker
2011-07-01  9:38 ` Sucheta ROY
2011-07-01 10:18   ` Matevz Langus

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=F6259B467C2CCE44A8F3D92A9BFE1D3D64BAD4A39E@EAPEX1MAIL1.st.com \
    --to=sucheta.roy@st.com \
    --cc=ath9k-devel@lists.ath9k.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.