diff options
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-common.h | 11 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-dcb.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-main.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-ptp.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe.h | 2 |
11 files changed, 2 insertions, 26 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-common.h b/drivers/net/ethernet/amd/xgbe/xgbe-common.h index cc25a3a9e7cf..caade30820d5 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-common.h +++ b/drivers/net/ethernet/amd/xgbe/xgbe-common.h | |||
@@ -271,7 +271,6 @@ | |||
271 | #define DMA_PBL_X8_DISABLE 0x00 | 271 | #define DMA_PBL_X8_DISABLE 0x00 |
272 | #define DMA_PBL_X8_ENABLE 0x01 | 272 | #define DMA_PBL_X8_ENABLE 0x01 |
273 | 273 | ||
274 | |||
275 | /* MAC register offsets */ | 274 | /* MAC register offsets */ |
276 | #define MAC_TCR 0x0000 | 275 | #define MAC_TCR 0x0000 |
277 | #define MAC_RCR 0x0004 | 276 | #define MAC_RCR 0x0004 |
@@ -792,7 +791,6 @@ | |||
792 | #define MTL_Q_DISABLED 0x00 | 791 | #define MTL_Q_DISABLED 0x00 |
793 | #define MTL_Q_ENABLED 0x02 | 792 | #define MTL_Q_ENABLED 0x02 |
794 | 793 | ||
795 | |||
796 | /* MTL traffic class register offsets | 794 | /* MTL traffic class register offsets |
797 | * Multiple traffic classes can be active. The first class has registers | 795 | * Multiple traffic classes can be active. The first class has registers |
798 | * that begin at 0x1100. Each subsequent queue has registers that | 796 | * that begin at 0x1100. Each subsequent queue has registers that |
@@ -815,7 +813,6 @@ | |||
815 | #define MTL_TSA_SP 0x00 | 813 | #define MTL_TSA_SP 0x00 |
816 | #define MTL_TSA_ETS 0x02 | 814 | #define MTL_TSA_ETS 0x02 |
817 | 815 | ||
818 | |||
819 | /* PCS MMD select register offset | 816 | /* PCS MMD select register offset |
820 | * The MMD select register is used for accessing PCS registers | 817 | * The MMD select register is used for accessing PCS registers |
821 | * when the underlying APB3 interface is using indirect addressing. | 818 | * when the underlying APB3 interface is using indirect addressing. |
@@ -825,7 +822,6 @@ | |||
825 | */ | 822 | */ |
826 | #define PCS_MMD_SELECT 0xff | 823 | #define PCS_MMD_SELECT 0xff |
827 | 824 | ||
828 | |||
829 | /* Descriptor/Packet entry bit positions and sizes */ | 825 | /* Descriptor/Packet entry bit positions and sizes */ |
830 | #define RX_PACKET_ERRORS_CRC_INDEX 2 | 826 | #define RX_PACKET_ERRORS_CRC_INDEX 2 |
831 | #define RX_PACKET_ERRORS_CRC_WIDTH 1 | 827 | #define RX_PACKET_ERRORS_CRC_WIDTH 1 |
@@ -929,7 +925,6 @@ | |||
929 | #define MDIO_AN_COMP_STAT 0x0030 | 925 | #define MDIO_AN_COMP_STAT 0x0030 |
930 | #endif | 926 | #endif |
931 | 927 | ||
932 | |||
933 | /* Bit setting and getting macros | 928 | /* Bit setting and getting macros |
934 | * The get macro will extract the current bit field value from within | 929 | * The get macro will extract the current bit field value from within |
935 | * the variable | 930 | * the variable |
@@ -957,7 +952,6 @@ do { \ | |||
957 | ((0x1 << (_width)) - 1)) << (_index))); \ | 952 | ((0x1 << (_width)) - 1)) << (_index))); \ |
958 | } while (0) | 953 | } while (0) |
959 | 954 | ||
960 | |||
961 | /* Bit setting and getting macros based on register fields | 955 | /* Bit setting and getting macros based on register fields |
962 | * The get macro uses the bit field definitions formed using the input | 956 | * The get macro uses the bit field definitions formed using the input |
963 | * names to extract the current bit field value from within the | 957 | * names to extract the current bit field value from within the |
@@ -986,7 +980,6 @@ do { \ | |||
986 | _prefix##_##_field##_INDEX, \ | 980 | _prefix##_##_field##_INDEX, \ |
987 | _prefix##_##_field##_WIDTH, (_val)) | 981 | _prefix##_##_field##_WIDTH, (_val)) |
988 | 982 | ||
989 | |||
990 | /* Macros for reading or writing registers | 983 | /* Macros for reading or writing registers |
991 | * The ioread macros will get bit fields or full values using the | 984 | * The ioread macros will get bit fields or full values using the |
992 | * register definitions formed using the input names | 985 | * register definitions formed using the input names |
@@ -1014,7 +1007,6 @@ do { \ | |||
1014 | XGMAC_IOWRITE((_pdata), _reg, reg_val); \ | 1007 | XGMAC_IOWRITE((_pdata), _reg, reg_val); \ |
1015 | } while (0) | 1008 | } while (0) |
1016 | 1009 | ||
1017 | |||
1018 | /* Macros for reading or writing MTL queue or traffic class registers | 1010 | /* Macros for reading or writing MTL queue or traffic class registers |
1019 | * Similar to the standard read and write macros except that the | 1011 | * Similar to the standard read and write macros except that the |
1020 | * base register value is calculated by the queue or traffic class number | 1012 | * base register value is calculated by the queue or traffic class number |
@@ -1041,7 +1033,6 @@ do { \ | |||
1041 | XGMAC_MTL_IOWRITE((_pdata), (_n), _reg, reg_val); \ | 1033 | XGMAC_MTL_IOWRITE((_pdata), (_n), _reg, reg_val); \ |
1042 | } while (0) | 1034 | } while (0) |
1043 | 1035 | ||
1044 | |||
1045 | /* Macros for reading or writing DMA channel registers | 1036 | /* Macros for reading or writing DMA channel registers |
1046 | * Similar to the standard read and write macros except that the | 1037 | * Similar to the standard read and write macros except that the |
1047 | * base register value is obtained from the ring | 1038 | * base register value is obtained from the ring |
@@ -1066,7 +1057,6 @@ do { \ | |||
1066 | XGMAC_DMA_IOWRITE((_channel), _reg, reg_val); \ | 1057 | XGMAC_DMA_IOWRITE((_channel), _reg, reg_val); \ |
1067 | } while (0) | 1058 | } while (0) |
1068 | 1059 | ||
1069 | |||
1070 | /* Macros for building, reading or writing register values or bits | 1060 | /* Macros for building, reading or writing register values or bits |
1071 | * within the register values of XPCS registers. | 1061 | * within the register values of XPCS registers. |
1072 | */ | 1062 | */ |
@@ -1076,7 +1066,6 @@ do { \ | |||
1076 | #define XPCS_IOREAD(_pdata, _off) \ | 1066 | #define XPCS_IOREAD(_pdata, _off) \ |
1077 | ioread32((_pdata)->xpcs_regs + (_off)) | 1067 | ioread32((_pdata)->xpcs_regs + (_off)) |
1078 | 1068 | ||
1079 | |||
1080 | /* Macros for building, reading or writing register values or bits | 1069 | /* Macros for building, reading or writing register values or bits |
1081 | * using MDIO. Different from above because of the use of standardized | 1070 | * using MDIO. Different from above because of the use of standardized |
1082 | * Linux include values. No shifting is performed with the bit | 1071 | * Linux include values. No shifting is performed with the bit |
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c b/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c index 7d6a49b24321..8a50b01c2686 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-dcb.c | |||
@@ -120,7 +120,6 @@ | |||
120 | #include "xgbe.h" | 120 | #include "xgbe.h" |
121 | #include "xgbe-common.h" | 121 | #include "xgbe-common.h" |
122 | 122 | ||
123 | |||
124 | static int xgbe_dcb_ieee_getets(struct net_device *netdev, | 123 | static int xgbe_dcb_ieee_getets(struct net_device *netdev, |
125 | struct ieee_ets *ets) | 124 | struct ieee_ets *ets) |
126 | { | 125 | { |
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c b/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c index 346592dca33c..978f9ec961ae 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c | |||
@@ -121,7 +121,6 @@ | |||
121 | #include "xgbe.h" | 121 | #include "xgbe.h" |
122 | #include "xgbe-common.h" | 122 | #include "xgbe-common.h" |
123 | 123 | ||
124 | |||
125 | static ssize_t xgbe_common_read(char __user *buffer, size_t count, | 124 | static ssize_t xgbe_common_read(char __user *buffer, size_t count, |
126 | loff_t *ppos, unsigned int value) | 125 | loff_t *ppos, unsigned int value) |
127 | { | 126 | { |
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c index 1c5d62e8dab6..6fc5da01437d 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c | |||
@@ -117,7 +117,6 @@ | |||
117 | #include "xgbe.h" | 117 | #include "xgbe.h" |
118 | #include "xgbe-common.h" | 118 | #include "xgbe-common.h" |
119 | 119 | ||
120 | |||
121 | static void xgbe_unmap_skb(struct xgbe_prv_data *, struct xgbe_ring_data *); | 120 | static void xgbe_unmap_skb(struct xgbe_prv_data *, struct xgbe_ring_data *); |
122 | 121 | ||
123 | static void xgbe_free_ring(struct xgbe_prv_data *pdata, | 122 | static void xgbe_free_ring(struct xgbe_prv_data *pdata, |
@@ -524,11 +523,8 @@ static void xgbe_realloc_skb(struct xgbe_channel *channel) | |||
524 | 523 | ||
525 | /* Allocate skb & assign to each rdesc */ | 524 | /* Allocate skb & assign to each rdesc */ |
526 | skb = dev_alloc_skb(pdata->rx_buf_size); | 525 | skb = dev_alloc_skb(pdata->rx_buf_size); |
527 | if (skb == NULL) { | 526 | if (skb == NULL) |
528 | netdev_alert(pdata->netdev, | ||
529 | "failed to allocate skb\n"); | ||
530 | break; | 527 | break; |
531 | } | ||
532 | skb_dma = dma_map_single(pdata->dev, skb->data, | 528 | skb_dma = dma_map_single(pdata->dev, skb->data, |
533 | pdata->rx_buf_size, DMA_FROM_DEVICE); | 529 | pdata->rx_buf_size, DMA_FROM_DEVICE); |
534 | if (dma_mapping_error(pdata->dev, skb_dma)) { | 530 | if (dma_mapping_error(pdata->dev, skb_dma)) { |
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c index edaca4496264..3be98e505001 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c | |||
@@ -122,7 +122,6 @@ | |||
122 | #include "xgbe.h" | 122 | #include "xgbe.h" |
123 | #include "xgbe-common.h" | 123 | #include "xgbe-common.h" |
124 | 124 | ||
125 | |||
126 | static unsigned int xgbe_usec_to_riwt(struct xgbe_prv_data *pdata, | 125 | static unsigned int xgbe_usec_to_riwt(struct xgbe_prv_data *pdata, |
127 | unsigned int usec) | 126 | unsigned int usec) |
128 | { | 127 | { |
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c index dc84f7193c2d..847da66d1548 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c | |||
@@ -126,7 +126,6 @@ | |||
126 | #include "xgbe.h" | 126 | #include "xgbe.h" |
127 | #include "xgbe-common.h" | 127 | #include "xgbe-common.h" |
128 | 128 | ||
129 | |||
130 | static int xgbe_poll(struct napi_struct *, int); | 129 | static int xgbe_poll(struct napi_struct *, int); |
131 | static void xgbe_set_rx_mode(struct net_device *); | 130 | static void xgbe_set_rx_mode(struct net_device *); |
132 | 131 | ||
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c index a076aca138a1..2289526b6f1c 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | |||
@@ -121,7 +121,6 @@ | |||
121 | #include "xgbe.h" | 121 | #include "xgbe.h" |
122 | #include "xgbe-common.h" | 122 | #include "xgbe-common.h" |
123 | 123 | ||
124 | |||
125 | struct xgbe_stats { | 124 | struct xgbe_stats { |
126 | char stat_string[ETH_GSTRING_LEN]; | 125 | char stat_string[ETH_GSTRING_LEN]; |
127 | int stat_size; | 126 | int stat_size; |
@@ -173,6 +172,7 @@ static const struct xgbe_stats xgbe_gstring_stats[] = { | |||
173 | XGMAC_MMC_STAT("rx_watchdog_errors", rxwatchdogerror), | 172 | XGMAC_MMC_STAT("rx_watchdog_errors", rxwatchdogerror), |
174 | XGMAC_MMC_STAT("rx_pause_frames", rxpauseframes), | 173 | XGMAC_MMC_STAT("rx_pause_frames", rxpauseframes), |
175 | }; | 174 | }; |
175 | |||
176 | #define XGBE_STATS_COUNT ARRAY_SIZE(xgbe_gstring_stats) | 176 | #define XGBE_STATS_COUNT ARRAY_SIZE(xgbe_gstring_stats) |
177 | 177 | ||
178 | static void xgbe_get_strings(struct net_device *netdev, u32 stringset, u8 *data) | 178 | static void xgbe_get_strings(struct net_device *netdev, u32 stringset, u8 *data) |
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c index 8aa6a9353f7b..984161d4ffc9 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c | |||
@@ -128,7 +128,6 @@ | |||
128 | #include "xgbe.h" | 128 | #include "xgbe.h" |
129 | #include "xgbe-common.h" | 129 | #include "xgbe-common.h" |
130 | 130 | ||
131 | |||
132 | MODULE_AUTHOR("Tom Lendacky <thomas.lendacky@amd.com>"); | 131 | MODULE_AUTHOR("Tom Lendacky <thomas.lendacky@amd.com>"); |
133 | MODULE_LICENSE("Dual BSD/GPL"); | 132 | MODULE_LICENSE("Dual BSD/GPL"); |
134 | MODULE_VERSION(XGBE_DRV_VERSION); | 133 | MODULE_VERSION(XGBE_DRV_VERSION); |
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c index 6d2221e023f4..363b210560f3 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | |||
@@ -123,7 +123,6 @@ | |||
123 | #include "xgbe.h" | 123 | #include "xgbe.h" |
124 | #include "xgbe-common.h" | 124 | #include "xgbe-common.h" |
125 | 125 | ||
126 | |||
127 | static int xgbe_mdio_read(struct mii_bus *mii, int prtad, int mmd_reg) | 126 | static int xgbe_mdio_read(struct mii_bus *mii, int prtad, int mmd_reg) |
128 | { | 127 | { |
129 | struct xgbe_prv_data *pdata = mii->priv; | 128 | struct xgbe_prv_data *pdata = mii->priv; |
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c index 37e64cfa5718..a1bf9d1cdae1 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-ptp.c | |||
@@ -122,7 +122,6 @@ | |||
122 | #include "xgbe.h" | 122 | #include "xgbe.h" |
123 | #include "xgbe-common.h" | 123 | #include "xgbe-common.h" |
124 | 124 | ||
125 | |||
126 | static cycle_t xgbe_cc_read(const struct cyclecounter *cc) | 125 | static cycle_t xgbe_cc_read(const struct cyclecounter *cc) |
127 | { | 126 | { |
128 | struct xgbe_prv_data *pdata = container_of(cc, | 127 | struct xgbe_prv_data *pdata = container_of(cc, |
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h index 07bf70a82908..84fe34ce5571 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe.h +++ b/drivers/net/ethernet/amd/xgbe/xgbe.h | |||
@@ -128,7 +128,6 @@ | |||
128 | #include <linux/net_tstamp.h> | 128 | #include <linux/net_tstamp.h> |
129 | #include <net/dcbnl.h> | 129 | #include <net/dcbnl.h> |
130 | 130 | ||
131 | |||
132 | #define XGBE_DRV_NAME "amd-xgbe" | 131 | #define XGBE_DRV_NAME "amd-xgbe" |
133 | #define XGBE_DRV_VERSION "1.0.0-a" | 132 | #define XGBE_DRV_VERSION "1.0.0-a" |
134 | #define XGBE_DRV_DESC "AMD 10 Gigabit Ethernet Driver" | 133 | #define XGBE_DRV_DESC "AMD 10 Gigabit Ethernet Driver" |
@@ -198,7 +197,6 @@ | |||
198 | ((_ring)->rdata + \ | 197 | ((_ring)->rdata + \ |
199 | ((_idx) & ((_ring)->rdesc_count - 1))) | 198 | ((_idx) & ((_ring)->rdesc_count - 1))) |
200 | 199 | ||
201 | |||
202 | /* Default coalescing parameters */ | 200 | /* Default coalescing parameters */ |
203 | #define XGMAC_INIT_DMA_TX_USECS 50 | 201 | #define XGMAC_INIT_DMA_TX_USECS 50 |
204 | #define XGMAC_INIT_DMA_TX_FRAMES 25 | 202 | #define XGMAC_INIT_DMA_TX_FRAMES 25 |