summaryrefslogtreecommitdiffstats
path: root/src/drivers/usb
diff options
context:
space:
mode:
authorMichael Brown2015-09-11 01:19:16 +0200
committerMichael Brown2015-09-13 13:54:30 +0200
commit6424a383231d622245514ce9d4f716a6aa607ac0 (patch)
tree89fac19e5acf219229adace17d87e52438404a4f /src/drivers/usb
parent[usb] Generalise zero-length packet generation logic (diff)
downloadipxe-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>
Diffstat (limited to 'src/drivers/usb')
-rw-r--r--src/drivers/usb/ehci.c2
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;