Commit efad0c14 authored by David S. Miller's avatar David S. Miller

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

====================
This series contains updates to ioat (DCA) and ixgbevf.
 ...
Alexander Duyck (1):
  ioat: Do not enable DCA if tag map is invalid

Greg Rose (8):
  ixgbevf: Streamline the rx buffer allocation
  ixgbevf: Fix unnecessary dereference where local var is available.
  ixgbevf: Remove the ring adapter pointer value
  ixgbevf: Remove checking for mac.ops function pointers
  ixgbevf: Remove mailbox spinlock from the reset function
  ixgbevf: White space and comments clean up
  ixgbevf: Remove unneeded and obsolete comment
  ixgbevf: Add checksum statistics counters to rings
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 1ff05fb7 55fb277c
...@@ -604,6 +604,23 @@ static int ioat3_dca_count_dca_slots(void *iobase, u16 dca_offset) ...@@ -604,6 +604,23 @@ static int ioat3_dca_count_dca_slots(void *iobase, u16 dca_offset)
return slots; return slots;
} }
static inline int dca3_tag_map_invalid(u8 *tag_map)
{
/*
* If the tag map is not programmed by the BIOS the default is:
* 0x80 0x80 0x80 0x80 0x80 0x00 0x00 0x00
*
* This an invalid map and will result in only 2 possible tags
* 0x1F and 0x00. 0x00 is an invalid DCA tag so we know that
* this entire definition is invalid.
*/
return ((tag_map[0] == DCA_TAG_MAP_VALID) &&
(tag_map[1] == DCA_TAG_MAP_VALID) &&
(tag_map[2] == DCA_TAG_MAP_VALID) &&
(tag_map[3] == DCA_TAG_MAP_VALID) &&
(tag_map[4] == DCA_TAG_MAP_VALID));
}
struct dca_provider * __devinit struct dca_provider * __devinit
ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase) ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase)
{ {
...@@ -674,6 +691,12 @@ ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase) ...@@ -674,6 +691,12 @@ ioat3_dca_init(struct pci_dev *pdev, void __iomem *iobase)
ioatdca->tag_map[i] = bit & DCA_TAG_MAP_MASK; ioatdca->tag_map[i] = bit & DCA_TAG_MAP_MASK;
} }
if (dca3_tag_map_invalid(ioatdca->tag_map)) {
dev_err(&pdev->dev, "APICID_TAG_MAP set incorrectly by BIOS, disabling DCA\n");
free_dca_provider(dca);
return NULL;
}
err = register_dca_provider(dca, &pdev->dev); err = register_dca_provider(dca, &pdev->dev);
if (err) { if (err) {
free_dca_provider(dca); free_dca_provider(dca);
......
...@@ -58,7 +58,6 @@ struct ixgbevf_ring { ...@@ -58,7 +58,6 @@ struct ixgbevf_ring {
struct ixgbevf_ring *next; struct ixgbevf_ring *next;
struct net_device *netdev; struct net_device *netdev;
struct device *dev; struct device *dev;
struct ixgbevf_adapter *adapter; /* backlink */
void *desc; /* descriptor ring memory */ void *desc; /* descriptor ring memory */
dma_addr_t dma; /* phys. address of descriptor ring */ dma_addr_t dma; /* phys. address of descriptor ring */
unsigned int size; /* length in bytes */ unsigned int size; /* length in bytes */
...@@ -75,6 +74,8 @@ struct ixgbevf_ring { ...@@ -75,6 +74,8 @@ struct ixgbevf_ring {
u64 total_bytes; u64 total_bytes;
u64 total_packets; u64 total_packets;
struct u64_stats_sync syncp; struct u64_stats_sync syncp;
u64 hw_csum_rx_error;
u64 hw_csum_rx_good;
u16 head; u16 head;
u16 tail; u16 tail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment