usb-core: Don't set packet state to complete on a nak
This way the hcd can re-use the same packet to retry without needing to re-init it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
		
							parent
							
								
									45b339b18c
								
							
						
					
					
						commit
						cc40997489
					
				| 
						 | 
					@ -399,8 +399,10 @@ int usb_handle_packet(USBDevice *dev, USBPacket *p)
 | 
				
			||||||
             * otherwise packets can complete out of order!
 | 
					             * otherwise packets can complete out of order!
 | 
				
			||||||
             */
 | 
					             */
 | 
				
			||||||
            assert(!p->ep->pipeline);
 | 
					            assert(!p->ep->pipeline);
 | 
				
			||||||
            p->result = ret;
 | 
					            if (ret != USB_RET_NAK) {
 | 
				
			||||||
            usb_packet_set_state(p, USB_PACKET_COMPLETE);
 | 
					                p->result = ret;
 | 
				
			||||||
 | 
					                usb_packet_set_state(p, USB_PACKET_COMPLETE);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        ret = USB_RET_ASYNC;
 | 
					        ret = USB_RET_ASYNC;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue