Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 653952 Details for
Bug 862862
long ixgbevf interface name crashes kernel
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[v1] squashed debug series for ixgbevf_main.c
bz862862_ixgbevf_crash_debug_v1.patch (text/plain), 67.46 KB, created by
Laszlo Ersek
on 2012-11-29 03:17:52 UTC
(
hide
)
Description:
[v1] squashed debug series for ixgbevf_main.c
Filename:
MIME Type:
Creator:
Laszlo Ersek
Created:
2012-11-29 03:17:52 UTC
Size:
67.46 KB
patch
obsolete
>diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c >index 46c49be..271c837 100644 >--- a/drivers/net/ixgbevf/ixgbevf_main.c >+++ b/drivers/net/ixgbevf/ixgbevf_main.c >@@ -94,6 +94,7 @@ static void ixgbevf_set_itr_msix(struct ixgbevf_q_vector *q_vector); > static void ixgbevf_write_eitr(struct ixgbevf_adapter *adapter, int v_idx, > u32 itr_reg); > >+/* not instrumented -- possibly called per-packet */ > static inline void ixgbevf_release_rx_desc(struct ixgbe_hw *hw, > struct ixgbevf_ring *rx_ring, > u32 val) >@@ -121,6 +122,11 @@ static void ixgbevf_set_ivar(struct ixgbevf_adapter *adapter, s8 direction, > { > u32 ivar, index; > struct ixgbe_hw *hw = &adapter->hw; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry direction=%d queue=%d msix_vector=%d\n", >+ __FUNCTION__, direction, queue, msix_vector); >+ > if (direction == -1) { > /* other causes */ > msix_vector |= IXGBE_IVAR_ALLOC_VAL; >@@ -137,8 +143,12 @@ static void ixgbevf_set_ivar(struct ixgbevf_adapter *adapter, s8 direction, > ivar |= (msix_vector << index); > IXGBE_WRITE_REG(hw, IXGBE_VTIVAR(queue >> 1), ivar); > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > >+/* not instrumented -- possibly called per-packet */ > static void ixgbevf_unmap_and_free_tx_resource(struct ixgbevf_adapter *adapter, > struct ixgbevf_tx_buffer > *tx_buffer_info) >@@ -179,6 +189,7 @@ static void ixgbevf_unmap_and_free_tx_resource(struct ixgbevf_adapter *adapter, > > static void ixgbevf_tx_timeout(struct net_device *netdev); > >+/* not instrumented -- possibly called per-packet */ > /** > * ixgbevf_clean_tx_irq - Reclaim resources after transmit completes > * @adapter: board private structure >@@ -281,6 +292,7 @@ cont_loop: > return count < tx_ring->work_limit; > } > >+/* not instrumented -- possibly called per-packet */ > /** > * ixgbevf_receive_skb - Send a completed packet up the stack > * @q_vector: structure containing interrupt and ring information >@@ -313,6 +325,7 @@ static void ixgbevf_receive_skb(struct ixgbevf_q_vector *q_vector, > } > } > >+/* not instrumented -- possibly called per-packet */ > /** > * ixgbevf_rx_checksum - indicate in skb if hw indicated a good cksum > * @adapter: address of board private structure >@@ -348,6 +361,7 @@ static inline void ixgbevf_rx_checksum(struct ixgbevf_adapter *adapter, > adapter->hw_csum_rx_good++; > } > >+/* not instrumented -- possibly called per-packet */ > /** > * ixgbevf_alloc_rx_buffers - Replace used receive buffers; packet split > * @adapter: address of board private structure >@@ -438,6 +452,7 @@ no_buffers: > } > } > >+/* not instrumented -- possibly called per-packet */ > static inline void ixgbevf_irq_enable_queues(struct ixgbevf_adapter *adapter, > u64 qmask) > { >@@ -448,16 +463,19 @@ static inline void ixgbevf_irq_enable_queues(struct ixgbevf_adapter *adapter, > IXGBE_WRITE_REG(hw, IXGBE_VTEIMS, mask); > } > >+/* not instrumented -- possibly called per-packet */ > static inline u16 ixgbevf_get_hdr_info(union ixgbe_adv_rx_desc *rx_desc) > { > return rx_desc->wb.lower.lo_dword.hs_rss.hdr_info; > } > >+/* not instrumented -- possibly called per-packet */ > static inline u16 ixgbevf_get_pkt_info(union ixgbe_adv_rx_desc *rx_desc) > { > return rx_desc->wb.lower.lo_dword.hs_rss.pkt_info; > } > >+/* not instrumented -- possibly called per-packet */ > static bool ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector, > struct ixgbevf_ring *rx_ring, > int *work_done, int work_to_do) >@@ -614,6 +632,7 @@ next_desc: > return cleaned; > } > >+/* not instrumented -- possibly called per-packet */ > /** > * ixgbevf_clean_rxonly - msix (aka one shot) rx clean routine > * @napi: napi struct with our devices info in it >@@ -652,6 +671,7 @@ static int ixgbevf_clean_rxonly(struct net_device *netdev, int *budget) > return 1; > } > >+/* not instrumented -- possibly called per-packet */ > /** > * ixgbevf_clean_rxonly_many - msix (aka one shot) rx clean routine > * @napi: napi struct with our devices info in it >@@ -724,27 +744,47 @@ static void ixgbevf_configure_msix(struct ixgbevf_adapter *adapter) > > q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry num_msix_vectors=%d q_vectors=%d\n", >+ __FUNCTION__, adapter->num_msix_vectors, q_vectors); >+ > /* > * Populate the IVAR table and set the ITR values to the > * corresponding register. > */ > for (v_idx = 0; v_idx < q_vectors; v_idx++) { > q_vector = adapter->q_vector[v_idx]; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() configuring RX queues for MSI-X v_idx=%d " >+ "rxr_count=%d\n", >+ __FUNCTION__, v_idx, q_vector->rxr_count); > /* XXX for_each_set_bit(...) */ > r_idx = find_first_bit(q_vector->rxr_idx, > adapter->num_rx_queues); > > for (i = 0; i < q_vector->rxr_count; i++) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() rx_ring_idx=%d\n", >+ __FUNCTION__, r_idx); > j = adapter->rx_ring[r_idx].reg_idx; > ixgbevf_set_ivar(adapter, 0, j, v_idx); > r_idx = find_next_bit(q_vector->rxr_idx, > adapter->num_rx_queues, > r_idx + 1); > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() configuring TX queues for MSI-X v_idx=%d " >+ "txr_count=%d\n", >+ __FUNCTION__, v_idx, q_vector->txr_count); > r_idx = find_first_bit(q_vector->txr_idx, > adapter->num_tx_queues); > > for (i = 0; i < q_vector->txr_count; i++) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() tx_ring_idx=%d\n", >+ __FUNCTION__, r_idx); > j = adapter->tx_ring[r_idx].reg_idx; > ixgbevf_set_ivar(adapter, 1, j, v_idx); > r_idx = find_next_bit(q_vector->txr_idx, >@@ -768,6 +808,9 @@ static void ixgbevf_configure_msix(struct ixgbevf_adapter *adapter) > mask = IXGBE_EIMS_ENABLE_MASK; > mask &= ~IXGBE_EIMS_OTHER; > IXGBE_WRITE_REG(hw, IXGBE_VTEIAC, mask); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > enum latency_range { >@@ -777,6 +820,7 @@ enum latency_range { > latency_invalid = 255 > }; > >+/* not instrumented -- possibly called per-packet */ > /** > * ixgbevf_update_itr - update the dynamic ITR value based on statistics > * @adapter: pointer to adapter >@@ -835,6 +879,7 @@ update_itr_done: > return retval; > } > >+/* not instrumented -- possibly called per-packet */ > /** > * ixgbevf_write_eitr - write VTEITR register in hardware specific way > * @adapter: pointer to adapter struct >@@ -861,6 +906,7 @@ static void ixgbevf_write_eitr(struct ixgbevf_adapter *adapter, int v_idx, > IXGBE_WRITE_REG(hw, IXGBE_VTEITR(v_idx), itr_reg); > } > >+/* not instrumented -- possibly called per-packet */ > static void ixgbevf_set_itr_msix(struct ixgbevf_q_vector *q_vector) > { > struct ixgbevf_adapter *adapter = q_vector->adapter; >@@ -927,6 +973,7 @@ static void ixgbevf_set_itr_msix(struct ixgbevf_q_vector *q_vector) > } > } > >+/* not instrumented -- possibly called per-packet */ > static irqreturn_t ixgbevf_msix_mbx(int irq, void *data, struct pt_regs *regs) > { > struct net_device *netdev = data; >@@ -963,6 +1010,7 @@ out: > return IRQ_HANDLED; > } > >+/* not instrumented -- possibly called per-packet */ > static irqreturn_t ixgbevf_msix_clean_tx(int irq, void *data, struct pt_regs *regs) > { > struct ixgbevf_q_vector *q_vector = data; >@@ -987,6 +1035,7 @@ static irqreturn_t ixgbevf_msix_clean_tx(int irq, void *data, struct pt_regs *re > return IRQ_HANDLED; > } > >+/* not instrumented -- possibly called per-packet */ > /** > * ixgbevf_msix_clean_rx - single unshared vector rx clean (all queues) > * @irq: unused >@@ -1012,6 +1061,7 @@ static irqreturn_t ixgbevf_msix_clean_rx(int irq, void *data, struct pt_regs *re > return IRQ_HANDLED; > } > >+/* not instrumented -- possibly called per-packet */ > static irqreturn_t ixgbevf_msix_clean_many(int irq, void *data, struct pt_regs *regs) > { > ixgbevf_msix_clean_rx(irq, data, regs); >@@ -1025,9 +1075,15 @@ static inline void map_vector_to_rxq(struct ixgbevf_adapter *a, int v_idx, > { > struct ixgbevf_q_vector *q_vector = a->q_vector[v_idx]; > >+ dev_printk(KERN_DEBUG, &a->pdev->dev, "%s() entry v_idx=%d r_idx=%d\n", >+ __FUNCTION__, v_idx, r_idx); >+ > set_bit(r_idx, q_vector->rxr_idx); > q_vector->rxr_count++; > a->rx_ring[r_idx].v_idx = 1 << v_idx; >+ >+ dev_printk(KERN_DEBUG, &a->pdev->dev, "%s() exit " >+ "rxr_count=%d\n",__FUNCTION__, q_vector->rxr_count); > } > > static inline void map_vector_to_txq(struct ixgbevf_adapter *a, int v_idx, >@@ -1035,9 +1091,15 @@ static inline void map_vector_to_txq(struct ixgbevf_adapter *a, int v_idx, > { > struct ixgbevf_q_vector *q_vector = a->q_vector[v_idx]; > >+ dev_printk(KERN_DEBUG, &a->pdev->dev, "%s() entry v_idx=%d t_idx=%d\n", >+ __FUNCTION__, v_idx, t_idx); >+ > set_bit(t_idx, q_vector->txr_idx); > q_vector->txr_count++; > a->tx_ring[t_idx].v_idx = 1 << v_idx; >+ >+ dev_printk(KERN_DEBUG, &a->pdev->dev, "%s() exit " >+ "txr_count=%d\n",__FUNCTION__, q_vector->txr_count); > } > > /** >@@ -1063,11 +1125,20 @@ static int ixgbevf_map_rings_to_vectors(struct ixgbevf_adapter *adapter) > > q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry num_msix_vectors=%d q_vectors=%d " >+ "num_rx_queues=%d num_tx_queues=%d\n", >+ __FUNCTION__, adapter->num_msix_vectors, q_vectors, >+ adapter->num_rx_queues, adapter->num_tx_queues); >+ > /* > * The ideal configuration... > * We have enough vectors to map one per queue. > */ > if (q_vectors == adapter->num_rx_queues + adapter->num_tx_queues) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() one queue per vector\n", __FUNCTION__); >+ > for (; rxr_idx < rxr_remaining; v_start++, rxr_idx++) > map_vector_to_rxq(adapter, v_start, rxr_idx); > >@@ -1081,10 +1152,18 @@ static int ixgbevf_map_rings_to_vectors(struct ixgbevf_adapter *adapter) > * mapping, we'll have to group them so there are > * multiple queues per vector. > */ >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() several queues per vector\n", __FUNCTION__); >+ > /* Re-adjusting *qpv takes care of the remainder. */ > for (i = v_start; i < q_vectors; i++) { > rqpv = DIV_ROUND_UP(rxr_remaining, q_vectors - i); > for (j = 0; j < rqpv; j++) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() " >+ "rxr_idx=%d rxr_remaining=%d " >+ "i=%d rqpv=%d j=%d\n", __FUNCTION__, >+ rxr_idx, rxr_remaining, i, rqpv, j); > map_vector_to_rxq(adapter, i, rxr_idx); > rxr_idx++; > rxr_remaining--; >@@ -1093,6 +1172,10 @@ static int ixgbevf_map_rings_to_vectors(struct ixgbevf_adapter *adapter) > for (i = v_start; i < q_vectors; i++) { > tqpv = DIV_ROUND_UP(txr_remaining, q_vectors - i); > for (j = 0; j < tqpv; j++) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() " >+ "txr_idx=%d txr_remaining=%d " >+ "i=%d tqpv=%d j=%d\n", __FUNCTION__, >+ txr_idx, txr_remaining, i, tqpv, j); > map_vector_to_txq(adapter, i, txr_idx); > txr_idx++; > txr_remaining--; >@@ -1100,6 +1183,8 @@ static int ixgbevf_map_rings_to_vectors(struct ixgbevf_adapter *adapter) > } > > out: >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (%d)\n", __FUNCTION__, err); > return err; > } > >@@ -1120,6 +1205,10 @@ static int ixgbevf_request_msix_irqs(struct ixgbevf_adapter *adapter) > /* Decrement for Other and TCP Timer vectors */ > q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry " >+ "num_msix_vectors=%d q_vectors=%d\n", >+ __FUNCTION__, adapter->num_msix_vectors, q_vectors); >+ > #define SET_HANDLER(_v) (((_v)->rxr_count && (_v)->txr_count) \ > ? &ixgbevf_msix_clean_many : \ > (_v)->rxr_count ? &ixgbevf_msix_clean_rx : \ >@@ -1139,8 +1228,16 @@ static int ixgbevf_request_msix_irqs(struct ixgbevf_adapter *adapter) > netdev->name, "TxRx", vector); > } else { > /* skip this unused q_vector */ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() " >+ "skipping unused vector=%d\n", __FUNCTION__, >+ vector); > continue; > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() " >+ "requesting irq=%d for vector=%d with name=%s\n", >+ __FUNCTION__, adapter->msix_entries[vector].vector, >+ vector, adapter->name[vector]); > err = request_irq(adapter->msix_entries[vector].vector, > handler, 0, adapter->name[vector], > adapter->q_vector[vector]); >@@ -1148,6 +1245,9 @@ static int ixgbevf_request_msix_irqs(struct ixgbevf_adapter *adapter) > hw_dbg(&adapter->hw, > "request_irq failed for MSIX interrupt " > "Error: %d\n", err); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() request_irq() failed (%d)\n", >+ __FUNCTION__, err); > goto free_queue_irqs; > } > } >@@ -1158,9 +1258,14 @@ static int ixgbevf_request_msix_irqs(struct ixgbevf_adapter *adapter) > if (err) { > hw_dbg(&adapter->hw, > "request_irq for msix_mbx failed: %d\n", err); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() request_irq() for msix_mbx failed (%d)\n", >+ __FUNCTION__, err); > goto free_queue_irqs; > } > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit (OK)\n", >+ __FUNCTION__); > return 0; > > free_queue_irqs: >@@ -1170,6 +1275,9 @@ free_queue_irqs: > pci_disable_msix(adapter->pdev); > kfree(adapter->msix_entries); > adapter->msix_entries = NULL; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit (%d)\n", >+ __FUNCTION__, err); > return err; > } > >@@ -1177,6 +1285,10 @@ static inline void ixgbevf_reset_q_vectors(struct ixgbevf_adapter *adapter) > { > int i, q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry " >+ "num_msix_vectors=%d q_vectors=%d\n", >+ __FUNCTION__, adapter->num_msix_vectors, q_vectors); >+ > for (i = 0; i < q_vectors; i++) { > struct ixgbevf_q_vector *q_vector = adapter->q_vector[i]; > bitmap_zero(q_vector->rxr_idx, MAX_RX_QUEUES); >@@ -1185,6 +1297,9 @@ static inline void ixgbevf_reset_q_vectors(struct ixgbevf_adapter *adapter) > q_vector->txr_count = 0; > q_vector->eitr = adapter->eitr_param; > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > /** >@@ -1198,12 +1313,17 @@ static int ixgbevf_request_irq(struct ixgbevf_adapter *adapter) > { > int err = 0; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry\n", >+ __FUNCTION__); >+ > err = ixgbevf_request_msix_irqs(adapter); > > if (err) > hw_dbg(&adapter->hw, > "request_irq failed, Error %d\n", err); > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit (%d)\n", >+ __FUNCTION__, err); > return err; > } > >@@ -1212,6 +1332,9 @@ static void ixgbevf_free_irq(struct ixgbevf_adapter *adapter) > struct net_device *netdev = adapter->netdev; > int i, q_vectors; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry\n", >+ __FUNCTION__); >+ > q_vectors = adapter->num_msix_vectors; > > i = q_vectors - 1; >@@ -1225,6 +1348,9 @@ static void ixgbevf_free_irq(struct ixgbevf_adapter *adapter) > } > > ixgbevf_reset_q_vectors(adapter); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > /** >@@ -1236,12 +1362,18 @@ static inline void ixgbevf_irq_disable(struct ixgbevf_adapter *adapter) > int i; > struct ixgbe_hw *hw = &adapter->hw; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry\n", >+ __FUNCTION__); >+ > IXGBE_WRITE_REG(hw, IXGBE_VTEIMC, ~0); > > IXGBE_WRITE_FLUSH(hw); > > for (i = 0; i < adapter->num_msix_vectors; i++) > synchronize_irq(adapter->msix_entries[i].vector); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > /** >@@ -1255,6 +1387,10 @@ static inline void ixgbevf_irq_enable(struct ixgbevf_adapter *adapter, > u32 mask; > u64 qmask; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry queues=%d flush=%d\n", __FUNCTION__, >+ queues, flush); >+ > mask = (IXGBE_EIMS_ENABLE_MASK & ~IXGBE_EIMS_RTX_QUEUE); > qmask = ~0; > >@@ -1265,6 +1401,9 @@ static inline void ixgbevf_irq_enable(struct ixgbevf_adapter *adapter, > > if (flush) > IXGBE_WRITE_FLUSH(hw); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > /** >@@ -1279,6 +1418,9 @@ static void ixgbevf_configure_tx(struct ixgbevf_adapter *adapter) > struct ixgbe_hw *hw = &adapter->hw; > u32 i, j, tdlen, txctrl; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry\n", >+ __FUNCTION__); >+ > /* Setup the HW Tx Head and Tail descriptor pointers */ > for (i = 0; i < adapter->num_tx_queues; i++) { > struct ixgbevf_ring *ring = &adapter->tx_ring[i]; >@@ -1300,6 +1442,9 @@ static void ixgbevf_configure_tx(struct ixgbevf_adapter *adapter) > txctrl &= ~IXGBE_DCA_TXCTRL_TX_WB_RO_EN; > IXGBE_WRITE_REG(hw, IXGBE_VFDCA_TXCTRL(j), txctrl); > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > #define IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT 2 >@@ -1310,12 +1455,19 @@ static void ixgbevf_configure_srrctl(struct ixgbevf_adapter *adapter, int index) > struct ixgbe_hw *hw = &adapter->hw; > u32 srrctl; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry index=%d\n", >+ __FUNCTION__, index); >+ > rx_ring = &adapter->rx_ring[index]; > > srrctl = IXGBE_SRRCTL_DROP_EN; > > if (adapter->flags & IXGBE_FLAG_RX_PS_ENABLED) { > u16 bufsz = IXGBEVF_RXBUFFER_2048; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() IXGBE_FLAG_RX_PS_ENABLED\n", __FUNCTION__); >+ > /* grow the amount we can receive on large page machines */ > if (bufsz < (PAGE_SIZE / 2)) > bufsz = (PAGE_SIZE / 2); >@@ -1328,16 +1480,33 @@ static void ixgbevf_configure_srrctl(struct ixgbevf_adapter *adapter, int index) > IXGBE_SRRCTL_BSIZEHDRSIZE_SHIFT) & > IXGBE_SRRCTL_BSIZEHDR_MASK); > } else { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() not IXGBE_FLAG_RX_PS_ENABLED\n", >+ __FUNCTION__); >+ > srrctl |= IXGBE_SRRCTL_DESCTYPE_ADV_ONEBUF; > >- if (rx_ring->rx_buf_len == MAXIMUM_ETHERNET_VLAN_SIZE) >+ if (rx_ring->rx_buf_len == MAXIMUM_ETHERNET_VLAN_SIZE) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() MAXIMUM_ETHERNET_VLAN_SIZE\n", >+ __FUNCTION__); >+ > srrctl |= IXGBEVF_RXBUFFER_2048 >> > IXGBE_SRRCTL_BSIZEPKT_SHIFT; >- else >+ } >+ else { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() not MAXIMUM_ETHERNET_VLAN_SIZE\n", >+ __FUNCTION__); >+ > srrctl |= rx_ring->rx_buf_len >> > IXGBE_SRRCTL_BSIZEPKT_SHIFT; >+ } > } > IXGBE_WRITE_REG(hw, IXGBE_VFSRRCTL(index), srrctl); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > /** >@@ -1356,6 +1525,9 @@ static void ixgbevf_configure_rx(struct ixgbevf_adapter *adapter) > u32 rdlen; > int rx_buf_len; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry\n", >+ __FUNCTION__); >+ > /* Decide whether to use packet split mode or not */ > if (netdev->mtu > ETH_DATA_LEN) { > if (adapter->flags & IXGBE_FLAG_RX_PS_CAPABLE) >@@ -1388,6 +1560,12 @@ static void ixgbevf_configure_rx(struct ixgbevf_adapter *adapter) > } > > rdlen = adapter->rx_ring[0].count * sizeof(union ixgbe_adv_rx_desc); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() mtu=%u flags=0x%08X rx_buf_len=%d rdlen=%u\n", >+ __FUNCTION__, netdev->mtu, adapter->flags, rx_buf_len, >+ rdlen); >+ > /* Setup the HW Rx Head and Tail Descriptor Pointers and > * the Base and Length of the Rx Descriptor Ring */ > for (i = 0; i < adapter->num_rx_queues; i++) { >@@ -1405,6 +1583,9 @@ static void ixgbevf_configure_rx(struct ixgbevf_adapter *adapter) > > ixgbevf_configure_srrctl(adapter, j); > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > static void ixgbevf_vlan_rx_register(struct net_device *netdev, >@@ -1415,6 +1596,9 @@ static void ixgbevf_vlan_rx_register(struct net_device *netdev, > int i, j; > u32 ctrl; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry\n", >+ __FUNCTION__); >+ > adapter->vlgrp = grp; > > for (i = 0; i < adapter->num_rx_queues; i++) { >@@ -1423,6 +1607,9 @@ static void ixgbevf_vlan_rx_register(struct net_device *netdev, > ctrl |= IXGBE_RXDCTL_VME; > IXGBE_WRITE_REG(hw, IXGBE_VFRXDCTL(j), ctrl); > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > static void ixgbevf_vlan_rx_add_vid(struct net_device *netdev, u16 vid) >@@ -1430,9 +1617,20 @@ static void ixgbevf_vlan_rx_add_vid(struct net_device *netdev, u16 vid) > struct ixgbevf_adapter *adapter = netdev_priv(netdev); > struct ixgbe_hw *hw = &adapter->hw; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry vid=%d\n", >+ __FUNCTION__, vid); >+ > /* add VID to filter table */ >- if (hw->mac.ops.set_vfta) >- hw->mac.ops.set_vfta(hw, vid, 0, true); >+ if (hw->mac.ops.set_vfta) { >+ s32 ret; >+ >+ ret = hw->mac.ops.set_vfta(hw, vid, 0, true); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() set_vfta=%d\n", __FUNCTION__, ret); >+ } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > static void ixgbevf_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) >@@ -1440,6 +1638,9 @@ static void ixgbevf_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) > struct ixgbevf_adapter *adapter = netdev_priv(netdev); > struct ixgbe_hw *hw = &adapter->hw; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry vid=%d\n", >+ __FUNCTION__, vid); >+ > if (!test_bit(__IXGBEVF_DOWN, &adapter->state)) > ixgbevf_irq_disable(adapter); > >@@ -1449,22 +1650,39 @@ static void ixgbevf_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) > ixgbevf_irq_enable(adapter, true, true); > > /* remove VID from filter table */ >- if (hw->mac.ops.set_vfta) >- hw->mac.ops.set_vfta(hw, vid, 0, false); >+ if (hw->mac.ops.set_vfta) { >+ s32 ret; >+ >+ ret = hw->mac.ops.set_vfta(hw, vid, 0, false); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() set_vfta=%d\n", __FUNCTION__, ret); >+ } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > static void ixgbevf_restore_vlan(struct ixgbevf_adapter *adapter) > { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry\n", >+ __FUNCTION__); >+ > ixgbevf_vlan_rx_register(adapter->netdev, adapter->vlgrp); > > if (adapter->vlgrp) { > u16 vid; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() vlgrp non-NULL\n", __FUNCTION__); > for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { > if (!vlan_group_get_device(adapter->vlgrp, vid)) > continue; > ixgbevf_vlan_rx_add_vid(adapter->netdev, vid); > } > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > static u8 *ixgbevf_addr_list_itr(struct ixgbe_hw *hw, u8 **mc_addr_ptr, >@@ -1472,14 +1690,21 @@ static u8 *ixgbevf_addr_list_itr(struct ixgbe_hw *hw, u8 **mc_addr_ptr, > { > struct dev_mc_list *mc_ptr; > u8 *addr = *mc_addr_ptr; >+ struct ixgbevf_adapter *adapter = hw->back; >+ > *vmdq = 0; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry\n", >+ __FUNCTION__); >+ > mc_ptr = container_of(addr, struct dev_mc_list, dmi_addr[0]); > if (mc_ptr->next) > *mc_addr_ptr = mc_ptr->next->dmi_addr; > else > *mc_addr_ptr = NULL; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit addr=%p\n", >+ __FUNCTION__, (void *)addr); > return addr; > } > >@@ -1498,6 +1723,9 @@ static void ixgbevf_set_rx_mode(struct net_device *netdev) > u8 *addr_list = NULL; > int addr_count = 0; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry mc_count=%d\n", >+ __FUNCTION__, netdev->mc_count); >+ > /* reprogram multicast list */ > addr_count = netdev->mc_count; > if (addr_count) >@@ -1505,6 +1733,9 @@ static void ixgbevf_set_rx_mode(struct net_device *netdev) > if (hw->mac.ops.update_mc_addr_list) > hw->mac.ops.update_mc_addr_list(hw, addr_list, addr_count, > ixgbevf_addr_list_itr); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > static void ixgbevf_napi_enable_all(struct ixgbevf_adapter *adapter) >@@ -1513,17 +1744,30 @@ static void ixgbevf_napi_enable_all(struct ixgbevf_adapter *adapter) > struct ixgbevf_q_vector *q_vector; > int q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry num_msix_vectors=%d q_vectors=%d\n", >+ __FUNCTION__, adapter->num_msix_vectors, q_vectors); >+ > for (q_idx = 0; q_idx < q_vectors; q_idx++) { > struct net_device *netdev; > q_vector = adapter->q_vector[q_idx]; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() q_idx=%d rxr_count=%d\n", >+ __FUNCTION__, q_idx, q_vector->rxr_count); >+ > if (!q_vector->rxr_count) > continue; >+ > netdev = q_vector->dummy_netdev; > if (q_vector->rxr_count > 1) > netdev->poll = &ixgbevf_clean_rxonly_many; > > netif_poll_enable(netdev); > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > static void ixgbevf_napi_disable_all(struct ixgbevf_adapter *adapter) >@@ -1532,12 +1776,24 @@ static void ixgbevf_napi_disable_all(struct ixgbevf_adapter *adapter) > struct ixgbevf_q_vector *q_vector; > int q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry num_msix_vectors=%d q_vectors=%d\n", >+ __FUNCTION__, adapter->num_msix_vectors, q_vectors); >+ > for (q_idx = 0; q_idx < q_vectors; q_idx++) { > q_vector = adapter->q_vector[q_idx]; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() q_idx=%d rxr_count=%d\n", >+ __FUNCTION__, q_idx, q_vector->rxr_count); >+ > if (!q_vector->rxr_count) > continue; > netif_poll_disable(q_vector->dummy_netdev); > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > static void ixgbevf_configure(struct ixgbevf_adapter *adapter) >@@ -1545,6 +1801,9 @@ static void ixgbevf_configure(struct ixgbevf_adapter *adapter) > struct net_device *netdev = adapter->netdev; > int i; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > ixgbevf_set_rx_mode(netdev); > > ixgbevf_restore_vlan(adapter); >@@ -1557,6 +1816,9 @@ static void ixgbevf_configure(struct ixgbevf_adapter *adapter) > ring->next_to_use = ring->count - 1; > writel(ring->next_to_use, adapter->hw.hw_addr + ring->tail); > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > #define IXGBE_MAX_RX_DESC_POLL 10 >@@ -1567,6 +1829,9 @@ static inline void ixgbevf_rx_desc_queue_enable(struct ixgbevf_adapter *adapter, > int j = adapter->rx_ring[rxr].reg_idx; > int k; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry rxr=%d\n", __FUNCTION__, rxr); >+ > for (k = 0; k < IXGBE_MAX_RX_DESC_POLL; k++) { > if (IXGBE_READ_REG(hw, IXGBE_VFRXDCTL(j)) & IXGBE_RXDCTL_ENABLE) > break; >@@ -1576,14 +1841,24 @@ static inline void ixgbevf_rx_desc_queue_enable(struct ixgbevf_adapter *adapter, > if (k >= IXGBE_MAX_RX_DESC_POLL) { > hw_dbg(hw, "RXDCTL.ENABLE on Rx queue %d " > "not set within the polling period\n", rxr); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() " >+ "RXDCTL.ENABLE on Rx queue %d not set within the " >+ "polling period\n", __FUNCTION__, rxr); > } > > ixgbevf_release_rx_desc(&adapter->hw, &adapter->rx_ring[rxr], > (adapter->rx_ring[rxr].count - 1)); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > static void ixgbevf_save_reset_stats(struct ixgbevf_adapter *adapter) > { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry save=%d\n", __FUNCTION__, >+ adapter->stats.vfgprc || adapter->stats.vfgptc); >+ > /* Only save pre-reset stats if there are some */ > if (adapter->stats.vfgprc || adapter->stats.vfgptc) { > adapter->stats.saved_reset_vfgprc += adapter->stats.vfgprc - >@@ -1597,12 +1872,18 @@ static void ixgbevf_save_reset_stats(struct ixgbevf_adapter *adapter) > adapter->stats.saved_reset_vfmprc += adapter->stats.vfmprc - > adapter->stats.base_vfmprc; > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > static void ixgbevf_init_last_counter_stats(struct ixgbevf_adapter *adapter) > { > struct ixgbe_hw *hw = &adapter->hw; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > adapter->stats.last_vfgprc = IXGBE_READ_REG(hw, IXGBE_VFGPRC); > adapter->stats.last_vfgorc = IXGBE_READ_REG(hw, IXGBE_VFGORC_LSB); > adapter->stats.last_vfgorc |= >@@ -1618,6 +1899,9 @@ static void ixgbevf_init_last_counter_stats(struct ixgbevf_adapter *adapter) > adapter->stats.base_vfgptc = adapter->stats.last_vfgptc; > adapter->stats.base_vfgotc = adapter->stats.last_vfgotc; > adapter->stats.base_vfmprc = adapter->stats.last_vfmprc; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > static int ixgbevf_up_complete(struct ixgbevf_adapter *adapter) >@@ -1628,6 +1912,9 @@ static int ixgbevf_up_complete(struct ixgbevf_adapter *adapter) > int num_rx_rings = adapter->num_rx_queues; > u32 txdctl, rxdctl; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry hw_mac_type=%d\n", __FUNCTION__, hw->mac.type); >+ > for (i = 0; i < adapter->num_tx_queues; i++) { > j = adapter->tx_ring[i].reg_idx; > txdctl = IXGBE_READ_REG(hw, IXGBE_VFTXDCTL(j)); >@@ -1659,10 +1946,26 @@ static int ixgbevf_up_complete(struct ixgbevf_adapter *adapter) > ixgbevf_configure_msix(adapter); > > if (hw->mac.ops.set_rar) { >+ const u8 *addr; >+ s32 ret; >+ >+ addr = is_valid_ether_addr(hw->mac.addr) ? hw->mac.addr >+ : hw->mac.perm_addr; >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() " >+ "%s=%02X:%02X:%02X:%02X:%02X:%02X\n", __FUNCTION__, >+ is_valid_ether_addr(hw->mac.addr) ? "addr" : "perm", >+ addr[0], addr[1], addr[2], addr[3], addr[4], >+ addr[5]); >+ > if (is_valid_ether_addr(hw->mac.addr)) >+ ret = > hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0); > else >+ ret = > hw->mac.ops.set_rar(hw, 0, hw->mac.perm_addr, 0); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() " >+ "set_rar=%d\n", __FUNCTION__, ret); > } > > clear_bit(__IXGBEVF_DOWN, &adapter->state); >@@ -1679,6 +1982,9 @@ static int ixgbevf_up_complete(struct ixgbevf_adapter *adapter) > adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE; > adapter->link_check_timeout = jiffies; > mod_timer(&adapter->watchdog_timer, jiffies); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (OK)\n", __FUNCTION__); > return 0; > } > >@@ -1687,6 +1993,9 @@ int ixgbevf_up(struct ixgbevf_adapter *adapter) > int err; > struct ixgbe_hw *hw = &adapter->hw; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > ixgbevf_configure(adapter); > > err = ixgbevf_up_complete(adapter); >@@ -1696,6 +2005,8 @@ int ixgbevf_up(struct ixgbevf_adapter *adapter) > > ixgbevf_irq_enable(adapter, true, true); > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (%d)\n", __FUNCTION__, err); > return err; > } > >@@ -1711,8 +2022,14 @@ static void ixgbevf_clean_rx_ring(struct ixgbevf_adapter *adapter, > unsigned long size; > unsigned int i; > >- if (!rx_ring->rx_buffer_info) >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry rx_ring=%p\n", __FUNCTION__, (void *)rx_ring); >+ >+ if (!rx_ring->rx_buffer_info) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit rx_buffer_info=NULL\n", __FUNCTION__); > return; >+ } > > /* Free all the Rx ring sk_buffs */ > for (i = 0; i < rx_ring->count; i++) { >@@ -1757,6 +2074,9 @@ static void ixgbevf_clean_rx_ring(struct ixgbevf_adapter *adapter, > writel(0, adapter->hw.hw_addr + rx_ring->head); > if (rx_ring->tail) > writel(0, adapter->hw.hw_addr + rx_ring->tail); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (OK)\n", __FUNCTION__); > } > > /** >@@ -1771,8 +2091,14 @@ static void ixgbevf_clean_tx_ring(struct ixgbevf_adapter *adapter, > unsigned long size; > unsigned int i; > >- if (!tx_ring->tx_buffer_info) >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry tx_ring=%p\n", __FUNCTION__, (void *)tx_ring); >+ >+ if (!tx_ring->tx_buffer_info) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit tx_buffer_info=NULL\n", __FUNCTION__); > return; >+ } > > /* Free all the Tx ring sk_buffs */ > >@@ -1793,6 +2119,9 @@ static void ixgbevf_clean_tx_ring(struct ixgbevf_adapter *adapter, > writel(0, adapter->hw.hw_addr + tx_ring->head); > if (tx_ring->tail) > writel(0, adapter->hw.hw_addr + tx_ring->tail); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (OK)\n", __FUNCTION__); > } > > /** >@@ -1803,8 +2132,14 @@ static void ixgbevf_clean_all_rx_rings(struct ixgbevf_adapter *adapter) > { > int i; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > for (i = 0; i < adapter->num_rx_queues; i++) > ixgbevf_clean_rx_ring(adapter, &adapter->rx_ring[i]); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > /** >@@ -1815,8 +2150,14 @@ static void ixgbevf_clean_all_tx_rings(struct ixgbevf_adapter *adapter) > { > int i; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > for (i = 0; i < adapter->num_tx_queues; i++) > ixgbevf_clean_tx_ring(adapter, &adapter->tx_ring[i]); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > void ixgbevf_down(struct ixgbevf_adapter *adapter) >@@ -1826,6 +2167,9 @@ void ixgbevf_down(struct ixgbevf_adapter *adapter) > u32 txdctl; > int i, j; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > /* signal that we are down to the interrupt handler */ > set_bit(__IXGBEVF_DOWN, &adapter->state); > /* disable receives */ >@@ -1862,12 +2206,18 @@ void ixgbevf_down(struct ixgbevf_adapter *adapter) > > ixgbevf_clean_all_tx_rings(adapter); > ixgbevf_clean_all_rx_rings(adapter); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > void ixgbevf_reinit_locked(struct ixgbevf_adapter *adapter) > { > struct ixgbe_hw *hw = &adapter->hw; > >+ /* I'm not sure how frequently this is called. Better skip entry/exit >+ * messages here. */ >+ > WARN_ON(in_interrupt()); > > while (test_and_set_bit(__IXGBEVF_RESETTING, &adapter->state)) >@@ -1881,6 +2231,8 @@ void ixgbevf_reinit_locked(struct ixgbevf_adapter *adapter) > * the PF is up and running. > */ > if (!hw->mac.ops.reset_hw(hw)) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() PF is up, reinitializing VF\n", __FUNCTION__); > ixgbevf_down(adapter); > ixgbevf_up(adapter); > } >@@ -1893,10 +2245,22 @@ void ixgbevf_reset(struct ixgbevf_adapter *adapter) > struct ixgbe_hw *hw = &adapter->hw; > struct net_device *netdev = adapter->netdev; > >- if (hw->mac.ops.reset_hw(hw)) >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ >+ if (hw->mac.ops.reset_hw(hw)) { > hw_dbg(hw, "PF still resetting\n"); >- else >- hw->mac.ops.init_hw(hw); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() PF still resetting\n", __FUNCTION__); >+ } >+ else { >+ int err; >+ >+ err = hw->mac.ops.init_hw(hw); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() PF done resetting, init_hw=%d\n", >+ __FUNCTION__, err); >+ } > > if (is_valid_ether_addr(adapter->hw.mac.addr)) { > memcpy(netdev->dev_addr, adapter->hw.mac.addr, >@@ -1904,6 +2268,14 @@ void ixgbevf_reset(struct ixgbevf_adapter *adapter) > memcpy(netdev->perm_addr, adapter->hw.mac.addr, > netdev->addr_len); > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit " >+ "hw.mac.addr=%02X:%02X:%02X:%02X:%02X:%02X valid=%d\n", >+ __FUNCTION__, >+ adapter->hw.mac.addr[0], adapter->hw.mac.addr[1], >+ adapter->hw.mac.addr[2], adapter->hw.mac.addr[3], >+ adapter->hw.mac.addr[4], adapter->hw.mac.addr[5], >+ is_valid_ether_addr(adapter->hw.mac.addr)); > } > > static void ixgbevf_acquire_msix_vectors(struct ixgbevf_adapter *adapter, >@@ -1911,6 +2283,9 @@ static void ixgbevf_acquire_msix_vectors(struct ixgbevf_adapter *adapter, > { > int err, vector_threshold; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry: vectors=%d\n", __FUNCTION__, vectors); >+ > /* We'll want at least 3 (vector_threshold): > * 1) TxQ[0] Cleanup > * 2) RxQ[0] Cleanup >@@ -1924,14 +2299,26 @@ static void ixgbevf_acquire_msix_vectors(struct ixgbevf_adapter *adapter, > * set them up later while requesting irq's. > */ > while (vectors >= vector_threshold) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() acquiring " >+ "vectors=%d\n", __FUNCTION__, vectors); > err = pci_enable_msix(adapter->pdev, adapter->msix_entries, > vectors); >- if (!err) /* Success in acquiring all requested vectors. */ >+ if (!err) { /* Success in acquiring all requested vectors. */ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() success\n", __FUNCTION__); > break; >- else if (err < 0) >+ } >+ else if (err < 0) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() error=%d\n", __FUNCTION__, err); > vectors = 0; /* Nasty failure, quit now */ >- else /* err == number of vectors we should try again with */ >+ } >+ else { /* err == number of vectors we should try again with */ > vectors = err; >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() retrying with vectors=%d\n", >+ __FUNCTION__, vectors); >+ } > } > > if (vectors < vector_threshold) { >@@ -1939,6 +2326,9 @@ static void ixgbevf_acquire_msix_vectors(struct ixgbevf_adapter *adapter, > * This just means we'll go with either a single MSI > * vector or fall back to legacy interrupts. > */ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s(): Unable to allocate MSI-X interrupts\n", >+ __FUNCTION__); > hw_dbg(&adapter->hw, > "Unable to allocate MSI-X interrupts\n"); > kfree(adapter->msix_entries); >@@ -1950,7 +2340,13 @@ static void ixgbevf_acquire_msix_vectors(struct ixgbevf_adapter *adapter, > * vectors we were allocated. > */ > adapter->num_msix_vectors = vectors; >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s(): allocated %d MSI-X interrupts\n", >+ __FUNCTION__, vectors); > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > /* >@@ -1966,11 +2362,17 @@ static void ixgbevf_acquire_msix_vectors(struct ixgbevf_adapter *adapter, > **/ > static void ixgbevf_set_num_queues(struct ixgbevf_adapter *adapter) > { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > /* Start with base case */ > adapter->num_rx_queues = 1; > adapter->num_tx_queues = 1; > adapter->num_rx_pools = adapter->num_rx_queues; > adapter->num_rx_queues_per_pool = 1; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > /** >@@ -1985,6 +2387,12 @@ static int ixgbevf_alloc_queues(struct ixgbevf_adapter *adapter) > { > int i; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry num_tx_queues=%d num_rx_queues=%d " >+ "tx_ring_count=%u rx_ring_count=%u\n", __FUNCTION__, >+ adapter->num_tx_queues, adapter->num_rx_queues, >+ adapter->tx_ring_count, adapter->rx_ring_count); >+ > adapter->tx_ring = kcalloc(adapter->num_tx_queues, > sizeof(struct ixgbevf_ring), GFP_KERNEL); > if (!adapter->tx_ring) >@@ -1999,19 +2407,32 @@ static int ixgbevf_alloc_queues(struct ixgbevf_adapter *adapter) > adapter->tx_ring[i].count = adapter->tx_ring_count; > adapter->tx_ring[i].queue_index = i; > adapter->tx_ring[i].reg_idx = i; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() tx_ring[%d] @ %p\n", __FUNCTION__, >+ i, (void *)&adapter->tx_ring[i]); > } > > for (i = 0; i < adapter->num_rx_queues; i++) { > adapter->rx_ring[i].count = adapter->rx_ring_count; > adapter->rx_ring[i].queue_index = i; > adapter->rx_ring[i].reg_idx = i; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() rx_ring[%d] @ %p\n", __FUNCTION__, >+ i, (void *)&adapter->rx_ring[i]); > } > >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (success)\n", __FUNCTION__); > return 0; > > err_rx_ring_allocation: > kfree(adapter->tx_ring); > err_tx_ring_allocation: >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (ENOMEM)\n", __FUNCTION__); > return -ENOMEM; > } > >@@ -2027,6 +2448,9 @@ static int ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter) > int err = 0; > int vector, v_budget; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > /* > * It's easy to be greedy for MSI-X vectors, but it really > * doesn't do us much good if we have a lot more vectors >@@ -2035,6 +2459,10 @@ static int ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter) > */ > v_budget = min(adapter->num_rx_queues + adapter->num_tx_queues, > (int)(num_online_cpus() * 2)) + NON_Q_VECTORS; >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() num_rx_queues=%d num_tx_queues=%d v_budget=%d\n", >+ __FUNCTION__, >+ adapter->num_rx_queues, adapter->num_tx_queues, v_budget); > > /* A failure in MSI-X entry allocation isn't fatal, but it does > * mean we disable MSI-X capabilities of the adapter. */ >@@ -2045,12 +2473,16 @@ static int ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter) > goto out; > } > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() v_budget alloc OK\n", >+ __FUNCTION__); > for (vector = 0; vector < v_budget; vector++) > adapter->msix_entries[vector].entry = vector; > > ixgbevf_acquire_msix_vectors(adapter, v_budget); > > out: >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit (%d)\n", >+ __FUNCTION__, err); > return err; > } > >@@ -2072,18 +2504,34 @@ static int ixgbevf_alloc_q_vectors(struct ixgbevf_adapter *adapter) > napi_vectors = adapter->num_rx_queues; > poll = &ixgbevf_clean_rxonly; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry " >+ "num_msix_vectors=%d num_q_vectors=%d napi_vectors=%d\n", >+ __FUNCTION__, adapter->num_msix_vectors, num_q_vectors, >+ napi_vectors); >+ > for (q_idx = 0; q_idx < num_q_vectors; q_idx++) { > q_vector = kzalloc(sizeof(struct ixgbevf_q_vector), GFP_KERNEL); >- if (!q_vector) >+ if (!q_vector) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() " >+ "q_vector allocation for q_idx=%d failed\n", >+ __FUNCTION__, q_idx); > goto err_out; >+ } > q_vector->adapter = adapter; > q_vector->v_idx = q_idx; > q_vector->eitr = adapter->eitr_param; > if (q_idx < napi_vectors) { > if (!q_vector->dummy_netdev) { > q_vector->dummy_netdev = alloc_netdev(0, "", ether_setup); >- if (!q_vector->dummy_netdev) >+ if (!q_vector->dummy_netdev) { >+ dev_printk(KERN_DEBUG, >+ &adapter->pdev->dev, "%s() " >+ "exit dummy_netdev " >+ "allocation for q_idx=%d " >+ "failed\n", __FUNCTION__, >+ q_idx); > return -ENOMEM; >+ } > } > q_vector->dummy_netdev->priv = q_vector; > q_vector->dummy_netdev->poll = poll; >@@ -2093,6 +2541,8 @@ static int ixgbevf_alloc_q_vectors(struct ixgbevf_adapter *adapter) > adapter->q_vector[q_idx] = q_vector; > } > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit (success)\n", >+ __FUNCTION__); > return 0; > > err_out: >@@ -2104,6 +2554,8 @@ err_out: > kfree(q_vector); > adapter->q_vector[q_idx] = NULL; > } >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit (ENOMEM)\n", >+ __FUNCTION__); > return -ENOMEM; > } > >@@ -2123,6 +2575,11 @@ static void ixgbevf_free_q_vectors(struct ixgbevf_adapter *adapter) > num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; > napi_vectors = adapter->num_rx_queues; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry " >+ "num_msix_vectors=%d num_q_vectors=%d napi_vectors=%d\n", >+ __FUNCTION__, adapter->num_msix_vectors, num_q_vectors, >+ napi_vectors); >+ > for (q_idx = 0; q_idx < num_q_vectors; q_idx++) { > struct ixgbevf_q_vector *q_vector = adapter->q_vector[q_idx]; > >@@ -2133,6 +2590,9 @@ static void ixgbevf_free_q_vectors(struct ixgbevf_adapter *adapter) > } > kfree(q_vector); > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit\n", >+ __FUNCTION__); > } > > /** >@@ -2142,9 +2602,15 @@ static void ixgbevf_free_q_vectors(struct ixgbevf_adapter *adapter) > **/ > static void ixgbevf_reset_interrupt_capability(struct ixgbevf_adapter *adapter) > { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > pci_disable_msix(adapter->pdev); > kfree(adapter->msix_entries); > adapter->msix_entries = NULL; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > /** >@@ -2156,6 +2622,9 @@ static int ixgbevf_init_interrupt_scheme(struct ixgbevf_adapter *adapter) > { > int err; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > /* Number of supported queues */ > ixgbevf_set_num_queues(adapter); > >@@ -2163,6 +2632,9 @@ static int ixgbevf_init_interrupt_scheme(struct ixgbevf_adapter *adapter) > if (err) { > hw_dbg(&adapter->hw, > "Unable to setup interrupt capabilities\n"); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() unable to setup interrupt capabilities\n", >+ __FUNCTION__); > goto err_set_interrupt; > } > >@@ -2170,6 +2642,9 @@ static int ixgbevf_init_interrupt_scheme(struct ixgbevf_adapter *adapter) > if (err) { > hw_dbg(&adapter->hw, "Unable to allocate memory for queue " > "vectors\n"); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() unable to " >+ "allocate memory for queue vectors\n", >+ __FUNCTION__); > goto err_alloc_q_vectors; > } > >@@ -2186,12 +2661,18 @@ static int ixgbevf_init_interrupt_scheme(struct ixgbevf_adapter *adapter) > > set_bit(__IXGBEVF_DOWN, &adapter->state); > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit (success) " >+ "num_rx_queues=%d num_tx_queues=%d\n", __FUNCTION__, >+ adapter->num_rx_queues, adapter->num_tx_queues); > return 0; > err_alloc_queues: > ixgbevf_free_q_vectors(adapter); > err_alloc_q_vectors: > ixgbevf_reset_interrupt_capability(adapter); > err_set_interrupt: >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() exit (%d)\n", >+ __FUNCTION__, err); > return err; > } > >@@ -2210,6 +2691,9 @@ static int __devinit ixgbevf_sw_init(struct ixgbevf_adapter *adapter) > struct pci_dev *pdev = adapter->pdev; > int err; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > /* PCI config space info */ > > hw->vendor_id = pdev->vendor; >@@ -2226,12 +2710,19 @@ static int __devinit ixgbevf_sw_init(struct ixgbevf_adapter *adapter) > dev_info(&pdev->dev, > "PF still in reset state, assigning new address\n"); > random_ether_addr(hw->mac.addr); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() reset_hw=%d " >+ "new address %02X:%02X:%02X:%02X:%02X:%02X\n", >+ __FUNCTION__, err, >+ hw->mac.addr[0], hw->mac.addr[1], hw->mac.addr[2], >+ hw->mac.addr[3], hw->mac.addr[4], hw->mac.addr[5]); > } else { > err = hw->mac.ops.init_hw(hw); > if (err) { > printk(KERN_ERR "init_shared_code failed: %d\n", err); > goto out; > } >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() init_hw OK\n", __FUNCTION__); > } > > /* Enable dynamic interrupt throttling rates */ >@@ -2252,6 +2743,8 @@ static int __devinit ixgbevf_sw_init(struct ixgbevf_adapter *adapter) > set_bit(__IXGBEVF_DOWN, &adapter->state); > > out: >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (%d)\n", __FUNCTION__, err); > return err; > } > >@@ -2285,6 +2778,9 @@ void ixgbevf_update_stats(struct ixgbevf_adapter *adapter) > { > struct ixgbe_hw *hw = &adapter->hw; > >+ /* I'm not sure how frequently this is called. Better skip entry/exit >+ * messages here. */ >+ > UPDATE_VF_COUNTER_32bit(IXGBE_VFGPRC, adapter->stats.last_vfgprc, > adapter->stats.vfgprc); > UPDATE_VF_COUNTER_32bit(IXGBE_VFGPTC, adapter->stats.last_vfgptc, >@@ -2314,6 +2810,9 @@ static void ixgbevf_watchdog(unsigned long data) > u64 eics = 0; > int i; > >+ /* I'm not sure how frequently this is called. Better skip entry/exit >+ * messages here. */ >+ > /* > * Do the watchdog outside of interrupt context due to the lovely > * delays that some of the newer hardware requires >@@ -2343,6 +2842,9 @@ static void ixgbevf_tx_timeout(struct net_device *netdev) > { > struct ixgbevf_adapter *adapter = netdev_priv(netdev); > >+ /* I'm not sure how frequently this is called. Better skip entry/exit >+ * messages here. */ >+ > /* Do the reset outside of interrupt context */ > schedule_work(&adapter->reset_task); > } >@@ -2351,6 +2853,9 @@ static void ixgbevf_reset_task(struct net_device *netdev) > { > struct ixgbevf_adapter *adapter = netdev_priv(netdev); > >+ /* I'm not sure how frequently this is called. Better skip entry/exit >+ * messages here. */ >+ > /* If we're already down or resetting, just bail */ > if (test_bit(__IXGBEVF_DOWN, &adapter->state) || > test_bit(__IXGBEVF_RESETTING, &adapter->state)) >@@ -2372,6 +2877,9 @@ static void ixgbevf_watchdog_task(struct ixgbevf_adapter *adapter) > u32 link_speed = adapter->link_speed; > bool link_up = adapter->link_up; > >+ /* I'm not sure how frequently this is called. Better skip entry/exit >+ * messages here. */ >+ > adapter->flags |= IXGBE_FLAG_IN_WATCHDOG_TASK; > > /* >@@ -2381,6 +2889,8 @@ static void ixgbevf_watchdog_task(struct ixgbevf_adapter *adapter) > if (hw->mac.ops.check_link) { > if ((hw->mac.ops.check_link(hw, &link_speed, > &link_up, false)) != 0) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() PF has reset\n", __FUNCTION__); > adapter->link_up = link_up; > adapter->link_speed = link_speed; > netif_carrier_off(netdev); >@@ -2399,6 +2909,10 @@ static void ixgbevf_watchdog_task(struct ixgbevf_adapter *adapter) > > if (link_up) { > if (!netif_carrier_ok(netdev)) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() " >+ "NIC Link is Up, %d Gbps\n", __FUNCTION__, >+ (link_speed == IXGBE_LINK_SPEED_10GB_FULL) ? >+ 10 : 1); > hw_dbg(&adapter->hw, "NIC Link is Up, %u Gbps\n", > (link_speed == IXGBE_LINK_SPEED_10GB_FULL) ? > 10 : 1); >@@ -2409,6 +2923,8 @@ static void ixgbevf_watchdog_task(struct ixgbevf_adapter *adapter) > adapter->link_up = false; > adapter->link_speed = 0; > if (netif_carrier_ok(netdev)) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() " >+ "NIC Link is Down\n", __FUNCTION__); > hw_dbg(&adapter->hw, "NIC Link is Down\n"); > netif_carrier_off(netdev); > netif_stop_queue(netdev); >@@ -2438,6 +2954,9 @@ void ixgbevf_free_tx_resources(struct ixgbevf_adapter *adapter, > { > struct pci_dev *pdev = adapter->pdev; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry tx_ring=%p\n", __FUNCTION__, (void *)tx_ring); >+ > ixgbevf_clean_tx_ring(adapter, tx_ring); > > vfree(tx_ring->tx_buffer_info); >@@ -2446,6 +2965,9 @@ void ixgbevf_free_tx_resources(struct ixgbevf_adapter *adapter, > pci_free_consistent(pdev, tx_ring->size, tx_ring->desc, tx_ring->dma); > > tx_ring->desc = NULL; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > /** >@@ -2458,11 +2980,16 @@ static void ixgbevf_free_all_tx_resources(struct ixgbevf_adapter *adapter) > { > int i; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > for (i = 0; i < adapter->num_tx_queues; i++) > if (adapter->tx_ring[i].desc) > ixgbevf_free_tx_resources(adapter, > &adapter->tx_ring[i]); > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > /** >@@ -2478,10 +3005,17 @@ int ixgbevf_setup_tx_resources(struct ixgbevf_adapter *adapter, > struct pci_dev *pdev = adapter->pdev; > int size; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry tx_ring=%p\n", __FUNCTION__, (void *)tx_ring); >+ > size = sizeof(struct ixgbevf_tx_buffer) * tx_ring->count; > tx_ring->tx_buffer_info = vzalloc(size); >- if (!tx_ring->tx_buffer_info) >+ if (!tx_ring->tx_buffer_info) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() failed to alloc tx_buffer_info size=%d\n", >+ __FUNCTION__, size); > goto err; >+ } > > /* round up to nearest 4K */ > tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc); >@@ -2489,12 +3023,19 @@ int ixgbevf_setup_tx_resources(struct ixgbevf_adapter *adapter, > > tx_ring->desc = pci_alloc_consistent(pdev, tx_ring->size, > &tx_ring->dma); >- if (!tx_ring->desc) >+ if (!tx_ring->desc) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() failed to alloc desc size=%u\n", >+ __FUNCTION__, tx_ring->size); > goto err; >+ } > > tx_ring->next_to_use = 0; > tx_ring->next_to_clean = 0; > tx_ring->work_limit = tx_ring->count; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (OK)\n", __FUNCTION__); > return 0; > > err: >@@ -2502,6 +3043,8 @@ err: > tx_ring->tx_buffer_info = NULL; > hw_dbg(&adapter->hw, "Unable to allocate memory for the transmit " > "descriptor ring\n"); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (ENOMEM)\n", __FUNCTION__); > return -ENOMEM; > } > >@@ -2519,6 +3062,9 @@ static int ixgbevf_setup_all_tx_resources(struct ixgbevf_adapter *adapter) > { > int i, err = 0; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > for (i = 0; i < adapter->num_tx_queues; i++) { > err = ixgbevf_setup_tx_resources(adapter, &adapter->tx_ring[i]); > if (!err) >@@ -2528,6 +3074,8 @@ static int ixgbevf_setup_all_tx_resources(struct ixgbevf_adapter *adapter) > break; > } > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (%d)\n", __FUNCTION__, err); > return err; > } > >@@ -2544,12 +3092,18 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_adapter *adapter, > struct pci_dev *pdev = adapter->pdev; > int size; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry rx_ring=%p\n", __FUNCTION__, (void *)rx_ring); >+ > size = sizeof(struct ixgbevf_rx_buffer) * rx_ring->count; > rx_ring->rx_buffer_info = vzalloc(size); > if (!rx_ring->rx_buffer_info) { > hw_dbg(&adapter->hw, > "Unable to vmalloc buffer memory for " > "the receive descriptor ring\n"); >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() failed to alloc rx_buffer_info size=%d\n", >+ __FUNCTION__, size); > goto alloc_failed; > } > >@@ -2566,14 +3120,21 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_adapter *adapter, > "the receive descriptor ring\n"); > vfree(rx_ring->rx_buffer_info); > rx_ring->rx_buffer_info = NULL; >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() failed to alloc desc size=%u\n", >+ __FUNCTION__, rx_ring->size); > goto alloc_failed; > } > > rx_ring->next_to_clean = 0; > rx_ring->next_to_use = 0; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (OK)\n", __FUNCTION__); > return 0; > alloc_failed: >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (ENOMEM)\n", __FUNCTION__); > return -ENOMEM; > } > >@@ -2591,6 +3152,9 @@ static int ixgbevf_setup_all_rx_resources(struct ixgbevf_adapter *adapter) > { > int i, err = 0; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > for (i = 0; i < adapter->num_rx_queues; i++) { > err = ixgbevf_setup_rx_resources(adapter, &adapter->rx_ring[i]); > if (!err) >@@ -2599,6 +3163,9 @@ static int ixgbevf_setup_all_rx_resources(struct ixgbevf_adapter *adapter) > "Allocation for Rx Queue %u failed\n", i); > break; > } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (%d)\n", __FUNCTION__, err); > return err; > } > >@@ -2614,6 +3181,9 @@ void ixgbevf_free_rx_resources(struct ixgbevf_adapter *adapter, > { > struct pci_dev *pdev = adapter->pdev; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry rx_ring=%p\n", __FUNCTION__, (void *)rx_ring); >+ > ixgbevf_clean_rx_ring(adapter, rx_ring); > > vfree(rx_ring->rx_buffer_info); >@@ -2622,6 +3192,9 @@ void ixgbevf_free_rx_resources(struct ixgbevf_adapter *adapter, > pci_free_consistent(pdev, rx_ring->size, rx_ring->desc, rx_ring->dma); > > rx_ring->desc = NULL; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > /** >@@ -2634,10 +3207,16 @@ static void ixgbevf_free_all_rx_resources(struct ixgbevf_adapter *adapter) > { > int i; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > for (i = 0; i < adapter->num_rx_queues; i++) > if (adapter->rx_ring[i].desc) > ixgbevf_free_rx_resources(adapter, > &adapter->rx_ring[i]); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > /** >@@ -2658,11 +3237,20 @@ static int ixgbevf_open(struct net_device *netdev) > struct ixgbe_hw *hw = &adapter->hw; > int err; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > /* disallow open during test */ >- if (test_bit(__IXGBEVF_TESTING, &adapter->state)) >+ if (test_bit(__IXGBEVF_TESTING, &adapter->state)) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (testing, EBUSY)\n", __FUNCTION__); > return -EBUSY; >+ } > > if (hw->adapter_stopped) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() adapter stopped, resetting\n", __FUNCTION__); >+ > ixgbevf_reset(adapter); > /* if adapter is still stopped then PF isn't up and > * the vf can't start. */ >@@ -2672,17 +3260,27 @@ static int ixgbevf_open(struct net_device *netdev) > " Driver isn't up yet\n"); > goto err_setup_reset; > } >+ else { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() reset worked\n", __FUNCTION__); >+ } > } > > /* allocate transmit descriptors */ > err = ixgbevf_setup_all_tx_resources(adapter); >- if (err) >+ if (err) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() failed to alloc xmit descs\n", __FUNCTION__); > goto err_setup_tx; >+ } > > /* allocate receive descriptors */ > err = ixgbevf_setup_all_rx_resources(adapter); >- if (err) >+ if (err) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() failed to alloc recv descs\n", __FUNCTION__); > goto err_setup_rx; >+ } > > ixgbevf_configure(adapter); > >@@ -2694,17 +3292,25 @@ static int ixgbevf_open(struct net_device *netdev) > ixgbevf_map_rings_to_vectors(adapter); > > err = ixgbevf_up_complete(adapter); >- if (err) >+ if (err) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() failed to complete UP\n", __FUNCTION__); > goto err_up; >+ } > > /* clear any pending interrupts, may auto mask */ > IXGBE_READ_REG(hw, IXGBE_VTEICR); > err = ixgbevf_request_irq(adapter); >- if (err) >+ if (err) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() failed to request irqs\n", __FUNCTION__); > goto err_req_irq; >+ } > > ixgbevf_irq_enable(adapter, true, true); > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (OK)\n", __FUNCTION__); > return 0; > > err_req_irq: >@@ -2719,6 +3325,8 @@ err_setup_tx: > > err_setup_reset: > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (%d)\n", __FUNCTION__, err); > return err; > } > >@@ -2737,15 +3345,21 @@ static int ixgbevf_close(struct net_device *netdev) > { > struct ixgbevf_adapter *adapter = netdev_priv(netdev); > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > ixgbevf_down(adapter); > ixgbevf_free_irq(adapter); > > ixgbevf_free_all_tx_resources(adapter); > ixgbevf_free_all_rx_resources(adapter); > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (OK)\n", __FUNCTION__); > return 0; > } > >+/* not instrumented -- possibly called per-packet */ > static int ixgbevf_tso(struct ixgbevf_adapter *adapter, > struct ixgbevf_ring *tx_ring, > struct sk_buff *skb, u32 tx_flags, u8 *hdr_len) >@@ -2834,6 +3448,7 @@ static int ixgbevf_tso(struct ixgbevf_adapter *adapter, > return false; > } > >+/* not instrumented -- possibly called per-packet */ > static bool ixgbevf_tx_csum(struct ixgbevf_adapter *adapter, > struct ixgbevf_ring *tx_ring, > struct sk_buff *skb, u32 tx_flags) >@@ -2908,6 +3523,7 @@ static bool ixgbevf_tx_csum(struct ixgbevf_adapter *adapter, > return false; > } > >+/* not instrumented -- possibly called per-packet */ > static int ixgbevf_tx_map(struct ixgbevf_adapter *adapter, > struct ixgbevf_ring *tx_ring, > struct sk_buff *skb, u32 tx_flags, >@@ -3015,6 +3631,7 @@ dma_error: > return count; > } > >+/* not instrumented -- possibly called per-packet */ > static void ixgbevf_tx_queue(struct ixgbevf_adapter *adapter, > struct ixgbevf_ring *tx_ring, int tx_flags, > int count, u32 paylen, u8 hdr_len) >@@ -3078,6 +3695,7 @@ static void ixgbevf_tx_queue(struct ixgbevf_adapter *adapter, > writel(i, adapter->hw.hw_addr + tx_ring->tail); > } > >+/* not instrumented -- possibly called per-packet */ > static int __ixgbevf_maybe_stop_tx(struct net_device *netdev, > struct ixgbevf_ring *tx_ring, int size) > { >@@ -3100,6 +3718,7 @@ static int __ixgbevf_maybe_stop_tx(struct net_device *netdev, > return 0; > } > >+/* not instrumented -- possibly called per-packet */ > static int ixgbevf_maybe_stop_tx(struct net_device *netdev, > struct ixgbevf_ring *tx_ring, int size) > { >@@ -3108,6 +3727,7 @@ static int ixgbevf_maybe_stop_tx(struct net_device *netdev, > return __ixgbevf_maybe_stop_tx(netdev, tx_ring, size); > } > >+/* not instrumented -- possibly called per-packet */ > static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev) > { > struct ixgbevf_adapter *adapter = netdev_priv(netdev); >@@ -3181,6 +3801,9 @@ static struct net_device_stats *ixgbevf_get_stats(struct net_device *netdev) > { > struct ixgbevf_adapter *adapter = netdev_priv(netdev); > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry / exit\n", >+ __FUNCTION__); >+ > /* only return the current stats */ > return &adapter->net_stats; > } >@@ -3198,15 +3821,33 @@ static int ixgbevf_set_mac(struct net_device *netdev, void *p) > struct ixgbe_hw *hw = &adapter->hw; > struct sockaddr *addr = p; > >- if (!is_valid_ether_addr(addr->sa_data)) >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry " >+ "mac=%02X:%02X:%02X:%02X:%02X:%02X\n", __FUNCTION__, >+ (u8)addr->sa_data[0], (u8)addr->sa_data[1], >+ (u8)addr->sa_data[2], (u8)addr->sa_data[3], >+ (u8)addr->sa_data[4], (u8)addr->sa_data[5]); >+ >+ if (!is_valid_ether_addr(addr->sa_data)) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (EADDRNOTAVAIL)\n", __FUNCTION__); > return -EADDRNOTAVAIL; >+ } > > memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); > memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len); > >- if (hw->mac.ops.set_rar) >+ if (hw->mac.ops.set_rar) { >+ s32 ret; >+ >+ ret = > hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0); > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() set_rar=%d\n", __FUNCTION__, ret); >+ } >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (OK)\n", __FUNCTION__); > return 0; > } > >@@ -3228,9 +3869,17 @@ static int ixgbevf_change_mtu(struct net_device *netdev, int new_mtu) > if (adapter->hw.mac.type == ixgbe_mac_X540_vf) > max_possible_frame = IXGBE_MAX_JUMBO_FRAME_SIZE; > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() entry old_mtu=%u " >+ "new_mtu=%d max_frame=%d max_possible_frame=%d\n", >+ __FUNCTION__, netdev->mtu, new_mtu, max_frame, >+ max_possible_frame); >+ > /* MTU < 68 is an error and causes problems on some kernels */ >- if ((new_mtu < 68) || (max_frame > max_possible_frame)) >+ if ((new_mtu < 68) || (max_frame > max_possible_frame)) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (EINVAL)\n", __FUNCTION__); > return -EINVAL; >+ } > > hw_dbg(&adapter->hw, "changing MTU from %d to %d\n", > netdev->mtu, new_mtu); >@@ -3241,9 +3890,14 @@ static int ixgbevf_change_mtu(struct net_device *netdev, int new_mtu) > msg[1] = max_frame; > hw->mbx.ops.write_posted(hw, msg, 2); > >- if (netif_running(netdev)) >+ if (netif_running(netdev)) { >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, "%s() netif " >+ "running, reinit adapter\n", __FUNCTION__); > ixgbevf_reinit_locked(adapter); >+ } > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit (OK)\n", __FUNCTION__); > return 0; > } > >@@ -3252,6 +3906,9 @@ static void ixgbevf_shutdown(struct pci_dev *pdev) > struct net_device *netdev = pci_get_drvdata(pdev); > struct ixgbevf_adapter *adapter = netdev_priv(netdev); > >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); >+ > netif_device_detach(netdev); > > if (netif_running(netdev)) { >@@ -3266,10 +3923,17 @@ static void ixgbevf_shutdown(struct pci_dev *pdev) > #endif > > pci_disable_device(pdev); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > static void ixgbevf_assign_netdev_ops(struct net_device *dev) > { >+ struct ixgbevf_adapter *adapter = netdev_priv(dev); >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() entry\n", __FUNCTION__); > > dev->open = ixgbevf_open; > dev->stop = ixgbevf_close; >@@ -3287,6 +3951,9 @@ static void ixgbevf_assign_netdev_ops(struct net_device *dev) > > ixgbevf_set_ethtool_ops(dev); > dev->watchdog_timeo = 5 * HZ; >+ >+ dev_printk(KERN_DEBUG, &adapter->pdev->dev, >+ "%s() exit\n", __FUNCTION__); > } > > /** >@@ -3310,15 +3977,23 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, > static int cards_found; > int err, pci_using_dac; > >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() entry\n", __FUNCTION__); >+ > err = pci_enable_device(pdev); >- if (err) >+ if (err) { >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() exit " >+ "pci_enable_device=%d\n", __FUNCTION__, err); > return err; >+ } > > if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) && > !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { > pci_using_dac = 1; > } else { > err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() " >+ "pci_set_dma_mask=%d\n", __FUNCTION__, err); >+ > if (err) { > err = pci_set_consistent_dma_mask(pdev, > DMA_BIT_MASK(32)); >@@ -3330,6 +4005,8 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, > } > pci_using_dac = 0; > } >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() " >+ "pci_using_dac=%d\n", __FUNCTION__, pci_using_dac); > > err = pci_request_regions(pdev, ixgbevf_driver_name); > if (err) { >@@ -3346,6 +4023,8 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, > netdev = alloc_etherdev(sizeof(struct ixgbevf_adapter)); > #endif > if (!netdev) { >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() alloc_etherdev() " >+ "failed\n", __FUNCTION__); > err = -ENOMEM; > goto err_alloc_etherdev; > } >@@ -3370,6 +4049,8 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, > hw->hw_addr = ioremap(pci_resource_start(pdev, 0), > pci_resource_len(pdev, 0)); > if (!hw->hw_addr) { >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() ioremap() failed\n", >+ __FUNCTION__); > err = -EIO; > goto err_ioremap; > } >@@ -3391,6 +4072,8 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, > > /* setup the private structure */ > err = ixgbevf_sw_init(adapter); >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() ixgbevf_sw_init=%d " >+ "(ignored)\n", __FUNCTION__, err); > > netdev->features = NETIF_F_SG | > NETIF_F_IP_CSUM | >@@ -3440,8 +4123,15 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, > strcpy(netdev->name, "eth%d"); > > err = register_netdev(netdev); >- if (err) >+ if (err) { >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() register_netdev=%d\n", >+ __FUNCTION__, err); > goto err_register; >+ } >+ else { >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() registered with " >+ "name=%s\n", __FUNCTION__, netdev->name); >+ } > > adapter->netdev_registered = true; > >@@ -3464,6 +4154,13 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, > > hw_dbg(hw, "Intel(R) 82599 Virtual Function\n"); > cards_found++; >+ >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() exit (OK) hw_mac_type=%d " >+ "mac=%02X:%02X:%02X:%02X:%02X:%02X cards_found=%d\n", >+ __FUNCTION__, hw->mac.type, netdev->dev_addr[0], >+ netdev->dev_addr[1], netdev->dev_addr[2], >+ netdev->dev_addr[3], netdev->dev_addr[4], >+ netdev->dev_addr[5], cards_found); > return 0; > > err_register: >@@ -3477,6 +4174,9 @@ err_alloc_etherdev: > err_pci_reg: > err_dma: > pci_disable_device(pdev); >+ >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() exit (%d)\n", >+ __FUNCTION__, err); > return err; > } > >@@ -3494,6 +4194,8 @@ static void __devexit ixgbevf_remove(struct pci_dev *pdev) > struct net_device *netdev = pci_get_drvdata(pdev); > struct ixgbevf_adapter *adapter = netdev_priv(netdev); > >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() entry\n", __FUNCTION__); >+ > set_bit(__IXGBEVF_DOWN, &adapter->state); > > del_timer_sync(&adapter->watchdog_timer); >@@ -3520,6 +4222,8 @@ static void __devexit ixgbevf_remove(struct pci_dev *pdev) > free_netdev(netdev); > > pci_disable_device(pdev); >+ >+ dev_printk(KERN_DEBUG, &pdev->dev, "%s() exit\n", __FUNCTION__); > } > > static struct pci_driver ixgbevf_driver = {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 862862
:
624960
|
629093
|
653948
| 653952 |
663166
|
663204
|
663206
|
672173
|
672220
|
674634
|
674635
|
674871
|
674973
|
675360
|
675802