#include "firmware.h"
#include "usbpipe.h"
-static int msglevel = MSG_LEVEL_INFO;
-/* static int msglevel = MSG_LEVEL_DEBUG; */
-
#define FIRMWARE_VERSION 0x133 /* version 1.51 */
#define FIRMWARE_NAME "vntwusb.fw"
u16 length;
int ii, rc;
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Download firmware\n");
+ dev_dbg(dev, "---->Download firmware\n");
rc = request_firmware(&fw, FIRMWARE_NAME, dev);
if (rc) {
length,
buffer);
- DBG_PRT(MSG_LEVEL_DEBUG,
- KERN_INFO"Download firmware...%d %zu\n", ii, fw->size);
+ dev_dbg(dev, "Download firmware...%d %zu\n", ii, fw->size);
+
if (status != STATUS_SUCCESS)
goto free_fw;
}
{
int status;
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Branch to Sram\n");
+ dev_dbg(&priv->usb->dev, "---->Branch to Sram\n");
status = vnt_control_out(priv,
1,
2,
(u8 *) &(priv->wFirmwareVersion));
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n",
+ dev_dbg(&priv->usb->dev, "Firmware Version [%04x]\n",
priv->wFirmwareVersion);
+
if (status != STATUS_SUCCESS) {
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Invalid.\n");
+ dev_dbg(&priv->usb->dev, "Firmware Invalid.\n");
return false;
}
if (priv->wFirmwareVersion == 0xFFFF) {
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"In Loader.\n");
+ dev_dbg(&priv->usb->dev, "In Loader.\n");
return false;
}
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n",
+
+ dev_dbg(&priv->usb->dev, "Firmware Version [%04x]\n",
priv->wFirmwareVersion);
+
if (priv->wFirmwareVersion < FIRMWARE_VERSION) {
/* branch to loader for download new firmware */
FIRMWAREbBrach2Sram(priv);