Some USB code changes by Ben Lunt

- USB xHCI NAK handling fix by Ben. Now openSUSE 13.2 boots without hang with
  hub connected to an xHCI port.
- Updated Ben's email address and year in some copyright headers.
This commit is contained in:
Volker Ruppert 2016-12-02 17:30:16 +00:00
parent 3341ca6cff
commit 185ae80925
11 changed files with 21 additions and 17 deletions

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2009 Benjamin D Lunt (fys at frontiernet net)
// Copyright (C) 2009-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2009-2016 The Bochs Project
//
// This library is free software; you can redistribute it and/or

View File

@ -5,7 +5,7 @@
// Generic USB emulation code
//
// Copyright (c) 2005 Fabrice Bellard
// Copyright (C) 2009 Benjamin D Lunt (fys at frontiernet net)
// Copyright (C) 2009-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2009-2016 The Bochs Project
//
// Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -3,7 +3,7 @@
/////////////////////////////////////////////////////////////////////////
//
// USB HID emulation support (mouse and tablet) ported from QEMU
// USB keypad emulation based on code by Benjamin D Lunt (fys at frontiernet net)
// USB keypad emulation based on code by Benjamin D Lunt (fys [at] fysnet [dot] net)
//
// Copyright (c) 2005 Fabrice Bellard
// Copyright (c) 2007 OpenMoko, Inc. (andrew@openedhand.com)
@ -29,7 +29,7 @@
/////////////////////////////////////////////////////////////////////////
// Portions of this file contain code released under the LGPL.
//
// Copyright (C) 2004/2005 Benjamin D Lunt (fys at frontiernet net)
// Copyright (C) 2004-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -3,11 +3,11 @@
/////////////////////////////////////////////////////////////////////////
//
// USB HID emulation support (mouse and tablet) ported from QEMU
// USB keypad emulation based on code by Benjamin D Lunt (fys at frontiernet net)
// USB keypad emulation based on code by Benjamin D Lunt (fys [at] fysnet [dot] net)
//
// Copyright (c) 2005 Fabrice Bellard
// Copyright (c) 2007 OpenMoko, Inc. (andrew@openedhand.com)
// Copyright (C) 2009-2012 The Bochs Project
// Copyright (C) 2009-2016 The Bochs Project
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2009 Benjamin D Lunt (fys at frontiernet net)
// Copyright (C) 2009-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2009-2016 The Bochs Project
//
// This library is free software; you can redistribute it and/or

View File

@ -2,8 +2,8 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2009 Benjamin D Lunt (fys at frontiernet net)
// 2009-2015 The Bochs Project
// Copyright (C) 2009-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2009-2016 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2009 Benjamin D Lunt (fys at frontiernet net)
// Copyright (C) 2009-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2009-2016 The Bochs Project
//
// This library is free software; you can redistribute it and/or

View File

@ -2,8 +2,8 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2009 Benjamin D Lunt (fys at frontiernet net)
// 2009-2012 The Bochs Project
// Copyright (C) 2009-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2009-2016 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -2,8 +2,8 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2009 Benjamin D Lunt (fys at frontiernet net)
// 2009-2015 The Bochs Project
// Copyright (C) 2009-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2009-2016 The Bochs Project
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2010-2014 Benjamin D Lunt (fys [at] fysnet [dot] net)
// Copyright (C) 2010-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2011-2016 The Bochs Project
//
// This library is free software; you can redistribute it and/or
@ -2097,6 +2097,11 @@ void bx_usb_xhci_c::process_transfer_ring(const int slot, const int ep)
if (ret == USB_RET_ASYNC) {
BX_ERROR(("Async packet handling not implemented yet"));
}
usb_packet_cleanup(&packet);
// if the device NAK'ed, we retire the TD and halt the ep
if (ret == USB_RET_NAK)
break;
// 4.10.1 paragraph 4
// 4.10.1.1
@ -2109,7 +2114,6 @@ void bx_usb_xhci_c::process_transfer_ring(const int slot, const int ep)
write_event_TRB(int_target, org_addr, TRB_SET_COMP_CODE(comp_code) | bytes_not_transferred,
TRB_SET_SLOT(slot) | TRB_SET_EP(ep) | TRB_SET_TYPE(TRANS_EVENT), 1);
}
usb_packet_cleanup(&packet);
}
}

View File

@ -2,7 +2,7 @@
// $Id$
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2010-2014 Benjamin D Lunt (fys [at] fysnet [dot] net)
// Copyright (C) 2010-2016 Benjamin D Lunt (fys [at] fysnet [dot] net)
// 2011-2016 The Bochs Project
//
// This library is free software; you can redistribute it and/or