aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb/ixgb_main.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2008-04-03 13:06:25 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-16 20:41:44 -0400
commit222441a6201f791238320e77eb4ba9528cd3934c (patch)
tree83e6705939e8a8fe556731bb5039356c17b98da6 /drivers/net/ixgb/ixgb_main.c
parent7dd73bbcc99b755436d8dc4b412d23e92a685f4d (diff)
ixgb: convert uint16_t style integers to u16
Conglomerate of 4 separate patches by Joe. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ixgb/ixgb_main.c')
-rw-r--r--drivers/net/ixgb/ixgb_main.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index c68b182af008..cb8daddafa29 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -108,8 +108,8 @@ static void ixgb_tx_timeout(struct net_device *dev);
108static void ixgb_tx_timeout_task(struct work_struct *work); 108static void ixgb_tx_timeout_task(struct work_struct *work);
109static void ixgb_vlan_rx_register(struct net_device *netdev, 109static void ixgb_vlan_rx_register(struct net_device *netdev,
110 struct vlan_group *grp); 110 struct vlan_group *grp);
111static void ixgb_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid); 111static void ixgb_vlan_rx_add_vid(struct net_device *netdev, u16 vid);
112static void ixgb_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); 112static void ixgb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid);
113static void ixgb_restore_vlan(struct ixgb_adapter *adapter); 113static void ixgb_restore_vlan(struct ixgb_adapter *adapter);
114 114
115#ifdef CONFIG_NET_POLL_CONTROLLER 115#ifdef CONFIG_NET_POLL_CONTROLLER
@@ -271,7 +271,7 @@ ixgb_up(struct ixgb_adapter *adapter)
271 271
272 if(hw->max_frame_size > 272 if(hw->max_frame_size >
273 IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) { 273 IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) {
274 uint32_t ctrl0 = IXGB_READ_REG(hw, CTRL0); 274 u32 ctrl0 = IXGB_READ_REG(hw, CTRL0);
275 275
276 if(!(ctrl0 & IXGB_CTRL0_JFE)) { 276 if(!(ctrl0 & IXGB_CTRL0_JFE)) {
277 ctrl0 |= IXGB_CTRL0_JFE; 277 ctrl0 |= IXGB_CTRL0_JFE;
@@ -718,9 +718,9 @@ ixgb_setup_tx_resources(struct ixgb_adapter *adapter)
718static void 718static void
719ixgb_configure_tx(struct ixgb_adapter *adapter) 719ixgb_configure_tx(struct ixgb_adapter *adapter)
720{ 720{
721 uint64_t tdba = adapter->tx_ring.dma; 721 u64 tdba = adapter->tx_ring.dma;
722 uint32_t tdlen = adapter->tx_ring.count * sizeof(struct ixgb_tx_desc); 722 u32 tdlen = adapter->tx_ring.count * sizeof(struct ixgb_tx_desc);
723 uint32_t tctl; 723 u32 tctl;
724 struct ixgb_hw *hw = &adapter->hw; 724 struct ixgb_hw *hw = &adapter->hw;
725 725
726 /* Setup the Base and Length of the Tx Descriptor Ring 726 /* Setup the Base and Length of the Tx Descriptor Ring
@@ -806,7 +806,7 @@ ixgb_setup_rx_resources(struct ixgb_adapter *adapter)
806static void 806static void
807ixgb_setup_rctl(struct ixgb_adapter *adapter) 807ixgb_setup_rctl(struct ixgb_adapter *adapter)
808{ 808{
809 uint32_t rctl; 809 u32 rctl;
810 810
811 rctl = IXGB_READ_REG(&adapter->hw, RCTL); 811 rctl = IXGB_READ_REG(&adapter->hw, RCTL);
812 812
@@ -841,12 +841,12 @@ ixgb_setup_rctl(struct ixgb_adapter *adapter)
841static void 841static void
842ixgb_configure_rx(struct ixgb_adapter *adapter) 842ixgb_configure_rx(struct ixgb_adapter *adapter)
843{ 843{
844 uint64_t rdba = adapter->rx_ring.dma; 844 u64 rdba = adapter->rx_ring.dma;
845 uint32_t rdlen = adapter->rx_ring.count * sizeof(struct ixgb_rx_desc); 845 u32 rdlen = adapter->rx_ring.count * sizeof(struct ixgb_rx_desc);
846 struct ixgb_hw *hw = &adapter->hw; 846 struct ixgb_hw *hw = &adapter->hw;
847 uint32_t rctl; 847 u32 rctl;
848 uint32_t rxcsum; 848 u32 rxcsum;
849 uint32_t rxdctl; 849 u32 rxdctl;
850 850
851 /* make sure receives are disabled while setting up the descriptors */ 851 /* make sure receives are disabled while setting up the descriptors */
852 852
@@ -1079,7 +1079,7 @@ ixgb_set_multi(struct net_device *netdev)
1079 struct ixgb_adapter *adapter = netdev_priv(netdev); 1079 struct ixgb_adapter *adapter = netdev_priv(netdev);
1080 struct ixgb_hw *hw = &adapter->hw; 1080 struct ixgb_hw *hw = &adapter->hw;
1081 struct dev_mc_list *mc_ptr; 1081 struct dev_mc_list *mc_ptr;
1082 uint32_t rctl; 1082 u32 rctl;
1083 int i; 1083 int i;
1084 1084
1085 /* Check for Promiscuous and All Multicast modes */ 1085 /* Check for Promiscuous and All Multicast modes */
@@ -1099,7 +1099,7 @@ ixgb_set_multi(struct net_device *netdev)
1099 rctl |= IXGB_RCTL_MPE; 1099 rctl |= IXGB_RCTL_MPE;
1100 IXGB_WRITE_REG(hw, RCTL, rctl); 1100 IXGB_WRITE_REG(hw, RCTL, rctl);
1101 } else { 1101 } else {
1102 uint8_t mta[IXGB_MAX_NUM_MULTICAST_ADDRESSES * 1102 u8 mta[IXGB_MAX_NUM_MULTICAST_ADDRESSES *
1103 IXGB_ETH_LENGTH_OF_ADDRESS]; 1103 IXGB_ETH_LENGTH_OF_ADDRESS];
1104 1104
1105 IXGB_WRITE_REG(hw, RCTL, rctl); 1105 IXGB_WRITE_REG(hw, RCTL, rctl);
@@ -1183,8 +1183,8 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb)
1183{ 1183{
1184 struct ixgb_context_desc *context_desc; 1184 struct ixgb_context_desc *context_desc;
1185 unsigned int i; 1185 unsigned int i;
1186 uint8_t ipcss, ipcso, tucss, tucso, hdr_len; 1186 u8 ipcss, ipcso, tucss, tucso, hdr_len;
1187 uint16_t ipcse, tucse, mss; 1187 u16 ipcse, tucse, mss;
1188 int err; 1188 int err;
1189 1189
1190 if (likely(skb_is_gso(skb))) { 1190 if (likely(skb_is_gso(skb))) {
@@ -1249,7 +1249,7 @@ ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb)
1249{ 1249{
1250 struct ixgb_context_desc *context_desc; 1250 struct ixgb_context_desc *context_desc;
1251 unsigned int i; 1251 unsigned int i;
1252 uint8_t css, cso; 1252 u8 css, cso;
1253 1253
1254 if(likely(skb->ip_summed == CHECKSUM_PARTIAL)) { 1254 if(likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
1255 struct ixgb_buffer *buffer_info; 1255 struct ixgb_buffer *buffer_info;
@@ -1265,7 +1265,7 @@ ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb)
1265 context_desc->tucso = cso; 1265 context_desc->tucso = cso;
1266 context_desc->tucse = 0; 1266 context_desc->tucse = 0;
1267 /* zero out any previously existing data in one instruction */ 1267 /* zero out any previously existing data in one instruction */
1268 *(uint32_t *)&(context_desc->ipcss) = 0; 1268 *(u32 *)&(context_desc->ipcss) = 0;
1269 context_desc->status = 0; 1269 context_desc->status = 0;
1270 context_desc->hdr_len = 0; 1270 context_desc->hdr_len = 0;
1271 context_desc->mss = 0; 1271 context_desc->mss = 0;
@@ -1372,9 +1372,9 @@ ixgb_tx_queue(struct ixgb_adapter *adapter, int count, int vlan_id,int tx_flags)
1372 struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; 1372 struct ixgb_desc_ring *tx_ring = &adapter->tx_ring;
1373 struct ixgb_tx_desc *tx_desc = NULL; 1373 struct ixgb_tx_desc *tx_desc = NULL;
1374 struct ixgb_buffer *buffer_info; 1374 struct ixgb_buffer *buffer_info;
1375 uint32_t cmd_type_len = adapter->tx_cmd_type; 1375 u32 cmd_type_len = adapter->tx_cmd_type;
1376 uint8_t status = 0; 1376 u8 status = 0;
1377 uint8_t popts = 0; 1377 u8 popts = 0;
1378 unsigned int i; 1378 unsigned int i;
1379 1379
1380 if(tx_flags & IXGB_TX_FLAGS_TSO) { 1380 if(tx_flags & IXGB_TX_FLAGS_TSO) {
@@ -1750,7 +1750,7 @@ ixgb_intr(int irq, void *data)
1750 struct net_device *netdev = data; 1750 struct net_device *netdev = data;
1751 struct ixgb_adapter *adapter = netdev_priv(netdev); 1751 struct ixgb_adapter *adapter = netdev_priv(netdev);
1752 struct ixgb_hw *hw = &adapter->hw; 1752 struct ixgb_hw *hw = &adapter->hw;
1753 uint32_t icr = IXGB_READ_REG(hw, ICR); 1753 u32 icr = IXGB_READ_REG(hw, ICR);
1754#ifndef CONFIG_IXGB_NAPI 1754#ifndef CONFIG_IXGB_NAPI
1755 unsigned int i; 1755 unsigned int i;
1756#endif 1756#endif
@@ -1843,7 +1843,7 @@ ixgb_clean_tx_irq(struct ixgb_adapter *adapter)
1843 1843
1844 ixgb_unmap_and_free_tx_resource(adapter, buffer_info); 1844 ixgb_unmap_and_free_tx_resource(adapter, buffer_info);
1845 1845
1846 *(uint32_t *)&(tx_desc->status) = 0; 1846 *(u32 *)&(tx_desc->status) = 0;
1847 1847
1848 cleaned = (i == eop); 1848 cleaned = (i == eop);
1849 if(++i == tx_ring->count) i = 0; 1849 if(++i == tx_ring->count) i = 0;
@@ -1948,7 +1948,7 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter)
1948 struct pci_dev *pdev = adapter->pdev; 1948 struct pci_dev *pdev = adapter->pdev;
1949 struct ixgb_rx_desc *rx_desc, *next_rxd; 1949 struct ixgb_rx_desc *rx_desc, *next_rxd;
1950 struct ixgb_buffer *buffer_info, *next_buffer, *next2_buffer; 1950 struct ixgb_buffer *buffer_info, *next_buffer, *next2_buffer;
1951 uint32_t length; 1951 u32 length;
1952 unsigned int i, j; 1952 unsigned int i, j;
1953 bool cleaned = false; 1953 bool cleaned = false;
1954 1954
@@ -2166,7 +2166,7 @@ static void
2166ixgb_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) 2166ixgb_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
2167{ 2167{
2168 struct ixgb_adapter *adapter = netdev_priv(netdev); 2168 struct ixgb_adapter *adapter = netdev_priv(netdev);
2169 uint32_t ctrl, rctl; 2169 u32 ctrl, rctl;
2170 2170
2171 ixgb_irq_disable(adapter); 2171 ixgb_irq_disable(adapter);
2172 adapter->vlgrp = grp; 2172 adapter->vlgrp = grp;
@@ -2203,10 +2203,10 @@ ixgb_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
2203} 2203}
2204 2204
2205static void 2205static void
2206ixgb_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid) 2206ixgb_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
2207{ 2207{
2208 struct ixgb_adapter *adapter = netdev_priv(netdev); 2208 struct ixgb_adapter *adapter = netdev_priv(netdev);
2209 uint32_t vfta, index; 2209 u32 vfta, index;
2210 2210
2211 /* add VID to filter table */ 2211 /* add VID to filter table */
2212 2212
@@ -2217,10 +2217,10 @@ ixgb_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid)
2217} 2217}
2218 2218
2219static void 2219static void
2220ixgb_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid) 2220ixgb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
2221{ 2221{
2222 struct ixgb_adapter *adapter = netdev_priv(netdev); 2222 struct ixgb_adapter *adapter = netdev_priv(netdev);
2223 uint32_t vfta, index; 2223 u32 vfta, index;
2224 2224
2225 ixgb_irq_disable(adapter); 2225 ixgb_irq_disable(adapter);
2226 2226
@@ -2244,7 +2244,7 @@ ixgb_restore_vlan(struct ixgb_adapter *adapter)
2244 ixgb_vlan_rx_register(adapter->netdev, adapter->vlgrp); 2244 ixgb_vlan_rx_register(adapter->netdev, adapter->vlgrp);
2245 2245
2246 if(adapter->vlgrp) { 2246 if(adapter->vlgrp) {
2247 uint16_t vid; 2247 u16 vid;
2248 for(vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { 2248 for(vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) {
2249 if(!vlan_group_get_device(adapter->vlgrp, vid)) 2249 if(!vlan_group_get_device(adapter->vlgrp, vid))
2250 continue; 2250 continue;