-------- Forwarded Message --------
From: Jason Shi <[email protected]>
Reply-to: shidj <[email protected]>
To: jeffrey.t.kirsher <[email protected]>
Subject: Where can I find the detail discription of IXGBE_CIAA and
IXGBE_CIAD?
Date: Fri, 23 Aug 2013 10:06:14 +0800

Dear Sir:
 
I encountered a "Hund DMA" problem when I did some work on the 82599 10G
NIC.
And I'm writing to ask you how to understand some code in the linux
ixgbe driver.
Because I noticed that these code may be commited by you, while I can
not find any
introduction about the registers involved from the latest
82599-10-gbe-controller-datasheet(v2.8).
 
So where can I find the detail discription of IXGBE_CIAA and IXGBE_CIAD?
When "Hung DMA" happened, is there a way to make the VF work again
without a hard reset?
ixgbe_main.c
+static void ixgbe_check_for_bad_vf(struct ixgbe_adapter *adapter)
+{
+       int vf;
+       struct ixgbe_hw *hw = &adapter->hw;
+       struct net_device *netdev = adapter->netdev;
+       u32 gpc;
+       u32 ciaa, ciad;
+
+       gpc = IXGBE_READ_REG(hw, IXGBE_TXDGPC);
+       if (gpc) /* If incrementing then no need for the check below */
+               return;
+       /*
+        * Check to see if a bad DMA write target from an errant or
+        * malicious VF has caused a PCIe error.  If so then we can
+        * issue a VFLR to the offending VF(s) and then resume without
+        * requesting a full slot reset.
+        */
+
+       for (vf = 0; vf < adapter->num_vfs; vf++) {
+               ciaa = (vf << 16) | 0x80000000;
+               /* 32 bit read so align, we really want status at offset 6 */
+               ciaa |= PCI_COMMAND;
+               IXGBE_WRITE_REG(hw, IXGBE_CIAA_82599, ciaa);
+               ciad = IXGBE_READ_REG(hw, IXGBE_CIAD_82599);
+               ciaa &= 0x7FFFFFFF;
+               /* disable debug mode asap after reading data */
+               IXGBE_WRITE_REG(hw, IXGBE_CIAA_82599, ciaa);
+               /* Get the upper 16 bits which will be the PCI status reg */
+               ciad >>= 16;
+               if (ciad & PCI_STATUS_REC_MASTER_ABORT) {
+                       netdev_err(netdev, "VF %d Hung DMA\n", vf);
+                       /* Issue VFLR */
+                       ciaa = (vf << 16) | 0x80000000;
+                       ciaa |= 0xA8;
+                       IXGBE_WRITE_REG(hw, IXGBE_CIAA_82599, ciaa);
+                       ciad = 0x00008000;  /* VFLR */
+                       IXGBE_WRITE_REG(hw, IXGBE_CIAD_82599, ciad);
+                       ciaa &= 0x7FFFFFFF;
+                       IXGBE_WRITE_REG(hw, IXGBE_CIAA_82599, ciaa);
+               }
+       }
+}
 
Best reguards! :>
May the force be with you.

________________________________________________________________________
Jason Shi
 

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to