From 59717efcd46ebed0e90120d846b2f7e2edb2ec48 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Mon, 7 Jan 2019 21:00:42 -0800 Subject: [PATCH] firehose: Remove unnecessary nop request The nop was added to mitigate the fact that there's a rather long delay in the response when sending out the first command. Increasing the write timeout removes this problem and it's possible to just send the configure as the first command without issues. Signed-off-by: Bjorn Andersson --- firehose.c | 7 ------- qdl.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/firehose.c b/firehose.c index a1fa128..9461b77 100644 --- a/firehose.c +++ b/firehose.c @@ -593,15 +593,8 @@ int firehose_run(struct qdl_device *qdl, const char *incdir, const char *storage int bootable; int ret; -// while (firehose_read(qdl, 100, NULL) != -ETIMEDOUT) -// ; - firehose_read(qdl, 5000, NULL); - ret = firehose_nop(qdl); - if (ret) - return ret; - if(ufs_need_provisioning()) { ret = firehose_configure(qdl, true, storage); if (ret) diff --git a/qdl.c b/qdl.c index baa9e7b..d3a627c 100644 --- a/qdl.c +++ b/qdl.c @@ -320,7 +320,7 @@ int qdl_write(struct qdl_device *qdl, const void *buf, size_t len, bool eot) bulk.ep = qdl->out_ep; bulk.len = len; bulk.data = (void *)buf; - bulk.timeout = 1000; + bulk.timeout = 10000; ret = ioctl(qdl->fd, USBDEVFS_BULK, &bulk); if (ret < 0)