--- x/drivers/net/wireless/marvell/libertas/if_usb.c +++ y/drivers/net/wireless/marvell/libertas/if_usb.c @@ -763,9 +763,7 @@ static int if_usb_issue_boot_command(str memset(bootcmd->pad, 0, sizeof(bootcmd->pad)); /* Issue command */ - usb_tx_block(cardp, cardp->ep_out_buf, sizeof(*bootcmd)); - - return 0; + return usb_tx_block(cardp, cardp->ep_out_buf, sizeof(*bootcmd)); } @@ -853,10 +851,12 @@ restart: } cardp->bootcmdresp = 0; + ret = if_usb_issue_boot_command(cardp, BOOT_CMD_FW_BY_USB); + if (ret) + goto done; do { int j = 0; i++; - if_usb_issue_boot_command(cardp, BOOT_CMD_FW_BY_USB); /* wait for command response */ do { j++; @@ -864,6 +864,8 @@ restart: } while (cardp->bootcmdresp == 0 && j < 10); } while (cardp->bootcmdresp == 0 && i < 5); + usb_kill_urb(cardp->tx_urb); + if (cardp->bootcmdresp == BOOT_CMD_RESP_NOT_SUPPORTED) { /* Return to normal operation */ ret = -EOPNOTSUPP;