summaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb/ixgb_main.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | [NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETEPatrick McHardy2006-09-221-1/+1
|/ | | | | | | | | | | Replace CHECKSUM_HW by CHECKSUM_PARTIAL (for outgoing packets, whose checksum still needs to be completed) and CHECKSUM_COMPLETE (for incoming packets, device supplied full checksum). Patch originally from Herbert Xu, updated by myself for 2.6.18-rc3. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] ixgb: fix tx unit hang - properly calculate desciptor countAuke Kok2006-07-121-2/+2
| | | | | | | | | | | | There were some tso bugs that only showed up with heavy load and 16kB pages that this patch fixes by making the driver's internal use count of descriptors match the count that it was estimating it needed using the DESC_NEEDED macro. This bug caused NETDEV_WATCHDOG resets aka tx timeouts. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [NET] gso: Add skb_is_gsoHerbert Xu2006-07-081-1/+1
| | | | | | | | | | This patch adds the wrapper function skb_is_gso which can be used instead of directly testing skb_shinfo(skb)->gso_size. This makes things a little nicer and allows us to change the primary key for indicating whether an skb is GSO (if we ever want to do that). Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] irq-flags: drivers/net: Use the new IRQF_ constantsThomas Gleixner2006-07-021-1/+1
| | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [NET]: Merge TSO/UFO fields in sk_buffHerbert Xu2006-06-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Having separate fields in sk_buff for TSO/UFO (tso_size/ufo_size) is not going to scale if we add any more segmentation methods (e.g., DCCP). So let's merge them. They were used to tell the protocol of a packet. This function has been subsumed by the new gso_type field. This is essentially a set of netdev feature bits (shifted by 16 bits) that are required to process a specific skb. As such it's easy to tell whether a given device can process a GSO skb: you just have to and the gso_type field and the netdev's features field. I've made gso_type a conjunction. The idea is that you have a base type (e.g., SKB_GSO_TCPV4) that can be modified further to support new features. For example, if we add a hardware TSO type that supports ECN, they would declare NETIF_F_TSO | NETIF_F_TSO_ECN. All TSO packets with CWR set would have a gso_type of SKB_GSO_TCPV4 | SKB_GSO_TCPV4_ECN while all other TSO packets would be SKB_GSO_TCPV4. This means that only the CWR packets need to be emulated in software. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgb: update version, datesAuke Kok2006-05-261-3/+3
| | | | | | | | increase the year dates to 2006 and bump the version to 1.0.109-k2 Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: remove changelogAuke Kok2006-05-261-16/+0
| | | | | | | | | same as e1000 - remove the changelog from the driver code itself. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: remove inlines, allow compiler to chooseAuke Kok2006-05-261-8/+8
| | | | | | | | | deinline a few large functions as to allow the compiler to pick. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: remove lock access in the fast pathAuke Kok2006-05-261-6/+6
| | | | | | | | | | This mimics a change made in the e1000 driver that imitates a slick tg3 way of avoiding grabbing the lock around restarting the tx queue. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: allocate only buffersize neededAuke Kok2006-05-261-28/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to help correct window size growth, use the MFS register to limit the packet sizes received and allocate only the buffer size necessary Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> index 0905a82..84a8064 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -574,9 +574,8 @@ ixgb_sw_init(struct ixgb_adapter *adapte hw->subsystem_vendor_id = pdev->subsystem_vendor; hw->subsystem_id = pdev->subsystem_device; - adapter->rx_buffer_len = IXGB_RXBUFFER_2048; - hw->max_frame_size = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; + adapter->rx_buffer_len = hw->max_frame_size; if((hw->device_id == IXGB_DEVICE_ID_82597EX) || (hw->device_id == IXGB_DEVICE_ID_82597EX_CX4) @@ -820,21 +819,14 @@ ixgb_setup_rctl(struct ixgb_adapter *ada rctl |= IXGB_RCTL_SECRC; - switch (adapter->rx_buffer_len) { - case IXGB_RXBUFFER_2048: - default: + if (adapter->rx_buffer_len <= IXGB_RXBUFFER_2048) rctl |= IXGB_RCTL_BSIZE_2048; - break; - case IXGB_RXBUFFER_4096: + else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_4096) rctl |= IXGB_RCTL_BSIZE_4096; - break; - case IXGB_RXBUFFER_8192: + else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_8192) rctl |= IXGB_RCTL_BSIZE_8192; - break; - case IXGB_RXBUFFER_16384: + else if (adapter->rx_buffer_len <= IXGB_RXBUFFER_16384) rctl |= IXGB_RCTL_BSIZE_16384; - break; - } IXGB_WRITE_REG(&adapter->hw, RCTL, rctl); } @@ -1551,25 +1543,12 @@ ixgb_change_mtu(struct net_device *netde DPRINTK(PROBE, ERR, "Invalid MTU setting %d\n", new_mtu); return -EINVAL; } - - if((max_frame <= IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) - || (max_frame <= IXGB_RXBUFFER_2048)) { - adapter->rx_buffer_len = IXGB_RXBUFFER_2048; - - } else if(max_frame <= IXGB_RXBUFFER_4096) { - adapter->rx_buffer_len = IXGB_RXBUFFER_4096; - } else if(max_frame <= IXGB_RXBUFFER_8192) { - adapter->rx_buffer_len = IXGB_RXBUFFER_8192; + adapter->rx_buffer_len = max_frame; - } else { - adapter->rx_buffer_len = IXGB_RXBUFFER_16384; - } - netdev->mtu = new_mtu; - - if(old_max_frame != max_frame && netif_running(netdev)) { + if ((old_max_frame != max_frame) && netif_running(netdev)) { ixgb_down(adapter, TRUE); ixgb_up(adapter); }
* ixgb: revert an unwanted fix regarding tso/descriptorsAuke Kok2006-05-261-14/+1
| | | | | | | | | | | | | There seemed to be another bug introduced as well as a performance hit with the addtion of the sentinel descriptor workaround. Removal of this workaround appears to prevent the hang. We'll take a risk and remove it, as we had never seen the originally reported bug under linux. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: fix interface losing macaddr on ifdn/upAuke Kok2006-05-261-0/+1
| | | | | | | | | user contributed fix for LAA across down/up, from tonychung00@users.sf.net. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: fix smp polling race conditionAuke Kok2006-05-261-4/+5
| | | | | | | | | | | | Moved interrupt masking to before requesting the interrupt from the OS. Moved interrupt enable to after netif_poll_enable. This fixes a racy BUG() where polling would be running on another CPU at the same time that netif_poll_enable would run. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: increment version to 1.0.104-k4Auke Kok2006-05-251-1/+1
| | | | | | | | Increment the driver version to 1.0.104-k4 Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: use rx copybreak/skb recycleAuke Kok2006-05-251-0/+20
| | | | | | | | | o use rx copybreak/skb recycle Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: add performance enhancements to the buffer_info structAuke Kok2006-05-251-30/+44
| | | | | | | | | | o modify the rx refill logic and tail bump o add counter for failures Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: increment version to 1.0.104-k2Auke Kok2006-05-231-1/+1
| | | | | | | | | Increment the driver version to 1.0.104-k2 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: add tx timeout counterAuke Kok2006-05-231-4/+25
| | | | | | | | | | This adds a TX timeout counter to the ethtool stats, a tx timeout debug message, and sets the timer to 5 seconds. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: use DPRINTK and msglvl, and ethtool to control itAuke Kok2006-05-231-14/+32
| | | | | | | | | | Use DPRINTK and msglvl, and ethtool to control it. Add proper names to netdev structs and mappings. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: add copper 10gig driver idAuke Kok2006-05-231-2/+5
| | | | | | | | | Add support for Copper 10GbE device ID 109E Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: add NETIF_F_LLTX analogous to e1000Auke Kok2006-05-231-2/+29
| | | | | | | | | add NETIF_F_LLTX code like e1000 has Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* ixgb: fix rare early tso completionAuke Kok2006-05-231-2/+15
| | | | | | | | | | | Fix rare early completion when using TSO. This essentially is the e1000 fix, with code that was mostly already written. Another skb frag was also needed. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
* [PATCH] Use pci_set_consistent_dma_mask in ixgb driverAndreas Schwab2006-04-121-4/+9
| | | | | | | | | | | The ixgb driver is using pci_alloc_consistent, thus is should also use pci_set_consistent_dma_mask. This allows the driver to work on SGI systems. In case of an error during probing it should also disable the device again. Signed-off-by: Andreas Schwab <schwab@suse.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [PATCH] drivers/net/ixgb/: make some code staticAdrian Bunk2005-11-051-1/+1
| | | | | | | This patch makes some needlessly global code static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge /spare/repo/linux-2.6/Jeff Garzik2005-09-211-2/+0
|\
| * [PATCH] ixgb: correct rx_dropped countingJohn W. Linville2005-09-141-2/+0
| | | | | | | | | | | | | | Do not count frames dropped by the hardware as part of rx_dropped. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* | [PATCH] ixgb: support ETHTOOL_GPERMADDRJohn W. Linville2005-09-141-1/+2
|/ | | | | | | Add support for ETHTOOL_GPERMADDR to ixgb. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] ixgb: Driver version, white space, commentsMalli Chilakala2005-08-111-3/+7
| | | | | | | | | Driver version, white space, comments & added Module_version Patch from linville Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] ixgb: Fix Broadcast/Multicast packets received statisticsMalli Chilakala2005-08-111-1/+2
| | | | | | | | | Fix Broadcast/Multicast packets received statistics Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] ixgb: Use netdev_priv() instead of netdev->privMalli Chilakala2005-08-111-16/+16
| | | | | | | | | Use netdev_priv() instead of netdev->priv Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* [PATCH] ixgb: Set RXDCTL:PTHRESH/HTHRESH to zeroMalli Chilakala2005-08-111-3/+5
| | | | | | | | | Set RXDCTL:PTHRESH/HTHRESH to zero Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* Merge upstream (approx. 2.6.12-git8) into 'janitor' branch of netdev-2.6.Jeff Garzik2005-06-261-100/+54
|\
| * [PATCH] ixgb: Driver version, white space, comments, device idMalli Chilakala2005-05-121-2/+4
| | | | | | | | | | | | | | | | | | | | Driver version, white space, comments, device id & other Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c
| * [PATCH] ixgb: Code optimizationMalli Chilakala2005-05-121-16/+12
| | | | | | | | | | | | | | | | | | | | Code optimization Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c
| * [PATCH] ixgb: Remove hook for suspend, no power managementMalli Chilakala2005-05-121-71/+4
| | | | | | | | | | | | | | | | | | | | Remove hook for suspend. No power management in 10GbE Controllers Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c
| * [PATCH] ixgb: Reset status in the RxMalli Chilakala2005-05-121-2/+6
| | | | | | | | | | | | | | | | | | | | | | Reset status in the Rx descriptor prior to handing it to the controller. Leave three Rx descriptors unused Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c
| * [PATCH] ixgb: Mask RXO interruptMalli Chilakala2005-05-121-2/+2
| | | | | | | | | | | | | | | | | | | | Disable RXO interrupt to decrease recovery time when system is overloaded with data Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c
| * [PATCH] ixgb: Do not set the RS bit on context descriptorsMalli Chilakala2005-05-121-3/+2
| | | | | | | | | | | | | | | | | | | | Don't set the RS bit on context descriptors, causes un-necessary bus activity Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c
| * [PATCH] ixgb: Fix multi-cast packet count in statisticsMalli Chilakala2005-05-121-4/+23
| | | | | | | | | | | | | | | | | | | | Fix multi-cast packet count in statistics Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c
* | [PATCH] ixgb: Add MODULE_VERSIONJohn W. Linville2005-05-121-1/+3
|/ | | | | | | Add MODULE_VERSION entry. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+2166
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!