diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2008-06-16 01:59:45 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-06-17 23:07:00 -0400 |
commit | dcd56fdbaeae1008044687b973c4a3e852e8a726 (patch) | |
tree | b9b10cdf10ceefafe863c2231078a13f1b94923d /drivers | |
parent | 3276fbad8385d8e86d85fad4d86dae669a045c65 (diff) |
netxen: cleanup debug messages
o Remove unnecessary debug prints and functions.
o Explicitly specify pci class (0x020000) to avoid enabling
management function.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 16 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 104 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 22 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 60 |
4 files changed, 70 insertions, 132 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index ec2ed89a0828..da4c4fb97064 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -776,7 +776,6 @@ struct netxen_hardware_context { | |||
776 | 776 | ||
777 | u8 revision_id; | 777 | u8 revision_id; |
778 | u16 board_type; | 778 | u16 board_type; |
779 | u16 max_ports; | ||
780 | struct netxen_board_info boardcfg; | 779 | struct netxen_board_info boardcfg; |
781 | u32 xg_linkup; | 780 | u32 xg_linkup; |
782 | u32 qg_linksup; | 781 | u32 qg_linksup; |
@@ -1035,7 +1034,6 @@ int netxen_rom_se(struct netxen_adapter *adapter, int addr); | |||
1035 | 1034 | ||
1036 | /* Functions from netxen_nic_isr.c */ | 1035 | /* Functions from netxen_nic_isr.c */ |
1037 | void netxen_initialize_adapter_sw(struct netxen_adapter *adapter); | 1036 | void netxen_initialize_adapter_sw(struct netxen_adapter *adapter); |
1038 | void netxen_initialize_adapter_hw(struct netxen_adapter *adapter); | ||
1039 | void *netxen_alloc(struct pci_dev *pdev, size_t sz, dma_addr_t * ptr, | 1037 | void *netxen_alloc(struct pci_dev *pdev, size_t sz, dma_addr_t * ptr, |
1040 | struct pci_dev **used_dev); | 1038 | struct pci_dev **used_dev); |
1041 | void netxen_initialize_adapter_ops(struct netxen_adapter *adapter); | 1039 | void netxen_initialize_adapter_ops(struct netxen_adapter *adapter); |
@@ -1078,20 +1076,6 @@ static const struct netxen_brdinfo netxen_boards[] = { | |||
1078 | 1076 | ||
1079 | #define NUM_SUPPORTED_BOARDS ARRAY_SIZE(netxen_boards) | 1077 | #define NUM_SUPPORTED_BOARDS ARRAY_SIZE(netxen_boards) |
1080 | 1078 | ||
1081 | static inline void get_brd_port_by_type(u32 type, int *ports) | ||
1082 | { | ||
1083 | int i, found = 0; | ||
1084 | for (i = 0; i < NUM_SUPPORTED_BOARDS; ++i) { | ||
1085 | if (netxen_boards[i].brdtype == type) { | ||
1086 | *ports = netxen_boards[i].ports; | ||
1087 | found = 1; | ||
1088 | break; | ||
1089 | } | ||
1090 | } | ||
1091 | if (!found) | ||
1092 | *ports = 0; | ||
1093 | } | ||
1094 | |||
1095 | static inline void get_brd_name_by_type(u32 type, char *name) | 1079 | static inline void get_brd_name_by_type(u32 type, char *name) |
1096 | { | 1080 | { |
1097 | int i, found = 0; | 1081 | int i, found = 0; |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 30316a847dd8..c43d06b8de9b 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -396,11 +396,8 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) | |||
396 | } | 396 | } |
397 | adapter->intr_scheme = readl( | 397 | adapter->intr_scheme = readl( |
398 | NETXEN_CRB_NORMALIZE(adapter, CRB_NIC_CAPABILITIES_FW)); | 398 | NETXEN_CRB_NORMALIZE(adapter, CRB_NIC_CAPABILITIES_FW)); |
399 | printk(KERN_NOTICE "%s: FW capabilities:0x%x\n", netxen_nic_driver_name, | ||
400 | adapter->intr_scheme); | ||
401 | adapter->msi_mode = readl( | 399 | adapter->msi_mode = readl( |
402 | NETXEN_CRB_NORMALIZE(adapter, CRB_NIC_MSI_MODE_FW)); | 400 | NETXEN_CRB_NORMALIZE(adapter, CRB_NIC_MSI_MODE_FW)); |
403 | DPRINTK(INFO, "Receive Peg ready too. starting stuff\n"); | ||
404 | 401 | ||
405 | addr = netxen_alloc(adapter->ahw.pdev, | 402 | addr = netxen_alloc(adapter->ahw.pdev, |
406 | sizeof(struct netxen_ring_ctx) + | 403 | sizeof(struct netxen_ring_ctx) + |
@@ -408,8 +405,6 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) | |||
408 | (dma_addr_t *) & adapter->ctx_desc_phys_addr, | 405 | (dma_addr_t *) & adapter->ctx_desc_phys_addr, |
409 | &adapter->ctx_desc_pdev); | 406 | &adapter->ctx_desc_pdev); |
410 | 407 | ||
411 | printk(KERN_INFO "ctx_desc_phys_addr: 0x%llx\n", | ||
412 | (unsigned long long) adapter->ctx_desc_phys_addr); | ||
413 | if (addr == NULL) { | 408 | if (addr == NULL) { |
414 | DPRINTK(ERR, "bad return from pci_alloc_consistent\n"); | 409 | DPRINTK(ERR, "bad return from pci_alloc_consistent\n"); |
415 | err = -ENOMEM; | 410 | err = -ENOMEM; |
@@ -429,8 +424,6 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) | |||
429 | adapter->max_tx_desc_count, | 424 | adapter->max_tx_desc_count, |
430 | (dma_addr_t *) & hw->cmd_desc_phys_addr, | 425 | (dma_addr_t *) & hw->cmd_desc_phys_addr, |
431 | &adapter->ahw.cmd_desc_pdev); | 426 | &adapter->ahw.cmd_desc_pdev); |
432 | printk(KERN_INFO "cmd_desc_phys_addr: 0x%llx\n", | ||
433 | (unsigned long long) hw->cmd_desc_phys_addr); | ||
434 | 427 | ||
435 | if (addr == NULL) { | 428 | if (addr == NULL) { |
436 | DPRINTK(ERR, "bad return from pci_alloc_consistent\n"); | 429 | DPRINTK(ERR, "bad return from pci_alloc_consistent\n"); |
@@ -1127,7 +1120,6 @@ void netxen_nic_set_link_parameters(struct netxen_adapter *adapter) | |||
1127 | 1120 | ||
1128 | void netxen_nic_flash_print(struct netxen_adapter *adapter) | 1121 | void netxen_nic_flash_print(struct netxen_adapter *adapter) |
1129 | { | 1122 | { |
1130 | int valid = 1; | ||
1131 | u32 fw_major = 0; | 1123 | u32 fw_major = 0; |
1132 | u32 fw_minor = 0; | 1124 | u32 fw_minor = 0; |
1133 | u32 fw_build = 0; | 1125 | u32 fw_build = 0; |
@@ -1137,70 +1129,62 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter) | |||
1137 | __le32 *ptr32; | 1129 | __le32 *ptr32; |
1138 | 1130 | ||
1139 | struct netxen_board_info *board_info = &(adapter->ahw.boardcfg); | 1131 | struct netxen_board_info *board_info = &(adapter->ahw.boardcfg); |
1140 | if (board_info->magic != NETXEN_BDINFO_MAGIC) { | 1132 | |
1141 | printk | 1133 | adapter->driver_mismatch = 0; |
1142 | ("NetXen Unknown board config, Read 0x%x expected as 0x%x\n", | 1134 | |
1143 | board_info->magic, NETXEN_BDINFO_MAGIC); | 1135 | ptr32 = (u32 *)&serial_num; |
1144 | valid = 0; | 1136 | addr = NETXEN_USER_START + |
1145 | } | 1137 | offsetof(struct netxen_new_user_info, serial_num); |
1146 | if (board_info->header_version != NETXEN_BDINFO_VERSION) { | 1138 | for (i = 0; i < 8; i++) { |
1147 | printk("NetXen Unknown board config version." | 1139 | if (netxen_rom_fast_read(adapter, addr, ptr32) == -1) { |
1148 | " Read %x, expected %x\n", | 1140 | printk("%s: ERROR reading %s board userarea.\n", |
1149 | board_info->header_version, NETXEN_BDINFO_VERSION); | 1141 | netxen_nic_driver_name, |
1150 | valid = 0; | 1142 | netxen_nic_driver_name); |
1151 | } | 1143 | adapter->driver_mismatch = 1; |
1152 | if (valid) { | 1144 | return; |
1153 | ptr32 = (u32 *)&serial_num; | ||
1154 | addr = NETXEN_USER_START + | ||
1155 | offsetof(struct netxen_new_user_info, serial_num); | ||
1156 | for (i = 0; i < 8; i++) { | ||
1157 | if (netxen_rom_fast_read(adapter, addr, ptr32) == -1) { | ||
1158 | printk("%s: ERROR reading %s board userarea.\n", | ||
1159 | netxen_nic_driver_name, | ||
1160 | netxen_nic_driver_name); | ||
1161 | return; | ||
1162 | } | ||
1163 | ptr32++; | ||
1164 | addr += sizeof(u32); | ||
1165 | } | 1145 | } |
1146 | ptr32++; | ||
1147 | addr += sizeof(u32); | ||
1148 | } | ||
1149 | |||
1150 | fw_major = readl(NETXEN_CRB_NORMALIZE(adapter, | ||
1151 | NETXEN_FW_VERSION_MAJOR)); | ||
1152 | fw_minor = readl(NETXEN_CRB_NORMALIZE(adapter, | ||
1153 | NETXEN_FW_VERSION_MINOR)); | ||
1154 | fw_build = | ||
1155 | readl(NETXEN_CRB_NORMALIZE(adapter, NETXEN_FW_VERSION_SUB)); | ||
1166 | 1156 | ||
1157 | if (adapter->portnum == 0) { | ||
1167 | get_brd_name_by_type(board_info->board_type, brd_name); | 1158 | get_brd_name_by_type(board_info->board_type, brd_name); |
1168 | 1159 | ||
1169 | printk("NetXen %s Board S/N %s Chip id 0x%x\n", | 1160 | printk("NetXen %s Board S/N %s Chip id 0x%x\n", |
1170 | brd_name, serial_num, board_info->chip_id); | 1161 | brd_name, serial_num, board_info->chip_id); |
1171 | 1162 | printk("NetXen Firmware version %d.%d.%d\n", fw_major, | |
1172 | printk("NetXen %s Board #%d, Chip id 0x%x\n", | 1163 | fw_minor, fw_build); |
1173 | board_info->board_type == 0x0b ? "XGB" : "GBE", | ||
1174 | board_info->board_num, board_info->chip_id); | ||
1175 | fw_major = readl(NETXEN_CRB_NORMALIZE(adapter, | ||
1176 | NETXEN_FW_VERSION_MAJOR)); | ||
1177 | fw_minor = readl(NETXEN_CRB_NORMALIZE(adapter, | ||
1178 | NETXEN_FW_VERSION_MINOR)); | ||
1179 | fw_build = | ||
1180 | readl(NETXEN_CRB_NORMALIZE(adapter, NETXEN_FW_VERSION_SUB)); | ||
1181 | |||
1182 | printk("NetXen Firmware version %d.%d.%d\n", fw_major, fw_minor, | ||
1183 | fw_build); | ||
1184 | } | 1164 | } |
1165 | |||
1185 | if (fw_major != _NETXEN_NIC_LINUX_MAJOR) { | 1166 | if (fw_major != _NETXEN_NIC_LINUX_MAJOR) { |
1186 | printk(KERN_ERR "The mismatch in driver version and firmware " | ||
1187 | "version major number\n" | ||
1188 | "Driver version major number = %d \t" | ||
1189 | "Firmware version major number = %d \n", | ||
1190 | _NETXEN_NIC_LINUX_MAJOR, fw_major); | ||
1191 | adapter->driver_mismatch = 1; | 1167 | adapter->driver_mismatch = 1; |
1192 | } | 1168 | } |
1193 | if (fw_minor != _NETXEN_NIC_LINUX_MINOR && | 1169 | if (fw_minor != _NETXEN_NIC_LINUX_MINOR && |
1194 | fw_minor != (_NETXEN_NIC_LINUX_MINOR + 1)) { | 1170 | fw_minor != (_NETXEN_NIC_LINUX_MINOR + 1)) { |
1195 | printk(KERN_ERR "The mismatch in driver version and firmware " | ||
1196 | "version minor number\n" | ||
1197 | "Driver version minor number = %d \t" | ||
1198 | "Firmware version minor number = %d \n", | ||
1199 | _NETXEN_NIC_LINUX_MINOR, fw_minor); | ||
1200 | adapter->driver_mismatch = 1; | 1171 | adapter->driver_mismatch = 1; |
1201 | } | 1172 | } |
1202 | if (adapter->driver_mismatch) | 1173 | if (adapter->driver_mismatch) { |
1203 | printk(KERN_INFO "Use the driver with version no %d.%d.xxx\n", | 1174 | printk(KERN_ERR "%s: driver and firmware version mismatch\n", |
1204 | fw_major, fw_minor); | 1175 | adapter->netdev->name); |
1176 | return; | ||
1177 | } | ||
1178 | |||
1179 | switch (adapter->ahw.board_type) { | ||
1180 | case NETXEN_NIC_GBE: | ||
1181 | dev_info(&adapter->pdev->dev, "%s: GbE port initialized\n", | ||
1182 | adapter->netdev->name); | ||
1183 | break; | ||
1184 | case NETXEN_NIC_XGBE: | ||
1185 | dev_info(&adapter->pdev->dev, "%s: XGbE port initialized\n", | ||
1186 | adapter->netdev->name); | ||
1187 | break; | ||
1188 | } | ||
1205 | } | 1189 | } |
1206 | 1190 | ||
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 45fa33e0cb90..f6aeccfa2831 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -203,21 +203,6 @@ void netxen_initialize_adapter_sw(struct netxen_adapter *adapter) | |||
203 | } | 203 | } |
204 | } | 204 | } |
205 | 205 | ||
206 | void netxen_initialize_adapter_hw(struct netxen_adapter *adapter) | ||
207 | { | ||
208 | int ports = 0; | ||
209 | struct netxen_board_info *board_info = &(adapter->ahw.boardcfg); | ||
210 | |||
211 | if (netxen_nic_get_board_info(adapter) != 0) | ||
212 | printk("%s: Error getting board config info.\n", | ||
213 | netxen_nic_driver_name); | ||
214 | get_brd_port_by_type(board_info->board_type, &ports); | ||
215 | if (ports == 0) | ||
216 | printk(KERN_ERR "%s: Unknown board type\n", | ||
217 | netxen_nic_driver_name); | ||
218 | adapter->ahw.max_ports = ports; | ||
219 | } | ||
220 | |||
221 | void netxen_initialize_adapter_ops(struct netxen_adapter *adapter) | 206 | void netxen_initialize_adapter_ops(struct netxen_adapter *adapter) |
222 | { | 207 | { |
223 | switch (adapter->ahw.board_type) { | 208 | switch (adapter->ahw.board_type) { |
@@ -765,18 +750,13 @@ int netxen_flash_unlock(struct netxen_adapter *adapter) | |||
765 | 750 | ||
766 | int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose) | 751 | int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose) |
767 | { | 752 | { |
768 | int addr, val, status; | 753 | int addr, val; |
769 | int n, i; | 754 | int n, i; |
770 | int init_delay = 0; | 755 | int init_delay = 0; |
771 | struct crb_addr_pair *buf; | 756 | struct crb_addr_pair *buf; |
772 | u32 off; | 757 | u32 off; |
773 | 758 | ||
774 | /* resetall */ | 759 | /* resetall */ |
775 | status = netxen_nic_get_board_info(adapter); | ||
776 | if (status) | ||
777 | printk("%s: netxen_pinit_from_rom: Error getting board info\n", | ||
778 | netxen_nic_driver_name); | ||
779 | |||
780 | netxen_crb_writelit_adapter(adapter, NETXEN_ROMUSB_GLB_SW_RESET, | 760 | netxen_crb_writelit_adapter(adapter, NETXEN_ROMUSB_GLB_SW_RESET, |
781 | NETXEN_ROMBUS_RESET); | 761 | NETXEN_ROMBUS_RESET); |
782 | 762 | ||
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index f903de0fe9ea..755f4abe2f55 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -72,13 +72,13 @@ static irqreturn_t netxen_msi_intr(int irq, void *data); | |||
72 | 72 | ||
73 | /* PCI Device ID Table */ | 73 | /* PCI Device ID Table */ |
74 | static struct pci_device_id netxen_pci_tbl[] __devinitdata = { | 74 | static struct pci_device_id netxen_pci_tbl[] __devinitdata = { |
75 | {PCI_DEVICE(0x4040, 0x0001)}, | 75 | {PCI_DEVICE(0x4040, 0x0001), PCI_DEVICE_CLASS(0x020000, ~0)}, |
76 | {PCI_DEVICE(0x4040, 0x0002)}, | 76 | {PCI_DEVICE(0x4040, 0x0002), PCI_DEVICE_CLASS(0x020000, ~0)}, |
77 | {PCI_DEVICE(0x4040, 0x0003)}, | 77 | {PCI_DEVICE(0x4040, 0x0003), PCI_DEVICE_CLASS(0x020000, ~0)}, |
78 | {PCI_DEVICE(0x4040, 0x0004)}, | 78 | {PCI_DEVICE(0x4040, 0x0004), PCI_DEVICE_CLASS(0x020000, ~0)}, |
79 | {PCI_DEVICE(0x4040, 0x0005)}, | 79 | {PCI_DEVICE(0x4040, 0x0005), PCI_DEVICE_CLASS(0x020000, ~0)}, |
80 | {PCI_DEVICE(0x4040, 0x0024)}, | 80 | {PCI_DEVICE(0x4040, 0x0024), PCI_DEVICE_CLASS(0x020000, ~0)}, |
81 | {PCI_DEVICE(0x4040, 0x0025)}, | 81 | {PCI_DEVICE(0x4040, 0x0025), PCI_DEVICE_CLASS(0x020000, ~0)}, |
82 | {0,} | 82 | {0,} |
83 | }; | 83 | }; |
84 | 84 | ||
@@ -286,10 +286,11 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
286 | int pci_func_id = PCI_FUNC(pdev->devfn); | 286 | int pci_func_id = PCI_FUNC(pdev->devfn); |
287 | DECLARE_MAC_BUF(mac); | 287 | DECLARE_MAC_BUF(mac); |
288 | 288 | ||
289 | printk(KERN_INFO "%s \n", netxen_nic_driver_string); | 289 | if (pci_func_id == 0) |
290 | printk(KERN_INFO "%s \n", netxen_nic_driver_string); | ||
290 | 291 | ||
291 | if (pdev->class != 0x020000) { | 292 | if (pdev->class != 0x020000) { |
292 | printk(KERN_ERR"NetXen function %d, class %x will not " | 293 | printk(KERN_DEBUG "NetXen function %d, class %x will not " |
293 | "be enabled.\n",pci_func_id, pdev->class); | 294 | "be enabled.\n",pci_func_id, pdev->class); |
294 | return -ENODEV; | 295 | return -ENODEV; |
295 | } | 296 | } |
@@ -448,8 +449,12 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
448 | */ | 449 | */ |
449 | adapter->curr_window = 255; | 450 | adapter->curr_window = 255; |
450 | 451 | ||
451 | /* initialize the adapter */ | 452 | if (netxen_nic_get_board_info(adapter) != 0) { |
452 | netxen_initialize_adapter_hw(adapter); | 453 | printk("%s: Error getting board config info.\n", |
454 | netxen_nic_driver_name); | ||
455 | err = -EIO; | ||
456 | goto err_out_iounmap; | ||
457 | } | ||
453 | 458 | ||
454 | /* | 459 | /* |
455 | * Adapter in our case is quad port so initialize it before | 460 | * Adapter in our case is quad port so initialize it before |
@@ -621,7 +626,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
621 | 626 | ||
622 | /* clear the register for future unloads/loads */ | 627 | /* clear the register for future unloads/loads */ |
623 | writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc))); | 628 | writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc))); |
624 | printk(KERN_INFO "State: 0x%0x\n", | 629 | printk(KERN_DEBUG "State: 0x%0x\n", |
625 | readl(NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE))); | 630 | readl(NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE))); |
626 | 631 | ||
627 | /* | 632 | /* |
@@ -643,6 +648,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
643 | /* | 648 | /* |
644 | * See if the firmware gave us a virtual-physical port mapping. | 649 | * See if the firmware gave us a virtual-physical port mapping. |
645 | */ | 650 | */ |
651 | adapter->physical_port = adapter->portnum; | ||
646 | i = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_V2P(adapter->portnum))); | 652 | i = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_V2P(adapter->portnum))); |
647 | if (i != 0x55555555) | 653 | if (i != 0x55555555) |
648 | adapter->physical_port = i; | 654 | adapter->physical_port = i; |
@@ -658,22 +664,9 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
658 | goto err_out_free_dev; | 664 | goto err_out_free_dev; |
659 | } | 665 | } |
660 | 666 | ||
667 | netxen_nic_flash_print(adapter); | ||
661 | pci_set_drvdata(pdev, adapter); | 668 | pci_set_drvdata(pdev, adapter); |
662 | 669 | ||
663 | switch (adapter->ahw.board_type) { | ||
664 | case NETXEN_NIC_GBE: | ||
665 | printk(KERN_INFO "%s: QUAD GbE board initialized\n", | ||
666 | netxen_nic_driver_name); | ||
667 | break; | ||
668 | |||
669 | case NETXEN_NIC_XGBE: | ||
670 | printk(KERN_INFO "%s: XGbE board initialized\n", | ||
671 | netxen_nic_driver_name); | ||
672 | break; | ||
673 | } | ||
674 | |||
675 | adapter->driver_mismatch = 0; | ||
676 | |||
677 | return 0; | 670 | return 0; |
678 | 671 | ||
679 | err_out_free_dev: | 672 | err_out_free_dev: |
@@ -781,9 +774,6 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev) | |||
781 | 774 | ||
782 | /* clear the register for future unloads/loads */ | 775 | /* clear the register for future unloads/loads */ |
783 | writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc))); | 776 | writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc))); |
784 | printk(KERN_INFO "State: 0x%0x\n", | ||
785 | readl(NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE))); | ||
786 | |||
787 | /* leave the hw in the same state as reboot */ | 777 | /* leave the hw in the same state as reboot */ |
788 | writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)); | 778 | writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)); |
789 | netxen_pinit_from_rom(adapter, 0); | 779 | netxen_pinit_from_rom(adapter, 0); |
@@ -794,7 +784,7 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev) | |||
794 | 784 | ||
795 | /* clear the register for future unloads/loads */ | 785 | /* clear the register for future unloads/loads */ |
796 | writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc))); | 786 | writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc))); |
797 | printk(KERN_INFO "State: 0x%0x\n", | 787 | printk(KERN_DEBUG "State: 0x%0x\n", |
798 | readl(NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE))); | 788 | readl(NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE))); |
799 | 789 | ||
800 | i = 100; | 790 | i = 100; |
@@ -844,13 +834,15 @@ static int netxen_nic_open(struct net_device *netdev) | |||
844 | irq_handler_t handler; | 834 | irq_handler_t handler; |
845 | unsigned long flags = IRQF_SAMPLE_RANDOM; | 835 | unsigned long flags = IRQF_SAMPLE_RANDOM; |
846 | 836 | ||
837 | if (adapter->driver_mismatch) | ||
838 | return -EIO; | ||
839 | |||
847 | if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC) { | 840 | if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC) { |
848 | err = netxen_init_firmware(adapter); | 841 | err = netxen_init_firmware(adapter); |
849 | if (err != 0) { | 842 | if (err != 0) { |
850 | printk(KERN_ERR "Failed to init firmware\n"); | 843 | printk(KERN_ERR "Failed to init firmware\n"); |
851 | return -EIO; | 844 | return -EIO; |
852 | } | 845 | } |
853 | netxen_nic_flash_print(adapter); | ||
854 | 846 | ||
855 | /* setup all the resources for the Phantom... */ | 847 | /* setup all the resources for the Phantom... */ |
856 | /* this include the descriptors for rcv, tx, and status */ | 848 | /* this include the descriptors for rcv, tx, and status */ |
@@ -899,14 +891,12 @@ static int netxen_nic_open(struct net_device *netdev) | |||
899 | if (adapter->set_mtu) | 891 | if (adapter->set_mtu) |
900 | adapter->set_mtu(adapter, netdev->mtu); | 892 | adapter->set_mtu(adapter, netdev->mtu); |
901 | 893 | ||
902 | if (!adapter->driver_mismatch) | 894 | mod_timer(&adapter->watchdog_timer, jiffies); |
903 | mod_timer(&adapter->watchdog_timer, jiffies); | ||
904 | 895 | ||
905 | napi_enable(&adapter->napi); | 896 | napi_enable(&adapter->napi); |
906 | netxen_nic_enable_int(adapter); | 897 | netxen_nic_enable_int(adapter); |
907 | 898 | ||
908 | if (!adapter->driver_mismatch) | 899 | netif_start_queue(netdev); |
909 | netif_start_queue(netdev); | ||
910 | 900 | ||
911 | return 0; | 901 | return 0; |
912 | } | 902 | } |