diff options
Diffstat (limited to 'drivers/net/chelsio/cxgb2.c')
-rw-r--r-- | drivers/net/chelsio/cxgb2.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index fd5d821f3f2a..bb11b111335b 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
@@ -69,14 +69,14 @@ static inline void cancel_mac_stats_update(struct adapter *ap) | |||
69 | cancel_delayed_work(&ap->stats_update_task); | 69 | cancel_delayed_work(&ap->stats_update_task); |
70 | } | 70 | } |
71 | 71 | ||
72 | #define MAX_CMDQ_ENTRIES 16384 | 72 | #define MAX_CMDQ_ENTRIES 16384 |
73 | #define MAX_CMDQ1_ENTRIES 1024 | 73 | #define MAX_CMDQ1_ENTRIES 1024 |
74 | #define MAX_RX_BUFFERS 16384 | 74 | #define MAX_RX_BUFFERS 16384 |
75 | #define MAX_RX_JUMBO_BUFFERS 16384 | 75 | #define MAX_RX_JUMBO_BUFFERS 16384 |
76 | #define MAX_TX_BUFFERS_HIGH 16384U | 76 | #define MAX_TX_BUFFERS_HIGH 16384U |
77 | #define MAX_TX_BUFFERS_LOW 1536U | 77 | #define MAX_TX_BUFFERS_LOW 1536U |
78 | #define MAX_TX_BUFFERS 1460U | 78 | #define MAX_TX_BUFFERS 1460U |
79 | #define MIN_FL_ENTRIES 32 | 79 | #define MIN_FL_ENTRIES 32 |
80 | 80 | ||
81 | #define DFLT_MSG_ENABLE (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK | \ | 81 | #define DFLT_MSG_ENABLE (NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK | \ |
82 | NETIF_MSG_TIMER | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP |\ | 82 | NETIF_MSG_TIMER | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP |\ |
@@ -143,7 +143,7 @@ static void link_report(struct port_info *p) | |||
143 | case SPEED_100: s = "100Mbps"; break; | 143 | case SPEED_100: s = "100Mbps"; break; |
144 | } | 144 | } |
145 | 145 | ||
146 | printk(KERN_INFO "%s: link up, %s, %s-duplex\n", | 146 | printk(KERN_INFO "%s: link up, %s, %s-duplex\n", |
147 | p->dev->name, s, | 147 | p->dev->name, s, |
148 | p->link_config.duplex == DUPLEX_FULL ? "full" : "half"); | 148 | p->link_config.duplex == DUPLEX_FULL ? "full" : "half"); |
149 | } | 149 | } |
@@ -233,7 +233,7 @@ static int cxgb_up(struct adapter *adapter) | |||
233 | 233 | ||
234 | t1_sge_start(adapter->sge); | 234 | t1_sge_start(adapter->sge); |
235 | t1_interrupts_enable(adapter); | 235 | t1_interrupts_enable(adapter); |
236 | out_err: | 236 | out_err: |
237 | return err; | 237 | return err; |
238 | } | 238 | } |
239 | 239 | ||
@@ -749,7 +749,7 @@ static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e) | |||
749 | return -EINVAL; | 749 | return -EINVAL; |
750 | 750 | ||
751 | if (adapter->flags & FULL_INIT_DONE) | 751 | if (adapter->flags & FULL_INIT_DONE) |
752 | return -EBUSY; | 752 | return -EBUSY; |
753 | 753 | ||
754 | adapter->params.sge.freelQ_size[!jumbo_fl] = e->rx_pending; | 754 | adapter->params.sge.freelQ_size[!jumbo_fl] = e->rx_pending; |
755 | adapter->params.sge.freelQ_size[jumbo_fl] = e->rx_jumbo_pending; | 755 | adapter->params.sge.freelQ_size[jumbo_fl] = e->rx_jumbo_pending; |
@@ -764,7 +764,7 @@ static int set_coalesce(struct net_device *dev, struct ethtool_coalesce *c) | |||
764 | struct adapter *adapter = dev->priv; | 764 | struct adapter *adapter = dev->priv; |
765 | 765 | ||
766 | adapter->params.sge.rx_coalesce_usecs = c->rx_coalesce_usecs; | 766 | adapter->params.sge.rx_coalesce_usecs = c->rx_coalesce_usecs; |
767 | adapter->params.sge.coalesce_enable = c->use_adaptive_rx_coalesce; | 767 | adapter->params.sge.coalesce_enable = c->use_adaptive_rx_coalesce; |
768 | adapter->params.sge.sample_interval_usecs = c->rate_sample_interval; | 768 | adapter->params.sge.sample_interval_usecs = c->rate_sample_interval; |
769 | t1_sge_set_coalesce_params(adapter->sge, &adapter->params.sge); | 769 | t1_sge_set_coalesce_params(adapter->sge, &adapter->params.sge); |
770 | return 0; | 770 | return 0; |
@@ -782,9 +782,9 @@ static int get_coalesce(struct net_device *dev, struct ethtool_coalesce *c) | |||
782 | 782 | ||
783 | static int get_eeprom_len(struct net_device *dev) | 783 | static int get_eeprom_len(struct net_device *dev) |
784 | { | 784 | { |
785 | struct adapter *adapter = dev->priv; | 785 | struct adapter *adapter = dev->priv; |
786 | 786 | ||
787 | return t1_is_asic(adapter) ? EEPROM_SIZE : 0; | 787 | return t1_is_asic(adapter) ? EEPROM_SIZE : 0; |
788 | } | 788 | } |
789 | 789 | ||
790 | #define EEPROM_MAGIC(ap) \ | 790 | #define EEPROM_MAGIC(ap) \ |
@@ -848,7 +848,7 @@ static int t1_ioctl(struct net_device *dev, struct ifreq *req, int cmd) | |||
848 | u32 val; | 848 | u32 val; |
849 | 849 | ||
850 | if (!phy->mdio_read) | 850 | if (!phy->mdio_read) |
851 | return -EOPNOTSUPP; | 851 | return -EOPNOTSUPP; |
852 | phy->mdio_read(adapter, data->phy_id, 0, data->reg_num & 0x1f, | 852 | phy->mdio_read(adapter, data->phy_id, 0, data->reg_num & 0x1f, |
853 | &val); | 853 | &val); |
854 | data->val_out = val; | 854 | data->val_out = val; |
@@ -860,7 +860,7 @@ static int t1_ioctl(struct net_device *dev, struct ifreq *req, int cmd) | |||
860 | if (!capable(CAP_NET_ADMIN)) | 860 | if (!capable(CAP_NET_ADMIN)) |
861 | return -EPERM; | 861 | return -EPERM; |
862 | if (!phy->mdio_write) | 862 | if (!phy->mdio_write) |
863 | return -EOPNOTSUPP; | 863 | return -EOPNOTSUPP; |
864 | phy->mdio_write(adapter, data->phy_id, 0, data->reg_num & 0x1f, | 864 | phy->mdio_write(adapter, data->phy_id, 0, data->reg_num & 0x1f, |
865 | data->val_in); | 865 | data->val_in); |
866 | break; | 866 | break; |
@@ -879,9 +879,9 @@ static int t1_change_mtu(struct net_device *dev, int new_mtu) | |||
879 | struct cmac *mac = adapter->port[dev->if_port].mac; | 879 | struct cmac *mac = adapter->port[dev->if_port].mac; |
880 | 880 | ||
881 | if (!mac->ops->set_mtu) | 881 | if (!mac->ops->set_mtu) |
882 | return -EOPNOTSUPP; | 882 | return -EOPNOTSUPP; |
883 | if (new_mtu < 68) | 883 | if (new_mtu < 68) |
884 | return -EINVAL; | 884 | return -EINVAL; |
885 | if ((ret = mac->ops->set_mtu(mac, new_mtu))) | 885 | if ((ret = mac->ops->set_mtu(mac, new_mtu))) |
886 | return ret; | 886 | return ret; |
887 | dev->mtu = new_mtu; | 887 | dev->mtu = new_mtu; |
@@ -1211,9 +1211,9 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
1211 | 1211 | ||
1212 | return 0; | 1212 | return 0; |
1213 | 1213 | ||
1214 | out_release_adapter_res: | 1214 | out_release_adapter_res: |
1215 | t1_free_sw_modules(adapter); | 1215 | t1_free_sw_modules(adapter); |
1216 | out_free_dev: | 1216 | out_free_dev: |
1217 | if (adapter) { | 1217 | if (adapter) { |
1218 | if (adapter->regs) | 1218 | if (adapter->regs) |
1219 | iounmap(adapter->regs); | 1219 | iounmap(adapter->regs); |
@@ -1222,7 +1222,7 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
1222 | free_netdev(adapter->port[i].dev); | 1222 | free_netdev(adapter->port[i].dev); |
1223 | } | 1223 | } |
1224 | pci_release_regions(pdev); | 1224 | pci_release_regions(pdev); |
1225 | out_disable_pdev: | 1225 | out_disable_pdev: |
1226 | pci_disable_device(pdev); | 1226 | pci_disable_device(pdev); |
1227 | pci_set_drvdata(pdev, NULL); | 1227 | pci_set_drvdata(pdev, NULL); |
1228 | return err; | 1228 | return err; |
@@ -1273,20 +1273,20 @@ static int t1_clock(struct adapter *adapter, int mode) | |||
1273 | int M_MEM_VAL; | 1273 | int M_MEM_VAL; |
1274 | 1274 | ||
1275 | enum { | 1275 | enum { |
1276 | M_CORE_BITS = 9, | 1276 | M_CORE_BITS = 9, |
1277 | T_CORE_VAL = 0, | 1277 | T_CORE_VAL = 0, |
1278 | T_CORE_BITS = 2, | 1278 | T_CORE_BITS = 2, |
1279 | N_CORE_VAL = 0, | 1279 | N_CORE_VAL = 0, |
1280 | N_CORE_BITS = 2, | 1280 | N_CORE_BITS = 2, |
1281 | M_MEM_BITS = 9, | 1281 | M_MEM_BITS = 9, |
1282 | T_MEM_VAL = 0, | 1282 | T_MEM_VAL = 0, |
1283 | T_MEM_BITS = 2, | 1283 | T_MEM_BITS = 2, |
1284 | N_MEM_VAL = 0, | 1284 | N_MEM_VAL = 0, |
1285 | N_MEM_BITS = 2, | 1285 | N_MEM_BITS = 2, |
1286 | NP_LOAD = 1 << 17, | 1286 | NP_LOAD = 1 << 17, |
1287 | S_LOAD_MEM = 1 << 5, | 1287 | S_LOAD_MEM = 1 << 5, |
1288 | S_LOAD_CORE = 1 << 6, | 1288 | S_LOAD_CORE = 1 << 6, |
1289 | S_CLOCK = 1 << 3 | 1289 | S_CLOCK = 1 << 3 |
1290 | }; | 1290 | }; |
1291 | 1291 | ||
1292 | if (!t1_is_T1B(adapter)) | 1292 | if (!t1_is_T1B(adapter)) |