Skip to content

Commit d7a9871

Browse files
committed
qdl: Skip ZLP on MacOS
libusb/libusb#678 Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
1 parent e51416f commit d7a9871

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

qdl/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ pub fn firehose_program_storage<T: Read + Write + FirehoseChan>(
406406
}
407407

408408
// Send a Zero-Length Packet to indicate end of stream
409-
if channel.fh_config().backend == QdlBackend::Usb {
409+
if channel.fh_config().backend == QdlBackend::Usb && !channel.fh_config().skip_usb_zlp {
410410
let _ = channel.write(&[]).expect("Error sending ZLP");
411411
}
412412

qdl/src/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ pub struct FirehoseConfiguration {
6060
pub skip_write: bool,
6161

6262
pub backend: QdlBackend,
63+
pub skip_usb_zlp: bool,
6364
pub skip_firehose_log: bool,
6465
pub verbose_firehose: bool,
6566
}
@@ -76,6 +77,8 @@ impl Default for FirehoseConfiguration {
7677
read_back_verify: false,
7778
skip_write: true,
7879
backend: QdlBackend::default(),
80+
// https://github.com/libusb/libusb/pull/678
81+
skip_usb_zlp: cfg!(target_os = "macos"),
7982
skip_firehose_log: true,
8083
verbose_firehose: false,
8184
}

0 commit comments

Comments
 (0)