diff options
Diffstat (limited to 'drivers/net/netxen/netxen_nic_init.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index c6e2bc71d8f..7c3fbc4a572 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -324,7 +324,6 @@ void netxen_initialize_adapter_ops(struct netxen_adapter *adapter) | |||
324 | netxen_niu_gbe_enable_phy_interrupts; | 324 | netxen_niu_gbe_enable_phy_interrupts; |
325 | adapter->disable_phy_interrupts = | 325 | adapter->disable_phy_interrupts = |
326 | netxen_niu_gbe_disable_phy_interrupts; | 326 | netxen_niu_gbe_disable_phy_interrupts; |
327 | adapter->handle_phy_intr = netxen_nic_gbe_handle_phy_intr; | ||
328 | adapter->macaddr_set = netxen_niu_macaddr_set; | 327 | adapter->macaddr_set = netxen_niu_macaddr_set; |
329 | adapter->set_mtu = netxen_nic_set_mtu_gb; | 328 | adapter->set_mtu = netxen_nic_set_mtu_gb; |
330 | adapter->set_promisc = netxen_niu_set_promiscuous_mode; | 329 | adapter->set_promisc = netxen_niu_set_promiscuous_mode; |
@@ -339,7 +338,6 @@ void netxen_initialize_adapter_ops(struct netxen_adapter *adapter) | |||
339 | netxen_niu_xgbe_enable_phy_interrupts; | 338 | netxen_niu_xgbe_enable_phy_interrupts; |
340 | adapter->disable_phy_interrupts = | 339 | adapter->disable_phy_interrupts = |
341 | netxen_niu_xgbe_disable_phy_interrupts; | 340 | netxen_niu_xgbe_disable_phy_interrupts; |
342 | adapter->handle_phy_intr = netxen_nic_xgbe_handle_phy_intr; | ||
343 | adapter->macaddr_set = netxen_niu_xg_macaddr_set; | 341 | adapter->macaddr_set = netxen_niu_xg_macaddr_set; |
344 | adapter->set_mtu = netxen_nic_set_mtu_xgb; | 342 | adapter->set_mtu = netxen_nic_set_mtu_xgb; |
345 | adapter->init_port = netxen_niu_xg_init_port; | 343 | adapter->init_port = netxen_niu_xg_init_port; |
@@ -1139,60 +1137,6 @@ int netxen_receive_peg_ready(struct netxen_adapter *adapter) | |||
1139 | return 0; | 1137 | return 0; |
1140 | } | 1138 | } |
1141 | 1139 | ||
1142 | static int netxen_nic_check_temp(struct netxen_adapter *adapter) | ||
1143 | { | ||
1144 | struct net_device *netdev = adapter->netdev; | ||
1145 | uint32_t temp, temp_state, temp_val; | ||
1146 | int rv = 0; | ||
1147 | |||
1148 | temp = adapter->pci_read_normalize(adapter, CRB_TEMP_STATE); | ||
1149 | |||
1150 | temp_state = nx_get_temp_state(temp); | ||
1151 | temp_val = nx_get_temp_val(temp); | ||
1152 | |||
1153 | if (temp_state == NX_TEMP_PANIC) { | ||
1154 | printk(KERN_ALERT | ||
1155 | "%s: Device temperature %d degrees C exceeds" | ||
1156 | " maximum allowed. Hardware has been shut down.\n", | ||
1157 | netxen_nic_driver_name, temp_val); | ||
1158 | |||
1159 | netif_carrier_off(netdev); | ||
1160 | netif_stop_queue(netdev); | ||
1161 | rv = 1; | ||
1162 | } else if (temp_state == NX_TEMP_WARN) { | ||
1163 | if (adapter->temp == NX_TEMP_NORMAL) { | ||
1164 | printk(KERN_ALERT | ||
1165 | "%s: Device temperature %d degrees C " | ||
1166 | "exceeds operating range." | ||
1167 | " Immediate action needed.\n", | ||
1168 | netxen_nic_driver_name, temp_val); | ||
1169 | } | ||
1170 | } else { | ||
1171 | if (adapter->temp == NX_TEMP_WARN) { | ||
1172 | printk(KERN_INFO | ||
1173 | "%s: Device temperature is now %d degrees C" | ||
1174 | " in normal range.\n", netxen_nic_driver_name, | ||
1175 | temp_val); | ||
1176 | } | ||
1177 | } | ||
1178 | adapter->temp = temp_state; | ||
1179 | return rv; | ||
1180 | } | ||
1181 | |||
1182 | void netxen_watchdog_task(struct work_struct *work) | ||
1183 | { | ||
1184 | struct netxen_adapter *adapter = | ||
1185 | container_of(work, struct netxen_adapter, watchdog_task); | ||
1186 | |||
1187 | if ((adapter->portnum == 0) && netxen_nic_check_temp(adapter)) | ||
1188 | return; | ||
1189 | |||
1190 | if (adapter->handle_phy_intr) | ||
1191 | adapter->handle_phy_intr(adapter); | ||
1192 | |||
1193 | mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ); | ||
1194 | } | ||
1195 | |||
1196 | /* | 1140 | /* |
1197 | * netxen_process_rcv() send the received packet to the protocol stack. | 1141 | * netxen_process_rcv() send the received packet to the protocol stack. |
1198 | * and if the number of receives exceeds RX_BUFFERS_REFILL, then we | 1142 | * and if the number of receives exceeds RX_BUFFERS_REFILL, then we |