From: dhananjay.phadke@gmail.com
To: netdev@vger.kernel.org
Cc: rob@netxen.com, Milan Bag <mbag@netxen.com>,
Wen Xiong <wenxiong@us.ibm.com>
Subject: RESEND [PATCH 1/3] NetXen: Fix issue of MSI not working correctly
Date: Mon, 02 Jul 2007 00:25:59 +0530 [thread overview]
Message-ID: <20070701190014.878166067@netxen.com> (raw)
In-Reply-To: 20070701185558.881537150@netxen.com
[-- Attachment #1: msi.patch --]
[-- Type: text/plain, Size: 2494 bytes --]
NetXen driver uses PCI function 0 to provide the functionality of MSI.
The patch makes driver check the bus master bit for function 0 and
enable it after the card initialization.
Signed-off-by: Dhananjay Phadke<dhananjay@netxen.com>
Signed-off-by: Milan Bag <mbag@netxen.com>
Signed-off-by: Wen Xiong <wenxiong@us.ibm.com>
Index: netdev-2.6/drivers/net/netxen/netxen_nic_main.c
===================================================================
--- netdev-2.6.orig/drivers/net/netxen/netxen_nic_main.c
+++ netdev-2.6/drivers/net/netxen/netxen_nic_main.c
@@ -336,11 +336,9 @@ netxen_nic_probe(struct pci_dev *pdev, c
if (pci_using_dac)
netdev->features |= NETIF_F_HIGHDMA;
- if (pci_enable_msi(pdev)) {
+ if (pci_enable_msi(pdev))
adapter->flags &= ~NETXEN_NIC_MSI_ENABLED;
- printk(KERN_WARNING "%s: unable to allocate MSI interrupt"
- " error\n", netxen_nic_driver_name);
- } else
+ else
adapter->flags |= NETXEN_NIC_MSI_ENABLED;
netdev->irq = pdev->irq;
@@ -355,13 +353,6 @@ netxen_nic_probe(struct pci_dev *pdev, c
/* initialize the adapter */
netxen_initialize_adapter_hw(adapter);
-#ifdef CONFIG_PPC
- if ((adapter->ahw.boardcfg.board_type ==
- NETXEN_BRDTYPE_P2_SB31_10G_IMEZ) &&
- (pci_func_id == 2))
- goto err_out_free_adapter;
-#endif /* CONFIG_PPC */
-
/*
* Adapter in our case is quad port so initialize it before
* initializing the ports
@@ -509,16 +500,22 @@ netxen_nic_probe(struct pci_dev *pdev, c
NETXEN_CAM_RAM(0x1fc)));
if (val == 0x55555555) {
/* This is the first boot after power up */
+ netxen_nic_read_w0(adapter, NETXEN_PCIE_REG(0x4), &val);
+ if (!(val & 0x4)) {
+ val |= 0x4;
+ netxen_nic_write_w0(adapter, NETXEN_PCIE_REG(0x4), val);
+ netxen_nic_read_w0(adapter, NETXEN_PCIE_REG(0x4), &val);
+ }
val = readl(NETXEN_CRB_NORMALIZE(adapter,
NETXEN_ROMUSB_GLB_SW_RESET));
printk(KERN_INFO"NetXen: read 0x%08x for reset reg.\n",val);
if (val != 0x80000f) {
/* clear the register for future unloads/loads */
- writel(0, NETXEN_CRB_NORMALIZE(adapter,
- NETXEN_CAM_RAM(0x1fc)));
- printk(KERN_ERR "ERROR in NetXen HW init sequence.\n");
- err = -ENODEV;
- goto err_out_free_dev;
+ writel(0, NETXEN_CRB_NORMALIZE(adapter,
+ NETXEN_CAM_RAM(0x1fc)));
+ printk(KERN_ERR "ERROR in NetXen HW init sequence.\n");
+ err = -ENODEV;
+ goto err_out_free_dev;
}
/* clear the register for future unloads/loads */
--
next prev parent reply other threads:[~2007-07-01 19:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-01 18:55 RESEND [PATCH 0/3] NetXen: Bug fixes for multiport and blade adapters dhananjay.phadke
2007-07-01 18:55 ` dhananjay.phadke [this message]
2007-07-02 12:26 ` RESEND [PATCH 1/3] NetXen: Fix issue of MSI not working correctly Jeff Garzik
2007-07-01 18:56 ` RESEND [PATCH 2/3] NetXen: Support per PCI-function interrupt mask registers dhananjay.phadke
2007-07-01 18:56 ` RESEND [PATCH 3/3] NetXen: Graceful teardown of interface and hardware upon module unload dhananjay.phadke
2007-07-01 20:23 ` Michael Buesch
-- strict thread matches above, loose matches on Subject: below --
2007-07-01 2:43 RESEND [PATCH 0/3] NetXen: Bug fixes for multiport and blade adapters dhananjay.phadke
2007-07-01 2:43 ` RESEND [PATCH 1/3] NetXen: Fix issue of MSI not working correctly dhananjay.phadke
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=20070701190014.878166067@netxen.com \
--to=dhananjay.phadke@gmail.com \
--cc=mbag@netxen.com \
--cc=netdev@vger.kernel.org \
--cc=rob@netxen.com \
--cc=wenxiong@us.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).