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/net/netxen/netxen_nic_hw.c | |
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/net/netxen/netxen_nic_hw.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 104 |
1 files changed, 44 insertions, 60 deletions
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 | ||