diff options
author | Michael Brown | 2015-09-11 01:19:16 +0200 |
---|---|---|
committer | Michael Brown | 2015-09-13 13:54:30 +0200 |
commit | 6424a383231d622245514ce9d4f716a6aa607ac0 (patch) | |
tree | 89fac19e5acf219229adace17d87e52438404a4f | |
parent | [usb] Generalise zero-length packet generation logic (diff) | |
download | ipxe-6424a383231d622245514ce9d4f716a6aa607ac0.tar.gz ipxe-6424a383231d622245514ce9d4f716a6aa607ac0.tar.xz ipxe-6424a383231d622245514ce9d4f716a6aa607ac0.zip |
[ehci] Do not treat zero-length NULL pointers as unreachable
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r-- | src/drivers/usb/ehci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/usb/ehci.c b/src/drivers/usb/ehci.c index 0a89ec13..c2de53a4 100644 --- a/src/drivers/usb/ehci.c +++ b/src/drivers/usb/ehci.c @@ -603,6 +603,8 @@ static int ehci_enqueue ( struct ehci_device *ehci, struct ehci_ring *ring, /* Fail if any portion is unreachable */ for ( i = 0 ; i < count ; i++ ) { + if ( ! xfer[i].len ) + continue; phys = ( virt_to_phys ( xfer[i].data ) + xfer[i].len - 1 ); if ( ( phys > 0xffffffffUL ) && ( ! ehci->addr64 ) ) return -ENOTSUP; |