netxen: avoid undue board config check

Old code assumed board config version in the flash to be 1.
When this will get changed by tools, driver just refuses to
attach. This is unnecessary since driver does not have to
parse board config structure directly (maintained by firmware).

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dhananjay Phadke 2009-10-21 19:39:03 +00:00 коммит произвёл David S. Miller
Родитель ff8a306d63
Коммит 0dc6d9cbe7
1 изменённых файлов: 4 добавлений и 10 удалений

Просмотреть файл

@ -1901,22 +1901,16 @@ netxen_setup_hwops(struct netxen_adapter *adapter)
int netxen_nic_get_board_info(struct netxen_adapter *adapter) int netxen_nic_get_board_info(struct netxen_adapter *adapter)
{ {
int offset, board_type, magic, header_version; int offset, board_type, magic;
struct pci_dev *pdev = adapter->pdev; struct pci_dev *pdev = adapter->pdev;
offset = NX_FW_MAGIC_OFFSET; offset = NX_FW_MAGIC_OFFSET;
if (netxen_rom_fast_read(adapter, offset, &magic)) if (netxen_rom_fast_read(adapter, offset, &magic))
return -EIO; return -EIO;
offset = NX_HDR_VERSION_OFFSET; if (magic != NETXEN_BDINFO_MAGIC) {
if (netxen_rom_fast_read(adapter, offset, &header_version)) dev_err(&pdev->dev, "invalid board config, magic=%08x\n",
return -EIO; magic);
if (magic != NETXEN_BDINFO_MAGIC ||
header_version != NETXEN_BDINFO_VERSION) {
dev_err(&pdev->dev,
"invalid board config, magic=%08x, version=%08x\n",
magic, header_version);
return -EIO; return -EIO;
} }