diff options
Diffstat (limited to 'drivers/fastboot')
| -rw-r--r-- | drivers/fastboot/Kconfig | 4 | ||||
| -rw-r--r-- | drivers/fastboot/fb_common.c | 4 | ||||
| -rw-r--r-- | drivers/fastboot/fb_mmc.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig index 576c3ef8a45..90212fcf9ef 100644 --- a/drivers/fastboot/Kconfig +++ b/drivers/fastboot/Kconfig @@ -27,7 +27,7 @@ config USB_FUNCTION_FASTBOOT This enables the USB part of the fastboot gadget. config UDP_FUNCTION_FASTBOOT - depends on NET + depends on NET_LEGACY select FASTBOOT bool "Enable fastboot protocol over UDP" help @@ -41,7 +41,7 @@ config UDP_FUNCTION_FASTBOOT_PORT The fastboot protocol requires a UDP port number. config TCP_FUNCTION_FASTBOOT - depends on NET + depends on NET_LEGACY select FASTBOOT bool "Enable fastboot protocol over TCP" help diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index dac5528f809..9c52e004588 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -191,13 +191,13 @@ void fastboot_handle_boot(int command, bool success) switch (command) { case FASTBOOT_COMMAND_BOOT: fastboot_boot(); -#if CONFIG_IS_ENABLED(NET) +#if CONFIG_IS_ENABLED(NET_LEGACY) net_set_state(NETLOOP_SUCCESS); #endif break; case FASTBOOT_COMMAND_CONTINUE: -#if CONFIG_IS_ENABLED(NET) +#if CONFIG_IS_ENABLED(NET_LEGACY) net_set_state(NETLOOP_SUCCESS); #endif break; diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index 11d9c8e8460..9bc782ccd02 100644 --- a/drivers/fastboot/fb_mmc.c +++ b/drivers/fastboot/fb_mmc.c @@ -263,7 +263,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc, /* Write new kernel size to boot image header */ hdr->kernel_size = download_bytes; res = blk_dwrite(dev_desc, info.start, hdr_sectors, (void *)hdr); - if (res == 0) { + if (res != hdr_sectors) { pr_err("cannot writeback boot image header\n"); fastboot_fail("cannot write back boot image header", response); return -1; @@ -275,7 +275,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc, sectors_per_page; res = blk_dwrite(dev_desc, kernel_sector_start, kernel_sectors, download_buffer); - if (res == 0) { + if (res != kernel_sectors) { pr_err("cannot write new kernel\n"); fastboot_fail("cannot write new kernel", response); return -1; @@ -287,7 +287,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc, sectors_per_page; res = blk_dwrite(dev_desc, ramdisk_sector_start, ramdisk_sectors, ramdisk_buffer); - if (res == 0) { + if (res != ramdisk_sectors) { pr_err("cannot write back original ramdisk\n"); fastboot_fail("cannot write back original ramdisk", response); return -1; |
