debug_x.c revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
#ifdef USB_DISK
/*******************************************************************************
*
*
* Copyright 2003 Steven James <pyro@linuxlabs.com> and
* LinuxLabs http://www.linuxlabs.com
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
******************************************************************************/
#include <etherboot.h>
#include <pci.h>
#include <timer.h>
#include <lib.h>
#define DEBUG_THIS DEBUG_USB
#include <debug.h>
#include "usb.h"
#include "uhci.h"
#include "debug_x.h"
//#include <string.h>
{
}
{
int i;
for(i=0;i<10; i++) {
else
}
}
{
int i=0;
while(i<len) {
if(!i%16) {
}
else {
DPRINTF(": ");
}
}
DPRINTF("\n");
}
{
#if 0
unsigned long value;
#endif
#if 0
#endif
}
{
char newpre[64];
newpre[0]='\t';
switch(td->packet_type) {
case SETUP_TOKEN:
break;
case OUT_TOKEN:
break;
case IN_TOKEN:
break;
default:
break;
}
if(td->isochronous) {
}
}
}
if(td->detect_short) {
}
}
}
}
}
}
if(td->buffer_error) {
}
DPRINTF("link loops back to me!\n");
return;
}
else
}
}
{
char newpre[64];
newpre[0] = '\t';
}
else {
}
}
}
else {
}
}
}
{
char newpre[64];
newpre[0] = '\t';
DPRINTF("\n");
}
{
char newpre[64];
int i;
newpre[0] = '\t';
for(i=0;i<MAX_EP;i++) {
}
for(i=0;i<MAX_EP;i++) {
}
}
void dump_all_usbdev(char *prefix)
{
int i;
for(i=0;i<MAX_USB_DEV;i++) {
if(usb_device[i].address) {
}
}
}
{
}
{
}
{
}
{
char newpre[64];
int i;
newpre[0] = '\t';
// now, the config itself
for(i=0; i<iface->bNumEndpoints; i++) {
}
}
// Some control message bmRequestType defines
#define CTRL_DEVICE 0
#define CONTROL_INTERFACE 1
#define CONTROL_ENDPOINT 2
#define CONTROL_OTHER 3
#define CONTROL_RECIPIENT_MASK 0x1f
#define CONTROL_TYPE_STD 0
#define CONTROL_TYPE_CLASS 0x20
#define CONTROL_CLASS_VENDOR 0x40
#define CONTROL_CLASS_MASK 0x60
#define CONTROL_OUT 0
#define CONTROL_IN 0x80
#define CONTROL_DIR_MASK 0x80
// bRequest values
#define GET_STATUS 0
#define CLEAR_FEATURE 1
#define SET_FEATURE 3
#define SET_ADDRESS 5
#define GET_DESCRIPTOR 6
#define SET_DESCRIPTOR 7
#define GET_CONFIGURATION 8
#define SET_CONFIGURATION 9
#define GET_INTERFACE 10
#define SET_INTERFACE 11
#define SYNC_FRAME 12
// descriptor types
#define DEVICE_DESC 1
#define CONFIGURATION_DESC 2
#define STRING_DESC 3
#define INTERFACE_DESC 4
#define ENDPOINT_DESC 5
#define OTHERSPEED_DESC 7
#define POWER_DESC 8
// features
#define FEATURE_HALT 0
{
}
#endif