* spider_net_download_firmware loads the firmware opened by
* spider_net_init_firmware into the adapter.
*/
-static void
+static int
spider_net_download_firmware(struct spider_net_card *card,
const struct firmware *firmware)
{
}
}
+ if (spider_net_read_reg(card, SPIDER_NET_GSINIT))
+ return -EIO;
+
spider_net_write_reg(card, SPIDER_NET_GSINIT,
SPIDER_NET_RUN_SEQ_VALUE);
+
+ return 0;
}
/**
goto out;
}
- spider_net_download_firmware(card, firmware);
-
- err = 0;
+ if (!spider_net_download_firmware(card, firmware))
+ err = 0;
out:
release_firmware(firmware);