netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6 1/9] ixgb: Enabling MSI on a PCI slot (not PCI-X) may not work, so always disable MSI for PCI slots, enable message signalled interrupts on 82597EX based adapters
@ 2005-01-07  1:22 Ganesh Venkatesan
  2005-01-07  2:57 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Ganesh Venkatesan @ 2005-01-07  1:22 UTC (permalink / raw)
  To: jgarzik@pobox.com; +Cc: netdev

Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com>
diff -up net-drivers-2.6/drivers/net/ixgb/ixgb.h net-drivers-2.6/drivers/net/ixgb.new/ixgb.h
--- net-drivers-2.6/drivers/net/ixgb/ixgb.h	2005-01-05 17:13:27.000000000 -0800
+++ net-drivers-2.6/drivers/net/ixgb.new/ixgb.h	2005-01-05 17:13:28.000000000 -0800
@@ -188,5 +188,9 @@ struct ixgb_adapter {
 	/* structs defined in ixgb_hw.h */
 	struct ixgb_hw hw;
 	struct ixgb_hw_stats stats;
+	uint32_t pci_state[16];
+#ifdef CONFIG_PCI_MSI
+	boolean_t have_msi;
+#endif
 };
 #endif /* _IXGB_H_ */
diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c
--- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c	2005-01-05 17:13:27.000000000 -0800
+++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c	2005-01-05 17:13:29.000000000 -0800
@@ -238,6 +238,23 @@ ixgb_up(struct ixgb_adapter *adapter)
 	ixgb_configure_rx(adapter);
 	ixgb_alloc_rx_buffers(adapter);
 
+#ifdef CONFIG_PCI_MSI
+	{
+	boolean_t pcix = (IXGB_READ_REG(&adapter->hw, STATUS) & 
+						  IXGB_STATUS_PCIX_MODE) ? TRUE : FALSE;
+	adapter->have_msi = TRUE;
+
+	if (!pcix)
+	   adapter->have_msi = FALSE;
+	else if((err = pci_enable_msi(adapter->pdev))) {
+		printk (KERN_ERR
+		 "Unable to allocate MSI interrupt Error: %d\n", err);
+		adapter->have_msi = FALSE;
+		/* proceed to try to request regular interrupt */
+	}
+	}
+
+#endif
 	if((err = request_irq(adapter->pdev->irq, &ixgb_intr,
 				  SA_SHIRQ | SA_SAMPLE_RANDOM,
 				  netdev->name, netdev)))
@@ -278,6 +278,11 @@ ixgb_down(struct ixgb_adapter *adapter, 
 
 	ixgb_irq_disable(adapter);
 	free_irq(adapter->pdev->irq, netdev);
+#ifdef CONFIG_PCI_MSI
+	if(adapter->have_msi == TRUE)
+		pci_disable_msi(adapter->pdev);
+
+#endif
 	if(kill_watchdog)
 		del_timer_sync(&adapter->watchdog_timer);
 	adapter->link_speed = 0;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6 1/9] ixgb: Enabling MSI on a PCI slot (not PCI-X) may not work, so always disable MSI for PCI slots, enable message signalled interrupts on 82597EX based adapters
  2005-01-07  1:22 [PATCH 2.6 1/9] ixgb: Enabling MSI on a PCI slot (not PCI-X) may not work, so always disable MSI for PCI slots, enable message signalled interrupts on 82597EX based adapters Ganesh Venkatesan
@ 2005-01-07  2:57 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2005-01-07  2:57 UTC (permalink / raw)
  To: Ganesh Venkatesan; +Cc: netdev

unfortunately these ixgb patches don't apply.

Can you please resend against a vanilla 2.6.10 kernel, with no other 
patches applied?

	Jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-01-07  2:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-07  1:22 [PATCH 2.6 1/9] ixgb: Enabling MSI on a PCI slot (not PCI-X) may not work, so always disable MSI for PCI slots, enable message signalled interrupts on 82597EX based adapters Ganesh Venkatesan
2005-01-07  2:57 ` Jeff Garzik

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).