HGLAN $B$H(B LAN $B$H$N:9J,(B


LAN/source_CD/linux-2.4.17_mvl21-sandpoint$B$@$1$KH/8+(B: .hhl_target_lspname
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/Makefile LAN/source_CD/linux-2.4.17_mvl21-sandpoint/Makefile
*** HGLAN/source_CD/linux-2.4.17_mvl21/Makefile	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/Makefile	2004-05-24 17:35:29.000000000 +0900
***************
*** 101,107 ****
  #			echo -n "`hhl-whereami`/../../devkit/`cat .hhl_target_installdir`/target"; \
  #	fi)
  
! INSTALL_MOD_PATH := /home/martin/linux-2.4.17_mvl21/modules
  MODLIB	:= $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
  export MODLIB
  
--- 101,107 ----
  #			echo -n "`hhl-whereami`/../../devkit/`cat .hhl_target_installdir`/target"; \
  #	fi)
  
! INSTALL_MOD_PATH := /home/martin/linux_mvl21-sandpoint/modules
  MODLIB	:= $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
  export MODLIB
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/boot/common/misc-simple.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/boot/common/misc-simple.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/boot/common/misc-simple.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/boot/common/misc-simple.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 35,47 ****
  #ifdef FLASH_BOOT_IMAGE
  
  #include 
  
! #define KERNEL_IMAGE_ADDRESS  0xffc00000
! #define KERNEL_IMG_SIZE_MAX   0x00400000
  struct flash_dev_func* flash = NULL;
  
- #define FLAG_ADDR 0xfff70000
- 
  void dbg_mode(void);
  #endif
  
--- 35,46 ----
  #ifdef FLASH_BOOT_IMAGE
  
  #include 
+ #include 
  
! #define KERNEL_IMAGE_ADDRESS  0xff000000
! #define KERNEL_IMG_SIZE_MAX   0x00f00000
  struct flash_dev_func* flash = NULL;
  
  void dbg_mode(void);
  #endif
  
***************
*** 125,138 ****
  	timer++;
  	if(timer>next_timer) {
  		if(led_count>0) {
! 			if(led_count & 1)
  				HWCtl_Led_Down(LED_DIAG);
  			else
  				HWCtl_Led_Up(LED_DIAG);
  			led_count--;
! 			if(led_count == 0)
  				next_timer = 6000;
! 			else
  				next_timer = 1000;
  		}
  		if(led_count==0) led_count = warn_count*2;
--- 124,137 ----
  	timer++;
  	if(timer>next_timer) {
  		if(led_count>0) {
! 			if(led_count & 1) 
  				HWCtl_Led_Down(LED_DIAG);
  			else
  				HWCtl_Led_Up(LED_DIAG);
  			led_count--;
! 			if(led_count == 0) 
  				next_timer = 6000;
! 			else 
  				next_timer = 1000;
  		}
  		if(led_count==0) led_count = warn_count*2;
***************
*** 170,176 ****
  	int i;
  	extern unsigned long start;
  	char *cp, ch;
- 	struct bi_record *rec, *birecs;
  
  #ifdef FLASH_BOOT_IMAGE
  	struct firminfo* info;
--- 169,174 ----
***************
*** 181,201 ****
  	com_port = serial_init(1,CONSOLE_PORT);
  
  #ifdef FLASH_BOOT_IMAGE
! 
! 	if (check_pci_device(11, VID_REALTEK, DID_RTL8110S, 0) != 0)
! 		if (check_pci_device(11, VID_REALTEK, DID_RTL8110S_NULL, 0) != 0)
! 			if (check_pci_device(11, 0xEC10, 0x6981, 0) != 0) {
! 				puts("not found RTL8110S!\n");
! 				while(1) outb(0x80004500, 0x6F);
! 			}
! 
! 	if (check_pci_device(12, VID_SiI, DID_SiI680, 0) != 0)
! 		while(1) outb(0x80004500, 0x6F);
! 
! 	if ((check_pci_device(14, VID_NEC, DID_720101_U1, 0) != 0) ||
! 	    (check_pci_device(14, VID_NEC, DID_720101_U2, 2) != 0))
! 		while(1) outb(0x80004500, 0x6F);
! 
  #endif
  
  	/* assume the chunk below 8M is free */
--- 179,187 ----
  	com_port = serial_init(1,CONSOLE_PORT);
  
  #ifdef FLASH_BOOT_IMAGE
! 	if ((check_pci_device(11, VID_ADMTEK, DID_AN983B) != 0) ||
! 	    (check_pci_device(12, VID_SiI, DID_SiI680) != 0))
! 		while(1) outb(0x80004500, 0x3A);
  #endif
  
  	/* assume the chunk below 8M is free */
***************
*** 230,236 ****
  		_printk("Fail!:invalid Firmware size\n");
  		warn_count = 2;
  		timer_proc = warning_led;
! 		while(1) outb(0x80004500, 0x6B);
  	}
  	
  	if (info->initrd_size < 1
--- 216,222 ----
  		_printk("Fail!:invalid Firmware size\n");
  		warn_count = 2;
  		timer_proc = warning_led;
! 		while(1) outb(0x80004500, 0x29);
  	}
  	
  	if (info->initrd_size < 1
***************
*** 245,252 ****
  		_printk("Fail!:checksum error %08X\n",checksum_check((unsigned char*)info,info->size));
  		warn_count = 2;
  		timer_proc = warning_led;
! 		while(1) outb(0x80004500, 0x6B);
  	}
  	_printk("done.\n");
  	zimage_start = (char*)info + info->kernel_offset;
  	zimage_size  = (int)info->kernel_size;
--- 231,239 ----
  		_printk("Fail!:checksum error %08X\n",checksum_check((unsigned char*)info,info->size));
  		warn_count = 2;
  		timer_proc = warning_led;
! 		while(1) outb(0x80004500, 0x2A);
  	}
+ 
  	_printk("done.\n");
  	zimage_start = (char*)info + info->kernel_offset;
  	zimage_size  = (int)info->kernel_size;
***************
*** 254,260 ****
  		initrd_start = (unsigned long)((char*)info + info->initrd_offset);
  		initrd_end   = initrd_start + info->initrd_size;
  		
! 		if(initrd_start > 0xffc00000 && initrd_end<0xffefffff) {
  			avail_ram = (char *)PAGE_ALIGN((unsigned long)_end);
  			memcpy ((void *)avail_ram, (void *)initrd_start, info->initrd_size);
  			initrd_start = (unsigned long)avail_ram;
--- 241,247 ----
  		initrd_start = (unsigned long)((char*)info + info->initrd_offset);
  		initrd_end   = initrd_start + info->initrd_size;
  		
! 		if(initrd_start > 0xff000000 && initrd_end<0xffefffff) {
  			avail_ram = (char *)PAGE_ALIGN((unsigned long)_end);
  			memcpy ((void *)avail_ram, (void *)initrd_start, info->initrd_size);
  			initrd_start = (unsigned long)avail_ram;
***************
*** 310,316 ****
  			puts(" "); puthex(initrd_end); puts("\n");
  		}
  	} else if ( initrd_start ) {
! 		if ((unsigned long)zimage_start >= 0xffc00000) {
  			memcpy( (void *)avail_ram, (void *)zimage_start, zimage_size );
  			zimage_start = (char *)avail_ram;
  			puts("relocated to:  "); puthex((unsigned long)zimage_start);
--- 297,303 ----
  			puts(" "); puthex(initrd_end); puts("\n");
  		}
  	} else if ( initrd_start ) {
! 		if ((unsigned long)zimage_start >= 0xff000000) {
  			memcpy( (void *)avail_ram, (void *)zimage_start, zimage_size );
  			zimage_start = (char *)avail_ram;
  			puts("relocated to:  "); puthex((unsigned long)zimage_start);
***************
*** 382,405 ****
  	gunzip(0, 0x400000, zimage_start, &zimage_size);
  	puts("done.\n");
  
- 	outb(0x80004500, 0x49);
- 	outb(0x80004500, 0x49);
- 	outb(0x80004500, 0x49);
- 	outb(0x80004500, 0x49);
- 
- 	udelay(10000);
- 	outb(0x80004500, 0x5D);
- 	outb(0x80004500, 0x5D);
- 	outb(0x80004500, 0x5D);
- 	outb(0x80004500, 0x5D);
- 
  	puts("Now Booting\n");
  }
  
  #ifdef FLASH_BOOT_IMAGE
  #define b2llong(a) \
  	((a & 0xff000000)>>24) + ((a & 0x00ff0000)>>8)  + \
! 	((a & 0x0000ff00)<<8 ) + ((a & 0x000000ff)<<24)
  #define bit(a) 1<>24) + ((a & 0x00ff0000)>>8)  + \
! 	((a & 0x0000ff00)<<8 ) + ((a & 0x000000ff)<<24) 
  #define bit(a) 1<
  
  struct flash_dev_func* flash_list[] = {
  	&flash_toshiba,
--- 445,451 ----
  
  
  #define printk   _printk
! #include 
  
  struct flash_dev_func* flash_list[] = {
  	&flash_toshiba,
***************
*** 517,527 ****
  	unsigned long *datap,data;
  	int   i;
  	static int tgl = 0;
! 
  	str_trim(¶m);
  	arg1 = str_trim(¶m);
  	arg2 = str_trim(¶m);
! 
  	if(*arg1 != '\0' && arg2 != '\0') {
  		adr = hextolong(arg1);
  		if(adr >= 0x10000 || adr & 0x0f) return DBG_NG_OUT_OF_AREA;
--- 493,503 ----
  	unsigned long *datap,data;
  	int   i;
  	static int tgl = 0;
! 	
  	str_trim(¶m);
  	arg1 = str_trim(¶m);
  	arg2 = str_trim(¶m);
! 	
  	if(*arg1 != '\0' && arg2 != '\0') {
  		adr = hextolong(arg1);
  		if(adr >= 0x10000 || adr & 0x0f) return DBG_NG_OUT_OF_AREA;
***************
*** 542,548 ****
  			}
  		}
  	else return DBG_NG_FEW_PARAM;
! 
  	if(tgl) {HWCtl_Led_Down(LED_BLINK1);HWCtl_Led_Up(LED_BLINK2);}
  	else    {HWCtl_Led_Down(LED_BLINK2);HWCtl_Led_Up(LED_BLINK1);}
  	tgl = (tgl==0);
--- 518,524 ----
  			}
  		}
  	else return DBG_NG_FEW_PARAM;
! 	
  	if(tgl) {HWCtl_Led_Down(LED_BLINK1);HWCtl_Led_Up(LED_BLINK2);}
  	else    {HWCtl_Led_Down(LED_BLINK2);HWCtl_Led_Up(LED_BLINK1);}
  	tgl = (tgl==0);
***************
*** 569,581 ****
  			_printk("checksum fail:%08X %08X\n",sum,checksum_check(buff,0x10000));
  			return DBG_NG_SUM_ERROR;
  			}
! 		if(adrKERNEL_IMAGE_ADDRESS+KERNEL_IMG_SIZE_MAX
  		|| adr+0x10000>KERNEL_IMAGE_ADDRESS+KERNEL_IMG_SIZE_MAX
  		|| (adr & 0x0000ffff) > 0) {
  			return DBG_NG_OUT_OF_AREA;
  			}
! 
  		{HWCtl_Led_Down(LED_BLINK1);HWCtl_Led_Up(LED_BLINK2);}
  		if(flash->blk_erase(adr,1)) {
  			return DBG_NG_FAIL_ERASE;
--- 545,557 ----
  			_printk("checksum fail:%08X %08X\n",sum,checksum_check(buff,0x10000));
  			return DBG_NG_SUM_ERROR;
  			}
! 		if(adrKERNEL_IMAGE_ADDRESS+KERNEL_IMG_SIZE_MAX
  		|| adr+0x10000>KERNEL_IMAGE_ADDRESS+KERNEL_IMG_SIZE_MAX
  		|| (adr & 0x0000ffff) > 0) {
  			return DBG_NG_OUT_OF_AREA;
  			}
! 		
  		{HWCtl_Led_Down(LED_BLINK1);HWCtl_Led_Up(LED_BLINK2);}
  		if(flash->blk_erase(adr,1)) {
  			return DBG_NG_FAIL_ERASE;
***************
*** 637,643 ****
  	return DBG_OK;
  	}
  
! int dbg_ledstop(char* p)
  {
  	timer_proc = NULL;
  	return 0;
--- 613,619 ----
  	return DBG_OK;
  	}
  
! int dbg_ledstop(char* p) 
  {
  	timer_proc = NULL;
  	return 0;
***************
*** 662,668 ****
  	{NULL,			NULL}
  	};
  
! int dbg_help(char* p)
  {
  	struct dbg_cmdlist* list = dbg_commands;
  	int j,i;
--- 638,644 ----
  	{NULL,			NULL}
  	};
  
! int dbg_help(char* p) 
  {
  	struct dbg_cmdlist* list = dbg_commands;
  	int j,i;
***************
*** 710,721 ****
  	}
  }
  
! void print_pci_config_reg(unsigned long idsel, unsigned long fn) {
  
  	unsigned int offset;
  	unsigned long reg, in_reg;
  
! 	reg = (0x80 << 24) + (idsel << 11) + (fn << 8);
  
  	_printk("PCI IDSEL%d device configuration registers\n", idsel);
  	for (offset = 0x00; offset < 0x40; offset += 4) {
--- 686,710 ----
  	}
  }
  
! void print_pci_config_reg(int idsel) {
  
  	unsigned int offset;
  	unsigned long reg, in_reg;
  
! 	switch (idsel) {
! 		case 11:
! 			reg = 0x80005800UL;
! 			break;
! 		case 12:
! 			reg = 0x80006000UL;
! 			break;
! 		case 13:
! 			reg = 0x80006800UL;
! 			break;
! 		default:
! 			reg = 0x80006000UL;
! 			break;
! 	}
  
  	_printk("PCI IDSEL%d device configuration registers\n", idsel);
  	for (offset = 0x00; offset < 0x40; offset += 4) {
***************
*** 724,729 ****
  	}
  
  }
! #endif // #ifdef FLASH_BOOT_IMAGE
  
  
--- 713,718 ----
  	}
  
  }
! #endif
  
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/boot/sandpoint/head.S LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/boot/sandpoint/head.S
*** HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/boot/sandpoint/head.S	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/boot/sandpoint/head.S	2004-05-24 17:35:29.000000000 +0900
***************
*** 20,26 ****
  #include 
  #include 
  
! #define RAM_SIZE        0x08000000
  #define DEC_COUNT       0x00002000
  
  #define WM32(address,data) \
--- 20,26 ----
  #include 
  #include 
  
! #define RAM_SIZE        0x04000000
  #define DEC_COUNT       0x00002000
  
  #define WM32(address,data) \
***************
*** 70,77 ****
  #endif
  
  start:
! 	bl	start_ 
! 	
  #ifdef FLASH_BOOT_IMAGE
  		.space	(0x100-4)
  	rfi
--- 70,77 ----
  #endif
  
  start:
! 	bl	start_
! 
  #ifdef FLASH_BOOT_IMAGE
  		.space	(0x100-4)
  	rfi
***************
*** 156,176 ****
  	mtspr	HID0,r4
  	sync
  	isync
! 	
  	ori	r4,r4,0x8000
  	ori	r8,r4,0x0800
  	isync
  	mtspr	HID0,r8
  	sync
  	isync
! 	
  	mtspr	HID0,r4
  	sync
  	isync
  
  
  #ifdef FLASH_BOOT_IMAGE
! melco_config_start:	
  	WM32(0xFEC00000,0x0d000080)
  	WM8(0xFEE00001,0x20)
  	WM32(0xFEC00000,0x0c000080)
--- 156,176 ----
  	mtspr	HID0,r4
  	sync
  	isync
! 
  	ori	r4,r4,0x8000
  	ori	r8,r4,0x0800
  	isync
  	mtspr	HID0,r8
  	sync
  	isync
! 
  	mtspr	HID0,r4
  	sync
  	isync
  
  
  #ifdef FLASH_BOOT_IMAGE
! melco_config_start:
  	WM32(0xFEC00000,0x0d000080)
  	WM8(0xFEE00001,0x20)
  	WM32(0xFEC00000,0x0c000080)
***************
*** 178,199 ****
  	WM32(0xFEC00000,0x04000080)
  	WM16(0xFEE00000,0x0600)
  	WM32(0xFEC00000,0xa8000080)
! 	lis	r3, 0xFEE00000@h 
  	ori	r3, r3, 0xFEE00000@l
! 	
  	lwz r5, 0(r3)
  	lis r4, 0x0
  	ori r4, r4, 0x1000
  	and r5, r4, r5
! 		
  	lis	r4, 0xd8130400@h
  	ori	r4, r4, 0xd8130400@l
  	or  r4, r4, r5
! 	
  	stw	r4, 0x0000(r3)
  	sync
  	isync
! 	
  	WM32(0xFEC00000,0xac000080)
  	WM32(0xFEE00000,0x00000004)
  	WM32(0xFEC00000,0x78000080)
--- 178,199 ----
  	WM32(0xFEC00000,0x04000080)
  	WM16(0xFEE00000,0x0600)
  	WM32(0xFEC00000,0xa8000080)
! 	lis	r3, 0xFEE00000@h
  	ori	r3, r3, 0xFEE00000@l
! 
  	lwz r5, 0(r3)
  	lis r4, 0x0
  	ori r4, r4, 0x1000
  	and r5, r4, r5
! 
  	lis	r4, 0xd8130400@h
  	ori	r4, r4, 0xd8130400@l
  	or  r4, r4, r5
! 
  	stw	r4, 0x0000(r3)
  	sync
  	isync
! 
  	WM32(0xFEC00000,0xac000080)
  	WM32(0xFEE00000,0x00000004)
  	WM32(0xFEC00000,0x78000080)
***************
*** 215,221 ****
  	WM32(0xFEC00000,0x84000080)
  	WM32(0xFEE00000,0xFFFFFFFF)
  	WM32(0xFEC00000,0x90000080)
! 	WM32(0xFEE00000,0x7FFFFFFF)
  	WM32(0xFEC00000,0x94000080)
  	WM32(0xFEE00000,0xFFFFFFFF)
  	WM32(0xFEC00000,0x88000080)
--- 215,221 ----
  	WM32(0xFEC00000,0x84000080)
  	WM32(0xFEE00000,0xFFFFFFFF)
  	WM32(0xFEC00000,0x90000080)
! 	WM32(0xFEE00000,0x3FFFFFFF)
  	WM32(0xFEC00000,0x94000080)
  	WM32(0xFEE00000,0xFFFFFFFF)
  	WM32(0xFEC00000,0x88000080)
***************
*** 227,247 ****
  	WM32(0xFEC00000,0x9C000080)
  	WM32(0xFEE00000,0x03030303)
  	WM32(0xFEC00000,0xf0000080)
! 	WM32(0xFEE00000,0x0200E005)
  	WM32(0xFEC00000,0xf4000080)
! 	WM32(0xFEE00000,0x8015000e)
! 	WM32(0xFEC00000,0xf8000080)	
  	WM32(0xFEE00000,0x00000077)
  	WM32(0xFEC00000,0xfc000080)
! 	WM32(0xFEE00000,0x29323222)
  	WM32(0xFEC00000,0x73000080)
! 	WM8(0xFEE00003,0x15)
  	WM32(0xFEC00000,0x74000080)
  	WM16(0xFEE00000,0x7078)
  	WM32(0xFEC00000,0xa0000080)
  	WM8(0xFEE00000, 0x01)
  	WM32(0xFEC00000,0xa3000080)
! 	WM8(0xFEE00003,0xC9)
  	WM32(0xFEC00000,0xd0000080)
  	WM32(0xFEE00000,0xffffff85)
  	WM32(0xFEC00000,0xd4000080)
--- 227,247 ----
  	WM32(0xFEC00000,0x9C000080)
  	WM32(0xFEE00000,0x03030303)
  	WM32(0xFEC00000,0xf0000080)
! 	WM32(0xFEE00000,0x0000E005)
  	WM32(0xFEC00000,0xf4000080)
! 	WM32(0xFEE00000,0xe015000e)
! 	WM32(0xFEC00000,0xf8000080)
  	WM32(0xFEE00000,0x00000077)
  	WM32(0xFEC00000,0xfc000080)
! 	WM32(0xFEE00000,0x29223222)
  	WM32(0xFEC00000,0x73000080)
! 	WM8(0xFEE00003,0x95)
  	WM32(0xFEC00000,0x74000080)
  	WM16(0xFEE00000,0x7078)
  	WM32(0xFEC00000,0xa0000080)
  	WM8(0xFEE00000, 0x01)
  	WM32(0xFEC00000,0xa3000080)
! 	WM8(0xFEE00003,0x92)
  	WM32(0xFEC00000,0xd0000080)
  	WM32(0xFEE00000,0xffffff85)
  	WM32(0xFEC00000,0xd4000080)
***************
*** 251,270 ****
  	WM32(0xFEC00000,0xdc000080)
  	WM32(0xFEE00000,0x0e000000)
  	WM32(0xFEC00000,0xf0000080)
! 	WM32(0xFEE00000,0x0200E805)
  	WM8(0x80004503,0x00)
  	WM8(0x80004501,0x00)
  	WM8(0x80004503,0x80)
  	WM8(0x80004511,0x01)
! 	WM8(0x80004500,0x61)
! 	WM8(0x80004501,0x03)
  	WM8(0x80004503,0x1b)
  	WM8(0x80004500,0x00)
  	WM8(0x80004502,0x07)
  
! melco_config_end:	
  #endif
! 	
  	lis r3, 0x8000
  	ori r3, r3, 0x0004
  	lis r4, 0xFEC0
--- 251,270 ----
  	WM32(0xFEC00000,0xdc000080)
  	WM32(0xFEE00000,0x0e000000)
  	WM32(0xFEC00000,0xf0000080)
! 	WM32(0xFEE00000,0x0000E805)
  	WM8(0x80004503,0x00)
  	WM8(0x80004501,0x00)
  	WM8(0x80004503,0x80)
  	WM8(0x80004511,0x01)
! 	WM8(0x80004500,0x8B)
! 	WM8(0x80004501,0x02)
  	WM8(0x80004503,0x1b)
  	WM8(0x80004500,0x00)
  	WM8(0x80004502,0x07)
  
! melco_config_end:
  #endif
! 
  	lis r3, 0x8000
  	ori r3, r3, 0x0004
  	lis r4, 0xFEC0
***************
*** 282,306 ****
  
  #ifdef FLASH_BOOT_IMAGE
  check_ram:
- 	lis r3,     1000
- 	mulli	r4,r3,1000
- 	addi	r4,r4,59
- 	li	r5,60
- 	divw	r4,r4,r5
- 1:	mftbu	r5
- 	mftb	r6
- 	mftbu	r7
- 	cmp	0,r5,r7
- 	bne	1b
- 	addc	r9,r6,r4
- 	addze	r8,r5
- 2:	mftbu	r5
- 	cmp	0,r5,r8
- 	blt	2b
- 	bgt	3f
- 	mftb	r6
- 	cmp	0,r6,r9
- 	blt	2b
  	xor r4,r4,r4
  	lis r5,     RAM_SIZE@h
  	ori r5, r5, RAM_SIZE@l
--- 282,287 ----
***************
*** 310,316 ****
  	ori r7, r7, 0x5555
  	lis r8,     0x0000
  	ori r8, r8, 0x0100
! check_ram_loop:	
  	cmp 0,r4,r5
  	beq  check_ram_end
  	stw r6,0(r4)
--- 291,297 ----
  	ori r7, r7, 0x5555
  	lis r8,     0x0000
  	ori r8, r8, 0x0100
! check_ram_loop:
  	cmp 0,r4,r5
  	beq  check_ram_end
  	stw r6,0(r4)
***************
*** 328,334 ****
  	add r4,r4,r8
  	b   check_ram_loop
  ram_error:
! 	WM8(0x80004500,0x6F)
  	b   ram_error
  check_ram_end:
  #endif
--- 309,315 ----
  	add r4,r4,r8
  	b   check_ram_loop
  ram_error:
! 	WM8(0x80004500,0x39)
  	b   ram_error
  check_ram_end:
  #endif
***************
*** 433,441 ****
  	stwu  r1,-16(r1)
  	stw   r3,8(r1)
  	stw   r4,12(r1)
! 	
  	WM32(timer_proc,0x00000000)
! 	
  	lis 	r4  , 0x0
  	ori 	r4,r4,0x400 /* 1000 clock */
  	sync
--- 414,422 ----
  	stwu  r1,-16(r1)
  	stw   r3,8(r1)
  	stw   r4,12(r1)
! 
  	WM32(timer_proc,0x00000000)
! 
  	lis 	r4  , 0x0
  	ori 	r4,r4,0x400 /* 1000 clock */
  	sync
***************
*** 452,458 ****
  	mtmsr	r3
  	sync
  	isync
! 	
  	lwz   r3,8(r1)
  	lwz   r4,12(r1)
  	la    r1,16(r1)
--- 433,439 ----
  	mtmsr	r3
  	sync
  	isync
! 
  	lwz   r3,8(r1)
  	lwz   r4,12(r1)
  	la    r1,16(r1)
***************
*** 462,468 ****
  	stwu  r1,-16(r1)
  	stw   r3,8(r1)
  	stw   r4,12(r1)
! 	
  	mfmsr	r3
  	li		r4,0
  	ori		r4,r4,MSR_EE
--- 443,449 ----
  	stwu  r1,-16(r1)
  	stw   r3,8(r1)
  	stw   r4,12(r1)
! 
  	mfmsr	r3
  	li		r4,0
  	ori		r4,r4,MSR_EE
***************
*** 472,478 ****
  	mtmsr	r3
  	sync
  	isync
! 	
  	lwz   r3,8(r1)
  	lwz   r4,12(r1)
  	la    r1,16(r1)
--- 453,459 ----
  	mtmsr	r3
  	sync
  	isync
! 
  	lwz   r3,8(r1)
  	lwz   r4,12(r1)
  	la    r1,16(r1)
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/kernel/melco_hwctl.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/kernel/melco_hwctl.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/kernel/melco_hwctl.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/kernel/melco_hwctl.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 241,252 ****
  	return ret;
  }
  
! int check_pci_device(int idsel, unsigned short vid, unsigned short did, int fn) 
  {
  	unsigned int offset;
  	unsigned long base, in_reg;
  
! 	base = (0x80 << 24) + (idsel << 11) + (fn << 8);
  
  	out_ledw((unsigned long *)PCI_CONFIG_ADDR, base);
  	in_reg = in_ledw((unsigned long *)PCI_CONFIG_DATA);
--- 241,266 ----
  	return ret;
  }
  
! int check_pci_device(int idsel, unsigned short vid, unsigned short did) 
  {
+ 
  	unsigned int offset;
  	unsigned long base, in_reg;
  
! 	switch (idsel) {
! 		case 11:
! 			base = 0x80005800UL;
! 			break;
! 		case 12:
! 			base = 0x80006000UL;
! 			break;
! 		case 13:
! 			base = 0x80006800UL;
! 			break;
! 		default:
! 			base = 0x80006000UL;
! 			break;
! 	}
  
  	out_ledw((unsigned long *)PCI_CONFIG_ADDR, base);
  	in_reg = in_ledw((unsigned long *)PCI_CONFIG_DATA);
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/kernel/melco_rtc.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/kernel/melco_rtc.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/kernel/melco_rtc.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/kernel/melco_rtc.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 227,232 ****
--- 227,233 ----
  	int		hid0;
  
  	melco_rtc_init();
+ #if 0
  	loop_count = 0;
  
  	sec = melco_get_sec();
***************
*** 254,263 ****
  		freq -= tbl;
  	} while ((get_tbu() != tbu) && (++loop_count < 2));
  
! 	if (freq > 32700000)
! 		freq = 32768000;
! 	tb_ticks_per_jiffy = freq / HZ;
! 	tb_to_us = mulhwu_scale_factor(freq, 1000000);
  	printk("decrementer frequency = %ld.%6ld MHz \n", freq / 1000000, freq % 1000000);
  
  	return;
--- 255,264 ----
  		freq -= tbl;
  	} while ((get_tbu() != tbu) && (++loop_count < 2));
  
! #endif
! 	freq = 32768000*3;
! 	tb_ticks_per_jiffy = freq / HZ / 4;
! 	tb_to_us = mulhwu_scale_factor(freq / 4, 1000000);
  	printk("decrementer frequency = %ld.%6ld MHz \n", freq / 1000000, freq % 1000000);
  
  	return;
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/kernel/open_pic.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/kernel/open_pic.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/kernel/open_pic.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/kernel/open_pic.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 373,378 ****
--- 373,379 ----
  		if (sense)
  			irq_desc[i+offset].status = IRQ_LEVEL;
  
+ 		/* Enabled, Priority 8 or 9 */
  		openpic_initirq(i, pri, i+offset, !sense, sense);
  		/* Processor 0 */
  		openpic_mapirq(i, 1<<0);
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/kernel/time.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/kernel/time.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/kernel/time.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/kernel/time.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 325,333 ****
  			melco_check_callender();
  		} else {
  			ulong	freq;
! 			freq = 32768000;
! 			tb_ticks_per_jiffy = freq / HZ;
! 			tb_to_us = mulhwu_scale_factor(freq, 1000000);
  		}
  	}
  
--- 325,333 ----
  			melco_check_callender();
  		} else {
  			ulong	freq;
! 			freq = 32768000*3;
! 			tb_ticks_per_jiffy = freq / HZ / 4;
! 			tb_to_us = mulhwu_scale_factor(freq / 4, 1000000);
  		}
  	}
  
***************
*** 351,356 ****
--- 351,358 ----
  		if (sec==old_sec) {
  			printk("Warning: real time clock seems stuck!\n");
  		}
+ 		printk("rtc sec count %ld\n", sec);
+ 
  		write_lock_irqsave(&xtime_lock, flags);
  		xtime.tv_sec = sec;
  		last_jiffy_stamp(0) = tb_last_stamp = stamp;
***************
*** 456,462 ****
  	int day_max = 28;
  	int cal_error = 0;
  	tm = melco_get_rtc2();
! 	if (tm.tm_year < 2003 || tm.tm_year > 2038) {
  		cal_error = 1;
  	}
  
--- 458,464 ----
  	int day_max = 28;
  	int cal_error = 0;
  	tm = melco_get_rtc2();
! 	if (tm.tm_year < 2002 || tm.tm_year > 2038) {
  		cal_error = 1;
  	}
  
***************
*** 492,499 ****
  	}
  
  	if (cal_error) {
! 		tm.tm_year = 2003;
! 		tm.tm_mon = 11;
  		tm.tm_mday = 1;
  		tm.tm_hour = 0;
  		tm.tm_min = 0;
--- 494,501 ----
  	}
  
  	if (cal_error) {
! 		tm.tm_year = 2002;
! 		tm.tm_mon = 1;
  		tm.tm_mday = 1;
  		tm.tm_hour = 0;
  		tm.tm_min = 0;
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/mm/ppc_mmu.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/mm/ppc_mmu.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/mm/ppc_mmu.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/mm/ppc_mmu.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 92,97 ****
--- 92,100 ----
  
  	unsigned long tot, done;
  
+ 	setbat(2, 0x80000000, 0x80000000, 0x01000000, _PAGE_IO);
+ 	setbat(3, 0xf8000000, 0xf8000000, 0x08000000, _PAGE_IO);
+ 
  	tot = total_lowmem;
  	setbat(2, KERNELBASE, PPC_MEMSTART, bat2, _PAGE_KERNEL);
  	done = (unsigned long)bat_addrs[2].limit - KERNELBASE + 1;
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/platforms/sandpoint_pci.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/platforms/sandpoint_pci.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/platforms/sandpoint_pci.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/platforms/sandpoint_pci.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 38,45 ****
  	{
  		{ 16, 19, 18, 17 },
  		{ 17, 16, 19, 18 },
! 		{ 19, 19, 19, 16 },
! 		{ 19, 19, 19, 16 },
  	};
  
  	const long min_idsel = 11, max_idsel = 16, irqs_per_slot = 4;
--- 38,45 ----
  	{
  		{ 16, 19, 18, 17 },
  		{ 17, 16, 19, 18 },
! 		{ 18, 17, 16, 19 },
! 		{ 19, 18, 17, 16 },
  	};
  
  	const long min_idsel = 11, max_idsel = 16, irqs_per_slot = 4;
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/platforms/sandpoint_setup.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/platforms/sandpoint_setup.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/arch/ppc/platforms/sandpoint_setup.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/arch/ppc/platforms/sandpoint_setup.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 110,115 ****
--- 110,116 ----
  
  static void	sandpoint_halt(void);
  
+ 
  /*
   * *** IMPORTANT ***
   *
***************
*** 141,147 ****
  	1,
  	1,
  	1,
! 	1,
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
--- 142,148 ----
  	1,
  	1,
  	1,
! 	0,
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
***************
*** 163,169 ****
  	1,
  	1,
  	1
! #endif
  };
  
  static void __init
--- 164,170 ----
  	1,
  	1,
  	1
! #endif // #ifdef CONFIG_SANDPOINT_X3
  };
  
  static void __init
***************
*** 182,187 ****
--- 183,190 ----
  		ROOT_DEV = to_kdev_t(0x0301);	/* /dev/hda1 IDE disk */
  #endif
  
+ 	HWCtl_Init();
+ 
  	/* Lookup PCI host bridges */
  	sandpoint_find_bridges();
  
***************
*** 190,197 ****
  	conswitchp = &dummy_con;
  #endif
  
! 	printk("BUFFALO Network Attached Storage Series\n");
! 	printk("(C) 2002,3 BUFFALO INC.\n");
  
  	/* The Sandpoint rom doesn't enable any caches.  Do that now.
  	 * The 7450 portion will also set up the L3s once I get enough
--- 193,200 ----
  	conswitchp = &dummy_con;
  #endif
  
! 	printk("MELCO Network Attached Storage Series\n");
! 	printk("2002 MELCO INC.\n");
  
  	/* The Sandpoint rom doesn't enable any caches.  Do that now.
  	 * The 7450 portion will also set up the L3s once I get enough
***************
*** 393,399 ****
  {
  	ulong	size = 0;
  
! 	size = 128*1024*1024;
  
  	return size;
  }
--- 396,402 ----
  {
  	ulong	size = 0;
  
! 	size = 64*1024*1024;
  
  	return size;
  }
***************
*** 401,407 ****
  static void __init
  sandpoint_map_io(void)
  {
- 	io_block_mapping(0xfe000000, 0xfe000000, 0x02000000, _PAGE_IO);
  	io_block_mapping(MPC10X_MAPB_EUMB_BASE, MPC10X_MAPB_EUMB_BASE, 
  						MPC10X_EUMB_SIZE, _PAGE_IO);
  
--- 404,409 ----
***************
*** 414,419 ****
--- 416,431 ----
  sandpoint_restart(char *cmd)
  {
  	__cli();
+ 
+ 	out_8(0x80004503, 0x80);
+ 	out_8(0x80004511, 0x01);
+ 
+ 	out_8(0x80004500, ((100000000 / 16) / 9600));
+ 	out_8(0x80004501, ((100000000 / 16) / 9600) >> 8);
+ 
+ 	out_8(0x80004503, 0x1b);
+ 	out_8(0x80004502, 0x07);
+ 
  #if 0
  	/* Set exception prefix high - to the firmware */
  	_nmask_and_or_msr(0, MSR_IP);
***************
*** 431,436 ****
--- 443,458 ----
  {
  	__cli();
  
+ 	out_8(0x80004503, 0x80);
+ 	out_8(0x80004511, 0x01);
+ 
+ 	out_8(0x80004500, ((100000000 / 16) / 9600));
+ 	out_8(0x80004501, ((100000000 / 16) / 9600) >> 8);
+ 
+ 	out_8(0x80004502, 0x00);
+ 
+ 	out_8(0x80004503, 0x1b);
+ 	out_8(0x80004502, 0x07);
  
  	for(;;)  /* No way to shut power off with software */
  		out_8(0x80004500, 0x47);
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/block/acsi.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/block/acsi.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/block/acsi.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/block/acsi.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1403,1410 ****
   "WORM             ",
   "CD-ROM           ",
   "Scanner          ",
!  "Optical-Device   ",
!  "Medium-Changer   ",
   "Communications   "
  };
  
--- 1403,1410 ----
   "WORM             ",
   "CD-ROM           ",
   "Scanner          ",
!  "Optical Device   ",
!  "Medium Changer   ",
   "Communications   "
  };
  
***************
*** 1446,1456 ****
  	printk(KERN_INFO "  Type:   %s ", (i < MAX_SCSI_DEVICE_CODE
  									   ? scsi_device_types[i]
  									   : "Unknown          "));
! 	printk("                 RMB: %s", (data[0] & 0x80) ?
! 										"Removable" : "HardDisk");
! 	printk("\n");
! 	printk("  ANSI SCSI revision: %02x", data[2] & 0x07);
! 
  	if ((data[2] & 0x07) == 1 && (data[3] & 0x0f) == 1)
  	  printk(" CCS\n");
  	else
--- 1446,1452 ----
  	printk(KERN_INFO "  Type:   %s ", (i < MAX_SCSI_DEVICE_CODE
  									   ? scsi_device_types[i]
  									   : "Unknown          "));
! 	printk("                 ANSI SCSI revision: %02x", data[2] & 0x07);
  	if ((data[2] & 0x07) == 1 && (data[3] & 0x0f) == 1)
  	  printk(" CCS\n");
  	else
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/block/flashdisk/flashdisk.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/block/flashdisk/flashdisk.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/block/flashdisk/flashdisk.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/block/flashdisk/flashdisk.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 45,50 ****
--- 45,51 ----
  
  #include 
  #include 
+ #include 
  
  #define	dbg_printk(args...) 
  
***************
*** 53,70 ****
  static devfs_handle_t devfs_handle;
  
  struct flash_dev_func* flash_dev_list[] = {
! 	&flash_st,
  	&flash_fujitsu,
- 	&flash_mx,
  	NULL
  	};
  
  struct flashd_list area_list[] = {
  	{ 0xFFF80000,  0x80000  , ROM_ON_BORD },
! 	{ 0xFFC00000,  0x300000 , ROM_ON_BORD },
! 	{ 0xFFF00000,  0x70000  , ROM_ON_BORD },
! 	{ 0xFFF70000,  0x10000  , ROM_ON_BORD },
! 	{ 0xFFC00000,  0x400000 , ROM_ON_BORD },
  	{ 0xFFF80000,  0x80000  , ROM_MINIPCI },
  	{ 0xFF800000,  0x600000 , ROM_MINIPCI },
  	{ 0xFFF00000,  0x80000  , ROM_MINIPCI },
--- 54,68 ----
  static devfs_handle_t devfs_handle;
  
  struct flash_dev_func* flash_dev_list[] = {
! 	&flash_toshiba,
  	&flash_fujitsu,
  	NULL
  	};
  
  struct flashd_list area_list[] = {
  	{ 0xFFF80000,  0x80000  , ROM_ON_BORD },
! 	{ 0xFF000000,  0xF00000 , ROM_ON_BORD },
! 	{ 0xFFF00000,  0x80000  , ROM_ON_BORD },
  	{ 0xFFF80000,  0x80000  , ROM_MINIPCI },
  	{ 0xFF800000,  0x600000 , ROM_MINIPCI },
  	{ 0xFFF00000,  0x80000  , ROM_MINIPCI },
***************
*** 81,87 ****
  
  int               isopened;
  int               boot_from_mini_pci=0;
- int               modifying_cash;
  
  #define FLASHD_BLOCK_SIZE 1*1024
  
--- 79,84 ----
***************
*** 188,200 ****
  
  	if(cacheinfo.dev->rom_type == ROM_MINIPCI) write_enable_winbond(dev_winbond);
  
! 	if(dev->blk_erase((unsigned long)cacheinfo.addr,1) != 0) {
! 		printk("FLASHDISK:Fatal! Can't Erase Flash!\n");
  		if(is_blink == 1)  blink_led(FLASH_UPDATE_END);
  		return -1;
  		}
  
! 	if(dev->blk_write((unsigned long)cacheinfo.addr,flash_cache,cacheinfo.size) != 0) {
  		printk("FLASHDISK:Fatal! Can't Write Flash!\n");
  		if(is_blink == 1)  blink_led(FLASH_UPDATE_END);
  		return -1;
--- 185,197 ----
  
  	if(cacheinfo.dev->rom_type == ROM_MINIPCI) write_enable_winbond(dev_winbond);
  
! 	if(dev->blk_erase((unsigned long)cacheinfo.addr,1)) {
! 		printk("FLASHDISK:Fatal! Can't Erase Flash!");
  		if(is_blink == 1)  blink_led(FLASH_UPDATE_END);
  		return -1;
  		}
  
! 	if(dev->blk_write((unsigned long)cacheinfo.addr,flash_cache,cacheinfo.size)) {
  		printk("FLASHDISK:Fatal! Can't Write Flash!\n");
  		if(is_blink == 1)  blink_led(FLASH_UPDATE_END);
  		return -1;
***************
*** 401,414 ****
  	int              len  = 0;
  	char*            buf  = page;
  	struct firminfo* info;
- 	unsigned long    *boot_flag;
  
  	if (boot_from_mini_pci)
  		info = (struct firminfo*)0xFF800000;
  	else
! 		info = (struct firminfo*)0xFFC00000;
! 	boot_flag = (unsigned long *)0xFFF70000;
  
  	len += sprintf(buf+len,"PRODUCTNAME=");
  	i=0;
  	while(ifirmname[i] != 0) {
--- 398,410 ----
  	int              len  = 0;
  	char*            buf  = page;
  	struct firminfo* info;
  
  	if (boot_from_mini_pci)
  		info = (struct firminfo*)0xFF800000;
  	else
! 		info = (struct firminfo*)0xFF000000;
  
+ 	
  	len += sprintf(buf+len,"PRODUCTNAME=");
  	i=0;
  	while(ifirmname[i] != 0) {
***************
*** 427,438 ****
  	len += sprintf(buf+len,"BUILDDATE=%d/%d/%d %d:%d:%d\n",	info->year+1900,info->mon,info->day,
  															info->hour,info->min,info->sec);
  	if(boot_from_mini_pci) len += sprintf(buf+len,"MINI_PCI_BOOT\n");
- 	if(*boot_flag == 0x4e474e47)
- 		len += sprintf(buf+len,"BOOTFLAG=NG\n");
- 	else if(*boot_flag == 0x4f4b4f4b)
- 		len += sprintf(buf+len,"BOOTFLAG=OK\n");
- 	else
- 		len += sprintf(buf+len,"BOOTFLAG=OTHER\n");
  	
  	if (len <= off+count) *eof = 1;
  	*start = page + off;
--- 423,428 ----
***************
*** 451,457 ****
  int __init flashd_init (void)
  {
  	int		               i;
! 	struct flash_dev_func* flash[1];
  	unsigned char          dev = 0; 
  	unsigned long          total_size  = 0;
  	
--- 441,447 ----
  int __init flashd_init (void)
  {
  	int		               i;
! 	struct flash_dev_func* flash[2];
  	unsigned char          dev = 0; 
  	unsigned long          total_size  = 0;
  	
***************
*** 562,568 ****
  	blk_size[MAJOR_NR]      = flashd_kbsize;
  	
  	isopened = 0;
! 
  	create_proc_read_entry("asconf_info", 0, NULL, flashd_read_proc, NULL);
  	
  	printk("Initialized ");
--- 552,558 ----
  	blk_size[MAJOR_NR]      = flashd_kbsize;
  	
  	isopened = 0;
! 	
  	create_proc_read_entry("asconf_info", 0, NULL, flashd_read_proc, NULL);
  	
  	printk("Initialized ");
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/char/mel_rtc.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/char/mel_rtc.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/char/mel_rtc.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/char/mel_rtc.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 84,109 ****
  	return len;
  }
  
- static int mel_rtc_read_proc2(char *page, char **start, off_t off,
-                          int count, int *eof, void *data)
- {
- 	char *p = page;
- 	int len;
- 	unsigned long time_sec;
- 	
- 	__cli();
- 	time_sec = melco_get_rtc();
- 	p += sprintf(p, "%ld\n", time_sec);
- 	__sti();
- 	len = (int) (p - page);
- 	if (len <= off+count) *eof = 1;
- 	*start = page + off;
- 	len -= off;
- 	if (len>count) len = count;
- 	if (len<0) len = 0;
- 	return len;
- }
- 
  static int mel_rtc_open(struct inode *inode, struct file *file)
  {
  
--- 84,89 ----
***************
*** 144,149 ****
--- 124,130 ----
  };
  
  
+ /*-------------------*/
  static int ap_read_procmem(char *page, char **start, off_t off,int count, int *eof, void *data){
  	#define LIMIT (PAGE_SIZE-80)
  	
***************
*** 159,165 ****
  	return len;
  }
  
- 
  static const char banner[] __initdata = KERN_INFO "MELCO INC. RTC driver ver 1.00\n";
  
  #define PROC_APINFO "as_info"
--- 140,145 ----
***************
*** 173,179 ****
  		return ret;
  	
  	create_proc_read_entry ("driver/rtc", 0, 0, mel_rtc_read_proc, NULL);
- 	create_proc_read_entry ("driver/rtc2", 0, 0, mel_rtc_read_proc2, NULL);
  	create_proc_read_entry (PROC_APINFO, 0, 0, &ap_read_procmem, NULL);
  
  	printk(banner);
--- 153,158 ----
***************
*** 184,190 ****
  static void __exit mel_rtc_exit(void)
  {
  	remove_proc_entry("driver/rtc", NULL);
- 	remove_proc_entry("driver/rtc2", NULL);
  	remove_proc_entry(PROC_APINFO,NULL);
  	misc_deregister(&mel_rtc_miscdev);
  }
--- 163,168 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/char/rtc.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/char/rtc.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/char/rtc.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/char/rtc.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 327,333 ****
  		 * tm_min, and tm_sec values are filled in.
  		 */
  
- 		memset(&wtime, 0, sizeof(struct rtc_time)); // BUFFALO add
  		get_rtc_alm_time(&wtime);
  		break; 
  	}
--- 327,332 ----
***************
*** 375,381 ****
  	}
  	case RTC_RD_TIME:	/* Read the time/date from RTC	*/
  	{
- 		memset(&wtime, 0, sizeof(struct rtc_time)); // BUFFALO add
  		get_rtc_time(&wtime);
  		break;
  	}
--- 374,379 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/net/Config.in LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/net/Config.in
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/net/Config.in	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/net/Config.in	2004-05-24 17:35:29.000000000 +0900
***************
*** 281,290 ****
  dep_tristate 'Packet Engines Hamachi GNIC-II support' CONFIG_HAMACHI $CONFIG_PCI
  dep_tristate 'Packet Engines Yellowfin Gigabit-NIC support (EXPERIMENTAL)' CONFIG_YELLOWFIN $CONFIG_PCI $CONFIG_EXPERIMENTAL
  dep_tristate 'SysKonnect SK-98xx support' CONFIG_SK98LIN $CONFIG_PCI
- dep_tristate 'Realtek R8110S/R8169S support' CONFIG_R8169 $CONFIG_PCI
- if [ "$CONFIG_R8169" = "y" ]; then
-    bool '  Support RTL8169 Jumbo Frame' RTL8169_JUMBO_FRAME_SUPPORT
- fi
  
  endmenu
  
--- 281,286 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/net/Makefile LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/net/Makefile
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/net/Makefile	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/net/Makefile	2004-05-24 17:35:29.000000000 +0900
***************
*** 41,47 ****
  subdir-$(CONFIG_SK98LIN) += sk98lin
  subdir-$(CONFIG_SKFP) += skfp
  
- 
  #
  # link order important here
  #
--- 41,46 ----
***************
*** 81,87 ****
  obj-$(CONFIG_STNIC) += stnic.o 8390.o
  obj-$(CONFIG_FEALNX) += fealnx.o
  obj-$(CONFIG_TC35815) += tc35815.o
- obj-$(CONFIG_R8169) += r8169.o
  
  ifeq ($(CONFIG_SK98LIN),y)
  obj-y += sk98lin/sk98lin.o
--- 80,85 ----
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/net$B$@$1$KH/8+(B: r8169.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/net$B$@$1$KH/8+(B: r8169_ioctl.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/net$B$@$1$KH/8+(B: r8169_ioctl.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/net/tulip/tulip_core.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/net/tulip/tulip_core.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/net/tulip/tulip_core.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/net/tulip/tulip_core.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1096,1102 ****
  				}
  				data = (short*)mreq->u.mac.mac;
  				for (i = 4; i < 7; i++, data++) {
! 					rval = tulip_write_eeprom(ioaddr, i, ee_addr_size, le16_to_cpu(*data));
  					if (rval==0) {
  						printk("count %d Write EEPROM Error\n", i);
  						break;
--- 1096,1102 ----
  				}
  				data = (short*)mreq->u.mac.mac;
  				for (i = 4; i < 7; i++, data++) {
! 					rval = tulip_write_eeprom(ioaddr, i, 6, le16_to_cpu(*data));
  					if (rval==0) {
  						printk("count %d Write EEPROM Error\n", i);
  						break;
***************
*** 1209,1215 ****
  						}
  					}
  					spin_lock_irqsave(&tp->lock, flags);
! 					rval = tulip_write_eeprom(ioaddr, i, ee_addr_size, le16_to_cpu(data));
  					spin_unlock_irqrestore(&tp->lock, flags);
  					if (rval==0) {
  						printk("count %d Write EEPROM Error\n", i);
--- 1209,1215 ----
  						}
  					}
  					spin_lock_irqsave(&tp->lock, flags);
! 					rval = tulip_write_eeprom(ioaddr, i, 6, le16_to_cpu(data));
  					spin_unlock_irqrestore(&tp->lock, flags);
  					if (rval==0) {
  						printk("count %d Write EEPROM Error\n", i);
***************
*** 1223,1229 ****
  					eew[i] = (u16)tulip_read_eeprom(ioaddr, i, ee_addr_size);
  					sum += eew[i];
  				}
! 				tulip_write_eeprom(ioaddr, 0x3f, ee_addr_size, -sum);
  
  				spin_unlock_irqrestore(&tp->lock, flags);
  			}
--- 1223,1229 ----
  					eew[i] = (u16)tulip_read_eeprom(ioaddr, i, ee_addr_size);
  					sum += eew[i];
  				}
! 				tulip_write_eeprom(ioaddr, 0x3f, 6, -sum);
  
  				spin_unlock_irqrestore(&tp->lock, flags);
  			}
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/scsi/scsi.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/scsi/scsi.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/scsi/scsi.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/scsi/scsi.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 135,142 ****
  	"WORM             ",
  	"CD-ROM           ",
  	"Scanner          ",
! 	"Optical-Device   ",
! 	"Medium-Changer   ",
  	"Communications   ",
  	"Unknown          ",
  	"Unknown          ",
--- 135,142 ----
  	"WORM             ",
  	"CD-ROM           ",
  	"Scanner          ",
! 	"Optical Device   ",
! 	"Medium Changer   ",
  	"Communications   ",
  	"Unknown          ",
  	"Unknown          ",
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/scsi/scsi_proc.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/scsi/scsi_proc.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/scsi/scsi_proc.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/scsi/scsi_proc.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 288,302 ****
  	y += sprintf(buffer + len + y, "\n");
  
  	y += sprintf(buffer + len + y, "  Type:   %s ",
! 			scd->type < MAX_SCSI_DEVICE_CODE ?
! 			scsi_device_types[(int) scd->type] : "Unknown          ");
! 	y += sprintf(buffer + len + y, "               RMB: %s ",
! 			scd->removable ? "Removable" : "HardDisk");
! 
! 	y += sprintf(buffer + len + y, "\n");
! 	y += sprintf(buffer + len + y, "  ANSI"
! 			" SCSI revision: %02x", (scd->scsi_level - 1) ? scd->scsi_level - 1 : 1);
! 
  	if (scd->scsi_level == 2)
  		y += sprintf(buffer + len + y, " CCS\n");
  	else
--- 288,297 ----
  	y += sprintf(buffer + len + y, "\n");
  
  	y += sprintf(buffer + len + y, "  Type:   %s ",
! 		     scd->type < MAX_SCSI_DEVICE_CODE ?
! 	       scsi_device_types[(int) scd->type] : "Unknown          ");
! 	y += sprintf(buffer + len + y, "               ANSI"
! 		     " SCSI revision: %02x", (scd->scsi_level - 1) ? scd->scsi_level - 1 : 1);
  	if (scd->scsi_level == 2)
  		y += sprintf(buffer + len + y, " CCS\n");
  	else
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/CDCEther.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/CDCEther.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/CDCEther.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/CDCEther.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,4 ****
! // Portions of this file taken from
  // Petko Manolov - Petkan (petkan@dce.bg)
  // from his driver pegasus.c
  
--- 1,4 ----
! // Portions of this file taken from 
  // Petko Manolov - Petkan (petkan@dce.bg)
  // from his driver pegasus.c
  
***************
*** 25,51 ****
  #include 
  #include 
  #include 
- #include 
- #include 
- #include 
- 
- #define DEBUG
  #include 
! 
  #include "CDCEther.h"
  
! #define SHORT_DRIVER_DESC "CDC Ethernet Class"
! #define DRIVER_VERSION "0.98.6"
  
! static const char *version = __FILE__ ": " DRIVER_VERSION " 7 Jan 2002 Brad Hards and another";
! // We only try to claim CDC Ethernet model devices */
  static struct usb_device_id CDCEther_ids[] = {
! 	{ USB_INTERFACE_INFO(USB_CLASS_COMM, 6, 0) },
! 	{ }
  };
  
! /*
!  * module parameter that provides an alternate upper limit on the
   * number of multicast filters we use, with a default to use all
   * the filters available to us. Note that the actual number used
   * is the lesser of this parameter and the number returned in the
--- 25,44 ----
  #include 
  #include 
  #include 
  #include 
! #include 
  #include "CDCEther.h"
  
! static const char *version = __FILE__ ": v0.98.5 22 Sep 2001 Brad Hards and another";
  
! /* Take any CDC device, and sort it out in probe() */
  static struct usb_device_id CDCEther_ids[] = {
! 	{ USB_DEVICE_INFO(USB_CLASS_COMM, 0, 0) },
! 	{ } /* Terminating null entry */
  };
  
! /* 
!  * module parameter that provides an alternate upper limit on the 
   * number of multicast filters we use, with a default to use all
   * the filters available to us. Note that the actual number used
   * is the lesser of this parameter and the number returned in the
***************
*** 54,59 ****
--- 47,53 ----
   */
  static int multicast_filter_limit = 32767;
  
+ 
  //////////////////////////////////////////////////////////////////////////////
  // Callback routines from USB device /////////////////////////////////////////
  //////////////////////////////////////////////////////////////////////////////
***************
*** 65,80 ****
  	int count = urb->actual_length, res;
  	struct sk_buff	*skb;
  
! 	switch ( urb->status ) {
! 		case USB_ST_NOERROR:
! 			break;
! 		case USB_ST_URB_KILLED:
! 			return;
! 		default:
! 			dbg("rx status %d", urb->status);
! 	}
! 
! 	// Sanity check
  	if ( !ether_dev || !(ether_dev->flags & CDC_ETHER_RUNNING) ) {
  		dbg("BULK IN callback but driver is not active!");
  		return;
--- 59,65 ----
  	int count = urb->actual_length, res;
  	struct sk_buff	*skb;
  
! 	// Sanity check 
  	if ( !ether_dev || !(ether_dev->flags & CDC_ETHER_RUNNING) ) {
  		dbg("BULK IN callback but driver is not active!");
  		return;
***************
*** 148,154 ****
  	// Give this to the USB subsystem so it can tell us 
  	// when more data arrives.
  	if ( (res = usb_submit_urb(ðer_dev->rx_urb)) ) {
! 		warn("%s failed submit rx_urb %d", __FUNCTION__, res);
  	}
  	
  	// We are no longer busy, show us the frames!!!
--- 133,139 ----
  	// Give this to the USB subsystem so it can tell us 
  	// when more data arrives.
  	if ( (res = usb_submit_urb(ðer_dev->rx_urb)) ) {
! 		warn( __FUNCTION__ " failed submint rx_urb %d", res);
  	}
  	
  	// We are no longer busy, show us the frames!!!
***************
*** 175,243 ****
  
  	// Hmm...  What on Earth could have happened???
  	if ( urb->status ) {
! 		dbg("%s: TX status %d", ether_dev->net->name, urb->status);
  	}
  
  	// Update the network interface and tell it we are
  	// ready for another frame
  	ether_dev->net->trans_start = jiffies;
  	netif_wake_queue( ether_dev->net );
- 
  }
  
! #if 0
! static void setpktfilter_done( struct urb *urb )
! {
! 	ether_dev_t *ether_dev = urb->context;
! 	struct net_device *net;
! 
! 	if ( !ether_dev )
! 		return;
! 	dbg("got ctrl callback for setting packet filter");
! 	switch ( urb->status ) {
! 		case USB_ST_NOERROR:
! 			break;
! 		case USB_ST_URB_KILLED:
! 			return;
! 		default:
! 			dbg("intr status %d", urb->status);
! 	}
! }
! #endif 
! 
! static void intr_callback( struct urb *urb )
! {
! 	ether_dev_t *ether_dev = urb->context;
! 	struct net_device *net;
! 	__u8	*d;
! 
! 	if ( !ether_dev )
! 		return;
! 	dbg("got intr callback");
! 	switch ( urb->status ) {
! 		case USB_ST_NOERROR:
! 			break;
! 		case USB_ST_URB_KILLED:
! 			return;
! 		default:
! 			dbg("intr status %d", urb->status);
! 	}
! 
! 	d = urb->transfer_buffer;
! 	dbg("d: %x", d[0]);
! 	net = ether_dev->net;
! 	if ( d[0] & 0xfc ) {
! 		ether_dev->stats.tx_errors++;
! 		if ( d[0] & TX_UNDERRUN )
! 			ether_dev->stats.tx_fifo_errors++;
! 		if ( d[0] & (EXCESSIVE_COL | JABBER_TIMEOUT) )
! 			ether_dev->stats.tx_aborted_errors++;
! 		if ( d[0] & LATE_COL )
! 			ether_dev->stats.tx_window_errors++;
! 		if ( d[0] & (NO_CARRIER | LOSS_CARRIER) )
! 			netif_carrier_off(net);
! 	}
! }
  
  //////////////////////////////////////////////////////////////////////////////
  // Routines for turning net traffic on and off on the USB side ///////////////
--- 160,206 ----
  
  	// Hmm...  What on Earth could have happened???
  	if ( urb->status ) {
! 		info("%s: TX status %d", ether_dev->net->name, urb->status);
  	}
  
  	// Update the network interface and tell it we are
  	// ready for another frame
  	ether_dev->net->trans_start = jiffies;
  	netif_wake_queue( ether_dev->net );
  }
  
! //static void intr_callback( struct urb *urb )
! //{
! //	ether_dev_t *ether_dev = urb->context;
! //	struct net_device *net;
! //	__u8	*d;
! //
! //	if ( !ether_dev )
! //		return;
! //		
! //	switch ( urb->status ) {
! //		case USB_ST_NOERROR:
! //			break;
! //		case USB_ST_URB_KILLED:
! //			return;
! //		default:
! //			info("intr status %d", urb->status);
! //	}
! //
! //	d = urb->transfer_buffer;
! //	net = ether_dev->net;
! //	if ( d[0] & 0xfc ) {
! //		ether_dev->stats.tx_errors++;
! //		if ( d[0] & TX_UNDERRUN )
! //			ether_dev->stats.tx_fifo_errors++;
! //		if ( d[0] & (EXCESSIVE_COL | JABBER_TIMEOUT) )
! //			ether_dev->stats.tx_aborted_errors++;
! //		if ( d[0] & LATE_COL )
! //			ether_dev->stats.tx_window_errors++;
! //		if ( d[0] & (NO_CARRIER | LOSS_CARRIER) )
! //			ether_dev->stats.tx_carrier_errors++;
! //	}
! //}
  
  //////////////////////////////////////////////////////////////////////////////
  // Routines for turning net traffic on and off on the USB side ///////////////
***************
*** 250,257 ****
  	// Here would be the time to set the data interface to the configuration where
  	// it has two endpoints that use a protocol we can understand.
  
! 	if (usb_set_interface( usb,
! 	                        ether_dev->data_bInterfaceNumber,
  	                        ether_dev->data_bAlternateSetting_with_traffic ) )  {
  		err("usb_set_interface() failed" );
  		err("Attempted to set interface %d", ether_dev->data_bInterfaceNumber);
--- 213,220 ----
  	// Here would be the time to set the data interface to the configuration where
  	// it has two endpoints that use a protocol we can understand.
  
! 	if (usb_set_interface( usb, 
! 	                        ether_dev->data_bInterfaceNumber, 
  	                        ether_dev->data_bAlternateSetting_with_traffic ) )  {
  		err("usb_set_interface() failed" );
  		err("Attempted to set interface %d", ether_dev->data_bInterfaceNumber);
***************
*** 267,274 ****
  	// no endpoints.  This is what the spec suggests.
  
  	if (ether_dev->data_interface_altset_num_without_traffic >= 0 ) {
! 		if (usb_set_interface( ether_dev->usb,
! 		                        ether_dev->data_bInterfaceNumber,
  		                        ether_dev->data_bAlternateSetting_without_traffic ) ) 	{
  			err("usb_set_interface() failed");
  		}
--- 230,237 ----
  	// no endpoints.  This is what the spec suggests.
  
  	if (ether_dev->data_interface_altset_num_without_traffic >= 0 ) {
! 		if (usb_set_interface( ether_dev->usb, 
! 		                        ether_dev->data_bInterfaceNumber, 
  		                        ether_dev->data_bAlternateSetting_without_traffic ) ) 	{
  			err("usb_set_interface() failed");
  		}
***************
*** 363,371 ****
  	return 0;
  }
  
- //////////////////////////////////////////////////////////////////////////////
- // Standard routines for kernel Ethernet Device //////////////////////////////
- //////////////////////////////////////////////////////////////////////////////
  static struct net_device_stats *CDCEther_netdev_stats( struct net_device *net )
  {
  	// Easy enough!
--- 326,331 ----
***************
*** 379,413 ****
  
  	// Turn on the USB and let the packets flow!!!
  	if ( (res = enable_net_traffic( ether_dev )) ) {
! 		err("%s can't enable_net_traffic() - %d", __FUNCTION__, res );
  		return -EIO;
  	}
  
! 	/* Prep a receive URB */
  	FILL_BULK_URB( ðer_dev->rx_urb, ether_dev->usb,
  			usb_rcvbulkpipe(ether_dev->usb, ether_dev->data_ep_in),
! 			ether_dev->rx_buff, ether_dev->wMaxSegmentSize,
  			read_bulk_callback, ether_dev );
  
! 	/* Put it out there so the device can send us stuff */
! 	if ( (res = usb_submit_urb(ðer_dev->rx_urb)) ) {
! 		/* Hmm...  Okay... */
! 		warn( "%s failed rx_urb %d", __FUNCTION__, res );
! 	}
! 
! 	if (ether_dev->properties & HAVE_NOTIFICATION_ELEMENT) {
! 		/* Arm and submit the interrupt URB */
! 		FILL_INT_URB( ðer_dev->intr_urb,
! 			ether_dev->usb,
! 			usb_rcvintpipe(ether_dev->usb, ether_dev->comm_ep_in),
! 			ether_dev->intr_buff,
! 			8, /* Transfer buffer length */
! 			intr_callback,
! 			ether_dev,
! 			ether_dev->intr_interval);
! 		if ( (res = usb_submit_urb(ðer_dev->intr_urb)) ) {
! 			warn("%s failed intr_urb %d", __FUNCTION__, res );
! 		}
  	}
  
  	// Tell the kernel we are ready to start receiving from it
--- 339,359 ----
  
  	// Turn on the USB and let the packets flow!!!
  	if ( (res = enable_net_traffic( ether_dev )) ) {
! 		err( __FUNCTION__ "can't enable_net_traffic() - %d", res );
  		return -EIO;
  	}
  
! 	// Prep a receive URB
  	FILL_BULK_URB( ðer_dev->rx_urb, ether_dev->usb,
  			usb_rcvbulkpipe(ether_dev->usb, ether_dev->data_ep_in),
! 			ether_dev->rx_buff, ether_dev->wMaxSegmentSize, 
  			read_bulk_callback, ether_dev );
  
! 	// Put it out there so the device can send us stuff
! 	if ( (res = usb_submit_urb(ðer_dev->rx_urb)) )
! 	{
! 		// Hmm...  Okay...
! 		warn( __FUNCTION__ " failed rx_urb %d", res );
  	}
  
  	// Tell the kernel we are ready to start receiving from it
***************
*** 440,572 ****
  	usb_unlink_urb( ðer_dev->rx_urb );
  	usb_unlink_urb( ðer_dev->tx_urb );
  	usb_unlink_urb( ðer_dev->intr_urb );
! 	usb_unlink_urb( ðer_dev->ctrl_urb );
! 
  	// That's it.  I'm done.
  	return 0;
  }
  
- static int netdev_ethtool_ioctl(struct net_device *netdev, void *useraddr)
- {
- 	ether_dev_t *ether_dev = netdev->priv;
- 	u32 cmd;
- 	char tmp[40];
- 
- 	if (get_user(cmd, (u32 *)useraddr))
- 		return -EFAULT;
- 
- 	switch (cmd) {
- 	/* get driver info */
- 	case ETHTOOL_GDRVINFO: {
- 	struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
- 		strncpy(info.driver, SHORT_DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
- 		strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
- 		sprintf(tmp, "usb%d:%d", ether_dev->usb->bus->busnum, ether_dev->usb->devnum);
- 		strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
- 		sprintf(tmp, "CDC %x.%x", ((ether_dev->bcdCDC & 0xff00)>>8), (ether_dev->bcdCDC & 0x00ff) );
- 		strncpy(info.fw_version, tmp, ETHTOOL_BUSINFO_LEN);
- 		if (copy_to_user(useraddr, &info, sizeof(info)))
- 			return -EFAULT;
- 		return 0;
- 	}
- 	/* get link status */
- 	case ETHTOOL_GLINK: {
- 		struct ethtool_value edata = {ETHTOOL_GLINK};
- 		edata.data = netif_carrier_ok(netdev);
- 		if (copy_to_user(useraddr, &edata, sizeof(edata)))
- 			return -EFAULT;
- 		return 0;
- 	}
- 	}
- 	dbg("Got unsupported ioctl: %x", cmd);
- 	return -EOPNOTSUPP; /* the ethtool user space tool relies on this */
- }
- 
  static int CDCEther_ioctl( struct net_device *net, struct ifreq *rq, int cmd )
  {
  	switch(cmd) {
! 	case SIOCETHTOOL:
! 		return netdev_ethtool_ioctl(net, (void *) rq->ifr_data);
! 	default:
! 		return -ENOTTY; /* per ioctl man page */
  	}
  }
  
- /* Multicast routines */
- 
  static void CDC_SetEthernetPacketFilter (ether_dev_t *ether_dev)
  {
! #if 0
! 	struct usb_ctrlrequest *dr = ðer_dev->ctrl_dr;
! 	int res;
! 
! 	dr->bRequestType = USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE;
! 	dr->bRequest = SET_ETHERNET_PACKET_FILTER;
! 	dr->wValue = cpu_to_le16(ether_dev->mode_flags);
! 	dr->wIndex = cpu_to_le16((u16)ether_dev->comm_interface);
! 	dr->wLength = 0;
! 
! 	FILL_CONTROL_URB(ðer_dev->ctrl_urb,
! 			ether_dev->usb,
  			usb_sndctrlpipe(ether_dev->usb, 0),
! 			dr,
! 			NULL,
  			NULL,
! 			setpktfilter_done,
! 			ether_dev);
! 	if ( (res = usb_submit_urb(ðer_dev->ctrl_urb)) ) {
! 		warn("%s failed submit ctrl_urb %d", __FUNCTION__, res);
! 	}
! #endif
  
- }
  
  static void CDCEther_set_multicast( struct net_device *net )
  {
  	ether_dev_t *ether_dev = net->priv;
  	int i;
  	__u8 *buff;
  
  	// Tell the kernel to stop sending us frames while we get this
  	// all set up.
  	netif_stop_queue(net);
  
! 	/* Note: do not reorder, GCC is clever about common statements. */
! 	if (net->flags & IFF_PROMISC) {
! 		/* Unconditionally log net taps. */
! 		dbg( "%s: Promiscuous mode enabled", net->name);
  		ether_dev->mode_flags = MODE_FLAG_PROMISCUOUS |
  			MODE_FLAG_ALL_MULTICAST |
  			MODE_FLAG_DIRECTED |
  			MODE_FLAG_BROADCAST |
  			MODE_FLAG_MULTICAST;
! 	} else if (net->mc_count > ether_dev->wNumberMCFilters) {
! 		/* Too many to filter perfectly -- accept all multicasts. */
! 		dbg("%s: too many MC filters for hardware, using allmulti", net->name);
  		ether_dev->mode_flags = MODE_FLAG_ALL_MULTICAST |
  			MODE_FLAG_DIRECTED |
  			MODE_FLAG_BROADCAST |
  			MODE_FLAG_MULTICAST;
  	} else if (net->flags & IFF_ALLMULTI) {
! 		/* Filter in software */
! 		dbg("%s: using allmulti", net->name);
  		ether_dev->mode_flags = MODE_FLAG_ALL_MULTICAST |
  			MODE_FLAG_DIRECTED |
  			MODE_FLAG_BROADCAST |
  			MODE_FLAG_MULTICAST;
! 	} else {
  		/* do multicast filtering in hardware */
! 		struct dev_mc_list *mclist;
! 		dbg("%s: set multicast filters", net->name);
  		ether_dev->mode_flags = MODE_FLAG_ALL_MULTICAST |
  			MODE_FLAG_DIRECTED |
  			MODE_FLAG_BROADCAST |
  			MODE_FLAG_MULTICAST;
  		buff = kmalloc(6 * net->mc_count, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
! 		for (i = 0, mclist = net->mc_list;
! 			mclist && i < net->mc_count;
! 			i++, mclist = mclist->next) {
! 				memcpy(&mclist->dmi_addr, &buff[i * 6], 6);
  		}
  #if 0
  		usb_control_msg(ether_dev->usb,
--- 386,477 ----
  	usb_unlink_urb( ðer_dev->rx_urb );
  	usb_unlink_urb( ðer_dev->tx_urb );
  	usb_unlink_urb( ðer_dev->intr_urb );
! 	
  	// That's it.  I'm done.
  	return 0;
  }
  
  static int CDCEther_ioctl( struct net_device *net, struct ifreq *rq, int cmd )
  {
+ 	//__u16 *data = (__u16 *)&rq->ifr_data;
+ 	//ether_dev_t	*ether_dev = net->priv;
+ 
+ 	// No support here yet.
+ 	// Do we need support???
  	switch(cmd) {
! 		case SIOCDEVPRIVATE:
! 			return -EOPNOTSUPP;
! 		case SIOCDEVPRIVATE+1:
! 			return -EOPNOTSUPP;
! 		case SIOCDEVPRIVATE+2:
! 			//return 0;
! 			return -EOPNOTSUPP;
! 		default:
! 			return -EOPNOTSUPP;
  	}
  }
  
  static void CDC_SetEthernetPacketFilter (ether_dev_t *ether_dev)
  {
! 	usb_control_msg(ether_dev->usb,
  			usb_sndctrlpipe(ether_dev->usb, 0),
! 			SET_ETHERNET_PACKET_FILTER, /* request */
! 			USB_TYPE_CLASS | USB_DIR_OUT | USB_RECIP_INTERFACE, /* request type */
! 			cpu_to_le16(ether_dev->mode_flags), /* value */
! 			cpu_to_le16((u16)ether_dev->comm_interface), /* index */
  			NULL,
! 			0, /* size */
! 			HZ); /* timeout */
! }	
  
  
  static void CDCEther_set_multicast( struct net_device *net )
  {
  	ether_dev_t *ether_dev = net->priv;
  	int i;
  	__u8 *buff;
+ 	
  
  	// Tell the kernel to stop sending us frames while we get this
  	// all set up.
  	netif_stop_queue(net);
  
!       /* Note: do not reorder, GCC is clever about common statements. */
!         if (net->flags & IFF_PROMISC) {
!                 /* Unconditionally log net taps. */
!                 info( "%s: Promiscuous mode enabled", net->name);
  		ether_dev->mode_flags = MODE_FLAG_PROMISCUOUS |
  			MODE_FLAG_ALL_MULTICAST |
  			MODE_FLAG_DIRECTED |
  			MODE_FLAG_BROADCAST |
  			MODE_FLAG_MULTICAST;
!         } else if (net->mc_count > ether_dev->wNumberMCFilters) {
!                 /* Too many to filter perfectly -- accept all multicasts. */
! 		info("%s: set too many MC filters, using allmulti", net->name);
  		ether_dev->mode_flags = MODE_FLAG_ALL_MULTICAST |
  			MODE_FLAG_DIRECTED |
  			MODE_FLAG_BROADCAST |
  			MODE_FLAG_MULTICAST;
  	} else if (net->flags & IFF_ALLMULTI) {
!                 /* Filter in software */
! 		info("%s: using allmulti", net->name);
  		ether_dev->mode_flags = MODE_FLAG_ALL_MULTICAST |
  			MODE_FLAG_DIRECTED |
  			MODE_FLAG_BROADCAST |
  			MODE_FLAG_MULTICAST;
!         } else {
  		/* do multicast filtering in hardware */
!                 struct dev_mc_list *mclist;
! 		info("%s: set multicast filters", net->name);
  		ether_dev->mode_flags = MODE_FLAG_ALL_MULTICAST |
  			MODE_FLAG_DIRECTED |
  			MODE_FLAG_BROADCAST |
  			MODE_FLAG_MULTICAST;
  		buff = kmalloc(6 * net->mc_count, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
!                 for (i = 0, mclist = net->mc_list;
! 		     mclist && i < net->mc_count;
!                      i++, mclist = mclist->next) {
! 			memcpy(&mclist->dmi_addr, &buff[i * 6], 6);
  		}
  #if 0
  		usb_control_msg(ether_dev->usb,
***************
*** 582,590 ****
  		kfree(buff);
  	}
  
  	CDC_SetEthernetPacketFilter(ether_dev);
! 
! 	/* Tell the kernel to start giving frames to us again. */
  	netif_wake_queue(net);
  }
  
--- 487,496 ----
  		kfree(buff);
  	}
  
+ #if 0 
  	CDC_SetEthernetPacketFilter(ether_dev);
! #endif	
!         // Tell the kernel to start giving frames to us again.
  	netif_wake_queue(net);
  }
  
***************
*** 592,633 ****
  // Routines used to parse out the Functional Descriptors /////////////////////
  //////////////////////////////////////////////////////////////////////////////
  
! /* Header Descriptor - CDC Spec 5.2.3.1, Table 26 */
! static int parse_header_functional_descriptor( int *bFunctionLength,
!                                                int bDescriptorType,
                                                 int bDescriptorSubtype,
                                                 unsigned char *data,
                                                 ether_dev_t *ether_dev,
                                                 int *requirements )
  {
! 	/* Check to make sure we haven't seen one of these already. */
  	if ( (~*requirements) & REQ_HDR_FUNC_DESCR ) {
  		err( "Multiple Header Functional Descriptors found." );
  		return -1;
  	}
! 
! 	/* Check for appropriate length */
! 	if (*bFunctionLength != HEADER_FUNC_DESC_LEN) {
! 		dbg( "Invalid length in Header Functional Descriptor, working around it." );
! 		/* This is a hack to get around a particular device (NO NAMES)
! 		 * It has this function length set to the length of the
! 		 * whole class-specific descriptor */
! 		*bFunctionLength = HEADER_FUNC_DESC_LEN;
  	}
  	
! 	/* Nothing extremely useful here */
! 	/* We'll keep it for posterity */
  	ether_dev->bcdCDC = data[0] + (data[1] << 8);
! 	dbg( "Found Header descriptor, CDC version %x.", ether_dev->bcdCDC);
  
! 	/* We've seen one of these */
  	*requirements &= ~REQ_HDR_FUNC_DESCR;
! 
! 	/* Success */
  	return 0;
  }
  
- /* Union Descriptor - CDC Spec 5.2.3.8, Table 33 */
  static int parse_union_functional_descriptor( int *bFunctionLength, 
                                                int bDescriptorType, 
                                                int bDescriptorSubtype,
--- 498,537 ----
  // Routines used to parse out the Functional Descriptors /////////////////////
  //////////////////////////////////////////////////////////////////////////////
  
! static int parse_header_functional_descriptor( int *bFunctionLength, 
!                                                int bDescriptorType, 
                                                 int bDescriptorSubtype,
                                                 unsigned char *data,
                                                 ether_dev_t *ether_dev,
                                                 int *requirements )
  {
! 	// Check to make sure we haven't seen one of these already.
  	if ( (~*requirements) & REQ_HDR_FUNC_DESCR ) {
  		err( "Multiple Header Functional Descriptors found." );
  		return -1;
  	}
! 	
! 	// Is it the right size???
! 	if (*bFunctionLength != 5) {
! 		info( "Invalid length in Header Functional Descriptor" );
! 		// This is a hack to get around a particular device (NO NAMES)
! 		// It has this function length set to the length of the
! 		// whole class-specific descriptor
! 		*bFunctionLength = 5;
  	}
  	
! 	// Nothing extremely useful here.
! 	// We'll keep it for posterity
  	ether_dev->bcdCDC = data[0] + (data[1] << 8);
! 	dbg( "Found Header descriptor, CDC version %x", ether_dev->bcdCDC);
  
! 	// We've seen one of these
  	*requirements &= ~REQ_HDR_FUNC_DESCR;
! 	
! 	// It's all good.
  	return 0;
  }
  
  static int parse_union_functional_descriptor( int *bFunctionLength, 
                                                int bDescriptorType, 
                                                int bDescriptorSubtype,
***************
*** 635,723 ****
                                                ether_dev_t *ether_dev,
                                                int *requirements )
  {
! 	/* Check to make sure we haven't seen one of these already. */
  	if ( (~*requirements) & REQ_UNION_FUNC_DESCR ) {
  		err( "Multiple Union Functional Descriptors found." );
  		return -1;
  	}
  
! 	/* Check for appropriate length */
! 	if (*bFunctionLength != UNION_FUNC_DESC_LEN) {
  		// It is NOT the size we expected.
! 		err( "Invalid length in Union Functional Descriptor." );
  		return -1;
  	}
  	
! 	/* Sanity check of sorts */
  	if (ether_dev->comm_interface != data[0]) {
! 		/* This tells us that we are chasing the wrong comm
! 		 * interface or we are crazy or something else weird. */
  		if (ether_dev->comm_interface == data[1]) {
! 			dbg( "Probably broken Union descriptor, fudging data interface." );
! 			/* We'll need this in a few microseconds,
! 			 * so if the comm interface was the first slave,
! 			 * then probably the master interface is the data one
! 			 * Just hope for the best */
  			ether_dev->data_interface = data[0];
  		} else {
! 			err( "Union Functional Descriptor is broken beyond repair." );
  			return -1;
  		}
! 	} else{ /* Descriptor is OK */
  		ether_dev->data_interface = data[1];
  	}
  
! 	/* We've seen one of these */
  	*requirements &= ~REQ_UNION_FUNC_DESCR;
! 
! 	/* Success */
  	return 0;
  }
  
! /* Ethernet Descriptor - CDC Spec 5.2.3.16, Table 41 */
! static int parse_ethernet_functional_descriptor( int *bFunctionLength,
                                                   int bDescriptorType, 
                                                   int bDescriptorSubtype,
                                                   unsigned char *data,
                                                   ether_dev_t *ether_dev,
                                                   int *requirements )
  {
! 	//* Check to make sure we haven't seen one of these already. */
  	if ( (~*requirements) & REQ_ETH_FUNC_DESCR ) {
  		err( "Multiple Ethernet Functional Descriptors found." );
  		return -1;
  	}
  	
! 	/* Check for appropriate length */
! 	if (*bFunctionLength != ETHERNET_FUNC_DESC_LEN) {
! 		err( "Invalid length in Ethernet Networking Functional Descriptor." );
  		return -1;
  	}
! 
! 	/* Lots of goodies from this one.  They are all important. */
  	ether_dev->iMACAddress = data[0];
  	ether_dev->bmEthernetStatistics = data[1] + (data[2] << 8) + (data[3] << 16) + (data[4] << 24);
  	ether_dev->wMaxSegmentSize = data[5] + (data[6] << 8);
! 	ether_dev->wNumberMCFilters = (data[7] + (data[8] << 8));
! 	if (ether_dev->wNumberMCFilters & (1 << 15)) {
! 		ether_dev->properties |= PERFECT_FILTERING;
! 		dbg("Perfect filtering support");
! 	} else {
! 		dbg("Imperfect filtering support - need sw hashing");
! 	}
! 	if (0 == (ether_dev->wNumberMCFilters & (0x7f))) {
! 		ether_dev->properties |= NO_SET_MULTICAST;
! 		dbg("Can't use SetEthernetMulticastFilters request");
! 	}
  	if (ether_dev->wNumberMCFilters > multicast_filter_limit) {
  		ether_dev->wNumberMCFilters = multicast_filter_limit;
! 	}
  	ether_dev->bNumberPowerFilters = data[9];
  	
! 	/* We've seen one of these */
  	*requirements &= ~REQ_ETH_FUNC_DESCR;
! 
! 	/* Success */
  	return 0;
  }
  
--- 539,615 ----
                                                ether_dev_t *ether_dev,
                                                int *requirements )
  {
! 	// Check to make sure we haven't seen one of these already.
  	if ( (~*requirements) & REQ_UNION_FUNC_DESCR ) {
  		err( "Multiple Union Functional Descriptors found." );
  		return -1;
  	}
  
! 	// Is it the right size?
! 	if (*bFunctionLength != 5) {
  		// It is NOT the size we expected.
! 		err( "Unsupported length in Union Functional Descriptor" );
  		return -1;
  	}
  	
! 	// Sanity check of sorts
  	if (ether_dev->comm_interface != data[0]) {
! 		// This tells us that we are chasing the wrong comm
! 		// interface or we are crazy or something else weird.
  		if (ether_dev->comm_interface == data[1]) {
! 			info( "Probably broken Union descriptor, fudging data interface" );
! 			// We'll need this in a few microseconds, 
! 			// so guess here, and hope for the best
  			ether_dev->data_interface = data[0];
  		} else {
! 			err( "Union Functional Descriptor is broken beyond repair" );
  			return -1;
  		}
! 	} else{ // Descriptor is OK
!        		// We'll need this in a few microseconds!
  		ether_dev->data_interface = data[1];
  	}
  
! 	// We've seen one of these now.
  	*requirements &= ~REQ_UNION_FUNC_DESCR;
! 	
! 	// Done
  	return 0;
  }
  
! static int parse_ethernet_functional_descriptor( int *bFunctionLength, 
                                                   int bDescriptorType, 
                                                   int bDescriptorSubtype,
                                                   unsigned char *data,
                                                   ether_dev_t *ether_dev,
                                                   int *requirements )
  {
! 	// Check to make sure we haven't seen one of these already.
  	if ( (~*requirements) & REQ_ETH_FUNC_DESCR ) {
  		err( "Multiple Ethernet Functional Descriptors found." );
  		return -1;
  	}
  	
! 	// Is it the right size?
! 	if (*bFunctionLength != 13) {
! 		err( "Invalid length in Ethernet Networking Functional Descriptor" );
  		return -1;
  	}
! 	
! 	// Lots of goodies from this one.  They are all important.
  	ether_dev->iMACAddress = data[0];
  	ether_dev->bmEthernetStatistics = data[1] + (data[2] << 8) + (data[3] << 16) + (data[4] << 24);
  	ether_dev->wMaxSegmentSize = data[5] + (data[6] << 8);
! 	ether_dev->wNumberMCFilters = (data[7] + (data[8] << 8)) & 0x00007FFF;
  	if (ether_dev->wNumberMCFilters > multicast_filter_limit) {
  		ether_dev->wNumberMCFilters = multicast_filter_limit;
! 		}	
  	ether_dev->bNumberPowerFilters = data[9];
  	
! 	// We've seen one of these now.
  	*requirements &= ~REQ_ETH_FUNC_DESCR;
! 	
! 	// That's all she wrote.
  	return 0;
  }
  
***************
*** 728,742 ****
                                                        ether_dev_t *ether_dev,
                                                        int *requirements )
  {
! 	/* There should only be one type if we are sane */
  	if (bDescriptorType != CS_INTERFACE) {
! 		err( "Invalid bDescriptorType found." );
  		return -1;
  	}
  
! 	/* The Subtype tells the tale - CDC spec Table 25 */
! 	switch (bDescriptorSubtype) {
! 		case 0x00:	/* Header Functional Descriptor */
  			return parse_header_functional_descriptor( bFunctionLength,
  			                                           bDescriptorType,
  			                                           bDescriptorSubtype,
--- 620,634 ----
                                                        ether_dev_t *ether_dev,
                                                        int *requirements )
  {
! 	// There should only be one type if we are sane
  	if (bDescriptorType != CS_INTERFACE) {
! 		info( "Invalid bDescriptorType found." );
  		return -1;
  	}
  
! 	// The Subtype tells the tale.
! 	switch (bDescriptorSubtype){
! 		case 0x00:	// Header Functional Descriptor
  			return parse_header_functional_descriptor( bFunctionLength,
  			                                           bDescriptorType,
  			                                           bDescriptorSubtype,
***************
*** 744,750 ****
  			                                           ether_dev,
  			                                           requirements );
  			break;
! 		case 0x06:	/* Union Functional Descriptor */
  			return parse_union_functional_descriptor( bFunctionLength,
  			                                          bDescriptorType,
  			                                          bDescriptorSubtype,
--- 636,642 ----
  			                                           ether_dev,
  			                                           requirements );
  			break;
! 		case 0x06:	// Union Functional Descriptor
  			return parse_union_functional_descriptor( bFunctionLength,
  			                                          bDescriptorType,
  			                                          bDescriptorSubtype,
***************
*** 752,758 ****
  			                                          ether_dev,
  			                                          requirements );
  			break;
! 		case 0x0F:	/* Ethernet Networking Functional Descriptor */
  			return parse_ethernet_functional_descriptor( bFunctionLength,
  			                                             bDescriptorType,
  			                                             bDescriptorSubtype,
--- 644,650 ----
  			                                          ether_dev,
  			                                          requirements );
  			break;
! 		case 0x0F:	// Ethernet Networking Functional Descriptor
  			return parse_ethernet_functional_descriptor( bFunctionLength,
  			                                             bDescriptorType,
  			                                             bDescriptorSubtype,
***************
*** 760,771 ****
  			                                             ether_dev,
  			                                             requirements );
  			break;
! 		default:	/* We don't support this at this time... */
! 				/* However that doesn't necessarily indicate an error. */
! 			dbg( "Unexpected header type %x.", bDescriptorSubtype );
  			return 0;
  	}
! 	/* How did we get here? */
  	return -1;
  }
  
--- 652,663 ----
  			                                             ether_dev,
  			                                             requirements );
  			break;
! 		default:	// We don't support this at this time...
! 			// However that doesn't necessarily indicate an error.
! 			dbg( "Unexpected header type %x:", bDescriptorSubtype );
  			return 0;
  	}
! 	// How did we get here???
  	return -1;
  }
  
***************
*** 776,824 ****
  	int bFunctionLength;
  	int bDescriptorType;
  	int bDescriptorSubtype;
! 	int requirements = REQUIREMENTS_TOTAL; /* We init to our needs, and then clear
! 						* bits as we find the descriptors */
  
! 	/* As long as there is something here, we will try to parse it */
! 	/* All of the functional descriptors start with the same 3 byte pattern */
  	while (loc < length) {
! 		/* Length */
  		bFunctionLength = data[loc];
  		loc++;
! 
! 		/* Type */
  		bDescriptorType = data[loc];
  		loc++;
! 
! 		/* Subtype */
  		bDescriptorSubtype = data[loc];
  		loc++;
  		
! 		/* ship this off to be processed */
  		rc = parse_protocol_unit_functional_descriptor( &bFunctionLength, 
  		                                                bDescriptorType, 
  		                                                bDescriptorSubtype, 
  		                                                &data[loc],
  		                                                ether_dev,
  		                                                &requirements );
! 		/* Did it process okay? */
  		if (rc)	{
! 			/* Something was hosed somewhere. */
! 			/*  No need to continue */
  			err("Bad descriptor parsing: %x", rc );
  			return -1;
  		}
! 		/* We move the loc pointer along, remembering
! 		 * that we have already taken three bytes */
  		loc += (bFunctionLength - 3);
  	}
! 	/* Check to see if we got everything we need. */
  	if (requirements) {
  		// We missed some of the requirements...
! 		err( "Not all required functional descriptors present 0x%08X.", requirements );
  		return -1;
  	}
! 	/* We got everything */
  	return 0;
  }
  
--- 668,713 ----
  	int bFunctionLength;
  	int bDescriptorType;
  	int bDescriptorSubtype;
! 	int requirements = REQUIREMENTS_TOTAL;
  
! 	// As long as there is something here, we will try to parse it
  	while (loc < length) {
! 		// Length
  		bFunctionLength = data[loc];
  		loc++;
! 		
! 		// Type
  		bDescriptorType = data[loc];
  		loc++;
! 		
! 		// Subtype
  		bDescriptorSubtype = data[loc];
  		loc++;
  		
! 		// ship this off to be processed elsewhere.
  		rc = parse_protocol_unit_functional_descriptor( &bFunctionLength, 
  		                                                bDescriptorType, 
  		                                                bDescriptorSubtype, 
  		                                                &data[loc],
  		                                                ether_dev,
  		                                                &requirements );
! 		// Did it process okay?
  		if (rc)	{
! 			// Something was hosed somewhere.
! 			// No need to continue;
  			err("Bad descriptor parsing: %x", rc );
  			return -1;
  		}
! 		// We have already taken three bytes.
  		loc += (bFunctionLength - 3);
  	}
! 	// Check to see if we got everything we need.
  	if (requirements) {
  		// We missed some of the requirements...
! 		err( "Not all required functional descriptors present 0x%08X", requirements );
  		return -1;
  	}
! 	// We got everything.
  	return 0;
  }
  
***************
*** 832,859 ****
  	struct usb_interface *comm_intf_group = NULL;
  	struct usb_interface_descriptor *comm_intf = NULL;
  	int rc = -1;
! 	/* The assumption here is that find_ethernet_comm_interface
! 	 * and find_valid_configuration
! 	 * have already filled in the information about where to find
! 	 * the a valid commication interface. */
  
  	conf = &( device->config[ether_dev->configuration_num] );
  	comm_intf_group = &( conf->interface[ether_dev->comm_interface] );
  	comm_intf = &( comm_intf_group->altsetting[ether_dev->comm_interface_altset_num] );
  
- 	/* Let's check and see if it has the extra information we need */
  	if (comm_intf->extralen > 0) {
! 		/* This is where the information is SUPPOSED to be */
  		rc = parse_ethernet_class_information( comm_intf->extra, comm_intf->extralen, ether_dev );
  	} else if (conf->extralen > 0) {
! 		/* This is a hack.  The spec says it should be at the interface
! 		 * location checked above.  However I have seen it here also.
! 		 * This is the same device that requires the functional descriptor hack above */
! 		dbg( "Ethernet information found at device configuration.  Trying to use it anyway." );
  		rc = parse_ethernet_class_information( conf->extra, conf->extralen, ether_dev );
  	} else 	{
! 		/* I don't know where else to look */
! 		err( "No ethernet information found." );
  		rc = -1;
  	}
  	return rc;
--- 721,748 ----
  	struct usb_interface *comm_intf_group = NULL;
  	struct usb_interface_descriptor *comm_intf = NULL;
  	int rc = -1;
! 	// The assumption here is that find_ethernet_comm_interface
! 	// and find_valid_configuration 
! 	// have already filled in the information about where to find
! 	// the a valid commication interface.
  
  	conf = &( device->config[ether_dev->configuration_num] );
  	comm_intf_group = &( conf->interface[ether_dev->comm_interface] );
  	comm_intf = &( comm_intf_group->altsetting[ether_dev->comm_interface_altset_num] );
+ 	// Let's check and see if it has the extra information we need...
  
  	if (comm_intf->extralen > 0) {
! 		// This is where the information is SUPPOSED to be.
  		rc = parse_ethernet_class_information( comm_intf->extra, comm_intf->extralen, ether_dev );
  	} else if (conf->extralen > 0) {
! 		// This is a hack.  The spec says it should be at the interface 
! 		// location checked above.  However I have seen it here also.
! 		// This is the same device that requires the functional descriptor hack above
! 		warn( "Ethernet information found at device configuration.  This is broken." );
  		rc = parse_ethernet_class_information( conf->extra, conf->extralen, ether_dev );
  	} else 	{
! 		// I don't know where else to look.
! 		warn( "No ethernet information found." );
  		rc = -1;
  	}
  	return rc;
***************
*** 868,910 ****
  	struct usb_config_descriptor *conf = NULL;
  	struct usb_interface *data_intf_group = NULL;
  	struct usb_interface_descriptor *data_intf = NULL;
! 
! 	/* Walk through and get to the data interface we are checking. */
  	conf = &( device->config[ether_dev->configuration_num] );
  	data_intf_group = &( conf->interface[ether_dev->data_interface] );
  	data_intf = &( data_intf_group->altsetting[ether_dev->data_interface_altset_num_with_traffic] );
  
! 	/* Start out assuming we won't find anything we can use */
  	ether_dev->data_ep_in = 0;
  	ether_dev->data_ep_out = 0;
! 
! 	/* If these are not BULK endpoints, we don't want them */
! 	if ( data_intf->endpoint[0].bmAttributes != USB_ENDPOINT_XFER_BULK ) {
  		return -1;
! 	}
! 	if ( data_intf->endpoint[1].bmAttributes != USB_ENDPOINT_XFER_BULK ) {
  		return -1;
  	}
  
! 	/* Check the first endpoint to see if it is IN or OUT */
! 	if ( data_intf->endpoint[0].bEndpointAddress & USB_DIR_IN ) {
  		ether_dev->data_ep_in = data_intf->endpoint[0].bEndpointAddress & 0x7F;
  	} else {
! 		ether_dev->data_ep_out = data_intf->endpoint[0].bEndpointAddress;
  		ether_dev->data_ep_out_size = data_intf->endpoint[0].wMaxPacketSize;
  	}
  
! 	/* Check the second endpoint to see if it is IN or OUT */
! 	if ( data_intf->endpoint[1].bEndpointAddress & USB_DIR_IN ) {
  		ether_dev->data_ep_in = data_intf->endpoint[1].bEndpointAddress & 0x7F;
  	} else	{
! 		ether_dev->data_ep_out = data_intf->endpoint[1].bEndpointAddress;
  		ether_dev->data_ep_out_size = data_intf->endpoint[1].wMaxPacketSize;
  	}
! 
! 	/* Now make sure we got both an IN and an OUT */
  	if (ether_dev->data_ep_in && ether_dev->data_ep_out) {
! 		dbg( "detected BULK OUT packets of size %d", ether_dev->data_ep_out_size );
  		return 0;
  	}
  	return -1;
--- 757,803 ----
  	struct usb_config_descriptor *conf = NULL;
  	struct usb_interface *data_intf_group = NULL;
  	struct usb_interface_descriptor *data_intf = NULL;
! 	
! 	// Walk through and get to the data interface we are checking.
  	conf = &( device->config[ether_dev->configuration_num] );
  	data_intf_group = &( conf->interface[ether_dev->data_interface] );
  	data_intf = &( data_intf_group->altsetting[ether_dev->data_interface_altset_num_with_traffic] );
  
! 	// Start out assuming we won't find anything we can use
  	ether_dev->data_ep_in = 0;
  	ether_dev->data_ep_out = 0;
! 	
! 	// If these are not BULK endpoints, we don't want them
! 	if ( data_intf->endpoint[0].bmAttributes != 0x02 ) {
  		return -1;
! 	} if ( data_intf->endpoint[1].bmAttributes != 0x02 ) {
  		return -1;
  	}
  
! 	// Check the first endpoint to see if it is IN or OUT
! 	if ( data_intf->endpoint[0].bEndpointAddress & 0x80 ) {
! 		// This endpoint is IN
  		ether_dev->data_ep_in = data_intf->endpoint[0].bEndpointAddress & 0x7F;
  	} else {
! 		// This endpoint is OUT
! 		ether_dev->data_ep_out = data_intf->endpoint[0].bEndpointAddress & 0x7F;
  		ether_dev->data_ep_out_size = data_intf->endpoint[0].wMaxPacketSize;
  	}
  
! 	// Check the second endpoint to see if it is IN or OUT
! 	if ( data_intf->endpoint[1].bEndpointAddress & 0x80 ) {
! 		// This endpoint is IN
  		ether_dev->data_ep_in = data_intf->endpoint[1].bEndpointAddress & 0x7F;
  	} else	{
! 		// This endpoint is OUT
! 		ether_dev->data_ep_out = data_intf->endpoint[1].bEndpointAddress & 0x7F;
  		ether_dev->data_ep_out_size = data_intf->endpoint[1].wMaxPacketSize;
  	}
! 	
! 	// Now make sure we got both an IN and an OUT
  	if (ether_dev->data_ep_in && ether_dev->data_ep_out) {
! 		// We did get both, we are in good shape...
! 		info( "detected BULK OUT packets of size %d", ether_dev->data_ep_out_size );
  		return 0;
  	}
  	return -1;
***************
*** 994,1038 ****
  		for ( altset_num = 0; altset_num < comm_intf_group->num_altsetting; altset_num++ ) {
  			comm_intf = &( comm_intf_group->altsetting[altset_num] );
  
! 			/* Good, we found one, we will try this one */
! 			/* Fill in the structure */
! 			ether_dev->comm_interface = intf_num;
! 			ether_dev->comm_bInterfaceNumber = comm_intf->bInterfaceNumber;
! 			ether_dev->comm_interface_altset_num = altset_num;
! 			ether_dev->comm_bAlternateSetting = comm_intf->bAlternateSetting;
! 
! 			// Look for the Ethernet Functional Descriptors
! 			rc = find_and_parse_ethernet_class_information( device, ether_dev );
! 			if (rc) {
! 				// Nope this was no good after all.
! 				continue;
! 			}
! 
! 			/* Check that we really can talk to the data interface
! 			 * This includes # of endpoints, protocols, etc. */
! 			rc = verify_ethernet_data_interface( device, ether_dev );
! 			if (rc)	{
! 				/* We got something we didn't like */
! 				continue;
! 			}
! 			/* It is a bit ambiguous whether the Ethernet model really requires
! 			 * the notification element (usually an interrupt endpoint) or not
! 			 * And some products (eg Sharp Zaurus) don't support it, so we
! 			 * only use the notification element if present */
! 			/* We check for a sane endpoint before using it */
! 			if ( (comm_intf->bNumEndpoints == 1) &&
! 				(comm_intf->endpoint[0].bEndpointAddress & USB_DIR_IN) &&
! 				(comm_intf->endpoint[0].bmAttributes == USB_ENDPOINT_XFER_INT)) {
! 					ether_dev->properties |= HAVE_NOTIFICATION_ELEMENT;
! 					ether_dev->comm_ep_in = (comm_intf->endpoint[0].bEndpointAddress & 0x7F);
! 					dbg("interrupt address: %x",ether_dev->comm_ep_in);
! 					ether_dev->intr_interval = (comm_intf->endpoint[0].bInterval);
! 					dbg("interrupt interval: %d",ether_dev->intr_interval);
! 			}
! 			// This communication interface seems to give us everything
! 			// we require.  We have all the ethernet info we need.
! 
! 			return 0;
  		} // end for altset_num
  	} // end for intf_num
  	return -1;
--- 887,931 ----
  		for ( altset_num = 0; altset_num < comm_intf_group->num_altsetting; altset_num++ ) {
  			comm_intf = &( comm_intf_group->altsetting[altset_num] );
  
! 			// Is this a communication class of interface of the
! 			// ethernet subclass variety.
! 			if ( ( comm_intf->bInterfaceClass == 0x02 )
! 			   && ( comm_intf->bInterfaceSubClass == 0x06 )
! 			   && ( comm_intf->bInterfaceProtocol == 0x00 ) ) {
! 				if ( comm_intf->bNumEndpoints == 1 ) {
! 					// Good, we found one, we will try this one
! 					// Fill in the structure...
! 					ether_dev->comm_interface = intf_num;
! 					ether_dev->comm_bInterfaceNumber = comm_intf->bInterfaceNumber;
! 					ether_dev->comm_interface_altset_num = altset_num;
! 					ether_dev->comm_bAlternateSetting = comm_intf->bAlternateSetting;
! 
! 					// Look for the Ethernet Functional Descriptors
! 					rc = find_and_parse_ethernet_class_information( device, ether_dev );
! 					if (rc) {
! 						// Nope this was no good after all.
! 						continue;
! 					}
! 
! 					// Check that we really can talk to the data
! 					// interface 
! 					// This includes # of endpoints, protocols,
! 					// etc.
! 					rc = verify_ethernet_data_interface( device, ether_dev );
! 					if (rc)	{
! 						// We got something we didn't like
! 						continue;
! 					}
! 					// This communication interface seems to give us everything
! 					// we require.  We have all the ethernet info we need.
! 					// Let's get out of here and go home right now.
! 					return 0;
! 				} else {
!                                         // bNumEndPoints != 1
! 					// We found an interface that had the wrong number of 
! 					// endpoints but would have otherwise been okay
! 				} // end bNumEndpoints check.
! 			} // end interface specifics check.
  		} // end for altset_num
  	} // end for intf_num
  	return -1;
***************
*** 1112,1119 ****
  
  static inline unsigned char hex2dec( unsigned char digit )
  {
! 	/* Is there a standard way to do this??? */
! 	/* I have written this code TOO MANY times. */
  	if ( (digit >= '0') && (digit <= '9') )	{
  		return (digit - '0');
  	}
--- 1005,1012 ----
  
  static inline unsigned char hex2dec( unsigned char digit )
  {
! 	// Is there a standard way to do this???
! 	// I have written this code TOO MANY times.
  	if ( (digit >= '0') && (digit <= '9') )	{
  		return (digit - '0');
  	}
***************
*** 1123,1136 ****
  	if ( (digit >= 'A') && (digit <= 'F') )	{
  		return (digit - 'A' + 10);
  	}
! 	return 16;
  }
  
- /* CDC Ethernet devices provide the MAC address as a string */
- /* We get an index to the string in the Ethernet functional header */
- /* This routine retrieves the string, sanity checks it, and sets the */
- /* MAC address in the network device */
- /* The encoding is a bit wacky - see CDC Spec Table 41 for details */
  static void set_ethernet_addr( ether_dev_t *ether_dev )
  {
  	unsigned char	mac_addr[6];
--- 1016,1024 ----
  	if ( (digit >= 'A') && (digit <= 'F') )	{
  		return (digit - 'A' + 10);
  	}
! 	return 0;
  }
  
  static void set_ethernet_addr( ether_dev_t *ether_dev )
  {
  	unsigned char	mac_addr[6];
***************
*** 1138,1144 ****
  	int 		len;
  	unsigned char	buffer[13];
  
! 	/* Let's assume we don't get anything */
  	mac_addr[0] = 0x00;
  	mac_addr[1] = 0x00;
  	mac_addr[2] = 0x00;
--- 1026,1032 ----
  	int 		len;
  	unsigned char	buffer[13];
  
! 	// Let's assume we don't get anything...
  	mac_addr[0] = 0x00;
  	mac_addr[1] = 0x00;
  	mac_addr[2] = 0x00;
***************
*** 1146,1175 ****
  	mac_addr[4] = 0x00;
  	mac_addr[5] = 0x00;
  
! 	/* Let's ask the device */
! 	if (0 > (len = usb_string(ether_dev->usb, ether_dev->iMACAddress, buffer, 13))) {
! 		err("Attempting to get MAC address failed: %d", -1*len);
! 		return;
! 	}
  
! 	/* Sanity check */
  	if (len != 12)	{
! 		/* You gotta love failing sanity checks */
  		err("Attempting to get MAC address returned %d bytes", len);
  		return;
  	}
  
! 	/* Fill in the mac_addr */
  	for (i = 0; i < 6; i++)	{
! 		if ((16 == buffer[2 * i]) || (16 == buffer[2 * i + 1])) {
! 			err("Bad value in MAC address");
! 		}
! 		else {
! 			mac_addr[i] = ( hex2dec( buffer[2 * i] ) << 4 ) + hex2dec( buffer[2 * i + 1] );
! 		}
  	}
  
! 	/* Now copy it over to our network device structure */
  	memcpy( ether_dev->net->dev_addr, mac_addr, sizeof(mac_addr) );
  }
  
--- 1034,1055 ----
  	mac_addr[4] = 0x00;
  	mac_addr[5] = 0x00;
  
! 	// Let's ask the device...
! 	len = usb_string(ether_dev->usb, ether_dev->iMACAddress, buffer, 13);
  
! 	// Sanity check!
  	if (len != 12)	{
! 		// You gotta love failing sanity checks
  		err("Attempting to get MAC address returned %d bytes", len);
  		return;
  	}
  
! 	// Fill in the mac_addr
  	for (i = 0; i < 6; i++)	{
! 		mac_addr[i] = ( hex2dec( buffer[2 * i] ) << 4 ) + hex2dec( buffer[2 * i + 1] );
  	}
  
! 	// Now copy it over to the kernel's network driver.
  	memcpy( ether_dev->net->dev_addr, mac_addr, sizeof(mac_addr) );
  }
  
***************
*** 1187,1198 ****
  	unsigned char sern[256];
  	unsigned char *mac_addr;
  
! 	/* Default empty strings in case we don't find a real one */
  	manu[0] = 0x00;
  	prod[0] = 0x00;
  	sern[0] = 0x00;
  
! 	/*  Try to get the device Manufacturer */
  	string_num = ether_dev->usb->descriptor.iManufacturer;
  	if (string_num)	{
  		// Put it into its buffer
--- 1067,1078 ----
  	unsigned char sern[256];
  	unsigned char *mac_addr;
  
! 	// Default empty strings in case we don't find a real one
  	manu[0] = 0x00;
  	prod[0] = 0x00;
  	sern[0] = 0x00;
  
! 	// Try to get the device Manufacturer
  	string_num = ether_dev->usb->descriptor.iManufacturer;
  	if (string_num)	{
  		// Put it into its buffer
***************
*** 1201,1207 ****
  		manu[len] = 0x00;
  	}
  
! 	/* Try to get the device Product Name */
  	string_num = ether_dev->usb->descriptor.iProduct;
  	if (string_num)	{
  		// Put it into its buffer
--- 1081,1087 ----
  		manu[len] = 0x00;
  	}
  
! 	// Try to get the device Product Name
  	string_num = ether_dev->usb->descriptor.iProduct;
  	if (string_num)	{
  		// Put it into its buffer
***************
*** 1210,1216 ****
  		prod[len] = 0x00;
  	}
  
! 	/* Try to get the device Serial Number */
  	string_num = ether_dev->usb->descriptor.iSerialNumber;
  	if (string_num)	{
  		// Put it into its buffer
--- 1090,1096 ----
  		prod[len] = 0x00;
  	}
  
! 	// Try to get the device Serial Number
  	string_num = ether_dev->usb->descriptor.iSerialNumber;
  	if (string_num)	{
  		// Put it into its buffer
***************
*** 1219,1238 ****
  		sern[len] = 0x00;
  	}
  
! 	/* This makes it easier for us to print */
  	mac_addr = ether_dev->net->dev_addr;
  
! 	/* Now send everything we found to the syslog */
! 	info( "%s: %s %s %s", ether_dev->net->name, manu, prod, sern);
! 	dbg( "%s: %02X:%02X:%02X:%02X:%02X:%02X",
! 		ether_dev->net->name,
! 		mac_addr[0],
! 		mac_addr[1],
! 		mac_addr[2],
! 		mac_addr[3],
! 		mac_addr[4],
! 		mac_addr[5] );
! 
  }
  
  /* Forward declaration */
--- 1099,1112 ----
  		sern[len] = 0x00;
  	}
  
! 	// This makes it easier for us to print
  	mac_addr = ether_dev->net->dev_addr;
  
! 	// Now send everything we found to the syslog
! 	info( "%s: %s %s %s %02X:%02X:%02X:%02X:%02X:%02X", 
! 	      ether_dev->net->name, manu, prod, sern, mac_addr[0], 
! 	      mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], 
! 	      mac_addr[5] );
  }
  
  /* Forward declaration */
***************
*** 1353,1359 ****
  	// Send a message to syslog about what we are handling
  	log_device_info( ether_dev );
  
! 	/* We need to manually claim the data interface, while the comm interface gets claimed in the return */
  	usb_driver_claim_interface( &CDCEther_driver, 
  	                            &(usb->config[ether_dev->configuration_num].interface[ether_dev->data_interface]), 
  	                            ether_dev );
--- 1227,1237 ----
  	// Send a message to syslog about what we are handling
  	log_device_info( ether_dev );
  
! 	// I claim this interface to be a CDC Ethernet Networking device
! 	usb_driver_claim_interface( &CDCEther_driver, 
! 	                            &(usb->config[ether_dev->configuration_num].interface[ether_dev->comm_interface]), 
! 	                            ether_dev );
! 	// I claim this interface to be a CDC Ethernet Networking device
  	usb_driver_claim_interface( &CDCEther_driver, 
  	                            &(usb->config[ether_dev->configuration_num].interface[ether_dev->data_interface]), 
  	                            ether_dev );
***************
*** 1361,1368 ****
  	// Does this REALLY do anything???
  	usb_inc_dev_use( usb );
  
  	// Okay, we are finally done...
! 	return ether_dev;
  }
  
  
--- 1239,1249 ----
  	// Does this REALLY do anything???
  	usb_inc_dev_use( usb );
  
+ 	// TODO - last minute HACK
+ 	ether_dev->comm_ep_in = 5;
+ 
  	// Okay, we are finally done...
! 	return NULL;
  }
  
  
***************
*** 1432,1438 ****
  
  int __init CDCEther_init(void)
  {
! 	dbg( "%s", version );
  	return usb_register( &CDCEther_driver );
  }
  
--- 1313,1319 ----
  
  int __init CDCEther_init(void)
  {
! 	info( "%s", version );
  	return usb_register( &CDCEther_driver );
  }
  
***************
*** 1452,1461 ****
  MODULE_DESCRIPTION("USB CDC Ethernet driver");
  MODULE_LICENSE("GPL");
  
- MODULE_DEVICE_TABLE (usb, CDCEther_ids);
  MODULE_PARM (multicast_filter_limit, "i");
  MODULE_PARM_DESC (multicast_filter_limit, "CDCEther maximum number of filtered multicast addresses");
  
  //////////////////////////////////////////////////////////////////////////////
  // End of file ///////////////////////////////////////////////////////////////
  //////////////////////////////////////////////////////////////////////////////
--- 1333,1343 ----
  MODULE_DESCRIPTION("USB CDC Ethernet driver");
  MODULE_LICENSE("GPL");
  
  MODULE_PARM (multicast_filter_limit, "i");
  MODULE_PARM_DESC (multicast_filter_limit, "CDCEther maximum number of filtered multicast addresses");
  
+ MODULE_DEVICE_TABLE (usb, CDCEther_ids);
+ 
  //////////////////////////////////////////////////////////////////////////////
  // End of file ///////////////////////////////////////////////////////////////
  //////////////////////////////////////////////////////////////////////////////
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/CDCEther.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/CDCEther.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/CDCEther.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/CDCEther.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,4 ****
! // Portions of this file taken from
  // Petko Manolov - Petkan (petkan@dce.bg)
  // from his driver pegasus.h
  
--- 1,4 ----
! // Portions of this file taken from 
  // Petko Manolov - Petkan (petkan@dce.bg)
  // from his driver pegasus.h
  
***************
*** 18,29 ****
   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
   */
  
! /* From CDC Spec Table 24 */
  #define CS_INTERFACE			0x24
  
  #define	CDC_ETHER_MAX_MTU		1536
  
- /* These definitions are used with the ether_dev_t flags element */
  #define	CDC_ETHER_PRESENT		0x00000001
  #define	CDC_ETHER_RUNNING		0x00000002
  #define	CDC_ETHER_TX_BUSY		0x00000004
--- 18,28 ----
   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
   */
  
! 
  #define CS_INTERFACE			0x24
  
  #define	CDC_ETHER_MAX_MTU		1536
  
  #define	CDC_ETHER_PRESENT		0x00000001
  #define	CDC_ETHER_RUNNING		0x00000002
  #define	CDC_ETHER_TX_BUSY		0x00000004
***************
*** 32,41 ****
  
  #define	CDC_ETHER_TX_TIMEOUT	(HZ*10)
  
! #define	TX_UNDERRUN			0x80
  #define	EXCESSIVE_COL			0x40
! #define	LATE_COL			0x20
! #define	NO_CARRIER			0x10
  #define	LOSS_CARRIER			0x08
  #define	JABBER_TIMEOUT			0x04
  
--- 31,40 ----
  
  #define	CDC_ETHER_TX_TIMEOUT	(HZ*10)
  
! #define	TX_UNDERRUN				0x80
  #define	EXCESSIVE_COL			0x40
! #define	LATE_COL				0x20
! #define	NO_CARRIER				0x10
  #define	LOSS_CARRIER			0x08
  #define	JABBER_TIMEOUT			0x04
  
***************
*** 44,56 ****
  #define	CDC_ETHER_REQ_GET_REGS	0xf0
  #define	CDC_ETHER_REQ_SET_REGS	0xf1
  #define	CDC_ETHER_REQ_SET_REG	PIPERIDER_REQ_SET_REGS
  
  typedef struct _ether_dev_t {
  	struct usb_device	*usb;
  	struct net_device	*net;
  	struct net_device_stats	stats;
  	unsigned		flags;
- 	unsigned		properties;
  	int			configuration_num;
  	int			bConfigurationValue;
  	int			comm_interface;
--- 43,64 ----
  #define	CDC_ETHER_REQ_GET_REGS	0xf0
  #define	CDC_ETHER_REQ_SET_REGS	0xf1
  #define	CDC_ETHER_REQ_SET_REG	PIPERIDER_REQ_SET_REGS
+ #define	ALIGN(x)		x __attribute__((aligned(L1_CACHE_BYTES)))
+ 
+ #define MODE_FLAG_PROMISCUOUS   (1<<0)
+ #define MODE_FLAG_ALL_MULTICAST (1<<1)
+ #define MODE_FLAG_DIRECTED      (1<<2)
+ #define MODE_FLAG_BROADCAST     (1<<3)
+ #define MODE_FLAG_MULTICAST     (1<<4)
+ 
+ #define SET_ETHERNET_MULTICAST_FILTER    0x40
+ #define SET_ETHERNET_PACKET_FILTER       0x43
  
  typedef struct _ether_dev_t {
  	struct usb_device	*usb;
  	struct net_device	*net;
  	struct net_device_stats	stats;
  	unsigned		flags;
  	int			configuration_num;
  	int			bConfigurationValue;
  	int			comm_interface;
***************
*** 71,114 ****
  	__u8			iMACAddress;
  	__u32			bmEthernetStatistics;
  	__u16			wMaxSegmentSize;
  	__u16			wNumberMCFilters;
  	__u8			bNumberPowerFilters;
- 	__u16			mode_flags;
  	int			intr_interval;
! 	struct usb_ctrlrequest	ctrl_dr;
! 	struct urb		rx_urb, tx_urb, intr_urb, ctrl_urb;
! 	unsigned char		rx_buff[CDC_ETHER_MAX_MTU] __attribute__((aligned(L1_CACHE_BYTES)));
! 	unsigned char		tx_buff[CDC_ETHER_MAX_MTU] __attribute__((aligned(L1_CACHE_BYTES)));
! 	unsigned char		intr_buff[8] __attribute__((aligned(L1_CACHE_BYTES))) ;
  } ether_dev_t;
  
- /* These definitions used in the Ethernet Packet Filtering requests */
- /* See CDC Spec Table 62 */
- #define MODE_FLAG_PROMISCUOUS   (1<<0)
- #define MODE_FLAG_ALL_MULTICAST (1<<1)
- #define MODE_FLAG_DIRECTED      (1<<2)
- #define MODE_FLAG_BROADCAST     (1<<3)
- #define MODE_FLAG_MULTICAST     (1<<4)
- 
- /* CDC Spec class requests - CDC Spec Table 46 */
- #define SET_ETHERNET_MULTICAST_FILTER    0x40
- #define SET_ETHERNET_PACKET_FILTER       0x43
- 
- 
- /* These definitions are used with the ether_dev_t properties field */
- #define HAVE_NOTIFICATION_ELEMENT	0x0001
- #define PERFECT_FILTERING		0x0002
- #define NO_SET_MULTICAST		0x0004
- 
- /* These definitions are used in the requirements parser */
  #define REQ_HDR_FUNC_DESCR	0x0001
  #define REQ_UNION_FUNC_DESCR	0x0002
  #define REQ_ETH_FUNC_DESCR	0x0004
! #define REQUIREMENTS_TOTAL	REQ_ETH_FUNC_DESCR | REQ_UNION_FUNC_DESCR | REQ_HDR_FUNC_DESCR
  
- /* Some useful lengths */
- #define HEADER_FUNC_DESC_LEN	0x5
- #define UNION_FUNC_DESC_LEN	0x5
- #define ETHERNET_FUNC_DESC_LEN	0xD /* 13 for all you decimal weenies */
  
  
--- 79,98 ----
  	__u8			iMACAddress;
  	__u32			bmEthernetStatistics;
  	__u16			wMaxSegmentSize;
+ 	__u16                   mode_flags;
  	__u16			wNumberMCFilters;
  	__u8			bNumberPowerFilters;
  	int			intr_interval;
! 	struct urb		rx_urb, tx_urb, intr_urb;
! 	unsigned char		ALIGN(rx_buff[CDC_ETHER_MAX_MTU]);
! 	unsigned char		ALIGN(tx_buff[CDC_ETHER_MAX_MTU]);
! 	unsigned char		ALIGN(intr_buff[8]);
  } ether_dev_t;
  
  #define REQ_HDR_FUNC_DESCR	0x0001
  #define REQ_UNION_FUNC_DESCR	0x0002
  #define REQ_ETH_FUNC_DESCR	0x0004
! #define REQUIREMENTS_TOTAL	0x0007
  
  
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/Config.in LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/Config.in
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/Config.in	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/Config.in	2004-05-24 17:35:29.000000000 +0900
***************
*** 4,14 ****
  mainmenu_option next_comment
  comment 'USB support'
  
! dep_tristate 'Support for USB' CONFIG_USB $CONFIG_PCI
  if [ "$CONFIG_USB" = "y" -o  "$CONFIG_USB" = "m" ]; then
     bool '  USB verbose debug messages' CONFIG_USB_DEBUG
  
!    comment 'Miscellaneous USB options'
     bool '  Preliminary USB device filesystem' CONFIG_USB_DEVICEFS
     if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
        bool '  Enforce USB bandwidth allocation (EXPERIMENTAL)' CONFIG_USB_BANDWIDTH
--- 4,22 ----
  mainmenu_option next_comment
  comment 'USB support'
  
! # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
! # MPC850/MPC823 processors also have a non-PCI USB controller.
! if [ "$CONFIG_PCI" = "y" -o "$CONFIG_SA1111" = "y" \
! 	-o "$CONFIG_8xx" = "y" ]; then
!    tristate 'Support for USB' CONFIG_USB
! else
!    define_bool CONFIG_USB n
! fi
! 
  if [ "$CONFIG_USB" = "y" -o  "$CONFIG_USB" = "m" ]; then
     bool '  USB verbose debug messages' CONFIG_USB_DEBUG
  
! comment 'Miscellaneous USB options'
     bool '  Preliminary USB device filesystem' CONFIG_USB_DEVICEFS
     if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
        bool '  Enforce USB bandwidth allocation (EXPERIMENTAL)' CONFIG_USB_BANDWIDTH
***************
*** 16,111 ****
        define_bool CONFIG_USB_BANDWIDTH n
     fi
     bool '  Long timeout for slow-responding devices (some MGE Ellipse UPSes)' CONFIG_USB_LONG_TIMEOUT
  
!    comment 'USB Host Controller Drivers'
!    source drivers/usb/hcd/Config.in
!    if [ "$CONFIG_USB_UHCI_ALT" != "y" ]; then
!       dep_tristate '  UHCI (Intel PIIX4, VIA, ...) support' CONFIG_USB_UHCI $CONFIG_USB
!    fi
!    if [ "$CONFIG_USB_UHCI" != "y" ]; then
!       dep_tristate '  UHCI Alternate Driver (JE) support' CONFIG_USB_UHCI_ALT $CONFIG_USB
!    else
!       define_bool CONFIG_USB_UHCI_ALT n
     fi
!    dep_tristate '  OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support' CONFIG_USB_OHCI $CONFIG_USB
  
!    comment 'USB Device Class drivers'
!    dep_tristate '  USB Audio support' CONFIG_USB_AUDIO $CONFIG_USB $CONFIG_SOUND
!    dep_tristate '    EMI 2|6 USB Audio interface support' CONFIG_USB_EMI26 $CONFIG_USB_AUDIO
!    dep_tristate '  USB Bluetooth support (EXPERIMENTAL)' CONFIG_USB_BLUETOOTH $CONFIG_USB $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB MIDI support' CONFIG_USB_MIDI $CONFIG_USB
!    if [ "$CONFIG_SCSI" = "n" ]; then
!       comment '  SCSI support is needed for USB Storage'
!    fi
!    dep_tristate '  USB Mass Storage support' CONFIG_USB_STORAGE $CONFIG_USB $CONFIG_SCSI
!       dep_mbool '    USB Mass Storage verbose debug' CONFIG_USB_STORAGE_DEBUG $CONFIG_USB_STORAGE
!       dep_mbool '    Datafab MDCFE-B Compact Flash Reader support' CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
!       dep_mbool '    Freecom USB/ATAPI Bridge support' CONFIG_USB_STORAGE_FREECOM  $CONFIG_USB_STORAGE
!       dep_mbool '    ISD-200 USB/ATA Bridge support' CONFIG_USB_STORAGE_ISD200 $CONFIG_USB_STORAGE
!       dep_mbool '    Microtech CompactFlash/SmartMedia support' CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE
!       dep_mbool '    HP CD-Writer 82xx support' CONFIG_USB_STORAGE_HP8200e $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
!       dep_mbool '    SanDisk SDDR-09 (and other SmartMedia) support' CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
!       dep_mbool '    SanDisk SDDR-55 SmartMedia support' CONFIG_USB_STORAGE_SDDR55 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
!       dep_mbool '    Lexar Jumpshot Compact Flash Reader' CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB Modem (CDC ACM) support' CONFIG_USB_ACM $CONFIG_USB
!    dep_tristate '  USB Printer support' CONFIG_USB_PRINTER $CONFIG_USB
! 
!    comment 'USB Human Interface Devices (HID)'
!    dep_tristate '  USB Human Interface Device (full HID) support' CONFIG_USB_HID $CONFIG_USB
!    if [ "$CONFIG_INPUT" = "n" ]; then
!       comment '    Input core support is needed for USB HID input layer or HIDBP support'
!    fi
!       dep_mbool '    HID input layer support' CONFIG_USB_HIDINPUT $CONFIG_INPUT $CONFIG_USB_HID
!       dep_mbool '    /dev/hiddev raw HID device support' CONFIG_USB_HIDDEV $CONFIG_USB_HID
     if [ "$CONFIG_USB_HID" != "y" ]; then
        dep_tristate '  USB HIDBP Keyboard (basic) support' CONFIG_USB_KBD $CONFIG_USB $CONFIG_INPUT
        dep_tristate '  USB HIDBP Mouse (basic) support' CONFIG_USB_MOUSE $CONFIG_USB $CONFIG_INPUT
     fi
-    dep_tristate '  Aiptek 6000U/8000U tablet support' CONFIG_USB_AIPTEK $CONFIG_USB $CONFIG_INPUT
     dep_tristate '  Wacom Intuos/Graphire tablet support' CONFIG_USB_WACOM $CONFIG_USB $CONFIG_INPUT
  
!    comment 'USB Imaging devices'
!    dep_tristate '  USB Kodak DC-2xx Camera support' CONFIG_USB_DC2XX $CONFIG_USB
!    dep_tristate '  USB Mustek MDC800 Digital Camera support (EXPERIMENTAL)' CONFIG_USB_MDC800 $CONFIG_USB $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB Scanner support' CONFIG_USB_SCANNER $CONFIG_USB
!    dep_tristate '  Microtek X6USB scanner support' CONFIG_USB_MICROTEK $CONFIG_USB $CONFIG_SCSI
!    dep_tristate '  HP53xx USB scanner support (EXPERIMENTAL)' CONFIG_USB_HPUSBSCSI $CONFIG_USB $CONFIG_SCSI $CONFIG_EXPERIMENTAL
! 
!    comment 'USB Multimedia devices'
!    if [ "$CONFIG_VIDEO_DEV" = "n" ]; then
!       comment '  Video4Linux support is needed for USB Multimedia device support'
!    else
!       dep_tristate '  USB IBM (Xirlink) C-it Camera support' CONFIG_USB_IBMCAM $CONFIG_USB $CONFIG_VIDEO_DEV
!       dep_tristate '  USB OV511 Camera support' CONFIG_USB_OV511 $CONFIG_USB $CONFIG_VIDEO_DEV
!       dep_tristate '  USB Philips Cameras' CONFIG_USB_PWC $CONFIG_USB $CONFIG_VIDEO_DEV
!       dep_tristate '  USB SE401 Camera support' CONFIG_USB_SE401 $CONFIG_USB $CONFIG_VIDEO_DEV
!       dep_tristate '  USB STV680 (Pencam) Camera support' CONFIG_USB_STV680 $CONFIG_USB $CONFIG_VIDEO_DEV
!       dep_tristate '  USB 3com HomeConnect (aka vicam) support (EXPERIMENTAL)' CONFIG_USB_VICAM $CONFIG_USB $CONFIG_VIDEO_DEV $CONFIG_EXPERIMENTAL
!       dep_tristate '  D-Link USB FM radio support (EXPERIMENTAL)' CONFIG_USB_DSBR $CONFIG_USB $CONFIG_VIDEO_DEV $CONFIG_EXPERIMENTAL
!       dep_tristate '  DABUSB driver' CONFIG_USB_DABUSB $CONFIG_USB
!    fi
! 
!    comment 'USB Network adaptors'
!    if [ "$CONFIG_NET" = "n" ]; then
!       comment '  Networking support is needed for USB Networking device support'
!    else
!       dep_tristate '  USB Pegasus/Pegasus-II based ethernet device support (EXPERIMENTAL)' CONFIG_USB_PEGASUS $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
!       dep_tristate '  USB Realtek RTL8150 based ethernet device support (EXPERIMENTAL)' CONFIG_USB_RTL8150 $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
!       dep_tristate '  USB KLSI KL5USB101-based ethernet device support (EXPERIMENTAL)' CONFIG_USB_KAWETH $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
!       dep_tristate '  USB CATC NetMate-based Ethernet device support (EXPERIMENTAL)' CONFIG_USB_CATC $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
!       dep_tristate '  USB Communication Class Ethernet device support (EXPERIMENTAL)' CONFIG_USB_CDCETHER $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
!       dep_tristate '  USB-to-USB Networking cable device support (EXPERIMENTAL)' CONFIG_USB_USBNET $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
!    fi
  
!    comment 'USB port drivers'
!    dep_tristate '  USS720 parport driver' CONFIG_USB_USS720 $CONFIG_USB $CONFIG_PARPORT
!    source drivers/usb/serial/Config.in
! 
!    comment 'USB Miscellaneous drivers'
!    dep_tristate '  USB Diamond Rio500 support (EXPERIMENTAL)' CONFIG_USB_RIO500 $CONFIG_USB $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB Auerswald ISDN support (EXPERIMENTAL)' CONFIG_USB_AUERSWALD $CONFIG_USB $CONFIG_EXPERIMENTAL
!    dep_tristate '  Texas Instruments Graph Link USB (aka SilverLink) cable support' CONFIG_USB_TIGL $CONFIG_USB
!    dep_tristate '  Tieman Voyager USB Braille display support (EXPERIMENTAL)' CONFIG_USB_BRLVGER $CONFIG_USB $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB LCD device support' CONFIG_USB_LCD $CONFIG_USB
  fi
  endmenu
--- 24,115 ----
        define_bool CONFIG_USB_BANDWIDTH n
     fi
     bool '  Long timeout for slow-responding devices (some MGE Ellipse UPSes)' CONFIG_USB_LONG_TIMEOUT
+ fi
  
! comment 'USB Controllers'
! if [ "$CONFIG_USB_UHCI_ALT" != "y" ]; then
!    dep_tristate '  UHCI (Intel PIIX4, VIA, ...) support' CONFIG_USB_UHCI $CONFIG_USB
! fi
! if [ "$CONFIG_USB_UHCI" != "y" ]; then
!    dep_tristate '  UHCI Alternate Driver (JE) support' CONFIG_USB_UHCI_ALT $CONFIG_USB
! else
!    define_bool CONFIG_USB_UHCI_ALT n
! fi
! if [ "$CONFIG_8xx" = "y" ]; then
!    dep_tristate '  MPC850/823 USB HCI support' CONFIG_USB_MPC8xx $CONFIG_USB
!    if [ "$CONFIG_USB_MPC8xx" = "n" ]; then
!       bool '  MPC850/823 USB Function (Client) support' CONFIG_USB_CLIENT_MPC8xx
     fi
! fi
! dep_tristate '  OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support' CONFIG_USB_OHCI $CONFIG_USB
! if [ "$CONFIG_SA1111" = "y" ]; then
!    dep_tristate '    SA1111 OHCI-compatible host interface support' CONFIG_USB_OHCI_SA1111 $CONFIG_USB_OHCI
! fi
! dep_tristate '    Non-PCI OHCI support' CONFIG_USB_NON_PCI_OHCI $CONFIG_USB_OHCI
  
! comment 'USB Device Class drivers'
! dep_tristate '  USB Audio support' CONFIG_USB_AUDIO $CONFIG_USB $CONFIG_SOUND
! dep_tristate '  USB Bluetooth support (EXPERIMENTAL)' CONFIG_USB_BLUETOOTH $CONFIG_USB $CONFIG_EXPERIMENTAL
! dep_tristate '  USB Mass Storage support' CONFIG_USB_STORAGE $CONFIG_USB $CONFIG_SCSI
!    dep_mbool '    USB Mass Storage verbose debug' CONFIG_USB_STORAGE_DEBUG $CONFIG_USB_STORAGE
!    dep_mbool '    Datafab MDCFE-B Compact Flash Reader support' CONFIG_USB_STORAGE_DATAFAB $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
!    dep_mbool '    Freecom USB/ATAPI Bridge support' CONFIG_USB_STORAGE_FREECOM  $CONFIG_USB_STORAGE
!    dep_mbool '    ISD-200 USB/ATA Bridge support' CONFIG_USB_STORAGE_ISD200 $CONFIG_USB_STORAGE
!    dep_mbool '    Microtech CompactFlash/SmartMedia support' CONFIG_USB_STORAGE_DPCM $CONFIG_USB_STORAGE
!    dep_mbool '    HP CD-Writer 82xx support' CONFIG_USB_STORAGE_HP8200e $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
!    dep_mbool '    SanDisk SDDR-09 (and other SmartMedia) support' CONFIG_USB_STORAGE_SDDR09 $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
!    dep_mbool '    Lexar Jumpshot Compact Flash Reader' CONFIG_USB_STORAGE_JUMPSHOT $CONFIG_USB_STORAGE $CONFIG_EXPERIMENTAL
! dep_tristate '  USB Modem (CDC ACM) support' CONFIG_USB_ACM $CONFIG_USB
! dep_tristate '  USB Printer support' CONFIG_USB_PRINTER $CONFIG_USB
! 
! comment 'USB Human Interface Devices (HID)'
! if [ "$CONFIG_INPUT" = "n" ]; then
!    comment '  Input core support is needed for USB HID'
! else
!    dep_tristate '  USB Human Interface Device (full HID) support' CONFIG_USB_HID $CONFIG_USB $CONFIG_INPUT
!       dep_mbool '    /dev/hiddev raw HID device support (EXPERIMENTAL)' CONFIG_USB_HIDDEV $CONFIG_USB_HID
     if [ "$CONFIG_USB_HID" != "y" ]; then
        dep_tristate '  USB HIDBP Keyboard (basic) support' CONFIG_USB_KBD $CONFIG_USB $CONFIG_INPUT
        dep_tristate '  USB HIDBP Mouse (basic) support' CONFIG_USB_MOUSE $CONFIG_USB $CONFIG_INPUT
     fi
     dep_tristate '  Wacom Intuos/Graphire tablet support' CONFIG_USB_WACOM $CONFIG_USB $CONFIG_INPUT
+ fi
  
! comment 'USB Imaging devices'
! dep_tristate '  USB Kodak DC-2xx Camera support' CONFIG_USB_DC2XX $CONFIG_USB
! dep_tristate '  USB Mustek MDC800 Digital Camera support (EXPERIMENTAL)' CONFIG_USB_MDC800 $CONFIG_USB $CONFIG_EXPERIMENTAL
! dep_tristate '  USB Scanner support' CONFIG_USB_SCANNER $CONFIG_USB
! dep_tristate '  Microtek X6USB scanner support' CONFIG_USB_MICROTEK $CONFIG_USB $CONFIG_SCSI
! dep_tristate '  HP53xx USB scanner support (EXPERIMENTAL)' CONFIG_USB_HPUSBSCSI $CONFIG_USB $CONFIG_SCSI $CONFIG_EXPERIMENTAL
! 
! comment 'USB Multimedia devices'
! if [ "$CONFIG_VIDEO_DEV" = "n" ]; then
!    comment '  Video4Linux support is needed for USB Multimedia device support'
! else
!    dep_tristate '  USB IBM (Xirlink) C-it Camera support' CONFIG_USB_IBMCAM $CONFIG_USB $CONFIG_VIDEO_DEV
!    dep_tristate '  USB OV511 Camera support' CONFIG_USB_OV511 $CONFIG_USB $CONFIG_VIDEO_DEV
!    dep_tristate '  USB Philips Cameras' CONFIG_USB_PWC $CONFIG_USB $CONFIG_VIDEO_DEV
!    dep_tristate '  USB SE401 Camera support' CONFIG_USB_SE401 $CONFIG_USB $CONFIG_VIDEO_DEV
!    dep_tristate '  D-Link USB FM radio support (EXPERIMENTAL)' CONFIG_USB_DSBR $CONFIG_USB $CONFIG_VIDEO_DEV $CONFIG_EXPERIMENTAL
!    dep_tristate '  DABUSB driver' CONFIG_USB_DABUSB $CONFIG_USB
! fi
  
! comment 'USB Network adaptors'
! if [ "$CONFIG_NET" = "n" ]; then
!    comment '  Networking support is needed for USB Networking device support'
! else
!    dep_tristate '  USB ADMtek Pegasus-based ethernet device support (EXPERIMENTAL)' CONFIG_USB_PEGASUS $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB KLSI KL5USB101-based ethernet device support (EXPERIMENTAL)' CONFIG_USB_KAWETH $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB CATC NetMate-based Ethernet device support (EXPERIMENTAL)' CONFIG_USB_CATC $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB Communication Class Ethernet device support (EXPERIMENTAL)' CONFIG_USB_CDCETHER $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB-to-USB Networking cable device support (EXPERIMENTAL)' CONFIG_USB_USBNET $CONFIG_USB $CONFIG_NET $CONFIG_EXPERIMENTAL
  fi
+ 
+ comment 'USB port drivers'
+ dep_tristate '  USS720 parport driver' CONFIG_USB_USS720 $CONFIG_USB $CONFIG_PARPORT
+ source drivers/usb/serial/Config.in
+ 
+ comment 'USB Miscellaneous drivers'
+ dep_tristate '  USB Diamond Rio500 support (EXPERIMENTAL)' CONFIG_USB_RIO500 $CONFIG_USB $CONFIG_EXPERIMENTAL
+ 
  endmenu
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/Makefile LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/Makefile
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/Makefile	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/Makefile	2004-05-24 17:35:29.000000000 +0900
***************
*** 10,22 ****
  
  # Objects that export symbols.
  
! export-objs		:= hcd.o usb.o ov511.o pwc-uncompress.o
  
  # Multipart objects.
  
! list-multi		:= usbcore.o hid.o pwc.o
  usbcore-objs		:= usb.o usb-debug.o hub.o
! hid-objs		:= hid-core.o
  pwc-objs		:= pwc-if.o pwc-misc.o pwc-ctrl.o pwc-uncompress.o
  
  
--- 10,28 ----
  
  # Objects that export symbols.
  
! export-objs		:= usb.o
  
  # Multipart objects.
  
! list-multi		:= usbcore.o hid.o
  usbcore-objs		:= usb.o usb-debug.o hub.o
! hid-objs		:= hid-core.o hid-input.o
! 
! ifneq ($(CONFIG_USB_PWC),n)
! 	export-objs		+= pwc-uncompress.o
! 	list-multi		+= pwc.o
! endif
! 
  pwc-objs		:= pwc-if.o pwc-misc.o pwc-ctrl.o pwc-uncompress.o
  
  
***************
*** 30,39 ****
  	hid-objs	+= hiddev.o
  endif
  
- ifeq ($(CONFIG_USB_HIDINPUT),y)
- 	hid-objs	+= hid-input.o
- endif
- 
  # Object file lists.
  
  obj-y	:=
--- 36,41 ----
***************
*** 44,104 ****
  # Each configuration option enables a list of files.
  
  obj-$(CONFIG_USB)		+= usbcore.o
- 
- # EHCI should initialize/link before the other HCDs
- ifeq ($(CONFIG_USB_EHCI_HCD),y)
- 	obj-y += hcd/ehci-hcd.o
- endif
- 
  obj-$(CONFIG_USB_UHCI)		+= usb-uhci.o
  obj-$(CONFIG_USB_UHCI_ALT)	+= uhci.o
  obj-$(CONFIG_USB_OHCI)		+= usb-ohci.o
! 
! ifneq ($(CONFIG_USB_EHCI_HCD),n)
! 	usbcore-objs		+= hcd.o
! endif
! subdir-$(CONFIG_USB_EHCI_HCD)	+= hcd
  
  obj-$(CONFIG_USB_MOUSE)		+= usbmouse.o
  obj-$(CONFIG_USB_HID)		+= hid.o
  obj-$(CONFIG_USB_KBD)		+= usbkbd.o
- obj-$(CONFIG_USB_AIPTEK)	+= aiptek.o
  obj-$(CONFIG_USB_WACOM)		+= wacom.o
  
  obj-$(CONFIG_USB_SCANNER)	+= scanner.o
  obj-$(CONFIG_USB_ACM)		+= acm.o
  obj-$(CONFIG_USB_PRINTER)	+= printer.o
  obj-$(CONFIG_USB_AUDIO)		+= audio.o
- obj-$(CONFIG_USB_EMI26)		+= emi26.o
- obj-$(CONFIG_USB_MIDI)		+= usb-midi.o
  obj-$(CONFIG_USB_IBMCAM)	+= ibmcam.o usbvideo.o ultracam.o
  obj-$(CONFIG_USB_PWC)		+= pwc.o
  obj-$(CONFIG_USB_DC2XX)		+= dc2xx.o
  obj-$(CONFIG_USB_MDC800)	+= mdc800.o
  obj-$(CONFIG_USB_USS720)	+= uss720.o
  obj-$(CONFIG_USB_DABUSB)	+= dabusb.o
- obj-$(CONFIG_USB_VICAM)		+= vicam.o
  obj-$(CONFIG_USB_OV511)		+= ov511.o
  obj-$(CONFIG_USB_SE401)		+= se401.o
- obj-$(CONFIG_USB_STV680)	+= stv680.o
  obj-$(CONFIG_USB_PEGASUS)	+= pegasus.o
- obj-$(CONFIG_USB_RTL8150)	+= rtl8150.o
  obj-$(CONFIG_USB_CATC)		+= catc.o
  obj-$(CONFIG_USB_KAWETH)        += kaweth.o
  obj-$(CONFIG_USB_CDCETHER)	+= CDCEther.o
  obj-$(CONFIG_USB_RIO500)	+= rio500.o
- obj-$(CONFIG_USB_TIGL)          += tiglusb.o
  obj-$(CONFIG_USB_DSBR)		+= dsbr100.o
  obj-$(CONFIG_USB_MICROTEK)	+= microtek.o
  obj-$(CONFIG_USB_HPUSBSCSI)	+= hpusbscsi.o
  obj-$(CONFIG_USB_BLUETOOTH)	+= bluetooth.o
  obj-$(CONFIG_USB_USBNET)	+= usbnet.o
- obj-$(CONFIG_USB_AUERSWALD)	+= auerswald.o
- obj-$(CONFIG_USB_BRLVGER)	+= brlvger.o
- obj-$(CONFIG_USB_LCD)		+= usblcd.o
  
  # Object files in subdirectories
! mod-subdirs	:= serial hcd
  
  subdir-$(CONFIG_USB_SERIAL)	+= serial
  subdir-$(CONFIG_USB_STORAGE)	+= storage
--- 46,88 ----
  # Each configuration option enables a list of files.
  
  obj-$(CONFIG_USB)		+= usbcore.o
  obj-$(CONFIG_USB_UHCI)		+= usb-uhci.o
  obj-$(CONFIG_USB_UHCI_ALT)	+= uhci.o
+ obj-$(CONFIG_USB_MPC8xx)	+= m8xxhci.o
  obj-$(CONFIG_USB_OHCI)		+= usb-ohci.o
! obj-$(CONFIG_USB_OHCI_SA1111)	+= usb-ohci-sa1111.o
! obj-$(CONFIG_USB_NON_PCI_OHCI)	+= usb-ohci-nonpci.o
  
  obj-$(CONFIG_USB_MOUSE)		+= usbmouse.o
  obj-$(CONFIG_USB_HID)		+= hid.o
  obj-$(CONFIG_USB_KBD)		+= usbkbd.o
  obj-$(CONFIG_USB_WACOM)		+= wacom.o
  
  obj-$(CONFIG_USB_SCANNER)	+= scanner.o
  obj-$(CONFIG_USB_ACM)		+= acm.o
  obj-$(CONFIG_USB_PRINTER)	+= printer.o
  obj-$(CONFIG_USB_AUDIO)		+= audio.o
  obj-$(CONFIG_USB_IBMCAM)	+= ibmcam.o usbvideo.o ultracam.o
  obj-$(CONFIG_USB_PWC)		+= pwc.o
  obj-$(CONFIG_USB_DC2XX)		+= dc2xx.o
  obj-$(CONFIG_USB_MDC800)	+= mdc800.o
  obj-$(CONFIG_USB_USS720)	+= uss720.o
  obj-$(CONFIG_USB_DABUSB)	+= dabusb.o
  obj-$(CONFIG_USB_OV511)		+= ov511.o
  obj-$(CONFIG_USB_SE401)		+= se401.o
  obj-$(CONFIG_USB_PEGASUS)	+= pegasus.o
  obj-$(CONFIG_USB_CATC)		+= catc.o
  obj-$(CONFIG_USB_KAWETH)        += kaweth.o
  obj-$(CONFIG_USB_CDCETHER)	+= CDCEther.o
  obj-$(CONFIG_USB_RIO500)	+= rio500.o
  obj-$(CONFIG_USB_DSBR)		+= dsbr100.o
  obj-$(CONFIG_USB_MICROTEK)	+= microtek.o
  obj-$(CONFIG_USB_HPUSBSCSI)	+= hpusbscsi.o
  obj-$(CONFIG_USB_BLUETOOTH)	+= bluetooth.o
  obj-$(CONFIG_USB_USBNET)	+= usbnet.o
  
  # Object files in subdirectories
! mod-subdirs	:= serial
  
  subdir-$(CONFIG_USB_SERIAL)	+= serial
  subdir-$(CONFIG_USB_STORAGE)	+= storage
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/acm.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/acm.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/acm.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/acm.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 184,190 ****
  static void acm_ctrl_irq(struct urb *urb)
  {
  	struct acm *acm = urb->context;
! 	struct usb_ctrlrequest *dr = urb->transfer_buffer;
  	unsigned char *data = (unsigned char *)(dr + 1);
  	int newctrl;
  
--- 184,190 ----
  static void acm_ctrl_irq(struct urb *urb)
  {
  	struct acm *acm = urb->context;
! 	devrequest *dr = urb->transfer_buffer;
  	unsigned char *data = (unsigned char *)(dr + 1);
  	int newctrl;
  
***************
*** 195,201 ****
  		return;
  	}
  
! 	switch (dr->bRequest) {
  
  		case ACM_IRQ_NETWORK:
  
--- 195,201 ----
  		return;
  	}
  
! 	switch (dr->request) {
  
  		case ACM_IRQ_NETWORK:
  
***************
*** 223,229 ****
  
  		default:
  			dbg("unknown control event received: request %d index %d len %d data0 %d data1 %d",
! 				dr->bRequest, dr->wIndex, dr->wLength, data[0], data[1]);
  			return;
  	}
  }
--- 223,229 ----
  
  		default:
  			dbg("unknown control event received: request %d index %d len %d data0 %d data1 %d",
! 				dr->request, dr->index, dr->length, data[0], data[1]);
  			return;
  	}
  }
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: aiptek.c
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/audio.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/audio.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/audio.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/audio.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 297,309 ****
  #define FLG_CONNECTED    32
  
  struct my_data_urb {
! 	struct urb urb;
! 	struct iso_packet_descriptor isoframe[DESCFRAMES];
  };
  
  struct my_sync_urb {
! 	struct urb urb;
! 	struct iso_packet_descriptor isoframe[SYNCFRAMES];
  };
  
  
--- 297,309 ----
  #define FLG_CONNECTED    32
  
  struct my_data_urb {
! 	urb_t urb;
! 	iso_packet_descriptor_t isoframe[DESCFRAMES];
  };
  
  struct my_sync_urb {
! 	urb_t urb;
! 	iso_packet_descriptor_t isoframe[SYNCFRAMES];
  };
  
  
***************
*** 399,405 ****
  
  /* prevent picking up a bogus abs macro */
  #undef abs
! static inline int abs(int x)
  {
          if (x < 0)
  		return -x;
--- 399,405 ----
  
  /* prevent picking up a bogus abs macro */
  #undef abs
! extern inline int abs(int x)
  {
          if (x < 0)
  		return -x;
***************
*** 408,414 ****
                                  
  /* --------------------------------------------------------------------- */
  
! static inline unsigned ld2(unsigned int x)
  {
  	unsigned r = 0;
  	
--- 408,414 ----
                                  
  /* --------------------------------------------------------------------- */
  
! extern inline unsigned ld2(unsigned int x)
  {
  	unsigned r = 0;
  	
***************
*** 833,839 ****
  	}
  }		
  
! static int usbin_prepare_desc(struct usbin *u, struct urb *urb)
  {
  	unsigned int i, maxsize, offs;
  
--- 833,839 ----
  	}
  }		
  
! static int usbin_prepare_desc(struct usbin *u, purb_t urb)
  {
  	unsigned int i, maxsize, offs;
  
***************
*** 850,856 ****
   * return value: 0 if descriptor should be restarted, -1 otherwise
   * convert sample format on the fly if necessary
   */
! static int usbin_retire_desc(struct usbin *u, struct urb *urb)
  {
  	unsigned int i, ufmtsh, dfmtsh, err = 0, cnt, scnt, dmafree;
  	unsigned char *cp;
--- 850,856 ----
   * return value: 0 if descriptor should be restarted, -1 otherwise
   * convert sample format on the fly if necessary
   */
! static int usbin_retire_desc(struct usbin *u, purb_t urb)
  {
  	unsigned int i, ufmtsh, dfmtsh, err = 0, cnt, scnt, dmafree;
  	unsigned char *cp;
***************
*** 930,936 ****
  /*
   * we output sync data
   */
! static int usbin_sync_prepare_desc(struct usbin *u, struct urb *urb)
  {
  	unsigned char *cp = urb->transfer_buffer;
  	unsigned int i, offs;
--- 930,936 ----
  /*
   * we output sync data
   */
! static int usbin_sync_prepare_desc(struct usbin *u, purb_t urb)
  {
  	unsigned char *cp = urb->transfer_buffer;
  	unsigned int i, offs;
***************
*** 948,954 ****
  /*
   * return value: 0 if descriptor should be restarted, -1 otherwise
   */
! static int usbin_sync_retire_desc(struct usbin *u, struct urb *urb)
  {
  	unsigned int i;
  	
--- 948,954 ----
  /*
   * return value: 0 if descriptor should be restarted, -1 otherwise
   */
! static int usbin_sync_retire_desc(struct usbin *u, purb_t urb)
  {
  	unsigned int i;
  	
***************
*** 996,1002 ****
  {
  	struct usb_device *dev = as->state->usbdev;
  	struct usbin *u = &as->usbin;
! 	struct urb *urb;
  	unsigned long flags;
  	unsigned int maxsze, bufsz;
  
--- 996,1002 ----
  {
  	struct usb_device *dev = as->state->usbdev;
  	struct usbin *u = &as->usbin;
! 	purb_t urb;
  	unsigned long flags;
  	unsigned int maxsze, bufsz;
  
***************
*** 1186,1192 ****
  	}
  }		
  
! static int usbout_prepare_desc(struct usbout *u, struct urb *urb)
  {
  	unsigned int i, ufmtsh, dfmtsh, err = 0, cnt, scnt, offs;
  	unsigned char *cp = urb->transfer_buffer;
--- 1186,1192 ----
  	}
  }		
  
! static int usbout_prepare_desc(struct usbout *u, purb_t urb)
  {
  	unsigned int i, ufmtsh, dfmtsh, err = 0, cnt, scnt, offs;
  	unsigned char *cp = urb->transfer_buffer;
***************
*** 1238,1244 ****
  /*
   * return value: 0 if descriptor should be restarted, -1 otherwise
   */
! static int usbout_retire_desc(struct usbout *u, struct urb *urb)
  {
  	unsigned int i;
  
--- 1238,1244 ----
  /*
   * return value: 0 if descriptor should be restarted, -1 otherwise
   */
! static int usbout_retire_desc(struct usbout *u, purb_t urb)
  {
  	unsigned int i;
  
***************
*** 1285,1291 ****
  	spin_unlock_irqrestore(&as->lock, flags);
  }
  
! static int usbout_sync_prepare_desc(struct usbout *u, struct urb *urb)
  {
  	unsigned int i, offs;
  
--- 1285,1291 ----
  	spin_unlock_irqrestore(&as->lock, flags);
  }
  
! static int usbout_sync_prepare_desc(struct usbout *u, purb_t urb)
  {
  	unsigned int i, offs;
  
***************
*** 1299,1305 ****
  /*
   * return value: 0 if descriptor should be restarted, -1 otherwise
   */
! static int usbout_sync_retire_desc(struct usbout *u, struct urb *urb)
  {
  	unsigned char *cp = urb->transfer_buffer;
  	unsigned int f, i;
--- 1299,1305 ----
  /*
   * return value: 0 if descriptor should be restarted, -1 otherwise
   */
! static int usbout_sync_retire_desc(struct usbout *u, purb_t urb)
  {
  	unsigned char *cp = urb->transfer_buffer;
  	unsigned int f, i;
***************
*** 1361,1367 ****
  {
  	struct usb_device *dev = as->state->usbdev;
  	struct usbout *u = &as->usbout;
! 	struct urb *urb;
  	unsigned long flags;
  	unsigned int maxsze, bufsz;
  
--- 1361,1367 ----
  {
  	struct usb_device *dev = as->state->usbdev;
  	struct usbout *u = &as->usbout;
! 	purb_t urb;
  	unsigned long flags;
  	unsigned int maxsze, bufsz;
  
***************
*** 1931,1943 ****
  	kfree(s);
  }
  
! static inline int prog_dmabuf_in(struct usb_audiodev *as)
  {
  	usbin_stop(as);
  	return dmabuf_init(&as->usbin.dma);
  }
  
! static inline int prog_dmabuf_out(struct usb_audiodev *as)
  {
  	usbout_stop(as);
  	return dmabuf_init(&as->usbout.dma);
--- 1931,1943 ----
  	kfree(s);
  }
  
! extern inline int prog_dmabuf_in(struct usb_audiodev *as)
  {
  	usbin_stop(as);
  	return dmabuf_init(&as->usbin.dma);
  }
  
! extern inline int prog_dmabuf_out(struct usb_audiodev *as)
  {
  	usbout_stop(as);
  	return dmabuf_init(&as->usbout.dma);
***************
*** 2341,2346 ****
--- 2341,2347 ----
  	if (vma->vm_pgoff != 0)
  		goto out;
  
+ 	vma->vm_flags &= ~VM_IO;
  	ret = dmabuf_mmap(db,  vma->vm_start, vma->vm_end - vma->vm_start, vma->vm_page_prot);
  out:
  	unlock_kernel();
***************
*** 2536,2542 ****
  		if (as->usbin.dma.mapped)
  			as->usbin.dma.count &= as->usbin.dma.fragsize-1;
  		spin_unlock_irqrestore(&as->lock, flags);
! 		return copy_to_user((void *)arg, &cinfo, sizeof(cinfo)) ? -EFAULT : 0;
  
  	case SNDCTL_DSP_GETOPTR:
  		if (!(file->f_mode & FMODE_WRITE))
--- 2537,2543 ----
  		if (as->usbin.dma.mapped)
  			as->usbin.dma.count &= as->usbin.dma.fragsize-1;
  		spin_unlock_irqrestore(&as->lock, flags);
! 		return copy_to_user((void *)arg, &cinfo, sizeof(cinfo));
  
  	case SNDCTL_DSP_GETOPTR:
  		if (!(file->f_mode & FMODE_WRITE))
***************
*** 2548,2554 ****
  		if (as->usbout.dma.mapped)
  			as->usbout.dma.count &= as->usbout.dma.fragsize-1;
  		spin_unlock_irqrestore(&as->lock, flags);
! 		return copy_to_user((void *)arg, &cinfo, sizeof(cinfo)) ? -EFAULT : 0;
  
         case SNDCTL_DSP_GETBLKSIZE:
  		if (file->f_mode & FMODE_WRITE) {
--- 2549,2555 ----
  		if (as->usbout.dma.mapped)
  			as->usbout.dma.count &= as->usbout.dma.fragsize-1;
  		spin_unlock_irqrestore(&as->lock, flags);
! 		return copy_to_user((void *)arg, &cinfo, sizeof(cinfo));
  
         case SNDCTL_DSP_GETBLKSIZE:
  		if (file->f_mode & FMODE_WRITE) {
***************
*** 3207,3213 ****
  
  static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unitid);
  
! static inline int checkmixbmap(unsigned char *bmap, unsigned char flg, unsigned int inidx, unsigned int numoch)
  {
  	unsigned int idx;
  
--- 3208,3214 ----
  
  static void usb_audio_recurseunit(struct consmixstate *state, unsigned char unitid);
  
! extern inline int checkmixbmap(unsigned char *bmap, unsigned char flg, unsigned int inidx, unsigned int numoch)
  {
  	unsigned int idx;
  
***************
*** 3378,3387 ****
  	if (state->nrchannels > 2)
  		printk(KERN_WARNING "usbaudio: feature unit %u: OSS mixer interface does not support more than 2 channels\n", ftr[3]);
  
! 	nr_logical_channels=(ftr[0]-7)/ftr[5]-1;
  
! 	if (nr_logical_channels != state->nrchannels) {
! 		printk(KERN_WARNING "usbaudio: warning: found %d of %d logical channels.\n", state->nrchannels,nr_logical_channels);
  
  		if (state->nrchannels == 1 && nr_logical_channels==0) {
  			printk(KERN_INFO "usbaudio: assuming the channel found is the master channel (got a Philips camera?). Should be fine.\n");
--- 3379,3388 ----
  	if (state->nrchannels > 2)
  		printk(KERN_WARNING "usbaudio: feature unit %u: OSS mixer interface does not support more than 2 channels\n", ftr[3]);
  
! 		nr_logical_channels=(ftr[0]-7)/ftr[5]-1;
  
! 		if (nr_logical_channels != state->nrchannels) {
! 			printk(KERN_WARNING "usbaudio: warning: found %d of %d logical channels.\n", state->nrchannels,nr_logical_channels);
  
  		if (state->nrchannels == 1 && nr_logical_channels==0) {
  			printk(KERN_INFO "usbaudio: assuming the channel found is the master channel (got a Philips camera?). Should be fine.\n");
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: auerswald.c
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/bluetooth.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/bluetooth.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/bluetooth.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/bluetooth.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 4,15 ****
   * Copyright (c) 2000, 2001 Greg Kroah-Hartman	
   * Copyright (c) 2000 Mark Douglas Corner	
   *
!  * USB Bluetooth TTY driver, based on the Bluetooth Spec version 1.0B
   * 
-  * (2001/11/30) Version 0.13 gkh
-  *	- added locking patch from Masoodur Rahman 
-  *	- removed active variable, as open_count will do.
-  *
   * (2001/07/09) Version 0.12 gkh
   *	- removed in_interrupt() call, as it doesn't make sense to do 
   *	  that anymore.
--- 4,11 ----
   * Copyright (c) 2000, 2001 Greg Kroah-Hartman	
   * Copyright (c) 2000 Mark Douglas Corner	
   *
!  * USB Bluetooth driver, based on the Bluetooth Spec version 1.0B
   * 
   * (2001/07/09) Version 0.12 gkh
   *	- removed in_interrupt() call, as it doesn't make sense to do 
   *	  that anymore.
***************
*** 104,117 ****
  
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  
  #define DEBUG
  #include 
--- 100,116 ----
  
  
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  
  #define DEBUG
  #include 
***************
*** 119,125 ****
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v0.13"
  #define DRIVER_AUTHOR "Greg Kroah-Hartman, Mark Douglas Corner"
  #define DRIVER_DESC "USB Bluetooth tty driver"
  
--- 118,124 ----
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v0.12"
  #define DRIVER_AUTHOR "Greg Kroah-Hartman, Mark Douglas Corner"
  #define DRIVER_DESC "USB Bluetooth tty driver"
  
***************
*** 171,182 ****
  	struct tty_struct *	tty;		/* the coresponding tty for this port */
  
  	unsigned char		minor;		/* the starting minor number for this device */
  	int			throttle;	/* throttled by tty layer */
- 	int			open_count;
  	
  	__u8			control_out_bInterfaceNum;
  	struct urb *		control_urb_pool[NUM_CONTROL_URBS];
! 	struct usb_ctrlrequest	dr[NUM_CONTROL_URBS];
  
  	unsigned char *		interrupt_in_buffer;
  	struct urb *		interrupt_in_urb;
--- 170,181 ----
  	struct tty_struct *	tty;		/* the coresponding tty for this port */
  
  	unsigned char		minor;		/* the starting minor number for this device */
+ 	char			active;		/* someone has this device open */
  	int			throttle;	/* throttled by tty layer */
  	
  	__u8			control_out_bInterfaceNum;
  	struct urb *		control_urb_pool[NUM_CONTROL_URBS];
! 	devrequest		dr[NUM_CONTROL_URBS];
  
  	unsigned char *		interrupt_in_buffer;
  	struct urb *		interrupt_in_urb;
***************
*** 201,207 ****
  	unsigned char		int_buffer[EVENT_BUFFER_SIZE];
  	unsigned int		bulk_packet_pos;
  	unsigned char		bulk_buffer[ACL_BUFFER_SIZE];	/* 64k preallocated, fix? */
- 	struct semaphore	lock;
  };
  
  
--- 200,205 ----
***************
*** 234,243 ****
  MODULE_DEVICE_TABLE (usb, usb_bluetooth_ids);
  
  static struct usb_driver usb_bluetooth_driver = {
! 	.name =		"bluetty",
! 	.probe =	usb_bluetooth_probe,
! 	.disconnect =	usb_bluetooth_disconnect,
! 	.id_table =	usb_bluetooth_ids,
  };
  
  static int			bluetooth_refcount;
--- 232,241 ----
  MODULE_DEVICE_TABLE (usb, usb_bluetooth_ids);
  
  static struct usb_driver usb_bluetooth_driver = {
! 	name:		"bluetooth",
! 	probe:		usb_bluetooth_probe,
! 	disconnect:	usb_bluetooth_disconnect,
! 	id_table:	usb_bluetooth_ids,
  };
  
  static int			bluetooth_refcount;
***************
*** 285,295 ****
  static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int value, const unsigned char *buf, int len)
  {
  	struct urb *urb = NULL;
! 	struct usb_ctrlrequest *dr = NULL;
  	int i;
  	int status;
  
! 	dbg ("%s", __FUNCTION__);
  
  	/* try to find a free urb in our list */
  	for (i = 0; i < NUM_CONTROL_URBS; ++i) {
--- 283,293 ----
  static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int value, const unsigned char *buf, int len)
  {
  	struct urb *urb = NULL;
! 	devrequest *dr = NULL;
  	int i;
  	int status;
  
! 	dbg (__FUNCTION__);
  
  	/* try to find a free urb in our list */
  	for (i = 0; i < NUM_CONTROL_URBS; ++i) {
***************
*** 300,306 ****
  		}
  	}
  	if (urb == NULL) {
! 		dbg ("%s - no free urbs", __FUNCTION__);
  		return -ENOMEM;
  	}
  
--- 298,304 ----
  		}
  	}
  	if (urb == NULL) {
! 		dbg (__FUNCTION__ " - no free urbs");
  		return -ENOMEM;
  	}
  
***************
*** 308,314 ****
  	if (urb->transfer_buffer == NULL) {
  		urb->transfer_buffer = kmalloc (len, GFP_KERNEL);
  		if (urb->transfer_buffer == NULL) {
! 			err ("%s - out of memory", __FUNCTION__);
  			return -ENOMEM;
  		}
  	}
--- 306,312 ----
  	if (urb->transfer_buffer == NULL) {
  		urb->transfer_buffer = kmalloc (len, GFP_KERNEL);
  		if (urb->transfer_buffer == NULL) {
! 			err (__FUNCTION__" - out of memory");
  			return -ENOMEM;
  		}
  	}
***************
*** 316,332 ****
  		kfree (urb->transfer_buffer);
  		urb->transfer_buffer = kmalloc (len, GFP_KERNEL);
  		if (urb->transfer_buffer == NULL) {
! 			err ("%s - out of memory", __FUNCTION__);
  			return -ENOMEM;
  		}
  	}
  	memcpy (urb->transfer_buffer, buf, len);
  
! 	dr->bRequestType= BLUETOOTH_CONTROL_REQUEST_TYPE;
! 	dr->bRequest = request;
! 	dr->wValue = cpu_to_le16((u16) value);
! 	dr->wIndex = cpu_to_le16((u16) bluetooth->control_out_bInterfaceNum);
! 	dr->wLength = cpu_to_le16((u16) len);
  	
  	FILL_CONTROL_URB (urb, bluetooth->dev, usb_sndctrlpipe(bluetooth->dev, 0),
  			  (unsigned char*)dr, urb->transfer_buffer, len, bluetooth_ctrl_callback, bluetooth);
--- 314,330 ----
  		kfree (urb->transfer_buffer);
  		urb->transfer_buffer = kmalloc (len, GFP_KERNEL);
  		if (urb->transfer_buffer == NULL) {
! 			err (__FUNCTION__" - out of memory");
  			return -ENOMEM;
  		}
  	}
  	memcpy (urb->transfer_buffer, buf, len);
  
! 	dr->requesttype = BLUETOOTH_CONTROL_REQUEST_TYPE;
! 	dr->request = request;
! 	dr->value = cpu_to_le16((u16) value);
! 	dr->index = cpu_to_le16((u16) bluetooth->control_out_bInterfaceNum);
! 	dr->length = cpu_to_le16((u16) len);
  	
  	FILL_CONTROL_URB (urb, bluetooth->dev, usb_sndctrlpipe(bluetooth->dev, 0),
  			  (unsigned char*)dr, urb->transfer_buffer, len, bluetooth_ctrl_callback, bluetooth);
***************
*** 334,340 ****
  	/* send it down the pipe */
  	status = usb_submit_urb(urb);
  	if (status)
! 		dbg("%s - usb_submit_urb(control) failed with status = %d", __FUNCTION__, status);
  	
  	return status;
  }
--- 332,338 ----
  	/* send it down the pipe */
  	status = usb_submit_urb(urb);
  	if (status)
! 		dbg(__FUNCTION__ " - usb_submit_urb(control) failed with status = %d", status);
  	
  	return status;
  }
***************
*** 351,357 ****
  	struct usb_bluetooth *bluetooth;
  	int result;
  
! 	dbg("%s", __FUNCTION__);
  
  	/* initialize the pointer incase something fails */
  	tty->driver_data = NULL;
--- 349,355 ----
  	struct usb_bluetooth *bluetooth;
  	int result;
  
! 	dbg(__FUNCTION__);
  
  	/* initialize the pointer incase something fails */
  	tty->driver_data = NULL;
***************
*** 363,408 ****
  		return -ENODEV;
  	}
  
! 	down (&bluetooth->lock);
!  
! 	++bluetooth->open_count;
! 	if (bluetooth->open_count == 1) {
! 		/* set up our structure making the tty driver remember our object, and us it */
! 		tty->driver_data = bluetooth;
! 		bluetooth->tty = tty;
! 
! 		/* force low_latency on so that our tty_push actually forces the data through, 
! 		 * otherwise it is scheduled, and with high data rates (like with OHCI) data
! 		 * can get lost. */
! 		bluetooth->tty->low_latency = 1;
  	
! 		/* Reset the packet position counters */
! 		bluetooth->int_packet_pos = 0;
! 		bluetooth->bulk_packet_pos = 0;
  
  #ifndef BTBUGGYHARDWARE
! 		/* Start reading from the device */
! 		FILL_BULK_URB (bluetooth->read_urb, bluetooth->dev, 
! 			       usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
! 			       bluetooth->bulk_in_buffer,
! 			       bluetooth->bulk_in_buffer_size,
! 			       bluetooth_read_bulk_callback, bluetooth);
! 		result = usb_submit_urb(bluetooth->read_urb);
! 		if (result)
! 			dbg("%s - usb_submit_urb(read bulk) failed with status %d", __FUNCTION__, result);
  #endif
! 		FILL_INT_URB (bluetooth->interrupt_in_urb, bluetooth->dev, 
! 			      usb_rcvintpipe(bluetooth->dev, bluetooth->interrupt_in_endpointAddress),
! 			      bluetooth->interrupt_in_buffer,
! 			      bluetooth->interrupt_in_buffer_size,
! 			      bluetooth_int_callback, bluetooth,
! 			      bluetooth->interrupt_in_interval);
! 		result = usb_submit_urb(bluetooth->interrupt_in_urb);
! 		if (result)
! 			dbg("%s - usb_submit_urb(interrupt in) failed with status %d", __FUNCTION__, result);
! 	}
! 	
! 	up(&bluetooth->lock);
  
  	return 0;
  }
--- 361,403 ----
  		return -ENODEV;
  	}
  
! 	if (bluetooth->active) {
! 		dbg (__FUNCTION__ " - device already open");
! 		return -EINVAL;
! 	}
! 
! 	/* set up our structure making the tty driver remember our object, and us it */
! 	tty->driver_data = bluetooth;
! 	bluetooth->tty = tty;
! 
! 	/* force low_latency on so that our tty_push actually forces the data through, 
! 	 * otherwise it is scheduled, and with high data rates (like with OHCI) data
! 	 * can get lost. */
! 	bluetooth->tty->low_latency = 1;
  	
! 	bluetooth->active = 1;
! 
! 	/* Reset the packet position counters */
! 	bluetooth->int_packet_pos = 0;
! 	bluetooth->bulk_packet_pos = 0;
  
  #ifndef BTBUGGYHARDWARE
! 	/* Start reading from the device */
! 	FILL_BULK_URB(bluetooth->read_urb, bluetooth->dev, 
! 		      usb_rcvbulkpipe(bluetooth->dev, bluetooth->bulk_in_endpointAddress),
! 		      bluetooth->bulk_in_buffer, bluetooth->bulk_in_buffer_size, 
! 		      bluetooth_read_bulk_callback, bluetooth);
! 	result = usb_submit_urb(bluetooth->read_urb);
! 	if (result)
! 		dbg(__FUNCTION__ " - usb_submit_urb(read bulk) failed with status %d", result);
  #endif
! 	FILL_INT_URB(bluetooth->interrupt_in_urb, bluetooth->dev, 
! 		     usb_rcvintpipe(bluetooth->dev, bluetooth->interrupt_in_endpointAddress),
! 		     bluetooth->interrupt_in_buffer, bluetooth->interrupt_in_buffer_size, 
! 		     bluetooth_int_callback, bluetooth, bluetooth->interrupt_in_interval);
! 	result = usb_submit_urb(bluetooth->interrupt_in_urb);
! 	if (result)
! 		dbg(__FUNCTION__ " - usb_submit_urb(interrupt in) failed with status %d", result);
  
  	return 0;
  }
***************
*** 417,442 ****
  		return;
  	}
  
! 	dbg("%s", __FUNCTION__);
  
! 	if (!bluetooth->open_count) {
! 		dbg ("%s - device not opened", __FUNCTION__);
  		return;
  	}
  
! 	down (&bluetooth->lock);
!  
! 	--bluetooth->open_count;
! 	if (bluetooth->open_count <= 0) {
! 		bluetooth->open_count = 0;
  
! 		/* shutdown any bulk reads and writes that might be going on */
! 		for (i = 0; i < NUM_BULK_URBS; ++i)
! 			usb_unlink_urb (bluetooth->write_urb_pool[i]);
! 		usb_unlink_urb (bluetooth->read_urb);
! 		usb_unlink_urb (bluetooth->interrupt_in_urb);
! 	}
! 	up(&bluetooth->lock);
  }
  
  
--- 412,431 ----
  		return;
  	}
  
! 	dbg(__FUNCTION__);
  
! 	if (!bluetooth->active) {
! 		dbg (__FUNCTION__ " - device not opened");
  		return;
  	}
  
! 	/* shutdown any bulk reads and writes that might be going on */
! 	for (i = 0; i < NUM_BULK_URBS; ++i)
! 		usb_unlink_urb (bluetooth->write_urb_pool[i]);
! 	usb_unlink_urb (bluetooth->read_urb);
! 	usb_unlink_urb (bluetooth->interrupt_in_urb);
  
! 	bluetooth->active = 0;
  }
  
  
***************
*** 456,479 ****
  		return -ENODEV;
  	}
  
! 	dbg("%s - %d byte(s)", __FUNCTION__, count);
  
! 	if (!bluetooth->open_count) {
! 		dbg ("%s - device not opened", __FUNCTION__);
  		return -EINVAL;
  	}
  
  	if (count == 0) {
! 		dbg("%s - write request of 0 bytes", __FUNCTION__);
  		return 0;
  	}
  	if (count == 1) {
! 		dbg("%s - write request only included type %d", __FUNCTION__, buf[0]);
  		return 1;
  	}
  
  #ifdef DEBUG
! 	printk (KERN_DEBUG __FILE__ ": %s - length = %d, data = ", __FUNCTION__, count);
  	for (i = 0; i < count; ++i) {
  		printk ("%.2x ", buf[i]);
  	}
--- 445,468 ----
  		return -ENODEV;
  	}
  
! 	dbg(__FUNCTION__ " - %d byte(s)", count);
  
! 	if (!bluetooth->active) {
! 		dbg (__FUNCTION__ " - device not opened");
  		return -EINVAL;
  	}
  
  	if (count == 0) {
! 		dbg(__FUNCTION__ " - write request of 0 bytes");
  		return 0;
  	}
  	if (count == 1) {
! 		dbg(__FUNCTION__ " - write request only included type %d", buf[0]);
  		return 1;
  	}
  
  #ifdef DEBUG
! 	printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ " - length = %d, data = ", count);
  	for (i = 0; i < count; ++i) {
  		printk ("%.2x ", buf[i]);
  	}
***************
*** 483,496 ****
  	if (from_user) {
  		temp_buffer = kmalloc (count, GFP_KERNEL);
  		if (temp_buffer == NULL) {
! 			err ("%s - out of memory.", __FUNCTION__);
  			retval = -ENOMEM;
  			goto exit;
  		}
! 		if (copy_from_user (temp_buffer, buf, count)) {
! 			retval = -EFAULT;
! 			goto exit;
! 		}
  		current_buffer = temp_buffer;
  	} else {
  		current_buffer = buf;
--- 472,482 ----
  	if (from_user) {
  		temp_buffer = kmalloc (count, GFP_KERNEL);
  		if (temp_buffer == NULL) {
! 			err (__FUNCTION__ "- out of memory.");
  			retval = -ENOMEM;
  			goto exit;
  		}
! 		copy_from_user (temp_buffer, buf, count);
  		current_buffer = temp_buffer;
  	} else {
  		current_buffer = buf;
***************
*** 499,505 ****
  	switch (*current_buffer) {
  		/* First byte indicates the type of packet */
  		case CMD_PKT:
! 			/* dbg("%s- Send cmd_pkt len:%d", __FUNCTION__, count);*/
  
  			retval = bluetooth_ctrl_msg (bluetooth, 0x00, 0x00, ¤t_buffer[1], count-1);
  			if (retval) {
--- 485,491 ----
  	switch (*current_buffer) {
  		/* First byte indicates the type of packet */
  		case CMD_PKT:
! 			/* dbg(__FUNCTION__ "- Send cmd_pkt len:%d", count);*/
  
  			retval = bluetooth_ctrl_msg (bluetooth, 0x00, 0x00, ¤t_buffer[1], count-1);
  			if (retval) {
***************
*** 525,531 ****
  					}
  				}
  				if (urb == NULL) {
! 					dbg ("%s - no free urbs", __FUNCTION__);
  					retval = bytes_sent;
  					goto exit;
  				}
--- 511,517 ----
  					}
  				}
  				if (urb == NULL) {
! 					dbg (__FUNCTION__ " - no free urbs");
  					retval = bytes_sent;
  					goto exit;
  				}
***************
*** 542,548 ****
  				/* send it down the pipe */
  				retval = usb_submit_urb(urb);
  				if (retval) {
! 					dbg("%s - usb_submit_urb(write bulk) failed with error = %d", __FUNCTION__, retval);
  					goto exit;
  				}
  #ifdef BTBUGGYHARDWARE
--- 528,534 ----
  				/* send it down the pipe */
  				retval = usb_submit_urb(urb);
  				if (retval) {
! 					dbg(__FUNCTION__ " - usb_submit_urb(write bulk) failed with error = %d", retval);
  					goto exit;
  				}
  #ifdef BTBUGGYHARDWARE
***************
*** 561,567 ****
  			break;
  		
  		default :
! 			dbg("%s - unsupported (at this time) write type", __FUNCTION__);
  			retval = -EINVAL;
  			break;
  	}
--- 547,553 ----
  			break;
  		
  		default :
! 			dbg(__FUNCTION__" - unsupported (at this time) write type");
  			retval = -EINVAL;
  			break;
  	}
***************
*** 584,593 ****
  		return -ENODEV;
  	}
  
! 	dbg("%s", __FUNCTION__);
  
! 	if (!bluetooth->open_count) {
! 		dbg ("%s - device not open", __FUNCTION__);
  		return -EINVAL;
  	}
  
--- 570,579 ----
  		return -ENODEV;
  	}
  
! 	dbg(__FUNCTION__);
  
! 	if (!bluetooth->active) {
! 		dbg (__FUNCTION__ " - device not open");
  		return -EINVAL;
  	}
  
***************
*** 597,603 ****
  		}
  	}
  
! 	dbg("%s - returns %d", __FUNCTION__, room);
  	return room;
  }
  
--- 583,589 ----
  		}
  	}
  
! 	dbg(__FUNCTION__ " - returns %d", room);
  	return room;
  }
  
***************
*** 612,619 ****
  		return -ENODEV;
  	}
  
! 	if (!bluetooth->open_count) {
! 		dbg ("%s - device not open", __FUNCTION__);
  		return -EINVAL;
  	}
  
--- 598,605 ----
  		return -ENODEV;
  	}
  
! 	if (!bluetooth->active) {
! 		dbg (__FUNCTION__ " - device not open");
  		return -EINVAL;
  	}
  
***************
*** 623,629 ****
  		}
  	}
  
! 	dbg ("%s - returns %d", __FUNCTION__, chars);
  	return chars;
  }
  
--- 609,615 ----
  		}
  	}
  
! 	dbg (__FUNCTION__ " - returns %d", chars);
  	return chars;
  }
  
***************
*** 636,649 ****
  		return;
  	}
  
! 	dbg("%s", __FUNCTION__);
  
! 	if (!bluetooth->open_count) {
! 		dbg ("%s - device not open", __FUNCTION__);
  		return;
  	}
  	
! 	dbg("%s unsupported (at this time)", __FUNCTION__);
  
  	return;
  }
--- 622,635 ----
  		return;
  	}
  
! 	dbg(__FUNCTION__);
  
! 	if (!bluetooth->active) {
! 		dbg (__FUNCTION__ " - device not open");
  		return;
  	}
  	
! 	dbg(__FUNCTION__ " unsupported (at this time)");
  
  	return;
  }
***************
*** 657,670 ****
  		return;
  	}
  
! 	dbg("%s", __FUNCTION__);
  
! 	if (!bluetooth->open_count) {
! 		dbg ("%s - device not open", __FUNCTION__);
  		return;
  	}
  
! 	dbg("%s unsupported (at this time)", __FUNCTION__);
  }
  
  
--- 643,656 ----
  		return;
  	}
  
! 	dbg(__FUNCTION__);
  
! 	if (!bluetooth->active) {
! 		dbg (__FUNCTION__ " - device not open");
  		return;
  	}
  
! 	dbg(__FUNCTION__ " unsupported (at this time)");
  }
  
  
***************
*** 676,685 ****
  		return -ENODEV;
  	}
  
! 	dbg("%s - cmd 0x%.4x", __FUNCTION__, cmd);
  
! 	if (!bluetooth->open_count) {
! 		dbg ("%s - device not open", __FUNCTION__);
  		return -ENODEV;
  	}
  
--- 662,671 ----
  		return -ENODEV;
  	}
  
! 	dbg(__FUNCTION__ " - cmd 0x%.4x", cmd);
  
! 	if (!bluetooth->active) {
! 		dbg (__FUNCTION__ " - device not open");
  		return -ENODEV;
  	}
  
***************
*** 696,705 ****
  		return;
  	}
  
! 	dbg("%s", __FUNCTION__);
  
! 	if (!bluetooth->open_count) {
! 		dbg ("%s - device not open", __FUNCTION__);
  		return;
  	}
  
--- 682,691 ----
  		return;
  	}
  
! 	dbg(__FUNCTION__);
  
! 	if (!bluetooth->active) {
! 		dbg (__FUNCTION__ " - device not open");
  		return;
  	}
  
***************
*** 718,727 ****
  		return;
  	}
  
! 	dbg("%s", __FUNCTION__);
  
! 	if (!bluetooth->open_count) {
! 		dbg ("%s - device not open", __FUNCTION__);
  		return;
  	}
  
--- 704,713 ----
  		return;
  	}
  
! 	dbg(__FUNCTION__);
  
! 	if (!bluetooth->active) {
! 		dbg (__FUNCTION__ " - device not open");
  		return;
  	}
  
***************
*** 732,738 ****
  			      bluetooth_read_bulk_callback, bluetooth);
  		result = usb_submit_urb(bluetooth->read_urb);
  		if (result)
! 			err ("%s - failed submitting read urb, error %d", __FUNCTION__, result);
  	}
  }
  
--- 718,724 ----
  			      bluetooth_read_bulk_callback, bluetooth);
  		result = usb_submit_urb(bluetooth->read_urb);
  		if (result)
! 			err (__FUNCTION__ " - failed submitting read urb, error %d", result);
  	}
  }
  
***************
*** 743,752 ****
  		return;
  	}
  
! 	dbg("%s", __FUNCTION__);
  
! 	if (!bluetooth->open_count) {
! 		dbg ("%s - device not open", __FUNCTION__);
  		return;
  	}
  
--- 729,738 ----
  		return;
  	}
  
! 	dbg(__FUNCTION__);
  
! 	if (!bluetooth->active) {
! 		dbg (__FUNCTION__ " - device not open");
  		return;
  	}
  
***************
*** 769,795 ****
  	unsigned int count = urb->actual_length;
  	unsigned int packet_size;
  
! 	dbg("%s", __FUNCTION__);
  
  	if (!bluetooth) {
! 		dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero int status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
  	if (!count) {
! 		dbg("%s - zero length int", __FUNCTION__);
  		return;
  	}
  
  
  #ifdef DEBUG
  	if (count) {
! 		printk (KERN_DEBUG __FILE__ ": %s- length = %d, data = ", __FUNCTION__, count);
  		for (i = 0; i < count; ++i) {
  			printk ("%.2x ", data[i]);
  		}
--- 755,781 ----
  	unsigned int count = urb->actual_length;
  	unsigned int packet_size;
  
! 	dbg(__FUNCTION__);
  
  	if (!bluetooth) {
! 		dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero int status received: %d", urb->status);
  		return;
  	}
  
  	if (!count) {
! 		dbg(__FUNCTION__ " - zero length int");
  		return;
  	}
  
  
  #ifdef DEBUG
  	if (count) {
! 		printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ "- length = %d, data = ", count);
  		for (i = 0; i < count; ++i) {
  			printk ("%.2x ", data[i]);
  		}
***************
*** 819,825 ****
  	}
  	
  	if (bluetooth->int_packet_pos + count > EVENT_BUFFER_SIZE) {
! 		err("%s - exceeded EVENT_BUFFER_SIZE", __FUNCTION__);
  		bluetooth->int_packet_pos = 0;
  		return;
  	}
--- 805,811 ----
  	}
  	
  	if (bluetooth->int_packet_pos + count > EVENT_BUFFER_SIZE) {
! 		err(__FUNCTION__ " - exceeded EVENT_BUFFER_SIZE");
  		bluetooth->int_packet_pos = 0;
  		return;
  	}
***************
*** 835,841 ****
  		return;
  
  	if (packet_size + EVENT_HDR_SIZE < bluetooth->int_packet_pos) {
! 		err("%s - packet was too long", __FUNCTION__);
  		bluetooth->int_packet_pos = 0;
  		return;
  	}
--- 821,827 ----
  		return;
  
  	if (packet_size + EVENT_HDR_SIZE < bluetooth->int_packet_pos) {
! 		err(__FUNCTION__ " - packet was too long");
  		bluetooth->int_packet_pos = 0;
  		return;
  	}
***************
*** 859,873 ****
  {
  	struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
  
! 	dbg("%s", __FUNCTION__);
  
  	if (!bluetooth) {
! 		dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  }
--- 845,859 ----
  {
  	struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
  
! 	dbg(__FUNCTION__);
  
  	if (!bluetooth) {
! 		dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
  		return;
  	}
  }
***************
*** 883,912 ****
  	int result;
  
  
! 	dbg("%s", __FUNCTION__);
  
  	if (!bluetooth) {
! 		dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
  		if (urb->status == -ENOENT) {                   
! 			dbg("%s - URB canceled, won't reschedule", __FUNCTION__);
  			return;
  		}
  		goto exit;
  	}
  
  	if (!count) {
! 		dbg("%s - zero length read bulk", __FUNCTION__);
  		goto exit;
  	}
  
  #ifdef DEBUG
  	if (count) {
! 		printk (KERN_DEBUG __FILE__ ": %s- length = %d, data = ", __FUNCTION__, count);
  		for (i = 0; i < count; ++i) {
  			printk ("%.2x ", data[i]);
  		}
--- 869,898 ----
  	int result;
  
  
! 	dbg(__FUNCTION__);
  
  	if (!bluetooth) {
! 		dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
  		if (urb->status == -ENOENT) {                   
! 			dbg(__FUNCTION__ " - URB canceled, won't reschedule");
  			return;
  		}
  		goto exit;
  	}
  
  	if (!count) {
! 		dbg(__FUNCTION__ " - zero length read bulk");
  		goto exit;
  	}
  
  #ifdef DEBUG
  	if (count) {
! 		printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ "- length = %d, data = ", count);
  		for (i = 0; i < count; ++i) {
  			printk ("%.2x ", data[i]);
  		}
***************
*** 923,929 ****
  			      bluetooth_read_bulk_callback, bluetooth);
  		result = usb_submit_urb(bluetooth->read_urb);
  		if (result)
! 			err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
  
  		return;
  	}
--- 909,915 ----
  			      bluetooth_read_bulk_callback, bluetooth);
  		result = usb_submit_urb(bluetooth->read_urb);
  		if (result)
! 			err (__FUNCTION__ " - failed resubmitting read urb, error %d", result);
  
  		return;
  	}
***************
*** 940,946 ****
  	}
  
  	if (bluetooth->bulk_packet_pos + count > ACL_BUFFER_SIZE) {
! 		err("%s - exceeded ACL_BUFFER_SIZE", __FUNCTION__);
  		bluetooth->bulk_packet_pos = 0;
  		goto exit;
  	}
--- 926,932 ----
  	}
  
  	if (bluetooth->bulk_packet_pos + count > ACL_BUFFER_SIZE) {
! 		err(__FUNCTION__ " - exceeded ACL_BUFFER_SIZE");
  		bluetooth->bulk_packet_pos = 0;
  		goto exit;
  	}
***************
*** 957,963 ****
  	}
  
  	if (packet_size + ACL_HDR_SIZE < bluetooth->bulk_packet_pos) {
! 		err("%s - packet was too long", __FUNCTION__);
  		bluetooth->bulk_packet_pos = 0;
  		goto exit;
  	}
--- 943,949 ----
  	}
  
  	if (packet_size + ACL_HDR_SIZE < bluetooth->bulk_packet_pos) {
! 		err(__FUNCTION__ " - packet was too long");
  		bluetooth->bulk_packet_pos = 0;
  		goto exit;
  	}
***************
*** 975,981 ****
  	}	
  
  exit:
! 	if (!bluetooth || !bluetooth->open_count)
  		return;
  
  	FILL_BULK_URB(bluetooth->read_urb, bluetooth->dev, 
--- 961,967 ----
  	}	
  
  exit:
! 	if (!bluetooth || !bluetooth->active)
  		return;
  
  	FILL_BULK_URB(bluetooth->read_urb, bluetooth->dev, 
***************
*** 984,990 ****
  		      bluetooth_read_bulk_callback, bluetooth);
  	result = usb_submit_urb(bluetooth->read_urb);
  	if (result)
! 		err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
  
  	return;
  }
--- 970,976 ----
  		      bluetooth_read_bulk_callback, bluetooth);
  	result = usb_submit_urb(bluetooth->read_urb);
  	if (result)
! 		err (__FUNCTION__ " - failed resubmitting read urb, error %d", result);
  
  	return;
  }
***************
*** 994,1008 ****
  {
  	struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
  
! 	dbg("%s", __FUNCTION__);
  
  	if (!bluetooth) {
! 		dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
--- 980,994 ----
  {
  	struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
  
! 	dbg(__FUNCTION__);
  
  	if (!bluetooth) {
! 		dbg(__FUNCTION__ " - bad bluetooth pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
  		return;
  	}
  
***************
*** 1018,1024 ****
  	struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)private, __FUNCTION__);
  	struct tty_struct *tty;
  
! 	dbg("%s", __FUNCTION__);
  
  	if (!bluetooth) {
  		return;
--- 1004,1010 ----
  	struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)private, __FUNCTION__);
  	struct tty_struct *tty;
  
! 	dbg(__FUNCTION__);
  
  	if (!bluetooth) {
  		return;
***************
*** 1026,1032 ****
  
  	tty = bluetooth->tty;
  	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
! 		dbg("%s - write wakeup call.", __FUNCTION__);
  		(tty->ldisc.write_wakeup)(tty);
  	}
  
--- 1012,1018 ----
  
  	tty = bluetooth->tty;
  	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
! 		dbg(__FUNCTION__ " - write wakeup call.");
  		(tty->ldisc.write_wakeup)(tty);
  	}
  
***************
*** 1088,1094 ****
  	if ((num_bulk_in != 1) ||
  	    (num_bulk_out != 1) ||
  	    (num_interrupt_in != 1)) {
! 		dbg ("%s - improper number of endpoints. Bluetooth driver not bound.", __FUNCTION__);
  		return NULL;
  	}
  
--- 1074,1080 ----
  	if ((num_bulk_in != 1) ||
  	    (num_bulk_out != 1) ||
  	    (num_interrupt_in != 1)) {
! 		dbg (__FUNCTION__ " - improper number of endpoints. Bluetooth driver not bound.");
  		return NULL;
  	}
  
***************
*** 1116,1122 ****
  	bluetooth->minor = minor;
  	bluetooth->tqueue.routine = bluetooth_softint;
  	bluetooth->tqueue.data = bluetooth;
- 	init_MUTEX(&bluetooth->lock);
  
  	/* record the interface number for the control out */
  	bluetooth->control_out_bInterfaceNum = control_out_endpoint;
--- 1102,1107 ----
***************
*** 1151,1158 ****
  
  	endpoint = bulk_out_endpoint[0];
  	bluetooth->bulk_out_endpointAddress = endpoint->bEndpointAddress;
! 	bluetooth->bulk_out_buffer_size = endpoint->wMaxPacketSize * 2;
! 
  	/* create our write urb pool */ 
  	for (i = 0; i < NUM_BULK_URBS; ++i) {
  		struct urb  *urb = usb_alloc_urb(0);
--- 1136,1142 ----
  
  	endpoint = bulk_out_endpoint[0];
  	bluetooth->bulk_out_endpointAddress = endpoint->bEndpointAddress;
! 	
  	/* create our write urb pool */ 
  	for (i = 0; i < NUM_BULK_URBS; ++i) {
  		struct urb  *urb = usb_alloc_urb(0);
***************
*** 1167,1172 ****
--- 1151,1158 ----
  		}
  		bluetooth->write_urb_pool[i] = urb;
  	}
+ 	
+ 	bluetooth->bulk_out_buffer_size = endpoint->wMaxPacketSize * 2;
  
  	endpoint = interrupt_in_endpoint[0];
  	bluetooth->interrupt_in_urb = usb_alloc_urb(0);
***************
*** 1231,1240 ****
  	int i;
  
  	if (bluetooth) {
! 		if ((bluetooth->open_count) && (bluetooth->tty))
  			tty_hangup(bluetooth->tty);
  
! 		bluetooth->open_count = 0;
  
  		if (bluetooth->read_urb) {
  			usb_unlink_urb (bluetooth->read_urb);
--- 1217,1226 ----
  	int i;
  
  	if (bluetooth) {
! 		if ((bluetooth->active) && (bluetooth->tty))
  			tty_hangup(bluetooth->tty);
  
! 		bluetooth->active = 0;
  
  		if (bluetooth->read_urb) {
  			usb_unlink_urb (bluetooth->read_urb);
***************
*** 1285,1314 ****
  
  
  static struct tty_driver bluetooth_tty_driver = {
! 	.magic =		TTY_DRIVER_MAGIC,
! 	.driver_name =		"usb-bluetooth",
! 	.name =			"usb/ttub/%d",
! 	.major =		BLUETOOTH_TTY_MAJOR,
! 	.minor_start =		0,
! 	.num =			BLUETOOTH_TTY_MINORS,
! 	.type =			TTY_DRIVER_TYPE_SERIAL,
! 	.subtype =		SERIAL_TYPE_NORMAL,
! 	.flags =		TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
! 
! 	.refcount =		&bluetooth_refcount,
! 	.table =		bluetooth_tty,
! 	.termios =		bluetooth_termios,
! 	.termios_locked =	bluetooth_termios_locked,
! 
! 	.open =			bluetooth_open,
! 	.close =		bluetooth_close,
! 	.write =		bluetooth_write,
! 	.write_room =		bluetooth_write_room,
! 	.ioctl =		bluetooth_ioctl,
! 	.set_termios =		bluetooth_set_termios,
! 	.throttle =		bluetooth_throttle,
! 	.unthrottle =		bluetooth_unthrottle,
! 	.chars_in_buffer =	bluetooth_chars_in_buffer,
  };
  
  
--- 1271,1300 ----
  
  
  static struct tty_driver bluetooth_tty_driver = {
! 	magic:			TTY_DRIVER_MAGIC,
! 	driver_name:		"usb-bluetooth",
! 	name:			"usb/ttub/%d",
! 	major:			BLUETOOTH_TTY_MAJOR,
! 	minor_start:		0,
! 	num:			BLUETOOTH_TTY_MINORS,
! 	type:			TTY_DRIVER_TYPE_SERIAL,
! 	subtype:		SERIAL_TYPE_NORMAL,
! 	flags:			TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
! 
! 	refcount:		&bluetooth_refcount,
! 	table:			bluetooth_tty,
! 	termios:		bluetooth_termios,
! 	termios_locked:		bluetooth_termios_locked,
! 
! 	open:			bluetooth_open,
! 	close:			bluetooth_close,
! 	write:			bluetooth_write,
! 	write_room:		bluetooth_write_room,
! 	ioctl:			bluetooth_ioctl,
! 	set_termios:		bluetooth_set_termios,
! 	throttle:		bluetooth_throttle,
! 	unthrottle:		bluetooth_unthrottle,
! 	chars_in_buffer:	bluetooth_chars_in_buffer,
  };
  
  
***************
*** 1328,1334 ****
  	bluetooth_tty_driver.init_termios          = tty_std_termios;
  	bluetooth_tty_driver.init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
  	if (tty_register_driver (&bluetooth_tty_driver)) {
! 		err("%s - failed to register tty driver", __FUNCTION__);
  		return -1;
  	}
  
--- 1314,1320 ----
  	bluetooth_tty_driver.init_termios          = tty_std_termios;
  	bluetooth_tty_driver.init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
  	if (tty_register_driver (&bluetooth_tty_driver)) {
! 		err(__FUNCTION__ " - failed to register tty driver");
  		return -1;
  	}
  
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: brlvger.c
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/catc.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/catc.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/catc.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/catc.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 7,15 ****
   *
   *  Based on the work of
   *		Donald Becker
-  * 
-  *  Old chipset support added by Simon Evans  2002
-  *    - adds support for Belkin F5U011
   */
  
  /*
--- 7,12 ----
***************
*** 41,49 ****
  #include 
  #include 
  #include 
- #include 
  #include 
- #include 
  
  #undef DEBUG
  
--- 38,44 ----
***************
*** 53,62 ****
   * Version information.
   */
  
! #define DRIVER_VERSION "v2.8"
  #define DRIVER_AUTHOR "Vojtech Pavlik "
  #define DRIVER_DESC "CATC EL1210A NetMate USB Ethernet driver"
- #define SHORT_DRIVER_DESC "EL1210A NetMate USB Ethernet"
  
  MODULE_AUTHOR(DRIVER_AUTHOR);
  MODULE_DESCRIPTION(DRIVER_DESC);
--- 48,56 ----
   * Version information.
   */
  
! #define DRIVER_VERSION "v2.7"
  #define DRIVER_AUTHOR "Vojtech Pavlik "
  #define DRIVER_DESC "CATC EL1210A NetMate USB Ethernet driver"
  
  MODULE_AUTHOR(DRIVER_AUTHOR);
  MODULE_DESCRIPTION(DRIVER_DESC);
***************
*** 72,78 ****
  #define RX_MAX_BURST		15	/* Max packets per rx buffer (> 0, < 16) */
  #define TX_MAX_BURST		15	/* Max full sized packets per tx buffer (> 0) */
  #define CTRL_QUEUE		16	/* Max control requests in flight (power of two) */
- #define RX_PKT_SZ		1600	/* Max size of receive packet for F5U011 */
  
  /*
   * Control requests.
--- 66,71 ----
***************
*** 83,89 ****
  	GetMac =	0xf2,
  	Reset =		0xf4,
  	SetMac =	0xf5,
- 	SetRxMode =     0xf5,  /* F5U011 only */
  	WriteROM =	0xf8,
  	SetReg =	0xfa,
  	GetReg =	0xfb,
--- 76,81 ----
***************
*** 131,137 ****
  	RxForceOK =	0x04,
  	RxMultiCast =	0x08,
  	RxPromisc =	0x10,
- 	AltRxPromisc =  0x20, /* F5U011 uses different bit */
  };
  
  enum led_values {
--- 123,128 ----
***************
*** 142,153 ****
  	LEDLink =	0x08,
  };
  
- enum link_status {
- 	LinkNoChange = 0,
- 	LinkGood     = 1,
- 	LinkBad      = 2
- };
- 
  /*
   * The catc struct.
   */
--- 133,138 ----
***************
*** 171,177 ****
  	u8 rx_buf[RX_MAX_BURST * (PKT_SZ + 2)];
  	u8 irq_buf[2];
  	u8 ctrl_buf[64];
! 	struct usb_ctrlrequest ctrl_dr;
  
  	struct timer_list timer;
  	u8 stats_buf[8];
--- 156,162 ----
  	u8 rx_buf[RX_MAX_BURST * (PKT_SZ + 2)];
  	u8 irq_buf[2];
  	u8 ctrl_buf[64];
! 	devrequest ctrl_dr;
  
  	struct timer_list timer;
  	u8 stats_buf[8];
***************
*** 191,200 ****
  	} ctrl_queue[CTRL_QUEUE];
  
  	struct urb tx_urb, rx_urb, irq_urb, ctrl_urb;
- 
- 	u8 is_f5u011;	/* Set if device is an F5U011 */
- 	u8 rxmode[2];	/* Used for F5U011 */
- 	atomic_t recq_sz; /* Used for F5U011 - counter of waiting rx packets */
  };
  
  /*
--- 176,181 ----
***************
*** 208,217 ****
  #define catc_write_mem(catc, addr, buf, size)		catc_ctrl_msg(catc, USB_DIR_OUT, WriteMem, 0, addr, buf, size)
  #define catc_read_mem(catc, addr, buf, size)		catc_ctrl_msg(catc, USB_DIR_IN,  ReadMem, 0, addr, buf, size)
  
- #define f5u011_rxmode(catc, rxmode)			catc_ctrl_msg(catc, USB_DIR_OUT, SetRxMode, 0, 1, rxmode, 2)
- #define f5u011_rxmode_async(catc, rxmode)		catc_ctrl_async(catc, USB_DIR_OUT, SetRxMode, 0, 1, &rxmode, 2, NULL)
- #define f5u011_mchash_async(catc, hash)			catc_ctrl_async(catc, USB_DIR_OUT, SetRxMode, 0, 2, &hash, 8, NULL)
- 
  #define catc_set_reg_async(catc, reg, val)		catc_ctrl_async(catc, USB_DIR_OUT, SetReg, val, reg, NULL, 0, NULL)
  #define catc_get_reg_async(catc, reg, cb)		catc_ctrl_async(catc, USB_DIR_IN, GetReg, 0, reg, NULL, 1, cb)
  #define catc_write_mem_async(catc, addr, buf, size)	catc_ctrl_async(catc, USB_DIR_OUT, WriteMem, 0, addr, buf, size, NULL)
--- 189,194 ----
***************
*** 225,236 ****
  	struct catc *catc = urb->context;
  	u8 *pkt_start = urb->transfer_buffer;
  	struct sk_buff *skb;
! 	int pkt_len, pkt_offset = 0;
  
! 	if (!catc->is_f5u011) {
! 		clear_bit(RX_RUNNING, &catc->flags);
! 		pkt_offset = 2;
! 	}
  
  	if (urb->status) {
  		dbg("rx_done, status %d, length %d", urb->status, urb->actual_length);
--- 202,210 ----
  	struct catc *catc = urb->context;
  	u8 *pkt_start = urb->transfer_buffer;
  	struct sk_buff *skb;
! 	int pkt_len;
  
! 	clear_bit(RX_RUNNING, &catc->flags);
  
  	if (urb->status) {
  		dbg("rx_done, status %d, length %d", urb->status, urb->actual_length);
***************
*** 238,259 ****
  	}
  
  	do {
! 		if(!catc->is_f5u011) {
! 			pkt_len = le16_to_cpup((u16*)pkt_start);
! 			if (pkt_len > urb->actual_length) {
! 				catc->stats.rx_length_errors++;
! 				catc->stats.rx_errors++;
! 				break;
! 			}
! 		} else {
! 			pkt_len = urb->actual_length;
  		}
  
  		if (!(skb = dev_alloc_skb(pkt_len)))
  			return;
  
  		skb->dev = catc->netdev;
! 		eth_copy_and_sum(skb, pkt_start + pkt_offset, pkt_len, 0);
  		skb_put(skb, pkt_len);
  
  		skb->protocol = eth_type_trans(skb, catc->netdev);
--- 212,230 ----
  	}
  
  	do {
! 		pkt_len = le16_to_cpup((u16*)pkt_start);
! 
! 		if (pkt_len > urb->actual_length) {
! 			catc->stats.rx_length_errors++;
! 			catc->stats.rx_errors++;
! 			break;
  		}
  
  		if (!(skb = dev_alloc_skb(pkt_len)))
  			return;
  
  		skb->dev = catc->netdev;
! 		eth_copy_and_sum(skb, pkt_start + 2, pkt_len, 0);
  		skb_put(skb, pkt_len);
  
  		skb->protocol = eth_type_trans(skb, catc->netdev);
***************
*** 262,289 ****
  		catc->stats.rx_packets++;
  		catc->stats.rx_bytes += pkt_len;
  
- 		/* F5U011 only does one packet per RX */
- 		if (catc->is_f5u011)
- 			break;
  		pkt_start += (((pkt_len + 1) >> 6) + 1) << 6;
  
  	} while (pkt_start - (u8 *) urb->transfer_buffer < urb->actual_length);
  
  	catc->netdev->last_rx = jiffies;
- 
- 	if (catc->is_f5u011) {
- 		if (atomic_read(&catc->recq_sz)) {
- 			int status;
- 			atomic_dec(&catc->recq_sz);
- 			dbg("getting extra packet");
- 			urb->dev = catc->usbdev;
- 			if ((status = usb_submit_urb(urb)) < 0) {
- 				dbg("submit(rx_urb) status %d", status);
- 			}
- 		} else {
- 			clear_bit(RX_RUNNING, &catc->flags);
- 		}
- 	}
  }
  
  static void catc_irq_done(struct urb *urb)
--- 233,243 ----
***************
*** 291,338 ****
  	struct catc *catc = urb->context;
  	u8 *data = urb->transfer_buffer;
  	int status;
- 	unsigned int hasdata = 0, linksts = LinkNoChange;
- 
- 	if (!catc->is_f5u011) {
- 		hasdata = data[1] & 0x80;
- 		if (data[1] & 0x40)
- 			linksts = LinkGood;
- 		else if (data[1] & 0x20)
- 			linksts = LinkBad;
- 	} else {
- 		hasdata = (unsigned int)(be16_to_cpup((u16*)data) & 0x0fff);
- 		if (data[0] == 0x90)
- 			linksts = LinkGood;
- 		else if (data[0] == 0xA0)
- 			linksts = LinkBad;
- 	}
  
  	if (urb->status) {
  		dbg("irq_done, status %d, data %02x %02x.", urb->status, data[0], data[1]);
  		return;
  	}
  
! 	if (linksts == LinkGood) {
! 		netif_carrier_on(catc->netdev);
! 		dbg("link ok");
  	}
  
! 	if (linksts == LinkBad) {
! 		netif_carrier_off(catc->netdev);
! 		dbg("link bad");
! 	}
  
! 	if (hasdata) {
! 		if (test_and_set_bit(RX_RUNNING, &catc->flags)) {
! 			if (catc->is_f5u011)
! 				atomic_inc(&catc->recq_sz);
! 		} else {
! 			catc->rx_urb.dev = catc->usbdev;
! 			if ((status = usb_submit_urb(&catc->rx_urb)) < 0) {
! 				err("submit(rx_urb) status %d", status);
! 			}
! 		} 
! 	}
  }
  
  /*
--- 245,269 ----
  	struct catc *catc = urb->context;
  	u8 *data = urb->transfer_buffer;
  	int status;
  
  	if (urb->status) {
  		dbg("irq_done, status %d, data %02x %02x.", urb->status, data[0], data[1]);
  		return;
  	}
  
! 	if ((data[1] & 0x80) && !test_and_set_bit(RX_RUNNING, &catc->flags)) {
! 		catc->rx_urb.dev = catc->usbdev;
! 		if ((status = usb_submit_urb(&catc->rx_urb)) < 0) {
! 			err("submit(rx_urb) status %d", status);
! 			return;
! 		} 
  	}
  
! 	if (data[1] & 0x40)
! 		dbg("link ok");
  
! 	if (data[1] & 0x20) 
! 		dbg("link bad");
  }
  
  /*
***************
*** 343,351 ****
  {
  	int status;
  
- 	if (catc->is_f5u011)
- 		catc->tx_ptr = (catc->tx_ptr + 63) & ~63;
- 
  	catc->tx_urb.transfer_buffer_length = catc->tx_ptr;
  	catc->tx_urb.transfer_buffer = catc->tx_buf[catc->tx_idx];
  	catc->tx_urb.dev = catc->usbdev;
--- 274,279 ----
***************
*** 402,417 ****
  
  	catc->tx_ptr = (((catc->tx_ptr - 1) >> 6) + 1) << 6;
  	tx_buf = catc->tx_buf[catc->tx_idx] + catc->tx_ptr;
! 	*((u16*)tx_buf) = (catc->is_f5u011) ? 
! 		cpu_to_be16((u16)skb->len) : cpu_to_le16((u16)skb->len);
  	memcpy(tx_buf + 2, skb->data, skb->len);
  	catc->tx_ptr += skb->len + 2;
  
  	if (!test_and_set_bit(TX_RUNNING, &catc->flags))
  		catc_tx_run(catc);
  
! 	if ((catc->is_f5u011 && catc->tx_ptr)
! 	     || (catc->tx_ptr >= ((TX_MAX_BURST - 1) * (PKT_SZ + 2))))
  		netif_stop_queue(netdev);
  
  	spin_unlock_irqrestore(&catc->tx_lock, flags);
--- 330,343 ----
  
  	catc->tx_ptr = (((catc->tx_ptr - 1) >> 6) + 1) << 6;
  	tx_buf = catc->tx_buf[catc->tx_idx] + catc->tx_ptr;
! 	*((u16*)tx_buf) = cpu_to_le16((u16)skb->len);
  	memcpy(tx_buf + 2, skb->data, skb->len);
  	catc->tx_ptr += skb->len + 2;
  
  	if (!test_and_set_bit(TX_RUNNING, &catc->flags))
  		catc_tx_run(catc);
  
! 	if (catc->tx_ptr >= ((TX_MAX_BURST - 1) * (PKT_SZ + 2)))
  		netif_stop_queue(netdev);
  
  	spin_unlock_irqrestore(&catc->tx_lock, flags);
***************
*** 450,463 ****
  	struct ctrl_queue *q = catc->ctrl_queue + catc->ctrl_tail;
  	struct usb_device *usbdev = catc->usbdev;
  	struct urb *urb = &catc->ctrl_urb;
! 	struct usb_ctrlrequest *dr = &catc->ctrl_dr;
  	int status;
  
! 	dr->bRequest = q->request;
! 	dr->bRequestType = 0x40 | q->dir;
! 	dr->wValue = cpu_to_le16(q->value);
! 	dr->wIndex = cpu_to_le16(q->index);
! 	dr->wLength = cpu_to_le16(q->len);
  
          urb->pipe = q->dir ? usb_rcvctrlpipe(usbdev, 0) : usb_sndctrlpipe(usbdev, 0);
  	urb->transfer_buffer_length = q->len;
--- 376,389 ----
  	struct ctrl_queue *q = catc->ctrl_queue + catc->ctrl_tail;
  	struct usb_device *usbdev = catc->usbdev;
  	struct urb *urb = &catc->ctrl_urb;
! 	devrequest *dr = &catc->ctrl_dr;
  	int status;
  
! 	dr->request = q->request;
! 	dr->requesttype = 0x40 | q->dir;
! 	dr->value = cpu_to_le16(q->value);
! 	dr->index = cpu_to_le16(q->index);
! 	dr->length = cpu_to_le16(q->len);
  
          urb->pipe = q->dir ? usb_rcvctrlpipe(usbdev, 0) : usb_sndctrlpipe(usbdev, 0);
  	urb->transfer_buffer_length = q->len;
***************
*** 476,482 ****
  {
  	struct catc *catc = urb->context;
  	struct ctrl_queue *q;
! 	unsigned long flags;
  
  	if (urb->status)
  		dbg("ctrl_done, status %d, len %d.", urb->status, urb->actual_length);
--- 402,408 ----
  {
  	struct catc *catc = urb->context;
  	struct ctrl_queue *q;
! 	long flags;
  
  	if (urb->status)
  		dbg("ctrl_done, status %d, len %d.", urb->status, urb->actual_length);
***************
*** 510,516 ****
  {
  	struct ctrl_queue *q;
  	int retval = 0;
! 	unsigned long flags;
  
  	spin_lock_irqsave(&catc->ctrl_lock, flags);
  	
--- 436,442 ----
  {
  	struct ctrl_queue *q;
  	int retval = 0;
! 	long flags;
  
  	spin_lock_irqsave(&catc->ctrl_lock, flags);
  	
***************
*** 596,615 ****
   * Receive modes. Broadcast, Multicast, Promisc.
   */
  
! static inline u32 ether_crc_le(int cnt, unsigned char *addr)
  {
  	unsigned int crc = 0xffffffff;
  	u8 byte, idx, bit;
! 	
!         for (idx = 0; idx < cnt; idx++)
                  for (byte = *addr++, bit = 0; bit < 8; bit++, byte >>= 1)
                          crc = (crc >> 1) ^ (((crc ^ byte) & 1) ? 0xedb88320U : 0);
- 	return crc;
- }
  
- static void catc_multicast(unsigned char *addr, u8 *multicast)
- {
- 	unsigned int crc = ether_crc_le(6, addr);
  	multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7);
  }
  
--- 522,536 ----
   * Receive modes. Broadcast, Multicast, Promisc.
   */
  
! static void catc_multicast(unsigned char *addr, u8 *multicast)
  {
  	unsigned int crc = 0xffffffff;
  	u8 byte, idx, bit;
! 
!         for (idx = 0; idx < 6; idx++)
                  for (byte = *addr++, bit = 0; bit < 8; bit++, byte >>= 1)
                          crc = (crc >> 1) ^ (((crc ^ byte) & 1) ? 0xedb88320U : 0);
  
  	multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7);
  }
  
***************
*** 629,735 ****
  
  	if (netdev->flags & IFF_PROMISC) {
  		memset(catc->multicast, 0xff, 64);
! 		rx |= (!catc->is_f5u011) ? RxPromisc : AltRxPromisc;
  	} 
  
! 	if (netdev->flags & IFF_ALLMULTI) {
  		memset(catc->multicast, 0xff, 64);
- 	} else {
- 		for (i = 0, mc = netdev->mc_list; mc && i < netdev->mc_count; i++, mc = mc->next) {
- 			u32 crc = ether_crc_le(6, mc->dmi_addr);
- 			if (!catc->is_f5u011) {
- 				catc->multicast[(crc >> 3) & 0x3f] |= 1 << (crc & 7);
- 			} else {
- 				catc->multicast[7-(crc >> 29)] |= 1 << ((crc >> 26) & 7);
- 			}
- 		}
- 	}
- 	if (!catc->is_f5u011) {
- 		catc_set_reg_async(catc, RxUnit, rx);
- 		catc_write_mem_async(catc, 0xfa80, catc->multicast, 64);
- 	} else {
- 		f5u011_mchash_async(catc, catc->multicast);
- 		if (catc->rxmode[0] != rx) {
- 			catc->rxmode[0] = rx;
- 			dbg("Setting RX mode to %2.2X %2.2X", catc->rxmode[0],
- 			    catc->rxmode[1]);
- 			f5u011_rxmode_async(catc, catc->rxmode);
- 		}
- 	}
- }
  
! /*
!  * ioctl's
!  */
! static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
! {
!         struct catc *catc = dev->priv;
!         u32 cmd;
! 	char tmp[40];
!         
!         if (get_user(cmd, (u32 *)useraddr))
!                 return -EFAULT;
! 
!         switch (cmd) {
!         /* get driver info */
!         case ETHTOOL_GDRVINFO: {
!                 struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
!                 strncpy(info.driver, SHORT_DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
!                 strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
! 		sprintf(tmp, "usb%d:%d", catc->usbdev->bus->busnum, catc->usbdev->devnum);
!                 strncpy(info.bus_info, tmp,ETHTOOL_BUSINFO_LEN);
!                 if (copy_to_user(useraddr, &info, sizeof(info)))
!                         return -EFAULT;
!                 return 0;
!         }
! 
! 	/* get settings */
! 	case ETHTOOL_GSET:
! 		if (catc->is_f5u011) {
! 			struct ethtool_cmd ecmd = { 
! 				ETHTOOL_GSET, 
! 				SUPPORTED_10baseT_Half | SUPPORTED_TP, 
! 				ADVERTISED_10baseT_Half | ADVERTISED_TP, 
! 				SPEED_10, 
! 				DUPLEX_HALF, 
! 				PORT_TP, 
! 				0, 
! 				XCVR_INTERNAL, 
! 				AUTONEG_DISABLE, 
! 				1, 
! 				1 
! 			};
! 			if (copy_to_user(useraddr, &ecmd, sizeof(ecmd)))
! 				return -EFAULT;
! 			return 0;
! 		} else {
! 			return -EOPNOTSUPP;
! 		}
  
!         /* get link status */
!         case ETHTOOL_GLINK: {
!                 struct ethtool_value edata = {ETHTOOL_GLINK};
!                 edata.data = netif_carrier_ok(dev);
!                 if (copy_to_user(useraddr, &edata, sizeof(edata)))
!                         return -EFAULT;
!                 return 0;
!         }
! 	}
!         /* Note that the ethtool user space code requires EOPNOTSUPP */
!         return -EOPNOTSUPP;
! }
! 
! static int catc_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
! {
!         switch(cmd) {
!         case SIOCETHTOOL:
! 	       return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
!         default:
! 	       return -ENOTTY; /* Apparently this is the standard ioctl errno */
!         }
  }
  
- 
  /*
   * Open, close.
   */
--- 550,568 ----
  
  	if (netdev->flags & IFF_PROMISC) {
  		memset(catc->multicast, 0xff, 64);
! 		rx |= RxPromisc;
  	} 
  
! 	if (netdev->flags & IFF_ALLMULTI)
  		memset(catc->multicast, 0xff, 64);
  
! 	for (i = 0, mc = netdev->mc_list; mc && i < netdev->mc_count; i++, mc = mc->next)
! 		catc_multicast(mc->dmi_addr, catc->multicast);
  
! 	catc_set_reg_async(catc, RxUnit, rx);
! 	catc_write_mem_async(catc, 0xfa80, catc->multicast, 64);
  }
  
  /*
   * Open, close.
   */
***************
*** 747,754 ****
  
  	netif_start_queue(netdev);
  
! 	if (!catc->is_f5u011)
! 		mod_timer(&catc->timer, jiffies + STATS_UPDATE);
  
  	return 0;
  }
--- 580,586 ----
  
  	netif_start_queue(netdev);
  
! 	mod_timer(&catc->timer, jiffies + STATS_UPDATE);
  
  	return 0;
  }
***************
*** 759,766 ****
  
  	netif_stop_queue(netdev);
  
! 	if (!catc->is_f5u011)
! 		del_timer_sync(&catc->timer);
  
  	usb_unlink_urb(&catc->rx_urb);
  	usb_unlink_urb(&catc->tx_urb);
--- 591,597 ----
  
  	netif_stop_queue(netdev);
  
! 	del_timer_sync(&catc->timer);
  
  	usb_unlink_urb(&catc->rx_urb);
  	usb_unlink_urb(&catc->tx_urb);
***************
*** 779,785 ****
  	struct net_device *netdev;
  	struct catc *catc;
  	u8 broadcast[6];
! 	int i, pktsz;
  
  	if (usb_set_interface(usbdev, ifnum, 1)) {
                  err("Can't set altsetting 1.");
--- 610,616 ----
  	struct net_device *netdev;
  	struct catc *catc;
  	u8 broadcast[6];
! 	int i;
  
  	if (usb_set_interface(usbdev, ifnum, 1)) {
                  err("Can't set altsetting 1.");
***************
*** 787,802 ****
  	}
  
  	catc = kmalloc(sizeof(struct catc), GFP_KERNEL);
- 	if (!catc)
- 		return NULL;
- 
  	memset(catc, 0, sizeof(struct catc));
  
  	netdev = init_etherdev(0, 0);
- 	if (!netdev) {
- 		kfree(catc);
- 		return NULL;
- 	}
  
  	netdev->open = catc_open;
  	netdev->hard_start_xmit = catc_hard_start_xmit;
--- 618,626 ----
***************
*** 805,811 ****
  	netdev->tx_timeout = catc_tx_timeout;
  	netdev->watchdog_timeo = TX_TIMEOUT;
  	netdev->set_multicast_list = catc_set_multicast_list;
- 	netdev->do_ioctl = catc_ioctl;
  	netdev->priv = catc;
  
  	catc->usbdev = usbdev;
--- 629,634 ----
***************
*** 818,837 ****
  	catc->timer.data = (long) catc;
  	catc->timer.function = catc_stats_timer;
  
- 	/* The F5U011 has the same vendor/product as the netmate 
- 	 *  but a device version of 0x130
- 	 */
- 	if (usbdev->descriptor.idVendor == 0x0423 && 
- 	    usbdev->descriptor.idProduct == 0xa &&
- 	    catc->usbdev->descriptor.bcdDevice == 0x0130) {
- 		dbg("Testing for f5u011");
- 		catc->is_f5u011 = 1;
- 		atomic_set(&catc->recq_sz, 0);
- 		pktsz = RX_PKT_SZ;
- 	} else {
- 		pktsz = RX_MAX_BURST * (PKT_SZ + 2);
- 	}
- 
  	FILL_CONTROL_URB(&catc->ctrl_urb, usbdev, usb_sndctrlpipe(usbdev, 0),
  		NULL, NULL, 0, catc_ctrl_done, catc);
  
--- 641,646 ----
***************
*** 839,859 ****
  		NULL, 0, catc_tx_done, catc);
  
  	FILL_BULK_URB(&catc->rx_urb, usbdev, usb_rcvbulkpipe(usbdev, 1),
! 		catc->rx_buf, pktsz, catc_rx_done, catc);
  
  	FILL_INT_URB(&catc->irq_urb, usbdev, usb_rcvintpipe(usbdev, 2),
                  catc->irq_buf, 2, catc_irq_done, catc, 1);
  
! 	if (!catc->is_f5u011) {
! 		dbg("Checking memory size\n");
  
! 		i = 0x12345678;
! 		catc_write_mem(catc, 0x7a80, &i, 4);
! 		i = 0x87654321;	
! 		catc_write_mem(catc, 0xfa80, &i, 4);
! 		catc_read_mem(catc, 0x7a80, &i, 4);
! 	  
! 		switch (i) {
  		case 0x12345678:
  			catc_set_reg(catc, TxBufCount, 8);
  			catc_set_reg(catc, RxBufCount, 32);
--- 648,667 ----
  		NULL, 0, catc_tx_done, catc);
  
  	FILL_BULK_URB(&catc->rx_urb, usbdev, usb_rcvbulkpipe(usbdev, 1),
! 		catc->rx_buf, RX_MAX_BURST * (PKT_SZ + 2), catc_rx_done, catc);
  
  	FILL_INT_URB(&catc->irq_urb, usbdev, usb_rcvintpipe(usbdev, 2),
                  catc->irq_buf, 2, catc_irq_done, catc, 1);
  
! 	dbg("Checking memory size\n");
! 
! 	i = 0x12345678;
! 	catc_write_mem(catc, 0x7a80, &i, 4);
! 	i = 0x87654321;	
! 	catc_write_mem(catc, 0xfa80, &i, 4);
! 	catc_read_mem(catc, 0x7a80, &i, 4);
  
! 	switch (i) {
  		case 0x12345678:
  			catc_set_reg(catc, TxBufCount, 8);
  			catc_set_reg(catc, RxBufCount, 32);
***************
*** 866,917 ****
  			catc_set_reg(catc, RxBufCount, 16);
  			dbg("32k Memory\n");
  			break;
- 		}
- 	  
- 		dbg("Getting MAC from SEEROM.");
- 	  
- 		catc_get_mac(catc, netdev->dev_addr);
- 		
- 		dbg("Setting MAC into registers.");
- 	  
- 		for (i = 0; i < 6; i++)
- 			catc_set_reg(catc, StationAddr0 - i, netdev->dev_addr[i]);
- 		
- 		dbg("Filling the multicast list.");
- 	  
- 		memset(broadcast, 0xff, 6);
- 		catc_multicast(broadcast, catc->multicast);
- 		catc_multicast(netdev->dev_addr, catc->multicast);
- 		catc_write_mem(catc, 0xfa80, catc->multicast, 64);
- 		
- 		dbg("Clearing error counters.");
- 		
- 		for (i = 0; i < 8; i++)
- 			catc_set_reg(catc, EthStats + i, 0);
- 		catc->last_stats = jiffies;
- 		
- 		dbg("Enabling.");
- 		
- 		catc_set_reg(catc, MaxBurst, RX_MAX_BURST);
- 		catc_set_reg(catc, OpModes, OpTxMerge | OpRxMerge | OpLenInclude | Op3MemWaits);
- 		catc_set_reg(catc, LEDCtrl, LEDLink);
- 		catc_set_reg(catc, RxUnit, RxEnable | RxPolarity | RxMultiCast);
- 	} else {
- 		dbg("Performing reset\n");
- 		catc_reset(catc);
- 		catc_get_mac(catc, netdev->dev_addr);
- 		
- 		dbg("Setting RX Mode");
- 		catc->rxmode[0] = RxEnable | RxPolarity | RxMultiCast;
- 		catc->rxmode[1] = 0;
- 		f5u011_rxmode(catc, catc->rxmode);
  	}
  	dbg("Init done.");
! 	printk(KERN_INFO "%s: %s USB Ethernet at usb%d:%d.%d, ",
! 	       netdev->name, (catc->is_f5u011) ? "Belkin F5U011" : "CATC EL1210A NetMate",
! 	       usbdev->bus->busnum, usbdev->devnum, ifnum);
  	for (i = 0; i < 5; i++) printk("%2.2x:", netdev->dev_addr[i]);
  	printk("%2.2x.\n", netdev->dev_addr[i]);
  	return catc;
  }
  
--- 674,717 ----
  			catc_set_reg(catc, RxBufCount, 16);
  			dbg("32k Memory\n");
  			break;
  	}
+ 
+ 	dbg("Getting MAC from SEEROM.");
+ 
+ 	catc_get_mac(catc, netdev->dev_addr);
+ 
+ 	dbg("Setting MAC into registers.");
+ 
+ 	for (i = 0; i < 6; i++)
+ 		catc_set_reg(catc, StationAddr0 - i, netdev->dev_addr[i]);
+ 
+ 	dbg("Filling the multicast list.");
+ 
+ 	memset(broadcast, 0xff, 8);
+ 	catc_multicast(broadcast, catc->multicast);
+ 	catc_multicast(netdev->dev_addr, catc->multicast);
+ 	catc_write_mem(catc, 0xfa80, catc->multicast, 64);
+ 
+ 	dbg("Clearing error counters.");
+ 
+ 	for (i = 0; i < 8; i++)
+ 		catc_set_reg(catc, EthStats + i, 0);
+ 	catc->last_stats = jiffies;
+ 
+ 	dbg("Enabling.");
+ 
+ 	catc_set_reg(catc, MaxBurst, RX_MAX_BURST);
+ 	catc_set_reg(catc, OpModes, OpTxMerge | OpRxMerge | OpLenInclude | Op3MemWaits);
+ 	catc_set_reg(catc, LEDCtrl, LEDLink);
+ 	catc_set_reg(catc, RxUnit, RxEnable | RxPolarity | RxMultiCast);
+ 
  	dbg("Init done.");
! 
! 	printk(KERN_INFO "%s: CATC EL1210A NetMate USB Ethernet at usb%d:%d.%d, ",
! 		netdev->name, usbdev->bus->busnum, usbdev->devnum, ifnum);
  	for (i = 0; i < 5; i++) printk("%2.2x:", netdev->dev_addr[i]);
  	printk("%2.2x.\n", netdev->dev_addr[i]);
+ 
  	return catc;
  }
  
***************
*** 928,934 ****
   */
  
  static struct usb_device_id catc_id_table [] = {
! 	{ USB_DEVICE(0x0423, 0xa) },	/* CATC Netmate, Belkin F5U011 */
  	{ USB_DEVICE(0x0423, 0xc) },	/* CATC Netmate II, Belkin F5U111 */
  	{ USB_DEVICE(0x08d1, 0x1) },	/* smartBridges smartNIC */
  	{ }
--- 728,734 ----
   */
  
  static struct usb_device_id catc_id_table [] = {
! 	{ USB_DEVICE(0x0423, 0xa) },	/* CATC Netmate */
  	{ USB_DEVICE(0x0423, 0xc) },	/* CATC Netmate II, Belkin F5U111 */
  	{ USB_DEVICE(0x08d1, 0x1) },	/* smartBridges smartNIC */
  	{ }
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/dabusb.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/dabusb.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/dabusb.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/dabusb.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 83,89 ****
  }
  /*-------------------------------------------------------------------*/
  #ifdef DEBUG 
! static void dump_urb (struct urb *purb)
  {
  	dbg("urb                   :%p", purb);
  	dbg("next                  :%p", purb->next);
--- 83,89 ----
  }
  /*-------------------------------------------------------------------*/
  #ifdef DEBUG 
! static void dump_urb (purb_t purb)
  {
  	dbg("urb                   :%p", purb);
  	dbg("next                  :%p", purb->next);
***************
*** 167,173 ****
  	return 0;
  }
  /*-------------------------------------------------------------------*/
! static void dabusb_iso_complete (struct urb *purb)
  {
  	pbuff_t b = purb->context;
  	pdabusb_t s = b->s;
--- 167,173 ----
  	return 0;
  }
  /*-------------------------------------------------------------------*/
! static void dabusb_iso_complete (purb_t purb)
  {
  	pbuff_t b = purb->context;
  	pdabusb_t s = b->s;
***************
*** 482,488 ****
  	int rem;
  	int cnt;
  	pbuff_t b;
! 	struct urb *purb = NULL;
  
  	dbg("dabusb_read");
  
--- 482,488 ----
  	int rem;
  	int cnt;
  	pbuff_t b;
! 	purb_t purb = NULL;
  
  	dbg("dabusb_read");
  
***************
*** 605,611 ****
  	}
  	if (usb_set_interface (s->usbdev, _DABUSB_IF, 1) < 0) {
  		err("set_interface failed");
- 		up(&s->mutex);
  		return -EINVAL;
  	}
  	s->opened = 1;
--- 605,610 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/dabusb.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/dabusb.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/dabusb.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/dabusb.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 38,44 ****
  typedef struct 
  {
  	pdabusb_t s;
! 	struct urb *purb;
  	struct list_head buff_list;
  } buff_t,*pbuff_t;
  
--- 38,44 ----
  typedef struct 
  {
  	pdabusb_t s;
! 	purb_t purb;
  	struct list_head buff_list;
  } buff_t,*pbuff_t;
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/devices.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/devices.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/devices.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/devices.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 61,68 ****
  #include 
  #include 
  
- #include "hcd.h"
- 
  #define MAX_TOPO_LEVEL		6
  
  /* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */
--- 61,66 ----
***************
*** 107,114 ****
    "I:  If#=%2d Alt=%2d #EPs=%2d Cls=%02x(%-5s) Sub=%02x Prot=%02x Driver=%s\n";
  
  static char *format_endpt =
! /* E:  Ad=xx(s) Atr=xx(ssss) MxPS=dddd Ivl=D?s */
!   "E:  Ad=%02x(%c) Atr=%02x(%-4s) MxPS=%4d Ivl=%d%cs\n";
  
  
  /*
--- 105,112 ----
    "I:  If#=%2d Alt=%2d #EPs=%2d Cls=%02x(%-5s) Sub=%02x Prot=%02x Driver=%s\n";
  
  static char *format_endpt =
! /* E:  Ad=xx(s) Atr=xx(ssss) MxPS=dddd Ivl=dddms */
!   "E:  Ad=%02x(%c) Atr=%02x(%-4s) MxPS=%4d Ivl=%3dms\n";
  
  
  /*
***************
*** 168,240 ****
  	return (clas_info[ix].class_name);
  }
  
! static char *usb_dump_endpoint_descriptor (
! 	int speed,
! 	char *start,
! 	char *end,
! 	const struct usb_endpoint_descriptor *desc
! )
! {
! 	char dir, unit, *type;
! 	unsigned interval, in, bandwidth = 1;
  
  	if (start > end)
  		return start;
! 	in = (desc->bEndpointAddress & USB_DIR_IN);
! 	dir = in ? 'I' : 'O';
! 	if (speed == USB_SPEED_HIGH) {
! 		switch (desc->wMaxPacketSize & (0x03 << 11)) {
! 		case 1 << 11:	bandwidth = 2; break;
! 		case 2 << 11:	bandwidth = 3; break;
! 		}
! 	}
! 
! 	/* this isn't checking for illegal values */
! 	switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
! 	case USB_ENDPOINT_XFER_CONTROL:
! 		type = "Ctrl";
! 		if (speed == USB_SPEED_HIGH) 	/* uframes per NAK */
! 			interval = desc->bInterval;
! 		else
! 			interval = 0;
! 		dir = 'B';			/* ctrl is bidirectional */
! 		break;
! 	case USB_ENDPOINT_XFER_ISOC:
! 		type = "Isoc";
! 		interval = 1 << (desc->bInterval - 1);
! 		break;
! 	case USB_ENDPOINT_XFER_BULK:
! 		type = "Bulk";
! 		if (speed == USB_SPEED_HIGH && !in)	/* uframes per NAK */
! 			interval = desc->bInterval;
! 		else
! 			interval = 0;
! 		break;
! 	case USB_ENDPOINT_XFER_INT:
! 		type = "Int.";
! 		if (speed == USB_SPEED_HIGH) {
! 			interval = 1 << (desc->bInterval - 1);
! 		} else
! 			interval = desc->bInterval;
! 		break;
! 	default:	/* "can't happen" */
! 		return start;
! 	}
! 	interval *= (speed == USB_SPEED_HIGH) ? 125 : 1000;
! 	if (interval % 1000)
! 		unit = 'u';
! 	else {
! 		unit = 'm';
! 		interval /= 1000;
! 	}
! 
! 	start += sprintf(start, format_endpt, desc->bEndpointAddress, dir,
! 			 desc->bmAttributes, type,
! 			 (desc->wMaxPacketSize & 0x07ff) * bandwidth,
! 			 interval, unit);
  	return start;
  }
  
  static char *usb_dump_interface_descriptor(char *start, char *end, const struct usb_interface *iface, int setno)
  {
  	struct usb_interface_descriptor *desc = &iface->altsetting[setno];
--- 166,191 ----
  	return (clas_info[ix].class_name);
  }
  
! static char *usb_dump_endpoint_descriptor(char *start, char *end, const struct usb_endpoint_descriptor *desc)
! {
! 	char *EndpointType [4] = {"Ctrl", "Isoc", "Bulk", "Int."};
  
  	if (start > end)
  		return start;
! 	start += sprintf(start, format_endpt, desc->bEndpointAddress,
! 			 (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_CONTROL
! 			 	? 'B' :			/* bidirectional */
! 			 (desc->bEndpointAddress & USB_DIR_IN) ? 'I' : 'O',
! 			 desc->bmAttributes, EndpointType[desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK],
! 			 desc->wMaxPacketSize, desc->bInterval);
  	return start;
  }
  
+ static char *usb_dump_endpoint(char *start, char *end, const struct usb_endpoint_descriptor *endpoint)
+ {
+ 	return usb_dump_endpoint_descriptor(start, end, endpoint);
+ }
+ 
  static char *usb_dump_interface_descriptor(char *start, char *end, const struct usb_interface *iface, int setno)
  {
  	struct usb_interface_descriptor *desc = &iface->altsetting[setno];
***************
*** 253,265 ****
  	return start;
  }
  
! static char *usb_dump_interface(
! 	int speed,
! 	char *start,
! 	char *end,
! 	const struct usb_interface *iface,
! 	int setno
! ) {
  	struct usb_interface_descriptor *desc = &iface->altsetting[setno];
  	int i;
  
--- 204,211 ----
  	return start;
  }
  
! static char *usb_dump_interface(char *start, char *end, const struct usb_interface *iface, int setno)
! {
  	struct usb_interface_descriptor *desc = &iface->altsetting[setno];
  	int i;
  
***************
*** 267,274 ****
  	for (i = 0; i < desc->bNumEndpoints; i++) {
  		if (start > end)
  			return start;
! 		start = usb_dump_endpoint_descriptor(speed,
! 				start, end, desc->endpoint + i);
  	}
  	return start;
  }
--- 213,219 ----
  	for (i = 0; i < desc->bNumEndpoints; i++) {
  		if (start > end)
  			return start;
! 		start = usb_dump_endpoint(start, end, desc->endpoint + i);
  	}
  	return start;
  }
***************
*** 293,305 ****
  	return start;
  }
  
! static char *usb_dump_config (
! 	int speed,
! 	char *start,
! 	char *end,
! 	const struct usb_config_descriptor *config,
! 	int active
! )
  {
  	int i, j;
  	struct usb_interface *interface;
--- 238,244 ----
  	return start;
  }
  
! static char *usb_dump_config(char *start, char *end, const struct usb_config_descriptor *config, int active)
  {
  	int i, j;
  	struct usb_interface *interface;
***************
*** 316,323 ****
  		for (j = 0; j < interface->num_altsetting; j++) {
  			if (start > end)
  				return start;
! 			start = usb_dump_interface(speed,
! 					start, end, interface, j);
  		}
  	}
  	return start;
--- 255,261 ----
  		for (j = 0; j < interface->num_altsetting; j++) {
  			if (start > end)
  				return start;
! 			start = usb_dump_interface(start, end, interface, j);
  		}
  	}
  	return start;
***************
*** 398,407 ****
  	for (i = 0; i < dev->descriptor.bNumConfigurations; i++) {
  		if (start > end)
  			return start;
! 		start = usb_dump_config(dev->speed,
! 				start, end, dev->config + i,
! 				/* active ? */
! 				(dev->config + i) == dev->actconfig);
  	}
  	return start;
  }
--- 336,343 ----
  	for (i = 0; i < dev->descriptor.bNumConfigurations; i++) {
  		if (start > end)
  			return start;
! 		start = usb_dump_config(start, end, dev->config + i,
! 					(dev->config + i) == dev->actconfig); /* active ? */
  	}
  	return start;
  }
***************
*** 493,518 ****
  	 * count = device count at this level
  	 */
  	/* If this is the root hub, display the bandwidth information */
!  	if (level == 0) {
!  		int	max;
!  
!  		/* high speed reserves 80%, full/low reserves 90% */
!  		if (usbdev->speed == USB_SPEED_HIGH)
!  			max = 800;
!  		else
!  			max = FRAME_TIME_MAX_USECS_ALLOC;
!  
!  		/* report "average" periodic allocation over a microsecond.
!  		 * the schedules are actually bursty, HCDs need to deal with
!  		 * that and just compute/report this average.
!  		 */
!  		data_end += sprintf(data_end, format_bandwidth,
!  				bus->bandwidth_allocated, max,
!  				(100 * bus->bandwidth_allocated + max / 2)
!  					/ max,
!  			         bus->bandwidth_int_reqs,
!  				 bus->bandwidth_isoc_reqs);
!  	}
  	data_end = usb_dump_desc(data_end, pages_start + (2 * PAGE_SIZE) - 256, usbdev);
  	
  	if (data_end > (pages_start + (2 * PAGE_SIZE) - 256))
--- 429,440 ----
  	 * count = device count at this level
  	 */
  	/* If this is the root hub, display the bandwidth information */
! 	if (level == 0)
! 		data_end += sprintf(data_end, format_bandwidth, bus->bandwidth_allocated,
! 				FRAME_TIME_MAX_USECS_ALLOC,
! 				(100 * bus->bandwidth_allocated + FRAME_TIME_MAX_USECS_ALLOC / 2) / FRAME_TIME_MAX_USECS_ALLOC,
! 			         bus->bandwidth_int_reqs, bus->bandwidth_isoc_reqs);
! 	
  	data_end = usb_dump_desc(data_end, pages_start + (2 * PAGE_SIZE) - 256, usbdev);
  	
  	if (data_end > (pages_start + (2 * PAGE_SIZE) - 256))
***************
*** 575,584 ****
  		bus = list_entry(buslist, struct usb_bus, bus_list);
  		/* recurse through all children of the root hub */
  		ret = usb_device_dump(&buf, &nbytes, &skip_bytes, ppos, bus->root_hub, bus, 0, 0, 0);
! 		if (ret < 0) {
! 			up(&usb_bus_list_lock);
  			return ret;
- 		}
  		total_written += ret;
  	}
  	up (&usb_bus_list_lock);
--- 497,504 ----
  		bus = list_entry(buslist, struct usb_bus, bus_list);
  		/* recurse through all children of the root hub */
  		ret = usb_device_dump(&buf, &nbytes, &skip_bytes, ppos, bus->root_hub, bus, 0, 0, 0);
! 		if (ret < 0)
  			return ret;
  		total_written += ret;
  	}
  	up (&usb_bus_list_lock);
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/devio.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/devio.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/devio.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/devio.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 52,58 ****
  	unsigned int signr;
  	void *userbuffer;
          void *userurb;
!         struct urb urb;
  };
  
  static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
--- 52,58 ----
  	unsigned int signr;
  	void *userbuffer;
          void *userurb;
!         urb_t urb;
  };
  
  static loff_t usbdev_lseek(struct file *file, loff_t offset, int orig)
***************
*** 138,144 ****
  	return ret;
  }
  
! static inline unsigned int ld2(unsigned int x)
  {
          unsigned int r = 0;
          
--- 138,144 ----
  	return ret;
  }
  
! extern inline unsigned int ld2(unsigned int x)
  {
          unsigned int r = 0;
          
***************
*** 169,175 ****
  
  static struct async *alloc_async(unsigned int numisoframes)
  {
!         unsigned int assize = sizeof(struct async) + numisoframes * sizeof(struct iso_packet_descriptor);
          struct async *as = kmalloc(assize, GFP_KERNEL);
          if (!as)
                  return NULL;
--- 169,175 ----
  
  static struct async *alloc_async(unsigned int numisoframes)
  {
!         unsigned int assize = sizeof(struct async) + numisoframes * sizeof(iso_packet_descriptor_t);
          struct async *as = kmalloc(assize, GFP_KERNEL);
          if (!as)
                  return NULL;
***************
*** 188,194 ****
          kfree(as);
  }
  
! static inline void async_newpending(struct async *as)
  {
          struct dev_state *ps = as->ps;
          unsigned long flags;
--- 188,194 ----
          kfree(as);
  }
  
! extern __inline__ void async_newpending(struct async *as)
  {
          struct dev_state *ps = as->ps;
          unsigned long flags;
***************
*** 198,204 ****
          spin_unlock_irqrestore(&ps->lock, flags);
  }
  
! static inline void async_removepending(struct async *as)
  {
          struct dev_state *ps = as->ps;
          unsigned long flags;
--- 198,204 ----
          spin_unlock_irqrestore(&ps->lock, flags);
  }
  
! extern __inline__ void async_removepending(struct async *as)
  {
          struct dev_state *ps = as->ps;
          unsigned long flags;
***************
*** 209,215 ****
          spin_unlock_irqrestore(&ps->lock, flags);
  }
  
! static inline struct async *async_getcompleted(struct dev_state *ps)
  {
          unsigned long flags;
          struct async *as = NULL;
--- 209,215 ----
          spin_unlock_irqrestore(&ps->lock, flags);
  }
  
! extern __inline__ struct async *async_getcompleted(struct dev_state *ps)
  {
          unsigned long flags;
          struct async *as = NULL;
***************
*** 224,230 ****
          return as;
  }
  
! static inline struct async *async_getpending(struct dev_state *ps, void *userurb)
  {
          unsigned long flags;
          struct async *as;
--- 224,230 ----
          return as;
  }
  
! extern __inline__ struct async *async_getpending(struct dev_state *ps, void *userurb)
  {
          unsigned long flags;
          struct async *as;
***************
*** 245,251 ****
          return NULL;
  }
  
! static void async_completed(struct urb *urb)
  {
          struct async *as = (struct async *)urb->context;
          struct dev_state *ps = as->ps;
--- 245,251 ----
          return NULL;
  }
  
! static void async_completed(purb_t urb)
  {
          struct async *as = (struct async *)urb->context;
          struct dev_state *ps = as->ps;
***************
*** 286,294 ****
  }
  
  /*
!  * interface claims are made only at the request of user level code,
!  * which can also release them (explicitly or by closing files).
!  * they're also undone when devices disconnect.
   */
  
  static void *driver_probe(struct usb_device *dev, unsigned int intf,
--- 286,292 ----
  }
  
  /*
!  * interface claiming
   */
  
  static void *driver_probe(struct usb_device *dev, unsigned int intf,
***************
*** 301,320 ****
  {
  	struct dev_state *ps = (struct dev_state *)context;
  
- 	if (!ps)
- 		return;
- 
- 	/* this waits till synchronous requests complete */
- 	down_write (&ps->devsem);
- 
- 	/* prevent new I/O requests */
- 	ps->dev = 0;
  	ps->ifclaimed = 0;
- 
- 	/* force async requests to complete */
- 	destroy_all_async (ps);
- 
- 	up_write (&ps->devsem);
  }
  
  struct usb_driver usbdevfs_driver = {
--- 299,305 ----
***************
*** 772,778 ****
  	struct usbdevfs_iso_packet_desc *isopkt = NULL;
  	struct usb_endpoint_descriptor *ep_desc;
  	struct async *as;
! 	struct usb_ctrlrequest *dr = NULL;
  	unsigned int u, totlen, isofrmlen;
  	int ret;
  
--- 757,763 ----
  	struct usbdevfs_iso_packet_desc *isopkt = NULL;
  	struct usb_endpoint_descriptor *ep_desc;
  	struct async *as;
! 	devrequest *dr = NULL;
  	unsigned int u, totlen, isofrmlen;
  	int ret;
  
***************
*** 802,824 ****
  		/* min 8 byte setup packet, max arbitrary */
  		if (uurb.buffer_length < 8 || uurb.buffer_length > PAGE_SIZE)
  			return -EINVAL;
! 		if (!(dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL)))
  			return -ENOMEM;
  		if (copy_from_user(dr, (unsigned char*)uurb.buffer, 8)) {
  			kfree(dr);
  			return -EFAULT;
  		}
! 		if (uurb.buffer_length < (le16_to_cpup(&dr->wLength) + 8)) {
  			kfree(dr);
  			return -EINVAL;
  		}
! 		if ((ret = check_ctrlrecip(ps, dr->bRequestType, le16_to_cpup(&dr->wIndex)))) {
  			kfree(dr);
  			return ret;
  		}
! 		uurb.endpoint = (uurb.endpoint & ~USB_ENDPOINT_DIR_MASK) | (dr->bRequestType & USB_ENDPOINT_DIR_MASK);
  		uurb.number_of_packets = 0;
! 		uurb.buffer_length = le16_to_cpup(&dr->wLength);
  		uurb.buffer += 8;
  		if (!access_ok((uurb.endpoint & USB_DIR_IN) ?  VERIFY_WRITE : VERIFY_READ, uurb.buffer, uurb.buffer_length)) {
  			kfree(dr);
--- 787,809 ----
  		/* min 8 byte setup packet, max arbitrary */
  		if (uurb.buffer_length < 8 || uurb.buffer_length > PAGE_SIZE)
  			return -EINVAL;
! 		if (!(dr = kmalloc(sizeof(devrequest), GFP_KERNEL)))
  			return -ENOMEM;
  		if (copy_from_user(dr, (unsigned char*)uurb.buffer, 8)) {
  			kfree(dr);
  			return -EFAULT;
  		}
! 		if (uurb.buffer_length < (le16_to_cpup(&dr->length) + 8)) {
  			kfree(dr);
  			return -EINVAL;
  		}
! 		if ((ret = check_ctrlrecip(ps, dr->requesttype, le16_to_cpup(&dr->index)))) {
  			kfree(dr);
  			return ret;
  		}
! 		uurb.endpoint = (uurb.endpoint & ~USB_ENDPOINT_DIR_MASK) | (dr->requesttype & USB_ENDPOINT_DIR_MASK);
  		uurb.number_of_packets = 0;
! 		uurb.buffer_length = le16_to_cpup(&dr->length);
  		uurb.buffer += 8;
  		if (!access_ok((uurb.endpoint & USB_DIR_IN) ?  VERIFY_WRITE : VERIFY_READ, uurb.buffer, uurb.buffer_length)) {
  			kfree(dr);
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: emi26.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: emi26_fw.h
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: hc_simple.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: hc_simple.h
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: hc_sl811.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: hc_sl811.h
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: hc_sl811_rh.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: hcd
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: hcd.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: hcd.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hid-core.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hid-core.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hid-core.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hid-core.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 47,59 ****
  #include 
  
  #include "hid.h"
  #include 
  
  /*
   * Version Information
   */
  
! #define DRIVER_VERSION "v1.8.1"
  #define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik "
  #define DRIVER_DESC "USB HID support drivers"
  
--- 47,61 ----
  #include 
  
  #include "hid.h"
+ #ifdef CONFIG_USB_HIDDEV
  #include 
+ #endif
  
  /*
   * Version Information
   */
  
! #define DRIVER_VERSION "v1.8"
  #define DRIVER_AUTHOR "Andreas Gal, Vojtech Pavlik "
  #define DRIVER_DESC "USB HID support drivers"
  
***************
*** 202,214 ****
  		return -1;
  	}
  
! 	if (parser->global.logical_maximum <= parser->global.logical_minimum) {
! 		dbg("logical range invalid %d %d", parser->global.logical_minimum, parser->global.logical_maximum);
! 		return -1;
  	}
  
- 	usages = parser->local.usage_index;
- 
  	offset = report->size;
  	report->size += parser->global.report_size * parser->global.report_count;
  
--- 204,220 ----
  		return -1;
  	}
  
! 	if (HID_MAIN_ITEM_VARIABLE & ~flags) { /* ARRAY */
! 		if (parser->global.logical_maximum <= parser->global.logical_minimum) {
! 			dbg("logical range invalid %d %d", parser->global.logical_minimum, parser->global.logical_maximum);
! 			return -1;
! 		}
! 		usages = parser->local.usage_index;
! 		/* Hint: we can assume usages < MAX_USAGE here */
! 	} else { /* VARIABLE */
! 		usages = parser->global.report_count;
  	}
  
  	offset = report->size;
  	report->size += parser->global.report_size * parser->global.report_count;
  
***************
*** 304,313 ****
  			return 0;
  
  		case HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM:
! 			if (parser->global.logical_minimum < 0)
! 				parser->global.logical_maximum = item_sdata(item);
! 			else
! 				parser->global.logical_maximum = item_udata(item);
  			return 0;
  
  		case HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM:
--- 310,316 ----
  			return 0;
  
  		case HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM:
! 			parser->global.logical_maximum = item_sdata(item);
  			return 0;
  
  		case HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM:
***************
*** 315,324 ****
  			return 0;
  
  		case HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM:
! 			if (parser->global.physical_minimum < 0)
! 				parser->global.physical_maximum = item_sdata(item);
! 			else
! 				parser->global.physical_maximum = item_udata(item);
  			return 0;
  
  		case HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT:
--- 318,324 ----
  			return 0;
  
  		case HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM:
! 			parser->global.physical_maximum = item_sdata(item);
  			return 0;
  
  		case HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT:
***************
*** 735,742 ****
--- 735,744 ----
  	hid_dump_input(usage, value);
  	if (hid->claimed & HID_CLAIMED_INPUT)
  		hidinput_hid_event(hid, field, usage, value);
+ #ifdef CONFIG_USB_HIDDEV
  	if (hid->claimed & HID_CLAIMED_HIDDEV)
  		hiddev_hid_event(hid, usage->hid, value);
+ #endif
  }
  
  
***************
*** 895,903 ****
  	u8 data[len];
  	int read;
  
- 	if (hid->quirks & HID_QUIRK_NOGET)
- 		return;
- 
  	if ((read = usb_get_report(hid->dev, hid->ifnum, report->type + 1, report->id, data, len)) != len) {
  		dbg("reading report type %d id %d failed len %d read %d", report->type + 1, report->id, len, read);
  		return;
--- 897,902 ----
***************
*** 988,994 ****
  
  static int hid_submit_out(struct hid_device *hid)
  {
! 	hid->urbout.transfer_buffer_length = le16_to_cpup(&hid->out[hid->outtail].dr.wLength);
  	hid->urbout.transfer_buffer = hid->out[hid->outtail].buffer;
  	hid->urbout.setup_packet = (void *) &(hid->out[hid->outtail].dr);
  	hid->urbout.dev = hid->dev;
--- 987,993 ----
  
  static int hid_submit_out(struct hid_device *hid)
  {
! 	hid->urbout.transfer_buffer_length = le16_to_cpup(&hid->out[hid->outtail].dr.length);
  	hid->urbout.transfer_buffer = hid->out[hid->outtail].buffer;
  	hid->urbout.setup_packet = (void *) &(hid->out[hid->outtail].dr);
  	hid->urbout.dev = hid->dev;
***************
*** 1018,1025 ****
  {
  	hid_output_report(report, hid->out[hid->outhead].buffer);
  
! 	hid->out[hid->outhead].dr.wValue = cpu_to_le16(0x200 | report->id);
! 	hid->out[hid->outhead].dr.wLength = cpu_to_le16((report->size + 7) >> 3);
  
  	hid->outhead = (hid->outhead + 1) & (HID_CONTROL_FIFO_SIZE - 1);
  
--- 1017,1024 ----
  {
  	hid_output_report(report, hid->out[hid->outhead].buffer);
  
! 	hid->out[hid->outhead].dr.value = cpu_to_le16(0x200 | report->id);
! 	hid->out[hid->outhead].dr.length = cpu_to_le16((report->size + 7) >> 3);
  
  	hid->outhead = (hid->outhead + 1) & (HID_CONTROL_FIFO_SIZE - 1);
  
***************
*** 1065,1072 ****
  			list = report_enum->report_list.next;
  			while (list != &report_enum->report_list) {
  				report = (struct hid_report *) list;
- 				hid_read_report(hid, report);
  				usb_set_idle(hid->dev, hid->ifnum, 0, report->id);
  				list = list->next;
  			}
  		}
--- 1064,1071 ----
  			list = report_enum->report_list.next;
  			while (list != &report_enum->report_list) {
  				report = (struct hid_report *) list;
  				usb_set_idle(hid->dev, hid->ifnum, 0, report->id);
+ 				hid_read_report(hid, report);
  				list = list->next;
  			}
  		}
***************
*** 1074,1120 ****
  }
  
  #define USB_VENDOR_ID_WACOM		0x056a
- #define USB_DEVICE_ID_WACOM_PENPARTNER	0x0000
  #define USB_DEVICE_ID_WACOM_GRAPHIRE	0x0010
  #define USB_DEVICE_ID_WACOM_INTUOS	0x0020
- #define USB_DEVICE_ID_WACOM_PL		0x0030
- #define USB_DEVICE_ID_WACOM_INTUOS2	0x0041
- 
- #define USB_VENDOR_ID_ATEN		0x0557
- #define USB_DEVICE_ID_ATEN_UC100KM	0x2004
- #define USB_DEVICE_ID_ATEN_CS124U	0x2202
- #define USB_DEVICE_ID_ATEN_2PORTKVM	0x2204
- #define USB_DEVICE_ID_ATEN_4PORTKVM	0x2205
  
  struct hid_blacklist {
  	__u16 idVendor;
  	__u16 idProduct;
- 	unsigned quirks;
  } hid_blacklist[] = {
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PENPARTNER, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 1, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 2, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 1, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 2, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 3, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 4, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 1, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 2, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 3, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 4, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 5, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 1, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 2, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 3, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 4, HID_QUIRK_IGNORE },
! 	{ USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET },
! 	{ USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET },
! 	{ USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },
! 	{ USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET },
  	{ 0, 0 }
  };
  
--- 1073,1091 ----
  }
  
  #define USB_VENDOR_ID_WACOM		0x056a
  #define USB_DEVICE_ID_WACOM_GRAPHIRE	0x0010
  #define USB_DEVICE_ID_WACOM_INTUOS	0x0020
  
  struct hid_blacklist {
  	__u16 idVendor;
  	__u16 idProduct;
  } hid_blacklist[] = {
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS },
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 1},
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 2},
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 3},
! 	{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 4},
  	{ 0, 0 }
  };
  
***************
*** 1123,1139 ****
  	struct usb_interface_descriptor *interface = dev->actconfig->interface[ifnum].altsetting + 0;
  	struct hid_descriptor *hdesc;
  	struct hid_device *hid;
! 	unsigned quirks = 0, rsize = 0;
  	char *buf;
  	int n;
  
  	for (n = 0; hid_blacklist[n].idVendor; n++)
  		if ((hid_blacklist[n].idVendor == dev->descriptor.idVendor) &&
! 			(hid_blacklist[n].idProduct == dev->descriptor.idProduct))
! 				quirks = hid_blacklist[n].quirks;
! 
! 	if (quirks & HID_QUIRK_IGNORE)
! 		return NULL;
  
  	if (usb_get_extra_descriptor(interface, USB_DT_HID, &hdesc) && ((!interface->bNumEndpoints) ||
  		usb_get_extra_descriptor(&interface->endpoint[0], USB_DT_HID, &hdesc))) {
--- 1094,1106 ----
  	struct usb_interface_descriptor *interface = dev->actconfig->interface[ifnum].altsetting + 0;
  	struct hid_descriptor *hdesc;
  	struct hid_device *hid;
! 	unsigned rsize = 0;
  	char *buf;
  	int n;
  
  	for (n = 0; hid_blacklist[n].idVendor; n++)
  		if ((hid_blacklist[n].idVendor == dev->descriptor.idVendor) &&
! 			(hid_blacklist[n].idProduct == dev->descriptor.idProduct)) return NULL;
  
  	if (usb_get_extra_descriptor(interface, USB_DT_HID, &hdesc) && ((!interface->bNumEndpoints) ||
  		usb_get_extra_descriptor(&interface->endpoint[0], USB_DT_HID, &hdesc))) {
***************
*** 1171,1178 ****
  		}
  	}
  
- 	hid->quirks = quirks;
- 
  	for (n = 0; n < interface->bNumEndpoints; n++) {
  
  		struct usb_endpoint_descriptor *endpoint = &interface->endpoint[n];
--- 1138,1143 ----
***************
*** 1204,1212 ****
  	hid->ifnum = interface->bInterfaceNumber;
  
  	for (n = 0; n < HID_CONTROL_FIFO_SIZE; n++) {
! 		hid->out[n].dr.bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
! 		hid->out[n].dr.bRequest = USB_REQ_SET_REPORT;
! 		hid->out[n].dr.wIndex = cpu_to_le16(hid->ifnum);
  	}
  
  	hid->name[0] = 0;
--- 1169,1177 ----
  	hid->ifnum = interface->bInterfaceNumber;
  
  	for (n = 0; n < HID_CONTROL_FIFO_SIZE; n++) {
! 		hid->out[n].dr.requesttype = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
! 		hid->out[n].dr.request = USB_REQ_SET_REPORT;
! 		hid->out[n].dr.index = cpu_to_le16(hid->ifnum);
  	}
  
  	hid->name[0] = 0;
***************
*** 1256,1263 ****
--- 1221,1230 ----
  
  	if (!hidinput_connect(hid))
  		hid->claimed |= HID_CLAIMED_INPUT;
+ #ifdef CONFIG_USB_HIDDEV
  	if (!hiddev_connect(hid))
  		hid->claimed |= HID_CLAIMED_HIDDEV;
+ #endif
  	printk(KERN_INFO);
  
  	if (hid->claimed & HID_CLAIMED_INPUT)
***************
*** 1287,1296 ****
--- 1254,1266 ----
  
  	dbg("cleanup called");
  	usb_unlink_urb(&hid->urb);
+ 
  	if (hid->claimed & HID_CLAIMED_INPUT)
  		hidinput_disconnect(hid);
+ #ifdef CONFIG_USB_HIDDEV
  	if (hid->claimed & HID_CLAIMED_HIDDEV)
  		hiddev_disconnect(hid);
+ #endif
  	hid_free_device(hid);
  }
  
***************
*** 1311,1317 ****
--- 1281,1289 ----
  
  static int __init hid_init(void)
  {
+ #ifdef CONFIG_USB_HIDDEV
  	hiddev_init();
+ #endif
  	usb_register(&hid_driver);
  	info(DRIVER_VERSION " " DRIVER_AUTHOR);
  	info(DRIVER_DESC);
***************
*** 1321,1327 ****
--- 1293,1301 ----
  
  static void __exit hid_exit(void)
  {
+ #ifdef CONFIG_USB_HIDDEV
  	hiddev_exit();
+ #endif
  	usb_deregister(&hid_driver);
  }
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hid.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hid.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hid.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hid.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 184,191 ****
  
  #define HID_QUIRK_INVERT	0x01
  #define HID_QUIRK_NOTOUCH	0x02
- #define HID_QUIRK_IGNORE	0x04
- #define HID_QUIRK_NOGET		0x08
  
  /*
   * This is the global enviroment of the parser. This information is
--- 184,189 ----
***************
*** 287,293 ****
  #define HID_CONTROL_FIFO_SIZE	8
  
  struct hid_control_fifo {
! 	struct usb_ctrlrequest dr;
  	char buffer[HID_BUFFER_SIZE];
  };
  
--- 285,291 ----
  #define HID_CONTROL_FIFO_SIZE	8
  
  struct hid_control_fifo {
! 	devrequest dr;
  	char buffer[HID_BUFFER_SIZE];
  };
  
***************
*** 352,357 ****
--- 350,358 ----
  	struct hid_class_descriptor desc[1];
  } __attribute__ ((packed));
  
+ void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
+ int hidinput_connect(struct hid_device *);
+ void hidinput_disconnect(struct hid_device *);
  
  #ifdef DEBUG
  #include "hid-debug.h"
***************
*** 362,378 ****
  
  #endif
  
- #ifdef CONFIG_USB_HIDINPUT
  #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || ( a == 0x000c0001))
- extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
- extern int hidinput_connect(struct hid_device *);
- extern void hidinput_disconnect(struct hid_device *);
- #else
- #define IS_INPUT_APPLICATION(a) (0)
- static inline void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value) { }
- static inline int hidinput_connect(struct hid_device *hid) { return -ENODEV; }
- static inline void hidinput_disconnect(struct hid_device *hid) { }
- #endif
  
  int hid_open(struct hid_device *);
  void hid_close(struct hid_device *);
--- 363,369 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hpusbscsi.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hpusbscsi.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hpusbscsi.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hpusbscsi.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,51 ****
- /*
-  * hpusbscsi
-  * (C) Copyright 2001 Oliver Neukum 
-  * Sponsored by the Linux Usb Project
-  * Large parts based on or taken from code by John Fremlin and Matt Dharm
-  * 
-  * This driver is known to work with the following scanners (VID, PID)
-  *    (0x03f0, 0x0701)  HP 53xx 
-  *    (0x03f0, 0x0801)  HP 7400 
-  *    (0x0638, 0x026a)  Minolta Scan Dual II
-  *    (0x0686, 0x4004)  Minolta Elite II
-  * To load with full debugging load with "insmod hpusbscsi debug=2"
-  * 
-  * This program is free software; you can redistribute it and/or modify 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.
-  *
-  * Contributors:
-  *   Oliver Neukum
-  *   John Fremlin
-  *   Matt Dharm
-  *   .
-  *   .
-  *   Timothy Jedlicka 
-  *
-  * History
-  *
-  * 22-Apr-2002
-  *
-  * - Added Elite II scanner - bonzo
-  * - Cleaned up the debug statements and made them optional at load time - bonzo
-  *
-  * 20020618
-  *
-  * - Confirm to stupid 2.4 rules on io_request_lock
-  *
-  */
- 
  #include 
  #include 
  #include 
--- 1,3 ----
***************
*** 64,91 ****
  
  #include "hpusbscsi.h"
  
! static char *states[]={"FREE", "BEGINNING", "WORKING", "ERROR", "WAIT", "PREMATURE"};
! 
! /* DEBUG related parts */
! #define HPUSBSCSI_DEBUG
  
! #ifdef HPUSBSCSI_DEBUG
! #  define PDEBUG(level, fmt, args...) \
!           if (debug >= (level)) info("[" __PRETTY_FUNCTION__ ":%d] " fmt, __LINE__ , \
!                  ## args)
! #else
! #  define PDEBUG(level, fmt, args...) do {} while(0)
! #endif
! 
! 
! /* 0=no debug messages
!  * 1=everything but trace states
!  * 2=trace states
!  */
! static int debug; /* = 0 */
  
! MODULE_PARM(debug, "i");
! MODULE_PARM_DESC(debug, "Debug level: 0=none, 1=no trace states, 2=trace states");
  
  /* global variables */
  
--- 16,27 ----
  
  #include "hpusbscsi.h"
  
! #define DEBUG(x...) \
! 	printk( KERN_DEBUG x )
  
! static char *states[]={"FREE", "BEGINNING", "WORKING", "ERROR", "WAIT", "PREMATURE"};
  
! #define TRACE_STATE printk(KERN_DEBUG"hpusbscsi->state = %s at line %d\n", states[hpusbscsi->state], __LINE__)
  
  /* global variables */
  
***************
*** 118,124 ****
  					      GFP_KERNEL);
  	if (new == NULL)
  		return NULL;
! 	PDEBUG (1, "Allocated memory");
  	memset (new, 0, sizeof (struct hpusbscsi));
  	spin_lock_init (&new->dataurb.lock);
  	spin_lock_init (&new->controlurb.lock);
--- 54,60 ----
  					      GFP_KERNEL);
  	if (new == NULL)
  		return NULL;
! 	DEBUG ("Allocated memory\n");
  	memset (new, 0, sizeof (struct hpusbscsi));
  	spin_lock_init (&new->dataurb.lock);
  	spin_lock_init (&new->controlurb.lock);
***************
*** 184,192 ****
  	if (scsi_register_module (MODULE_SCSI_HA, &(new->ctempl)))
  		goto err_out;
  
- 	new->sense_command[0] = REQUEST_SENSE;
- 	new->sense_command[4] = HPUSBSCSI_SENSE_LENGTH;
- 
  	/* adding to list for module unload */
  	list_add (&hpusbscsi_devices, &new->lh);
  
--- 120,125 ----
***************
*** 200,226 ****
  static void
  hpusbscsi_usb_disconnect (struct usb_device *dev, void *ptr)
  {
! 	struct hpusbscsi *hp = (struct hpusbscsi *)ptr;
! 
! 	usb_unlink_urb(&hp->controlurb);
! 	usb_unlink_urb(&hp->dataurb);
! 
! 	spin_lock_irq(&io_request_lock);
! 	hp->dev = NULL;
! 	spin_unlock_irq(&io_request_lock);
  }
  
  static struct usb_device_id hpusbscsi_usb_ids[] = {
  	{USB_DEVICE (0x03f0, 0x0701)},	/* HP 53xx */
  	{USB_DEVICE (0x03f0, 0x0801)},	/* HP 7400 */
- 	{USB_DEVICE (0x0638, 0x0268)},  /*iVina 1200U */
  	{USB_DEVICE (0x0638, 0x026a)},	/*Scan Dual II */
- 	{USB_DEVICE (0x0638, 0x0A13)},  /*Avision AV600U */
- 	{USB_DEVICE (0x0638, 0x0A16)},  /*Avision DS610CU Scancopier */
- 	{USB_DEVICE (0x0638, 0x0A18)},  /*Avision AV600U Plus */
- 	{USB_DEVICE (0x0638, 0x0A23)},  /*Avision AV220 */
- 	{USB_DEVICE (0x0638, 0x0A24)},  /*Avision AV210 */
- 	{USB_DEVICE (0x0686, 0x4004)},  /*Minolta Elite II */
  	{}			/* Terminating entry */
  };
  
--- 133,146 ----
  static void
  hpusbscsi_usb_disconnect (struct usb_device *dev, void *ptr)
  {
!                  usb_unlink_urb(&(((struct hpusbscsi *) ptr)->controlurb));
! 	((struct hpusbscsi *) ptr)->dev = NULL;
  }
  
  static struct usb_device_id hpusbscsi_usb_ids[] = {
  	{USB_DEVICE (0x03f0, 0x0701)},	/* HP 53xx */
  	{USB_DEVICE (0x03f0, 0x0801)},	/* HP 7400 */
  	{USB_DEVICE (0x0638, 0x026a)},	/*Scan Dual II */
  	{}			/* Terminating entry */
  };
  
***************
*** 243,250 ****
  	int result;
  
  	INIT_LIST_HEAD (&hpusbscsi_devices);
! 	PDEBUG(0, "driver loaded, DebugLvel=%d", debug);
!  
  	if ((result = usb_register (&hpusbscsi_usb_driver)) < 0) {
  		printk (KERN_ERR "hpusbscsi: driver registration failed\n");
  		return -1;
--- 163,170 ----
  	int result;
  
  	INIT_LIST_HEAD (&hpusbscsi_devices);
! 	DEBUG ("Driver loaded\n");
! 
  	if ((result = usb_register (&hpusbscsi_usb_driver)) < 0) {
  		printk (KERN_ERR "hpusbscsi: driver registration failed\n");
  		return -1;
***************
*** 265,272 ****
  		tmp = tmp->next;
  		o = (struct hpusbscsi *)old;
  		usb_unlink_urb(&o->controlurb);
! 		if(scsi_unregister_module(MODULE_SCSI_HA,&o->ctempl)<0)
! 			printk(KERN_CRIT"Deregistering failed!\n");
  		kfree(old);
  	}
  
--- 185,191 ----
  		tmp = tmp->next;
  		o = (struct hpusbscsi *)old;
  		usb_unlink_urb(&o->controlurb);
! 		scsi_unregister_module(MODULE_SCSI_HA,&o->ctempl);
  		kfree(old);
  	}
  
***************
*** 287,293 ****
  	/* What a hideous hack! */
  
  	char local_name[48];
- 	spin_unlock_irq(&io_request_lock);
  
  
  	/* set up the name of our subdirectory under /proc/scsi/ */
--- 206,211 ----
***************
*** 296,302 ****
  	/* FIXME: where is this freed ? */
  
  	if (!sht->proc_name) {
- 		spin_lock_irq(&io_request_lock);
  		return 0;
  	}
  
--- 214,219 ----
***************
*** 317,323 ****
  
  	if ( 0  >  usb_submit_urb(&desc->controlurb)) {
  		kfree(sht->proc_name);
- 		spin_lock_irq(&io_request_lock);
  		return 0;
  	}
  
--- 234,239 ----
***************
*** 326,336 ****
  	if (desc->host == NULL) {
  		kfree (sht->proc_name);
  		usb_unlink_urb(&desc->controlurb);
- 		spin_lock_irq(&io_request_lock);
  		return 0;
  	}
  	desc->host->hostdata[0] = (unsigned long) desc;
! 	spin_lock_irq(&io_request_lock);
  
  	return 1;
  }
--- 242,251 ----
  	if (desc->host == NULL) {
  		kfree (sht->proc_name);
  		usb_unlink_urb(&desc->controlurb);
  		return 0;
  	}
  	desc->host->hostdata[0] = (unsigned long) desc;
! 
  
  	return 1;
  }
***************
*** 341,365 ****
  	usb_urb_callback usb_callback;
  	int res;
  
! 	spin_unlock_irq(&io_request_lock);
  
  	/* we don't answer for anything but our single device on any faked host controller */
  	if ( srb->device->lun || srb->device->id || srb->device->channel ) {
! 		srb->result = DID_BAD_TARGET;
! 		callback(srb);
! 		goto out;
  	}
  
  	/* Now we need to decide which callback to give to the urb we send the command with */
  
  	if (!srb->bufflen) {
! 		if (srb->cmnd[0] == REQUEST_SENSE){
! 			/* the usual buffer is not used, needs a special case */
! 			hpusbscsi->current_data_pipe = usb_rcvbulkpipe(hpusbscsi->dev, hpusbscsi->ep_in);
! 			usb_callback = request_sense_callback;
! 		} else {
! 			usb_callback = simple_command_callback;
! 		}
  	} else {
          	if (srb->use_sg) {
  			usb_callback = scatter_gather_callback;
--- 256,276 ----
  	usb_urb_callback usb_callback;
  	int res;
  
! 	hpusbscsi->use_count++;
  
  	/* we don't answer for anything but our single device on any faked host controller */
  	if ( srb->device->lun || srb->device->id || srb->device->channel ) {
! 		if (callback) {
! 			srb->result = DID_BAD_TARGET;
! 			callback(srb);
! 		}
!                 	goto out;
  	}
  
  	/* Now we need to decide which callback to give to the urb we send the command with */
  
  	if (!srb->bufflen) {
! 		usb_callback = simple_command_callback;
  	} else {
          	if (srb->use_sg) {
  			usb_callback = scatter_gather_callback;
***************
*** 376,382 ****
  	}
  
  
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  	if (hpusbscsi->state != HP_STATE_FREE) {
  		printk(KERN_CRIT"hpusbscsi - Ouch: queueing violation!\n");
  		return 1; /* This must not happen */
--- 287,293 ----
  	}
  
  
! 	TRACE_STATE;
  	if (hpusbscsi->state != HP_STATE_FREE) {
  		printk(KERN_CRIT"hpusbscsi - Ouch: queueing violation!\n");
  		return 1; /* This must not happen */
***************
*** 386,392 ****
          memset(srb->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
  
  	hpusbscsi->state = HP_STATE_BEGINNING;
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  
  	/* We prepare the urb for writing out the scsi command */
  	FILL_BULK_URB(
--- 297,303 ----
          memset(srb->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
  
  	hpusbscsi->state = HP_STATE_BEGINNING;
! 	TRACE_STATE;
  
  	/* We prepare the urb for writing out the scsi command */
  	FILL_BULK_URB(
***************
*** 400,423 ****
  	);
  	hpusbscsi->scallback = callback;
  	hpusbscsi->srb = srb;
- 	
- 	if (hpusbscsi->dev == NULL) {
- 		srb->result = DID_ERROR;
- 		callback(srb);
- 		goto out;
- 	}
  
  	res = usb_submit_urb(&hpusbscsi->dataurb);
  	if (res) {
  		hpusbscsi->state = HP_STATE_FREE;
! 		PDEBUG(2, "state= %s", states[hpusbscsi->state]);
! 		srb->result = DID_ERROR;
! 		callback(srb);
! 
  	}
  
  out:
! 	spin_lock_irq(&io_request_lock);
  	return 0;
  }
  
--- 311,329 ----
  	);
  	hpusbscsi->scallback = callback;
  	hpusbscsi->srb = srb;
  
  	res = usb_submit_urb(&hpusbscsi->dataurb);
  	if (res) {
  		hpusbscsi->state = HP_STATE_FREE;
! 		TRACE_STATE;
! 		if (callback) {
! 			srb->result = DID_ERROR;
! 			callback(srb);
! 		}
  	}
  
  out:
! 	hpusbscsi->use_count--;
  	return 0;
  }
  
***************
*** 425,433 ****
  {
  	struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->host->hostdata[0]);
  
! 	PDEBUG(1, "SCSI reset requested");
! 	//usb_reset_device(hpusbscsi->dev);
! 	//PDEBUG(1, "SCSI reset completed");
  	hpusbscsi->state = HP_STATE_FREE;
  
  	return 0;
--- 331,339 ----
  {
  	struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->host->hostdata[0]);
  
! 	printk(KERN_DEBUG"SCSI reset requested.\n");
! 	usb_reset_device(hpusbscsi->dev);
! 	printk(KERN_DEBUG"SCSI reset completed.\n");
  	hpusbscsi->state = HP_STATE_FREE;
  
  	return 0;
***************
*** 436,449 ****
  static int hpusbscsi_scsi_abort (Scsi_Cmnd *srb)
  {
  	struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->host->hostdata[0]);
! 	PDEBUG(1, "Request is canceled");
  
- 	spin_unlock_irq(&io_request_lock);
  	usb_unlink_urb(&hpusbscsi->dataurb);
  	hpusbscsi->state = HP_STATE_FREE;
  
- 	spin_lock_irq(&io_request_lock);
- 
  	return SCSI_ABORT_PENDING;
  }
  
--- 342,353 ----
  static int hpusbscsi_scsi_abort (Scsi_Cmnd *srb)
  {
  	struct hpusbscsi* hpusbscsi = (struct hpusbscsi*)(srb->host->hostdata[0]);
! 	printk(KERN_DEBUG"Requested is canceled.\n");
  
  	usb_unlink_urb(&hpusbscsi->dataurb);
+ 	usb_unlink_urb(&hpusbscsi->controlurb);
  	hpusbscsi->state = HP_STATE_FREE;
  
  	return SCSI_ABORT_PENDING;
  }
  
***************
*** 461,512 ****
  static void  control_interrupt_callback (struct urb *u)
  {
  	struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context;
- 	u8 scsi_state;
  
! 	PDEBUG(1, "Getting status byte %d",hpusbscsi->scsi_state_byte);
  	if(u->status < 0) {
                  if (hpusbscsi->state != HP_STATE_FREE)
                          handle_usb_error(hpusbscsi);
  		return;
  	}
  
! 	scsi_state = hpusbscsi->scsi_state_byte;
!         if (hpusbscsi->state != HP_STATE_ERROR) {
!                 hpusbscsi->srb->result &= SCSI_ERR_MASK;
!                 hpusbscsi->srb->result |= scsi_state;
!         }
! 
! 	if (scsi_state == CHECK_CONDITION << 1) {
! 		if (hpusbscsi->state == HP_STATE_WAIT) {
! 			issue_request_sense(hpusbscsi);
! 		} else {
! 			/* we request sense after an eventual data transfer */
! 			hpusbscsi->state = HP_STATE_ERROR;
! 		}
! 	}
! 
! 	if (hpusbscsi->scallback != NULL && hpusbscsi->state == HP_STATE_WAIT && scsi_state != CHECK_CONDITION <<1)
  		/* we do a callback to the scsi layer if and only if all data has been transfered */
  		hpusbscsi->scallback(hpusbscsi->srb);
  
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  	switch (hpusbscsi->state) {
  	case HP_STATE_WAIT:
  		hpusbscsi->state = HP_STATE_FREE;
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  		break;
  	case HP_STATE_WORKING:
  	case HP_STATE_BEGINNING:
  		hpusbscsi->state = HP_STATE_PREMATURE;
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
! 		break;
! 	case HP_STATE_ERROR:
  		break;
  	default:
  		printk(KERN_ERR"hpusbscsi: Unexpected status report.\n");
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  		hpusbscsi->state = HP_STATE_FREE;
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  		break;
  	}
  }
--- 365,400 ----
  static void  control_interrupt_callback (struct urb *u)
  {
  	struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context;
  
! DEBUG("Getting status byte %d \n",hpusbscsi->scsi_state_byte);
  	if(u->status < 0) {
                  if (hpusbscsi->state != HP_STATE_FREE)
                          handle_usb_error(hpusbscsi);
  		return;
  	}
+ 	hpusbscsi->srb->result &= SCSI_ERR_MASK;
+ 	hpusbscsi->srb->result |= hpusbscsi->scsi_state_byte<<1;
  
! 	if (hpusbscsi->scallback != NULL && hpusbscsi->state == HP_STATE_WAIT)
  		/* we do a callback to the scsi layer if and only if all data has been transfered */
  		hpusbscsi->scallback(hpusbscsi->srb);
  
! 	TRACE_STATE;
  	switch (hpusbscsi->state) {
  	case HP_STATE_WAIT:
  		hpusbscsi->state = HP_STATE_FREE;
! 	TRACE_STATE;
  		break;
  	case HP_STATE_WORKING:
  	case HP_STATE_BEGINNING:
  		hpusbscsi->state = HP_STATE_PREMATURE;
! 	TRACE_STATE;
  		break;
  	default:
  		printk(KERN_ERR"hpusbscsi: Unexpected status report.\n");
! 	TRACE_STATE;
  		hpusbscsi->state = HP_STATE_FREE;
! 	TRACE_STATE;
  		break;
  	}
  }
***************
*** 518,532 ****
  		handle_usb_error(hpusbscsi);
  		return;
          }
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  	if (hpusbscsi->state != HP_STATE_PREMATURE) {
! 	        PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  		hpusbscsi->state = HP_STATE_WAIT;
  	} else {
  		if (hpusbscsi->scallback != NULL)
  			hpusbscsi->scallback(hpusbscsi->srb);
  		hpusbscsi->state = HP_STATE_FREE;
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  	}
  }
  
--- 406,420 ----
  		handle_usb_error(hpusbscsi);
  		return;
          }
! 	TRACE_STATE;
  	if (hpusbscsi->state != HP_STATE_PREMATURE) {
! 	        TRACE_STATE;
  		hpusbscsi->state = HP_STATE_WAIT;
  	} else {
  		if (hpusbscsi->scallback != NULL)
  			hpusbscsi->scallback(hpusbscsi->srb);
  		hpusbscsi->state = HP_STATE_FREE;
! 	TRACE_STATE;
  	}
  }
  
***************
*** 537,543 ****
          usb_urb_callback callback;
          int res;
  
!         PDEBUG(1, "Going through scatter/gather"); // bonzo - this gets hit a lot - maybe make it a 2
          if (u->status < 0) {
                  handle_usb_error(hpusbscsi);
                  return;
--- 425,431 ----
          usb_urb_callback callback;
          int res;
  
!         DEBUG("Going through scatter/gather\n");
          if (u->status < 0) {
                  handle_usb_error(hpusbscsi);
                  return;
***************
*** 548,557 ****
          else
                  callback = simple_done;
  
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
          if (hpusbscsi->state != HP_STATE_PREMATURE)
  		hpusbscsi->state = HP_STATE_WORKING;
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  
          FILL_BULK_URB(
                  u,
--- 436,445 ----
          else
                  callback = simple_done;
  
! 	TRACE_STATE;
          if (hpusbscsi->state != HP_STATE_PREMATURE)
  		hpusbscsi->state = HP_STATE_WORKING;
! 	TRACE_STATE;
  
          FILL_BULK_URB(
                  u,
***************
*** 565,572 ****
  
          res = usb_submit_urb(u);
          if (res)
!         	handle_usb_error(hpusbscsi);
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  }
  
  static void simple_done (struct urb *u)
--- 453,460 ----
  
          res = usb_submit_urb(u);
          if (res)
!                 hpusbscsi->state = HP_STATE_ERROR;
! 	TRACE_STATE;
  }
  
  static void simple_done (struct urb *u)
***************
*** 577,595 ****
                  handle_usb_error(hpusbscsi);
                  return;
          }
! 	PDEBUG(1, "Data transfer done");
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  	if (hpusbscsi->state != HP_STATE_PREMATURE) {
! 		if (u->status < 0) {
! 			handle_usb_error(hpusbscsi);
! 		} else {
! 			if (hpusbscsi->state != HP_STATE_ERROR) {
! 				hpusbscsi->state = HP_STATE_WAIT;
! 			} else {
! 				issue_request_sense(hpusbscsi);
! 			}
! 		PDEBUG(2, "state= %s", states[hpusbscsi->state]);
! 		}
  	} else {
  		if (hpusbscsi->scallback != NULL)
  			hpusbscsi->scallback(hpusbscsi->srb);
--- 465,478 ----
                  handle_usb_error(hpusbscsi);
                  return;
          }
!         DEBUG("Data transfer done\n");
! 	TRACE_STATE;
  	if (hpusbscsi->state != HP_STATE_PREMATURE) {
! 		if (u->status < 0)
! 			hpusbscsi->state = HP_STATE_ERROR;
! 		else
! 			hpusbscsi->state = HP_STATE_WAIT;
! 		TRACE_STATE;
  	} else {
  		if (hpusbscsi->scallback != NULL)
  			hpusbscsi->scallback(hpusbscsi->srb);
***************
*** 622,677 ****
                  handle_usb_error(hpusbscsi);
  		return;
          }
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
  	if (hpusbscsi->state != HP_STATE_PREMATURE) {
  		hpusbscsi->state = HP_STATE_WORKING;
! 	PDEBUG(2, "state= %s", states[hpusbscsi->state]);
! 	}
! }
! 
! static void request_sense_callback (struct urb *u)
! {
! 	struct hpusbscsi * hpusbscsi = (struct hpusbscsi *)u->context;
! 
! 	if (u->status<0) {
!                 handle_usb_error(hpusbscsi);
! 		return;
!         }
! 
! 	FILL_BULK_URB(
! 		u,
! 		hpusbscsi->dev,
! 		hpusbscsi->current_data_pipe,
! 		hpusbscsi->srb->sense_buffer,
! 		SCSI_SENSE_BUFFERSIZE,
! 		simple_done,
! 		hpusbscsi
! 	);
! 
! 	if (0 > usb_submit_urb(u)) {
! 		handle_usb_error(hpusbscsi);
! 		return;
! 	}
! 	if (hpusbscsi->state != HP_STATE_PREMATURE && hpusbscsi->state != HP_STATE_ERROR)
! 		hpusbscsi->state = HP_STATE_WORKING;
! }
! 
! static void issue_request_sense (struct hpusbscsi *hpusbscsi)
! {
! 	FILL_BULK_URB(
! 		&hpusbscsi->dataurb,
! 		hpusbscsi->dev,
! 		usb_sndbulkpipe(hpusbscsi->dev, hpusbscsi->ep_out),
! 		&hpusbscsi->sense_command,
! 		SENSE_COMMAND_SIZE,
! 		request_sense_callback,
! 		hpusbscsi
! 	);
! 
! 	hpusbscsi->current_data_pipe = usb_rcvbulkpipe(hpusbscsi->dev, hpusbscsi->ep_in);
! 
! 	if (0 > usb_submit_urb(&hpusbscsi->dataurb)) {
! 		handle_usb_error(hpusbscsi);
  	}
  }
  
--- 505,519 ----
                  handle_usb_error(hpusbscsi);
  		return;
          }
! 	TRACE_STATE;
  	if (hpusbscsi->state != HP_STATE_PREMATURE) {
  		hpusbscsi->state = HP_STATE_WORKING;
! 	TRACE_STATE;
! 	} else {
! 		if (hpusbscsi->scallback != NULL)
! 			hpusbscsi->scallback(hpusbscsi->srb);
! 		hpusbscsi->state = HP_STATE_FREE;
! 	TRACE_STATE;
  	}
  }
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hpusbscsi.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hpusbscsi.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hpusbscsi.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hpusbscsi.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 4,17 ****
  /* large parts based on or taken from code by John Fremlin and Matt Dharm */
  /* this file is licensed under the GPL */
  
- /* A big thanks to Jose for untiring testing */
- 
  typedef void (*usb_urb_callback) (struct urb *);
  typedef void (*scsi_callback)(Scsi_Cmnd *);
  
- #define SENSE_COMMAND_SIZE 6
- #define HPUSBSCSI_SENSE_LENGTH 0x16
- 
  struct hpusbscsi
  {
          struct list_head lh;
--- 4,12 ----
***************
*** 26,32 ****
          int number;
         scsi_callback scallback;
         Scsi_Cmnd *srb;
- 	u8 sense_command[SENSE_COMMAND_SIZE];
  
          int use_count;
          wait_queue_head_t pending;
--- 21,26 ----
***************
*** 57,69 ****
  static void simple_command_callback(struct urb *u);
  static void scatter_gather_callback(struct urb *u);
  static void simple_payload_callback (struct urb *u);
! static void control_interrupt_callback (struct urb *u);
! static void request_sense_callback (struct urb *u);
  static void simple_done (struct urb *u);
  static int hpusbscsi_scsi_queuecommand (Scsi_Cmnd *srb, scsi_callback callback);
  static int hpusbscsi_scsi_host_reset (Scsi_Cmnd *srb);
  static int hpusbscsi_scsi_abort (Scsi_Cmnd *srb);
- static void issue_request_sense (struct hpusbscsi *hpusbscsi);
  
  static Scsi_Host_Template hpusbscsi_scsi_host_template = {
  	name:           "hpusbscsi",
--- 51,61 ----
  static void simple_command_callback(struct urb *u);
  static void scatter_gather_callback(struct urb *u);
  static void simple_payload_callback (struct urb *u);
! static void  control_interrupt_callback (struct urb *u);
  static void simple_done (struct urb *u);
  static int hpusbscsi_scsi_queuecommand (Scsi_Cmnd *srb, scsi_callback callback);
  static int hpusbscsi_scsi_host_reset (Scsi_Cmnd *srb);
  static int hpusbscsi_scsi_abort (Scsi_Cmnd *srb);
  
  static Scsi_Host_Template hpusbscsi_scsi_host_template = {
  	name:           "hpusbscsi",
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hub.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hub.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hub.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hub.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 155,161 ****
  static int usb_hub_configure(struct usb_hub *hub, struct usb_endpoint_descriptor *endpoint)
  {
  	struct usb_device *dev = hub->dev;
! 	struct usb_hub_status *hubstatus;
  	char portstr[USB_MAXCHILDREN + 1];
  	unsigned int pipe;
  	int i, maxp, ret;
--- 155,161 ----
  static int usb_hub_configure(struct usb_hub *hub, struct usb_endpoint_descriptor *endpoint)
  {
  	struct usb_device *dev = hub->dev;
! 	struct usb_hub_status hubstatus;
  	char portstr[USB_MAXCHILDREN + 1];
  	unsigned int pipe;
  	int i, maxp, ret;
***************
*** 217,228 ****
  			break;
  		case 1:
  			dbg("Single TT");
- 			hub->tt.hub = dev;
  			break;
  		case 2:
! 			dbg("TT per port");
! 			hub->tt.hub = dev;
! 			hub->tt.multi = 1;
  			break;
  		default:
  			dbg("Unrecognized hub protocol %d",
--- 217,225 ----
  			break;
  		case 1:
  			dbg("Single TT");
  			break;
  		case 2:
! 			dbg("Multiple TT");
  			break;
  		default:
  			dbg("Unrecognized hub protocol %d",
***************
*** 258,286 ****
  
  	dbg("port removable status: %s", portstr);
  
! 	hubstatus = kmalloc(sizeof *hubstatus, GFP_KERNEL);
! 	if (!hubstatus) {
! 		err("Unable to allocate hubstatus");
! 		kfree(hub->descriptor);
! 		return -1;
! 	}
! 	ret = usb_get_hub_status(dev, hubstatus);
  	if (ret < 0) {
  		err("Unable to get hub status (err = %d)", ret);
- 		kfree(hubstatus);
  		kfree(hub->descriptor);
  		return -1;
  	}
  
! 	le16_to_cpus(&hubstatus->wHubStatus);
  
  	dbg("local power source is %s",
! 		(hubstatus->wHubStatus & HUB_STATUS_LOCAL_POWER) ? "lost (inactive)" : "good");
  
  	dbg("%sover-current condition exists",
! 		(hubstatus->wHubStatus & HUB_STATUS_OVERCURRENT) ? "" : "no ");
! 
! 	kfree(hubstatus);
  
  	/* Start the interrupt endpoint */
  	pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
--- 255,274 ----
  
  	dbg("port removable status: %s", portstr);
  
! 	ret = usb_get_hub_status(dev, &hubstatus);
  	if (ret < 0) {
  		err("Unable to get hub status (err = %d)", ret);
  		kfree(hub->descriptor);
  		return -1;
  	}
  
! 	le16_to_cpus(&hubstatus.wHubStatus);
  
  	dbg("local power source is %s",
! 		(hubstatus.wHubStatus & HUB_STATUS_LOCAL_POWER) ? "lost (inactive)" : "good");
  
  	dbg("%sover-current condition exists",
! 		(hubstatus.wHubStatus & HUB_STATUS_OVERCURRENT) ? "" : "no ");
  
  	/* Start the interrupt endpoint */
  	pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
***************
*** 296,306 ****
  		return -1;
  	}
  
! 	FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq, hub,
! 		/* NOTE:  in 2.5 fill_int_urb() converts the encoding */
! 		(dev->speed == USB_SPEED_HIGH)
! 			? 1 << (endpoint->bInterval - 1)
! 			: endpoint->bInterval);
  	ret = usb_submit_urb(hub->urb);
  	if (ret) {
  		err("usb_submit_urb failed (%d)", ret);
--- 284,291 ----
  		return -1;
  	}
  
! 	FILL_INT_URB(hub->urb, dev, pipe, hub->buffer, maxp, hub_irq,
! 		hub, endpoint->bInterval);
  	ret = usb_submit_urb(hub->urb);
  	if (ret) {
  		err("usb_submit_urb failed (%d)", ret);
***************
*** 511,539 ****
  	err("cannot disconnect hub %d", dev->devnum);
  }
  
- static int usb_hub_port_status(struct usb_device *hub, int port,
- 			       u16 *status, u16 *change)
- {
- 	struct usb_port_status *portsts;
- 	int ret = -ENOMEM;
- 
- 	portsts = kmalloc(sizeof(*portsts), GFP_KERNEL);
- 	if (portsts) {
- 		ret = usb_get_port_status(hub, port + 1, portsts);
- 		if (ret < 0)
- 			err("%s (%d) failed (err = %d)", __FUNCTION__, hub->devnum, ret);
- 		else {
- 			*status = le16_to_cpu(portsts->wPortStatus);
- 			*change = le16_to_cpu(portsts->wPortChange); 
- 			dbg("port %d, portstatus %x, change %x, %s", port + 1,
- 				*status, *change, portspeed(*status));
- 			ret = 0;
- 		}
- 		kfree(portsts);
- 	}
- 	return ret;
- }
- 
  #define HUB_RESET_TRIES		5
  #define HUB_PROBE_TRIES		2
  #define HUB_SHORT_RESET_TIME	10
--- 496,501 ----
***************
*** 545,566 ****
  				struct usb_device *dev, unsigned int delay)
  {
  	int delay_time, ret;
! 	u16 portstatus;
! 	u16 portchange;
  
  	for (delay_time = 0; delay_time < HUB_RESET_TIMEOUT; delay_time += delay) {
  		/* wait to give the device a chance to reset */
  		wait_ms(delay);
  
  		/* read and decode port status */
! 		ret = usb_hub_port_status(hub, port, &portstatus, &portchange);
  		if (ret < 0) {
  			return -1;
  		}
  
! 		/* Device went away? */
! 		if (!(portstatus & USB_PORT_STAT_CONNECTION))
! 			return 1;
  
  		/* bomb out completely if something weird happened */
  		if ((portchange & USB_PORT_STAT_C_CONNECTION))
--- 507,530 ----
  				struct usb_device *dev, unsigned int delay)
  {
  	int delay_time, ret;
! 	struct usb_port_status portsts;
! 	unsigned short portchange, portstatus;
  
  	for (delay_time = 0; delay_time < HUB_RESET_TIMEOUT; delay_time += delay) {
  		/* wait to give the device a chance to reset */
  		wait_ms(delay);
  
  		/* read and decode port status */
! 		ret = usb_get_port_status(hub, port + 1, &portsts);
  		if (ret < 0) {
+ 			err("get_port_status(%d) failed (err = %d)", port + 1, ret);
  			return -1;
  		}
  
! 		portstatus = le16_to_cpu(portsts.wPortStatus);
! 		portchange = le16_to_cpu(portsts.wPortChange);
! 		dbg("port %d, portstatus %x, change %x, %s", port + 1,
! 			portstatus, portchange, portspeed (portstatus));
  
  		/* bomb out completely if something weird happened */
  		if ((portchange & USB_PORT_STAT_C_CONNECTION))
***************
*** 628,684 ****
  			port + 1, hub->devnum, ret);
  }
  
! /* USB 2.0 spec, 7.1.7.3 / fig 7-29:
!  *
!  * Between connect detection and reset signaling there must be a delay
!  * of 100ms at least for debounce and power-settling. The corresponding
!  * timer shall restart whenever the downstream port detects a disconnect.
!  * 
!  * Apparently there are some bluetooth and irda-dongles and a number
!  * of low-speed devices which require longer delays of about 200-400ms.
!  * Not covered by the spec - but easy to deal with.
!  *
!  * This implementation uses 400ms minimum debounce timeout and checks
!  * every 100ms for transient disconnects to restart the delay.
!  */
! 
! #define HUB_DEBOUNCE_TIMEOUT	400
! #define HUB_DEBOUNCE_STEP	100
! 
! /* return: -1 on error, 0 on success, 1 on disconnect.  */
! static int usb_hub_port_debounce(struct usb_device *hub, int port)
  {
- 	int ret;
- 	unsigned delay_time;
- 	u16 portchange, portstatus;
- 
- 	for (delay_time = 0; delay_time < HUB_DEBOUNCE_TIMEOUT; /* empty */ ) {
- 
- 		/* wait debounce step increment */
- 		wait_ms(HUB_DEBOUNCE_STEP);
- 
- 		ret = usb_hub_port_status(hub, port, &portstatus, &portchange);
- 		if (ret < 0)
- 			return -1;
- 
- 		if ((portchange & USB_PORT_STAT_C_CONNECTION)) {
- 			usb_clear_port_feature(hub, port+1, USB_PORT_FEAT_C_CONNECTION);
- 			delay_time = 0;
- 		}
- 		else
- 			delay_time += HUB_DEBOUNCE_STEP;
- 	}
- 	return ((portstatus&USB_PORT_STAT_CONNECTION)) ? 0 : 1;
- }
- 
- static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
- 					u16 portstatus, u16 portchange)
- {
- 	struct usb_device *hub = hubstate->dev;
  	struct usb_device *dev;
  	unsigned int delay = HUB_SHORT_RESET_TIME;
  	int i;
  
  	dbg("port %d, portstatus %x, change %x, %s",
  		port + 1, portstatus, portchange, portspeed (portstatus));
  
--- 592,608 ----
  			port + 1, hub->devnum, ret);
  }
  
! static void usb_hub_port_connect_change(struct usb_device *hub, int port,
! 					struct usb_port_status *portsts)
  {
  	struct usb_device *dev;
+ 	unsigned short portstatus, portchange;
  	unsigned int delay = HUB_SHORT_RESET_TIME;
  	int i;
+ 	char *portstr, *tempstr;
  
+ 	portstatus = le16_to_cpu(portsts->wPortStatus);
+ 	portchange = le16_to_cpu(portsts->wPortChange);
  	dbg("port %d, portstatus %x, change %x, %s",
  		port + 1, portstatus, portchange, portspeed (portstatus));
  
***************
*** 697,713 ****
  		return;
  	}
  
! 	if (usb_hub_port_debounce(hub, port)) {
! 		err("connect-debounce failed, port %d disabled", port+1);
! 		usb_hub_port_disable(hub, port);
! 		return;
  	}
  
  	down(&usb_address0_sem);
  
  	for (i = 0; i < HUB_PROBE_TRIES; i++) {
! 		struct usb_device *pdev;
! 		int len;
  
  		/* Allocate a new device struct */
  		dev = usb_alloc_dev(hub, hub->bus);
--- 621,640 ----
  		return;
  	}
  
! 	/* Some low speed devices have problems with the quick delay, so */
! 	/*  be a bit pessimistic with those devices. RHbug #23670 */
! 	if (portstatus & USB_PORT_STAT_LOW_SPEED) {
! 		wait_ms(400);
! 		delay = HUB_LONG_RESET_TIME;
  	}
  
  	down(&usb_address0_sem);
  
+ 	tempstr = kmalloc(1024, GFP_KERNEL);
+ 	portstr = kmalloc(1024, GFP_KERNEL);
+ 
  	for (i = 0; i < HUB_PROBE_TRIES; i++) {
! 		struct usb_device *pdev, *cdev;
  
  		/* Allocate a new device struct */
  		dev = usb_alloc_dev(hub, hub->bus);
***************
*** 727,764 ****
  		/* Find a new device ID for it */
  		usb_connect(dev);
  
! 		/* Set up TT records, if needed  */
! 		if (hub->tt) {
! 			dev->tt = hub->tt;
! 			dev->ttport = hub->ttport;
! 		} else if (dev->speed != USB_SPEED_HIGH
! 				&& hub->speed == USB_SPEED_HIGH) {
! 			dev->tt = &hubstate->tt;
! 			dev->ttport = port + 1;
! 		}
! 
! 		/* Save readable and stable topology id, distinguishing
! 		 * devices by location for diagnostics, tools, etc.  The
! 		 * string is a path along hub ports, from the root.  Each
! 		 * device's id will be stable until USB is re-cabled, and
! 		 * hubs are often labeled with these port numbers.
! 		 *
! 		 * Initial size: ".NN" times five hubs + NUL = 16 bytes max
! 		 * (quite rare, since most hubs have 4-6 ports).
! 		 */
  		pdev = dev->parent;
! 		if (pdev->devpath [0] != '0')	/* parent not root? */
! 			len = snprintf (dev->devpath, sizeof dev->devpath,
! 				"%s.%d", pdev->devpath, port + 1);
! 		/* root == "0", root port 2 == "2", port 3 that hub "2.3" */
! 		else
! 			len = snprintf (dev->devpath, sizeof dev->devpath,
! 				"%d", port + 1);
! 		if (len == sizeof dev->devpath)
! 			warn ("devpath size! usb/%03d/%03d path %s",
! 				dev->bus->busnum, dev->devnum, dev->devpath);
! 		info("new USB device %s-%s, assigned address %d",
! 			dev->bus->bus_name, dev->devpath, dev->devnum);
  
  		/* Run it through the hoops (find a driver, etc) */
  		if (!usb_new_device(dev))
--- 654,685 ----
  		/* Find a new device ID for it */
  		usb_connect(dev);
  
! 		/* Create a readable topology string */
! 		cdev = dev;
  		pdev = dev->parent;
! 		if (portstr && tempstr) {
! 			portstr[0] = 0;
! 			while (pdev) {
! 				int port;
! 
! 				for (port = 0; port < pdev->maxchild; port++)
! 					if (pdev->children[port] == cdev)
! 						break;
! 
! 				strcpy(tempstr, portstr);
! 				if (!strlen(tempstr))
! 					sprintf(portstr, "%d", port + 1);
! 				else
! 					sprintf(portstr, "%d/%s", port + 1, tempstr);
! 
! 				cdev = pdev;
! 				pdev = pdev->parent;
! 			}
! 			info("USB new device connect on bus%d/%s, assigned device number %d",
! 				dev->bus->busnum, portstr, dev->devnum);
! 		} else
! 			info("USB new device connect on bus%d, assigned device number %d",
! 				dev->bus->busnum, dev->devnum);
  
  		/* Run it through the hoops (find a driver, etc) */
  		if (!usb_new_device(dev))
***************
*** 775,780 ****
--- 696,705 ----
  	usb_hub_port_disable(hub, port);
  done:
  	up(&usb_address0_sem);
+ 	if (portstr)
+ 		kfree(portstr);
+ 	if (tempstr)
+ 		kfree(tempstr);
  }
  
  static void usb_hub_events(void)
***************
*** 783,793 ****
  	struct list_head *tmp;
  	struct usb_device *dev;
  	struct usb_hub *hub;
! 	struct usb_hub_status *hubsts;
! 	u16 hubstatus;
! 	u16 hubchange;
! 	u16 portstatus;
! 	u16 portchange;
  	int i, ret;
  
  	/*
--- 708,715 ----
  	struct list_head *tmp;
  	struct usb_device *dev;
  	struct usb_hub *hub;
! 	struct usb_hub_status hubsts;
! 	unsigned short hubstatus, hubchange;
  	int i, ret;
  
  	/*
***************
*** 829,843 ****
  		}
  
  		for (i = 0; i < hub->descriptor->bNbrPorts; i++) {
! 			ret = usb_hub_port_status(dev, i, &portstatus, &portchange);
  			if (ret < 0) {
  				continue;
  			}
  
  			if (portchange & USB_PORT_STAT_C_CONNECTION) {
  				dbg("port %d connection change", i + 1);
  
! 				usb_hub_port_connect_change(hub, i, portstatus, portchange);
  			} else if (portchange & USB_PORT_STAT_C_ENABLE) {
  				dbg("port %d enable change, status %x", i + 1, portstatus);
  				usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_C_ENABLE);
--- 751,772 ----
  		}
  
  		for (i = 0; i < hub->descriptor->bNbrPorts; i++) {
! 			struct usb_port_status portsts;
! 			unsigned short portstatus, portchange;
! 
! 			ret = usb_get_port_status(dev, i + 1, &portsts);
  			if (ret < 0) {
+ 				err("get_port_status failed (err = %d)", ret);
  				continue;
  			}
  
+ 			portstatus = le16_to_cpu(portsts.wPortStatus);
+ 			portchange = le16_to_cpu(portsts.wPortChange);
+ 
  			if (portchange & USB_PORT_STAT_C_CONNECTION) {
  				dbg("port %d connection change", i + 1);
  
! 				usb_hub_port_connect_change(dev, i, &portsts);
  			} else if (portchange & USB_PORT_STAT_C_ENABLE) {
  				dbg("port %d enable change, status %x", i + 1, portstatus);
  				usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_C_ENABLE);
***************
*** 851,857 ****
  				    (portstatus & USB_PORT_STAT_CONNECTION) && (dev->children[i])) {
  					err("already running port %i disabled by hub (EMI?), re-enabling...",
  						i + 1);
! 					usb_hub_port_connect_change(hub, i, portstatus, portchange);
  				}
  			}
  
--- 780,786 ----
  				    (portstatus & USB_PORT_STAT_CONNECTION) && (dev->children[i])) {
  					err("already running port %i disabled by hub (EMI?), re-enabling...",
  						i + 1);
! 					usb_hub_port_connect_change(dev, i, &portsts);
  				}
  			}
  
***************
*** 873,899 ****
  		} /* end for i */
  
  		/* deal with hub status changes */
! 		hubsts = kmalloc(sizeof *hubsts, GFP_KERNEL);
! 		if (!hubsts) {
! 			err("couldn't allocate hubsts");
! 		} else {
! 			if (usb_get_hub_status(dev, hubsts) < 0)
! 				err("get_hub_status failed");
! 			else {
! 				hubstatus = le16_to_cpup(&hubsts->wHubStatus);
! 				hubchange = le16_to_cpup(&hubsts->wHubChange);
! 				if (hubchange & HUB_CHANGE_LOCAL_POWER) {
! 					dbg("hub power change");
! 					usb_clear_hub_feature(dev, C_HUB_LOCAL_POWER);
! 				}
! 				if (hubchange & HUB_CHANGE_OVERCURRENT) {
! 					dbg("hub overcurrent change");
! 					wait_ms(500);	/* Cool down */
! 					usb_clear_hub_feature(dev, C_HUB_OVER_CURRENT);
! 					usb_hub_power_on(hub);
! 				}
  			}
- 			kfree(hubsts);
  		}
  		up(&hub->khubd_sem);
          } /* end while (1) */
--- 802,822 ----
  		} /* end for i */
  
  		/* deal with hub status changes */
! 		if (usb_get_hub_status(dev, &hubsts) < 0)
! 			err("get_hub_status failed");
! 		else {
! 			hubstatus = le16_to_cpup(&hubsts.wHubStatus);
! 			hubchange = le16_to_cpup(&hubsts.wHubChange);
! 			if (hubchange & HUB_CHANGE_LOCAL_POWER) {
! 				dbg("hub power change");
! 				usb_clear_hub_feature(dev, C_HUB_LOCAL_POWER);
! 			}
! 			if (hubchange & HUB_CHANGE_OVERCURRENT) {
! 				dbg("hub overcurrent change");
! 				wait_ms(500);	/* Cool down */
! 				usb_clear_hub_feature(dev, C_HUB_OVER_CURRENT);
!                         	usb_hub_power_on(hub);
  			}
  		}
  		up(&hub->khubd_sem);
          } /* end while (1) */
***************
*** 911,917 ****
  	 */
  
  	daemonize();
- 	reparent_to_init();
  
  	/* Setup a nice name */
  	strcpy(current->comm, "khubd");
--- 834,839 ----
***************
*** 919,925 ****
  	/* Send me a signal to get me die (for debugging) */
  	do {
  		usb_hub_events();
! 		wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list)); 
  	} while (!signal_pending(current));
  
  	dbg("usb_hub_thread exiting");
--- 841,847 ----
  	/* Send me a signal to get me die (for debugging) */
  	do {
  		usb_hub_events();
! 		interruptible_sleep_on(&khubd_wait);
  	} while (!signal_pending(current));
  
  	dbg("usb_hub_thread exiting");
***************
*** 1002,1008 ****
  int usb_reset_device(struct usb_device *dev)
  {
  	struct usb_device *parent = dev->parent;
! 	struct usb_device_descriptor *descriptor;
  	int i, ret, port = -1;
  
  	if (!parent) {
--- 924,930 ----
  int usb_reset_device(struct usb_device *dev)
  {
  	struct usb_device *parent = dev->parent;
! 	struct usb_device_descriptor descriptor;
  	int i, ret, port = -1;
  
  	if (!parent) {
***************
*** 1051,1072 ****
  	 * If nothing changed, we reprogram the configuration and then
  	 * the alternate settings.
  	 */
! 	descriptor = kmalloc(sizeof *descriptor, GFP_NOIO);
! 	if (!descriptor) {
! 		return -ENOMEM;
! 	}
! 	ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, descriptor,
! 			sizeof(*descriptor));
  	if (ret < 0)
  		return ret;
  
! 	le16_to_cpus(&descriptor->bcdUSB);
! 	le16_to_cpus(&descriptor->idVendor);
! 	le16_to_cpus(&descriptor->idProduct);
! 	le16_to_cpus(&descriptor->bcdDevice);
  
! 	if (memcmp(&dev->descriptor, descriptor, sizeof(*descriptor))) {
! 		kfree(descriptor);
  		usb_destroy_configuration(dev);
  
  		ret = usb_get_device_descriptor(dev);
--- 973,989 ----
  	 * If nothing changed, we reprogram the configuration and then
  	 * the alternate settings.
  	 */
! 	ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &descriptor,
! 			sizeof(descriptor));
  	if (ret < 0)
  		return ret;
  
! 	le16_to_cpus(&descriptor.bcdUSB);
! 	le16_to_cpus(&descriptor.idVendor);
! 	le16_to_cpus(&descriptor.idProduct);
! 	le16_to_cpus(&descriptor.bcdDevice);
  
! 	if (memcmp(&dev->descriptor, &descriptor, sizeof(descriptor))) {
  		usb_destroy_configuration(dev);
  
  		ret = usb_get_device_descriptor(dev);
***************
*** 1096,1103 ****
  		return 1;
  	}
  
- 	kfree(descriptor);
- 
  	ret = usb_set_configuration(dev, dev->actconfig->bConfigurationValue);
  	if (ret < 0) {
  		err("failed to set active configuration (error=%d)", ret);
--- 1013,1018 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hub.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hub.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/hub.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/hub.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 2,8 ****
  #define __LINUX_HUB_H
  
  #include 
- #include 	/* likely()/unlikely() */
  
  /*
   * Hub request types
--- 2,7 ----
***************
*** 137,143 ****
  	struct usb_hub_descriptor *descriptor;
  
  	struct semaphore khubd_sem;
- 	struct usb_tt		tt;		/* Transaction Translator */
  };
  
  #endif /* __LINUX_HUB_H */
--- 136,141 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/ibmcam.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/ibmcam.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/ibmcam.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/ibmcam.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,8 ****
  /*
   * USB IBM C-It Video Camera driver
   *
!  * Supports Xirlink C-It Video Camera, IBM PC Camera,
!  * IBM NetCamera and Veo Stingray.
   *
   * This driver is based on earlier work of:
   *
--- 1,7 ----
  /*
   * USB IBM C-It Video Camera driver
   *
!  * Supports IBM C-It Video Camera.
   *
   * This driver is based on earlier work of:
   *
***************
*** 34,44 ****
  
  #include "usbvideo.h"
  
! #define IBMCAM_VENDOR_ID	0x0545
! #define IBMCAM_PRODUCT_ID	0x8080
  #define NETCAM_PRODUCT_ID	0x8002	/* IBM NetCamera, close to model 2 */
- #define VEO_800C_PRODUCT_ID	0x800C	/* Veo Stingray, repackaged Model 2 */
- #define VEO_800D_PRODUCT_ID	0x800D	/* Veo Stingray, repackaged Model 4 */
  
  #define MAX_IBMCAM		4	/* How many devices we allow to connect */
  #define USES_IBMCAM_PUTPIXEL    0       /* 0=Fast/oops 1=Slow/secure */
--- 33,41 ----
  
  #include "usbvideo.h"
  
! #define	IBMCAM_VENDOR_ID	0x0545
! #define	IBMCAM_PRODUCT_ID	0x8080
  #define NETCAM_PRODUCT_ID	0x8002	/* IBM NetCamera, close to model 2 */
  
  #define MAX_IBMCAM		4	/* How many devices we allow to connect */
  #define USES_IBMCAM_PUTPIXEL    0       /* 0=Fast/oops 1=Slow/secure */
***************
*** 3674,3681 ****
  	if (dev->descriptor.idVendor != IBMCAM_VENDOR_ID)
  		return NULL;
  	if ((dev->descriptor.idProduct != IBMCAM_PRODUCT_ID) &&
- 	    (dev->descriptor.idProduct != VEO_800C_PRODUCT_ID) &&
- 	    (dev->descriptor.idProduct != VEO_800D_PRODUCT_ID) &&
  	    (dev->descriptor.idProduct != NETCAM_PRODUCT_ID))
  		return NULL;
  
--- 3671,3676 ----
***************
*** 3689,3696 ****
  	case 0x030A:
  		if (ifnum != 0)
  			return NULL;
! 		if ((dev->descriptor.idProduct == NETCAM_PRODUCT_ID) ||
! 		    (dev->descriptor.idProduct == VEO_800D_PRODUCT_ID))
  			model = IBMCAM_MODEL_4;
  		else
  			model = IBMCAM_MODEL_2;
--- 3684,3690 ----
  	case 0x030A:
  		if (ifnum != 0)
  			return NULL;
! 		if (dev->descriptor.idProduct == NETCAM_PRODUCT_ID)
  			model = IBMCAM_MODEL_4;
  		else
  			model = IBMCAM_MODEL_2;
***************
*** 3705,3732 ****
  			dev->descriptor.bcdDevice);
  		return NULL;
  	}
! 
! 	/* Print detailed info on what we found so far */
! 	do {
! 		char *brand = NULL;
! 		switch (dev->descriptor.idProduct) {
! 		case NETCAM_PRODUCT_ID:
! 			brand = "IBM NetCamera";
! 			break;
! 		case VEO_800C_PRODUCT_ID:
! 			brand = "Veo Stingray [800C]";
! 			break;
! 		case VEO_800D_PRODUCT_ID:
! 			brand = "Veo Stingray [800D]";
! 			break;
! 		case IBMCAM_PRODUCT_ID:
! 		default:
! 			brand = "IBM PC Camera"; /* a.k.a. Xirlink C-It */
! 			break;
! 		}
! 		info("%s USB camera found (model %d, rev. 0x%04x)",
! 		     brand, model, dev->descriptor.bcdDevice);
! 	} while (0);
  
  	/* Validate found interface: must have one ISO endpoint */
  	nas = dev->actconfig->interface[ifnum].num_altsetting;
--- 3699,3706 ----
  			dev->descriptor.bcdDevice);
  		return NULL;
  	}
! 	info("IBM USB camera found (model %d, rev. 0x%04x)",
! 		model, dev->descriptor.bcdDevice);
  
  	/* Validate found interface: must have one ISO endpoint */
  	nas = dev->actconfig->interface[ifnum].num_altsetting;
***************
*** 3934,3949 ****
  	usbvideo_Deregister(&cams);
  }
  
  static __devinitdata struct usb_device_id id_table[] = {
  	{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0002, 0x0002) },	/* Model 1 */
  	{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x030a, 0x030a) },	/* Model 2 */
  	{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0301, 0x0301) },	/* Model 3 */
  	{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, NETCAM_PRODUCT_ID, 0x030a, 0x030a) },	/* Model 4 */
- 	{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, VEO_800C_PRODUCT_ID, 0x030a, 0x030a) },	/* Model 2 */
- 	{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, VEO_800D_PRODUCT_ID, 0x030a, 0x030a) },	/* Model 4 */
  	{ }  /* Terminating entry */
  };
  MODULE_DEVICE_TABLE(usb, id_table);
  
  module_init(ibmcam_init);
  module_exit(ibmcam_cleanup);
--- 3908,3925 ----
  	usbvideo_Deregister(&cams);
  }
  
+ #if defined(usb_device_id_ver)
+ 
  static __devinitdata struct usb_device_id id_table[] = {
  	{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0002, 0x0002) },	/* Model 1 */
  	{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x030a, 0x030a) },	/* Model 2 */
  	{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, IBMCAM_PRODUCT_ID, 0x0301, 0x0301) },	/* Model 3 */
  	{ USB_DEVICE_VER(IBMCAM_VENDOR_ID, NETCAM_PRODUCT_ID, 0x030a, 0x030a) },	/* Model 4 */
  	{ }  /* Terminating entry */
  };
  MODULE_DEVICE_TABLE(usb, id_table);
  
+ #endif /* defined(usb_device_id_ver) */
+ 
  module_init(ibmcam_init);
  module_exit(ibmcam_cleanup);
LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb$B$@$1$KH/8+(B: ibmcam.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/inode.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/inode.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/inode.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/inode.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 628,634 ****
          s->s_root = d_alloc_root(root_inode);
          if (!s->s_root)
                  goto out_no_root;
- 	lock_kernel();
  	list_add_tail(&s->u.usbdevfs_sb.slist, &superlist);
  	for (i = 0; i < NRSPECIAL; i++) {
  		if (!(inode = iget(s, IROOT+1+i)))
--- 628,633 ----
***************
*** 647,653 ****
  		recurse_new_dev_inode(bus->root_hub, s);
  	}
  	up (&usb_bus_list_lock);
- 	unlock_kernel();
          return s;
  
   out_no_root:
--- 646,651 ----
***************
*** 656,668 ****
          return NULL;
  }
  
- /*
-  * The usbdevfs name is now deprecated (as of 2.4.19).
-  * It will be removed when the 2.7.x development cycle is started.
-  * You have been warned :)
-  */
  static DECLARE_FSTYPE(usbdevice_fs_type, "usbdevfs", usbdevfs_read_super, FS_SINGLE);
- static DECLARE_FSTYPE(usbfs_type, "usbfs", usbdevfs_read_super, FS_SINGLE);
  
  /* --------------------------------------------------------------------- */
  
--- 654,660 ----
***************
*** 759,769 ****
  		usb_deregister(&usbdevfs_driver);
  		return ret;
  	}
- 	if ((ret = register_filesystem(&usbfs_type))) {
- 		usb_deregister(&usbdevfs_driver);
- 		unregister_filesystem(&usbdevice_fs_type);
- 		return ret;
- 	}
  #ifdef CONFIG_PROC_FS		
  	/* create mount point for usbdevfs */
  	usbdir = proc_mkdir("usb", proc_bus);
--- 751,756 ----
***************
*** 775,781 ****
  {
  	usb_deregister(&usbdevfs_driver);
  	unregister_filesystem(&usbdevice_fs_type);
- 	unregister_filesystem(&usbfs_type);
  #ifdef CONFIG_PROC_FS	
          if (usbdir)
                  remove_proc_entry("usb", proc_bus);
--- 762,767 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/kaweth.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/kaweth.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/kaweth.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/kaweth.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 5,22 ****
   *     (c) 2000 Interlan Communications
   *     (c) 2000 Stephane Alnet
   *     (C) 2001 Brad Hards
-  *     (C) 2002 Oliver Neukum
   *
   *     Original author: The Zapman 
!  *     Inspired by, and much credit goes to Michael Rothwell
   *      for the test equipment, help, and patience
   *     Based off of (and with thanks to) Petko Manolov's pegaus.c driver.
!  *     Also many thanks to Joel Silverman and Ed Surprenant at Kawasaki
   *     for providing the firmware and driver resources.
   *
   *     This program is free software; you can redistribute it and/or
   *     modify it under the terms of the GNU General Public License as
!  *     published by the Free Software Foundation; either version 2, or
   *     (at your option) any later version.
   *
   *     This program is distributed in the hope that it will be useful,
--- 5,21 ----
   *     (c) 2000 Interlan Communications
   *     (c) 2000 Stephane Alnet
   *     (C) 2001 Brad Hards
   *
   *     Original author: The Zapman 
!  *     Inspired by, and much credit goes to Michael Rothwell 
   *      for the test equipment, help, and patience
   *     Based off of (and with thanks to) Petko Manolov's pegaus.c driver.
!  *     Also many thanks to Joel Silverman and Ed Surprenant at Kawasaki 
   *     for providing the firmware and driver resources.
   *
   *     This program is free software; you can redistribute it and/or
   *     modify it under the terms of the GNU General Public License as
!  *     published by the Free Software Foundation; either version 2, or 
   *     (at your option) any later version.
   *
   *     This program is distributed in the hope that it will be useful,
***************
*** 26,32 ****
   *
   *     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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   *
   ****************************************************************/
  
--- 25,31 ----
   *
   *     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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
   *
   ****************************************************************/
  
***************
*** 37,44 ****
   * Fix bugs from previous two steps
   * Snoop other OSs for any tricks we're not doing
   * SMP locking
!  * Reduce arbitrary timeouts
!  * Smart multicast support
   * Temporary MAC change support
   * Tunable SOFs parameter - ioctl()?
   * Ethernet stats collection
--- 36,43 ----
   * Fix bugs from previous two steps
   * Snoop other OSs for any tricks we're not doing
   * SMP locking
!  * Reduce arbitrary timeouts 
!  * Smart multicast support 
   * Temporary MAC change support
   * Tunable SOFs parameter - ioctl()?
   * Ethernet stats collection
***************
*** 55,64 ****
  #include 
  #include 
  #include 
- #include 
- #include 
  #include 
- #include 
  
  #define DEBUG
  
--- 54,60 ----
***************
*** 77,83 ****
  #define KAWETH_MTU			1514
  #define KAWETH_BUF_SIZE			1664
  #define KAWETH_TX_TIMEOUT		(5 * HZ)
- #define KAWETH_SCRATCH_SIZE		32
  #define KAWETH_FIRMWARE_BUF_SIZE	4096
  #define KAWETH_CONTROL_TIMEOUT		(30 * HZ)
  
--- 73,78 ----
***************
*** 103,116 ****
  
  #define KAWETH_SOFS_TO_WAIT			0x05
  
- #define INTBUFFERSIZE				4
  
! #define STATE_OFFSET				0
! #define STATE_MASK				0x40
! #define	STATE_SHIFT				5
! 
! 
! MODULE_AUTHOR("Michael Zappe , Stephane Alnet , Brad Hards  and Oliver Neukum ");
  MODULE_DESCRIPTION("KL5USB101 USB Ethernet driver");
  MODULE_LICENSE("GPL");
  
--- 98,105 ----
  
  #define KAWETH_SOFS_TO_WAIT			0x05
  
  
! MODULE_AUTHOR("Michael Zappe , Stephane Alnet  and Brad Hards ");
  MODULE_DESCRIPTION("KL5USB101 USB Ethernet driver");
  MODULE_LICENSE("GPL");
  
***************
*** 121,148 ****
  	);
  static void kaweth_disconnect(struct usb_device *dev, void *ptr);
  int kaweth_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe,
! 				struct usb_ctrlrequest *cmd, void *data,
! 				int len, int timeout);
  
  /****************************************************************
   *     usb_device_id
   ****************************************************************/
  static struct usb_device_id usb_klsi_table[] = {
! 	{ USB_DEVICE(0x03e8, 0x0008) }, /* AOX Endpoints USB Ethernet */
  	{ USB_DEVICE(0x04bb, 0x0901) }, /* I-O DATA USB-ET/T */
! 	{ USB_DEVICE(0x0506, 0x03e8) }, /* 3Com 3C19250 */
! 	{ USB_DEVICE(0x0557, 0x2002) }, /* ATEN USB Ethernet */
! 	{ USB_DEVICE(0x0557, 0x4000) }, /* D-Link DSB-650C */
  	{ USB_DEVICE(0x0565, 0x0002) }, /* Peracom Enet */
! 	{ USB_DEVICE(0x0565, 0x0003) }, /* Optus@Home UEP1045A */
! 	{ USB_DEVICE(0x0565, 0x0005) }, /* Peracom Enet2 */
  	{ USB_DEVICE(0x05e9, 0x0008) }, /* KLSI KL5KUSB101B */
  	{ USB_DEVICE(0x05e9, 0x0009) }, /* KLSI KL5KUSB101B (Board change) */
! 	{ USB_DEVICE(0x066b, 0x2202) }, /* Linksys USB10T */
! 	{ USB_DEVICE(0x06e1, 0x0008) }, /* ADS USB-10BT */
! 	{ USB_DEVICE(0x06e1, 0x0009) }, /* ADS USB-10BT */
! 	{ USB_DEVICE(0x0707, 0x0100) }, /* SMC 2202USB */
! 	{ USB_DEVICE(0x07aa, 0x0001) }, /* Correga K.K. */
  	{ USB_DEVICE(0x07b8, 0x4000) }, /* D-Link DU-E10 */
  	{ USB_DEVICE(0x0846, 0x1001) }, /* NetGear EA-101 */
  	{ USB_DEVICE(0x0846, 0x1002) }, /* NetGear EA-101 */
--- 110,136 ----
  	);
  static void kaweth_disconnect(struct usb_device *dev, void *ptr);
  int kaweth_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe,
! 				devrequest *cmd, void *data, int len,
! 				int timeout);
  
  /****************************************************************
   *     usb_device_id
   ****************************************************************/
  static struct usb_device_id usb_klsi_table[] = {
! 	{ USB_DEVICE(0x03e8, 0x0008) }, /* AOX Endpoints USB Ethernet */ 
  	{ USB_DEVICE(0x04bb, 0x0901) }, /* I-O DATA USB-ET/T */
! 	{ USB_DEVICE(0x0506, 0x03e8) }, /* 3Com 3C19250 */ 
! 	{ USB_DEVICE(0x0557, 0x2002) }, /* ATEN USB Ethernet */ 
! 	{ USB_DEVICE(0x0557, 0x4000) }, /* D-Link DSB-650C */ 
  	{ USB_DEVICE(0x0565, 0x0002) }, /* Peracom Enet */
! 	{ USB_DEVICE(0x0565, 0x0005) }, /* Peracom Enet2 */ 
  	{ USB_DEVICE(0x05e9, 0x0008) }, /* KLSI KL5KUSB101B */
  	{ USB_DEVICE(0x05e9, 0x0009) }, /* KLSI KL5KUSB101B (Board change) */
! 	{ USB_DEVICE(0x066b, 0x2202) }, /* Linksys USB10T */ 
! 	{ USB_DEVICE(0x06e1, 0x0008) }, /* ADS USB-10BT */ 
! 	{ USB_DEVICE(0x06e1, 0x0009) }, /* ADS USB-10BT */ 
! 	{ USB_DEVICE(0x0707, 0x0100) }, /* SMC 2202USB */ 
! 	{ USB_DEVICE(0x07aa, 0x0001) }, /* Correga K.K. */ 
  	{ USB_DEVICE(0x07b8, 0x4000) }, /* D-Link DU-E10 */
  	{ USB_DEVICE(0x0846, 0x1001) }, /* NetGear EA-101 */
  	{ USB_DEVICE(0x0846, 0x1002) }, /* NetGear EA-101 */
***************
*** 154,163 ****
  	{ USB_DEVICE(0x10bd, 0x1427) }, /* ASANTE USB To Ethernet Adapter */
  	{ USB_DEVICE(0x1342, 0x0204) }, /* Mobility USB-Ethernet Adapter */
  	{ USB_DEVICE(0x13d2, 0x0400) }, /* Shark Pocket Adapter */
! 	{ USB_DEVICE(0x1485, 0x0001) },	/* Silicom U2E */
! 	{ USB_DEVICE(0x1645, 0x0005) }, /* Entrega E45 */
! 	{ USB_DEVICE(0x1645, 0x0008) }, /* Entrega USB Ethernet Adapter */
! 	{ USB_DEVICE(0x1645, 0x8005) }, /* PortGear Ethernet Adapter */
  	{ USB_DEVICE(0x2001, 0x4000) }, /* D-link DSB-650C */
  	{} /* Null terminator */
  };
--- 142,150 ----
  	{ USB_DEVICE(0x10bd, 0x1427) }, /* ASANTE USB To Ethernet Adapter */
  	{ USB_DEVICE(0x1342, 0x0204) }, /* Mobility USB-Ethernet Adapter */
  	{ USB_DEVICE(0x13d2, 0x0400) }, /* Shark Pocket Adapter */
! 	{ USB_DEVICE(0x1645, 0x0005) }, /* Entrega E45 */ 
! 	{ USB_DEVICE(0x1645, 0x0008) }, /* Entrega USB Ethernet Adapter */ 
! 	{ USB_DEVICE(0x1645, 0x8005) }, /* PortGear Ethernet Adapter */ 
  	{ USB_DEVICE(0x2001, 0x4000) }, /* D-link DSB-650C */
  	{} /* Null terminator */
  };
***************
*** 168,177 ****
   *     kaweth_driver
   ****************************************************************/
  static struct usb_driver kaweth_driver = {
! 	.name =		"kaweth",
! 	.probe =	kaweth_probe,
! 	.disconnect =	kaweth_disconnect,
! 	.id_table =     usb_klsi_table,
  };
  
  typedef __u8 eth_addr_t[6];
--- 155,164 ----
   *     kaweth_driver
   ****************************************************************/
  static struct usb_driver kaweth_driver = {
! 	name:		"kaweth",
! 	probe:		kaweth_probe,
! 	disconnect:	kaweth_disconnect,
! 	id_table:       usb_klsi_table,
  };
  
  typedef __u8 eth_addr_t[6];
***************
*** 210,234 ****
  	spinlock_t device_lock;
  
  	__u32 status;
- 	int end;
- 	int removed;
- 	int suspend_lowmem;
- 	int linkstate;
  
  	struct usb_device *dev;
  	struct net_device *net;
! 	wait_queue_head_t term_wait;
  
  	struct urb *rx_urb;
  	struct urb *tx_urb;
- 	struct urb *irq_urb;
  	
! 	struct sk_buff *tx_skb;
! 
! 	__u8 *firmware_buf;
! 	__u8 scratch[KAWETH_SCRATCH_SIZE];
  	__u8 rx_buf[KAWETH_BUF_SIZE];
- 	__u8 intbuffer[INTBUFFERSIZE];
  	__u16 packet_filter_bitmap;
  
  	struct kaweth_ethernet_configuration configuration;
--- 197,213 ----
  	spinlock_t device_lock;
  
  	__u32 status;
  
  	struct usb_device *dev;
  	struct net_device *net;
! 	wait_queue_head_t control_wait;
  
  	struct urb *rx_urb;
  	struct urb *tx_urb;
  	
! 	__u8 firmware_buf[KAWETH_FIRMWARE_BUF_SIZE];
! 	__u8 tx_buf[KAWETH_BUF_SIZE];
  	__u8 rx_buf[KAWETH_BUF_SIZE];
  	__u16 packet_filter_bitmap;
  
  	struct kaweth_ethernet_configuration configuration;
***************
*** 241,256 ****
   *     kaweth_control
   ****************************************************************/
  static int kaweth_control(struct kaweth_device *kaweth,
! 			  unsigned int pipe,
! 			  __u8 request,
! 			  __u8 requesttype,
! 			  __u16 value,
  			  __u16 index,
! 			  void *data,
! 			  __u16 size,
  			  int timeout)
  {
! 	struct usb_ctrlrequest *dr;
  
  	kaweth_dbg("kaweth_control()");
  
--- 220,235 ----
   *     kaweth_control
   ****************************************************************/
  static int kaweth_control(struct kaweth_device *kaweth,
! 			  unsigned int pipe, 
! 			  __u8 request, 
! 			  __u8 requesttype, 
! 			  __u16 value, 
  			  __u16 index,
! 			  void *data, 
! 			  __u16 size, 
  			  int timeout)
  {
! 	devrequest *dr;
  
  	kaweth_dbg("kaweth_control()");
  
***************
*** 259,276 ****
  		return -EBUSY;
  	}
  
! 	dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_ATOMIC);
  
! 	if (!dr) {
  		kaweth_dbg("kmalloc() failed");
  		return -ENOMEM;
  	}
! 
! 	dr->bRequestType= requesttype;
! 	dr->bRequest = request;
! 	dr->wValue = cpu_to_le16p(&value);
! 	dr->wIndex = cpu_to_le16p(&index);
! 	dr->wLength = cpu_to_le16p(&size);
  
  	return kaweth_internal_control_msg(kaweth->dev,
  					pipe,
--- 238,257 ----
  		return -EBUSY;
  	}
  
! 	dr = kmalloc(sizeof(devrequest), 
!                      in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
  
! 	if(!dr)
! 	{
  		kaweth_dbg("kmalloc() failed");
  		return -ENOMEM;
  	}
! 	
! 	dr->requesttype = requesttype;
! 	dr->request = request;
! 	dr->value = cpu_to_le16p(&value);
! 	dr->index = cpu_to_le16p(&index);
! 	dr->length = cpu_to_le16p(&size);
  
  	return kaweth_internal_control_msg(kaweth->dev,
  					pipe,
***************
*** 317,323 ****
  				USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  				urb_size,
  				0,
! 				(void *)&kaweth->scratch,
  				0,
  				KAWETH_CONTROL_TIMEOUT);
  
--- 298,304 ----
  				USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  				urb_size,
  				0,
! 				(void *)&kaweth->firmware_buf,
  				0,
  				KAWETH_CONTROL_TIMEOUT);
  
***************
*** 339,345 ****
  				USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  				sofs_wait,
  				0,
! 				(void *)&kaweth->scratch,
  				0,
  				KAWETH_CONTROL_TIMEOUT);
  
--- 320,326 ----
  				USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  				sofs_wait,
  				0,
! 				(void *)&kaweth->firmware_buf,
  				0,
  				KAWETH_CONTROL_TIMEOUT);
  
***************
*** 362,368 ****
  				USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  				receive_filter,
  				0,
! 				(void *)&kaweth->scratch,
  				0,
  				KAWETH_CONTROL_TIMEOUT);
  
--- 343,349 ----
  				USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  				receive_filter,
  				0,
! 				(void *)&kaweth->firmware_buf,
  				0,
  				KAWETH_CONTROL_TIMEOUT);
  
***************
*** 372,390 ****
  /****************************************************************
   *     kaweth_download_firmware
   ****************************************************************/
! static int kaweth_download_firmware(struct kaweth_device *kaweth,
! 				    __u8 *data,
  				    __u16 data_len,
  				    __u8 interrupt,
  				    __u8 type)
! {
  	if(data_len > KAWETH_FIRMWARE_BUF_SIZE)	{
  		kaweth_err("Firmware too big: %d", data_len);
  		return -ENOSPC;
  	}
! 
  	memcpy(kaweth->firmware_buf, data, data_len);
! 
  	kaweth->firmware_buf[2] = (data_len & 0xFF) - 7;
  	kaweth->firmware_buf[3] = data_len >> 8;
  	kaweth->firmware_buf[4] = type;
--- 353,371 ----
  /****************************************************************
   *     kaweth_download_firmware
   ****************************************************************/
! static int kaweth_download_firmware(struct kaweth_device *kaweth, 
! 				    __u8 *data, 
  				    __u16 data_len,
  				    __u8 interrupt,
  				    __u8 type)
! {	
  	if(data_len > KAWETH_FIRMWARE_BUF_SIZE)	{
  		kaweth_err("Firmware too big: %d", data_len);
  		return -ENOSPC;
  	}
! 	
  	memcpy(kaweth->firmware_buf, data, data_len);
! 	
  	kaweth->firmware_buf[2] = (data_len & 0xFF) - 7;
  	kaweth->firmware_buf[3] = data_len >> 8;
  	kaweth->firmware_buf[4] = type;
***************
*** 393,400 ****
  	kaweth_dbg("High: %i, Low:%i", kaweth->firmware_buf[3],
  		   kaweth->firmware_buf[2]);
  
! 	kaweth_dbg("Downloading firmware at %p to kaweth device at %p",
! 	    data,
  	    kaweth);
  	kaweth_dbg("Firmware length: %d", data_len);
  
--- 374,381 ----
  	kaweth_dbg("High: %i, Low:%i", kaweth->firmware_buf[3],
  		   kaweth->firmware_buf[2]);
  
! 	kaweth_dbg("Downloading firmware at %p to kaweth device at %p", 
! 	    data, 
  	    kaweth);
  	kaweth_dbg("Firmware length: %d", data_len);
  
***************
*** 404,410 ****
  			      USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  			      0,
  			      0,
! 			      (void *)kaweth->firmware_buf,
  			      data_len,
  			      KAWETH_CONTROL_TIMEOUT);
  }
--- 385,391 ----
  			      USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  			      0,
  			      0,
! 			      (void *)&kaweth->firmware_buf,
  			      data_len,
  			      KAWETH_CONTROL_TIMEOUT);
  }
***************
*** 423,429 ****
  	kaweth->firmware_buf[5] = interrupt;
  	kaweth->firmware_buf[6] = 0x00;
  	kaweth->firmware_buf[7] = 0x00;
! 
  	kaweth_dbg("Triggering firmware");
  
  	return kaweth_control(kaweth,
--- 404,410 ----
  	kaweth->firmware_buf[5] = interrupt;
  	kaweth->firmware_buf[6] = 0x00;
  	kaweth->firmware_buf[7] = 0x00;
! 	
  	kaweth_dbg("Triggering firmware");
  
  	return kaweth_control(kaweth,
***************
*** 432,438 ****
  			      USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  			      0,
  			      0,
! 			      (void *)kaweth->firmware_buf,
  			      8,
  			      KAWETH_CONTROL_TIMEOUT);
  }
--- 413,419 ----
  			      USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  			      0,
  			      0,
! 			      (void *)&kaweth->firmware_buf,
  			      8,
  			      KAWETH_CONTROL_TIMEOUT);
  }
***************
*** 447,458 ****
  	kaweth_dbg("kaweth_reset(%p)", kaweth);
  	result = kaweth_control(kaweth,
  				usb_sndctrlpipe(kaweth->dev, 0),
! 				USB_REQ_SET_CONFIGURATION,
! 				0,
  				kaweth->dev->config[0].bConfigurationValue,
! 				0,
! 				NULL,
! 				0,
  				KAWETH_CONTROL_TIMEOUT);
  
  	udelay(10000);
--- 428,439 ----
  	kaweth_dbg("kaweth_reset(%p)", kaweth);
  	result = kaweth_control(kaweth,
  				usb_sndctrlpipe(kaweth->dev, 0),
! 				USB_REQ_SET_CONFIGURATION, 
! 				0, 
  				kaweth->dev->config[0].bConfigurationValue,
! 				0, 
! 				NULL, 
! 				0, 
  				KAWETH_CONTROL_TIMEOUT);
  
  	udelay(10000);
***************
*** 463,501 ****
  }
  
  static void kaweth_usb_receive(struct urb *);
- static void kaweth_resubmit_rx_urb(struct kaweth_device *);
- 
- /****************************************************************
- 	int_callback
- *****************************************************************/
- static void int_callback(struct urb *u)
- {
- 	struct kaweth_device *kaweth = u->context;
- 	int act_state;
- 
- 	/* we abuse the interrupt urb for rebsubmitting under low memory saving a timer */
- 	if (kaweth->suspend_lowmem)
- 		kaweth_resubmit_rx_urb(kaweth);
- 
- 	/* we check the link state to report changes */
- 	if (kaweth->linkstate != (act_state = ( kaweth->intbuffer[STATE_OFFSET] | STATE_MASK) >> STATE_SHIFT)) {
- 		if (!act_state)
- 			netif_carrier_on(kaweth->net);
- 		else
- 			netif_carrier_off(kaweth->net);
- 
- 		kaweth->linkstate = act_state;
- 	}
- 
- }
  
  /****************************************************************
   *     kaweth_resubmit_rx_urb
   ****************************************************************/
! static void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth)
  {
  	int result;
! 	long flags;
  
  	FILL_BULK_URB(kaweth->rx_urb,
  		      kaweth->dev,
--- 444,458 ----
  }
  
  static void kaweth_usb_receive(struct urb *);
  
  /****************************************************************
   *     kaweth_resubmit_rx_urb
   ****************************************************************/
! static inline void kaweth_resubmit_rx_urb(struct kaweth_device *kaweth)
  {
  	int result;
! 
! 	memset(kaweth->rx_urb, 0, sizeof(*kaweth->rx_urb));
  
  	FILL_BULK_URB(kaweth->rx_urb,
  		      kaweth->dev,
***************
*** 505,521 ****
  		      kaweth_usb_receive,
  		      kaweth);
  
! 	spin_lock_irqsave(&kaweth->device_lock, flags);
! 	if (!kaweth->removed) { /* no resubmit if disconnecting */
! 		if((result = usb_submit_urb(kaweth->rx_urb))) {
! 			if (result == -ENOMEM)
! 				kaweth->suspend_lowmem = 1;
! 			kaweth_err("resubmitting rx_urb %d failed", result);
! 		} else {
! 			kaweth->suspend_lowmem = 0;
! 		}
  	}
- 	spin_unlock_irqrestore(&kaweth->device_lock, flags);
  }
  
  static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth);
--- 462,470 ----
  		      kaweth_usb_receive,
  		      kaweth);
  
! 	if((result = usb_submit_urb(kaweth->rx_urb))) {
! 		kaweth_err("resubmitting rx_urb %d failed", result);
  	}
  }
  
  static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth);
***************
*** 527,556 ****
  {
  	struct kaweth_device *kaweth = urb->context;
  	struct net_device *net = kaweth->net;
! 
  	int count = urb->actual_length;
  	int count2 = urb->transfer_buffer_length;
! 
  	__u16 pkt_len = le16_to_cpup((u16 *)kaweth->rx_buf);
  
  	struct sk_buff *skb;
  
! 	if(urb->status == -ECONNRESET || urb->status == -ECONNABORTED)
! 	/* we are killed - set a flag and wake the disconnect handler */
! 	{
! 		kaweth->end = 1;
! 		wake_up(&kaweth->term_wait);
  		return;
  	}
! 
! 	if (kaweth->status & KAWETH_STATUS_CLOSING)
! 		return;
! 
! 	if(urb->status && urb->status != -EREMOTEIO && count != 1) {
  		kaweth_err("%s RX status: %d count: %d packet_len: %d",
!                            net->name,
  			   urb->status,
! 			   count,
  			   (int)pkt_len);
  		kaweth_resubmit_rx_urb(kaweth);
                  return;
--- 476,498 ----
  {
  	struct kaweth_device *kaweth = urb->context;
  	struct net_device *net = kaweth->net;
! 	
  	int count = urb->actual_length;
  	int count2 = urb->transfer_buffer_length;
! 			
  	__u16 pkt_len = le16_to_cpup((u16 *)kaweth->rx_buf);
  
  	struct sk_buff *skb;
  
! 	if(kaweth->status & KAWETH_STATUS_CLOSING) {
  		return;
  	}
! 	
! 	if(urb->status && urb->status != -EREMOTEIO && count != 1) { 
  		kaweth_err("%s RX status: %d count: %d packet_len: %d",
!                            net->name, 
  			   urb->status,
! 			   count, 
  			   (int)pkt_len);
  		kaweth_resubmit_rx_urb(kaweth);
                  return;
***************
*** 564,587 ****
  		        kaweth_resubmit_rx_urb(kaweth);
                          return;
                  }
! 
  		if(!(skb = dev_alloc_skb(pkt_len+2))) {
  		        kaweth_resubmit_rx_urb(kaweth);
                          return;
  		}
  
- 		skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
- 
  		skb->dev = net;
  
  		eth_copy_and_sum(skb, kaweth->rx_buf + 2, pkt_len, 0);
! 
  		skb_put(skb, pkt_len);
  
  		skb->protocol = eth_type_trans(skb, net);
! 
  		netif_rx(skb);
! 
  		kaweth->stats.rx_packets++;
  		kaweth->stats.rx_bytes += pkt_len;
  	}
--- 506,527 ----
  		        kaweth_resubmit_rx_urb(kaweth);
                          return;
                  }
! 		
  		if(!(skb = dev_alloc_skb(pkt_len+2))) {
  		        kaweth_resubmit_rx_urb(kaweth);
                          return;
  		}
  
  		skb->dev = net;
  
  		eth_copy_and_sum(skb, kaweth->rx_buf + 2, pkt_len, 0);
! 		
  		skb_put(skb, pkt_len);
  
  		skb->protocol = eth_type_trans(skb, net);
! 		
  		netif_rx(skb);
! 		
  		kaweth->stats.rx_packets++;
  		kaweth->stats.rx_bytes += pkt_len;
  	}
***************
*** 600,623 ****
  
  	kaweth_dbg("Opening network device.");
  
- 	MOD_INC_USE_COUNT;
- 
  	kaweth_resubmit_rx_urb(kaweth);
  
- 	FILL_INT_URB(
- 		kaweth->irq_urb,
- 		kaweth->dev,
- 		usb_rcvintpipe(kaweth->dev, 3),
- 		kaweth->intbuffer,
- 		INTBUFFERSIZE,
- 		int_callback,
- 		kaweth,
- 		HZ/4);
- 
- 	usb_submit_urb(kaweth->irq_urb);
- 
  	netif_start_queue(net);
  
  	kaweth_async_set_rx_mode(kaweth);
  	return 0;
  }
--- 540,551 ----
  
  	kaweth_dbg("Opening network device.");
  
  	kaweth_resubmit_rx_urb(kaweth);
  
  	netif_start_queue(net);
  
+ 	MOD_INC_USE_COUNT;
+ 
  	kaweth_async_set_rx_mode(kaweth);
  	return 0;
  }
***************
*** 630,641 ****
  	struct kaweth_device *kaweth = net->priv;
  
  	netif_stop_queue(net);
! 	
! 	spin_lock_irq(&kaweth->device_lock);
  	kaweth->status |= KAWETH_STATUS_CLOSING;
- 	spin_unlock_irq(&kaweth->device_lock);
  
- 	usb_unlink_urb(kaweth->irq_urb);
  	usb_unlink_urb(kaweth->rx_urb);
  
  	kaweth->status &= ~KAWETH_STATUS_CLOSING;
--- 558,566 ----
  	struct kaweth_device *kaweth = net->priv;
  
  	netif_stop_queue(net);
! 
  	kaweth->status |= KAWETH_STATUS_CLOSING;
  
  	usb_unlink_urb(kaweth->rx_urb);
  
  	kaweth->status &= ~KAWETH_STATUS_CLOSING;
***************
*** 647,681 ****
  	return 0;
  }
  
- static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
- {
- 	u32 ethcmd;
- 	
- 	if (copy_from_user(ðcmd, useraddr, sizeof(ethcmd)))
- 		return -EFAULT;
- 	
- 	switch (ethcmd) {
- 	case ETHTOOL_GDRVINFO: {
- 		struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
- 		strncpy(info.driver, "kaweth", sizeof(info.driver)-1);
- 		if (copy_to_user(useraddr, &info, sizeof(info)))
- 			return -EFAULT;
- 		return 0;
- 	}
- 	}
- 	
- 	return -EOPNOTSUPP;
- }
- 
  /****************************************************************
   *     kaweth_ioctl
   ****************************************************************/
  static int kaweth_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
  {
- 	switch (cmd) {
- 	case SIOCETHTOOL:
- 		return netdev_ethtool_ioctl(net, (void *) rq->ifr_data);
- 	}
  	return -EOPNOTSUPP;
  }
  
--- 572,582 ----
***************
*** 685,697 ****
  static void kaweth_usb_transmit_complete(struct urb *urb)
  {
  	struct kaweth_device *kaweth = urb->context;
- 	struct sk_buff *skb = kaweth->tx_skb;
  
! 	if (urb->status != 0)
  		kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status);
  
  	netif_wake_queue(kaweth->net);
! 	dev_kfree_skb(skb);
  }
  
  /****************************************************************
--- 586,600 ----
  static void kaweth_usb_transmit_complete(struct urb *urb)
  {
  	struct kaweth_device *kaweth = urb->context;
  
! 	spin_lock(&kaweth->device_lock);
! 
! 	if (urb->status)
  		kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status);
  
  	netif_wake_queue(kaweth->net);
! 
! 	spin_unlock(&kaweth->device_lock);
  }
  
  /****************************************************************
***************
*** 700,765 ****
  static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
  {
  	struct kaweth_device *kaweth = net->priv;
! 	char *private_header;
! 
  	int res;
  
  	spin_lock(&kaweth->device_lock);
  
- 	if (kaweth->removed) {
- 	/* our device is undergoing disconnection - we bail out */
- 		spin_unlock(&kaweth->device_lock);
- 		dev_kfree_skb(skb);
- 		return 0;
- 	}
- 
  	kaweth_async_set_rx_mode(kaweth);
  	netif_stop_queue(net);
  
! 	/* We now decide whether we can put our special header into the sk_buff */
! 	if (skb_cloned(skb) || skb_headroom(skb) < 2) {
! 		/* no such luck - we make our own */
! 		struct sk_buff *copied_skb;
! 		copied_skb = skb_copy_expand(skb, 2, 0, GFP_ATOMIC);
! 		dev_kfree_skb_any(skb);
! 		skb = copied_skb;
! 		if (!copied_skb) {
! 			kaweth->stats.tx_errors++;
! 			netif_start_queue(net);
! 			spin_unlock(&kaweth->device_lock);
! 			return 0;
! 		}
! 	}
  
! 	private_header = __skb_push(skb, 2);
! 	*private_header = cpu_to_le16(skb->len);
! 	kaweth->tx_skb = skb;
  
  	FILL_BULK_URB(kaweth->tx_urb,
  		      kaweth->dev,
  		      usb_sndbulkpipe(kaweth->dev, 2),
! 		      private_header,
! 		      skb->len,
  		      kaweth_usb_transmit_complete,
  		      kaweth);
- 	kaweth->end = 0;
- 	kaweth->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
  
  	if((res = usb_submit_urb(kaweth->tx_urb)))
  	{
  		kaweth_warn("kaweth failed tx_urb %d", res);
  		kaweth->stats.tx_errors++;
! 
  		netif_start_queue(net);
! 		dev_kfree_skb(skb);
! 	}
! 	else
  	{
  		kaweth->stats.tx_packets++;
  		kaweth->stats.tx_bytes += skb->len;
  		net->trans_start = jiffies;
  	}
  
  	spin_unlock(&kaweth->device_lock);
  
  	return 0;
--- 603,647 ----
  static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
  {
  	struct kaweth_device *kaweth = net->priv;
! 	int count = skb->len;
! 	
  	int res;
  
  	spin_lock(&kaweth->device_lock);
  
  	kaweth_async_set_rx_mode(kaweth);
  	netif_stop_queue(net);
  
! 	*((__u16 *)kaweth->tx_buf) = cpu_to_le16(skb->len);
! 
! 	memcpy(kaweth->tx_buf + 2, skb->data, skb->len);
  
! 	memset(kaweth->tx_urb, 0, sizeof(*kaweth->tx_urb));
  
  	FILL_BULK_URB(kaweth->tx_urb,
  		      kaweth->dev,
  		      usb_sndbulkpipe(kaweth->dev, 2),
! 		      kaweth->tx_buf,
! 		      count + 2,
  		      kaweth_usb_transmit_complete,
  		      kaweth);
  
  	if((res = usb_submit_urb(kaweth->tx_urb)))
  	{
  		kaweth_warn("kaweth failed tx_urb %d", res);
  		kaweth->stats.tx_errors++;
! 		
  		netif_start_queue(net);
! 	} 
! 	else 
  	{
  		kaweth->stats.tx_packets++;
  		kaweth->stats.tx_bytes += skb->len;
  		net->trans_start = jiffies;
  	}
  
+ 	dev_kfree_skb(skb);
+ 
  	spin_unlock(&kaweth->device_lock);
  
  	return 0;
***************
*** 771,777 ****
  static void kaweth_set_rx_mode(struct net_device *net)
  {
  	struct kaweth_device *kaweth = net->priv;
! 
  	__u16 packet_filter_bitmap = KAWETH_PACKET_FILTER_DIRECTED |
                                       KAWETH_PACKET_FILTER_BROADCAST |
  		                     KAWETH_PACKET_FILTER_MULTICAST;
--- 653,659 ----
  static void kaweth_set_rx_mode(struct net_device *net)
  {
  	struct kaweth_device *kaweth = net->priv;
! 	
  	__u16 packet_filter_bitmap = KAWETH_PACKET_FILTER_DIRECTED |
                                       KAWETH_PACKET_FILTER_BROADCAST |
  		                     KAWETH_PACKET_FILTER_MULTICAST;
***************
*** 782,788 ****
  
  	if (net->flags & IFF_PROMISC) {
  		packet_filter_bitmap |= KAWETH_PACKET_FILTER_PROMISCUOUS;
! 	}
  	else if ((net->mc_count) || (net->flags & IFF_ALLMULTI)) {
  		packet_filter_bitmap |= KAWETH_PACKET_FILTER_ALL_MULTICAST;
  	}
--- 664,670 ----
  
  	if (net->flags & IFF_PROMISC) {
  		packet_filter_bitmap |= KAWETH_PACKET_FILTER_PROMISCUOUS;
! 	} 
  	else if ((net->mc_count) || (net->flags & IFF_ALLMULTI)) {
  		packet_filter_bitmap |= KAWETH_PACKET_FILTER_ALL_MULTICAST;
  	}
***************
*** 797,803 ****
  static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth)
  {
  	__u16 packet_filter_bitmap = kaweth->packet_filter_bitmap;
! 	kaweth->packet_filter_bitmap = 0;
  	if(packet_filter_bitmap == 0) return;
  
  	{
--- 679,685 ----
  static void kaweth_async_set_rx_mode(struct kaweth_device *kaweth)
  {
  	__u16 packet_filter_bitmap = kaweth->packet_filter_bitmap;
! 	kaweth->packet_filter_bitmap = 0;	
  	if(packet_filter_bitmap == 0) return;
  
  	{
***************
*** 808,814 ****
  				USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  				packet_filter_bitmap,
  				0,
! 				(void *)&kaweth->scratch,
  				0,
  				KAWETH_CONTROL_TIMEOUT);
  
--- 690,696 ----
  				USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE,
  				packet_filter_bitmap,
  				0,
! 				(void *)&kaweth->firmware_buf,
  				0,
  				KAWETH_CONTROL_TIMEOUT);
  
***************
*** 857,870 ****
  	int result = 0;
  
  	kaweth_dbg("Kawasaki Device Probe (Device number:%d): 0x%4.4x:0x%4.4x:0x%4.4x",
! 		 dev->devnum,
! 		 (int)dev->descriptor.idVendor,
  		 (int)dev->descriptor.idProduct,
  		 (int)dev->descriptor.bcdDevice);
  
  	kaweth_dbg("Device at %p", dev);
  
! 	kaweth_dbg("Descriptor length: %x type: %x",
  		 (int)dev->descriptor.bLength,
  		 (int)dev->descriptor.bDescriptorType);
  
--- 739,752 ----
  	int result = 0;
  
  	kaweth_dbg("Kawasaki Device Probe (Device number:%d): 0x%4.4x:0x%4.4x:0x%4.4x",
! 		 dev->devnum, 
! 		 (int)dev->descriptor.idVendor, 
  		 (int)dev->descriptor.idProduct,
  		 (int)dev->descriptor.bcdDevice);
  
  	kaweth_dbg("Device at %p", dev);
  
! 	kaweth_dbg("Descriptor length: %x type: %x", 
  		 (int)dev->descriptor.bLength,
  		 (int)dev->descriptor.bDescriptorType);
  
***************
*** 876,884 ****
  	memset(kaweth, 0, sizeof(struct kaweth_device));
  
  	kaweth->dev = dev;
! 	spin_lock_init(&kaweth->device_lock);
! 	init_waitqueue_head(&kaweth->term_wait);
! 
  	kaweth_dbg("Resetting.");
  
  	kaweth_reset(kaweth);
--- 758,767 ----
  	memset(kaweth, 0, sizeof(struct kaweth_device));
  
  	kaweth->dev = dev;
! 	kaweth->status = 0;
! 	kaweth->net = NULL;
! 	kaweth->device_lock = SPIN_LOCK_UNLOCKED;
! 		
  	kaweth_dbg("Resetting.");
  
  	kaweth_reset(kaweth);
***************
*** 893,917 ****
  	} else {
  		/* Download the firmware */
  		kaweth_info("Downloading firmware...");
! 		kaweth->firmware_buf = (__u8 *)__get_free_page(GFP_KERNEL);
! 		if ((result = kaweth_download_firmware(kaweth,
! 						      kaweth_new_code,
! 						      len_kaweth_new_code,
! 						      100,
  						      2)) < 0) {
  			kaweth_err("Error downloading firmware (%d)", result);
- 			free_page((unsigned long)kaweth->firmware_buf);
  			kfree(kaweth);
  			return NULL;
  		}
  
! 		if ((result = kaweth_download_firmware(kaweth,
! 						      kaweth_new_code_fix,
! 						      len_kaweth_new_code_fix,
! 						      100,
  						      3)) < 0) {
  			kaweth_err("Error downloading firmware fix (%d)", result);
- 			free_page((unsigned long)kaweth->firmware_buf);
  			kfree(kaweth);
  			return NULL;
  		}
--- 776,797 ----
  	} else {
  		/* Download the firmware */
  		kaweth_info("Downloading firmware...");
! 		if ((result = kaweth_download_firmware(kaweth, 
! 						      kaweth_new_code, 
! 						      len_kaweth_new_code, 
! 						      100, 
  						      2)) < 0) {
  			kaweth_err("Error downloading firmware (%d)", result);
  			kfree(kaweth);
  			return NULL;
  		}
  
! 		if ((result = kaweth_download_firmware(kaweth, 
! 						      kaweth_new_code_fix, 
! 						      len_kaweth_new_code_fix, 
! 						      100, 
  						      3)) < 0) {
  			kaweth_err("Error downloading firmware fix (%d)", result);
  			kfree(kaweth);
  			return NULL;
  		}
***************
*** 922,928 ****
  						      126,
  						      2)) < 0) {
  			kaweth_err("Error downloading trigger code (%d)", result);
- 			free_page((unsigned long)kaweth->firmware_buf);
  			kfree(kaweth);
  			return NULL;
  		}
--- 802,807 ----
***************
*** 933,939 ****
  						      126,
  						      3)) < 0) {
  			kaweth_err("Error downloading trigger code fix (%d)", result);
- 			free_page((unsigned long)kaweth->firmware_buf);
  			kfree(kaweth);
  			return NULL;
  		}
--- 812,817 ----
***************
*** 941,955 ****
  
  		if ((result = kaweth_trigger_firmware(kaweth, 126)) < 0) {
  			kaweth_err("Error triggering firmware (%d)", result);
- 			free_page((unsigned long)kaweth->firmware_buf);
  			kfree(kaweth);
  			return NULL;
  		}
  
  		/* Device will now disappear for a moment...  */
  		kaweth_info("Firmware loaded.  I'll be back...");
- 		free_page((unsigned long)kaweth->firmware_buf);
- 		kfree(kaweth);
  		return NULL;
  	}
  
--- 819,830 ----
***************
*** 973,979 ****
  		 (int)kaweth->configuration.hw_addr[5]);
  
  	if(!memcmp(&kaweth->configuration.hw_addr,
!                    &bcast_addr,
  		   sizeof(bcast_addr))) {
  		kaweth_err("Firmware not functioning properly, no net device created");
  		kfree(kaweth);
--- 848,854 ----
  		 (int)kaweth->configuration.hw_addr[5]);
  
  	if(!memcmp(&kaweth->configuration.hw_addr,
!                    &bcast_addr, 
  		   sizeof(bcast_addr))) {
  		kaweth_err("Firmware not functioning properly, no net device created");
  		kfree(kaweth);
***************
*** 984,996 ****
  		kaweth_dbg("Error setting URB size");
  		return kaweth;
  	}
! 
  	if(kaweth_set_sofs_wait(kaweth, KAWETH_SOFS_TO_WAIT) < 0) {
  		kaweth_err("Error setting SOFS wait");
  		return kaweth;
  	}
  
! 	result = kaweth_set_receive_filter(kaweth,
                                             KAWETH_PACKET_FILTER_DIRECTED |
                                             KAWETH_PACKET_FILTER_BROADCAST |
                                             KAWETH_PACKET_FILTER_MULTICAST);
--- 859,871 ----
  		kaweth_dbg("Error setting URB size");
  		return kaweth;
  	}
! 	
  	if(kaweth_set_sofs_wait(kaweth, KAWETH_SOFS_TO_WAIT) < 0) {
  		kaweth_err("Error setting SOFS wait");
  		return kaweth;
  	}
  
! 	result = kaweth_set_receive_filter(kaweth, 
                                             KAWETH_PACKET_FILTER_DIRECTED |
                                             KAWETH_PACKET_FILTER_BROADCAST |
                                             KAWETH_PACKET_FILTER_MULTICAST);
***************
*** 999,1016 ****
  		kaweth_err("Error setting receive filter");
  		return kaweth;
  	}
! 
  	kaweth_dbg("Initializing net device.");
  
  	kaweth->tx_urb = usb_alloc_urb(0);
- 	if (!kaweth->tx_urb)
- 		goto err_no_urb;
  	kaweth->rx_urb = usb_alloc_urb(0);
- 	if (!kaweth->rx_urb)
- 		goto err_only_tx;
- 	kaweth->irq_urb = usb_alloc_urb(0);
- 	if (!kaweth->irq_urb)
- 		goto err_tx_and_rx;
  
  	kaweth->net = init_etherdev(0, 0);
  	if (!kaweth->net) {
--- 874,884 ----
  		kaweth_err("Error setting receive filter");
  		return kaweth;
  	}
! 	
  	kaweth_dbg("Initializing net device.");
  
  	kaweth->tx_urb = usb_alloc_urb(0);
  	kaweth->rx_urb = usb_alloc_urb(0);
  
  	kaweth->net = init_etherdev(0, 0);
  	if (!kaweth->net) {
***************
*** 1019,1035 ****
  	}
  
  	memcpy(kaweth->net->broadcast, &bcast_addr, sizeof(bcast_addr));
! 	memcpy(kaweth->net->dev_addr,
                 &kaweth->configuration.hw_addr,
                 sizeof(kaweth->configuration.hw_addr));
! 
  	kaweth->net->priv = kaweth;
  	kaweth->net->open = kaweth_open;
  	kaweth->net->stop = kaweth_close;
  
  	kaweth->net->watchdog_timeo = KAWETH_TX_TIMEOUT;
  	kaweth->net->tx_timeout = kaweth_tx_timeout;
! 
  	kaweth->net->do_ioctl = kaweth_ioctl;
  	kaweth->net->hard_start_xmit = kaweth_start_xmit;
  	kaweth->net->set_multicast_list = kaweth_set_rx_mode;
--- 887,903 ----
  	}
  
  	memcpy(kaweth->net->broadcast, &bcast_addr, sizeof(bcast_addr));
! 	memcpy(kaweth->net->dev_addr, 
                 &kaweth->configuration.hw_addr,
                 sizeof(kaweth->configuration.hw_addr));
! 	 
  	kaweth->net->priv = kaweth;
  	kaweth->net->open = kaweth_open;
  	kaweth->net->stop = kaweth_close;
  
  	kaweth->net->watchdog_timeo = KAWETH_TX_TIMEOUT;
  	kaweth->net->tx_timeout = kaweth_tx_timeout;
! 	
  	kaweth->net->do_ioctl = kaweth_ioctl;
  	kaweth->net->hard_start_xmit = kaweth_start_xmit;
  	kaweth->net->set_multicast_list = kaweth_set_rx_mode;
***************
*** 1039,1056 ****
  	memset(&kaweth->stats, 0, sizeof(kaweth->stats));
  
  	kaweth_info("kaweth interface created at %s", kaweth->net->name);
! 
  	kaweth_dbg("Kaweth probe returning.");
  
  	return kaweth;
- 
- err_tx_and_rx:
- 	usb_free_urb(kaweth->rx_urb);
- err_only_tx:
- 	usb_free_urb(kaweth->tx_urb);
- err_no_urb:
- 	kfree(kaweth);
- 	return NULL;
  }
  
  /****************************************************************
--- 907,916 ----
  	memset(&kaweth->stats, 0, sizeof(kaweth->stats));
  
  	kaweth_info("kaweth interface created at %s", kaweth->net->name);
! 								
  	kaweth_dbg("Kaweth probe returning.");
  
  	return kaweth;
  }
  
  /****************************************************************
***************
*** 1067,1085 ****
  		return;
  	}
  
- 	kaweth->removed = 1;
- 	usb_unlink_urb(kaweth->irq_urb);
- 	usb_unlink_urb(kaweth->rx_urb);
- 
- 	/* we need to wait for the urb to be cancelled, if it is active */
- 	spin_lock_irq(&kaweth->device_lock);
- 	if (usb_unlink_urb(kaweth->tx_urb) == -EINPROGRESS) {
- 		spin_unlock_irq(&kaweth->device_lock);
- 		wait_event(kaweth->term_wait, kaweth->end);
- 	} else {
- 		spin_unlock_irq(&kaweth->device_lock);
- 	}
- 
  	if(kaweth->net) {
  		if(kaweth->net->flags & IFF_UP) {
  			kaweth_dbg("Closing net device");
--- 927,932 ----
***************
*** 1097,1115 ****
  }
  
  
- // FIXME this completion stuff is a modified clone of
- // an OLD version of some stuff in usb.c ...
- struct kw_api_data {
- 	wait_queue_head_t wqh;
- 	int done;
- };
- 
  /*-------------------------------------------------------------------*
   * completion handler for compatibility wrappers (sync control/bulk) *
   *-------------------------------------------------------------------*/
! static void usb_api_blocking_completion(struct urb *urb)
  {
!         struct kw_api_data *awd = (struct kw_api_data *)urb->context;
  
  	awd->done=1;
  	wake_up(&awd->wqh);
--- 944,955 ----
  }
  
  
  /*-------------------------------------------------------------------*
   * completion handler for compatibility wrappers (sync control/bulk) *
   *-------------------------------------------------------------------*/
! static void usb_api_blocking_completion(urb_t *urb)
  {
!         struct usb_api_data *awd = (struct usb_api_data *)urb->context;
  
  	awd->done=1;
  	wake_up(&awd->wqh);
***************
*** 1120,1134 ****
   *-------------------------------------------------------------------*/
  
  // Starts urb and waits for completion or timeout
! static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
  {
          DECLARE_WAITQUEUE(wait, current);
! 	struct kw_api_data awd;
          int status;
  
          init_waitqueue_head(&awd.wqh);
          awd.done = 0;
! 
          set_current_state(TASK_INTERRUPTIBLE);
          add_wait_queue(&awd.wqh, &wait);
          urb->context = &awd;
--- 960,974 ----
   *-------------------------------------------------------------------*/
  
  // Starts urb and waits for completion or timeout
! static int usb_start_wait_urb(urb_t *urb, int timeout, int* actual_length)
  {
          DECLARE_WAITQUEUE(wait, current);
! 	struct usb_api_data awd;
          int status;
  
          init_waitqueue_head(&awd.wqh);
          awd.done = 0;
!         
          set_current_state(TASK_INTERRUPTIBLE);
          add_wait_queue(&awd.wqh, &wait);
          urb->context = &awd;
***************
*** 1168,1177 ****
  /*-------------------------------------------------------------------*/
  // returns status (negative) or length (positive)
  int kaweth_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe,
!                             struct usb_ctrlrequest *cmd, void *data, int len,
! 			    int timeout)
  {
!         struct urb *urb;
          int retv;
          int length;
  
--- 1008,1016 ----
  /*-------------------------------------------------------------------*/
  // returns status (negative) or length (positive)
  int kaweth_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe,
!                             devrequest *cmd,  void *data, int len, int timeout)
  {
!         urb_t *urb;
          int retv;
          int length;
  
***************
*** 1219,1222 ****
  
  
  
- 
--- 1058,1060 ----
LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb$B$@$1$KH/8+(B: m8xxhci.c
LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb$B$@$1$KH/8+(B: m8xxhci.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/mdc800.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/mdc800.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/mdc800.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/mdc800.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 30,43 ****
   *
   * The driver supports only one camera.
   * 
-  * Fix: mdc800 used sleep_on and slept with io_lock held.
-  * Converted sleep_on to waitqueues with schedule_timeout and made io_lock
-  * a semaphore from a spinlock.
-  * by Oliver Neukum <520047054719-0001@t-online.de>
-  * (02/12/2001)
-  * 
-  * Identify version on module load.
   * (08/04/2001) gb
   *
   * version 0.7.5
   * Fixed potential SMP races with Spinlocks.
--- 30,37 ----
   *
   * The driver supports only one camera.
   * 
   * (08/04/2001) gb
+  * Identify version on module load.
   *
   * version 0.7.5
   * Fixed potential SMP races with Spinlocks.
***************
*** 140,164 ****
  
  	unsigned int		endpoint [4];
  
! 	struct urb *		irq_urb;
  	wait_queue_head_t	irq_wait;
- 	int                     irq_woken;
  	char*			irq_urb_buffer;
  
  	int			camera_busy;          // is camera busy ?
  	int 			camera_request_ready; // Status to synchronize with irq
  	char 			camera_response [8];  // last Bytes send after busy
  
! 	struct urb *   		write_urb;
  	char*			write_urb_buffer;
  	wait_queue_head_t	write_wait;
- 	int                     written;
  
  
! 	struct urb *		download_urb;
  	char*			download_urb_buffer;
  	wait_queue_head_t	download_wait;
- 	int                     downloaded;
  	int			download_left;		// Bytes left to download ?
  
  
--- 134,155 ----
  
  	unsigned int		endpoint [4];
  
! 	purb_t			irq_urb;
  	wait_queue_head_t	irq_wait;
  	char*			irq_urb_buffer;
  
  	int			camera_busy;          // is camera busy ?
  	int 			camera_request_ready; // Status to synchronize with irq
  	char 			camera_response [8];  // last Bytes send after busy
  
! 	purb_t   		write_urb;
  	char*			write_urb_buffer;
  	wait_queue_head_t	write_wait;
  
  
! 	purb_t	   		download_urb;
  	char*			download_urb_buffer;
  	wait_queue_head_t	download_wait;
  	int			download_left;		// Bytes left to download ?
  
  
***************
*** 168,174 ****
  	int			out_count;	// Bytes in the buffer
  
  	int			open;		// Camera device open ?
! 	struct semaphore	io_lock;	// IO -lock
  
  	char 			in [8];		// Command Input Buffer
  	int  			in_count;
--- 159,165 ----
  	int			out_count;	// Bytes in the buffer
  
  	int			open;		// Camera device open ?
! 	spinlock_t		io_lock;	// IO -lock	
  
  	char 			in [8];		// Command Input Buffer
  	int  			in_count;
***************
*** 293,299 ****
  	if (wake_up)
  	{
  		mdc800->camera_request_ready=0;
- 		mdc800->irq_woken=1;
  		wake_up_interruptible (&mdc800->irq_wait);
  	}
  }
--- 284,289 ----
***************
*** 310,328 ****
   */
  static int mdc800_usb_waitForIRQ (int mode, int msec)
  {
-         DECLARE_WAITQUEUE(wait, current);
- 
  	mdc800->camera_request_ready=1+mode;
  
! 	add_wait_queue(&mdc800->irq_wait, &wait);
! 	set_current_state(TASK_INTERRUPTIBLE);
! 	if (!mdc800->irq_woken)
! 	{
! 	        schedule_timeout (msec*HZ/1000);
! 	}
!         remove_wait_queue(&mdc800->irq_wait, &wait);
! 	set_current_state(TASK_RUNNING);
! 	mdc800->irq_woken = 0;
  
  	if (mdc800->camera_request_ready>0)
  	{
--- 300,308 ----
   */
  static int mdc800_usb_waitForIRQ (int mode, int msec)
  {
  	mdc800->camera_request_ready=1+mode;
  
! 	interruptible_sleep_on_timeout (&mdc800->irq_wait, msec*HZ/1000);
  
  	if (mdc800->camera_request_ready>0)
  	{
***************
*** 357,363 ****
  	{	
  		mdc800->state=READY;
  	}
- 	mdc800->written = 1;
  	wake_up_interruptible (&mdc800->write_wait);
  }
  
--- 337,342 ----
***************
*** 385,391 ****
  	{
  		err ("request bytes fails (status:%i)", urb->status);
  	}
- 	mdc800->downloaded = 1;
  	wake_up_interruptible (&mdc800->download_wait);
  }
  
--- 364,369 ----
***************
*** 467,473 ****
  
  	info ("Found Mustek MDC800 on USB.");
  
! 	down (&mdc800->io_lock);
  
  	mdc800->dev=dev;
  	mdc800->open=0;
--- 445,451 ----
  
  	info ("Found Mustek MDC800 on USB.");
  
! 	spin_lock (&mdc800->io_lock);
  
  	mdc800->dev=dev;
  	mdc800->open=0;
***************
*** 506,512 ****
  
  	mdc800->state=READY;
  
! 	up (&mdc800->io_lock);
  	
  	return mdc800;
  }
--- 484,490 ----
  
  	mdc800->state=READY;
  
! 	spin_unlock (&mdc800->io_lock);
  	
  	return mdc800;
  }
***************
*** 580,586 ****
  	int retval=0;
  	int errn=0;
  
! 	down (&mdc800->io_lock);
  	
  	if (mdc800->state == NOT_CONNECTED)
  	{
--- 558,564 ----
  	int retval=0;
  	int errn=0;
  
! 	spin_lock (&mdc800->io_lock);
  	
  	if (mdc800->state == NOT_CONNECTED)
  	{
***************
*** 616,622 ****
  	dbg ("Mustek MDC800 device opened.");
  
  error_out:
! 	up (&mdc800->io_lock);
  	return errn;
  }
  
--- 594,600 ----
  	dbg ("Mustek MDC800 device opened.");
  
  error_out:
! 	spin_unlock (&mdc800->io_lock);
  	return errn;
  }
  
***************
*** 629,637 ****
  	int retval=0;
  	dbg ("Mustek MDC800 device closed.");
  
! 	down (&mdc800->io_lock);
  	if (mdc800->open && (mdc800->state != NOT_CONNECTED))
  	{
  		usb_unlink_urb (mdc800->irq_urb);
  		usb_unlink_urb (mdc800->write_urb);
  		usb_unlink_urb (mdc800->download_urb);
--- 607,616 ----
  	int retval=0;
  	dbg ("Mustek MDC800 device closed.");
  
! 	spin_lock (&mdc800->io_lock);
  	if (mdc800->open && (mdc800->state != NOT_CONNECTED))
  	{
+ 		spin_unlock(&mdc800->io_lock);
  		usb_unlink_urb (mdc800->irq_urb);
  		usb_unlink_urb (mdc800->write_urb);
  		usb_unlink_urb (mdc800->download_urb);
***************
*** 639,648 ****
  	}
  	else
  	{
  		retval=-EIO;
  	}
  
!         up(&mdc800->io_lock);
  	return retval;
  }
  
--- 618,628 ----
  	}
  	else
  	{
+ 		spin_unlock (&mdc800->io_lock);
  		retval=-EIO;
  	}
  
! 
  	return retval;
  }
  
***************
*** 652,676 ****
   */
  static ssize_t mdc800_device_read (struct file *file, char *buf, size_t len, loff_t *pos)
  {
! 	size_t left=len, sts=len; /* single transfer size */
  	char* ptr=buf;
- 	DECLARE_WAITQUEUE(wait, current);
  
! 	down (&mdc800->io_lock);
  	if (mdc800->state == NOT_CONNECTED)
  	{
! 		up (&mdc800->io_lock);
  		return -EBUSY;
  	}
  	if (mdc800->state == WORKING)
  	{
  		warn ("Illegal State \"working\" reached during read ?!");
! 		up (&mdc800->io_lock);
  		return -EBUSY;
  	}
  	if (!mdc800->open)
  	{
! 		up (&mdc800->io_lock);
  		return -EBUSY;
  	}
  
--- 632,655 ----
   */
  static ssize_t mdc800_device_read (struct file *file, char *buf, size_t len, loff_t *pos)
  {
! 	int   left=len, sts=len; /* single transfer size */
  	char* ptr=buf;
  
! 	spin_lock (&mdc800->io_lock);
  	if (mdc800->state == NOT_CONNECTED)
  	{
! 		spin_unlock (&mdc800->io_lock);
  		return -EBUSY;
  	}
  	if (mdc800->state == WORKING)
  	{
  		warn ("Illegal State \"working\" reached during read ?!");
! 		spin_unlock (&mdc800->io_lock);
  		return -EBUSY;
  	}
  	if (!mdc800->open)
  	{
! 		spin_unlock (&mdc800->io_lock);
  		return -EBUSY;
  	}
  
***************
*** 678,684 ****
  	{
  		if (signal_pending (current)) 
  		{
! 			up (&mdc800->io_lock);
  			return -EINTR;
  		}
  
--- 657,663 ----
  	{
  		if (signal_pending (current)) 
  		{
! 			spin_unlock (&mdc800->io_lock);
  			return -EINTR;
  		}
  
***************
*** 697,725 ****
  				if (usb_submit_urb (mdc800->download_urb))
  				{
  					err ("Can't submit download urb (status=%i)",mdc800->download_urb->status);
! 					up (&mdc800->io_lock);
  					return len-left;
  				}
! 				add_wait_queue(&mdc800->download_wait, &wait);
! 				set_current_state(TASK_INTERRUPTIBLE);
! 				if (!mdc800->downloaded)
! 				{
! 				        schedule_timeout (TO_DOWNLOAD_GET_READY*HZ/1000);
! 				}
!                                 set_current_state(TASK_RUNNING);
! 				remove_wait_queue(&mdc800->download_wait, &wait);
! 				mdc800->downloaded = 0;
  				if (mdc800->download_urb->status != 0)
  				{
  					err ("request download-bytes fails (status=%i)",mdc800->download_urb->status);
! 					up (&mdc800->io_lock);
  					return len-left;
  				}
  			}
  			else
  			{
  				/* No more bytes -> that's an error*/
! 				up (&mdc800->io_lock);
  				return -EIO;
  			}
  		}
--- 676,696 ----
  				if (usb_submit_urb (mdc800->download_urb))
  				{
  					err ("Can't submit download urb (status=%i)",mdc800->download_urb->status);
! 					spin_unlock (&mdc800->io_lock);
  					return len-left;
  				}
! 				interruptible_sleep_on_timeout (&mdc800->download_wait, TO_DOWNLOAD_GET_READY*HZ/1000);
  				if (mdc800->download_urb->status != 0)
  				{
  					err ("request download-bytes fails (status=%i)",mdc800->download_urb->status);
! 					spin_unlock (&mdc800->io_lock);
  					return len-left;
  				}
  			}
  			else
  			{
  				/* No more bytes -> that's an error*/
! 				spin_unlock (&mdc800->io_lock);
  				return -EIO;
  			}
  		}
***************
*** 733,739 ****
  		}
  	}
  
! 	up (&mdc800->io_lock);
  	return len-left;
  }
  
--- 704,710 ----
  		}
  	}
  
! 	spin_unlock (&mdc800->io_lock);
  	return len-left;
  }
  
***************
*** 746,763 ****
   */
  static ssize_t mdc800_device_write (struct file *file, const char *buf, size_t len, loff_t *pos)
  {
! 	size_t i=0;
! 	DECLARE_WAITQUEUE(wait, current);
  
! 	down (&mdc800->io_lock);
  	if (mdc800->state != READY)
  	{
! 		up (&mdc800->io_lock);
  		return -EBUSY;
  	}
  	if (!mdc800->open )
  	{
! 		up (&mdc800->io_lock);
  		return -EBUSY;
  	}
  
--- 717,733 ----
   */
  static ssize_t mdc800_device_write (struct file *file, const char *buf, size_t len, loff_t *pos)
  {
! 	int i=0;
  
! 	spin_lock (&mdc800->io_lock);
  	if (mdc800->state != READY)
  	{
! 		spin_unlock (&mdc800->io_lock);
  		return -EBUSY;
  	}
  	if (!mdc800->open )
  	{
! 		spin_unlock (&mdc800->io_lock);
  		return -EBUSY;
  	}
  
***************
*** 765,771 ****
  	{
  		if (signal_pending (current)) 
  		{
! 			up (&mdc800->io_lock);
  			return -EINTR;
  		}
  
--- 735,741 ----
  	{
  		if (signal_pending (current)) 
  		{
! 			spin_unlock (&mdc800->io_lock);
  			return -EINTR;
  		}
  
***************
*** 787,793 ****
  		else
  		{
  			err ("Command is to long !\n");
! 			up (&mdc800->io_lock);
  			return -EIO;
  		}
  
--- 757,763 ----
  		else
  		{
  			err ("Command is to long !\n");
! 			spin_unlock (&mdc800->io_lock);
  			return -EIO;
  		}
  
***************
*** 799,805 ****
  			if (mdc800_usb_waitForIRQ (0,TO_GET_READY))
  			{
  				err ("Camera didn't get ready.\n");
! 				up (&mdc800->io_lock);
  				return -EIO;
  			}
  
--- 769,775 ----
  			if (mdc800_usb_waitForIRQ (0,TO_GET_READY))
  			{
  				err ("Camera didn't get ready.\n");
! 				spin_unlock (&mdc800->io_lock);
  				return -EIO;
  			}
  
***************
*** 811,832 ****
  			if (usb_submit_urb (mdc800->write_urb))
  			{
  				err ("submitting write urb fails (status=%i)", mdc800->write_urb->status);
! 				up (&mdc800->io_lock);
  				return -EIO;
  			}
! 			add_wait_queue(&mdc800->write_wait, &wait);
! 			set_current_state(TASK_INTERRUPTIBLE);
! 			if (!mdc800->written)
! 			{
! 			        schedule_timeout (TO_WRITE_GET_READY*HZ/1000);
! 			}
!                         set_current_state(TASK_RUNNING);
! 			remove_wait_queue(&mdc800->write_wait, &wait);
! 			mdc800->written = 0;
  			if (mdc800->state == WORKING)
  			{
  				usb_unlink_urb (mdc800->write_urb);
! 				up (&mdc800->io_lock);
  				return -EIO;
  			}
  
--- 781,794 ----
  			if (usb_submit_urb (mdc800->write_urb))
  			{
  				err ("submitting write urb fails (status=%i)", mdc800->write_urb->status);
! 				spin_unlock (&mdc800->io_lock);
  				return -EIO;
  			}
! 			interruptible_sleep_on_timeout (&mdc800->write_wait, TO_WRITE_GET_READY*HZ/1000);
  			if (mdc800->state == WORKING)
  			{
  				usb_unlink_urb (mdc800->write_urb);
! 				spin_unlock (&mdc800->io_lock);
  				return -EIO;
  			}
  
***************
*** 838,844 ****
  					{
  						err ("call 0x07 before 0x05,0x3e");
  						mdc800->state=READY;
! 						up (&mdc800->io_lock);
  						return -EIO;
  					}
  					mdc800->pic_len=-1;
--- 800,806 ----
  					{
  						err ("call 0x07 before 0x05,0x3e");
  						mdc800->state=READY;
! 						spin_unlock (&mdc800->io_lock);
  						return -EIO;
  					}
  					mdc800->pic_len=-1;
***************
*** 857,863 ****
  						if (mdc800_usb_waitForIRQ (1,TO_READ_FROM_IRQ))
  						{
  							err ("requesting answer from irq fails");
! 							up (&mdc800->io_lock);
  							return -EIO;
  						}
  
--- 819,825 ----
  						if (mdc800_usb_waitForIRQ (1,TO_READ_FROM_IRQ))
  						{
  							err ("requesting answer from irq fails");
! 							spin_unlock (&mdc800->io_lock);
  							return -EIO;
  						}
  
***************
*** 885,891 ****
  						if (mdc800_usb_waitForIRQ (0,TO_DEFAULT_COMMAND))
  						{
  							err ("Command Timeout.");
! 							up (&mdc800->io_lock);
  							return -EIO;
  						}
  					}
--- 847,853 ----
  						if (mdc800_usb_waitForIRQ (0,TO_DEFAULT_COMMAND))
  						{
  							err ("Command Timeout.");
! 							spin_unlock (&mdc800->io_lock);
  							return -EIO;
  						}
  					}
***************
*** 895,901 ****
  		}
  		i++;
  	}
! 	up (&mdc800->io_lock);
  	return i;
  }
  
--- 857,863 ----
  		}
  		i++;
  	}
! 	spin_unlock (&mdc800->io_lock);
  	return i;
  }
  
***************
*** 954,969 ****
  	mdc800->dev=0;
  	mdc800->open=0;
  	mdc800->state=NOT_CONNECTED;
! 	init_MUTEX (&mdc800->io_lock);
  
  	init_waitqueue_head (&mdc800->irq_wait);
  	init_waitqueue_head (&mdc800->write_wait);
  	init_waitqueue_head (&mdc800->download_wait);
  
- 	mdc800->irq_woken = 0;
- 	mdc800->downloaded = 0;
- 	mdc800->written = 0;
- 
  	try (mdc800->irq_urb_buffer=kmalloc (8, GFP_KERNEL));
  	try (mdc800->write_urb_buffer=kmalloc (8, GFP_KERNEL));
  	try (mdc800->download_urb_buffer=kmalloc (64, GFP_KERNEL));
--- 916,927 ----
  	mdc800->dev=0;
  	mdc800->open=0;
  	mdc800->state=NOT_CONNECTED;
! 	spin_lock_init (&mdc800->io_lock);
  
  	init_waitqueue_head (&mdc800->irq_wait);
  	init_waitqueue_head (&mdc800->write_wait);
  	init_waitqueue_head (&mdc800->download_wait);
  
  	try (mdc800->irq_urb_buffer=kmalloc (8, GFP_KERNEL));
  	try (mdc800->write_urb_buffer=kmalloc (8, GFP_KERNEL));
  	try (mdc800->download_urb_buffer=kmalloc (64, GFP_KERNEL));
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/microtek.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/microtek.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/microtek.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/microtek.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 117,124 ****
   *	20010320 Version 0.4.3
   *	20010408 Identify version on module load.
   *	20011003 Fix multiple requests
-  *	20020618 Version 0.4.4
-  *	20020618 Confirm to utterly stupid rules about io_request_lock
   */
  
  #include 
--- 117,122 ----
***************
*** 146,152 ****
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v0.4.4"
  #define DRIVER_AUTHOR "John Fremlin , Oliver Neukum "
  #define DRIVER_DESC "Microtek Scanmaker X6 USB scanner driver"
  
--- 144,150 ----
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v0.4.3"
  #define DRIVER_AUTHOR "John Fremlin , Oliver Neukum "
  #define DRIVER_DESC "Microtek Scanmaker X6 USB scanner driver"
  
***************
*** 328,339 ****
  }  */
  
  static inline void mts_urb_abort(struct mts_desc* desc) {
- 	spin_unlock_irq(&io_request_lock);
  	MTS_DEBUG_GOT_HERE();
  	mts_debug_dump(desc);
  
  	usb_unlink_urb( &desc->urb );
- 	spin_lock_irq(&io_request_lock);
  }
  
  static struct mts_desc * mts_list; /* list of active scanners */
--- 326,335 ----
***************
*** 418,431 ****
  
  static int mts_scsi_host_reset (Scsi_Cmnd *srb)
  {
- 
  	struct mts_desc* desc = (struct mts_desc*)(srb->host->hostdata[0]);
! 	spin_unlock_irq(&io_request_lock);
  	MTS_DEBUG_GOT_HERE();
  	mts_debug_dump(desc);
  
  	usb_reset_device(desc->usb_dev); /*FIXME: untested on new reset code */
- 	spin_lock_irq(&io_request_lock);
  	return 0;  /* RANT why here 0 and not SUCCESS */
  }
  
--- 414,425 ----
  
  static int mts_scsi_host_reset (Scsi_Cmnd *srb)
  {
  	struct mts_desc* desc = (struct mts_desc*)(srb->host->hostdata[0]);
! 
  	MTS_DEBUG_GOT_HERE();
  	mts_debug_dump(desc);
  
  	usb_reset_device(desc->usb_dev); /*FIXME: untested on new reset code */
  	return 0;  /* RANT why here 0 and not SUCCESS */
  }
  
***************
*** 441,447 ****
  	/* What a hideous hack! */
  
  	char local_name[48];
- 	spin_unlock_irq(&io_request_lock);
  
  	MTS_DEBUG_GOT_HERE();
  
--- 435,440 ----
***************
*** 452,458 ****
  
  	if (!sht->proc_name) {
  		MTS_ERROR( "unable to allocate memory for proc interface!!\n" );
- 		spin_lock_irq(&io_request_lock);
  		return 0;
  	}
  
--- 445,450 ----
***************
*** 465,476 ****
  	if (desc->host == NULL) {
  		MTS_ERROR("Cannot register due to low memory");
  		kfree(sht->proc_name);
- 		spin_lock_irq(&io_request_lock);
  		return 0;
  	}
  	desc->host->hostdata[0] = (unsigned long)desc;
  /* FIXME: what if sizeof(void*) != sizeof(unsigned long)? */
! 	spin_lock_irq(&io_request_lock);
  	return 1;
  }
  
--- 457,467 ----
  	if (desc->host == NULL) {
  		MTS_ERROR("Cannot register due to low memory");
  		kfree(sht->proc_name);
  		return 0;
  	}
  	desc->host->hostdata[0] = (unsigned long)desc;
  /* FIXME: what if sizeof(void*) != sizeof(unsigned long)? */
! 
  	return 1;
  }
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/ov511.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/ov511.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/ov511.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/ov511.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,17 ****
  /*
   * OmniVision OV511 Camera-to-USB Bridge Driver
   *
!  * Copyright (c) 1999-2002 Mark W. McClelland
!  * Original decompression code Copyright 1998-2000 OmniVision Technologies
   * Many improvements by Bret Wallach 
   * Color fixes by by Orion Sky Lawlor  (2/26/2000)
   * Snapshot code by Kevin Moore
   * OV7620 fixes by Charl P. Botha 
   * Changes by Claudio Matsuoka 
!  * Original SAA7111A code by Dave Perks 
!  * URB error messages from pwc driver by Nemosoft
!  * generic_ioctl() code from videodev.c by Gerd Knorr and Alan Cox
!  *
   * Based on the Linux CPiA driver written by Peter Pregler,
   * Scott J. Bertin and Johannes Erdfelt.
   * 
--- 1,13 ----
  /*
   * OmniVision OV511 Camera-to-USB Bridge Driver
   *
!  * Copyright (c) 1999-2000 Mark W. McClelland
   * Many improvements by Bret Wallach 
   * Color fixes by by Orion Sky Lawlor  (2/26/2000)
   * Snapshot code by Kevin Moore
   * OV7620 fixes by Charl P. Botha 
   * Changes by Claudio Matsuoka 
!  * 
   * Based on the Linux CPiA driver written by Peter Pregler,
   * Scott J. Bertin and Johannes Erdfelt.
   * 
***************
*** 34,42 ****
   * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   */
  
  #include 
- #include 
  #include 
  #include 
  #include 
  #include 
--- 30,40 ----
   * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   */
  
+ #define __NO_VERSION__
+ 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
***************
*** 44,365 ****
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
- #if defined (__i386__)
- 	#include 
- #endif
- 
  #include "ov511.h"
  
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.61 for Linux 2.4"
! #define EMAIL "mark@alpha.dyndns.org"
! #define DRIVER_AUTHOR "Mark McClelland  & Bret Wallach \
! 	& Orion Sky Lawlor  & Kevin Moore & Charl P. Botha \
! 	 & Claudio Matsuoka "
! #define DRIVER_DESC "ov511 USB Camera Driver"
  
  #define OV511_I2C_RETRIES 3
- #define ENABLE_Y_QUANTABLE 1
- #define ENABLE_UV_QUANTABLE 1
  
! #define OV511_MAX_UNIT_VIDEO 16
  
! /* Pixel count * 3 bytes for RGB */
! #define MAX_FRAME_SIZE(w, h) ((w) * (h) * 3)
  
! #define MAX_DATA_SIZE(w, h) (MAX_FRAME_SIZE(w, h) + sizeof(struct timeval))
  
! /* Max size * bytes per YUV420 pixel (1.5) + one extra isoc frame for safety */
! #define MAX_RAW_DATA_SIZE(w, h) ((w) * (h) * 3 / 2 + 1024)
  
! #define FATAL_ERROR(rc) ((rc) < 0 && (rc) != -EPERM)
  
! /**********************************************************************
!  * Module Parameters
!  * (See ov511.txt for detailed descriptions of these)
!  **********************************************************************/
  
! /* These variables (and all static globals) default to zero */
! static int autobright		= 1;
! static int autogain		= 1;
! static int autoexp		= 1;
! static int debug;
! static int snapshot;
! static int fix_rgb_offset;
! static int force_rgb;
! static int cams			= 1;
! static int compress;
! static int testpat;
! static int sensor_gbr;
! static int dumppix;
! static int led 			= 1;
! static int dump_bridge;
! static int dump_sensor;
! static int printph;
! static int phy			= 0x1f;
! static int phuv			= 0x05;
! static int pvy			= 0x06;
! static int pvuv			= 0x06;
! static int qhy			= 0x14;
! static int qhuv			= 0x03;
! static int qvy			= 0x04;
! static int qvuv			= 0x04;
! static int lightfreq;
! static int bandingfilter;
! static int clockdiv		= -1;
! static int packetsize		= -1;
! static int framedrop		= -1;
! static int fastset;
! static int force_palette;
! static int backlight;
! static int unit_video[OV511_MAX_UNIT_VIDEO];
! static int remove_zeros;
! static int mirror;
! 
! MODULE_PARM(autobright, "i");
! MODULE_PARM_DESC(autobright, "Sensor automatically changes brightness");
! MODULE_PARM(autogain, "i");
! MODULE_PARM_DESC(autogain, "Sensor automatically changes gain");
! MODULE_PARM(autoexp, "i");
! MODULE_PARM_DESC(autoexp, "Sensor automatically changes exposure");
  MODULE_PARM(debug, "i");
! MODULE_PARM_DESC(debug,
!   "Debug level: 0=none, 1=inits, 2=warning, 3=config, 4=functions, 5=max");
  MODULE_PARM(snapshot, "i");
  MODULE_PARM_DESC(snapshot, "Enable snapshot mode");
! MODULE_PARM(fix_rgb_offset, "i");
! MODULE_PARM_DESC(fix_rgb_offset,
!   "Fix vertical misalignment of red and blue at 640x480");
  MODULE_PARM(force_rgb, "i");
  MODULE_PARM_DESC(force_rgb, "Read RGB instead of BGR");
  MODULE_PARM(cams, "i");
  MODULE_PARM_DESC(cams, "Number of simultaneous cameras");
  MODULE_PARM(compress, "i");
! MODULE_PARM_DESC(compress, "Turn on compression (not reliable yet)");
  MODULE_PARM(testpat, "i");
! MODULE_PARM_DESC(testpat,
!   "Replace image with vertical bar testpattern (only partially working)");
  MODULE_PARM(dumppix, "i");
! MODULE_PARM_DESC(dumppix, "Dump raw pixel data");
! MODULE_PARM(led, "i");
! MODULE_PARM_DESC(led,
!   "LED policy (OV511+ or later). 0=off, 1=on (default), 2=auto (on when open)");
! MODULE_PARM(dump_bridge, "i");
! MODULE_PARM_DESC(dump_bridge, "Dump the bridge registers");
! MODULE_PARM(dump_sensor, "i");
! MODULE_PARM_DESC(dump_sensor, "Dump the sensor registers");
! MODULE_PARM(printph, "i");
! MODULE_PARM_DESC(printph, "Print frame start/end headers");
! MODULE_PARM(phy, "i");
! MODULE_PARM_DESC(phy, "Prediction range (horiz. Y)");
! MODULE_PARM(phuv, "i");
! MODULE_PARM_DESC(phuv, "Prediction range (horiz. UV)");
! MODULE_PARM(pvy, "i");
! MODULE_PARM_DESC(pvy, "Prediction range (vert. Y)");
! MODULE_PARM(pvuv, "i");
! MODULE_PARM_DESC(pvuv, "Prediction range (vert. UV)");
! MODULE_PARM(qhy, "i");
! MODULE_PARM_DESC(qhy, "Quantization threshold (horiz. Y)");
! MODULE_PARM(qhuv, "i");
! MODULE_PARM_DESC(qhuv, "Quantization threshold (horiz. UV)");
! MODULE_PARM(qvy, "i");
! MODULE_PARM_DESC(qvy, "Quantization threshold (vert. Y)");
! MODULE_PARM(qvuv, "i");
! MODULE_PARM_DESC(qvuv, "Quantization threshold (vert. UV)");
! MODULE_PARM(lightfreq, "i");
! MODULE_PARM_DESC(lightfreq,
!   "Light frequency. Set to 50 or 60 Hz, or zero for default settings");
! MODULE_PARM(bandingfilter, "i");
! MODULE_PARM_DESC(bandingfilter,
!   "Enable banding filter (to reduce effects of fluorescent lighting)");
! MODULE_PARM(clockdiv, "i");
! MODULE_PARM_DESC(clockdiv, "Force pixel clock divisor to a specific value");
! MODULE_PARM(packetsize, "i");
! MODULE_PARM_DESC(packetsize, "Force a specific isoc packet size");
! MODULE_PARM(framedrop, "i");
! MODULE_PARM_DESC(framedrop, "Force a specific frame drop register setting");
! MODULE_PARM(fastset, "i");
! MODULE_PARM_DESC(fastset, "Allows picture settings to take effect immediately");
! MODULE_PARM(force_palette, "i");
! MODULE_PARM_DESC(force_palette, "Force the palette to a specific value");
! MODULE_PARM(backlight, "i");
! MODULE_PARM_DESC(backlight, "For objects that are lit from behind");
! MODULE_PARM(unit_video, "1-" __MODULE_STRING(OV511_MAX_UNIT_VIDEO) "i");
! MODULE_PARM_DESC(unit_video,
!   "Force use of specific minor number(s). 0 is not allowed.");
! MODULE_PARM(remove_zeros, "i");
! MODULE_PARM_DESC(remove_zeros,
!   "Remove zero-padding from uncompressed incoming data");
! MODULE_PARM(mirror, "i");
! MODULE_PARM_DESC(mirror, "Reverse image horizontally");
  
! MODULE_AUTHOR(DRIVER_AUTHOR);
! MODULE_DESCRIPTION(DRIVER_DESC);
  MODULE_LICENSE("GPL");
  
- /**********************************************************************
-  * Miscellaneous Globals
-  **********************************************************************/
- 
  static struct usb_driver ov511_driver;
  
! static struct ov51x_decomp_ops *ov511_decomp_ops;
! static struct ov51x_decomp_ops *ov511_mmx_decomp_ops;
! static struct ov51x_decomp_ops *ov518_decomp_ops;
! static struct ov51x_decomp_ops *ov518_mmx_decomp_ops;
! 
! /* Number of times to retry a failed I2C transaction. Increase this if you
!  * are getting "Failed to read sensor ID..." */
! static int i2c_detect_tries = 5;
! 
! /* MMX support is present in kernel and CPU. Checked upon decomp module load. */
! static int ov51x_mmx_available;
! 
! static __devinitdata struct usb_device_id device_table [] = {
! 	{ USB_DEVICE(VEND_OMNIVISION, PROD_OV511) },
! 	{ USB_DEVICE(VEND_OMNIVISION, PROD_OV511PLUS) },
! 	{ USB_DEVICE(VEND_OMNIVISION, PROD_OV518) },
! 	{ USB_DEVICE(VEND_OMNIVISION, PROD_OV518PLUS) },
! 	{ USB_DEVICE(VEND_MATTEL, PROD_ME2CAM) },
! 	{ }  /* Terminating entry */
! };
! 
! MODULE_DEVICE_TABLE (usb, device_table);
! 
! static unsigned char yQuanTable511[] = OV511_YQUANTABLE;
! static unsigned char uvQuanTable511[] = OV511_UVQUANTABLE;
! static unsigned char yQuanTable518[] = OV518_YQUANTABLE;
! static unsigned char uvQuanTable518[] = OV518_UVQUANTABLE;
  
  /**********************************************************************
!  * Symbolic Names
   **********************************************************************/
  
! /* Known OV511-based cameras */
! static struct symbolic_list camlist[] = {
! 	{   0, "Generic Camera (no ID)" },
! 	{   1, "Mustek WCam 3X" },
  	{   3, "D-Link DSB-C300" },
! 	{   4, "Generic OV511/OV7610" },
  	{   5, "Puretek PT-6007" },
- 	{   6, "Lifeview USB Life TV (NTSC)" },
  	{  21, "Creative Labs WebCam 3" },
- 	{  22, "Lifeview USB Life TV (PAL D/K+B/G)" },
  	{  36, "Koala-Cam" },
! 	{  38, "Lifeview USB Life TV (PAL)" },
! 	{  41, "Samsung Anycam MPC-M10" },
! 	{  43, "Mtekvision Zeca MV402" },
! 	{  46, "Suma eON" },
! 	{  70, "Lifeview USB Life TV (PAL/SECAM)" },
  	{ 100, "Lifeview RoboCam" },
  	{ 102, "AverMedia InterCam Elite" },
  	{ 112, "MediaForte MV300" },	/* or OV7110 evaluation kit */
- 	{ 192, "Webeye 2000B" },
  	{  -1, NULL }
  };
  
! /* Video4Linux1 Palettes */
! static struct symbolic_list v4l1_plist[] = {
  	{ VIDEO_PALETTE_GREY,	"GREY" },
! 	{ VIDEO_PALETTE_HI240,	"HI240" },
! 	{ VIDEO_PALETTE_RGB565,	"RGB565" },
  	{ VIDEO_PALETTE_RGB24,	"RGB24" },
  	{ VIDEO_PALETTE_RGB32,	"RGB32" },
! 	{ VIDEO_PALETTE_RGB555,	"RGB555" },
! 	{ VIDEO_PALETTE_YUV422,	"YUV422" },
! 	{ VIDEO_PALETTE_YUYV,	"YUYV" },
! 	{ VIDEO_PALETTE_UYVY,	"UYVY" },
! 	{ VIDEO_PALETTE_YUV420,	"YUV420" },
! 	{ VIDEO_PALETTE_YUV411,	"YUV411" },
! 	{ VIDEO_PALETTE_RAW,	"RAW" },
  	{ VIDEO_PALETTE_YUV422P,"YUV422P" },
  	{ VIDEO_PALETTE_YUV411P,"YUV411P" },
  	{ VIDEO_PALETTE_YUV420P,"YUV420P" },
  	{ VIDEO_PALETTE_YUV410P,"YUV410P" },
  	{ -1, NULL }
  };
- 
- static struct symbolic_list brglist[] = {
- 	{ BRG_OV511,		"OV511" },
- 	{ BRG_OV511PLUS,	"OV511+" },
- 	{ BRG_OV518,		"OV518" },
- 	{ BRG_OV518PLUS,	"OV518+" },
- 	{ -1, NULL }
- };
- 
- static struct symbolic_list senlist[] = {
- 	{ SEN_OV76BE,	"OV76BE" },
- 	{ SEN_OV7610,	"OV7610" },
- 	{ SEN_OV7620,	"OV7620" },
- 	{ SEN_OV7620AE,	"OV7620AE" },
- 	{ SEN_OV6620,	"OV6620" },
- 	{ SEN_OV6630,	"OV6630" },
- 	{ SEN_OV6630AE,	"OV6630AE" },
- 	{ SEN_OV6630AF,	"OV6630AF" },
- 	{ SEN_OV8600,	"OV8600" },
- 	{ SEN_KS0127,	"KS0127" },
- 	{ SEN_KS0127B,	"KS0127B" },
- 	{ SEN_SAA7111A,	"SAA7111A" },
- 	{ -1, NULL }
- };
- 
- /* URB error codes: */
- static struct symbolic_list urb_errlist[] = {
- 	{ -ENOSR,	"Buffer error (overrun)" },
- 	{ -EPIPE,	"Stalled (device not responding)" },
- 	{ -EOVERFLOW,	"Babble (bad cable?)" },
- 	{ -EPROTO,	"Bit-stuff error (bad cable?)" },
- 	{ -EILSEQ,	"CRC/Timeout" },
- 	{ -ETIMEDOUT,	"NAK (device does not respond)" },
- 	{ -1, NULL }
- };
- 
- /**********************************************************************
-  * Prototypes
-  **********************************************************************/
- 
- static void ov51x_clear_snapshot(struct usb_ov511 *);
- static inline int sensor_get_picture(struct usb_ov511 *,
- 				     struct video_picture *);
- #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
- static int sensor_get_exposure(struct usb_ov511 *, unsigned char *);
- static int ov51x_control_ioctl(struct inode *, struct file *, unsigned int,
- 			       unsigned long);
- static int ov51x_check_snapshot(struct usb_ov511 *);
  #endif
  
  /**********************************************************************
   * Memory management
   **********************************************************************/
  
  /* Here we want the physical address of the memory.
!  * This is used when initializing the contents of the area.
   */
! static inline unsigned long
! kvirt_to_pa(unsigned long adr)
  {
! 	unsigned long kva, ret;
  
! 	kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
! 	kva |= adr & (PAGE_SIZE-1); /* restore the offset */
  	ret = __pa(kva);
  	return ret;
  }
  
! static void *
! rvmalloc(unsigned long size)
  {
  	void *mem;
! 	unsigned long adr;
  
- 	size = PAGE_ALIGN(size);
  	mem = vmalloc_32(size);
  	if (!mem)
  		return NULL;
--- 42,280 ----
  #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  
  #include "ov511.h"
  
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.28"
! #define DRIVER_AUTHOR "Mark McClelland  & Bret Wallach & Orion Sky Lawlor  & Kevin Moore & Charl P. Botha  & Claudio Matsuoka "
! #define DRIVER_DESC "OV511 USB Camera Driver"
  
  #define OV511_I2C_RETRIES 3
  
! /* Video Size 640 x 480 x 3 bytes for RGB */
! #define MAX_FRAME_SIZE (640 * 480 * 3)
! #define MAX_DATA_SIZE (MAX_FRAME_SIZE + sizeof(struct timeval))
! 
! #define GET_SEGSIZE(p) ((p) == VIDEO_PALETTE_GREY ? 256 : 384)
  
! /* PARAMETER VARIABLES: */
! static int autoadjust = 1;    /* CCD dynamically changes exposure, etc... */
  
! static int video_nr = -1;
  
! /* 0=no debug messages
!  * 1=init/detection/unload and other significant messages,
!  * 2=some warning messages
!  * 3=config/control function calls
!  * 4=most function calls and data parsing messages
!  * 5=highly repetitive mesgs
!  * NOTE: This should be changed to 0, 1, or 2 for production kernels
!  */
! static int debug = 0;
  
! /* Fix vertical misalignment of red and blue at 640x480 */
! static int fix_rgb_offset = 0;
  
! /* Snapshot mode enabled flag */
! static int snapshot = 0;
! 
! /* Sensor detection override (global for all attached cameras) */
! static int sensor = 0;
! 
! /* Increase this if you are getting "Failed to read sensor ID..." */
! static int i2c_detect_tries = 5;
! 
! /* For legal values, see the OV7610/7620 specs under register Common F,
!  * upper nybble  (set to 0-F) */
! static int aperture = -1;
! 
! /* Force image to be read in RGB instead of BGR. This option allow
!  * programs that expect RGB data (e.g. gqcam) to work with this driver. */
! static int force_rgb = 0;
  
! /* Number of seconds before inactive buffers are deallocated */
! static int buf_timeout = 5;
! 
! /* Number of cameras to stream from simultaneously */
! static int cams = 1;
! 
! /* Prevent apps from timing out if frame is not done in time */
! static int retry_sync = 0;
! 
! /* Enable compression. This is for experimentation only; compressed images
!  * still cannot be decoded yet. */
! static int compress = 0;
! 
! /* Display test pattern - doesn't work yet either */
! static int testpat = 0;
! 
! /* Setting this to 1 will make the sensor output GBR422 instead on YUV420. Only
!  * affects RGB24 mode. */
! static int sensor_gbr = 0;
! 
! /* Dump raw pixel data, in one of 3 formats. See ov511_dumppix() for details. */
! static int dumppix = 0;
! 
! MODULE_PARM(autoadjust, "i");
! MODULE_PARM_DESC(autoadjust, "CCD dynamically changes exposure");
  MODULE_PARM(debug, "i");
! MODULE_PARM_DESC(debug, "Debug level: 0=none, 1=init/detection, 2=warning, 3=config/control, 4=function call, 5=max");
! MODULE_PARM(fix_rgb_offset, "i");
! MODULE_PARM_DESC(fix_rgb_offset, "Fix vertical misalignment of red and blue at 640x480");
  MODULE_PARM(snapshot, "i");
  MODULE_PARM_DESC(snapshot, "Enable snapshot mode");
! MODULE_PARM(sensor, "i");
! MODULE_PARM_DESC(sensor, "Override sensor detection");
! MODULE_PARM(i2c_detect_tries, "i");
! MODULE_PARM_DESC(i2c_detect_tries, "Number of tries to detect sensor");
! MODULE_PARM(aperture, "i");
! MODULE_PARM_DESC(aperture, "Read the OV7610/7620 specs");
  MODULE_PARM(force_rgb, "i");
  MODULE_PARM_DESC(force_rgb, "Read RGB instead of BGR");
+ MODULE_PARM(buf_timeout, "i");
+ MODULE_PARM_DESC(buf_timeout, "Number of seconds before buffer deallocation");
  MODULE_PARM(cams, "i");
  MODULE_PARM_DESC(cams, "Number of simultaneous cameras");
+ MODULE_PARM(retry_sync, "i");
+ MODULE_PARM_DESC(retry_sync, "Prevent apps from timing out");
  MODULE_PARM(compress, "i");
! MODULE_PARM_DESC(compress, "Turn on compression (not functional yet)");
  MODULE_PARM(testpat, "i");
! MODULE_PARM_DESC(testpat, "Replace image with vertical bar testpattern (only partially working)");
! MODULE_PARM(sensor_gbr, "i");
! MODULE_PARM_DESC(sensor_gbr, "Make sensor output GBR422 rather than YUV420");
  MODULE_PARM(dumppix, "i");
! MODULE_PARM_DESC(dumppix, "Dump raw pixel data, in one of 3 formats. See ov511_dumppix() for details");
! MODULE_PARM(video_nr,"i");
  
! MODULE_AUTHOR( DRIVER_AUTHOR );
! MODULE_DESCRIPTION( DRIVER_DESC );
  MODULE_LICENSE("GPL");
  
  static struct usb_driver ov511_driver;
  
! /* I know, I know, global variables suck. This is only a temporary hack */
! int output_offset;
  
  /**********************************************************************
!  * List of known OV511-based cameras
   **********************************************************************/
  
! static struct cam_list clist[] = {
! 	{   0, "generic model (no ID)" },
  	{   3, "D-Link DSB-C300" },
! 	{   4, "generic OV511/OV7610" },
  	{   5, "Puretek PT-6007" },
  	{  21, "Creative Labs WebCam 3" },
  	{  36, "Koala-Cam" },
! 	{  38, "Lifeview USB Life TV" },	/* No support yet! */
  	{ 100, "Lifeview RoboCam" },
  	{ 102, "AverMedia InterCam Elite" },
  	{ 112, "MediaForte MV300" },	/* or OV7110 evaluation kit */
  	{  -1, NULL }
  };
  
! static __devinitdata struct usb_device_id device_table [] = {
! 	{ USB_DEVICE(0x05a9, 0x0511) },  /* OV511 */
! 	{ USB_DEVICE(0x05a9, 0xA511) },  /* OV511+ */
! 	{ USB_DEVICE(0x0813, 0x0002) },  /* Intel Play Me2Cam OV511+ */
! 	{ }  /* Terminating entry */
! };
! 
! MODULE_DEVICE_TABLE (usb, device_table);
! 
! #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
! static struct palette_list plist[] = {
  	{ VIDEO_PALETTE_GREY,	"GREY" },
! 	{ VIDEO_PALETTE_HI240,  "HI240" },
! 	{ VIDEO_PALETTE_RGB565, "RGB565" },
  	{ VIDEO_PALETTE_RGB24,	"RGB24" },
  	{ VIDEO_PALETTE_RGB32,	"RGB32" },
! 	{ VIDEO_PALETTE_RGB555, "RGB555" },
! 	{ VIDEO_PALETTE_YUV422, "YUV422" },
! 	{ VIDEO_PALETTE_YUYV,   "YUYV" },
! 	{ VIDEO_PALETTE_UYVY,   "UYVY" },
! 	{ VIDEO_PALETTE_YUV420, "YUV420" },
! 	{ VIDEO_PALETTE_YUV411, "YUV411" },
! 	{ VIDEO_PALETTE_RAW,    "RAW" },
  	{ VIDEO_PALETTE_YUV422P,"YUV422P" },
  	{ VIDEO_PALETTE_YUV411P,"YUV411P" },
  	{ VIDEO_PALETTE_YUV420P,"YUV420P" },
  	{ VIDEO_PALETTE_YUV410P,"YUV410P" },
  	{ -1, NULL }
  };
  #endif
  
  /**********************************************************************
+  *
   * Memory management
+  *
+  * This is a shameless copy from the USB-cpia driver (linux kernel
+  * version 2.3.29 or so, I have no idea what this code actually does ;).
+  * Actually it seems to be a copy of a shameless copy of the bttv-driver.
+  * Or that is a copy of a shameless copy of ... (To the powers: is there
+  * no generic kernel-function to do this sort of stuff?)
+  *
+  * Yes, it was a shameless copy from the bttv-driver. IIRC, Alan says
+  * there will be one, but apparentely not yet -jerdfelt
+  *
+  * So I copied it again for the OV511 driver -claudio
   **********************************************************************/
  
+ /* Given PGD from the address space's page table, return the kernel
+  * virtual mapping of the physical memory mapped at ADR.
+  */
+ static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
+ {
+ 	unsigned long ret = 0UL;
+ 	pmd_t *pmd;
+ 	pte_t *ptep, pte;
+ 
+ 	if (!pgd_none(*pgd)) {
+ 		pmd = pmd_offset(pgd, adr);
+ 		if (!pmd_none(*pmd)) {
+ 			ptep = pte_offset(pmd, adr);
+ 			pte = *ptep;
+ 			if (pte_present(pte)) {
+ 				ret = (unsigned long) page_address(pte_page(pte));
+ 				ret |= (adr & (PAGE_SIZE - 1));
+ 			}
+ 		}
+ 	}
+ 
+ 	return ret;
+ }
+ 
  /* Here we want the physical address of the memory.
!  * This is used when initializing the contents of the
!  * area and marking the pages as reserved.
   */
! static inline unsigned long kvirt_to_pa(unsigned long adr)
  {
! 	unsigned long va, kva, ret;
  
! 	va = VMALLOC_VMADDR(adr);
! 	kva = uvirt_to_kva(pgd_offset_k(va), va);
  	ret = __pa(kva);
  	return ret;
  }
  
! static void *rvmalloc(unsigned long size)
  {
  	void *mem;
! 	unsigned long adr, page;
! 
! 	/* Round it off to PAGE_SIZE */
! 	size += (PAGE_SIZE - 1);
! 	size &= ~(PAGE_SIZE - 1);
  
  	mem = vmalloc_32(size);
  	if (!mem)
  		return NULL;
***************
*** 367,393 ****
  	memset(mem, 0, size); /* Clear the ram out, no junk to the user */
  	adr = (unsigned long) mem;
  	while (size > 0) {
! 		mem_map_reserve(vmalloc_to_page((void *)adr));
  		adr += PAGE_SIZE;
! 		size -= PAGE_SIZE;
  	}
  
  	return mem;
  }
  
! static void
! rvfree(void *mem, unsigned long size)
  {
! 	unsigned long adr;
  
  	if (!mem)
  		return;
  
! 	adr = (unsigned long) mem;
! 	while ((long) size > 0) {
! 		mem_map_unreserve(vmalloc_to_page((void *)adr));
  		adr += PAGE_SIZE;
! 		size -= PAGE_SIZE;
  	}
  	vfree(mem);
  }
--- 282,318 ----
  	memset(mem, 0, size); /* Clear the ram out, no junk to the user */
  	adr = (unsigned long) mem;
  	while (size > 0) {
! 		page = kvirt_to_pa(adr);
! 		mem_map_reserve(virt_to_page(__va(page)));
  		adr += PAGE_SIZE;
! 		if (size > PAGE_SIZE)
! 			size -= PAGE_SIZE;
! 		else
! 			size = 0;
  	}
  
  	return mem;
  }
  
! static void rvfree(void *mem, unsigned long size)
  {
! 	unsigned long adr, page;
  
  	if (!mem)
  		return;
  
! 	size += (PAGE_SIZE - 1);
! 	size &= ~(PAGE_SIZE - 1);
! 
! 	adr=(unsigned long) mem;
! 	while (size > 0) {
! 		page = kvirt_to_pa(adr);
! 		mem_map_unreserve(virt_to_page(__va(page)));
  		adr += PAGE_SIZE;
! 		if (size > PAGE_SIZE)
! 			size -= PAGE_SIZE;
! 		else
! 			size = 0;
  	}
  	vfree(mem);
  }
***************
*** 402,475 ****
  static struct proc_dir_entry *ov511_proc_entry = NULL;
  extern struct proc_dir_entry *video_proc_entry;
  
- static struct file_operations ov511_control_fops = {
- 	ioctl:		ov51x_control_ioctl,
- };
- 
  #define YES_NO(x) ((x) ? "yes" : "no")
  
! /* /proc/video/ov511//info */
! static int
! ov511_read_proc_info(char *page, char **start, off_t off, int count, int *eof,
! 		     void *data)
  {
  	char *out = page;
! 	int i, len;
! 	struct usb_ov511 *ov = data;
! 	struct video_picture p;
! 	unsigned char exp;
! 
! 	if (!ov || !ov->dev)
! 		return -ENODEV;
! 
! 	sensor_get_picture(ov, &p);
! 	sensor_get_exposure(ov, &exp);
  
  	/* IMPORTANT: This output MUST be kept under PAGE_SIZE
  	 *            or we need to get more sophisticated. */
  
! 	out += sprintf(out, "driver_version  : %s\n", DRIVER_VERSION);
! 	out += sprintf(out, "custom_id       : %d\n", ov->customid);
! 	out += sprintf(out, "model           : %s\n", ov->desc);
! 	out += sprintf(out, "streaming       : %s\n", YES_NO(ov->streaming));
! 	out += sprintf(out, "grabbing        : %s\n", YES_NO(ov->grabbing));
! 	out += sprintf(out, "compress        : %s\n", YES_NO(ov->compress));
! 	out += sprintf(out, "subcapture      : %s\n", YES_NO(ov->sub_flag));
! 	out += sprintf(out, "sub_size        : %d %d %d %d\n",
! 		       ov->subx, ov->suby, ov->subw, ov->subh);
! 	out += sprintf(out, "data_format     : %s\n",
! 		       force_rgb ? "RGB" : "BGR");
! 	out += sprintf(out, "brightness      : %d\n", p.brightness >> 8);
! 	out += sprintf(out, "colour          : %d\n", p.colour >> 8);
! 	out += sprintf(out, "contrast        : %d\n", p.contrast >> 8);
! 	out += sprintf(out, "hue             : %d\n", p.hue >> 8);
! 	out += sprintf(out, "exposure        : %d\n", exp);
! 	out += sprintf(out, "num_frames      : %d\n", OV511_NUMFRAMES);
  	for (i = 0; i < OV511_NUMFRAMES; i++) {
! 		out += sprintf(out, "frame           : %d\n", i);
! 		out += sprintf(out, "  depth         : %d\n",
! 			       ov->frame[i].depth);
! 		out += sprintf(out, "  size          : %d %d\n",
! 			       ov->frame[i].width, ov->frame[i].height);
! 		out += sprintf(out, "  format        : %s\n",
! 			       symbolic(v4l1_plist, ov->frame[i].format));
! 		out += sprintf(out, "  data_buffer   : 0x%p\n",
! 			       ov->frame[i].data);
! 	}
! 	out += sprintf(out, "snap_enabled    : %s\n", YES_NO(ov->snap_enabled));
! 	out += sprintf(out, "bridge          : %s\n",
! 		       symbolic(brglist, ov->bridge));
! 	out += sprintf(out, "sensor          : %s\n",
! 		       symbolic(senlist, ov->sensor));
! 	out += sprintf(out, "packet_size     : %d\n", ov->packet_size);
! 	out += sprintf(out, "framebuffer     : 0x%p\n", ov->fbuf);
! 
  	len = out - page;
  	len -= off;
  	if (len < count) {
  		*eof = 1;
! 		if (len <= 0)
! 			return 0;
  	} else
  		len = count;
  
--- 327,398 ----
  static struct proc_dir_entry *ov511_proc_entry = NULL;
  extern struct proc_dir_entry *video_proc_entry;
  
  #define YES_NO(x) ((x) ? "yes" : "no")
  
! static int ov511_read_proc(char *page, char **start, off_t off,
!                           int count, int *eof, void *data)
  {
  	char *out = page;
! 	int i, j, len;
! 	struct usb_ov511 *ov511 = data;
  
  	/* IMPORTANT: This output MUST be kept under PAGE_SIZE
  	 *            or we need to get more sophisticated. */
  
! 	out += sprintf (out, "driver_version  : %s\n", DRIVER_VERSION);
! 	out += sprintf (out, "custom_id       : %d\n", ov511->customid);
! 	out += sprintf (out, "model           : %s\n", ov511->desc ?
! 		clist[ov511->desc].description : "unknown");
! 	out += sprintf (out, "streaming       : %s\n", YES_NO (ov511->streaming));
! 	out += sprintf (out, "grabbing        : %s\n", YES_NO (ov511->grabbing));
! 	out += sprintf (out, "compress        : %s\n", YES_NO (ov511->compress));
! 	out += sprintf (out, "subcapture      : %s\n", YES_NO (ov511->sub_flag));
! 	out += sprintf (out, "sub_size        : %d %d %d %d\n",
! 		ov511->subx, ov511->suby, ov511->subw, ov511->subh);
! 	out += sprintf (out, "data_format     : %s\n", force_rgb ? "RGB" : "BGR");
! 	out += sprintf (out, "brightness      : %d\n", ov511->brightness >> 8);
! 	out += sprintf (out, "colour          : %d\n", ov511->colour >> 8);
! 	out += sprintf (out, "contrast        : %d\n", ov511->contrast >> 8);
! 	out += sprintf (out, "num_frames      : %d\n", OV511_NUMFRAMES);
  	for (i = 0; i < OV511_NUMFRAMES; i++) {
! 		out += sprintf (out, "frame           : %d\n", i);
! 		out += sprintf (out, "  depth         : %d\n",
! 			ov511->frame[i].depth);
! 		out += sprintf (out, "  size          : %d %d\n",
! 			ov511->frame[i].width, ov511->frame[i].height);
! 		out += sprintf (out, "  format        : ");
! 		for (j = 0; plist[j].num >= 0; j++) {
! 			if (plist[j].num == ov511->frame[i].format) {
! 				out += sprintf (out, "%s\n", plist[j].name);
! 				break;
! 			}
! 		}
! 		if (plist[j].num < 0)
! 			out += sprintf (out, "unknown\n");
! 		out += sprintf (out, "  segsize       : %d\n",
! 			ov511->frame[i].segsize);
! 		out += sprintf (out, "  data_buffer   : 0x%p\n",
! 			ov511->frame[i].data);
! 	}
! 	out += sprintf (out, "snap_enabled    : %s\n", YES_NO (ov511->snap_enabled));
! 	out += sprintf (out, "bridge          : %s\n",
! 		ov511->bridge == BRG_OV511 ? "OV511" :
! 		ov511->bridge == BRG_OV511PLUS ? "OV511+" :
! 		"unknown");
! 	out += sprintf (out, "sensor          : %s\n",
! 		ov511->sensor == SEN_OV6620 ? "OV6620" :
! 		ov511->sensor == SEN_OV7610 ? "OV7610" :
! 		ov511->sensor == SEN_OV7620 ? "OV7620" :
! 		ov511->sensor == SEN_OV7620AE ? "OV7620AE" :
! 		"unknown");
! 	out += sprintf (out, "packet_size     : %d\n", ov511->packet_size);
! 	out += sprintf (out, "framebuffer     : 0x%p\n", ov511->fbuf);
! 	
  	len = out - page;
  	len -= off;
  	if (len < count) {
  		*eof = 1;
! 		if (len <= 0) return 0;
  	} else
  		len = count;
  
***************
*** 478,639 ****
  	return len;
  }
  
! /* /proc/video/ov511//button
!  *
!  * When the camera's button is pressed, the output of this will change from a
!  * 0 to a 1 (ASCII). It will retain this value until it is read, after which
!  * it will reset to zero.
!  *
!  * SECURITY NOTE: Since reading this file can change the state of the snapshot
!  * status, it is important for applications that open it to keep it locked
!  * against access by other processes, using flock() or a similar mechanism. No
!  * locking is provided by this driver.
!  */
! static int
! ov511_read_proc_button(char *page, char **start, off_t off, int count, int *eof,
! 		       void *data)
  {
! 	char *out = page;
! 	int len, status;
! 	struct usb_ov511 *ov = data;
! 
! 	if (!ov || !ov->dev)
! 		return -ENODEV;
! 
! 	status = ov51x_check_snapshot(ov);
! 	out += sprintf(out, "%d", status);
! 
! 	if (status)
! 		ov51x_clear_snapshot(ov);
! 
! 	len = out - page;
! 	len -= off;
! 	if (len < count) {
! 		*eof = 1;
! 		if (len <= 0)
! 			return 0;
! 	} else {
! 		len = count;
! 	}
! 
! 	*start = page + off;
! 
! 	return len;
  }
  
! static void
! create_proc_ov511_cam(struct usb_ov511 *ov)
  {
! 	char dirname[10];
! 
! 	if (!ov511_proc_entry || !ov)
  		return;
  
! 	/* Create per-device directory */
! 	snprintf(dirname, 10, "%d", ov->vdev.minor);
! 	PDEBUG(4, "creating /proc/video/ov511/%s/", dirname);
! 	ov->proc_devdir = create_proc_entry(dirname, S_IFDIR, ov511_proc_entry);
! 	if (!ov->proc_devdir)
! 		return;
! 	ov->proc_devdir->owner = THIS_MODULE;
  
! 	/* Create "info" entry (human readable device information) */
! 	PDEBUG(4, "creating /proc/video/ov511/%s/info", dirname);
! 	ov->proc_info = create_proc_read_entry("info", S_IFREG|S_IRUGO|S_IWUSR,
! 		ov->proc_devdir, ov511_read_proc_info, ov);
! 	if (!ov->proc_info)
  		return;
- 	ov->proc_info->owner = THIS_MODULE;
  
! 	/* Don't create it if old snapshot mode on (would cause race cond.) */
! 	if (!snapshot) {
! 		/* Create "button" entry (snapshot button status) */
! 		PDEBUG(4, "creating /proc/video/ov511/%s/button", dirname);
! 		ov->proc_button = create_proc_read_entry("button",
! 			S_IFREG|S_IRUGO|S_IWUSR, ov->proc_devdir,
! 			ov511_read_proc_button, ov);
! 		if (!ov->proc_button)
! 			return;
! 	}
! 	ov->proc_button->owner = THIS_MODULE;
! 
! 	/* Create "control" entry (ioctl() interface) */
! 	PDEBUG(4, "creating /proc/video/ov511/%s/control", dirname);
! 	lock_kernel();
! 	ov->proc_control = create_proc_entry("control",	S_IFREG|S_IRUGO|S_IWUSR,
! 		ov->proc_devdir);
! 	if (!ov->proc_control) {
! 		unlock_kernel();
! 		return;
! 	}
! 	ov->proc_control->owner = THIS_MODULE;
! 	ov->proc_control->data = ov;
! 	ov->proc_control->proc_fops = &ov511_control_fops;
! 	unlock_kernel();
  }
  
! static void
! destroy_proc_ov511_cam(struct usb_ov511 *ov)
  {
! 	char dirname[10];
! 
! 	if (!ov || !ov->proc_devdir)
  		return;
! 
! 	snprintf(dirname, 10, "%d", ov->vdev.minor);
! 
! 	/* Destroy "control" entry */
! 	if (ov->proc_control) {
! 		PDEBUG(4, "destroying /proc/video/ov511/%s/control", dirname);
! 		remove_proc_entry("control", ov->proc_devdir);
! 		ov->proc_control = NULL;
! 	}
! 
! 	/* Destroy "button" entry */
! 	if (ov->proc_button) {
! 		PDEBUG(4, "destroying /proc/video/ov511/%s/button", dirname);
! 		remove_proc_entry("button", ov->proc_devdir);
! 		ov->proc_button = NULL;
! 	}
! 
! 	/* Destroy "info" entry */
! 	if (ov->proc_info) {
! 		PDEBUG(4, "destroying /proc/video/ov511/%s/info", dirname);
! 		remove_proc_entry("info", ov->proc_devdir);
! 		ov->proc_info = NULL;
! 	}
! 
! 	/* Destroy per-device directory */
! 	PDEBUG(4, "destroying /proc/video/ov511/%s/", dirname);
! 	remove_proc_entry(dirname, ov511_proc_entry);
! 	ov->proc_devdir = NULL;
  }
  
! static void
! proc_ov511_create(void)
  {
  	/* No current standard here. Alan prefers /proc/video/ as it keeps
  	 * /proc "less cluttered than /proc/randomcardifoundintheshed/"
  	 * -claudio
  	 */
  	if (video_proc_entry == NULL) {
! 		err("Error: /proc/video/ does not exist");
  		return;
  	}
  
! 	ov511_proc_entry = create_proc_entry("ov511", S_IFDIR,
! 					     video_proc_entry);
  
  	if (ov511_proc_entry)
  		ov511_proc_entry->owner = THIS_MODULE;
  	else
! 		err("Unable to create /proc/video/ov511");
  }
  
! static void
! proc_ov511_destroy(void)
  {
! 	PDEBUG(3, "removing /proc/video/ov511");
  
  	if (ov511_proc_entry == NULL)
  		return;
--- 401,469 ----
  	return len;
  }
  
! static int ov511_write_proc(struct file *file, const char *buffer,
!                            unsigned long count, void *data)
  {
! 	return -EINVAL;
  }
  
! static void create_proc_ov511_cam (struct usb_ov511 *ov511)
  {
! 	char name[7];
! 	struct proc_dir_entry *ent;
! 	
! 	if (!ov511_proc_entry || !ov511)
  		return;
  
! 	sprintf(name, "video%d", ov511->vdev.minor);
! 	PDEBUG (4, "creating /proc/video/ov511/%s", name);
! 	
! 	ent = create_proc_entry(name, S_IFREG|S_IRUGO|S_IWUSR, ov511_proc_entry);
  
! 	if (!ent)
  		return;
  
! 	ent->data = ov511;
! 	ent->read_proc = ov511_read_proc;
! 	ent->write_proc = ov511_write_proc;
! 	ov511->proc_entry = ent;
  }
  
! static void destroy_proc_ov511_cam (struct usb_ov511 *ov511)
  {
! 	char name[7];
! 	
! 	if (!ov511 || !ov511->proc_entry)
  		return;
! 	
! 	sprintf(name, "video%d", ov511->vdev.minor);
! 	PDEBUG (4, "destroying %s", name);
! 	remove_proc_entry(name, ov511_proc_entry);
! 	ov511->proc_entry = NULL;
  }
  
! static void proc_ov511_create(void)
  {
  	/* No current standard here. Alan prefers /proc/video/ as it keeps
  	 * /proc "less cluttered than /proc/randomcardifoundintheshed/"
  	 * -claudio
  	 */
  	if (video_proc_entry == NULL) {
! 		err("Unable to initialise /proc/video/ov511");
  		return;
  	}
  
! 	ov511_proc_entry = create_proc_entry("ov511", S_IFDIR, video_proc_entry);
  
  	if (ov511_proc_entry)
  		ov511_proc_entry->owner = THIS_MODULE;
  	else
! 		err("Unable to initialise /proc/ov511");
  }
  
! static void proc_ov511_destroy(void)
  {
! 	PDEBUG (3, "removing /proc/video/ov511");
  
  	if (ov511_proc_entry == NULL)
  		return;
***************
*** 644,3053 ****
  
  /**********************************************************************
   *
!  * Register I/O
   *
   **********************************************************************/
  
! /* Write an OV51x register */
! static int
! reg_w(struct usb_ov511 *ov, unsigned char reg, unsigned char value)
  {
  	int rc;
  
! 	PDEBUG(5, "0x%02X:0x%02X", reg, value);
  
! 	down(&ov->cbuf_lock);
! 	ov->cbuf[0] = value;
! 	rc = usb_control_msg(ov->dev,
! 			     usb_sndctrlpipe(ov->dev, 0),
! 			     (ov->bclass == BCL_OV518)?1:2 /* REG_IO */,
! 			     USB_TYPE_VENDOR | USB_RECIP_DEVICE,
! 			     0, (__u16)reg, &ov->cbuf[0], 1, HZ);
! 	up(&ov->cbuf_lock);
  
  	if (rc < 0)
! 		err("reg write: error %d: %s", rc, symbolic(urb_errlist, rc));
  
  	return rc;
  }
  
- /* Read from an OV51x register */
  /* returns: negative is error, pos or zero is data */
! static int
! reg_r(struct usb_ov511 *ov, unsigned char reg)
  {
  	int rc;
  
! 	down(&ov->cbuf_lock);
! 	rc = usb_control_msg(ov->dev,
! 			     usb_rcvctrlpipe(ov->dev, 0),
! 			     (ov->bclass == BCL_OV518)?1:3 /* REG_IO */,
! 			     USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
! 			     0, (__u16)reg, &ov->cbuf[0], 1, HZ);
! 
  	if (rc < 0) {
! 		err("reg read: error %d: %s", rc, symbolic(urb_errlist, rc));
  	} else {
! 		rc = ov->cbuf[0];
! 		PDEBUG(5, "0x%02X:0x%02X", reg, ov->cbuf[0]);
! 	}
! 
! 	up(&ov->cbuf_lock);
! 
! 	return rc;
! }
! 
! /*
!  * Writes bits at positions specified by mask to an OV51x reg. Bits that are in
!  * the same position as 1's in "mask" are cleared and set to "value". Bits
!  * that are in the same position as 0's in "mask" are preserved, regardless
!  * of their respective state in "value".
!  */
! static int
! reg_w_mask(struct usb_ov511 *ov,
! 	   unsigned char reg,
! 	   unsigned char value,
! 	   unsigned char mask)
! {
! 	int ret;
! 	unsigned char oldval, newval;
! 
! 	ret = reg_r(ov, reg);
! 	if (ret < 0)
! 		return ret;
! 
! 	oldval = (unsigned char) ret;
! 	oldval &= (~mask);		/* Clear the masked bits */
! 	value &= mask;			/* Enforce mask on value */
! 	newval = oldval | value;	/* Set the desired bits */
! 
! 	return (reg_w(ov, reg, newval));
! }
! 
! /* 
!  * Writes multiple (n) byte value to a single register. Only valid with certain
!  * registers (0x30 and 0xc4 - 0xce).
!  */
! static int
! ov518_reg_w32(struct usb_ov511 *ov, unsigned char reg, u32 val, int n)
! {
! 	int rc;
! 
! 	PDEBUG(5, "0x%02X:%7d, n=%d", reg, val, n);
! 
! 	down(&ov->cbuf_lock);
! 
! 	*((u32 *)ov->cbuf) = __cpu_to_le32(val);
! 
! 	rc = usb_control_msg(ov->dev,
! 			     usb_sndctrlpipe(ov->dev, 0),
! 			     1 /* REG_IO */,
! 			     USB_TYPE_VENDOR | USB_RECIP_DEVICE,
! 			     0, (__u16)reg, ov->cbuf, n, HZ);
! 	up(&ov->cbuf_lock);
! 
! 	if (rc < 0)
! 		err("reg write multiple: error %d: %s", rc,
! 		    symbolic(urb_errlist, rc));
! 
! 	return rc;
! }
! 
! static int
! ov511_upload_quan_tables(struct usb_ov511 *ov)
! {
! 	unsigned char *pYTable = yQuanTable511;
! 	unsigned char *pUVTable = uvQuanTable511;
! 	unsigned char val0, val1;
! 	int i, rc, reg = R511_COMP_LUT_BEGIN;
! 
! 	PDEBUG(4, "Uploading quantization tables");
! 
! 	for (i = 0; i < OV511_QUANTABLESIZE / 2; i++) {
! 		if (ENABLE_Y_QUANTABLE)	{
! 			val0 = *pYTable++;
! 			val1 = *pYTable++;
! 			val0 &= 0x0f;
! 			val1 &= 0x0f;
! 			val0 |= val1 << 4;
! 			rc = reg_w(ov, reg, val0);
! 			if (rc < 0)
! 				return rc;
! 		}
! 
! 		if (ENABLE_UV_QUANTABLE) {
! 			val0 = *pUVTable++;
! 			val1 = *pUVTable++;
! 			val0 &= 0x0f;
! 			val1 &= 0x0f;
! 			val0 |= val1 << 4;
! 			rc = reg_w(ov, reg + OV511_QUANTABLESIZE/2, val0);
! 			if (rc < 0)
! 				return rc;
! 		}
! 
! 		reg++;
! 	}
! 
! 	return 0;
! }
! 
! /* OV518 quantization tables are 8x4 (instead of 8x8) */
! static int
! ov518_upload_quan_tables(struct usb_ov511 *ov)
! {
! 	unsigned char *pYTable = yQuanTable518;
! 	unsigned char *pUVTable = uvQuanTable518;
! 	unsigned char val0, val1;
! 	int i, rc, reg = R511_COMP_LUT_BEGIN;
! 
! 	PDEBUG(4, "Uploading quantization tables");
! 
! 	for (i = 0; i < OV518_QUANTABLESIZE / 2; i++) {
! 		if (ENABLE_Y_QUANTABLE) {
! 			val0 = *pYTable++;
! 			val1 = *pYTable++;
! 			val0 &= 0x0f;
! 			val1 &= 0x0f;
! 			val0 |= val1 << 4;
! 			rc = reg_w(ov, reg, val0);
! 			if (rc < 0)
! 				return rc;
! 		}
! 
! 		if (ENABLE_UV_QUANTABLE) {
! 			val0 = *pUVTable++;
! 			val1 = *pUVTable++;
! 			val0 &= 0x0f;
! 			val1 &= 0x0f;
! 			val0 |= val1 << 4;
! 			rc = reg_w(ov, reg + OV518_QUANTABLESIZE/2, val0);
! 			if (rc < 0)
! 				return rc;
! 		}
! 
! 		reg++;
  	}
- 
- 	return 0;
- }
- 
- static int
- ov51x_reset(struct usb_ov511 *ov, unsigned char reset_type)
- {
- 	int rc;
- 
- 	/* Setting bit 0 not allowed on 518/518Plus */
- 	if (ov->bclass == BCL_OV518)
- 		reset_type &= 0xfe;
- 
- 	PDEBUG(4, "Reset: type=0x%02X", reset_type);
- 
- 	rc = reg_w(ov, R51x_SYS_RESET, reset_type);
- 	rc = reg_w(ov, R51x_SYS_RESET, 0);
- 
- 	if (rc < 0)
- 		err("reset: command failed");
- 
- 	return rc;
- }
- 
- /**********************************************************************
-  *
-  * Low-level I2C I/O functions
-  *
-  **********************************************************************/
- 
- /* NOTE: Do not call this function directly!
-  * The OV518 I2C I/O procedure is different, hence, this function.
-  * This is normally only called from i2c_w(). Note that this function
-  * always succeeds regardless of whether the sensor is present and working.
-  */
- static int
- ov518_i2c_write_internal(struct usb_ov511 *ov,
- 			 unsigned char reg,
- 			 unsigned char value)
- {
- 	int rc;
- 
- 	PDEBUG(5, "0x%02X:0x%02X", reg, value);
- 
- 	/* Select camera register */
- 	rc = reg_w(ov, R51x_I2C_SADDR_3, reg);
- 	if (rc < 0) return rc;
- 
- 	/* Write "value" to I2C data port of OV511 */
- 	rc = reg_w(ov, R51x_I2C_DATA, value);
- 	if (rc < 0) return rc;
- 
- 	/* Initiate 3-byte write cycle */
- 	rc = reg_w(ov, R518_I2C_CTL, 0x01);
- 	if (rc < 0) return rc;
- 
- 	return 0;
  }
  
! /* NOTE: Do not call this function directly! */
! static int
! ov511_i2c_write_internal(struct usb_ov511 *ov,
! 			 unsigned char reg,
! 			 unsigned char value)
  {
  	int rc, retries;
  
! 	PDEBUG(5, "0x%02X:0x%02X", reg, value);
  
  	/* Three byte write cycle */
  	for (retries = OV511_I2C_RETRIES; ; ) {
  		/* Select camera register */
! 		rc = reg_w(ov, R51x_I2C_SADDR_3, reg);
! 		if (rc < 0) return rc;
  
  		/* Write "value" to I2C data port of OV511 */
! 		rc = reg_w(ov, R51x_I2C_DATA, value);
! 		if (rc < 0) return rc;
  
  		/* Initiate 3-byte write cycle */
! 		rc = reg_w(ov, R511_I2C_CTL, 0x01);
! 		if (rc < 0) return rc;
  
! 		do rc = reg_r(ov, R511_I2C_CTL);
  		while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
! 		if (rc < 0) return rc;
  
  		if ((rc&2) == 0) /* Ack? */
  			break;
  #if 0
! 		/* I2C abort */
! 		reg_w(ov, R511_I2C_CTL, 0x10);
  #endif
  		if (--retries < 0) {
  			err("i2c write retries exhausted");
! 			return -1;
  		}
  	}
  
  	return 0;
- }
- 
- /* NOTE: Do not call this function directly!
-  * The OV518 I2C I/O procedure is different, hence, this function.
-  * This is normally only called from i2c_r(). Note that this function
-  * always succeeds regardless of whether the sensor is present and working.
-  */
- static int
- ov518_i2c_read_internal(struct usb_ov511 *ov, unsigned char reg)
- {
- 	int rc, value;
- 
- 	/* Select camera register */
- 	rc = reg_w(ov, R51x_I2C_SADDR_2, reg);
- 	if (rc < 0) return rc;
- 
- 	/* Initiate 2-byte write cycle */
- 	rc = reg_w(ov, R518_I2C_CTL, 0x03);
- 	if (rc < 0) return rc;
- 
- 	/* Initiate 2-byte read cycle */
- 	rc = reg_w(ov, R518_I2C_CTL, 0x05);
- 	if (rc < 0) return rc;
  
! 	value = reg_r(ov, R51x_I2C_DATA);
! 
! 	PDEBUG(5, "0x%02X:0x%02X", reg, value);
! 
! 	return value;
  }
  
! /* NOTE: Do not call this function directly!
!  * returns: negative is error, pos or zero is data */
! static int
! ov511_i2c_read_internal(struct usb_ov511 *ov, unsigned char reg)
  {
  	int rc, value, retries;
  
  	/* Two byte write cycle */
  	for (retries = OV511_I2C_RETRIES; ; ) {
  		/* Select camera register */
! 		rc = reg_w(ov, R51x_I2C_SADDR_2, reg);
! 		if (rc < 0) return rc;
  
  		/* Initiate 2-byte write cycle */
! 		rc = reg_w(ov, R511_I2C_CTL, 0x03);
! 		if (rc < 0) return rc;
  
! 		do rc = reg_r(ov, R511_I2C_CTL);
  		while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
! 		if (rc < 0) return rc;
  
  		if ((rc&2) == 0) /* Ack? */
  			break;
  
! 		/* I2C abort */
! 		reg_w(ov, R511_I2C_CTL, 0x10);
  
  		if (--retries < 0) {
  			err("i2c write retries exhausted");
! 			return -1;
  		}
  	}
  
  	/* Two byte read cycle */
  	for (retries = OV511_I2C_RETRIES; ; ) {
  		/* Initiate 2-byte read cycle */
! 		rc = reg_w(ov, R511_I2C_CTL, 0x05);
! 		if (rc < 0) return rc;
  
! 		do rc = reg_r(ov, R511_I2C_CTL);
  		while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
! 		if (rc < 0) return rc;
  
  		if ((rc&2) == 0) /* Ack? */
  			break;
  
! 		/* I2C abort */
! 		rc = reg_w(ov, R511_I2C_CTL, 0x10);
! 		if (rc < 0) return rc;
  
  		if (--retries < 0) {
  			err("i2c read retries exhausted");
! 			return -1;
  		}
  	}
  
! 	value = reg_r(ov, R51x_I2C_DATA);
! 
! 	PDEBUG(5, "0x%02X:0x%02X", reg, value);
  
! 	/* This is needed to make i2c_w() work */
! 	rc = reg_w(ov, R511_I2C_CTL, 0x05);
  	if (rc < 0)
! 		return rc;
! 
  	return value;
  }
  
! /* returns: negative is error, pos or zero is data */
! static int
! i2c_r(struct usb_ov511 *ov, unsigned char reg)
  {
  	int rc;
  
! 	down(&ov->i2c_lock);
! 
! 	if (ov->bclass == BCL_OV518)
! 		rc = ov518_i2c_read_internal(ov, reg);
! 	else
! 		rc = ov511_i2c_read_internal(ov, reg);
! 
! 	up(&ov->i2c_lock);
  
  	return rc;
  }
  
! static int
! i2c_w(struct usb_ov511 *ov, unsigned char reg, unsigned char value)
! {
! 	int rc;
! 
! 	down(&ov->i2c_lock);
! 
! 	if (ov->bclass == BCL_OV518)
! 		rc = ov518_i2c_write_internal(ov, reg, value);
! 	else
! 		rc = ov511_i2c_write_internal(ov, reg, value);
! 
! 	up(&ov->i2c_lock);
! 
! 	return rc;
! }
! 
! /* Do not call this function directly! */
! static int
! ov51x_i2c_write_mask_internal(struct usb_ov511 *ov,
! 			      unsigned char reg,
! 			      unsigned char value,
! 			      unsigned char mask)
! {
! 	int rc;
! 	unsigned char oldval, newval;
! 
! 	if (mask == 0xff) {
! 		newval = value;
! 	} else {
! 		if (ov->bclass == BCL_OV518)
! 			rc = ov518_i2c_read_internal(ov, reg);
! 		else
! 			rc = ov511_i2c_read_internal(ov, reg);
! 		if (rc < 0)
! 			return rc;
! 
! 		oldval = (unsigned char) rc;
! 		oldval &= (~mask);		/* Clear the masked bits */
! 		value &= mask;			/* Enforce mask on value */
! 		newval = oldval | value;	/* Set the desired bits */
! 	}
! 
! 	if (ov->bclass == BCL_OV518)
! 		return (ov518_i2c_write_internal(ov, reg, newval));
! 	else
! 		return (ov511_i2c_write_internal(ov, reg, newval));
! }
! 
! /* Writes bits at positions specified by mask to an I2C reg. Bits that are in
!  * the same position as 1's in "mask" are cleared and set to "value". Bits
!  * that are in the same position as 0's in "mask" are preserved, regardless
!  * of their respective state in "value".
!  */
! static int
! i2c_w_mask(struct usb_ov511 *ov,
! 	   unsigned char reg,
! 	   unsigned char value,
! 	   unsigned char mask)
! {
! 	int rc;
! 
! 	down(&ov->i2c_lock);
! 	rc = ov51x_i2c_write_mask_internal(ov, reg, value, mask);
! 	up(&ov->i2c_lock);
! 
! 	return rc;
! }
! 
! /* Set the read and write slave IDs. The "slave" argument is the write slave,
!  * and the read slave will be set to (slave + 1). ov->i2c_lock should be held
!  * when calling this. This should not be called from outside the i2c I/O
!  * functions.
!  */
! static inline int
! i2c_set_slave_internal(struct usb_ov511 *ov, unsigned char slave)
! {
! 	int rc;
! 
! 	rc = reg_w(ov, R51x_I2C_W_SID, slave);
! 	if (rc < 0) return rc;
! 
! 	rc = reg_w(ov, R51x_I2C_R_SID, slave + 1);
! 	if (rc < 0) return rc;
! 
! 	return 0;
! }
! 
! #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
! 
! /* Write to a specific I2C slave ID and register, using the specified mask */
! static int
! i2c_w_slave(struct usb_ov511 *ov,
! 	    unsigned char slave,
! 	    unsigned char reg,
! 	    unsigned char value,
! 	    unsigned char mask)
! {
! 	int rc = 0;
! 
! 	down(&ov->i2c_lock);
! 
! 	/* Set new slave IDs */
! 	rc = i2c_set_slave_internal(ov, slave);
! 	if (rc < 0) goto out;
! 
! 	rc = ov51x_i2c_write_mask_internal(ov, reg, value, mask);
! 
! out:
! 	/* Restore primary IDs */
! 	if (i2c_set_slave_internal(ov, ov->primary_i2c_slave) < 0)
! 		err("Couldn't restore primary I2C slave");
! 
! 	up(&ov->i2c_lock);
! 	return rc;
! }
! 
! /* Read from a specific I2C slave ID and register */
! static int
! i2c_r_slave(struct usb_ov511 *ov,
! 	    unsigned char slave,
! 	    unsigned char reg)
! {
! 	int rc;
! 
! 	down(&ov->i2c_lock);
! 
! 	/* Set new slave IDs */
! 	rc = i2c_set_slave_internal(ov, slave);
! 	if (rc < 0) goto out;
! 
! 	if (ov->bclass == BCL_OV518)
! 		rc = ov518_i2c_read_internal(ov, reg);
! 	else
! 		rc = ov511_i2c_read_internal(ov, reg);
! 
! out:
! 	/* Restore primary IDs */
! 	if (i2c_set_slave_internal(ov, ov->primary_i2c_slave) < 0)
! 		err("Couldn't restore primary I2C slave");
! 
! 	up(&ov->i2c_lock);
! 	return rc;
! }
! 
! #endif /* defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS) */
! 
! /* Sets I2C read and write slave IDs. Returns <0 for error */
! static int
! ov51x_set_slave_ids(struct usb_ov511 *ov, unsigned char sid)
! {
! 	int rc;
! 
! 	down(&ov->i2c_lock);
! 
! 	rc = i2c_set_slave_internal(ov, sid);
! 	if (rc < 0) goto out;
! 
! 	// FIXME: Is this actually necessary?
! 	rc = ov51x_reset(ov, OV511_RESET_NOREGS);
! 	if (rc < 0) goto out;
! 
! out:
! 	up(&ov->i2c_lock);
! 	return rc;
! }
! 
! static int
! write_regvals(struct usb_ov511 *ov, struct ov511_regvals * pRegvals)
! {
! 	int rc;
! 
! 	while (pRegvals->bus != OV511_DONE_BUS) {
! 		if (pRegvals->bus == OV511_REG_BUS) {
! 			if ((rc = reg_w(ov, pRegvals->reg, pRegvals->val)) < 0)
! 				return rc;
! 		} else if (pRegvals->bus == OV511_I2C_BUS) {
! 			if ((rc = i2c_w(ov, pRegvals->reg, pRegvals->val)) < 0)
! 				return rc;
! 		} else {
! 			err("Bad regval array");
! 			return -1;
! 		}
! 		pRegvals++;
! 	}
! 	return 0;
! }
! 
! #ifdef OV511_DEBUG
! static void
! dump_i2c_range(struct usb_ov511 *ov, int reg1, int regn)
  {
  	int i;
  	int rc;
! 
! 	for (i = reg1; i <= regn; i++) {
! 		rc = i2c_r(ov, i);
! 		info("Sensor[0x%02X] = 0x%02X", i, rc);
  	}
  }
  
! static void
! dump_i2c_regs(struct usb_ov511 *ov)
  {
! 	info("I2C REGS");
! 	dump_i2c_range(ov, 0x00, 0x7C);
  }
  
! static void
! dump_reg_range(struct usb_ov511 *ov, int reg1, int regn)
  {
  	int i;
  	int rc;
! 
! 	for (i = reg1; i <= regn; i++) {
! 		rc = reg_r(ov, i);
! 		info("OV511[0x%02X] = 0x%02X", i, rc);
  	}
  }
  
! /* FIXME: Should there be an OV518 version of this? */
! static void
! ov511_dump_regs(struct usb_ov511 *ov)
  {
! 	info("CAMERA INTERFACE REGS");
! 	dump_reg_range(ov, 0x10, 0x1f);
! 	info("DRAM INTERFACE REGS");
! 	dump_reg_range(ov, 0x20, 0x23);
! 	info("ISO FIFO REGS");
! 	dump_reg_range(ov, 0x30, 0x31);
! 	info("PIO REGS");
! 	dump_reg_range(ov, 0x38, 0x39);
! 	dump_reg_range(ov, 0x3e, 0x3e);
! 	info("I2C REGS");
! 	dump_reg_range(ov, 0x40, 0x49);
! 	info("SYSTEM CONTROL REGS");
! 	dump_reg_range(ov, 0x50, 0x55);
! 	dump_reg_range(ov, 0x5e, 0x5f);
! 	info("OmniCE REGS");
! 	dump_reg_range(ov, 0x70, 0x79);
! 	/* NOTE: Quantization tables are not readable. You will get the value
! 	 * in reg. 0x79 for every table register */
! 	dump_reg_range(ov, 0x80, 0x9f);
! 	dump_reg_range(ov, 0xa0, 0xbf);
  
  }
  #endif
- 
- /*****************************************************************************/
- 
- /* Temporarily stops OV511 from functioning. Must do this before changing
-  * registers while the camera is streaming */
- static inline int
- ov51x_stop(struct usb_ov511 *ov)
- {
- 	PDEBUG(4, "stopping");
- 	ov->stopped = 1;
- 	if (ov->bclass == BCL_OV518)
- 		return (reg_w_mask(ov, R51x_SYS_RESET, 0x3a, 0x3a));
- 	else
- 		return (reg_w(ov, R51x_SYS_RESET, 0x3d));
- }
- 
- /* Restarts OV511 after ov511_stop() is called. Has no effect if it is not
-  * actually stopped (for performance). */
- static inline int
- ov51x_restart(struct usb_ov511 *ov)
- {
- 	if (ov->stopped) {
- 		PDEBUG(4, "restarting");
- 		ov->stopped = 0;
- 
- 		/* Reinitialize the stream */
- 		if (ov->bclass == BCL_OV518)
- 			reg_w(ov, 0x2f, 0x80);
- 
- 		return (reg_w(ov, R51x_SYS_RESET, 0x00));
- 	}
- 
- 	return 0;
- }
- 
- /* Resets the hardware snapshot button */
- static void
- ov51x_clear_snapshot(struct usb_ov511 *ov)
- {
- 	if (ov->bclass == BCL_OV511) {
- 		reg_w(ov, R51x_SYS_SNAP, 0x01);
- 		reg_w(ov, R51x_SYS_SNAP, 0x03);
- 		reg_w(ov, R51x_SYS_SNAP, 0x01);
- 	} else if (ov->bclass == BCL_OV518) {
- 		warn("snapshot reset not supported yet on OV518(+)");
- 	} else {
- 		err("clear snap: invalid bridge type");
- 	}
- }
- 
- #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
- /* Checks the status of the snapshot button. Returns 1 if it was pressed since
-  * it was last cleared, and zero in all other cases (including errors) */
- static int
- ov51x_check_snapshot(struct usb_ov511 *ov)
- {
- 	int ret, status = 0;
- 
- 	if (ov->bclass == BCL_OV511) {
- 		ret = reg_r(ov, R51x_SYS_SNAP);
- 		if (ret < 0) {
- 			err("Error checking snspshot status (%d)", ret);
- 		} else if (ret & 0x08) {
- 			status = 1;
- 		}
- 	} else if (ov->bclass == BCL_OV518) {
- 		warn("snapshot check not supported yet on OV518(+)");
- 	} else {
- 		err("check snap: invalid bridge type");
- 	}
- 
- 	return status;
- }
  #endif
  
! /* This does an initial reset of an OmniVision sensor and ensures that I2C
!  * is synchronized. Returns <0 for failure.
!  */
! static int
! init_ov_sensor(struct usb_ov511 *ov)
! {
! 	int i, success;
! 
! 	/* Reset the sensor */
! 	if (i2c_w(ov, 0x12, 0x80) < 0) return -EIO;
! 
! 	/* Wait for it to initialize */
! 	schedule_timeout (1 + 150 * HZ / 1000);
! 
! 	for (i = 0, success = 0; i < i2c_detect_tries && !success; i++) {
! 		if ((i2c_r(ov, OV7610_REG_ID_HIGH) == 0x7F) &&
! 		    (i2c_r(ov, OV7610_REG_ID_LOW) == 0xA2)) {
! 			success = 1;
! 			continue;
! 		}
! 
! 		/* Reset the sensor */
! 		if (i2c_w(ov, 0x12, 0x80) < 0) return -EIO;
! 		/* Wait for it to initialize */
! 		schedule_timeout(1 + 150 * HZ / 1000);
! 		/* Dummy read to sync I2C */
! 		if (i2c_r(ov, 0x00) < 0) return -EIO;
! 	}
! 
! 	if (!success)
! 		return -EIO;
! 
! 	PDEBUG(1, "I2C synced in %d attempt(s)", i);
! 
! 	return 0;
! }
! 
! static int
! ov511_set_packet_size(struct usb_ov511 *ov, int size)
! {
! 	int alt, mult;
! 
! 	if (ov51x_stop(ov) < 0)
! 		return -EIO;
! 
! 	mult = size >> 5;
! 
! 	if (ov->bridge == BRG_OV511) {
! 		if (size == 0) alt = OV511_ALT_SIZE_0;
! 		else if (size == 257) alt = OV511_ALT_SIZE_257;
! 		else if (size == 513) alt = OV511_ALT_SIZE_513;
! 		else if (size == 769) alt = OV511_ALT_SIZE_769;
! 		else if (size == 993) alt = OV511_ALT_SIZE_993;
! 		else {
! 			err("Set packet size: invalid size (%d)", size);
! 			return -EINVAL;
! 		}
! 	} else if (ov->bridge == BRG_OV511PLUS) {
! 		if (size == 0) alt = OV511PLUS_ALT_SIZE_0;
! 		else if (size == 33) alt = OV511PLUS_ALT_SIZE_33;
! 		else if (size == 129) alt = OV511PLUS_ALT_SIZE_129;
! 		else if (size == 257) alt = OV511PLUS_ALT_SIZE_257;
! 		else if (size == 385) alt = OV511PLUS_ALT_SIZE_385;
! 		else if (size == 513) alt = OV511PLUS_ALT_SIZE_513;
! 		else if (size == 769) alt = OV511PLUS_ALT_SIZE_769;
! 		else if (size == 961) alt = OV511PLUS_ALT_SIZE_961;
! 		else {
! 			err("Set packet size: invalid size (%d)", size);
! 			return -EINVAL;
! 		}
! 	} else {
! 		err("Set packet size: Invalid bridge type");
! 		return -EINVAL;
! 	}
! 
! 	PDEBUG(3, "%d, mult=%d, alt=%d", size, mult, alt);
! 
! 	if (reg_w(ov, R51x_FIFO_PSIZE, mult) < 0)
! 		return -EIO;
! 
! 	if (usb_set_interface(ov->dev, ov->iface, alt) < 0) {
! 		err("Set packet size: set interface error");
! 		return -EBUSY;
! 	}
! 
! 	if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
! 		return -EIO;
! 
! 	ov->packet_size = size;
! 
! 	if (ov51x_restart(ov) < 0)
! 		return -EIO;
! 
! 	return 0;
! }
! 
! /* Note: Unlike the OV511/OV511+, the size argument does NOT include the
!  * optional packet number byte. The actual size *is* stored in ov->packet_size,
!  * though. */
! static int
! ov518_set_packet_size(struct usb_ov511 *ov, int size)
! {
! 	int alt;
! 
! 	if (ov51x_stop(ov) < 0)
! 		return -EIO;
! 
! 	if (ov->bclass == BCL_OV518) {
! 		if (size == 0) alt = OV518_ALT_SIZE_0;
! 		else if (size == 128) alt = OV518_ALT_SIZE_128;
! 		else if (size == 256) alt = OV518_ALT_SIZE_256;
! 		else if (size == 384) alt = OV518_ALT_SIZE_384;
! 		else if (size == 512) alt = OV518_ALT_SIZE_512;
! 		else if (size == 640) alt = OV518_ALT_SIZE_640;
! 		else if (size == 768) alt = OV518_ALT_SIZE_768;
! 		else if (size == 896) alt = OV518_ALT_SIZE_896;
! 		else {
! 			err("Set packet size: invalid size (%d)", size);
! 			return -EINVAL;
! 		}
! 	} else {
! 		err("Set packet size: Invalid bridge type");
! 		return -EINVAL;
! 	}
! 
! 	PDEBUG(3, "%d, alt=%d", size, alt);
! 
! 	ov->packet_size = size;
! 	if (size > 0) {
! 		/* Program ISO FIFO size reg (packet number isn't included) */
! 		ov518_reg_w32(ov, 0x30, size, 2);
! 
! 		if (ov->packet_numbering)
! 			++ov->packet_size;
! 	}
! 
! 	if (usb_set_interface(ov->dev, ov->iface, alt) < 0) {
! 		err("Set packet size: set interface error");
! 		return -EBUSY;
! 	}
! 
! 	/* Initialize the stream */
! 	if (reg_w(ov, 0x2f, 0x80) < 0)
! 		return -EIO;
! 
! 	if (ov51x_restart(ov) < 0)
! 		return -EIO;
! 
! 	if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
! 		return -EIO;
! 
! 	return 0;
! }
! 
! /* Upload compression params and quantization tables. Returns 0 for success. */
! static int
! ov511_init_compression(struct usb_ov511 *ov)
  {
! 	int rc = 0;
! 
! 	if (!ov->compress_inited) {
! 		reg_w(ov, 0x70, phy);
! 		reg_w(ov, 0x71, phuv);
! 		reg_w(ov, 0x72, pvy);
! 		reg_w(ov, 0x73, pvuv);
! 		reg_w(ov, 0x74, qhy);
! 		reg_w(ov, 0x75, qhuv);
! 		reg_w(ov, 0x76, qvy);
! 		reg_w(ov, 0x77, qvuv);
  
! 		if (ov511_upload_quan_tables(ov) < 0) {
! 			err("Error uploading quantization tables");
! 			rc = -EIO;
! 			goto out;
! 		}
! 	}
  
- 	ov->compress_inited = 1;
- out:
  	return rc;
  }
  
! /* Upload compression params and quantization tables. Returns 0 for success. */
! static int
! ov518_init_compression(struct usb_ov511 *ov)
! {
! 	int rc = 0;
! 
! 	if (!ov->compress_inited) {
! 		if (ov518_upload_quan_tables(ov) < 0) {
! 			err("Error uploading quantization tables");
! 			rc = -EIO;
! 			goto out;
! 		}
! 	}
! 
! 	ov->compress_inited = 1;
! out:
! 	return rc;
! }
! 
! /* -------------------------------------------------------------------------- */
! 
! /* Sets sensor's contrast setting to "val" */
! static int
! sensor_set_contrast(struct usb_ov511 *ov, unsigned short val)
! {
! 	int rc;
! 
! 	PDEBUG(3, "%d", val);
! 
! 	if (ov->stop_during_set)
! 		if (ov51x_stop(ov) < 0)
! 			return -EIO;
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV6620:
! 	{
! 		rc = i2c_w(ov, OV7610_REG_CNT, val >> 8);
! 		if (rc < 0)
! 			goto out;
! 		break;
! 	}
! 	case SEN_OV6630:
! 	{
! 		rc = i2c_w_mask(ov, OV7610_REG_CNT, val >> 12, 0x0f);
! 		if (rc < 0)
! 			goto out;
! 		break;
! 	}
! 	case SEN_OV7620:
! 	{
! 		unsigned char ctab[] = {
! 			0x01, 0x05, 0x09, 0x11, 0x15, 0x35, 0x37, 0x57,
! 			0x5b, 0xa5, 0xa7, 0xc7, 0xc9, 0xcf, 0xef, 0xff
! 		};
! 
! 		/* Use Y gamma control instead. Bit 0 enables it. */
! 		rc = i2c_w(ov, 0x64, ctab[val>>12]);
! 		if (rc < 0)
! 			goto out;
! 		break;
! 	}
! 	case SEN_SAA7111A:
! 	{
! 		rc = i2c_w(ov, 0x0b, val >> 9);
! 		if (rc < 0)
! 			goto out;
! 		break;
! 	}
! 	default:
! 	{
! 		PDEBUG(3, "Unsupported with this sensor");
! 		rc = -EPERM;
! 		goto out;
! 	}
! 	}
! 
! 	rc = 0;		/* Success */
! 	ov->contrast = val;
! out:
! 	if (ov51x_restart(ov) < 0)
! 		return -EIO;
! 
! 	return rc;
! }
! 
! /* Gets sensor's contrast setting */
! static int
! sensor_get_contrast(struct usb_ov511 *ov, unsigned short *val)
! {
! 	int rc;
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV6620:
! 		rc = i2c_r(ov, OV7610_REG_CNT);
! 		if (rc < 0)
! 			return rc;
! 		else
! 			*val = rc << 8;
! 		break;
! 	case SEN_OV6630:
! 		rc = i2c_r(ov, OV7610_REG_CNT);
! 		if (rc < 0)
! 			return rc;
! 		else
! 			*val = rc << 12;
! 		break;
! 	case SEN_OV7620:
! 		/* Use Y gamma reg instead. Bit 0 is the enable bit. */
! 		rc = i2c_r(ov, 0x64);
! 		if (rc < 0)
! 			return rc;
! 		else
! 			*val = (rc & 0xfe) << 8;
! 		break;
! 	case SEN_SAA7111A:
! 		*val = ov->contrast;
! 		break;
! 	default:
! 		PDEBUG(3, "Unsupported with this sensor");
! 		return -EPERM;
! 	}
! 
! 	PDEBUG(3, "%d", *val);
! 	ov->contrast = *val;
! 
! 	return 0;
! }
! 
! /* -------------------------------------------------------------------------- */
! 
! /* Sets sensor's brightness setting to "val" */
! static int
! sensor_set_brightness(struct usb_ov511 *ov, unsigned short val)
! {
! 	int rc;
! 
! 	PDEBUG(4, "%d", val);
! 
! 	if (ov->stop_during_set)
! 		if (ov51x_stop(ov) < 0)
! 			return -EIO;
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV76BE:
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 		rc = i2c_w(ov, OV7610_REG_BRT, val >> 8);
! 		if (rc < 0)
! 			goto out;
! 		break;
! 	case SEN_OV7620:
! 		/* 7620 doesn't like manual changes when in auto mode */
! 		if (!ov->auto_brt) {
! 			rc = i2c_w(ov, OV7610_REG_BRT, val >> 8);
! 			if (rc < 0)
! 				goto out;
! 		}
! 		break;
! 	case SEN_SAA7111A:
! 		rc = i2c_w(ov, 0x0a, val >> 8);
! 		if (rc < 0)
! 			goto out;
! 		break;
! 	default:
! 		PDEBUG(3, "Unsupported with this sensor");
! 		rc = -EPERM;
! 		goto out;
! 	}
! 
! 	rc = 0;		/* Success */
! 	ov->brightness = val;
! out:
! 	if (ov51x_restart(ov) < 0)
! 		return -EIO;
! 
! 	return rc;
! }
! 
! /* Gets sensor's brightness setting */
! static int
! sensor_get_brightness(struct usb_ov511 *ov, unsigned short *val)
! {
! 	int rc;
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV76BE:
! 	case SEN_OV7620:
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 		rc = i2c_r(ov, OV7610_REG_BRT);
! 		if (rc < 0)
! 			return rc;
! 		else
! 			*val = rc << 8;
! 		break;
! 	case SEN_SAA7111A:
! 		*val = ov->brightness;
! 		break;
! 	default:
! 		PDEBUG(3, "Unsupported with this sensor");
! 		return -EPERM;
! 	}
! 
! 	PDEBUG(3, "%d", *val);
! 	ov->brightness = *val;
! 
! 	return 0;
! }
! 
! /* -------------------------------------------------------------------------- */
! 
! /* Sets sensor's saturation (color intensity) setting to "val" */
! static int
! sensor_set_saturation(struct usb_ov511 *ov, unsigned short val)
! {
! 	int rc;
! 
! 	PDEBUG(3, "%d", val);
! 
! 	if (ov->stop_during_set)
! 		if (ov51x_stop(ov) < 0)
! 			return -EIO;
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV76BE:
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 		rc = i2c_w(ov, OV7610_REG_SAT, val >> 8);
! 		if (rc < 0)
! 			goto out;
! 		break;
! 	case SEN_OV7620:
! //		/* Use UV gamma control instead. Bits 0 & 7 are reserved. */
! //		rc = ov_i2c_write(ov->dev, 0x62, (val >> 9) & 0x7e);
! //		if (rc < 0)
! //			goto out;
! 		rc = i2c_w(ov, OV7610_REG_SAT, val >> 8);
! 		if (rc < 0)
! 			goto out;
! 		break;
! 	case SEN_SAA7111A:
! 		rc = i2c_w(ov, 0x0c, val >> 9);
! 		if (rc < 0)
! 			goto out;
! 		break;
! 	default:
! 		PDEBUG(3, "Unsupported with this sensor");
! 		rc = -EPERM;
! 		goto out;
! 	}
! 
! 	rc = 0;		/* Success */
! 	ov->colour = val;
! out:
! 	if (ov51x_restart(ov) < 0)
! 		return -EIO;
! 
! 	return rc;
! }
! 
! /* Gets sensor's saturation (color intensity) setting */
! static int
! sensor_get_saturation(struct usb_ov511 *ov, unsigned short *val)
! {
! 	int rc;
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV76BE:
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 		rc = i2c_r(ov, OV7610_REG_SAT);
! 		if (rc < 0)
! 			return rc;
! 		else
! 			*val = rc << 8;
! 		break;
! 	case SEN_OV7620:
! //		/* Use UV gamma reg instead. Bits 0 & 7 are reserved. */
! //		rc = i2c_r(ov, 0x62);
! //		if (rc < 0)
! //			return rc;
! //		else
! //			*val = (rc & 0x7e) << 9;
! 		rc = i2c_r(ov, OV7610_REG_SAT);
! 		if (rc < 0)
! 			return rc;
! 		else
! 			*val = rc << 8;
! 		break;
! 	case SEN_SAA7111A:
! 		*val = ov->colour;
! 		break;
! 	default:
! 		PDEBUG(3, "Unsupported with this sensor");
! 		return -EPERM;
! 	}
! 
! 	PDEBUG(3, "%d", *val);
! 	ov->colour = *val;
! 
! 	return 0;
! }
! 
! /* -------------------------------------------------------------------------- */
! 
! /* Sets sensor's hue (red/blue balance) setting to "val" */
! static int
! sensor_set_hue(struct usb_ov511 *ov, unsigned short val)
! {
! 	int rc;
! 
! 	PDEBUG(3, "%d", val);
! 
! 	if (ov->stop_during_set)
! 		if (ov51x_stop(ov) < 0)
! 			return -EIO;
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 		rc = i2c_w(ov, OV7610_REG_RED, 0xFF - (val >> 8));
! 		if (rc < 0)
! 			goto out;
! 
! 		rc = i2c_w(ov, OV7610_REG_BLUE, val >> 8);
! 		if (rc < 0)
! 			goto out;
! 		break;
! 	case SEN_OV7620:
! // Hue control is causing problems. I will enable it once it's fixed.
! #if 0
! 		rc = i2c_w(ov, 0x7a, (unsigned char)(val >> 8) + 0xb);
! 		if (rc < 0)
! 			goto out;
! 
! 		rc = i2c_w(ov, 0x79, (unsigned char)(val >> 8) + 0xb);
! 		if (rc < 0)
! 			goto out;
! #endif
! 		break;
! 	case SEN_SAA7111A:
! 		rc = i2c_w(ov, 0x0d, (val + 32768) >> 8);
! 		if (rc < 0)
! 			goto out;
! 		break;
! 	default:
! 		PDEBUG(3, "Unsupported with this sensor");
! 		rc = -EPERM;
! 		goto out;
! 	}
! 
! 	rc = 0;		/* Success */
! 	ov->hue = val;
! out:
! 	if (ov51x_restart(ov) < 0)
! 		return -EIO;
! 
! 	return rc;
! }
! 
! /* Gets sensor's hue (red/blue balance) setting */
! static int
! sensor_get_hue(struct usb_ov511 *ov, unsigned short *val)
! {
! 	int rc;
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 		rc = i2c_r(ov, OV7610_REG_BLUE);
! 		if (rc < 0)
! 			return rc;
! 		else
! 			*val = rc << 8;
! 		break;
! 	case SEN_OV7620:
! 		rc = i2c_r(ov, 0x7a);
! 		if (rc < 0)
! 			return rc;
! 		else
! 			*val = rc << 8;
! 		break;
! 	case SEN_SAA7111A:
! 		*val = ov->hue;
! 		break;
! 	default:
! 		PDEBUG(3, "Unsupported with this sensor");
! 		return -EPERM;
! 	}
! 
! 	PDEBUG(3, "%d", *val);
! 	ov->hue = *val;
! 
! 	return 0;
! }
! 
! /* -------------------------------------------------------------------------- */
! 
! static inline int
! sensor_set_picture(struct usb_ov511 *ov, struct video_picture *p)
! {
! 	int rc;
! 
! 	PDEBUG(4, "sensor_set_picture");
! 
! 	ov->whiteness = p->whiteness;
! 
! 	/* Don't return error if a setting is unsupported, or rest of settings
!          * will not be performed */
! 
! 	rc = sensor_set_contrast(ov, p->contrast);
! 	if (FATAL_ERROR(rc))
! 		return rc;
! 
! 	rc = sensor_set_brightness(ov, p->brightness);
! 	if (FATAL_ERROR(rc))
! 		return rc;
! 
! 	rc = sensor_set_saturation(ov, p->colour);
! 	if (FATAL_ERROR(rc))
! 		return rc;
! 
! 	rc = sensor_set_hue(ov, p->hue);
! 	if (FATAL_ERROR(rc))
! 		return rc;
! 
! 	return 0;
! }
! 
! static inline int
! sensor_get_picture(struct usb_ov511 *ov, struct video_picture *p)
! {
! 	int rc;
! 
! 	PDEBUG(4, "sensor_get_picture");
! 
! 	/* Don't return error if a setting is unsupported, or rest of settings
!          * will not be performed */
! 
! 	rc = sensor_get_contrast(ov, &(p->contrast));
! 	if (FATAL_ERROR(rc))
! 		return rc;
! 
! 	rc = sensor_get_brightness(ov, &(p->brightness));
! 	if (FATAL_ERROR(rc))
! 		return rc;
! 
! 	rc = sensor_get_saturation(ov, &(p->colour));
! 	if (FATAL_ERROR(rc))
! 		return rc;
! 
! 	rc = sensor_get_hue(ov, &(p->hue));
! 	if (FATAL_ERROR(rc))
! 		return rc;
! 
! 	p->whiteness = 105 << 8;
! 
! 	/* Can we get these from frame[0]? -claudio? */
! 	p->depth = ov->frame[0].depth;
! 	p->palette = ov->frame[0].format;
! 
! 	return 0;
! }
! 
! #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
! // FIXME: Exposure range is only 0x00-0x7f in interlace mode
! /* Sets current exposure for sensor. This only has an effect if auto-exposure
!  * is off */
! static inline int
! sensor_set_exposure(struct usb_ov511 *ov, unsigned char val)
! {
! 	int rc;
! 
! 	PDEBUG(3, "%d", val);
! 
! 	if (ov->stop_during_set)
! 		if (ov51x_stop(ov) < 0)
! 			return -EIO;
! 
! 	switch (ov->sensor) {
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 	case SEN_OV7610:
! 	case SEN_OV7620:
! 	case SEN_OV76BE:
! 	case SEN_OV8600:
! 		rc = i2c_w(ov, 0x10, val);
! 		if (rc < 0)
! 			goto out;
! 
! 		break;
! 	case SEN_KS0127:
! 	case SEN_KS0127B:
! 	case SEN_SAA7111A:
! 		PDEBUG(3, "Unsupported with this sensor");
! 		return -EPERM;
! 	default:
! 		err("Sensor not supported for set_exposure");
! 		return -EINVAL;
! 	}
! 
! 	rc = 0;		/* Success */
! 	ov->exposure = val;
! out:
! 	if (ov51x_restart(ov) < 0)
! 		return -EIO;
! 
! 	return rc;
! }
! 
! /* Gets current exposure level from sensor, regardless of whether it is under
!  * manual control. */
! static int
! sensor_get_exposure(struct usb_ov511 *ov, unsigned char *val)
! {
! 	int rc;
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 	case SEN_OV7620:
! 	case SEN_OV76BE:
! 	case SEN_OV8600:
! 		rc = i2c_r(ov, 0x10);
! 		if (rc < 0)
! 			return rc;
! 		else
! 			*val = rc;
! 		break;
! 	case SEN_KS0127:
! 	case SEN_KS0127B:
! 	case SEN_SAA7111A:
! 		val = 0;
! 		PDEBUG(3, "Unsupported with this sensor");
! 		return -EPERM;
! 	default:
! 		err("Sensor not supported for get_exposure");
! 		return -EINVAL;
! 	}
! 
! 	PDEBUG(3, "%d", *val);
! 	ov->exposure = *val;
! 
! 	return 0;
! }
! #endif /* CONFIG_PROC_FS && CONFIG_VIDEO_PROC_FS */
! 
! /* Turns on or off the LED. Only has an effect with OV511+/OV518(+) */
! static inline void
! ov51x_led_control(struct usb_ov511 *ov, int enable)
! {
! 	PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
! 
! 	if (ov->bridge == BRG_OV511PLUS)
! 		reg_w(ov, R511_SYS_LED_CTL, enable ? 1 : 0);
! 	else if (ov->bclass == BCL_OV518)
! 		reg_w_mask(ov, R518_GPIO_OUT, enable ? 0x02 : 0x00, 0x02);
! 
! 	return;
! }
! 
! /* Matches the sensor's internal frame rate to the lighting frequency.
!  * Valid frequencies are:
!  *	50 - 50Hz, for European and Asian lighting
!  *	60 - 60Hz, for American lighting
!  *
!  * Tested with: OV7610, OV7620, OV76BE, OV6620
!  * Unsupported: KS0127, KS0127B, SAA7111A
!  * Returns: 0 for success
!  */
! static int
! sensor_set_light_freq(struct usb_ov511 *ov, int freq)
! {
! 	int sixty;
! 
! 	PDEBUG(4, "%d Hz", freq);
! 
! 	if (freq == 60)
! 		sixty = 1;
! 	else if (freq == 50)
! 		sixty = 0;
! 	else {
! 		err("Invalid light freq (%d Hz)", freq);
! 		return -EINVAL;
! 	}
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 		i2c_w_mask(ov, 0x2a, sixty?0x00:0x80, 0x80);
! 		i2c_w(ov, 0x2b, sixty?0x00:0xac);
! 		i2c_w_mask(ov, 0x13, 0x10, 0x10);
! 		i2c_w_mask(ov, 0x13, 0x00, 0x10);
! 		break;
! 	case SEN_OV7620:
! 	case SEN_OV76BE:
! 	case SEN_OV8600:
! 		i2c_w_mask(ov, 0x2a, sixty?0x00:0x80, 0x80);
! 		i2c_w(ov, 0x2b, sixty?0x00:0xac);
! 		i2c_w_mask(ov, 0x76, 0x01, 0x01);
! 		break;
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 		i2c_w(ov, 0x2b, sixty?0xa8:0x28);
! 		i2c_w(ov, 0x2a, sixty?0x84:0xa4);
! 		break;
! 	case SEN_KS0127:
! 	case SEN_KS0127B:
! 	case SEN_SAA7111A:
! 		PDEBUG(5, "Unsupported with this sensor");
! 		return -EPERM;
! 	default:
! 		err("Sensor not supported for set_light_freq");
! 		return -EINVAL;
! 	}
! 
! 	ov->lightfreq = freq;
! 
! 	return 0;
! }
! 
! /* If enable is true, turn on the sensor's banding filter, otherwise turn it
!  * off. This filter tries to reduce the pattern of horizontal light/dark bands
!  * caused by some (usually fluorescent) lighting. The light frequency must be
!  * set either before or after enabling it with ov51x_set_light_freq().
!  *
!  * Tested with: OV7610, OV7620, OV76BE, OV6620.
!  * Unsupported: KS0127, KS0127B, SAA7111A
!  * Returns: 0 for success
!  */
! static inline int
! sensor_set_banding_filter(struct usb_ov511 *ov, int enable)
! {
! 	int rc;
! 
! 	PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
! 
! 	if (ov->sensor == SEN_KS0127 || ov->sensor == SEN_KS0127B
! 		|| ov->sensor == SEN_SAA7111A) {
! 		PDEBUG(5, "Unsupported with this sensor");
! 		return -EPERM;
! 	}
! 
! 	rc = i2c_w_mask(ov, 0x2d, enable?0x04:0x00, 0x04);
! 	if (rc < 0)
! 		return rc;
! 
! 	ov->bandfilt = enable;
! 
! 	return 0;
! }
! 
! /* If enable is true, turn on the sensor's auto brightness control, otherwise
!  * turn it off.
!  *
!  * Unsupported: KS0127, KS0127B, SAA7111A
!  * Returns: 0 for success
!  */
! static inline int
! sensor_set_auto_brightness(struct usb_ov511 *ov, int enable)
! {
! 	int rc;
! 
! 	PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
! 
! 	if (ov->sensor == SEN_KS0127 || ov->sensor == SEN_KS0127B
! 		|| ov->sensor == SEN_SAA7111A) {
! 		PDEBUG(5, "Unsupported with this sensor");
! 		return -EPERM;
! 	}
! 
! 	rc = i2c_w_mask(ov, 0x2d, enable?0x10:0x00, 0x10);
! 	if (rc < 0)
! 		return rc;
! 
! 	ov->auto_brt = enable;
! 
! 	return 0;
! }
! 
! /* If enable is true, turn on the sensor's auto exposure control, otherwise
!  * turn it off.
!  *
!  * Unsupported: KS0127, KS0127B, SAA7111A
!  * Returns: 0 for success
!  */
! static inline int
! sensor_set_auto_exposure(struct usb_ov511 *ov, int enable)
! {
! 	PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 		i2c_w_mask(ov, 0x29, enable?0x00:0x80, 0x80);
! 		break;
! 	case SEN_OV6620:
! 	case SEN_OV7620:
! 	case SEN_OV76BE:
! 	case SEN_OV8600:
! 		i2c_w_mask(ov, 0x13, enable?0x01:0x00, 0x01);
! 		break;
! 	case SEN_OV6630:
! 		i2c_w_mask(ov, 0x28, enable?0x00:0x10, 0x10);
! 		break;
! 	case SEN_KS0127:
! 	case SEN_KS0127B:
! 	case SEN_SAA7111A:
! 		PDEBUG(5, "Unsupported with this sensor");
! 		return -EPERM;
! 	default:
! 		err("Sensor not supported for set_auto_exposure");
! 		return -EINVAL;
! 	}
! 
! 	ov->auto_exp = enable;
! 
! 	return 0;
! }
! 
! /* Modifies the sensor's exposure algorithm to allow proper exposure of objects
!  * that are illuminated from behind.
!  *
!  * Tested with: OV6620, OV7620
!  * Unsupported: OV7610, OV76BE, KS0127, KS0127B, SAA7111A
!  * Returns: 0 for success
!  */
! static int
! sensor_set_backlight(struct usb_ov511 *ov, int enable)
! {
! 	PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7620:
! 	case SEN_OV8600:
! 		i2c_w_mask(ov, 0x68, enable?0xe0:0xc0, 0xe0);
! 		i2c_w_mask(ov, 0x29, enable?0x08:0x00, 0x08);
! 		i2c_w_mask(ov, 0x28, enable?0x02:0x00, 0x02);
! 		break;
! 	case SEN_OV6620:
! 		i2c_w_mask(ov, 0x4e, enable?0xe0:0xc0, 0xe0);
! 		i2c_w_mask(ov, 0x29, enable?0x08:0x00, 0x08);
! 		i2c_w_mask(ov, 0x0e, enable?0x80:0x00, 0x80);
! 		break;
! 	case SEN_OV6630:
! 		i2c_w_mask(ov, 0x4e, enable?0x80:0x60, 0xe0);
! 		i2c_w_mask(ov, 0x29, enable?0x08:0x00, 0x08);
! 		i2c_w_mask(ov, 0x28, enable?0x02:0x00, 0x02);
! 		break;
! 	case SEN_OV7610:
! 	case SEN_OV76BE:
! 	case SEN_KS0127:
! 	case SEN_KS0127B:
! 	case SEN_SAA7111A:
! 		PDEBUG(5, "Unsupported with this sensor");
! 		return -EPERM;
! 	default:
! 		err("Sensor not supported for set_backlight");
! 		return -EINVAL;
! 	}
! 
! 	ov->backlight = enable;
! 
! 	return 0;
! }
! 
! static inline int
! sensor_set_mirror(struct usb_ov511 *ov, int enable)
! {
! 	PDEBUG(4, " (%s)", enable ? "turn on" : "turn off");
! 
! 	switch (ov->sensor) {
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 	case SEN_OV7610:
! 	case SEN_OV7620:
! 	case SEN_OV76BE:
! 	case SEN_OV8600:
! 		i2c_w_mask(ov, 0x12, enable?0x40:0x00, 0x40);
! 		break;
! 	case SEN_KS0127:
! 	case SEN_KS0127B:
! 	case SEN_SAA7111A:
! 		PDEBUG(5, "Unsupported with this sensor");
! 		return -EPERM;
! 	default:
! 		err("Sensor not supported for set_mirror");
! 		return -EINVAL;
! 	}
! 
! 	ov->mirror = enable;
! 
! 	return 0;
! }
! 
! /* Returns number of bits per pixel (regardless of where they are located;
!  * planar or not), or zero for unsupported format.
!  */
! static inline int
! get_depth(int palette)
! {
! 	switch (palette) {
! 	case VIDEO_PALETTE_GREY:    return 8;
! 	case VIDEO_PALETTE_YUV420:  return 12;
! 	case VIDEO_PALETTE_YUV420P: return 12; /* Planar */
! 	case VIDEO_PALETTE_RGB565:  return 16;
! 	case VIDEO_PALETTE_RGB24:   return 24;
! 	case VIDEO_PALETTE_YUV422:  return 16;
! 	case VIDEO_PALETTE_YUYV:    return 16;
! 	case VIDEO_PALETTE_YUV422P: return 16; /* Planar */
! 	default:		    return 0;  /* Invalid format */
! 	}
! }
! 
! /* Bytes per frame. Used by read(). Return of 0 indicates error */
! static inline long int
! get_frame_length(struct ov511_frame *frame)
! {
! 	if (!frame)
! 		return 0;
! 	else
! 		return ((frame->width * frame->height
! 			 * get_depth(frame->format)) >> 3);
! }
! 
! static int
! mode_init_ov_sensor_regs(struct usb_ov511 *ov, int width, int height,
! 			 int mode, int sub_flag, int qvga)
! {
! 	int clock;
! 
! 	/******** Mode (VGA/QVGA) and sensor specific regs ********/
! 
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 		i2c_w(ov, 0x14, qvga?0x24:0x04);
! // FIXME: Does this improve the image quality or frame rate?
! #if 0
! 		i2c_w_mask(ov, 0x28, qvga?0x00:0x20, 0x20);
! 		i2c_w(ov, 0x24, 0x10);
! 		i2c_w(ov, 0x25, qvga?0x40:0x8a);
! 		i2c_w(ov, 0x2f, qvga?0x30:0xb0);
! 		i2c_w(ov, 0x35, qvga?0x1c:0x9c);
! #endif
! 		break;
! 	case SEN_OV7620:
! //		i2c_w(ov, 0x2b, 0x00);
! 		i2c_w(ov, 0x14, qvga?0xa4:0x84);
! 		i2c_w_mask(ov, 0x28, qvga?0x00:0x20, 0x20);
! 		i2c_w(ov, 0x24, qvga?0x20:0x3a);
! 		i2c_w(ov, 0x25, qvga?0x30:0x60);
! 		i2c_w_mask(ov, 0x2d, qvga?0x40:0x00, 0x40);
! 		i2c_w_mask(ov, 0x67, qvga?0xf0:0x90, 0xf0);
! 		i2c_w_mask(ov, 0x74, qvga?0x20:0x00, 0x20);
! 		break;
! 	case SEN_OV76BE:
! //		i2c_w(ov, 0x2b, 0x00);
! 		i2c_w(ov, 0x14, qvga?0xa4:0x84);
! // FIXME: Enable this once 7620AE uses 7620 initial settings
! #if 0
! 		i2c_w_mask(ov, 0x28, qvga?0x00:0x20, 0x20);
! 		i2c_w(ov, 0x24, qvga?0x20:0x3a);
! 		i2c_w(ov, 0x25, qvga?0x30:0x60);
! 		i2c_w_mask(ov, 0x2d, qvga?0x40:0x00, 0x40);
! 		i2c_w_mask(ov, 0x67, qvga?0xb0:0x90, 0xf0);
! 		i2c_w_mask(ov, 0x74, qvga?0x20:0x00, 0x20);
! #endif
! 		break;
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 		i2c_w(ov, 0x14, qvga?0x24:0x04);
! 		/* No special settings yet */
! 		break;
! 	default:
! 		err("Invalid sensor");
! 		return -EINVAL;
! 	}
! 
! 	/******** Palette-specific regs ********/
! 
! 	if (mode == VIDEO_PALETTE_GREY) {
! 		if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV76BE) {
! 			/* these aren't valid on the OV6620/OV7620/6630? */
! 			i2c_w_mask(ov, 0x0e, 0x40, 0x40);
! 		}
! 		i2c_w_mask(ov, 0x13, 0x20, 0x20);
! 	} else {
! 		if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV76BE) {
! 			/* not valid on the OV6620/OV7620/6630? */
! 			i2c_w_mask(ov, 0x0e, 0x00, 0x40);
! 		}
! 		i2c_w_mask(ov, 0x13, 0x00, 0x20);
! 	}
! 
! 	/******** Clock programming ********/
! 
! 	// FIXME: Test this with OV6630
! 
! 	/* The OV6620 needs special handling. This prevents the 
! 	 * severe banding that normally occurs */
! 	if (ov->sensor == SEN_OV6620 || ov->sensor == SEN_OV6630)
! 	{
! 		/* Clock down */
! 
! 		i2c_w(ov, 0x2a, 0x04);
! 
! 		if (ov->compress) {
! //			clock = 0;    /* This ensures the highest frame rate */
! 			clock = 3;
! 		} else if (clockdiv == -1) {   /* If user didn't override it */
! 			clock = 3;    /* Gives better exposure time */
! 		} else {
! 			clock = clockdiv;
! 		}
! 
! 		PDEBUG(4, "Setting clock divisor to %d", clock);
! 
! 		i2c_w(ov, 0x11, clock);
! 
! 		i2c_w(ov, 0x2a, 0x84);
! 		/* This next setting is critical. It seems to improve
! 		 * the gain or the contrast. The "reserved" bits seem
! 		 * to have some effect in this case. */
! 		i2c_w(ov, 0x2d, 0x85);
! 	}
! 	else
! 	{
! 		if (ov->compress) {
! 			clock = 1;    /* This ensures the highest frame rate */
! 		} else if (clockdiv == -1) {   /* If user didn't override it */
! 			/* Calculate and set the clock divisor */
! 			clock = ((sub_flag ? ov->subw * ov->subh
! 				  : width * height)
! 				 * (mode == VIDEO_PALETTE_GREY ? 2 : 3) / 2)
! 				 / 66000;
! 		} else {
! 			clock = clockdiv;
! 		}
! 
! 		PDEBUG(4, "Setting clock divisor to %d", clock);
! 
! 		i2c_w(ov, 0x11, clock);
! 	}
! 
! 	/******** Special Features ********/
! 
! 	if (framedrop >= 0)
! 		i2c_w(ov, 0x16, framedrop);
! 
! 	if (sensor_gbr)
! 		i2c_w_mask(ov, 0x12, 0x08, 0x08);
! 	else
! 		i2c_w_mask(ov, 0x12, 0x00, 0x08);
! 
! 	/* Test Pattern */
! 	i2c_w_mask(ov, 0x12, (testpat?0x02:0x00), 0x02);
! 
! 	/* Auto white balance */
! //	if (awb)
! 		i2c_w_mask(ov, 0x12, 0x04, 0x04);
! //	else
! //		i2c_w_mask(ov, 0x12, 0x00, 0x04);
! 
! 	// This will go away as soon as ov51x_mode_init_sensor_regs()
! 	// is fully tested.
! 	/* 7620/6620/6630? don't have register 0x35, so play it safe */
! 	if (ov->sensor == SEN_OV7610 || ov->sensor == SEN_OV76BE) {
! 		if (width == 640 && height == 480)
! 			i2c_w(ov, 0x35, 0x9e);
! 		else
! 			i2c_w(ov, 0x35, 0x1e);
! 	}
! 
! 	return 0;
! }
! 
! static int
! set_ov_sensor_window(struct usb_ov511 *ov, int width, int height, int mode,
! 		     int sub_flag)
! {
! 	int ret;
! 	int hwsbase, hwebase, vwsbase, vwebase, hwsize, vwsize; 
! 	int hoffset, voffset, hwscale = 0, vwscale = 0;
! 
! 	/* The different sensor ICs handle setting up of window differently.
! 	 * IF YOU SET IT WRONG, YOU WILL GET ALL ZERO ISOC DATA FROM OV51x!!! */
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV76BE:
! 		hwsbase = 0x38;
! 		hwebase = 0x3a;
! 		vwsbase = vwebase = 0x05;
! 		break;
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 		hwsbase = 0x38;
! 		hwebase = 0x3a;
! 		vwsbase = 0x05;
! 		vwebase = 0x06;
! 		break;
! 	case SEN_OV7620:
! 		hwsbase = 0x2f;		/* From 7620.SET (spec is wrong) */
! 		hwebase = 0x2f;
! 		vwsbase = vwebase = 0x05;
! 		break;
! 	default:
! 		err("Invalid sensor");
! 		return -EINVAL;
! 	}
! 
! 	if (ov->sensor == SEN_OV6620 || ov->sensor == SEN_OV6630) {
! 		/* Note: OV518(+) does downsample on its own) */
! 		if ((width > 176 && height > 144)
! 		    || ov->bclass == BCL_OV518) {  /* CIF */
! 			ret = mode_init_ov_sensor_regs(ov, width, height,
! 				mode, sub_flag, 0);
! 			if (ret < 0)
! 				return ret;
! 			hwscale = 1;
! 			vwscale = 1;  /* The datasheet says 0; it's wrong */
! 			hwsize = 352;
! 			vwsize = 288;
! 		} else if (width > 176 || height > 144) {
! 			err("Illegal dimensions");
! 			return -EINVAL;
! 		} else {			    /* QCIF */
! 			ret = mode_init_ov_sensor_regs(ov, width, height,
! 				mode, sub_flag, 1);
! 			if (ret < 0)
! 				return ret;
! 			hwsize = 176;
! 			vwsize = 144;
! 		}
! 	} else {
! 		if (width > 320 && height > 240) {  /* VGA */
! 			ret = mode_init_ov_sensor_regs(ov, width, height,
! 				mode, sub_flag, 0);
! 			if (ret < 0)
! 				return ret;
! 			hwscale = 2;
! 			vwscale = 1;
! 			hwsize = 640;
! 			vwsize = 480;
! 		} else if (width > 320 || height > 240) {
! 			err("Illegal dimensions");
! 			return -EINVAL;
! 		} else {			    /* QVGA */
! 			ret = mode_init_ov_sensor_regs(ov, width, height,
! 				mode, sub_flag, 1);
! 			if (ret < 0)
! 				return ret;
! 			hwscale = 1;
! 			hwsize = 320;
! 			vwsize = 240;
! 		}
! 	}
! 
! 	/* Center the window */
! 	hoffset = ((hwsize - width) / 2) >> hwscale;
! 	voffset = ((vwsize - height) / 2) >> vwscale;
! 
! 	/* FIXME! - This needs to be changed to support 160x120 and 6620!!! */
! 	if (sub_flag) {
! 		i2c_w(ov, 0x17, hwsbase+(ov->subx>>hwscale));
! 		i2c_w(ov, 0x18,	hwebase+((ov->subx+ov->subw)>>hwscale));
! 		i2c_w(ov, 0x19, vwsbase+(ov->suby>>vwscale));
! 		i2c_w(ov, 0x1a, vwebase+((ov->suby+ov->subh)>>vwscale));
! 	} else {
! 		i2c_w(ov, 0x17, hwsbase + hoffset);
! 		i2c_w(ov, 0x18, hwebase + hoffset + (hwsize>>hwscale));
! 		i2c_w(ov, 0x19, vwsbase + voffset);
! 		i2c_w(ov, 0x1a, vwebase + voffset + (vwsize>>vwscale));
! 	}
! 
! #ifdef OV511_DEBUG
! 	if (dump_sensor)
! 		dump_i2c_regs(ov);
! #endif
  
! 	return 0;
  }
  
! /* Set up the OV511/OV511+ with the given image parameters.
!  *
!  * Do not put any sensor-specific code in here (including I2C I/O functions)
!  */
! static int
! ov511_mode_init_regs(struct usb_ov511 *ov,
! 		     int width, int height, int mode, int sub_flag)
  {
! 	int hsegs, vsegs;
  
! 	if (sub_flag) {
! 		width = ov->subw;
! 		height = ov->subh;
! 	}
  
! 	PDEBUG(3, "width:%d, height:%d, mode:%d, sub:%d",
! 	       width, height, mode, sub_flag);
  
! 	// FIXME: This should be moved to a 7111a-specific function once
! 	// subcapture is dealt with properly
! 	if (ov->sensor == SEN_SAA7111A) {
! 		if (width == 320 && height == 240) {
! 			/* No need to do anything special */
! 		} else if (width == 640 && height == 480) {
! 			/* Set the OV511 up as 320x480, but keep the
! 			 * V4L resolution as 640x480 */
! 			width = 320;
! 		} else {
! 			err("SAA7111A only allows 320x240 or 640x480");
  			return -EINVAL;
  		}
! 	}
! 
! 	/* Make sure width and height are a multiple of 8 */
! 	if (width % 8 || height % 8) {
! 		err("Invalid size (%d, %d) (mode = %d)", width, height, mode);
! 		return -EINVAL;
! 	}
! 
! 	if (width < ov->minwidth || height < ov->minheight) {
! 		err("Requested dimensions are too small");
  		return -EINVAL;
  	}
  
! 	if (ov51x_stop(ov) < 0)
! 		return -EIO;
  
! 	if (mode == VIDEO_PALETTE_GREY) {
! 		reg_w(ov, R511_CAM_UV_EN, 0x00);
! 		reg_w(ov, R511_SNAP_UV_EN, 0x00);
! 		reg_w(ov, R511_SNAP_OPTS, 0x01);
! 	} else {
! 		reg_w(ov, R511_CAM_UV_EN, 0x01);
! 		reg_w(ov, R511_SNAP_UV_EN, 0x01);
! 		reg_w(ov, R511_SNAP_OPTS, 0x03);
  	}
  
! 	/* Here I'm assuming that snapshot size == image size.
! 	 * I hope that's always true. --claudio
! 	 */
! 	hsegs = (width >> 3) - 1;
! 	vsegs = (height >> 3) - 1;
  
! 	reg_w(ov, R511_CAM_PXCNT, hsegs);
! 	reg_w(ov, R511_CAM_LNCNT, vsegs);
! 	reg_w(ov, R511_CAM_PXDIV, 0x00);
! 	reg_w(ov, R511_CAM_LNDIV, 0x00);
! 
! 	/* YUV420, low pass filer on */
! 	reg_w(ov, R511_CAM_OPTS, 0x03);
! 
! 	/* Snapshot additions */
! 	reg_w(ov, R511_SNAP_PXCNT, hsegs);
! 	reg_w(ov, R511_SNAP_LNCNT, vsegs);
! 	reg_w(ov, R511_SNAP_PXDIV, 0x00);
! 	reg_w(ov, R511_SNAP_LNDIV, 0x00);
! 
! 	if (ov->compress) {
! 		/* Enable Y and UV quantization and compression */
! 		reg_w(ov, R511_COMP_EN, 0x07);
! 		reg_w(ov, R511_COMP_LUT_EN, 0x03);
! 		ov51x_reset(ov, OV511_RESET_OMNICE);
! 	}
  
! 	if (ov51x_restart(ov) < 0)
  		return -EIO;
  
  	return 0;
  }
  
- /* Sets up the OV518/OV518+ with the given image parameters
-  *
-  * OV518 needs a completely different approach, until we can figure out what
-  * the individual registers do. Also, only 15 FPS is supported now.
-  *
-  * Do not put any sensor-specific code in here (including I2C I/O functions)
-  */
- static int
- ov518_mode_init_regs(struct usb_ov511 *ov,
- 		     int width, int height, int mode, int sub_flag)
- {
- 	int hsegs, vsegs, hi_res;
- 
- 	if (sub_flag) {
- 		width = ov->subw;
- 		height = ov->subh;
- 	}
  
! 	PDEBUG(3, "width:%d, height:%d, mode:%d, sub:%d",
! 	       width, height, mode, sub_flag);
  
! 	if (width % 16 || height % 8) {
! 		err("Invalid size (%d, %d)", width, height);
! 		return -EINVAL;
! 	}
  
! 	if (width < ov->minwidth || height < ov->minheight) {
! 		err("Requested dimensions are too small");
! 		return -EINVAL;
! 	}
  
! 	if (width >= 320 && height >= 240) {
! 		hi_res = 1;
! 	} else if (width >= 320 || height >= 240) {
! 		err("Invalid width/height combination (%d, %d)", width, height);
! 		return -EINVAL;
! 	} else {
! 		hi_res = 0;
! 	}
  
! 	if (ov51x_stop(ov) < 0)
  		return -EIO;
  
! 	/******** Set the mode ********/
! 
! 	reg_w(ov, 0x2b, 0);
! 	reg_w(ov, 0x2c, 0);
! 	reg_w(ov, 0x2d, 0);
! 	reg_w(ov, 0x2e, 0);
! 	reg_w(ov, 0x3b, 0);
! 	reg_w(ov, 0x3c, 0);
! 	reg_w(ov, 0x3d, 0);
! 	reg_w(ov, 0x3e, 0);
  
! 	reg_w(ov, 0x28, (mode == VIDEO_PALETTE_GREY) ? 0x00:0x80);
! 	reg_w(ov, 0x38, (mode == VIDEO_PALETTE_GREY) ? 0x00:0x80);
  
! 	hsegs = width / 16;
! 	vsegs = height / 4;
  
! 	reg_w(ov, 0x29, hsegs);
! 	reg_w(ov, 0x2a, vsegs);
  
! 	reg_w(ov, 0x39, hsegs);
! 	reg_w(ov, 0x3a, vsegs);
  
! 	/* Windows driver does this here; who knows why */
! 	reg_w(ov, 0x2f, 0x80);
  
! 	/******** Set the framerate (to 15 FPS) ********/
  
! 	/* Mode independent, but framerate dependent, regs */
! 	reg_w(ov, 0x51, 0x02);	/* Clock divider; lower==faster */
! 	reg_w(ov, 0x22, 0x18);
! 	reg_w(ov, 0x23, 0xff);
  
! 	if (ov->bridge == BRG_OV518PLUS)
! 		reg_w(ov, 0x21, 0x19);
! 	else
! 		reg_w(ov, 0x71, 0x19);	/* Compression-related? */
  
! 	// FIXME: Sensor-specific
! 	/* Bit 5 is what matters here. Of course, it is "reserved" */
! 	i2c_w(ov, 0x54, 0x23);
! 
! 	reg_w(ov, 0x2f, 0x80);
! 
! 	if (ov->bridge == BRG_OV518PLUS) {
! 		reg_w(ov, 0x24, 0x94);
! 		reg_w(ov, 0x25, 0x90);
! 		ov518_reg_w32(ov, 0xc4,    400, 2);	/* 190h   */
! 		ov518_reg_w32(ov, 0xc6,    540, 2);	/* 21ch   */
! 		ov518_reg_w32(ov, 0xc7,    540, 2);	/* 21ch   */
! 		ov518_reg_w32(ov, 0xc8,    108, 2);	/* 6ch    */
! 		ov518_reg_w32(ov, 0xca, 131098, 3);	/* 2001ah */
! 		ov518_reg_w32(ov, 0xcb,    532, 2);	/* 214h   */
! 		ov518_reg_w32(ov, 0xcc,   2400, 2);	/* 960h   */
! 		ov518_reg_w32(ov, 0xcd,     32, 2);	/* 20h    */
! 		ov518_reg_w32(ov, 0xce,    608, 2);	/* 260h   */
! 	} else {
! 		reg_w(ov, 0x24, 0x9f);
! 		reg_w(ov, 0x25, 0x90);
! 		ov518_reg_w32(ov, 0xc4,    400, 2);	/* 190h   */
! 		ov518_reg_w32(ov, 0xc6,    500, 2);	/* 1f4h   */
! 		ov518_reg_w32(ov, 0xc7,    500, 2);	/* 1f4h   */
! 		ov518_reg_w32(ov, 0xc8,    142, 2);	/* 8eh    */
! 		ov518_reg_w32(ov, 0xca, 131098, 3);	/* 2001ah */
! 		ov518_reg_w32(ov, 0xcb,    532, 2);	/* 214h   */
! 		ov518_reg_w32(ov, 0xcc,   2000, 2);	/* 7d0h   */
! 		ov518_reg_w32(ov, 0xcd,     32, 2);	/* 20h    */
! 		ov518_reg_w32(ov, 0xce,    608, 2);	/* 260h   */
  	}
  
! 	reg_w(ov, 0x2f, 0x80);
! 
! 	if (ov51x_restart(ov) < 0)
! 		return -EIO;
! 
! 	/* Reset it just for good measure */
! 	if (ov51x_reset(ov, OV511_RESET_NOREGS) < 0)
  		return -EIO;
  
  	return 0;
  }
  
! /* This is a wrapper around the OV511, OV518, and sensor specific functions */
! static int
! mode_init_regs(struct usb_ov511 *ov,
! 	       int width, int height, int mode, int sub_flag)
  {
! 	int rc = 0;
! 
! 	if (!ov || !ov->dev)
! 		return -EFAULT;
! 
! 	if (ov->bclass == BCL_OV518) {
! 		rc = ov518_mode_init_regs(ov, width, height, mode, sub_flag);
! 	} else {
! 		rc = ov511_mode_init_regs(ov, width, height, mode, sub_flag);
! 	}
! 
! 	if (FATAL_ERROR(rc))
! 		return rc;
  
! 	switch (ov->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV7620:
! 	case SEN_OV76BE:
! 	case SEN_OV8600:
! 	case SEN_OV6620:
! 	case SEN_OV6630:
! 		rc = set_ov_sensor_window(ov, width, height, mode, sub_flag);
! 		break;
! 	case SEN_KS0127:
! 	case SEN_KS0127B:
! 		err("KS0127-series decoders not supported yet");
! 		rc = -EINVAL;
! 		break;
! 	case SEN_SAA7111A:
! //		rc = mode_init_saa_sensor_regs(ov, width, height, mode,
! //					       sub_flag);
  
! 		PDEBUG(1, "SAA status = 0x%02X", i2c_r(ov, 0x1f));
! 		break;
! 	default:
! 		err("Unknown sensor");
! 		rc = -EINVAL;
! 	}
  
! 	if (FATAL_ERROR(rc))
! 		return rc;
  
! 	/* Sensor-independent settings */
! 	rc = sensor_set_auto_brightness(ov, ov->auto_brt);
! 	if (FATAL_ERROR(rc))
! 		return rc;
  
! 	rc = sensor_set_auto_exposure(ov, ov->auto_exp);
! 	if (FATAL_ERROR(rc))
! 		return rc;
  
! 	rc = sensor_set_banding_filter(ov, bandingfilter);
! 	if (FATAL_ERROR(rc))
! 		return rc;
  
! 	if (ov->lightfreq) {
! 		rc = sensor_set_light_freq(ov, lightfreq);
! 		if (FATAL_ERROR(rc))
! 			return rc;
! 	}
  
! 	rc = sensor_set_backlight(ov, ov->backlight);
! 	if (FATAL_ERROR(rc))
! 		return rc;
  
! 	rc = sensor_set_mirror(ov, ov->mirror);
! 	if (FATAL_ERROR(rc))
! 		return rc;
  
  	return 0;
  }
  
! /* This sets the default image parameters. This is useful for apps that use
!  * read() and do not set these.
   */
  static int
! ov51x_set_default_params(struct usb_ov511 *ov)
  {
  	int i;
  
! 	/* Set default sizes in case IOCTL (VIDIOCMCAPTURE) is not used
! 	 * (using read() instead). */
! 	for (i = 0; i < OV511_NUMFRAMES; i++) {
! 		ov->frame[i].width = ov->maxwidth;
! 		ov->frame[i].height = ov->maxheight;
! 		ov->frame[i].bytes_read = 0;
! 		if (force_palette)
! 			ov->frame[i].format = force_palette;
! 		else
! 			ov->frame[i].format = VIDEO_PALETTE_RGB24;
! 
! 		ov->frame[i].depth = get_depth(ov->frame[i].format);
! 	}
  
! 	PDEBUG(3, "%dx%d, %s", ov->maxwidth, ov->maxheight,
! 	       symbolic(v4l1_plist, ov->frame[0].format));
  
! 	/* Initialize to max width/height, YUV420 or RGB24 (if supported) */
! 	if (mode_init_regs(ov, ov->maxwidth, ov->maxheight,
! 			   ov->frame[0].format, 0) < 0)
  		return -EINVAL;
  
! 	return 0;
! }
  
! /**********************************************************************
!  *
!  * Video decoder stuff
!  *
!  **********************************************************************/
  
! /* Set analog input port of decoder */
! static int
! decoder_set_input(struct usb_ov511 *ov, int input)
! {
! 	PDEBUG(4, "port %d", input);
  
! 	switch (ov->sensor) {
! 	case SEN_SAA7111A:
! 	{
! 		/* Select mode */
! 		i2c_w_mask(ov, 0x02, input, 0x07);
! 		/* Bypass chrominance trap for modes 4..7 */
! 		i2c_w_mask(ov, 0x09, (input > 3) ? 0x80:0x00, 0x80);
  		break;
- 	}
  	default:
  		return -EINVAL;
  	}
  
! 	return 0;
! }
! 
! /* Get ASCII name of video input */
! static int
! decoder_get_input_name(struct usb_ov511 *ov, int input, char *name)
! {
! 	switch (ov->sensor) {
! 	case SEN_SAA7111A:
! 	{
! 		if (input < 0 || input > 7)
! 			return -EINVAL;
! 		else if (input < 4)
! 			sprintf(name, "CVBS-%d", input);
! 		else // if (input < 8)
! 			sprintf(name, "S-Video-%d", input - 4);
! 		break;
  	}
! 	default:
! 		sprintf(name, "%s", "Camera");
  	}
  
! 	return 0;
! }
  
! /* Set norm (NTSC, PAL, SECAM, AUTO) */
! static int
! decoder_set_norm(struct usb_ov511 *ov, int norm)
! {
! 	PDEBUG(4, "%d", norm);
  
! 	switch (ov->sensor) {
! 	case SEN_SAA7111A:
! 	{
! 		int reg_8, reg_e;
  
! 		if (norm == VIDEO_MODE_NTSC) {
! 			reg_8 = 0x40;	/* 60 Hz */
! 			reg_e = 0x00;	/* NTSC M / PAL BGHI */
! 		} else if (norm == VIDEO_MODE_PAL) {
! 			reg_8 = 0x00;	/* 50 Hz */
! 			reg_e = 0x00;	/* NTSC M / PAL BGHI */
! 		} else if (norm == VIDEO_MODE_AUTO) {
! 			reg_8 = 0x80;	/* Auto field detect */
! 			reg_e = 0x00;	/* NTSC M / PAL BGHI */
! 		} else if (norm == VIDEO_MODE_SECAM) {
! 			reg_8 = 0x00;	/* 50 Hz */
! 			reg_e = 0x50;	/* SECAM / PAL 4.43 */
! 		} else {
! 			return -EINVAL;
! 		}
  
- 		i2c_w_mask(ov, 0x08, reg_8, 0xc0);
- 		i2c_w_mask(ov, 0x0e, reg_e, 0x70);
  		break;
  	}
! 	default:
  		return -EINVAL;
  	}
  
  	return 0;
  }
  
--- 474,1134 ----
  
  /**********************************************************************
   *
!  * Camera interface
   *
   **********************************************************************/
  
! static int ov511_reg_write(struct usb_device *dev,
! 			   unsigned char reg,
! 			   unsigned char value)
  {
  	int rc;
  
! 	rc = usb_control_msg(dev,
! 		usb_sndctrlpipe(dev, 0),
! 		2 /* REG_IO */,
! 		USB_TYPE_CLASS | USB_RECIP_DEVICE,
! 		0, (__u16)reg, &value, 1, HZ);	
  
! 	PDEBUG(5, "reg write: 0x%02X:0x%02X, 0x%x", reg, value, rc);
  
  	if (rc < 0)
! 		err("reg write: error %d", rc);
  
  	return rc;
  }
  
  /* returns: negative is error, pos or zero is data */
! static int ov511_reg_read(struct usb_device *dev, unsigned char reg)
  {
  	int rc;
+ 	unsigned char buffer[1];
  
! 	rc = usb_control_msg(dev,
! 		usb_rcvctrlpipe(dev, 0),
! 		2 /* REG_IO */,
! 		USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_DEVICE,
! 		0, (__u16)reg, buffer, 1, HZ);
!                                
! 	PDEBUG(5, "reg read: 0x%02X:0x%02X", reg, buffer[0]);
! 	
  	if (rc < 0) {
! 		err("reg read: error %d", rc);
! 		return rc;
  	} else {
! 		return buffer[0];	
  	}
  }
  
! static int ov511_i2c_write(struct usb_device *dev,
! 			   unsigned char reg,
! 			   unsigned char value)
  {
  	int rc, retries;
  
! 	PDEBUG(5, "i2c write: 0x%02X:0x%02X", reg, value);
  
  	/* Three byte write cycle */
  	for (retries = OV511_I2C_RETRIES; ; ) {
  		/* Select camera register */
! 		rc = ov511_reg_write(dev, OV511_REG_I2C_SUB_ADDRESS_3_BYTE, reg);
! 		if (rc < 0) goto error;
  
  		/* Write "value" to I2C data port of OV511 */
! 		rc = ov511_reg_write(dev, OV511_REG_I2C_DATA_PORT, value);	
! 		if (rc < 0) goto error;
  
  		/* Initiate 3-byte write cycle */
! 		rc = ov511_reg_write(dev, OV511_REG_I2C_CONTROL, 0x01);
! 		if (rc < 0) goto error;
  
! 		do rc = ov511_reg_read(dev, OV511_REG_I2C_CONTROL);
  		while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
! 		if (rc < 0) goto error;
  
  		if ((rc&2) == 0) /* Ack? */
  			break;
  #if 0
! 		/* I2C abort */	
! 		ov511_reg_write(dev, OV511_REG_I2C_CONTROL, 0x10);
  #endif
  		if (--retries < 0) {
  			err("i2c write retries exhausted");
! 			rc = -1;
! 			goto error;
  		}
  	}
  
  	return 0;
  
! error:
! 	err("i2c write: error %d", rc);
! 	return rc;
  }
  
! /* returns: negative is error, pos or zero is data */
! static int ov511_i2c_read(struct usb_device *dev, unsigned char reg)
  {
  	int rc, value, retries;
  
  	/* Two byte write cycle */
  	for (retries = OV511_I2C_RETRIES; ; ) {
  		/* Select camera register */
! 		rc = ov511_reg_write(dev, OV511_REG_I2C_SUB_ADDRESS_2_BYTE, reg);
! 		if (rc < 0) goto error;
  
  		/* Initiate 2-byte write cycle */
! 		rc = ov511_reg_write(dev, OV511_REG_I2C_CONTROL, 0x03);
! 		if (rc < 0) goto error;
  
! 		do rc = ov511_reg_read(dev, OV511_REG_I2C_CONTROL);
  		while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
! 		if (rc < 0) goto error;
  
  		if ((rc&2) == 0) /* Ack? */
  			break;
  
! 		/* I2C abort */	
! 		ov511_reg_write(dev, OV511_REG_I2C_CONTROL, 0x10);
  
  		if (--retries < 0) {
  			err("i2c write retries exhausted");
! 			rc = -1;
! 			goto error;
  		}
  	}
  
  	/* Two byte read cycle */
  	for (retries = OV511_I2C_RETRIES; ; ) {
  		/* Initiate 2-byte read cycle */
! 		rc = ov511_reg_write(dev, OV511_REG_I2C_CONTROL, 0x05);
! 		if (rc < 0) goto error;
  
! 		do rc = ov511_reg_read(dev, OV511_REG_I2C_CONTROL);
  		while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */
! 		if (rc < 0) goto error;
  
  		if ((rc&2) == 0) /* Ack? */
  			break;
  
! 		/* I2C abort */	
! 		rc = ov511_reg_write(dev, OV511_REG_I2C_CONTROL, 0x10);
! 		if (rc < 0) goto error;
  
  		if (--retries < 0) {
  			err("i2c read retries exhausted");
! 			rc = -1;
! 			goto error;
  		}
  	}
  
! 	value = ov511_reg_read(dev, OV511_REG_I2C_DATA_PORT);
  
! 	PDEBUG(5, "i2c read: 0x%02X:0x%02X", reg, value);
! 		
! 	/* This is needed to make ov511_i2c_write() work */
! 	rc = ov511_reg_write(dev, OV511_REG_I2C_CONTROL, 0x05);
  	if (rc < 0)
! 		goto error;
! 	
  	return value;
+ 
+ error:
+ 	err("i2c read: error %d", rc);
+ 	return rc;
  }
  
! static int ov511_write_regvals(struct usb_device *dev,
! 			       struct ov511_regvals * pRegvals)
  {
  	int rc;
  
! 	while (pRegvals->bus != OV511_DONE_BUS) {
! 		if (pRegvals->bus == OV511_REG_BUS) {
! 			if ((rc = ov511_reg_write(dev, pRegvals->reg,
! 			                           pRegvals->val)) < 0)
! 				goto error;
! 		} else if (pRegvals->bus == OV511_I2C_BUS) {
! 			if ((rc = ov511_i2c_write(dev, pRegvals->reg, 
! 			                           pRegvals->val)) < 0)
! 				goto error;
! 		} else {
! 			err("Bad regval array");
! 			rc = -1;
! 			goto error;
! 		}
! 		pRegvals++;
! 	}
! 	return 0;
  
+ error:
+ 	err("write regvals: error %d", rc);
  	return rc;
  }
  
! #ifdef OV511_DEBUG 
! static void ov511_dump_i2c_range(struct usb_device *dev, int reg1, int regn)
  {
  	int i;
  	int rc;
! 	for(i = reg1; i <= regn; i++) {
! 		rc = ov511_i2c_read(dev, i);
! 		PDEBUG(1, "OV7610[0x%X] = 0x%X", i, rc);
  	}
  }
  
! static void ov511_dump_i2c_regs(struct usb_device *dev)
  {
! 	PDEBUG(3, "I2C REGS");
! 	ov511_dump_i2c_range(dev, 0x00, 0x7C);
  }
  
! #if 0
! static void ov511_dump_reg_range(struct usb_device *dev, int reg1, int regn)
  {
  	int i;
  	int rc;
! 	for(i = reg1; i <= regn; i++) {
! 	  rc = ov511_reg_read(dev, i);
! 	  PDEBUG(1, "OV511[0x%X] = 0x%X", i, rc);
  	}
  }
  
! static void ov511_dump_regs(struct usb_device *dev)
  {
! 	PDEBUG(1, "CAMERA INTERFACE REGS");
! 	ov511_dump_reg_range(dev, 0x10, 0x1f);
! 	PDEBUG(1, "DRAM INTERFACE REGS");
! 	ov511_dump_reg_range(dev, 0x20, 0x23);
! 	PDEBUG(1, "ISO FIFO REGS");
! 	ov511_dump_reg_range(dev, 0x30, 0x31);
! 	PDEBUG(1, "PIO REGS");
! 	ov511_dump_reg_range(dev, 0x38, 0x39);
! 	ov511_dump_reg_range(dev, 0x3e, 0x3e);
! 	PDEBUG(1, "I2C REGS");
! 	ov511_dump_reg_range(dev, 0x40, 0x49);
! 	PDEBUG(1, "SYSTEM CONTROL REGS");
! 	ov511_dump_reg_range(dev, 0x50, 0x55);
! 	ov511_dump_reg_range(dev, 0x5e, 0x5f);
! 	PDEBUG(1, "OmniCE REGS");
! 	ov511_dump_reg_range(dev, 0x70, 0x79);
! 	ov511_dump_reg_range(dev, 0x80, 0x9f);
! 	ov511_dump_reg_range(dev, 0xa0, 0xbf);
  
  }
  #endif
  #endif
  
! static int ov511_reset(struct usb_device *dev, unsigned char reset_type)
  {
! 	int rc;
! 	
! 	PDEBUG(4, "Reset: type=0x%X", reset_type);
! 	rc = ov511_reg_write(dev, OV511_REG_SYSTEM_RESET, reset_type);
! 	rc = ov511_reg_write(dev, OV511_REG_SYSTEM_RESET, 0);
  
! 	if (rc < 0)
! 		err("reset: command failed");
  
  	return rc;
  }
  
! /* Temporarily stops OV511 from functioning. Must do this before changing
!  * registers while the camera is streaming */
! static inline int ov511_stop(struct usb_device *dev)
! {
! 	PDEBUG(4, "stopping");
! 	return (ov511_reg_write(dev, OV511_REG_SYSTEM_RESET, 0x3d));
! }
  
! /* Restarts OV511 after ov511_stop() is called */
! static inline int ov511_restart(struct usb_device *dev)
! {
! 	PDEBUG(4, "restarting");
! 	return (ov511_reg_write(dev, OV511_REG_SYSTEM_RESET, 0x00));
  }
  
! static int ov511_set_packet_size(struct usb_ov511 *ov511, int size)
  {
! 	int alt, mult;
  
! 	if (ov511_stop(ov511->dev) < 0)
! 		return -EIO;
  
! 	mult = size >> 5;
  
! 	if (ov511->bridge == BRG_OV511) {
! 		if (size == 0) alt = OV511_ALT_SIZE_0;
! 		else if (size == 257) alt = OV511_ALT_SIZE_257;
! 		else if (size == 513) alt = OV511_ALT_SIZE_513;
! 		else if (size == 769) alt = OV511_ALT_SIZE_769;
! 		else if (size == 993) alt = OV511_ALT_SIZE_993;
! 		else {
! 			err("Set packet size: invalid size (%d)", size);
  			return -EINVAL;
  		}
! 	} else if (ov511->bridge == BRG_OV511PLUS) {
! 		if (size == 0) alt = OV511PLUS_ALT_SIZE_0;
! 		else if (size == 33) alt = OV511PLUS_ALT_SIZE_33;
! 		else if (size == 129) alt = OV511PLUS_ALT_SIZE_129;
! 		else if (size == 257) alt = OV511PLUS_ALT_SIZE_257;
! 		else if (size == 385) alt = OV511PLUS_ALT_SIZE_385;
! 		else if (size == 513) alt = OV511PLUS_ALT_SIZE_513;
! 		else if (size == 769) alt = OV511PLUS_ALT_SIZE_769;
! 		else if (size == 961) alt = OV511PLUS_ALT_SIZE_961;
! 		else {
! 			err("Set packet size: invalid size (%d)", size);
! 			return -EINVAL;
! 		}
! 	} else {
! 		err("Set packet size: Invalid bridge type");
  		return -EINVAL;
  	}
  
! 	PDEBUG(3, "set packet size: %d, mult=%d, alt=%d", size, mult, alt);
  
! 	if (ov511_reg_write(ov511->dev, OV511_REG_FIFO_PACKET_SIZE, mult) < 0)
! 		return -ENOMEM;
! 	
! 	if (usb_set_interface(ov511->dev, ov511->iface, alt) < 0) {
! 		err("Set packet size: set interface error");
! 		return -EBUSY;
  	}
  
! 	// FIXME - Should we only reset the FIFO?
! 	if (ov511_reset(ov511->dev, OV511_RESET_NOREGS) < 0)
! 		return -ENOMEM;
  
! 	ov511->packet_size = size;
  
! 	if (ov511_restart(ov511->dev) < 0)
  		return -EIO;
  
  	return 0;
  }
  
  
! static inline int
! ov7610_set_picture(struct usb_ov511 *ov511, struct video_picture *p)
! {
! 	int ret;
! 	struct usb_device *dev = ov511->dev;
  
! 	PDEBUG(4, "ov511_set_picture");
  
! 	if (ov511_stop(dev) < 0)
! 		return -EIO;
  
! 	ov511->contrast = p->contrast;
! 	ov511->brightness = p->brightness;
! 	ov511->colour = p->colour;
! 	ov511->hue = p->hue;
! 	ov511->whiteness = p->whiteness;
  
! 	if ((ret = ov511_i2c_read(dev, OV7610_REG_COM_B)) < 0)
  		return -EIO;
+ #if 0
+ 	/* disable auto adjust mode */
+ 	if (ov511_i2c_write(dev, OV7610_REG_COM_B, ret & 0xfe) < 0)
+ 		return -EIO;
+ #endif
+ 	if (ov511->sensor == SEN_OV7610 || ov511->sensor == SEN_OV7620AE
+ 		|| ov511->sensor == SEN_OV6620)
+ 		if (ov511_i2c_write(dev, OV7610_REG_SAT, p->colour >> 8) < 0)
+ 			return -EIO;
  
! 	if (ov511->sensor == SEN_OV7610 || ov511->sensor == SEN_OV6620) {
! 		if (ov511_i2c_write(dev, OV7610_REG_CNT, p->contrast >> 8) < 0)
! 			return -EIO;
  
! 		if (ov511_i2c_write(dev, OV7610_REG_RED, 0xFF - (p->hue >> 8)) < 0)
! 			return -EIO;
  
! 		if (ov511_i2c_write(dev, OV7610_REG_BLUE, p->hue >> 8) < 0)
! 			return -EIO;
  
! 		if (ov511_i2c_write(dev, OV7610_REG_BRT, p->brightness >> 8) < 0)
! 			return -EIO;
! 	} else if ((ov511->sensor == SEN_OV7620) 
! 	         || (ov511->sensor == SEN_OV7620AE)) {
! #if 0
! 		int cur_sat, new_sat, tmp;
  
! 		cur_sat = ov511_i2c_read(dev, OV7610_REG_BLUE);
  
! 		tmp = (p->hue >> 8) - cur_sat;
! 		new_sat = (tmp < 0) ? (-tmp) | 0x80 : tmp;
  
! 	        PDEBUG(1, "cur=%d target=%d diff=%d", cur_sat, p->hue >> 8, tmp); 
  
! 		if (ov511_i2c_write(dev, OV7610_REG_BLUE, new_sat) < 0)
! 			return -EIO;
  
! 	        // DEBUG_CODE
! 	        PDEBUG(1, "hue=%d", ov511_i2c_read(dev, OV7610_REG_BLUE)); 
  
! #endif
  	}
  
! 	if (ov511_restart(dev) < 0)
  		return -EIO;
  
  	return 0;
  }
  
! static inline int
! ov7610_get_picture(struct usb_ov511 *ov511, struct video_picture *p)
  {
! 	int ret;
! 	struct usb_device *dev = ov511->dev;
  
! 	PDEBUG(4, "ov511_get_picture");
  
! 	if (ov511_stop(dev) < 0)
! 		return -EIO;
  
! 	if ((ret = ov511_i2c_read(dev, OV7610_REG_SAT)) < 0) return -EIO;
! 	p->colour = ret << 8;
  
! 	if ((ret = ov511_i2c_read(dev, OV7610_REG_CNT)) < 0) return -EIO;
! 	p->contrast = ret << 8;
  
! 	if ((ret = ov511_i2c_read(dev, OV7610_REG_BRT)) < 0) return -EIO;
! 	p->brightness = ret << 8;
  
! 	/* This may not be the best way to do it */
! 	if ((ret = ov511_i2c_read(dev, OV7610_REG_BLUE)) < 0) return -EIO;
! 	p->hue = ret << 8;
  
! 	p->whiteness = 105 << 8;
  
! 	/* Can we get these from frame[0]? -claudio? */
! 	p->depth = ov511->frame[0].depth;
! 	p->palette = ov511->frame[0].format;
  
! 	if (ov511_restart(dev) < 0)
! 		return -EIO;
  
  	return 0;
  }
  
! /* Returns number of bits per pixel (regardless of where they are located; planar or
!  * not), or zero for unsupported format.
   */
+ static int ov511_get_depth(int palette)
+ {
+ 	switch (palette) {
+ 	case VIDEO_PALETTE_GREY:    return 8;
+ 	case VIDEO_PALETTE_RGB565:  return 16;
+ 	case VIDEO_PALETTE_RGB24:   return 24;  
+ 	case VIDEO_PALETTE_YUV422:  return 16;
+ 	case VIDEO_PALETTE_YUYV:    return 16;
+ 	case VIDEO_PALETTE_YUV420:  return 24;
+ 	case VIDEO_PALETTE_YUV422P: return 24; /* Planar */
+ 	default:		    return 0;  /* Invalid format */
+ 	}
+ }
+ 
+ /* LNCNT values fixed by Lawrence Glaister  */
+ static struct mode_list mlist[] = {
+ 	/* W    H   C  PXCNT LNCNT PXDIV LNDIV M420  COMA  COML */
+ 	{ 640, 480, 0, 0x4f, 0x3b, 0x00, 0x00, 0x03, 0x24, 0x9e },
+ 	{ 640, 480, 1, 0x4f, 0x3b, 0x00, 0x00, 0x03, 0x24, 0x9e },
+ 	{ 320, 240, 0, 0x27, 0x1d, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 320, 240, 1, 0x27, 0x1d, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 352, 288, 0, 0x2b, 0x25, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 352, 288, 1, 0x2b, 0x25, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 384, 288, 0, 0x2f, 0x25, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 384, 288, 1, 0x2f, 0x25, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 448, 336, 0, 0x37, 0x29, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 448, 336, 1, 0x37, 0x29, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 176, 144, 0, 0x15, 0x12, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 176, 144, 1, 0x15, 0x12, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 160, 120, 0, 0x13, 0x0e, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 160, 120, 1, 0x13, 0x0e, 0x00, 0x00, 0x03, 0x04, 0x1e },
+ 	{ 0, 0 }
+ };
+ 
  static int
! ov511_mode_init_regs(struct usb_ov511 *ov511,
! 		     int width, int height, int mode, int sub_flag)
  {
  	int i;
+ 	struct usb_device *dev = ov511->dev;
+ 	int hwsbase, hwebase, vwsbase, vwebase, hwsize, vwsize; 
+ 	int hwscale = 0, vwscale = 0;
  
! 	PDEBUG(3, "width:%d, height:%d, mode:%d, sub:%d",
! 	       width, height, mode, sub_flag);
  
! 	if (ov511_stop(ov511->dev) < 0)
! 		return -EIO;
  
! 	/* Dumppix only works with RGB24 */
! 	if (dumppix && (mode != VIDEO_PALETTE_RGB24)) {
! 		err("dumppix only supported with RGB 24");
  		return -EINVAL;
+ 	}
  
! 	if (mode == VIDEO_PALETTE_GREY) {
! 		ov511_reg_write(dev, 0x16, 0x00);
! 		if (ov511->sensor == SEN_OV7610
! 		    || ov511->sensor == SEN_OV7620AE) {
! 			/* these aren't valid on the OV6620/OV7620 */
! 			ov511_i2c_write(dev, 0x0e, 0x44);
! 		}
! 		ov511_i2c_write(dev, 0x13, autoadjust ? 0x21 : 0x20);
  
! 		/* For snapshot */
! 		ov511_reg_write(dev, 0x1e, 0x00);
! 		ov511_reg_write(dev, 0x1f, 0x01);
! 	} else {
! 		ov511_reg_write(dev, 0x16, 0x01);
! 		if (ov511->sensor == SEN_OV7610
! 		    || ov511->sensor == SEN_OV7620AE) {
! 			/* not valid on the OV6620/OV7620 */
! 			ov511_i2c_write(dev, 0x0e, 0x04);
! 		}
! 		ov511_i2c_write(dev, 0x13, autoadjust ? 0x01 : 0x00);
  
! 		/* For snapshot */
! 		ov511_reg_write(dev, 0x1e, 0x01);
! 		ov511_reg_write(dev, 0x1f, 0x03);
! 	}
  
! 	/* The different sensor ICs handle setting up of window differently */
! 	switch (ov511->sensor) {
! 	case SEN_OV7610:
! 	case SEN_OV7620AE:
! 		hwsbase = 0x38;
! 		hwebase = 0x3a;
! 		vwsbase = vwebase = 0x05;
! 		break;
! 	case SEN_OV6620:
! 		hwsbase = 0x38;
! 		hwebase = 0x3a;
! 		vwsbase = 0x05;
! 		vwebase = 0x06;
! 		break;
! 	case SEN_OV7620:
! 		hwsbase = 0x2c;
! 		hwebase = 0x2d;
! 		vwsbase = vwebase = 0x05;
  		break;
  	default:
+ 		err("Invalid sensor");
  		return -EINVAL;
  	}
  
! 	/* Bit 5 of COM C register varies with sensor */ 
! 	if (ov511->sensor == SEN_OV6620) {
! 		if (width > 176 && height > 144) {  /* CIF */
! 			ov511_i2c_write(dev, 0x14, 0x04);
! 			hwscale = 1;
! 			vwscale = 1;  /* The datasheet says 0; it's wrong */
! 			hwsize = 352;
! 			vwsize = 288;
! 		} else {			    /* QCIF */
! 			ov511_i2c_write(dev, 0x14, 0x24);
! 			hwsize = 176;
! 			vwsize = 144;
! 		}
  	}
! 	else {
! 		if (width > 320 && height > 240) {  /* VGA */
! 			ov511_i2c_write(dev, 0x14, 0x04);
! 			hwscale = 2;
! 			vwscale = 1;
! 			hwsize = 640;
! 			vwsize = 480;
! 		} else {			    /* QVGA */
! 			ov511_i2c_write(dev, 0x14, 0x24);
! 			hwscale = 1;
! 			hwsize = 320;
! 			vwsize = 240;
! 		}	
  	}
  
! 	/* FIXME! - This needs to be changed to support 160x120 and 6620!!! */
! 	if (sub_flag) {
! 		ov511_i2c_write(dev, 0x17, hwsbase+(ov511->subx>>hwscale));
! 		ov511_i2c_write(dev, 0x18, hwebase+((ov511->subx+ov511->subw)>>hwscale));
! 		ov511_i2c_write(dev, 0x19, vwsbase+(ov511->suby>>vwscale));
! 		ov511_i2c_write(dev, 0x1a, vwebase+((ov511->suby+ov511->subh)>>vwscale));
! 	} else {
! 		ov511_i2c_write(dev, 0x17, hwsbase);
! 		ov511_i2c_write(dev, 0x18, hwebase + (hwsize>>hwscale));
! 		ov511_i2c_write(dev, 0x19, vwsbase);
! 		ov511_i2c_write(dev, 0x1a, vwebase + (vwsize>>vwscale));
! 	}
  
! 	for (i = 0; mlist[i].width; i++) {
! 		int lncnt, pxcnt, clock;
  
! 		if (width != mlist[i].width || height != mlist[i].height)
! 			continue;
  
! 		if (!mlist[i].color && mode != VIDEO_PALETTE_GREY)
! 			continue;
! 
! 		/* Here I'm assuming that snapshot size == image size.
! 		 * I hope that's always true. --claudio
! 		 */
! 		pxcnt = sub_flag ? (ov511->subw >> 3) - 1 : mlist[i].pxcnt;
! 		lncnt = sub_flag ? (ov511->subh >> 3) - 1 : mlist[i].lncnt;
! 
! 		ov511_reg_write(dev, 0x12, pxcnt);
! 		ov511_reg_write(dev, 0x13, lncnt);
! 		ov511_reg_write(dev, 0x14, mlist[i].pxdv);
! 		ov511_reg_write(dev, 0x15, mlist[i].lndv);
! 		ov511_reg_write(dev, 0x18, mlist[i].m420);
! 
! 		/* Snapshot additions */
! 		ov511_reg_write(dev, 0x1a, pxcnt);
! 		ov511_reg_write(dev, 0x1b, lncnt);
!                 ov511_reg_write(dev, 0x1c, mlist[i].pxdv);
!                 ov511_reg_write(dev, 0x1d, mlist[i].lndv);
! 
! 		/* Calculate and set the clock divisor */
! 		clock = ((sub_flag ? ov511->subw * ov511->subh : width * height)
! 			* (mlist[i].color ? 3 : 2) / 2) / 66000;
! #if 0
! 		clock *= cams;
! #endif
! 		ov511_i2c_write(dev, 0x11, clock);
! 
! 		/* We only have code to convert GBR -> RGB24 */
! 		if ((mode == VIDEO_PALETTE_RGB24) && sensor_gbr)
! 			ov511_i2c_write(dev, 0x12, mlist[i].common_A | (testpat?0x0a:0x08));
! 		else
! 			ov511_i2c_write(dev, 0x12, mlist[i].common_A | (testpat?0x02:0x00));
! 
! 		/* 7620/6620 don't have register 0x35, so play it safe */
! 		if (ov511->sensor == SEN_OV7610 ||
! 		    ov511->sensor == SEN_OV7620AE)
! 			ov511_i2c_write(dev, 0x35, mlist[i].common_L);
  
  		break;
  	}
! 
! 	if (compress) {
! 		ov511_reg_write(dev, 0x78, 0x03); // Turn on Y compression
! 		ov511_reg_write(dev, 0x79, 0x00); // Disable LUTs
! 	}
! 
! 	if (ov511_restart(ov511->dev) < 0)
! 		return -EIO;
! 
! 	if (mlist[i].width == 0) {
! 		err("Unknown mode (%d, %d): %d", width, height, mode);
  		return -EINVAL;
  	}
  
+ #ifdef OV511_DEBUG
+ 	if (debug >= 5)
+ 		ov511_dump_i2c_regs(dev);
+ #endif
+ 
  	return 0;
  }
  
***************
*** 3073,3094 ****
   * coefficients are scaled into 16.16 fixed-point integers.
   * They were determined as follows:
   *
!  *	double brightness = 1.0;  (0->black; 1->full scale)
   *	double saturation = 1.0;  (0->greyscale; 1->full color)
   *	double fixScale = brightness * 256 * 256;
   *	int rvScale = (int)(1.402 * saturation * fixScale);
   *	int guScale = (int)(-0.344136 * saturation * fixScale);
   *	int gvScale = (int)(-0.714136 * saturation * fixScale);
   *	int buScale = (int)(1.772 * saturation * fixScale);
!  *	int yScale = (int)(fixScale);
   */
  
  /* LIMIT: convert a 16.16 fixed-point value to a byte, with clipping. */
  #define LIMIT(x) ((x)>0xffffff?0xff: ((x)<=0xffff?0:((x)>>16)))
  
  static inline void
! move_420_block(int yTL, int yTR, int yBL, int yBR, int u, int v,
! 	       int rowPixels, unsigned char * rgb, int bits)
  {
  	const int rvScale = 91881;
  	const int guScale = -22553;
--- 1154,1175 ----
   * coefficients are scaled into 16.16 fixed-point integers.
   * They were determined as follows:
   *
!  *	double brightness = 1.0;  (0->black; 1->full scale) 
   *	double saturation = 1.0;  (0->greyscale; 1->full color)
   *	double fixScale = brightness * 256 * 256;
   *	int rvScale = (int)(1.402 * saturation * fixScale);
   *	int guScale = (int)(-0.344136 * saturation * fixScale);
   *	int gvScale = (int)(-0.714136 * saturation * fixScale);
   *	int buScale = (int)(1.772 * saturation * fixScale);
!  *	int yScale = (int)(fixScale);	
   */
  
  /* LIMIT: convert a 16.16 fixed-point value to a byte, with clipping. */
  #define LIMIT(x) ((x)>0xffffff?0xff: ((x)<=0xffff?0:((x)>>16)))
  
  static inline void
! ov511_move_420_block(int yTL, int yTR, int yBL, int yBR, int u, int v, 
! 	int rowPixels, unsigned char * rgb, int bits)
  {
  	const int rvScale = 91881;
  	const int guScale = -22553;
***************
*** 3111,3213 ****
  
  	if (bits == 24) {
  		/* Write out top two pixels */
! 		rgb[0] = LIMIT(b+yTL); rgb[1] = LIMIT(g+yTL);
! 		rgb[2] = LIMIT(r+yTL);
! 
! 		rgb[3] = LIMIT(b+yTR); rgb[4] = LIMIT(g+yTR);
! 		rgb[5] = LIMIT(r+yTR);
  
  		/* Skip down to next line to write out bottom two pixels */
  		rgb += 3 * rowPixels;
! 		rgb[0] = LIMIT(b+yBL); rgb[1] = LIMIT(g+yBL);
! 		rgb[2] = LIMIT(r+yBL);
! 
! 		rgb[3] = LIMIT(b+yBR); rgb[4] = LIMIT(g+yBR);
! 		rgb[5] = LIMIT(r+yBR);
! 	} else if (bits == 16) {
! 		/* Write out top two pixels */
! 		rgb[0] = ((LIMIT(b+yTL) >> 3) & 0x1F)
! 			| ((LIMIT(g+yTL) << 3) & 0xE0);
! 		rgb[1] = ((LIMIT(g+yTL) >> 5) & 0x07)
! 			| (LIMIT(r+yTL) & 0xF8);
! 
! 		rgb[2] = ((LIMIT(b+yTR) >> 3) & 0x1F)
! 			| ((LIMIT(g+yTR) << 3) & 0xE0);
! 		rgb[3] = ((LIMIT(g+yTR) >> 5) & 0x07)
! 			| (LIMIT(r+yTR) & 0xF8);
! 
! 		/* Skip down to next line to write out bottom two pixels */
! 		rgb += 2 * rowPixels;
! 
! 		rgb[0] = ((LIMIT(b+yBL) >> 3) & 0x1F)
! 			| ((LIMIT(g+yBL) << 3) & 0xE0);
! 		rgb[1] = ((LIMIT(g+yBL) >> 5) & 0x07)
! 			| (LIMIT(r+yBL) & 0xF8);
! 
! 		rgb[2] = ((LIMIT(b+yBR) >> 3) & 0x1F)
! 			| ((LIMIT(g+yBR) << 3) & 0xE0);
! 		rgb[3] = ((LIMIT(g+yBR) >> 5) & 0x07)
! 			| (LIMIT(r+yBR) & 0xF8);
! 	}
! }
! 
! /**********************************************************************
!  *
!  * Raw data parsing
!  *
!  **********************************************************************/
! 
! /* Copies a 64-byte segment at pIn to an 8x8 block at pOut. The width of the
!  * image at pOut is specified by w.
!  */
! static inline void
! make_8x8(unsigned char *pIn, unsigned char *pOut, int w)
! {
! 	unsigned char *pOut1 = pOut;
! 	int x, y;
! 
! 	for (y = 0; y < 8; y++) {
! 		pOut1 = pOut;
! 		for (x = 0; x < 8; x++) {
! 			*pOut1++ = *pIn++;
! 		}
! 		pOut += w;
! 	}
! }
  
! /*
!  * For RAW BW (YUV400) images, data shows up in 256 byte segments.
!  * The segments represent 4 squares of 8x8 pixels as follows:
!  *
!  *      0  1 ...  7    64  65 ...  71   ...  192 193 ... 199
!  *      8  9 ... 15    72  73 ...  79        200 201 ... 207
!  *           ...              ...                    ...
!  *     56 57 ... 63   120 121 ... 127        248 249 ... 255
!  *
!  */ 
! static void
! yuv400raw_to_yuv400p(struct ov511_frame *frame,
! 		     unsigned char *pIn0, unsigned char *pOut0)
! {
! 	int x, y;
! 	unsigned char *pIn, *pOut, *pOutLine;
  
! 	/* Copy Y */
! 	pIn = pIn0;
! 	pOutLine = pOut0;
! 	for (y = 0; y < frame->rawheight - 1; y += 8) {
! 		pOut = pOutLine;
! 		for (x = 0; x < frame->rawwidth - 1; x += 8) {
! 			make_8x8(pIn, pOut, frame->rawwidth);
! 			pIn += 64;
! 			pOut += 8;
! 		}
! 		pOutLine += 8 * frame->rawwidth;
  	}
  }
  
  /*
!  * For YUV4:2:0 images, the data shows up in 384 byte segments.
   * The first 64 bytes of each segment are U, the next 64 are V.  The U and
   * V are arranged as follows:
   *
--- 1192,1225 ----
  
  	if (bits == 24) {
  		/* Write out top two pixels */
! 		rgb[0] = LIMIT(b+yTL); rgb[1] = LIMIT(g+yTL); rgb[2] = LIMIT(r+yTL);
! 		rgb[3] = LIMIT(b+yTR); rgb[4] = LIMIT(g+yTR); rgb[5] = LIMIT(r+yTR);
  
  		/* Skip down to next line to write out bottom two pixels */
  		rgb += 3 * rowPixels;
! 		rgb[0] = LIMIT(b+yBL); rgb[1] = LIMIT(g+yBL); rgb[2] = LIMIT(r+yBL);
! 		rgb[3] = LIMIT(b+yBR); rgb[4] = LIMIT(g+yBR); rgb[5] = LIMIT(r+yBR);
! 	} else if (bits == 16) {
! 		/* Write out top two pixels */
! 		rgb[0] = ((LIMIT(b+yTL) >> 3) & 0x1F) | ((LIMIT(g+yTL) << 3) & 0xE0);
! 		rgb[1] = ((LIMIT(g+yTL) >> 5) & 0x07) | (LIMIT(r+yTL) & 0xF8);
  
! 		rgb[2] = ((LIMIT(b+yTR) >> 3) & 0x1F) | ((LIMIT(g+yTR) << 3) & 0xE0);
! 		rgb[3] = ((LIMIT(g+yTR) >> 5) & 0x07) | (LIMIT(r+yTR) & 0xF8);
  
! 		/* Skip down to next line to write out bottom two pixels */
! 		rgb += 2 * rowPixels;
! 
! 		rgb[0] = ((LIMIT(b+yBL) >> 3) & 0x1F) | ((LIMIT(g+yBL) << 3) & 0xE0);
! 		rgb[1] = ((LIMIT(g+yBL) >> 5) & 0x07) | (LIMIT(r+yBL) & 0xF8);
! 
! 		rgb[2] = ((LIMIT(b+yBR) >> 3) & 0x1F) | ((LIMIT(g+yBR) << 3) & 0xE0);
! 		rgb[3] = ((LIMIT(g+yBR) >> 5) & 0x07) | (LIMIT(r+yBR) & 0xF8);
  	}
  }
  
  /*
!  * For a 640x480 YUV4:2:0 images, data shows up in 1200 384 byte segments.
   * The first 64 bytes of each segment are U, the next 64 are V.  The U and
   * V are arranged as follows:
   *
***************
*** 3227,3235 ****
   *     56 57 ... 63   120 121 ... 127   ...  248 249 ... 255
   *
   * Note that the U and V data in one segment represents a 16 x 16 pixel
!  * area, but the Y data represents a 32 x 8 pixel area. If the width is not an
!  * even multiple of 32, the extra 8x8 blocks within a 32x8 block belong to the
!  * next horizontal stripe.
   *
   * If dumppix module param is set, _parse_data just dumps the incoming segments,
   * verbatim, in order, into the frame. When used with vidcat -f ppm -s 640x480
--- 1239,1245 ----
   *     56 57 ... 63   120 121 ... 127   ...  248 249 ... 255
   *
   * Note that the U and V data in one segment represents a 16 x 16 pixel
!  * area, but the Y data represents a 32 x 8 pixel area.
   *
   * If dumppix module param is set, _parse_data just dumps the incoming segments,
   * verbatim, in order, into the frame. When used with vidcat -f ppm -s 640x480
***************
*** 3238,4082 ****
   * this data is scrambled.
   */
  
! /* Converts from raw, uncompressed segments at pIn0 to a YUV420P frame at pOut0.
!  *
!  * FIXME: Currently only handles width and height that are multiples of 16
!  */
  static void
! yuv420raw_to_yuv420p(struct ov511_frame *frame,
! 		     unsigned char *pIn0, unsigned char *pOut0)
  {
! 	int k, x, y;
! 	unsigned char *pIn, *pOut, *pOutLine;
! 	const unsigned int a = frame->rawwidth * frame->rawheight;
! 	const unsigned int w = frame->rawwidth / 2;
  
- 	/* Copy U and V */
  	pIn = pIn0;
! 	pOutLine = pOut0 + a;
! 	for (y = 0; y < frame->rawheight - 1; y += 16) {
! 		pOut = pOutLine;
! 		for (x = 0; x < frame->rawwidth - 1; x += 16) {
! 			make_8x8(pIn, pOut, w);
! 			make_8x8(pIn + 64, pOut + a/4, w);
! 			pIn += 384;
! 			pOut += 8;
  		}
! 		pOutLine += 8 * w;
  	}
  
- 	/* Copy Y */
  	pIn = pIn0 + 128;
! 	pOutLine = pOut0;
! 	k = 0;
! 	for (y = 0; y < frame->rawheight - 1; y += 8) {
! 		pOut = pOutLine;
! 		for (x = 0; x < frame->rawwidth - 1; x += 8) {
! 			make_8x8(pIn, pOut, frame->rawwidth);
! 			pIn += 64;
! 			pOut += 8;
! 			if ((++k) > 3) {
! 				k = 0;
! 				pIn += 128;
  			}
  		}
! 		pOutLine += 8 * frame->rawwidth;
  	}
  }
  
- /*
-  * fixFrameRGBoffset--
-  * My camera seems to return the red channel about 1 pixel
-  * low, and the blue channel about 1 pixel high. After YUV->RGB
-  * conversion, we can correct this easily. OSL 2/24/2000.
-  */
  static void
! fixFrameRGBoffset(struct ov511_frame *frame)
! {
! 	int x, y;
! 	int rowBytes = frame->width*3, w = frame->width;
! 	unsigned char *rgb = frame->data;
! 	const int shift = 1;  /* Distance to shift pixels by, vertically */
! 
! 	/* Don't bother with little images */
! 	if (frame->width < 400)
! 		return;
! 
! 	/* This only works with RGB24 */
! 	if (frame->format != VIDEO_PALETTE_RGB24)
! 		return;
! 
! 	/* Shift red channel up */
! 	for (y = shift; y < frame->height; y++)	{
! 		int lp = (y-shift)*rowBytes;     /* Previous line offset */
! 		int lc = y*rowBytes;             /* Current line offset */
! 		for (x = 0; x < w; x++)
! 			rgb[lp+x*3+2] = rgb[lc+x*3+2]; /* Shift red up */
! 	}
! 
! 	/* Shift blue channel down */
! 	for (y = frame->height-shift-1; y >= 0; y--) {
! 		int ln = (y + shift) * rowBytes;  /* Next line offset */
! 		int lc = y * rowBytes;            /* Current line offset */
! 		for (x = 0; x < w; x++)
! 			rgb[ln+x*3+0] = rgb[lc+x*3+0]; /* Shift blue down */
! 	}
! }
! 
! /**********************************************************************
!  *
!  * Decompression
!  *
!  **********************************************************************/
! 
! /* Chooses a decompression module, locks it, and sets ov->decomp_ops
!  * accordingly. Returns -ENXIO if decompressor is not available, otherwise
!  * returns 0 if no other error.
!  */
! static int
! request_decompressor(struct usb_ov511 *ov)
  {
! 	if (!ov)
! 		return -ENODEV;
  
! 	if (ov->decomp_ops) {
! 		err("ERROR: Decompressor already requested!");
! 		return -EINVAL;
  	}
  
! 	lock_kernel();
! 
! 	/* Try to get MMX, and fall back on no-MMX if necessary */
! 	if (ov->bclass == BCL_OV511) {
! 		if (ov511_mmx_decomp_ops) {
! 			PDEBUG(3, "Using OV511 MMX decompressor");
! 			ov->decomp_ops = ov511_mmx_decomp_ops;
! 		} else if (ov511_decomp_ops) {
! 			PDEBUG(3, "Using OV511 decompressor");
! 			ov->decomp_ops = ov511_decomp_ops;
! 		} else {
! 			err("No decompressor available");
! 		}
! 	} else if (ov->bclass == BCL_OV518) {
! 		if (ov518_mmx_decomp_ops) {
! 			PDEBUG(3, "Using OV518 MMX decompressor");
! 			ov->decomp_ops = ov518_mmx_decomp_ops;
! 		} else if (ov518_decomp_ops) {
! 			PDEBUG(3, "Using OV518 decompressor");
! 			ov->decomp_ops = ov518_decomp_ops;
! 		} else {
! 			err("No decompressor available");
  		}
! 	} else {
! 		err("Unknown bridge");
  	}
  
! 	if (ov->decomp_ops) {
! 		if (!ov->decomp_ops->owner) {
! 			ov->decomp_ops = NULL;
! 			unlock_kernel();
! 			return -ENOSYS;
  		}
- 		__MOD_INC_USE_COUNT(ov->decomp_ops->owner);
- 		unlock_kernel();
- 		return 0;
- 	} else {
- 		unlock_kernel();
- 		return -ENOSYS;
  	}
  }
  
- /* Unlocks decompression module and nulls ov->decomp_ops. Safe to call even
-  * if ov->decomp_ops is NULL.
-  */
  static void
! release_decompressor(struct usb_ov511 *ov)
  {
! 	int released = 0;	/* Did we actually do anything? */
! 
! 	if (!ov)
! 		return;
  
! 	lock_kernel();
! 
! 	if (ov->decomp_ops && ov->decomp_ops->owner) {
! 		__MOD_DEC_USE_COUNT(ov->decomp_ops->owner);
! 		released = 1;
! 	}
! 
! 	ov->decomp_ops = NULL;
! 
! 	unlock_kernel();
! 
! 	if (released)
! 		PDEBUG(3, "Decompressor released");
! }
! 
! static void
! decompress(struct usb_ov511 *ov, struct ov511_frame *frame,
! 	   unsigned char *pIn0, unsigned char *pOut0)
! {
! 	if (!ov->decomp_ops)
! 		if (request_decompressor(ov))
! 			return;
! 
! 	PDEBUG(4, "Decompressing %d bytes", frame->bytes_recvd);
! 
! 	if (frame->format == VIDEO_PALETTE_GREY
! 	    && ov->decomp_ops->decomp_400) {
! 		int ret = ov->decomp_ops->decomp_400(
! 			pIn0,
! 			pOut0,
! 			frame->compbuf,
! 			frame->rawwidth,
! 			frame->rawheight,
! 			frame->bytes_recvd);
! 		PDEBUG(4, "DEBUG: decomp_400 returned %d", ret);
! 	} else if (frame->format != VIDEO_PALETTE_GREY
! 		   && ov->decomp_ops->decomp_420) {
! 		int ret = ov->decomp_ops->decomp_420(
! 			pIn0,
! 			pOut0,
! 			frame->compbuf,
! 			frame->rawwidth,
! 			frame->rawheight,
! 			frame->bytes_recvd);
! 		PDEBUG(4, "DEBUG: decomp_420 returned %d", ret);
! 	} else {
! 		err("Decompressor does not support this format");
! 	}
  }
  
! /**********************************************************************
!  *
!  * Format conversion
!  *
!  **********************************************************************/
! 
! /* Converts from planar YUV420 to RGB24. */
  static void
! yuv420p_to_rgb(struct ov511_frame *frame,
! 	       unsigned char *pIn0, unsigned char *pOut0, int bits)
  {
! 	const int numpix = frame->width * frame->height;
! 	const int bytes = bits >> 3;
! 	int i, j, y00, y01, y10, y11, u, v;
! 	unsigned char *pY = pIn0;
! 	unsigned char *pU = pY + numpix;
! 	unsigned char *pV = pU + numpix / 4;
! 	unsigned char *pOut = pOut0;
! 
! 	for (j = 0; j <= frame->height - 2; j += 2) {
! 		for (i = 0; i <= frame->width - 2; i += 2) {
! 			y00 = *pY;
! 			y01 = *(pY + 1);
! 			y10 = *(pY + frame->width);
! 			y11 = *(pY + frame->width + 1);
! 			u = (*pU++) - 128;
! 			v = (*pV++) - 128;
! 
! 			move_420_block(y00, y01, y10, y11, u, v,
! 				       frame->width, pOut, bits);
  
! 			pY += 2;
! 			pOut += 2 * bytes;
  		}
! 		pY += frame->width;
! 		pOut += frame->width * bytes;
  	}
- }
- 
- /* Converts from planar YUV420 to YUV422 (YUYV). */
- static void
- yuv420p_to_yuv422(struct ov511_frame *frame,
- 		  unsigned char *pIn0, unsigned char *pOut0)
- {
- 	const int numpix = frame->width * frame->height;
- 	int i, j;
- 	unsigned char *pY = pIn0;
- 	unsigned char *pU = pY + numpix;
- 	unsigned char *pV = pU + numpix / 4;
- 	unsigned char *pOut = pOut0;
- 
- 	for (i = 0; i < numpix; i++) {
- 		*pOut = *(pY + i);
- 		pOut += 2;
- 	}
- 
- 	pOut = pOut0 + 1;
- 	for (j = 0; j <= frame->height - 2 ; j += 2) {
- 		for (i = 0; i <= frame->width - 2; i += 2) {
- 			int u = *pU++;
- 			int v = *pV++;
  
  			*pOut = u;
  			*(pOut+2) = v;
! 			*(pOut+frame->width*2) = u;
! 			*(pOut+frame->width*2+2) = v;
  			pOut += 4;
  		}
! 		pOut += (frame->width * 2);
  	}
  }
  
- /* Converts pData from planar YUV420 to planar YUV422 **in place**. */
  static void
! yuv420p_to_yuv422p(struct ov511_frame *frame, unsigned char *pData)
  {
! 	const int numpix = frame->width * frame->height;
! 	const int w = frame->width;
! 	int j;
! 	unsigned char *pIn, *pOut;
! 
! 	/* Clear U and V */
! 	memset(pData + numpix + numpix / 2, 127, numpix / 2);
! 
! 	/* Convert V starting from beginning and working forward */
! 	pIn = pData + numpix + numpix / 4;
! 	pOut = pData + numpix +numpix / 2;
! 	for (j = 0; j <= frame->height - 2; j += 2) {
! 		memmove(pOut, pIn, w/2);
! 		memmove(pOut + w/2, pIn, w/2);
! 		pIn += w/2;
  		pOut += w;
  	}
  
! 	/* Convert U, starting from end and working backward */
! 	pIn = pData + numpix + numpix / 4;
! 	pOut = pData + numpix + numpix / 2;
! 	for (j = 0; j <= frame->height - 2; j += 2) {
! 		pIn -= w/2;
! 		pOut -= w;
! 		memmove(pOut, pIn, w/2);
! 		memmove(pOut + w/2, pIn, w/2);
  	}
  }
  
- /* Fuses even and odd fields together, and doubles width.
-  * INPUT: an odd field followed by an even field at pIn0, in YUV planar format
-  * OUTPUT: a normal YUV planar image, with correct aspect ratio
-  */
  static void
! deinterlace(struct ov511_frame *frame, int rawformat,
!             unsigned char *pIn0, unsigned char *pOut0)
  {
! 	const int fieldheight = frame->rawheight / 2;
! 	const int fieldpix = fieldheight * frame->rawwidth;
! 	const int w = frame->width;
! 	int x, y;
! 	unsigned char *pInEven, *pInOdd, *pOut;
! 
! 	PDEBUG(5, "fieldheight=%d", fieldheight);
  
! 	if (frame->rawheight != frame->height) {
! 		err("invalid height");
! 		return;
! 	}
! 
! 	if ((frame->rawwidth * 2) != frame->width) {
! 		err("invalid width");
! 		return;
  	}
  
! 	/* Y */
! 	pInOdd = pIn0;
! 	pInEven = pInOdd + fieldpix;
! 	pOut = pOut0;
! 	for (y = 0; y < fieldheight; y++) {
! 		for (x = 0; x < frame->rawwidth; x++) {
! 			*pOut = *pInEven;
! 			*(pOut+1) = *pInEven++;
! 			*(pOut+w) = *pInOdd;
! 			*(pOut+w+1) = *pInOdd++;
! 			pOut += 2;
  		}
! 		pOut += w;
  	}
  
! 	if (rawformat == RAWFMT_YUV420) {
! 	/* U */
! 		pInOdd = pIn0 + fieldpix * 2;
! 		pInEven = pInOdd + fieldpix / 4;
! 		for (y = 0; y < fieldheight / 2; y++) {
! 			for (x = 0; x < frame->rawwidth / 2; x++) {
! 				*pOut = *pInEven;
! 				*(pOut+1) = *pInEven++;
! 				*(pOut+w/2) = *pInOdd;
! 				*(pOut+w/2+1) = *pInOdd++;
! 				pOut += 2;
! 			}
! 			pOut += w/2;
! 		}
! 	/* V */
! 		pInOdd = pIn0 + fieldpix * 2 + fieldpix / 2;
! 		pInEven = pInOdd + fieldpix / 4;
! 		for (y = 0; y < fieldheight / 2; y++) {
! 			for (x = 0; x < frame->rawwidth / 2; x++) {
! 				*pOut = *pInEven;
! 				*(pOut+1) = *pInEven++;
! 				*(pOut+w/2) = *pInOdd;
! 				*(pOut+w/2+1) = *pInOdd++;
! 				pOut += 2;
! 			}
! 			pOut += w/2;
  		}
  	}
  }
  
  static void
! ov51x_postprocess_grey(struct usb_ov511 *ov, struct ov511_frame *frame)
  {
! 		/* Deinterlace frame, if necessary */
! 		if (ov->sensor == SEN_SAA7111A && frame->rawheight >= 480) {
! 			if (frame->compressed)
! 				decompress(ov, frame, frame->rawdata,
! 						 frame->tempdata);
! 			else
! 				yuv400raw_to_yuv400p(frame, frame->rawdata,
! 						     frame->tempdata);
  
! 			deinterlace(frame, RAWFMT_YUV400, frame->tempdata,
! 			            frame->data);
! 		} else {
! 			if (frame->compressed)
! 				decompress(ov, frame, frame->rawdata,
! 						 frame->data);
! 			else
! 				yuv400raw_to_yuv400p(frame, frame->rawdata,
! 						     frame->data);
  		}
  }
  
! /* Process raw YUV420 data into the format requested by the app. Conversion
!  * between V4L formats is allowed.
   */
! static void
! ov51x_postprocess_yuv420(struct usb_ov511 *ov, struct ov511_frame *frame)
  {
! 	/* Process frame->rawdata to frame->tempdata */
! 	if (frame->compressed)
! 		decompress(ov, frame, frame->rawdata, frame->tempdata);
! 	else
! 		yuv420raw_to_yuv420p(frame, frame->rawdata, frame->tempdata);
  
! 	/* Deinterlace frame, if necessary */
! 	if (ov->sensor == SEN_SAA7111A && frame->rawheight >= 480) {
! 		memcpy(frame->rawdata, frame->tempdata,
! 			MAX_RAW_DATA_SIZE(frame->width, frame->height));
! 		deinterlace(frame, RAWFMT_YUV420, frame->rawdata,
! 		            frame->tempdata);
! 	}
! 
! 	/* Frame should be (width x height) and not (rawwidth x rawheight) at
!          * this point. */
! 
! 	/* Process frame->tempdata to frame->data */
! 	switch (frame->format) {
! 	case VIDEO_PALETTE_RGB565:
! 		yuv420p_to_rgb(frame, frame->tempdata, frame->data, 16);
! 		break;
! 	case VIDEO_PALETTE_RGB24:
! 		yuv420p_to_rgb(frame, frame->tempdata, frame->data, 24);
! 		break;
! 	case VIDEO_PALETTE_YUV422:
! 	case VIDEO_PALETTE_YUYV:
! 		yuv420p_to_yuv422(frame, frame->tempdata, frame->data);
! 		break;
! 	case VIDEO_PALETTE_YUV420:
! 	case VIDEO_PALETTE_YUV420P:
! 		memcpy(frame->data, frame->tempdata,
! 			MAX_RAW_DATA_SIZE(frame->width, frame->height));
! 		break;
! 	case VIDEO_PALETTE_YUV422P:
! 		/* Data is converted in place, so copy it in advance */
! 		memcpy(frame->data, frame->tempdata,
! 			MAX_RAW_DATA_SIZE(frame->width, frame->height));
  
! 		yuv420p_to_yuv422p(frame, frame->data);
! 		break;
! 	default:
! 		err("Cannot convert YUV420 to %s",
! 		    symbolic(v4l1_plist, frame->format));
  	}
  
! 	if (fix_rgb_offset)
! 		fixFrameRGBoffset(frame);
! }
! 
! /* Post-processes the specified frame. This consists of:
!  * 	1. Decompress frame, if necessary
!  *	2. Deinterlace frame and scale to proper size, if necessary
!  * 	3. Convert from YUV planar to destination format, if necessary
!  * 	4. Fix the RGB offset, if necessary
!  */
! static void
! ov51x_postprocess(struct usb_ov511 *ov, struct ov511_frame *frame)
! {
! 	if (dumppix) {
! 		memset(frame->data, 0,
! 			MAX_DATA_SIZE(ov->maxwidth, ov->maxheight));
! 		PDEBUG(4, "Dumping %d bytes", frame->bytes_recvd);
! 		memcpy(frame->data, frame->rawdata, frame->bytes_recvd);
! 	} else {
! 		switch (frame->format) {
! 		case VIDEO_PALETTE_GREY:
! 			ov51x_postprocess_grey(ov, frame);
! 			break;
! 		case VIDEO_PALETTE_YUV420:
! 		case VIDEO_PALETTE_YUV420P:
! 		case VIDEO_PALETTE_RGB565:
! 		case VIDEO_PALETTE_RGB24:
! 		case VIDEO_PALETTE_YUV422:
! 		case VIDEO_PALETTE_YUYV:
! 		case VIDEO_PALETTE_YUV422P:
! 			ov51x_postprocess_yuv420(ov, frame);
! 			break;
! 		default:
! 			err("Cannot convert data to %s",
! 			    symbolic(v4l1_plist, frame->format));
! 		}
  	}
  }
  
  /**********************************************************************
   *
!  * OV51x data transfer, IRQ handler
   *
   **********************************************************************/
  
! static inline void
! ov511_move_data(struct usb_ov511 *ov, unsigned char *in, int n)
  {
! 	int num, offset;
! 	int pnum = in[ov->packet_size - 1];		/* Get packet number */
! 	int max_raw = MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight);
! 	struct ov511_frame *frame = &ov->frame[ov->curframe];
! 	struct timeval *ts;
! 
! 	/* SOF/EOF packets have 1st to 8th bytes zeroed and the 9th
! 	 * byte non-zero. The EOF packet has image width/height in the
! 	 * 10th and 11th bytes. The 9th byte is given as follows:
! 	 *
! 	 * bit 7: EOF
! 	 *     6: compression enabled
! 	 *     5: 422/420/400 modes
! 	 *     4: 422/420/400 modes
! 	 *     3: 1
! 	 *     2: snapshot button on
! 	 *     1: snapshot frame
! 	 *     0: even/odd field
! 	 */
! 
! 	if (printph) {
! 		info("ph(%3d): %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x %2x",
! 		     pnum, in[0], in[1], in[2], in[3], in[4], in[5], in[6],
! 		     in[7], in[8], in[9], in[10], in[11]);
! 	}
! 
! 	/* Check for SOF/EOF packet */
! 	if ((in[0] | in[1] | in[2] | in[3] | in[4] | in[5] | in[6] | in[7]) ||
! 	    (~in[8] & 0x08))
! 		goto check_middle;
! 
! 	/* Frame end */
! 	if (in[8] & 0x80) {
! 		ts = (struct timeval *)(frame->data
! 		      + MAX_FRAME_SIZE(ov->maxwidth, ov->maxheight));
! 		do_gettimeofday(ts);
! 
! 		/* Get the actual frame size from the EOF header */
! 		frame->rawwidth = ((int)(in[9]) + 1) * 8;
! 		frame->rawheight = ((int)(in[10]) + 1) * 8;
! 
!  		PDEBUG(4, "Frame end, frame=%d, pnum=%d, w=%d, h=%d, recvd=%d",
! 			ov->curframe, pnum, frame->rawwidth, frame->rawheight,
! 			frame->bytes_recvd);
! 
! 		/* Validate the header data */
! 		RESTRICT_TO_RANGE(frame->rawwidth, ov->minwidth, ov->maxwidth);
! 		RESTRICT_TO_RANGE(frame->rawheight, ov->minheight,
! 				  ov->maxheight);
! 
! 		/* Don't allow byte count to exceed buffer size */
! 		RESTRICT_TO_RANGE(frame->bytes_recvd, 8, max_raw);
! 
! 		if (frame->scanstate == STATE_LINES) {
! 	    		int nextf;
! 
! 			frame->grabstate = FRAME_DONE;	// FIXME: Is this right?
! 
! 			if (waitqueue_active(&frame->wq)) {
! 				frame->grabstate = FRAME_DONE;
! 				wake_up_interruptible(&frame->wq);
! 			}
! 
! 			/* If next frame is ready or grabbing,
! 			 * point to it */
! 			nextf = (ov->curframe + 1) % OV511_NUMFRAMES;
! 			if (ov->frame[nextf].grabstate == FRAME_READY
! 			    || ov->frame[nextf].grabstate == FRAME_GRABBING) {
! 				ov->curframe = nextf;
! 				ov->frame[nextf].scanstate = STATE_SCANNING;
! 			} else {
! 				if (frame->grabstate == FRAME_DONE) {
! 					PDEBUG(4, "** Frame done **");
! 				} else {
! 					PDEBUG(4, "Frame not ready? state = %d",
! 						ov->frame[nextf].grabstate);
! 				}
! 
! 				ov->curframe = -1;
! 			}
! 		} else {
! 			PDEBUG(5, "Frame done, but not scanning");
! 		}
! 		/* Image corruption caused by misplaced frame->segment = 0
! 		 * fixed by carlosf@conectiva.com.br
! 		 */
! 	} else {
! 		/* Frame start */
! 		PDEBUG(4, "Frame start, framenum = %d", ov->curframe);
! 
! 		/* Check to see if it's a snapshot frame */
! 		/* FIXME?? Should the snapshot reset go here? Performance? */
! 		if (in[8] & 0x02) {
! 			frame->snapshot = 1;
! 			PDEBUG(3, "snapshot detected");
! 		}
! 
! 		frame->scanstate = STATE_LINES;
! 		frame->bytes_recvd = 0;
! 		frame->compressed = in[8] & 0x40;
! 	}
! 
! check_middle:
! 	/* Are we in a frame? */
! 	if (frame->scanstate != STATE_LINES) {
! 		PDEBUG(5, "Not in a frame; packet skipped");
! 		return;
! 	}
! 
! 	/* If frame start, skip header */
! 	if (frame->bytes_recvd == 0)
! 		offset = 9;
! 	else
! 		offset = 0;
! 
! 	num = n - offset - 1;
  
! 	/* Dump all data exactly as received */
! 	if (dumppix == 2) {
! 		frame->bytes_recvd += n - 1;
! 		if (frame->bytes_recvd <= max_raw)
! 			memcpy(frame->rawdata + frame->bytes_recvd - (n - 1),
! 				in, n - 1);
! 		else
! 			PDEBUG(3, "Raw data buffer overrun!! (%d)",
! 				frame->bytes_recvd - max_raw);
! 	} else if (!frame->compressed && !remove_zeros) {
! 		frame->bytes_recvd += num;
! 		if (frame->bytes_recvd <= max_raw)
! 			memcpy(frame->rawdata + frame->bytes_recvd - num,
! 				in + offset, num);
! 		else
! 			PDEBUG(3, "Raw data buffer overrun!! (%d)",
! 				frame->bytes_recvd - max_raw);
! 	} else { /* Remove all-zero FIFO lines (aligned 32-byte blocks) */
! 		int b, read = 0, allzero, copied = 0;
! 		if (offset) {
! 			frame->bytes_recvd += 32 - offset;	// Bytes out
! 			memcpy(frame->rawdata,	in + offset, 32 - offset);
! 			read += 32;
! 		}
  
! 		while (read < n - 1) {
! 			allzero = 1;
! 			for (b = 0; b < 32; b++) {
! 				if (in[read + b]) {
! 					allzero = 0;
! 					break;
! 				}
! 			}
  
! 			if (allzero) {
! 				/* Don't copy it */
! 			} else {
! 				if (frame->bytes_recvd + copied + 32 <= max_raw)
! 				{
! 					memcpy(frame->rawdata
! 						+ frame->bytes_recvd + copied,
! 						in + read, 32);
! 					copied += 32;
! 				} else {
! 					PDEBUG(3, "Raw data buffer overrun!!");
! 				}
! 			}
! 			read += 32;
! 		}
  
! 		frame->bytes_recvd += copied;
! 	}
! }
  
! static inline void
! ov518_move_data(struct usb_ov511 *ov, unsigned char *in, int n)
! {
! 	int max_raw = MAX_RAW_DATA_SIZE(ov->maxwidth, ov->maxheight);
! 	struct ov511_frame *frame = &ov->frame[ov->curframe];
! 	struct timeval *ts;
! 
! 	/* Don't copy the packet number byte */
! 	if (ov->packet_numbering)
! 		--n;
! 
! 	/* A false positive here is likely, until OVT gives me
! 	 * the definitive SOF/EOF format */
! 	if ((!(in[0] | in[1] | in[2] | in[3] | in[5])) && in[6]) {
! 		if (printph) {
! 			info("ph: %2x %2x %2x %2x %2x %2x %2x %2x", in[0],
! 			     in[1], in[2], in[3], in[4], in[5], in[6], in[7]);
! 		}
! 
! 		if (frame->scanstate == STATE_LINES) {
! 			PDEBUG(4, "Detected frame end/start");
! 			goto eof;
! 		} else { //scanstate == STATE_SCANNING
! 			/* Frame start */
! 			PDEBUG(4, "Frame start, framenum = %d", ov->curframe);
! 			goto sof;
! 		}
! 	} else {
! 		goto check_middle;
! 	}
  
! eof:
! 	ts = (struct timeval *)(frame->data
! 	      + MAX_FRAME_SIZE(ov->maxwidth, ov->maxheight));
! 	do_gettimeofday(ts);
  
! 	PDEBUG(4, "Frame end, curframe = %d, hw=%d, vw=%d, recvd=%d",
! 		ov->curframe,
! 		(int)(in[9]), (int)(in[10]), frame->bytes_recvd);
  
! 	// FIXME: Since we don't know the header formats yet,
! 	// there is no way to know what the actual image size is
! 	frame->rawwidth = frame->width;
! 	frame->rawheight = frame->height;
  
! 	/* Validate the header data */
! 	RESTRICT_TO_RANGE(frame->rawwidth, ov->minwidth, ov->maxwidth);
! 	RESTRICT_TO_RANGE(frame->rawheight, ov->minheight, ov->maxheight);
  
! 	/* Don't allow byte count to exceed buffer size */
! 	RESTRICT_TO_RANGE(frame->bytes_recvd, 8, max_raw);
  
! 	if (frame->scanstate == STATE_LINES) {
!     		int nextf;
  
! 		frame->grabstate = FRAME_DONE;	// FIXME: Is this right?
  
! 		if (waitqueue_active(&frame->wq)) {
! 			frame->grabstate = FRAME_DONE;
! 			wake_up_interruptible(&frame->wq);
! 		}
  
! 		/* If next frame is ready or grabbing,
! 		 * point to it */
! 		nextf = (ov->curframe + 1) % OV511_NUMFRAMES;
! 		if (ov->frame[nextf].grabstate == FRAME_READY
! 		    || ov->frame[nextf].grabstate == FRAME_GRABBING) {
! 			ov->curframe = nextf;
! 			ov->frame[nextf].scanstate = STATE_SCANNING;
! 			frame = &ov->frame[nextf];
! 		} else {
! 			if (frame->grabstate == FRAME_DONE) {
! 				PDEBUG(4, "** Frame done **");
! 			} else {
! 				PDEBUG(4, "Frame not ready? state = %d",
! 				       ov->frame[nextf].grabstate);
  			}
  
- 			ov->curframe = -1;
- 			PDEBUG(4, "SOF dropped (no active frame)");
- 			return;  /* Nowhere to store this frame */
- 		}
- 	}
- sof:
- 	PDEBUG(4, "Starting capture on frame %d", frame->framenum);
- 
- // Snapshot not reverse-engineered yet.
  #if 0
! 	/* Check to see if it's a snapshot frame */
! 	/* FIXME?? Should the snapshot reset go here? Performance? */
! 	if (in[8] & 0x02) {
! 		frame->snapshot = 1;
! 		PDEBUG(3, "snapshot detected");
! 	}
  #endif
! 	frame->scanstate = STATE_LINES;
! 	frame->bytes_recvd = 0;
! 	frame->compressed = 1;
  
! check_middle:
! 	/* Are we in a frame? */
! 	if (frame->scanstate != STATE_LINES) {
! 		PDEBUG(4, "scanstate: no SOF yet");
! 		return;
! 	}
  
! 	/* Dump all data exactly as received */
! 	if (dumppix == 2) {
! 		frame->bytes_recvd += n;
! 		if (frame->bytes_recvd <= max_raw)
! 			memcpy(frame->rawdata + frame->bytes_recvd - n, in, n);
! 		else
! 			PDEBUG(3, "Raw data buffer overrun!! (%d)",
! 				frame->bytes_recvd - max_raw);
! 	} else {
! 		/* All incoming data are divided into 8-byte segments. If the
! 		 * segment contains all zero bytes, it must be skipped. These
! 		 * zero-segments allow the OV518 to mainain a constant data rate
! 		 * regardless of the effectiveness of the compression. Segments
! 		 * are aligned relative to the beginning of each isochronous
! 		 * packet. The first segment in each image is a header (the
! 		 * decompressor skips it later).
! 		 */
  
! 		int b, read = 0, allzero, copied = 0;
  
! 		while (read < n) {
! 			allzero = 1;
! 			for (b = 0; b < 8; b++) {
! 				if (in[read + b]) {
! 					allzero = 0;
  					break;
- 				}
- 			}
  
! 			if (allzero) {
! 			/* Don't copy it */
! 			} else {
! 				if (frame->bytes_recvd + copied + 8 <= max_raw)
! 				{
! 					memcpy(frame->rawdata
! 						+ frame->bytes_recvd + copied,
! 						in + read, 8);
! 					copied += 8;
! 				} else {
! 					PDEBUG(3, "Raw data buffer overrun!!");
! 				}
  			}
! 			read += 8;
  		}
- 		frame->bytes_recvd += copied;
  	}
  }
  
! static void
! ov51x_isoc_irq(struct urb *urb)
  {
! 	int i;
! 	struct usb_ov511 *ov;
  	struct ov511_sbuf *sbuf;
  
  	if (!urb->context) {
--- 1248,1863 ----
   * this data is scrambled.
   */
  
! #define HDIV 8
! #define WDIV (256/HDIV)
! 
  static void
! ov511_parse_gbr422_to_rgb24(unsigned char *pIn0, unsigned char *pOut0,
! 		       int iOutY, int iOutUV, int iHalf, int iWidth)
  {
! 	int k, l, m;
! 	unsigned char *pIn;
! 	unsigned char *pOut, *pOut1;
  
  	pIn = pIn0;
! 	pOut = pOut0 + iOutUV + (force_rgb ? 2 : 0);
! 		
! 	for (k = 0; k < 8; k++) {
! 		pOut1 = pOut;
! 		for (l = 0; l < 8; l++) {
! 			*pOut1 = *(pOut1 + 3) = *(pOut1 + iWidth*3) =
! 				*(pOut1 + iWidth*3 + 3) = *pIn++;
! 			pOut1 += 6;
  		}
! 		pOut += iWidth*3*2;
! 	}
! 
! 	pIn = pIn0 + 64;
! 	pOut = pOut0 + iOutUV + (force_rgb ? 0 : 2);
! 	for (k = 0; k < 8; k++) {
! 		pOut1 = pOut;
! 		for (l = 0; l < 8; l++) {
! 			*pOut1 = *(pOut1 + 3) = *(pOut1 + iWidth*3) =
! 				*(pOut1 + iWidth*3 + 3) = *pIn++;
! 			pOut1 += 6;
! 		}
! 		pOut += iWidth*3*2;
  	}
  
  	pIn = pIn0 + 128;
! 	pOut = pOut0 + iOutY + 1;
! 	for (k = 0; k < 4; k++) {
! 		pOut1 = pOut;
! 		for (l = 0; l < 8; l++) {
! 			for (m = 0; m < 8; m++) {
! 				*pOut1 = *pIn++;
! 				pOut1 += 3;
  			}
+ 			pOut1 += (iWidth - 8) * 3;
  		}
! 		pOut += 8 * 3;
  	}
  }
  
  static void
! ov511_parse_yuv420_to_rgb(unsigned char *pIn0, unsigned char *pOut0,
! 		       int iOutY, int iOutUV, int iHalf, int iWidth, int bits)
  {
! 	int k, l, m;
! 	int bytes = bits >> 3;
! 	unsigned char *pIn;
! 	unsigned char *pOut, *pOut1;
  
! 	/* Just copy the Y's if in the first stripe */
! 	if (!iHalf) {
! 		pIn = pIn0 + 128;
! 		pOut = pOut0 + iOutY;
! 		for (k = 0; k < 4; k++) {
! 			pOut1 = pOut;
! 			for (l = 0; l < 8; l++) {
! 				for (m = 0; m < 8; m++) {
! 					*pOut1 = *pIn++;
! 					pOut1 += bytes;
! 				}
! 				pOut1 += (iWidth - 8) * bytes;
! 			}
! 			pOut += 8 * bytes;
! 		}
  	}
  
! 	/* Use the first half of VUs to calculate value */
! 	pIn = pIn0;
! 	pOut = pOut0 + iOutUV;
! 	for (l = 0; l < 4; l++) {
! 		for (m=0; m<8; m++) {
! 			int y00 = *(pOut);
! 			int y01 = *(pOut+bytes);
! 			int y10 = *(pOut+iWidth*bytes);
! 			int y11 = *(pOut+iWidth*bytes+bytes);
! 			int v   = *(pIn+64) - 128;
! 			int u   = *pIn++ - 128;
! 			ov511_move_420_block(y00, y01, y10, y11, u, v, iWidth,
! 				pOut, bits);
! 			pOut += 2 * bytes;
  		}
! 		pOut += (iWidth*2 - 16) * bytes;
  	}
  
! 	/* Just copy the other UV rows */
! 	for (l = 0; l < 4; l++) {
! 		for (m = 0; m < 8; m++) {
! 			*pOut++ = *(pIn + 64);
! 			*pOut = *pIn++;
! 			pOut += 2 * bytes - 1;
! 		}
! 		pOut += (iWidth*2 - 16) * bytes;
! 	}
! 
! 	/* Calculate values if it's the second half */
! 	if (iHalf) {
! 		pIn = pIn0 + 128;
! 		pOut = pOut0 + iOutY;
! 		for (k = 0; k < 4; k++) {
! 			pOut1 = pOut;
! 			for (l=0; l<4; l++) {
! 				for (m=0; m<4; m++) {
! 					int y10 = *(pIn+8);
! 					int y00 = *pIn++;
! 					int y11 = *(pIn+8);
! 					int y01 = *pIn++;
! 					int v   = *pOut1 - 128;
! 					int u   = *(pOut1+1) - 128;
! 					ov511_move_420_block(y00, y01, y10,
! 						y11, u, v, iWidth, pOut1, bits);
! 					pOut1 += 2 * bytes;
! 				}
! 				pOut1 += (iWidth*2 - 8) * bytes;
! 				pIn += 8;
! 			}
! 			pOut += 8 * bytes;
  		}
  	}
  }
  
  static void
! ov511_dumppix(unsigned char *pIn0, unsigned char *pOut0,
! 	      int iOutY, int iOutUV, int iHalf, int iWidth)
  {
! 	int i, j, k;
! 	unsigned char *pIn, *pOut, *pOut1;
  
! 	switch (dumppix) {
! 	case 1: /* Just dump YUV data straight out for debug */
! 		pOut0 += iOutY;
! 		for (i = 0; i < HDIV; i++) {
! 			for (j = 0; j < WDIV; j++) {
! 				*pOut0++ = *pIn0++;
! 				*pOut0++ = *pIn0++;
! 				*pOut0++ = *pIn0++;
! 			}
! 			pOut0 += (iWidth - WDIV) * 3;
! 		}
! 		break;
! 	case 2: /* This converts the Y data to "black-and-white" RGB data */
! 		/* Useful for experimenting with compression */
! 		pIn = pIn0 + 128;
! 		pOut = pOut0 + iOutY;
! 		for (i = 0; i < 4; i++) {
! 			pOut1 = pOut;
! 			for (j = 0; j < 8; j++) {
! 				for (k = 0; k < 8; k++) {
! 					*pOut1++ = *pIn;
! 					*pOut1++ = *pIn;
! 					*pOut1++ = *pIn++;
! 				}
! 				pOut1 += (iWidth - 8) * 3;
! 			}
! 			pOut += 8 * 3;
! 		}
! 		break;
! 	case 3: /* This will dump only the Y channel data stream as-is */
! 		pIn = pIn0 + 128;
! 		pOut = pOut0 + output_offset;
! 		for (i = 0; i < 256; i++) {
! 			*pOut++ = *pIn;
! 			*pOut++ = *pIn;
! 			*pOut++ = *pIn++;
! 			output_offset += 3;
! 		}
! 		break;
! 	} /* End switch (dumppix) */
  }
  
! /* This converts YUV420 segments to YUYV */
  static void
! ov511_parse_data_yuv422(unsigned char *pIn0, unsigned char *pOut0,
! 		        int iOutY, int iOutUV, int iWidth)
  {
! 	int k, l, m;
! 	unsigned char *pIn, *pOut, *pOut1;
  
! 	pIn = pIn0 + 128;
! 	pOut = pOut0 + iOutY;
! 	for (k = 0; k < 4; k++) {
! 		pOut1 = pOut;
! 		for (l = 0; l < 8; l++) {
! 			for (m = 0; m < 8; m++) {
! 				*pOut1 = (*pIn++);
! 				pOut1 += 2;
! 			}
! 			pOut1 += (iWidth - 8) * 2;
  		}
! 		pOut += 8 * 2;
  	}
  
+ 	pIn = pIn0;
+ 	pOut = pOut0 + iOutUV + 1;
+ 	for (l = 0; l < 8; l++) {
+ 		for (m=0; m<8; m++) {
+ 			int v   = *(pIn+64);
+ 			int u   = *pIn++;
+ 			
  			*pOut = u;
  			*(pOut+2) = v;
! 			*(pOut+iWidth) = u;
! 			*(pOut+iWidth+2) = v;
  			pOut += 4;
  		}
! 		pOut += (iWidth*4 - 32);
  	}
  }
  
  static void
! ov511_parse_data_yuv420(unsigned char *pIn0, unsigned char *pOut0,
! 		        int iOutY, int iOutUV, int iWidth, int iHeight)
  {
! 	int k, l, m;
! 	unsigned char *pIn;
! 	unsigned char *pOut, *pOut1;
! 	unsigned a = iWidth * iHeight;
! 	unsigned w = iWidth / 2;
! 
! 	pIn = pIn0;
! 	pOut = pOut0 + iOutUV + a;
! 	for (k = 0; k < 8; k++) {
! 		pOut1 = pOut;
! 		for (l = 0; l < 8; l++) *pOut1++ = *pIn++;
! 		pOut += w;
! 	}
! 
! 	pIn = pIn0 + 64;
! 	pOut = pOut0 + iOutUV + a + a/4;
! 	for (k = 0; k < 8; k++) {
! 		pOut1 = pOut;
! 		for (l = 0; l < 8; l++) *pOut1++ = *pIn++;
  		pOut += w;
  	}
  
! 	pIn = pIn0 + 128;
! 	pOut = pOut0 + iOutY;
! 	for (k = 0; k < 4; k++) {
! 		pOut1 = pOut;
! 		for (l = 0; l < 8; l++) {
! 			for (m = 0; m < 8; m++)
! 				*pOut1++ =*pIn++;
! 			pOut1 += iWidth - 8;
! 		}
! 		pOut += 8;
  	}
  }
  
  static void
! ov511_parse_data_yuv422p(unsigned char *pIn0, unsigned char *pOut0,
! 		       int iOutY, int iOutUV, int iWidth, int iHeight)
  {
! 	int k, l, m;
! 	unsigned char *pIn;
! 	unsigned char *pOut, *pOut1;
! 	unsigned a = iWidth * iHeight;
! 	unsigned w = iWidth / 2;
  
! 	pIn = pIn0;
! 	pOut = pOut0 + iOutUV + a;
! 	for (k = 0; k < 8; k++) {
! 		pOut1 = pOut;
! 		for (l = 0; l < 8; l++) {
! 			*pOut1 = *(pOut1 + w) = *pIn++;
! 			pOut1++;
! 		}
! 		pOut += iWidth;
  	}
  
! 	pIn = pIn0 + 64;
! 	pOut = pOut0 + iOutUV + a + a/2;
! 	for (k = 0; k < 8; k++) {
! 		pOut1 = pOut;
! 		for (l = 0; l < 8; l++) {
! 			*pOut1 = *(pOut1 + w) = *pIn++;
! 			pOut1++;
  		}
! 		pOut += iWidth;
  	}
  
! 	pIn = pIn0 + 128;
! 	pOut = pOut0 + iOutY;
! 	for (k = 0; k < 4; k++) {
! 		pOut1 = pOut;
! 		for (l = 0; l < 8; l++) {
! 			for (m = 0; m < 8; m++)
! 				*pOut1++ =*pIn++;
! 			pOut1 += iWidth - 8;
  		}
+ 		pOut += 8;
  	}
  }
  
+ /*
+  * For 640x480 RAW BW images, data shows up in 1200 256 byte segments.
+  * The segments represent 4 squares of 8x8 pixels as follows:
+  *
+  *      0  1 ...  7    64  65 ...  71   ...  192 193 ... 199
+  *      8  9 ... 15    72  73 ...  79        200 201 ... 207
+  *           ...              ...                    ...
+  *     56 57 ... 63   120 121 ... 127        248 249 ... 255
+  *
+  */ 
  static void
! ov511_parse_data_grey(unsigned char *pIn0, unsigned char *pOut0,
! 		      int iOutY, int iWidth)		    
  {
! 	int k, l, m;
! 	unsigned char *pIn;
! 	unsigned char *pOut, *pOut1;
  
! 	pIn = pIn0;
! 	pOut = pOut0 + iOutY;
! 	for (k = 0; k < 4; k++) {
! 		pOut1 = pOut;
! 		for (l = 0; l < 8; l++) {
! 			for (m = 0; m < 8; m++) {
! 				*pOut1++ = *pIn++;
! 			}
! 			pOut1 += iWidth - 8;
  		}
+ 		pOut += 8;
+ 	}
  }
  
! /*
!  * fixFrameRGBoffset--
!  * My camera seems to return the red channel about 1 pixel
!  * low, and the blue channel about 1 pixel high. After YUV->RGB
!  * conversion, we can correct this easily. OSL 2/24/2000.
   */
! static void fixFrameRGBoffset(struct ov511_frame *frame)
  {
! 	int x, y;
! 	int rowBytes = frame->width*3, w = frame->width;
! 	unsigned char *rgb = frame->data;
! 	const int shift = 1;  /* Distance to shift pixels by, vertically */
  
! 	/* Don't bother with little images */
! 	if (frame->width < 400) 
! 		return;
  
! 	/* Shift red channel up */
! 	for (y = shift; y < frame->height; y++)	{
! 		int lp = (y-shift)*rowBytes;     /* Previous line offset */
! 		int lc = y*rowBytes;             /* Current line offset */
! 		for (x = 0; x < w; x++)
! 			rgb[lp+x*3+2] = rgb[lc+x*3+2]; /* Shift red up */
  	}
  
! 	/* Shift blue channel down */
! 	for (y = frame->height-shift-1; y >= 0; y--) {
! 		int ln = (y + shift) * rowBytes;  /* Next line offset */
! 		int lc = y * rowBytes;            /* Current line offset */
! 		for (x = 0; x < w; x++)
! 			rgb[ln+x*3+0] = rgb[lc+x*3+0]; /* Shift blue down */
  	}
  }
  
  /**********************************************************************
   *
!  * OV511 data transfer, IRQ handler
   *
   **********************************************************************/
  
! static int ov511_move_data(struct usb_ov511 *ov511, urb_t *urb)
  {
! 	unsigned char *cdata;
! 	int i, totlen = 0;
! 	int aPackNum[10];
! 	struct ov511_frame *frame;
! 	unsigned char *pData;
! 	int iPix;
  
! 	PDEBUG (4, "Moving %d packets", urb->number_of_packets);
  
! 	for (i = 0; i < urb->number_of_packets; i++) {
! 		int n = urb->iso_frame_desc[i].actual_length;
! 		int st = urb->iso_frame_desc[i].status;
  
! 		urb->iso_frame_desc[i].actual_length = 0;
! 		urb->iso_frame_desc[i].status = 0;
  
! 		cdata = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
  
! 		aPackNum[i] = n ? cdata[ov511->packet_size - 1] : -1;
  
! 		if (!n || ov511->curframe == -1)
! 			continue;
  
! 		if (st)
! 			PDEBUG(2, "data error: [%d] len=%d, status=%d", i, n, st);
  
! 		frame = &ov511->frame[ov511->curframe];
! 		
! 		/* SOF/EOF packets have 1st to 8th bytes zeroed and the 9th
! 		 * byte non-zero. The EOF packet has image width/height in the
! 		 * 10th and 11th packets. The 9th bit is given as follows:
! 		 *
! 		 * bit 7: EOF
! 		 *     6: compression enabled
! 		 *     5: 422/420/400 modes
! 		 *     4: 422/420/400 modes
! 		 *     3: 1
! 		 *     2: snapshot bottom on
! 		 *     1: snapshot frame
! 		 *     0: even/odd field
! 		 */
  
! 		/* Check for SOF/EOF packet */
! 		if ((cdata[0] | cdata[1] | cdata[2] | cdata[3] | 
! 		     cdata[4] | cdata[5] | cdata[6] | cdata[7]) ||
! 		     (~cdata[8] & 0x08))
! 			goto check_middle;
! 
! 		/* Frame end */
! 		if (cdata[8] & 0x80) {
! 			struct timeval *ts;
! 
! 			ts = (struct timeval *)(frame->data + MAX_FRAME_SIZE);
! 			do_gettimeofday (ts);
! 
! 		 	PDEBUG(4, "Frame end, curframe = %d, packnum=%d, hw=%d, vw=%d",
! 				ov511->curframe, (int)(cdata[ov511->packet_size - 1]),
! 				(int)(cdata[9]), (int)(cdata[10]));
  
! 			if (frame->scanstate == STATE_LINES) {
! 		    		int iFrameNext;
  
! 				if (fix_rgb_offset)
! 					fixFrameRGBoffset(frame);
! 				frame->grabstate = FRAME_DONE;
  
! 				if (waitqueue_active(&frame->wq)) {
! 					frame->grabstate = FRAME_DONE;
! 					wake_up_interruptible(&frame->wq);
! 				}
  
! 				/* If next frame is ready or grabbing,
!                                  * point to it */
! 				iFrameNext = (ov511->curframe + 1) % OV511_NUMFRAMES;
! 				if (ov511->frame[iFrameNext].grabstate == FRAME_READY
! 				    || ov511->frame[iFrameNext].grabstate == FRAME_GRABBING) {
! 					ov511->curframe = iFrameNext;
! 					ov511->frame[iFrameNext].scanstate = STATE_SCANNING;
! 				} else {
! 					if (frame->grabstate == FRAME_DONE) {
! 						PDEBUG(4, "Frame done! congratulations");
! 					} else {
! 						PDEBUG(4, "Frame not ready? state = %d",
! 							ov511->frame[iFrameNext].grabstate);
! 					}
  
! 					ov511->curframe = -1;
! 				}
  			}
+ 			/* Image corruption caused by misplaced frame->segment = 0
+ 			 * fixed by carlosf@conectiva.com.br
+ 			 */
+ 		} else {
+ 			/* Frame start */
+ 			PDEBUG(4, "Frame start, framenum = %d", ov511->curframe);
  
  #if 0
! 			/* Make sure no previous data carries over; necessary
! 			 * for compression experimentation */
! 			memset(frame->data, 0, MAX_DATA_SIZE);
  #endif
! 			output_offset = 0;
  
! 			/* Check to see if it's a snapshot frame */
! 			/* FIXME?? Should the snapshot reset go here? Performance? */
! 			if (cdata[8] & 0x02) {
! 				frame->snapshot = 1;
! 				PDEBUG(3, "snapshot detected");
! 			}
  
! 			frame->scanstate = STATE_LINES;
! 			frame->segment = 0;
! 		}
! 
! check_middle:
! 		/* Are we in a frame? */
! 		if (frame->scanstate != STATE_LINES)
! 			continue;
  
! 		/* Deal with leftover from last segment, if any */
! 		if (frame->segment) {
! 			pData = ov511->scratch;
! 			iPix = -ov511->scratchlen;
! 			memmove(pData + ov511->scratchlen, cdata,
! 				iPix+frame->segsize);
! 		} else {
! 			pData = &cdata[iPix = 9];
! 	 	}
  
! 		/* Parse the segments */
! 		while (iPix <= (ov511->packet_size - 1) - frame->segsize &&
! 		    frame->segment < frame->width * frame->height / 256) {
! 			int iSegY, iSegUV;
! 			int iY, jY, iUV, jUV;
! 			int iOutY, iOutYP, iOutUV, iOutUVP;
! 			unsigned char *pOut;
! 
! 			iSegY = iSegUV = frame->segment;
! 			pOut = frame->data;
! 			frame->segment++;
! 			iPix += frame->segsize;
! 
! 			/* Handle subwindow */
! 			if (frame->sub_flag) {
! 				int iSeg1;
! 
! 				iSeg1 = iSegY / (ov511->subw / 32);
! 				iSeg1 *= frame->width / 32;
! 				iSegY = iSeg1 + (iSegY % (ov511->subw / 32));
! 				if (iSegY >= frame->width * ov511->subh / 256)
  					break;
  
! 				iSeg1 = iSegUV / (ov511->subw / 16);
! 				iSeg1 *= frame->width / 16;
! 				iSegUV = iSeg1 + (iSegUV % (ov511->subw / 16));
! 
! 				pOut += (ov511->subx + ov511->suby * frame->width) *
! 					(frame->depth >> 3);
! 			}
! 
! 			/* 
! 			 * i counts segment lines
! 			 * j counts segment columns
! 			 * iOut is the offset (in bytes) of the upper left corner
! 			 */
! 			iY = iSegY / (frame->width / WDIV);
! 			jY = iSegY - iY * (frame->width / WDIV);
! 			iOutYP = iY*HDIV*frame->width + jY*WDIV;
! 			iOutY = iOutYP * (frame->depth >> 3);
! 			iUV = iSegUV / (frame->width / WDIV * 2);
! 			jUV = iSegUV - iUV * (frame->width / WDIV * 2);
! 			iOutUVP = iUV*HDIV*2*frame->width + jUV*WDIV/2;
! 			iOutUV = iOutUVP * (frame->depth >> 3);
! 
! 			switch (frame->format) {
! 			case VIDEO_PALETTE_GREY:
! 				ov511_parse_data_grey (pData, pOut, iOutY, frame->width);
! 				break;
! 			case VIDEO_PALETTE_RGB24:
! 				if (dumppix)
! 					ov511_dumppix(pData, pOut, iOutY, iOutUV,
! 						iY & 1, frame->width);
! 				else if (sensor_gbr)
! 					ov511_parse_gbr422_to_rgb24(pData, pOut, iOutY, iOutUV,
! 						iY & 1, frame->width);
! 				else
! 					ov511_parse_yuv420_to_rgb(pData, pOut, iOutY, iOutUV,
! 						iY & 1, frame->width, 24);
! 				break;
! 			case VIDEO_PALETTE_RGB565:
! 				ov511_parse_yuv420_to_rgb(pData, pOut, iOutY, iOutUV,
! 					iY & 1, frame->width, 16);
! 				break;
! 			case VIDEO_PALETTE_YUV422:
! 			case VIDEO_PALETTE_YUYV:
! 				ov511_parse_data_yuv422(pData, pOut, iOutY, iOutUV, frame->width);
! 				break;
! 			case VIDEO_PALETTE_YUV420:
! 				ov511_parse_data_yuv420 (pData, pOut, iOutYP, iUV*HDIV*frame->width/2 + jUV*WDIV/4,
! 					frame->width, frame->height);
! 				break;
! 			case VIDEO_PALETTE_YUV422P:
! 				ov511_parse_data_yuv422p (pData, pOut, iOutYP, iOutUVP/2,
! 					frame->width, frame->height);
! 				break;
! 			default:
! 				err("Unsupported format: %d", frame->format);
  			}
! 
! 			pData = &cdata[iPix];
! 		}
! 
! 		/* Save extra data for next time */
! 		if (frame->segment < frame->width * frame->height / 256) {
! 			ov511->scratchlen = (ov511->packet_size - 1) - iPix;
! 			if (ov511->scratchlen < frame->segsize)
! 				memmove(ov511->scratch, pData, ov511->scratchlen);
! 			else
! 				ov511->scratchlen = 0;
  		}
  	}
+ 
+ 	PDEBUG(5, "pn: %d %d %d %d %d %d %d %d %d %d",
+ 	       aPackNum[0], aPackNum[1], aPackNum[2], aPackNum[3], aPackNum[4],
+ 	       aPackNum[5],aPackNum[6], aPackNum[7], aPackNum[8], aPackNum[9]);
+ 
+ 	return totlen;
  }
  
! static void ov511_isoc_irq(struct urb *urb)
  {
! 	int len;
! 	struct usb_ov511 *ov511;
  	struct ov511_sbuf *sbuf;
  
  	if (!urb->context) {
***************
*** 4084,4330 ****
  		return;
  	}
  
! 	sbuf = urb->context;
! 	ov = sbuf->ov;
  
! 	if (!ov || !ov->dev || !ov->user) {
  		PDEBUG(4, "no device, or not open");
  		return;
  	}
  
! 	if (!ov->streaming) {
  		PDEBUG(4, "hmmm... not streaming, but got interrupt");
  		return;
  	}
  
!         if (urb->status == -ENOENT || urb->status == -ECONNRESET) {
!                 PDEBUG(4, "URB unlinked");
!                 return;
!         }
! 
! 	if (urb->status != -EINPROGRESS && urb->status != 0) {
! 		err("ERROR: urb->status=%d: %s", urb->status,
! 		    symbolic(urb_errlist, urb->status));
  	}
  
! 	/* Copy the data received into our frame buffer */
! 	PDEBUG(5, "sbuf[%d]: Moving %d packets", sbuf->n,
! 	       urb->number_of_packets);
! 	for (i = 0; i < urb->number_of_packets; i++) {
! 		/* Warning: Don't call *_move_data() if no frame active! */
! 		if (ov->curframe >= 0) {
! 			int n = urb->iso_frame_desc[i].actual_length;
! 			int st = urb->iso_frame_desc[i].status;
! 			unsigned char *cdata;
! 
! 			urb->iso_frame_desc[i].actual_length = 0;
! 			urb->iso_frame_desc[i].status = 0;
! 
! 			cdata = urb->transfer_buffer
! 				+ urb->iso_frame_desc[i].offset;
! 
! 			if (!n) {
! 				PDEBUG(4, "Zero-length packet");
! 				continue;
! 			}
! 
! 			if (st)
! 				PDEBUG(2, "data error: [%d] len=%d, status=%d",
! 				       i, n, st);
! 
! 			if (ov->bclass == BCL_OV511)
! 				ov511_move_data(ov, cdata, n);
! 			else if (ov->bclass == BCL_OV518)
! 				ov518_move_data(ov, cdata, n);
! 			else
! 				err("Unknown bridge device (%d)", ov->bridge);
  
! 		} else if (waitqueue_active(&ov->wq)) {
! 			wake_up_interruptible(&ov->wq);
! 		}
! 	}
! 
! 	urb->dev = ov->dev;
  
  	return;
  }
  
! /****************************************************************************
!  *
!  * Stream initialization and termination
!  *
!  ***************************************************************************/
! 
! static int
! ov51x_init_isoc(struct usb_ov511 *ov)
  {
! 	struct urb *urb;
  	int fx, err, n, size;
  
  	PDEBUG(3, "*** Initializing capture ***");
  
! 	ov->curframe = -1;
! 
! 	if (ov->bridge == BRG_OV511) {
! 		if (cams == 1)				size = 993;
! 		else if (cams == 2)			size = 513;
! 		else if (cams == 3 || cams == 4)	size = 257;
! 		else {
! 			err("\"cams\" parameter too high!");
! 			return -1;
! 		}
! 	} else if (ov->bridge == BRG_OV511PLUS) {
! 		if (cams == 1)				size = 961;
! 		else if (cams == 2)			size = 513;
! 		else if (cams == 3 || cams == 4)	size = 257;
! 		else if (cams >= 5 && cams <= 8)	size = 129;
! 		else if (cams >= 9 && cams <= 31)	size = 33;
  		else {
  			err("\"cams\" parameter too high!");
  			return -1;
  		}
! 	} else if (ov->bclass == BCL_OV518) {
! 		if (cams == 1)				size = 896;
! 		else if (cams == 2)			size = 512;
! 		else if (cams == 3 || cams == 4)	size = 256;
! 		else if (cams >= 5 && cams <= 8)	size = 128;
  		else {
  			err("\"cams\" parameter too high!");
  			return -1;
  		}
! 	} else {
  		err("invalid bridge type");
  		return -1;
  	}
  
! 	// FIXME: OV518 is hardcoded to 15 FPS (alternate 5) for now
! 	if (ov->bclass == BCL_OV518) {
! 		if (packetsize == -1) {
! 			ov518_set_packet_size(ov, 640);
! 		} else {
! 			info("Forcing packet size to %d", packetsize);
! 			ov518_set_packet_size(ov, packetsize);
! 		}
! 	} else {
! 		if (packetsize == -1) {
! 			ov511_set_packet_size(ov, size);
! 		} else {
! 			info("Forcing packet size to %d", packetsize);
! 			ov511_set_packet_size(ov, packetsize);
! 		}
! 	}
  
  	for (n = 0; n < OV511_NUMSBUF; n++) {
  		urb = usb_alloc_urb(FRAMES_PER_DESC);
  		if (!urb) {
  			err("init isoc: usb_alloc_urb ret. NULL");
  			return -ENOMEM;
  		}
! 		ov->sbuf[n].urb = urb;
! 		urb->dev = ov->dev;
! 		urb->context = &ov->sbuf[n];
! 		urb->pipe = usb_rcvisocpipe(ov->dev, OV511_ENDPOINT_ADDRESS);
  		urb->transfer_flags = USB_ISO_ASAP;
! 		urb->transfer_buffer = ov->sbuf[n].data;
! 		urb->complete = ov51x_isoc_irq;
  		urb->number_of_packets = FRAMES_PER_DESC;
! 		urb->transfer_buffer_length = ov->packet_size * FRAMES_PER_DESC;
  		for (fx = 0; fx < FRAMES_PER_DESC; fx++) {
! 			urb->iso_frame_desc[fx].offset = ov->packet_size * fx;
! 			urb->iso_frame_desc[fx].length = ov->packet_size;
  		}
  	}
  
! 	ov->streaming = 1;
! 
! 	ov->sbuf[OV511_NUMSBUF - 1].urb->next = ov->sbuf[0].urb;
  	for (n = 0; n < OV511_NUMSBUF - 1; n++)
! 		ov->sbuf[n].urb->next = ov->sbuf[n+1].urb;
  
  	for (n = 0; n < OV511_NUMSBUF; n++) {
! 		ov->sbuf[n].urb->dev = ov->dev;
! 		err = usb_submit_urb(ov->sbuf[n].urb);
! 		if (err) {
  			err("init isoc: usb_submit_urb(%d) ret %d", n, err);
- 			return err;
- 		}
  	}
  
  	return 0;
  }
  
! static void
! ov51x_unlink_isoc(struct usb_ov511 *ov)
  {
  	int n;
  
! 	/* Unschedule all of the iso td's */
! 	for (n = OV511_NUMSBUF - 1; n >= 0; n--) {
! 		if (ov->sbuf[n].urb) {
! 			usb_unlink_urb(ov->sbuf[n].urb);
! 			usb_free_urb(ov->sbuf[n].urb);
! 			ov->sbuf[n].urb = NULL;
! 		}
! 	}
! }
! 
! static void
! ov51x_stop_isoc(struct usb_ov511 *ov)
! {
! 	if (!ov->streaming || !ov->dev)
  		return;
  
! 	PDEBUG(3, "*** Stopping capture ***");
  
! 	if (ov->bclass == BCL_OV518)
! 		ov518_set_packet_size(ov, 0);
! 	else
! 		ov511_set_packet_size(ov, 0);
  
! 	ov->streaming = 0;
  
! 	ov51x_unlink_isoc(ov);
  }
  
! static int
! ov51x_new_frame(struct usb_ov511 *ov, int framenum)
  {
  	struct ov511_frame *frame;
- 	int newnum;
- 
- 	PDEBUG(4, "ov->curframe = %d, framenum = %d", ov->curframe, framenum);
  
! 	if (!ov->dev)
  		return -1;
  
  	/* If we're not grabbing a frame right now and the other frame is */
  	/* ready to be grabbed into, then use it instead */
! 	if (ov->curframe == -1) {
! 		newnum = (framenum - 1 + OV511_NUMFRAMES) % OV511_NUMFRAMES;
! 		if (ov->frame[newnum].grabstate == FRAME_READY)
! 			framenum = newnum;
  	} else
  		return 0;
  
! 	frame = &ov->frame[framenum];
  
! 	PDEBUG(4, "framenum = %d, width = %d, height = %d", framenum,
! 	       frame->width, frame->height);
  
  	frame->grabstate = FRAME_GRABBING;
  	frame->scanstate = STATE_SCANNING;
  	frame->snapshot = 0;
  
! 	ov->curframe = framenum;
  
  	/* Make sure it's not too big */
! 	if (frame->width > ov->maxwidth)
! 		frame->width = ov->maxwidth;
  
  	frame->width &= ~7L;		/* Multiple of 8 */
  
! 	if (frame->height > ov->maxheight)
! 		frame->height = ov->maxheight;
  
  	frame->height &= ~3L;		/* Multiple of 4 */
  
--- 1865,2035 ----
  		return;
  	}
  
! 	ov511 = (struct usb_ov511 *) urb->context;
  
! 	if (!ov511->dev || !ov511->user) {
  		PDEBUG(4, "no device, or not open");
  		return;
  	}
  
! 	if (!ov511->streaming) {
  		PDEBUG(4, "hmmm... not streaming, but got interrupt");
  		return;
  	}
+ 	
+ 	sbuf = &ov511->sbuf[ov511->cursbuf];
  
! 	/* Copy the data received into our scratch buffer */
! 	if (ov511->curframe >= 0) {
! 		len = ov511_move_data(ov511, urb);
! 	} else if (waitqueue_active(&ov511->wq)) {
! 		wake_up_interruptible(&ov511->wq);
  	}
  
! 	/* Move to the next sbuf */
! 	ov511->cursbuf = (ov511->cursbuf + 1) % OV511_NUMSBUF;
  
! 	urb->dev = ov511->dev;
  
  	return;
  }
  
! static int ov511_init_isoc(struct usb_ov511 *ov511)
  {
! 	urb_t *urb;
  	int fx, err, n, size;
  
  	PDEBUG(3, "*** Initializing capture ***");
  
! 	ov511->compress = 0;
! 	ov511->curframe = -1;
! 	ov511->cursbuf = 0;
! 	ov511->scratchlen = 0;
! 
! 	if (ov511->bridge == BRG_OV511)
! 		if (cams == 1)			 size = 993;
! 		else if (cams == 2)		 size = 513;
! 		else if (cams == 3 || cams == 4) size = 257;
  		else {
  			err("\"cams\" parameter too high!");
  			return -1;
  		}
! 	else if (ov511->bridge == BRG_OV511PLUS)
! 		if (cams == 1)                      size = 961;
! 		else if (cams == 2)                 size = 513;
! 		else if (cams == 3 || cams == 4) size = 257;
! 		else if (cams >= 5 && cams <= 8)    size = 129;
! 		else if (cams >= 9 && cams <= 31)   size = 33;
  		else {
  			err("\"cams\" parameter too high!");
  			return -1;
  		}
! 	else {
  		err("invalid bridge type");
  		return -1;
  	}
  
! 	ov511_set_packet_size(ov511, size);
  
  	for (n = 0; n < OV511_NUMSBUF; n++) {
  		urb = usb_alloc_urb(FRAMES_PER_DESC);
+ 	
  		if (!urb) {
  			err("init isoc: usb_alloc_urb ret. NULL");
  			return -ENOMEM;
  		}
! 		ov511->sbuf[n].urb = urb;
! 		urb->dev = ov511->dev;
! 		urb->context = ov511;
! 		urb->pipe = usb_rcvisocpipe(ov511->dev, OV511_ENDPOINT_ADDRESS);
  		urb->transfer_flags = USB_ISO_ASAP;
! 		urb->transfer_buffer = ov511->sbuf[n].data;
! 		urb->complete = ov511_isoc_irq;
  		urb->number_of_packets = FRAMES_PER_DESC;
! 		urb->transfer_buffer_length = ov511->packet_size * FRAMES_PER_DESC;
  		for (fx = 0; fx < FRAMES_PER_DESC; fx++) {
! 			urb->iso_frame_desc[fx].offset = ov511->packet_size * fx;
! 			urb->iso_frame_desc[fx].length = ov511->packet_size;
  		}
  	}
  
! 	ov511->sbuf[OV511_NUMSBUF - 1].urb->next = ov511->sbuf[0].urb;
  	for (n = 0; n < OV511_NUMSBUF - 1; n++)
! 		ov511->sbuf[n].urb->next = ov511->sbuf[n+1].urb;
  
  	for (n = 0; n < OV511_NUMSBUF; n++) {
! 		ov511->sbuf[n].urb->dev = ov511->dev;
! 		err = usb_submit_urb(ov511->sbuf[n].urb);
! 		if (err)
  			err("init isoc: usb_submit_urb(%d) ret %d", n, err);
  	}
  
+ 	ov511->streaming = 1;
+ 
  	return 0;
  }
  
! static void ov511_stop_isoc(struct usb_ov511 *ov511)
  {
  	int n;
  
! 	if (!ov511->streaming || !ov511->dev)
  		return;
  
! 	PDEBUG (3, "*** Stopping capture ***");
  
! 	ov511_set_packet_size(ov511, 0);
  
! 	ov511->streaming = 0;
  
! 	/* Unschedule all of the iso td's */
! 	for (n = OV511_NUMSBUF - 1; n >= 0; n--) {
! 		if (ov511->sbuf[n].urb) {
! 			ov511->sbuf[n].urb->next = NULL;
! 			usb_unlink_urb(ov511->sbuf[n].urb);
! 			usb_free_urb(ov511->sbuf[n].urb);
! 			ov511->sbuf[n].urb = NULL;
! 		}
! 	}
  }
  
! static int ov511_new_frame(struct usb_ov511 *ov511, int framenum)
  {
  	struct ov511_frame *frame;
  
! 	PDEBUG(4, "ov511->curframe = %d, framenum = %d", ov511->curframe,
! 		framenum);
! 	if (!ov511->dev)
  		return -1;
  
  	/* If we're not grabbing a frame right now and the other frame is */
  	/* ready to be grabbed into, then use it instead */
! 	if (ov511->curframe == -1) {
! 		if (ov511->frame[(framenum - 1 + OV511_NUMFRAMES) % OV511_NUMFRAMES].grabstate == FRAME_READY)
! 			framenum = (framenum - 1 + OV511_NUMFRAMES) % OV511_NUMFRAMES;
  	} else
  		return 0;
  
! 	frame = &ov511->frame[framenum];
  
! 	PDEBUG (4, "framenum = %d, width = %d, height = %d", framenum, 
! 		frame->width, frame->height);
  
  	frame->grabstate = FRAME_GRABBING;
  	frame->scanstate = STATE_SCANNING;
+ 	frame->scanlength = 0;		/* accumulated in ov511_parse_data() */
  	frame->snapshot = 0;
  
! 	ov511->curframe = framenum;
  
  	/* Make sure it's not too big */
! 	if (frame->width > ov511->maxwidth)
! 		frame->width = ov511->maxwidth;
  
  	frame->width &= ~7L;		/* Multiple of 8 */
  
! 	if (frame->height > ov511->maxheight)
! 		frame->height = ov511->maxheight;
  
  	frame->height &= ~3L;		/* Multiple of 4 */
  
***************
*** 4336,4956 ****
   * Buffer management
   *
   ***************************************************************************/
! 
! /*
!  * - You must acquire buf_lock before entering this function.
!  * - Because this code will free any non-null pointer, you must be sure to null
!  *   them if you explicitly free them somewhere else!
!  */
! static void
! ov51x_do_dealloc(struct usb_ov511 *ov)
  {
  	int i;
- 	PDEBUG(4, "entered");
  
! 	if (ov->fbuf) {
! 		rvfree(ov->fbuf, OV511_NUMFRAMES
! 		       * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight));
! 		ov->fbuf = NULL;
! 	}
  
! 	if (ov->rawfbuf) {
! 		vfree(ov->rawfbuf);
! 		ov->rawfbuf = NULL;
  	}
  
! 	if (ov->tempfbuf) {
! 		vfree(ov->tempfbuf);
! 		ov->tempfbuf = NULL;
! 	}
  
! 	for (i = 0; i < OV511_NUMSBUF; i++) {
! 		if (ov->sbuf[i].data) {
! 			kfree(ov->sbuf[i].data);
! 			ov->sbuf[i].data = NULL;
! 		}
! 	}
  
  	for (i = 0; i < OV511_NUMFRAMES; i++) {
! 		ov->frame[i].data = NULL;
! 		ov->frame[i].rawdata = NULL;
! 		ov->frame[i].tempdata = NULL;
! 		if (ov->frame[i].compbuf) {
! 			free_page((unsigned long) ov->frame[i].compbuf);
! 			ov->frame[i].compbuf = NULL;
  		}
  	}
! 
! 	PDEBUG(4, "buffer memory deallocated");
! 	ov->buf_state = BUF_NOT_ALLOCATED;
  	PDEBUG(4, "leaving");
  }
  
! static int
! ov51x_alloc(struct usb_ov511 *ov)
  {
  	int i;
- 	const int w = ov->maxwidth;
- 	const int h = ov->maxheight;
- 	const int data_bufsize = OV511_NUMFRAMES * MAX_DATA_SIZE(w, h);
- 	const int raw_bufsize = OV511_NUMFRAMES * MAX_RAW_DATA_SIZE(w, h);
- 
  	PDEBUG(4, "entered");
- 	down(&ov->buf_lock);
  
! 	if (ov->buf_state == BUF_PEND_DEALLOC) {
! 		ov->buf_state = BUF_ALLOCATED;
! 		del_timer(&ov->buf_timer);
  	}
  
! 	if (ov->buf_state == BUF_ALLOCATED)
! 		goto out;
  
! 	ov->fbuf = rvmalloc(data_bufsize);
! 	if (!ov->fbuf)
! 		goto error;
  
! 	ov->rawfbuf = vmalloc(raw_bufsize);
! 	if (!ov->rawfbuf)
! 		goto error;
  
! 	memset(ov->rawfbuf, 0, raw_bufsize);
  
! 	ov->tempfbuf = vmalloc(raw_bufsize);
! 	if (!ov->tempfbuf)
! 		goto error;
  
! 	memset(ov->tempfbuf, 0, raw_bufsize);
  
! 	for (i = 0; i < OV511_NUMSBUF; i++) {
! 		ov->sbuf[i].data = kmalloc(FRAMES_PER_DESC *
! 			MAX_FRAME_SIZE_PER_DESC, GFP_KERNEL);
! 		if (!ov->sbuf[i].data)
! 			goto error;
  
! 		PDEBUG(4, "sbuf[%d] @ %p", i, ov->sbuf[i].data);
  	}
  
! 	for (i = 0; i < OV511_NUMFRAMES; i++) {
! 		ov->frame[i].data = ov->fbuf + i * MAX_DATA_SIZE(w, h);
! 		ov->frame[i].rawdata = ov->rawfbuf
! 		 + i * MAX_RAW_DATA_SIZE(w, h);
! 		ov->frame[i].tempdata = ov->tempfbuf
! 		 + i * MAX_RAW_DATA_SIZE(w, h);
! 
! 		ov->frame[i].compbuf =
! 		 (unsigned char *) __get_free_page(GFP_KERNEL);
! 		if (!ov->frame[i].compbuf)
! 			goto error;
! 
! 		PDEBUG(4, "frame[%d] @ %p", i, ov->frame[i].data);
  	}
! 
! 	ov->buf_state = BUF_ALLOCATED;
! out:
! 	up(&ov->buf_lock);
! 	PDEBUG(4, "leaving");
! 	return 0;
! error:
! 	ov51x_do_dealloc(ov);
! 	up(&ov->buf_lock);
! 	PDEBUG(4, "errored");
! 	return -ENOMEM;
! }
! 
! static void
! ov51x_dealloc(struct usb_ov511 *ov, int now)
! {
! 	PDEBUG(4, "entered");
! 	down(&ov->buf_lock);
! 	ov51x_do_dealloc(ov);
! 	up(&ov->buf_lock);
  	PDEBUG(4, "leaving");
  }
  
  /****************************************************************************
   *
!  * V4L 1 API
   *
   ***************************************************************************/
  
! static int
! ov51x_v4l1_open(struct video_device *vdev, int flags)
  {
! 	struct usb_ov511 *ov = vdev->priv;
! 	int err, i;
  
  	PDEBUG(4, "opening");
! 
! 	down(&ov->lock);
  
  	err = -EBUSY;
! 	if (ov->user)
  		goto out;
  
! 	err = ov51x_alloc(ov);
! 	if (err < 0)
  		goto out;
  
! 	ov->sub_flag = 0;
! 
! 	/* In case app doesn't set them... */
! 	err = ov51x_set_default_params(ov);
! 	if (err < 0)
! 		goto out;
! 
! 	/* Make sure frames are reset */
! 	for (i = 0; i < OV511_NUMFRAMES; i++) {
! 		ov->frame[i].grabstate = FRAME_UNUSED;
! 		ov->frame[i].bytes_read = 0;
! 	}
! 
! 	/* If compression is on, make sure now that a
! 	 * decompressor can be loaded */
! 	if (ov->compress && !ov->decomp_ops) {
! 		err = request_decompressor(ov);
! 		if (err && !dumppix)
! 			goto out;
! 	}
  
! 	err = ov51x_init_isoc(ov);
  	if (err) {
! 		ov51x_dealloc(ov, 0);
  		goto out;
  	}
  
! 	ov->user++;
! 
! 	if (ov->led_policy == LED_AUTO)
! 		ov51x_led_control(ov, 1);
  
  out:
! 	up(&ov->lock);
  	return err;
  }
  
! static void
! ov51x_v4l1_close(struct video_device *vdev)
  {
! 	struct usb_ov511 *ov = vdev->priv;
  
  	PDEBUG(4, "ov511_close");
  
! 	down(&ov->lock);
! 
! 	ov->user--;
! 	ov51x_stop_isoc(ov);
  
! 	release_decompressor(ov);
  
! 	if (ov->led_policy == LED_AUTO)
! 		ov51x_led_control(ov, 0);
! 
! 	if (ov->dev)
! 		ov51x_dealloc(ov, 0);
  
! 	up(&ov->lock);
  
! 	/* Device unplugged while open. Only a minimum of unregistration is done
! 	 * here; the disconnect callback already did the rest. */
! 	if (!ov->dev) {
! 		down(&ov->cbuf_lock);
! 		kfree(ov->cbuf);
! 		ov->cbuf = NULL;
! 		up(&ov->cbuf_lock);
  
! 		ov51x_dealloc(ov, 1);
! 		video_unregister_device(&ov->vdev);
! 		kfree(ov);
! 		ov = NULL;
! 	}
  
! 	return;
  }
  
! /* Do not call this function directly! */
! static int
! ov51x_v4l1_ioctl_internal(struct usb_ov511 *ov, unsigned int cmd,
! 			  void *arg)
  {
! 	PDEBUG(5, "IOCtl: 0x%X", cmd);
  
! 	if (!ov->dev)
! 		return -EIO;
  
  	switch (cmd) {
  	case VIDIOCGCAP:
  	{
! 		struct video_capability *b = arg;
  
! 		PDEBUG(4, "VIDIOCGCAP");
  
! 		memset(b, 0, sizeof(struct video_capability));
! 		sprintf(b->name, "%s USB Camera",
! 			symbolic(brglist, ov->bridge));
! 		b->type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE;
! 		b->channels = ov->num_inputs;
! 		b->audios = 0;
! 		b->maxwidth = ov->maxwidth;
! 		b->maxheight = ov->maxheight;
! 		b->minwidth = ov->minwidth;
! 		b->minheight = ov->minheight;
  
  		return 0;
  	}
  	case VIDIOCGCHAN:
  	{
! 		struct video_channel *v = arg;
  
! 		PDEBUG(4, "VIDIOCGCHAN");
! 
! 		if ((unsigned)(v->channel) >= ov->num_inputs) {
! 			err("Invalid channel (%d)", v->channel);
  			return -EINVAL;
- 		}
  
! 		v->norm = ov->norm;
! 		v->type = VIDEO_TYPE_CAMERA;
! 		v->flags = 0;
! //		v->flags |= (ov->has_decoder) ? VIDEO_VC_NORM : 0;
! 		v->tuners = 0;
! 		decoder_get_input_name(ov, v->channel, v->name);
  
  		return 0;
  	}
  	case VIDIOCSCHAN:
  	{
! 		struct video_channel *v = arg;
! 		int err;
! 
! 		PDEBUG(4, "VIDIOCSCHAN");
! 
! 		/* Make sure it's not a camera */
! 		if (!ov->has_decoder) {
! 			if (v->channel == 0)
! 				return 0;
! 			else
! 				return -EINVAL;
! 		}
  
! 		if (v->norm != VIDEO_MODE_PAL &&
! 		    v->norm != VIDEO_MODE_NTSC &&
! 		    v->norm != VIDEO_MODE_SECAM &&
! 		    v->norm != VIDEO_MODE_AUTO) {
! 			err("Invalid norm (%d)", v->norm);
! 			return -EINVAL;
! 		}
  
! 		if ((unsigned)(v->channel) >= ov->num_inputs) {
! 			err("Invalid channel (%d)", v->channel);
  			return -EINVAL;
- 		}
- 
- 		err = decoder_set_input(ov, v->channel);
- 		if (err)
- 			return err;
- 
- 		err = decoder_set_norm(ov, v->norm);
- 		if (err)
- 			return err;
  
  		return 0;
  	}
  	case VIDIOCGPICT:
  	{
! 		struct video_picture *p = arg;
  
! 		PDEBUG(4, "VIDIOCGPICT");
  
! 		memset(p, 0, sizeof(struct video_picture));
! 		if (sensor_get_picture(ov, p))
  			return -EIO;
  
  		return 0;
  	}
  	case VIDIOCSPICT:
  	{
! 		struct video_picture *p = arg;
  		int i;
  
! 		PDEBUG(4, "VIDIOCSPICT");
! 
! 		if (!get_depth(p->palette))
! 			return -EINVAL;
  
! 		if (sensor_set_picture(ov, p))
! 			return -EIO;
  
! 		if (force_palette && p->palette != force_palette) {
! 			info("Palette rejected (%s)",
! 			     symbolic(v4l1_plist, p->palette));
  			return -EINVAL;
! 		}
! 
! 		// FIXME: Format should be independent of frames
! 		if (p->palette != ov->frame[0].format) {
! 			PDEBUG(4, "Detected format change");
! 
! 			/* If we're collecting previous frame wait
! 			   before changing modes */
! 			interruptible_sleep_on(&ov->wq);
! 			if (signal_pending(current)) return -EINTR;
! 
! 			mode_init_regs(ov, ov->frame[0].width,
! 				ov->frame[0].height, p->palette, ov->sub_flag);
! 		}
! 
! 		PDEBUG(4, "Setting depth=%d, palette=%s",
! 		       p->depth, symbolic(v4l1_plist, p->palette));
  
  		for (i = 0; i < OV511_NUMFRAMES; i++) {
! 			ov->frame[i].depth = p->depth;
! 			ov->frame[i].format = p->palette;
  		}
  
  		return 0;
  	}
  	case VIDIOCGCAPTURE:
  	{
! 		int *vf = arg;
  
! 		PDEBUG(4, "VIDIOCGCAPTURE");
  
! 		ov->sub_flag = *vf;
  		return 0;
  	}
  	case VIDIOCSCAPTURE:
  	{
! 		struct video_capture *vc = arg;
  
! 		PDEBUG(4, "VIDIOCSCAPTURE");
! 
! 		if (vc->flags)
  			return -EINVAL;
! 		if (vc->decimation)
  			return -EINVAL;
  
! 		vc->x &= ~3L;
! 		vc->y &= ~1L;
! 		vc->y &= ~31L;
! 
! 		if (vc->width == 0)
! 			vc->width = 32;
! 
! 		vc->height /= 16;
! 		vc->height *= 16;
! 		if (vc->height == 0)
! 			vc->height = 16;
! 
! 		ov->subx = vc->x;
! 		ov->suby = vc->y;
! 		ov->subw = vc->width;
! 		ov->subh = vc->height;
  
  		return 0;
  	}
  	case VIDIOCSWIN:
  	{
! 		struct video_window *vw = arg;
  		int i, result;
  
! 		PDEBUG(4, "VIDIOCSWIN: %dx%d", vw->width, vw->height);
  
  #if 0
! 		if (vw->flags)
  			return -EINVAL;
! 		if (vw->clipcount)
  			return -EINVAL;
! 		if (vw->height != ov->maxheight)
  			return -EINVAL;
! 		if (vw->width != ov->maxwidth)
  			return -EINVAL;
  #endif
  
  		/* If we're collecting previous frame wait
  		   before changing modes */
! 		interruptible_sleep_on(&ov->wq);
  		if (signal_pending(current)) return -EINTR;
  
! 		result = mode_init_regs(ov, vw->width, vw->height,
! 			ov->frame[0].format, ov->sub_flag);
  		if (result < 0)
  			return result;
  
  		for (i = 0; i < OV511_NUMFRAMES; i++) {
! 			ov->frame[i].width = vw->width;
! 			ov->frame[i].height = vw->height;
  		}
  
  		return 0;
  	}
  	case VIDIOCGWIN:
  	{
! 		struct video_window *vw = arg;
  
! 		memset(vw, 0, sizeof(struct video_window));
! 		vw->x = 0;		/* FIXME */
! 		vw->y = 0;
! 		vw->width = ov->frame[0].width;
! 		vw->height = ov->frame[0].height;
! 		vw->flags = 30;
  
! 		PDEBUG(4, "VIDIOCGWIN: %dx%d", vw->width, vw->height);
  
  		return 0;
  	}
  	case VIDIOCGMBUF:
  	{
! 		struct video_mbuf *vm = arg;
  		int i;
! 
! 		PDEBUG(4, "VIDIOCGMBUF");
! 
! 		memset(vm, 0, sizeof(struct video_mbuf));
! 		vm->size = OV511_NUMFRAMES
! 			   * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight);
! 		vm->frames = OV511_NUMFRAMES;
! 
! 		vm->offsets[0] = 0;
  		for (i = 1; i < OV511_NUMFRAMES; i++) {
! 			vm->offsets[i] = vm->offsets[i-1]
! 			   + MAX_DATA_SIZE(ov->maxwidth, ov->maxheight);
  		}
  
  		return 0;
  	}
  	case VIDIOCMCAPTURE:
  	{
! 		struct video_mmap *vm = arg;
  		int ret, depth;
- 		unsigned int f = vm->frame;
  
! 		PDEBUG(4, "VIDIOCMCAPTURE: frame: %d, %dx%d, %s", f, vm->width,
! 			vm->height, symbolic(v4l1_plist, vm->format));
  
! 		depth = get_depth(vm->format);
  		if (!depth) {
! 			err("VIDIOCMCAPTURE: invalid format (%s)",
! 			    symbolic(v4l1_plist, vm->format));
  			return -EINVAL;
  		}
  
! 		if (f >= OV511_NUMFRAMES) {
! 			err("VIDIOCMCAPTURE: invalid frame (%d)", f);
  			return -EINVAL;
  		}
  
! 		if (vm->width > ov->maxwidth
! 		    || vm->height > ov->maxheight) {
  			err("VIDIOCMCAPTURE: requested dimensions too big");
  			return -EINVAL;
  		}
  
! 		if (ov->frame[f].grabstate == FRAME_GRABBING) {
! 			PDEBUG(4, "VIDIOCMCAPTURE: already grabbing");
! 			return -EBUSY;
! 		}
! 
! 		if (force_palette && (vm->format != force_palette)) {
! 			info("palette rejected (%s)",
! 			     symbolic(v4l1_plist, vm->format));
! 			return -EINVAL;
! 		}
! 
! 		if ((ov->frame[f].width != vm->width) ||
! 		    (ov->frame[f].height != vm->height) ||
! 		    (ov->frame[f].format != vm->format) ||
! 		    (ov->frame[f].sub_flag != ov->sub_flag) ||
! 		    (ov->frame[f].depth != depth)) {
! 			PDEBUG(4, "VIDIOCMCAPTURE: change in image parameters");
  
  			/* If we're collecting previous frame wait
  			   before changing modes */
! 			interruptible_sleep_on(&ov->wq);
  			if (signal_pending(current)) return -EINTR;
! 			ret = mode_init_regs(ov, vm->width, vm->height,
! 				vm->format, ov->sub_flag);
  #if 0
! 			if (ret < 0) {
! 				PDEBUG(1, "Got error while initializing regs ");
  				return ret;
- 			}
  #endif
- 			ov->frame[f].width = vm->width;
- 			ov->frame[f].height = vm->height;
- 			ov->frame[f].format = vm->format;
- 			ov->frame[f].sub_flag = ov->sub_flag;
- 			ov->frame[f].depth = depth;
  		}
  
! 		/* Mark it as ready */
! 		ov->frame[f].grabstate = FRAME_READY;
  
! 		PDEBUG(4, "VIDIOCMCAPTURE: renewing frame %d", f);
  
! 		return ov51x_new_frame(ov, f);
  	}
  	case VIDIOCSYNC:
  	{
! 		unsigned int fnum = *((unsigned int *) arg);
! 		struct ov511_frame *frame;
! 		int rc;
  
! 		if (fnum >= OV511_NUMFRAMES) {
! 			err("VIDIOCSYNC: invalid frame (%d)", fnum);
  			return -EINVAL;
  		}
  
! 		frame = &ov->frame[fnum];
! 
! 		PDEBUG(4, "syncing to frame %d, grabstate = %d", fnum,
! 		       frame->grabstate);
  
! 		switch (frame->grabstate) {
  		case FRAME_UNUSED:
  			return -EINVAL;
  		case FRAME_READY:
  		case FRAME_GRABBING:
  		case FRAME_ERROR:
  redo:
! 			if (!ov->dev)
  				return -EIO;
  
! 			rc = wait_event_interruptible(frame->wq,
! 			    (frame->grabstate == FRAME_DONE)
! 			    || (frame->grabstate == FRAME_ERROR));
! 
! 			if (rc)
! 				return rc;
  
! 			if (frame->grabstate == FRAME_ERROR) {
  				int ret;
  
! 				if ((ret = ov51x_new_frame(ov, fnum)) < 0)
  					return ret;
  				goto redo;
! 			}
! 			/* Fall through */
  		case FRAME_DONE:
! 			if (ov->snap_enabled && !frame->snapshot) {
  				int ret;
! 				if ((ret = ov51x_new_frame(ov, fnum)) < 0)
  					return ret;
  				goto redo;
  			}
  
! 			frame->grabstate = FRAME_UNUSED;
  
  			/* Reset the hardware snapshot button */
  			/* FIXME - Is this the best place for this? */
! 			if ((ov->snap_enabled) && (frame->snapshot)) {
! 				frame->snapshot = 0;
! 				ov51x_clear_snapshot(ov);
  			}
- 
- 			/* Decompression, format conversion, etc... */
- 			ov51x_postprocess(ov, frame);
- 
  			break;
  		} /* end switch */
  
--- 2041,2603 ----
   * Buffer management
   *
   ***************************************************************************/
! static int ov511_alloc(struct usb_ov511 *ov511)
  {
  	int i;
  
! 	PDEBUG(4, "entered");
! 	down(&ov511->buf_lock);
  
! 	if (ov511->buf_state == BUF_PEND_DEALLOC) {
! 		ov511->buf_state = BUF_ALLOCATED;
! 		del_timer(&ov511->buf_timer);
  	}
  
! 	if (ov511->buf_state == BUF_ALLOCATED)
! 		goto out;
  
! 	ov511->fbuf = rvmalloc(OV511_NUMFRAMES * MAX_DATA_SIZE);
! 	if (!ov511->fbuf)
! 		goto error;
  
  	for (i = 0; i < OV511_NUMFRAMES; i++) {
! 		ov511->frame[i].grabstate = FRAME_UNUSED;
! 		ov511->frame[i].data = ov511->fbuf + i * MAX_DATA_SIZE;
! 		PDEBUG(4, "frame[%d] @ %p", i, ov511->frame[i].data);
! 
! 		ov511->sbuf[i].data = kmalloc(FRAMES_PER_DESC *
! 			MAX_FRAME_SIZE_PER_DESC, GFP_KERNEL);
! 		if (!ov511->sbuf[i].data) {
! 			while (--i) {
! 				kfree(ov511->sbuf[i].data);
! 				ov511->sbuf[i].data = NULL;
! 			}
! 			rvfree(ov511->fbuf, OV511_NUMFRAMES * MAX_DATA_SIZE);
! 			ov511->fbuf = NULL;
! 			goto error;
  		}
+ 		PDEBUG(4, "sbuf[%d] @ %p", i, ov511->sbuf[i].data);
  	}
! 	ov511->buf_state = BUF_ALLOCATED;
! out:
! 	up(&ov511->buf_lock);
  	PDEBUG(4, "leaving");
+ 	return 0;
+ error:
+ 	ov511->buf_state = BUF_NOT_ALLOCATED;
+ 	up(&ov511->buf_lock);
+ 	PDEBUG(4, "errored");
+ 	return -ENOMEM;
  }
  
! /* 
!  * - You must acquire buf_lock before entering this function.
!  * - Because this code will free any non-null pointer, you must be sure to null
!  *   them if you explicitly free them somewhere else!
!  */
! static void ov511_do_dealloc(struct usb_ov511 *ov511)
  {
  	int i;
  	PDEBUG(4, "entered");
  
! 	if (ov511->fbuf) {
! 		rvfree(ov511->fbuf, OV511_NUMFRAMES * MAX_DATA_SIZE);
! 		ov511->fbuf = NULL;
  	}
  
! 	for (i = 0; i < OV511_NUMFRAMES; i++) {
! 		if (ov511->sbuf[i].data) {
! 			kfree(ov511->sbuf[i].data);
! 			ov511->sbuf[i].data = NULL;
! 		}
! 	}
  
! 	PDEBUG(4, "buffer memory deallocated");
! 	ov511->buf_state = BUF_NOT_ALLOCATED;
! 	PDEBUG(4, "leaving");
! }
  
! static void ov511_buf_callback(unsigned long data)
! {
! 	struct usb_ov511 *ov511 = (struct usb_ov511 *)data;
! 	PDEBUG(4, "entered");
! 	down(&ov511->buf_lock);
  
! 	if (ov511->buf_state == BUF_PEND_DEALLOC)
! 		ov511_do_dealloc(ov511);
  
! 	up(&ov511->buf_lock);
! 	PDEBUG(4, "leaving");
! }
  
! static void ov511_dealloc(struct usb_ov511 *ov511, int now)
! {
! 	struct timer_list *bt = &(ov511->buf_timer);
! 	PDEBUG(4, "entered");
! 	down(&ov511->buf_lock);
  
! 	PDEBUG(4, "deallocating buffer memory %s", now ? "now" : "later");
  
! 	if (ov511->buf_state == BUF_PEND_DEALLOC) {
! 		ov511->buf_state = BUF_ALLOCATED;
! 		del_timer(bt);
  	}
  
! 	if (now)
! 		ov511_do_dealloc(ov511);
! 	else {
! 		ov511->buf_state = BUF_PEND_DEALLOC;
! 		init_timer(bt);
! 		bt->function = ov511_buf_callback;
! 		bt->data = (unsigned long)ov511;
! 		bt->expires = jiffies + buf_timeout * HZ;
! 		add_timer(bt);
  	}
! 	up(&ov511->buf_lock);
  	PDEBUG(4, "leaving");
  }
  
  /****************************************************************************
   *
!  * V4L API
   *
   ***************************************************************************/
  
! static int ov511_open(struct video_device *dev, int flags)
  {
! 	struct usb_ov511 *ov511 = (struct usb_ov511 *)dev;
! 	int err;
  
+ 	MOD_INC_USE_COUNT;
  	PDEBUG(4, "opening");
! 	down(&ov511->lock);
  
  	err = -EBUSY;
! 	if (ov511->user) 
  		goto out;
  
! 	err = -ENOMEM;
! 	if (ov511_alloc(ov511))
  		goto out;
  
! 	ov511->sub_flag = 0;
  
! 	err = ov511_init_isoc(ov511);
  	if (err) {
! 		ov511_dealloc(ov511, 0);
  		goto out;
  	}
  
! 	ov511->user++;
  
  out:
! 	up(&ov511->lock);
! 
! 	if (err)
! 		MOD_DEC_USE_COUNT;
! 
  	return err;
  }
  
! static void ov511_close(struct video_device *dev)
  {
! 	struct usb_ov511 *ov511 = (struct usb_ov511 *)dev;
  
  	PDEBUG(4, "ov511_close");
+ 	
+ 	down(&ov511->lock);
  
! 	ov511->user--;
! 	ov511_stop_isoc(ov511);
  
! 	if (ov511->dev)
! 		ov511_dealloc(ov511, 0);
  
! 	up(&ov511->lock);
! 
! 	if (!ov511->dev) {
! 		ov511_dealloc(ov511, 1);
! 		video_unregister_device(&ov511->vdev);
! 		kfree(ov511);
! 		ov511 = NULL;
! 	}
  
! 	MOD_DEC_USE_COUNT;
! }
  
! static int ov511_init_done(struct video_device *dev)
! {
! #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
! 	create_proc_ov511_cam((struct usb_ov511 *)dev);
! #endif
  
! 	return 0;
! }
  
! static long ov511_write(struct video_device *dev, const char *buf, unsigned long count, int noblock)
! {
! 	return -EINVAL;
  }
  
! static int ov511_ioctl(struct video_device *vdev, unsigned int cmd, void *arg)
  {
! 	struct usb_ov511 *ov511 = (struct usb_ov511 *)vdev;
  
! 	PDEBUG(4, "IOCtl: 0x%X", cmd);
! 
! 	if (!ov511->dev)
! 		return -EIO;	
  
  	switch (cmd) {
  	case VIDIOCGCAP:
  	{
! 		struct video_capability b;
  
! 		PDEBUG (4, "VIDIOCGCAP");
  
! 		memset(&b, 0, sizeof(b));
! 		strcpy(b.name, "OV511 USB Camera");
! 		b.type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE;
! 		b.channels = 1;
! 		b.audios = 0;
! 		b.maxwidth = ov511->maxwidth;
! 		b.maxheight = ov511->maxheight;
! 		b.minwidth = 160;
! 		b.minheight = 120;
  
+ 		if (copy_to_user(arg, &b, sizeof(b)))
+ 			return -EFAULT;
+ 				
  		return 0;
  	}
  	case VIDIOCGCHAN:
  	{
! 		struct video_channel v;
  
! 		if (copy_from_user(&v, arg, sizeof(v)))
! 			return -EFAULT;
! 		if (v.channel != 0)
  			return -EINVAL;
  
! 		v.flags = 0;
! 		v.tuners = 0;
! 		v.type = VIDEO_TYPE_CAMERA;
! 		strcpy(v.name, "Camera");
  
+ 		if (copy_to_user(arg, &v, sizeof(v)))
+ 			return -EFAULT;
+ 				
  		return 0;
  	}
  	case VIDIOCSCHAN:
  	{
! 		int v;
  
! 		if (copy_from_user(&v, arg, sizeof(v)))
! 			return -EFAULT;
  
! 		if (v != 0)
  			return -EINVAL;
  
  		return 0;
  	}
  	case VIDIOCGPICT:
  	{
! 		struct video_picture p;
  
! 		PDEBUG (4, "VIDIOCGPICT");
  
! 		memset(&p, 0, sizeof(p));
! 
! 		if (ov7610_get_picture(ov511, &p))
  			return -EIO;
  
+ 		if (copy_to_user(arg, &p, sizeof(p)))
+ 			return -EFAULT;
+ 
  		return 0;
  	}
  	case VIDIOCSPICT:
  	{
! 		struct video_picture p;
  		int i;
  
! 		PDEBUG (4, "VIDIOCSPICT");
  
! 		if (copy_from_user(&p, arg, sizeof(p)))
! 			return -EFAULT;
  
! 		if (!ov511_get_depth(p.palette))
  			return -EINVAL;
! 			
! 		if (ov7610_set_picture(ov511, &p))
! 			return -EIO;
  
+ 		PDEBUG(4, "Setting depth=%d, palette=%d", p.depth, p.palette);
  		for (i = 0; i < OV511_NUMFRAMES; i++) {
! 			ov511->frame[i].depth = p.depth;
! 			ov511->frame[i].format = p.palette;
! 			ov511->frame[i].segsize = GET_SEGSIZE(p.palette);
  		}
  
  		return 0;
  	}
  	case VIDIOCGCAPTURE:
  	{
! 		int vf;
  
! 		PDEBUG (4, "VIDIOCGCAPTURE");
  
! 		if (copy_from_user(&vf, arg, sizeof(vf)))
! 			return -EFAULT;
! 		ov511->sub_flag = vf;
  		return 0;
  	}
  	case VIDIOCSCAPTURE:
  	{
! 		struct video_capture vc;
  
! 		if (copy_from_user(&vc, arg, sizeof(vc)))
! 			return -EFAULT;
! 		if (vc.flags)
  			return -EINVAL;
! 		if (vc.decimation)
  			return -EINVAL;
  
! 		vc.x &= ~3L;
! 		vc.y &= ~1L;
! 		vc.y &= ~31L;
! 
! 		if (vc.width == 0)
! 			vc.width = 32;
! 
! 		vc.height /= 16;
! 		vc.height *= 16;
! 		if (vc.height == 0)
! 			vc.height = 16;
! 
! 		ov511->subx = vc.x;
! 		ov511->suby = vc.y;
! 		ov511->subw = vc.width;
! 		ov511->subh = vc.height;
  
  		return 0;
  	}
  	case VIDIOCSWIN:
  	{
! 		struct video_window vw;
  		int i, result;
  
! 		if (copy_from_user(&vw, arg, sizeof(vw)))
! 			return -EFAULT;
! 
! 		PDEBUG (4, "VIDIOCSWIN: width=%d, height=%d",
! 			vw.width, vw.height);
  
  #if 0
! 		if (vw.flags)
  			return -EINVAL;
! 		if (vw.clipcount)
  			return -EINVAL;
! 		if (vw.height != ov511->maxheight)
  			return -EINVAL;
! 		if (vw.width != ov511->maxwidth)
  			return -EINVAL;
  #endif
  
  		/* If we're collecting previous frame wait
  		   before changing modes */
! 		interruptible_sleep_on(&ov511->wq);
  		if (signal_pending(current)) return -EINTR;
  
! 		result = ov511_mode_init_regs(ov511, vw.width, vw.height,
! 			ov511->frame[0].format, ov511->sub_flag);
  		if (result < 0)
  			return result;
  
  		for (i = 0; i < OV511_NUMFRAMES; i++) {
! 			ov511->frame[i].width = vw.width;
! 			ov511->frame[i].height = vw.height;
  		}
  
  		return 0;
  	}
  	case VIDIOCGWIN:
  	{
! 		struct video_window vw;
! 
! 		memset(&vw, 0, sizeof(vw));
! 		vw.x = 0;		/* FIXME */
! 		vw.y = 0;
! 		vw.width = ov511->frame[0].width;
! 		vw.height = ov511->frame[0].height;
! 		vw.flags = 30;
  
! 		PDEBUG (4, "VIDIOCGWIN: %dx%d", vw.width, vw.height);
  
! 		if (copy_to_user(arg, &vw, sizeof(vw)))
! 			return -EFAULT;
  
  		return 0;
  	}
  	case VIDIOCGMBUF:
  	{
! 		struct video_mbuf vm;
  		int i;
! 		
! 		memset(&vm, 0, sizeof(vm));
! 		vm.size = OV511_NUMFRAMES * MAX_DATA_SIZE;
! 		vm.frames = OV511_NUMFRAMES;
! 		vm.offsets[0] = 0;
  		for (i = 1; i < OV511_NUMFRAMES; i++) {
! 			vm.offsets[i] = vm.offsets[i-1] + MAX_FRAME_SIZE
! 				+ sizeof (struct timeval);
  		}
  
+ 		if (copy_to_user((void *)arg, (void *)&vm, sizeof(vm)))
+ 			return -EFAULT;
+ 
  		return 0;
  	}
  	case VIDIOCMCAPTURE:
  	{
! 		struct video_mmap vm;
  		int ret, depth;
  
! 		if (copy_from_user((void *)&vm, (void *)arg, sizeof(vm)))
! 			return -EFAULT;
! 
! 		PDEBUG(4, "CMCAPTURE");
! 		PDEBUG(4, "frame: %d, size: %dx%d, format: %d",
! 			vm.frame, vm.width, vm.height, vm.format);
  
! 		depth = ov511_get_depth(vm.format);
  		if (!depth) {
! 			err("VIDIOCMCAPTURE: invalid format (%d)", vm.format);
  			return -EINVAL;
  		}
  
! 		if ((unsigned)vm.frame >= OV511_NUMFRAMES) {
! 			err("VIDIOCMCAPTURE: invalid frame (%d)", vm.frame);
  			return -EINVAL;
  		}
  
! 		if (vm.width > ov511->maxwidth || vm.height > ov511->maxheight) {
  			err("VIDIOCMCAPTURE: requested dimensions too big");
  			return -EINVAL;
  		}
  
! 		if (ov511->frame[vm.frame].grabstate == FRAME_GRABBING)
! 			return -EBUSY;
  
+ 		/* Don't compress if the size changed */
+ 		if ((ov511->frame[vm.frame].width != vm.width) ||
+ 		    (ov511->frame[vm.frame].height != vm.height) ||
+ 		    (ov511->frame[vm.frame].format != vm.format) ||
+ 		    (ov511->frame[vm.frame].sub_flag !=
+ 		     ov511->sub_flag)) {
  			/* If we're collecting previous frame wait
  			   before changing modes */
! 			interruptible_sleep_on(&ov511->wq);
  			if (signal_pending(current)) return -EINTR;
! 			ret = ov511_mode_init_regs(ov511, vm.width, vm.height,
! 				vm.format, ov511->sub_flag);
  #if 0
! 			if (ret < 0)
  				return ret;
  #endif
  		}
  
! 		ov511->frame[vm.frame].width = vm.width;
! 		ov511->frame[vm.frame].height = vm.height;
! 		ov511->frame[vm.frame].format = vm.format;
! 		ov511->frame[vm.frame].sub_flag = ov511->sub_flag;
! 		ov511->frame[vm.frame].segsize = GET_SEGSIZE(vm.format);
! 		ov511->frame[vm.frame].depth = depth;
  
! 		/* Mark it as ready */
! 		ov511->frame[vm.frame].grabstate = FRAME_READY;
  
! 		return ov511_new_frame(ov511, vm.frame);
  	}
  	case VIDIOCSYNC:
  	{
! 		int frame;
! 
! 		if (copy_from_user((void *)&frame, arg, sizeof(int)))
! 			return -EFAULT;
  
! 		if ((unsigned)frame >= OV511_NUMFRAMES) {
! 			err("VIDIOCSYNC: invalid frame (%d)", frame);
  			return -EINVAL;
  		}
  
! 		PDEBUG(4, "syncing to frame %d, grabstate = %d", frame,
! 		       ov511->frame[frame].grabstate);
  
! 		if(frame < 0 || frame >= OV511_NUMFRAMES)
! 			return -EINVAL;
! 			
! 		switch (ov511->frame[frame].grabstate) {
  		case FRAME_UNUSED:
  			return -EINVAL;
  		case FRAME_READY:
  		case FRAME_GRABBING:
  		case FRAME_ERROR:
  redo:
! 			if (!ov511->dev)
  				return -EIO;
  
! 			do {
! #if 0
! 				init_waitqueue_head(&ov511->frame[frame].wq);
! #endif
! 				interruptible_sleep_on(&ov511->frame[frame].wq);
! 				if (signal_pending(current)) {
! 					if (retry_sync) {
! 						PDEBUG(3, "***retry sync***");
! 
! 						/* Polling apps will destroy frames with that! */
! 						ov511_new_frame(ov511, frame);
! 						ov511->curframe = -1;
! 
! 						/* This will request another frame. */
! 						if (waitqueue_active(&ov511->frame[frame].wq))
! 							wake_up_interruptible(&ov511->frame[frame].wq);
! 
! 						return 0;
!  					} else {
! 						return -EINTR;
! 					}
! 				}
! 			} while (ov511->frame[frame].grabstate == FRAME_GRABBING);
  
! 			if (ov511->frame[frame].grabstate == FRAME_ERROR) {
  				int ret;
  
! 				if ((ret = ov511_new_frame(ov511, frame)) < 0)
  					return ret;
  				goto redo;
! 			}			
  		case FRAME_DONE:
! 			if (ov511->snap_enabled && !ov511->frame[frame].snapshot) {
  				int ret;
! 				if ((ret = ov511_new_frame(ov511, frame)) < 0)
  					return ret;
  				goto redo;
  			}
  
! 			ov511->frame[frame].grabstate = FRAME_UNUSED;
  
  			/* Reset the hardware snapshot button */
  			/* FIXME - Is this the best place for this? */
! 			if ((ov511->snap_enabled) &&
! 			    (ov511->frame[frame].snapshot)) {
! 				ov511->frame[frame].snapshot = 0;
! 				ov511_reg_write(ov511->dev, OV511_REG_SYSTEM_SNAPSHOT, 0x01);
! 				ov511_reg_write(ov511->dev, OV511_REG_SYSTEM_SNAPSHOT, 0x03);
! 				ov511_reg_write(ov511->dev, OV511_REG_SYSTEM_SNAPSHOT, 0x01);
  			}
  			break;
  		} /* end switch */
  
***************
*** 4958,5244 ****
  	}
  	case VIDIOCGFBUF:
  	{
! 		struct video_buffer *vb = arg;
  
! 		PDEBUG(4, "VIDIOCGFBUF");
  
! 		memset(vb, 0, sizeof(struct video_buffer));
  
  		return 0;
  	}
! 	case VIDIOCGUNIT:
! 	{
! 		struct video_unit *vu = arg;
! 
! 		PDEBUG(4, "VIDIOCGUNIT");
! 
! 		memset(vu, 0, sizeof(struct video_unit));
! 
! 		vu->video = ov->vdev.minor;
! 		vu->vbi = VIDEO_NO_UNIT;
! 		vu->radio = VIDEO_NO_UNIT;
! 		vu->audio = VIDEO_NO_UNIT;
! 		vu->teletext = VIDEO_NO_UNIT;
! 
  		return 0;
! 	}
  	default:
- 		PDEBUG(3, "Unsupported IOCtl: 0x%X", cmd);
  		return -ENOIOCTLCMD;
  	} /* end switch */
  
  	return 0;
  }
  
! /* This is implemented as video_generic_ioctl() in the new V4L's videodev.c */
! static int
! ov51x_v4l1_generic_ioctl(struct video_device *vdev, unsigned int cmd, void *arg)
! {
! 	char	sbuf[128];
! 	void    *mbuf = NULL;
! 	void	*parg = NULL;
! 	int	err  = -EINVAL;
! 
! 	/*  Copy arguments into temp kernel buffer  */
! 	switch (_IOC_DIR(cmd)) {
! 	case _IOC_NONE:
! 		parg = arg;
! 		break;
! 	case _IOC_READ: /* some v4l ioctls are marked wrong ... */
! 	case _IOC_WRITE:
! 	case (_IOC_WRITE | _IOC_READ):
! 		if (_IOC_SIZE(cmd) <= sizeof(sbuf)) {
! 			parg = sbuf;
! 		} else {
! 			/* too big to allocate from stack */
! 			mbuf = kmalloc(_IOC_SIZE(cmd), GFP_KERNEL);
! 			if (NULL == mbuf)
! 				return -ENOMEM;
! 			parg = mbuf;
! 		}
! 
! 		err = -EFAULT;
! 		if (copy_from_user(parg, arg, _IOC_SIZE(cmd)))
! 			goto out;
! 		break;
! 	}
! 
! 	err = ov51x_v4l1_ioctl_internal(vdev->priv, cmd, parg);
! 	if (err == -ENOIOCTLCMD)
! 		err = -EINVAL;
! 	if (err < 0)
! 		goto out;
! 
! 	/*  Copy results into user buffer  */
! 	switch (_IOC_DIR(cmd))
! 	{
! 	case _IOC_READ:
! 	case (_IOC_WRITE | _IOC_READ):
! 		if (copy_to_user(arg, parg, _IOC_SIZE(cmd)))
! 			err = -EFAULT;
! 		break;
! 	}
! 
! out:
! 	if (mbuf)
! 		kfree(mbuf);
! 	return err;
! }
! 
! static int
! ov51x_v4l1_ioctl(struct video_device *vdev, unsigned int cmd, void *arg)
! {
! 	struct usb_ov511 *ov = vdev->priv;
! 	int rc;
! 
! 	if (down_interruptible(&ov->lock))
! 		return -EINTR;
! 
! 	rc = ov51x_v4l1_generic_ioctl(vdev, cmd, arg);
! 
! 	up(&ov->lock);
! 	return rc;
! }
! 
! static inline long
! ov51x_v4l1_read(struct video_device *vdev, char *buf, unsigned long count,
! 		int noblock)
  {
! 	struct usb_ov511 *ov = vdev->priv;
! 	int i, rc = 0, frmx = -1;
! 	struct ov511_frame *frame;
! 
! 	if (down_interruptible(&ov->lock))
! 		return -EINTR;
  
  	PDEBUG(4, "%ld bytes, noblock=%d", count, noblock);
  
! 	if (!vdev || !buf) {
! 		rc = -EFAULT;
! 		goto error;
! 	}
  
! 	if (!ov->dev) {
! 		rc = -EIO;
! 		goto error;
! 	}
  
- // FIXME: Only supports two frames
  	/* See if a frame is completed, then use it. */
! 	if (ov->frame[0].grabstate >= FRAME_DONE)	/* _DONE or _ERROR */
  		frmx = 0;
! 	else if (ov->frame[1].grabstate >= FRAME_DONE)/* _DONE or _ERROR */
  		frmx = 1;
  
  	/* If nonblocking we return immediately */
! 	if (noblock && (frmx == -1)) {
! 		rc = -EAGAIN;
! 		goto error;
! 	}
  
  	/* If no FRAME_DONE, look for a FRAME_GRABBING state. */
  	/* See if a frame is in process (grabbing), then use it. */
  	if (frmx == -1) {
! 		if (ov->frame[0].grabstate == FRAME_GRABBING)
  			frmx = 0;
! 		else if (ov->frame[1].grabstate == FRAME_GRABBING)
  			frmx = 1;
  	}
  
  	/* If no frame is active, start one. */
! 	if (frmx == -1) {
! 		if ((rc = ov51x_new_frame(ov, frmx = 0))) {
! 			err("read: ov51x_new_frame error");
! 			goto error;
! 		}
! 	}
  
! 	frame = &ov->frame[frmx];
  
  restart:
! 	if (!ov->dev) {
! 		rc = -EIO;
! 		goto error;
! 	}
  
  	/* Wait while we're grabbing the image */
  	PDEBUG(4, "Waiting image grabbing");
! 	rc = wait_event_interruptible(frame->wq,
! 		(frame->grabstate == FRAME_DONE)
! 		|| (frame->grabstate == FRAME_ERROR));
! 
! 	if (rc)
! 		goto error;
! 
  	PDEBUG(4, "Got image, frame->grabstate = %d", frame->grabstate);
- 	PDEBUG(4, "bytes_recvd = %d", frame->bytes_recvd);
  
  	if (frame->grabstate == FRAME_ERROR) {
  		frame->bytes_read = 0;
! 		err("** ick! ** Errored frame %d", ov->curframe);
! 		if (ov51x_new_frame(ov, frmx)) {
! 			err("read: ov51x_new_frame error");
! 			goto error;
! 		}
  		goto restart;
  	}
  
  
  	/* Repeat until we get a snapshot frame */
! 	if (ov->snap_enabled)
! 		PDEBUG(4, "Waiting snapshot frame");
! 	if (ov->snap_enabled && !frame->snapshot) {
  		frame->bytes_read = 0;
! 		if ((rc = ov51x_new_frame(ov, frmx))) {
! 			err("read: ov51x_new_frame error");
! 			goto error;
! 		}
  		goto restart;
  	}
  
  	/* Clear the snapshot */
! 	if (ov->snap_enabled && frame->snapshot) {
  		frame->snapshot = 0;
! 		ov51x_clear_snapshot(ov);
  	}
  
! 	/* Decompression, format conversion, etc... */
! 	ov51x_postprocess(ov, frame);
! 
! 	PDEBUG(4, "frmx=%d, bytes_read=%ld, length=%ld", frmx,
! 		frame->bytes_read,
! 		get_frame_length(frame));
  
  	/* copy bytes to user space; we allow for partials reads */
! //	if ((count + frame->bytes_read)
! //	    > get_frame_length((struct ov511_frame *)frame))
  //		count = frame->scanlength - frame->bytes_read;
  
  	/* FIXME - count hardwired to be one frame... */
! 	count = get_frame_length(frame);
  
  	PDEBUG(4, "Copy to user space: %ld bytes", count);
  	if ((i = copy_to_user(buf, frame->data + frame->bytes_read, count))) {
  		PDEBUG(4, "Copy failed! %d bytes not copied", i);
! 		rc = -EFAULT;
! 		goto error;
  	}
  
  	frame->bytes_read += count;
  	PDEBUG(4, "{copy} count used=%ld, new bytes_read=%ld",
  		count, frame->bytes_read);
  
! 	/* If all data has been read... */
! 	if (frame->bytes_read
! 	    >= get_frame_length(frame)) {
  		frame->bytes_read = 0;
  
- // FIXME: Only supports two frames
  		/* Mark it as available to be used again. */
! 		ov->frame[frmx].grabstate = FRAME_UNUSED;
! 		if ((rc = ov51x_new_frame(ov, !frmx))) {
! 			err("ov51x_new_frame returned error");
! 			goto error;
! 		}
  	}
  
  	PDEBUG(4, "read finished, returning %ld (sweet)", count);
  
- 	up(&ov->lock);
  	return count;
- 
- error:
- 	up(&ov->lock);
- 	return rc;
  }
  
! static int
! ov51x_v4l1_mmap(struct video_device *vdev, const char *adr, unsigned long size)
  {
  	unsigned long start = (unsigned long)adr;
- 	struct usb_ov511 *ov = vdev->priv;
  	unsigned long page, pos;
  
! 	if (ov->dev == NULL)
  		return -EIO;
  
  	PDEBUG(4, "mmap: %ld (%lX) bytes", size, size);
  
! 	if (size > (((OV511_NUMFRAMES
! 	              * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight)
! 	              + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))))
  		return -EINVAL;
  
! 	if (down_interruptible(&ov->lock))
! 		return -EINTR;
! 
! 	pos = (unsigned long)ov->fbuf;
  	while (size > 0) {
  		page = kvirt_to_pa(pos);
! 		if (remap_page_range(start, page, PAGE_SIZE, PAGE_SHARED)) {
! 			up(&ov->lock);
  			return -EAGAIN;
- 		}
  		start += PAGE_SIZE;
  		pos += PAGE_SIZE;
  		if (size > PAGE_SIZE)
--- 2605,2776 ----
  	}
  	case VIDIOCGFBUF:
  	{
! 		struct video_buffer vb;
  
! 		memset(&vb, 0, sizeof(vb));
! 		vb.base = NULL;	/* frame buffer not supported, not used */
  
! 		if (copy_to_user((void *)arg, (void *)&vb, sizeof(vb)))
! 			return -EFAULT;
  
  		return 0;
  	}
! 	case VIDIOCKEY:
  		return 0;
! 	case VIDIOCCAPTURE:
! 		return -EINVAL;
! 	case VIDIOCSFBUF:
! 		return -EINVAL;
! 	case VIDIOCGTUNER:
! 	case VIDIOCSTUNER:
! 		return -EINVAL;
! 	case VIDIOCGFREQ:
! 	case VIDIOCSFREQ:
! 		return -EINVAL;
! 	case VIDIOCGAUDIO:
! 	case VIDIOCSAUDIO:
! 		return -EINVAL;
  	default:
  		return -ENOIOCTLCMD;
  	} /* end switch */
  
  	return 0;
  }
  
! static long ov511_read(struct video_device *dev, char *buf, unsigned long count, int noblock)
  {
! 	struct usb_ov511 *ov511 = (struct usb_ov511 *)dev;
! 	int i;
! 	int frmx = -1;
! 	volatile struct ov511_frame *frame;
  
  	PDEBUG(4, "%ld bytes, noblock=%d", count, noblock);
  
! 	if (!dev || !buf)
! 		return -EFAULT;
  
! 	if (!ov511->dev)
! 		return -EIO;
  
  	/* See if a frame is completed, then use it. */
! 	if (ov511->frame[0].grabstate >= FRAME_DONE)	/* _DONE or _ERROR */
  		frmx = 0;
! 	else if (ov511->frame[1].grabstate >= FRAME_DONE)/* _DONE or _ERROR */
  		frmx = 1;
  
  	/* If nonblocking we return immediately */
! 	if (noblock && (frmx == -1))
! 		return -EAGAIN;
  
  	/* If no FRAME_DONE, look for a FRAME_GRABBING state. */
  	/* See if a frame is in process (grabbing), then use it. */
  	if (frmx == -1) {
! 		if (ov511->frame[0].grabstate == FRAME_GRABBING)
  			frmx = 0;
! 		else if (ov511->frame[1].grabstate == FRAME_GRABBING)
  			frmx = 1;
  	}
  
  	/* If no frame is active, start one. */
! 	if (frmx == -1)
! 		ov511_new_frame(ov511, frmx = 0);
  
! 	frame = &ov511->frame[frmx];
  
  restart:
! 	if (!ov511->dev)
! 		return -EIO;
  
  	/* Wait while we're grabbing the image */
  	PDEBUG(4, "Waiting image grabbing");
! 	while (frame->grabstate == FRAME_GRABBING) {
! 		interruptible_sleep_on(&ov511->frame[frmx].wq);
! 		if (signal_pending(current))
! 			return -EINTR;
! 	}
  	PDEBUG(4, "Got image, frame->grabstate = %d", frame->grabstate);
  
  	if (frame->grabstate == FRAME_ERROR) {
  		frame->bytes_read = 0;
! 		err("** ick! ** Errored frame %d", ov511->curframe);
! 		if (ov511_new_frame(ov511, frmx))
! 			err("read: ov511_new_frame error");
  		goto restart;
  	}
  
  
  	/* Repeat until we get a snapshot frame */
! 	if (ov511->snap_enabled)
! 		PDEBUG (4, "Waiting snapshot frame");
! 	if (ov511->snap_enabled && !frame->snapshot) {
  		frame->bytes_read = 0;
! 		if (ov511_new_frame(ov511, frmx))
! 			err("ov511_new_frame error");
  		goto restart;
  	}
  
  	/* Clear the snapshot */
! 	if (ov511->snap_enabled && frame->snapshot) {
  		frame->snapshot = 0;
! 		ov511_reg_write(ov511->dev, OV511_REG_SYSTEM_SNAPSHOT, 0x01);
! 		ov511_reg_write(ov511->dev, OV511_REG_SYSTEM_SNAPSHOT, 0x03);
! 		ov511_reg_write(ov511->dev, OV511_REG_SYSTEM_SNAPSHOT, 0x01);
  	}
  
! 	PDEBUG(4, "frmx=%d, bytes_read=%ld, scanlength=%ld", frmx,
! 		frame->bytes_read, frame->scanlength);
  
  	/* copy bytes to user space; we allow for partials reads */
! //	if ((count + frame->bytes_read) > frame->scanlength)
  //		count = frame->scanlength - frame->bytes_read;
  
  	/* FIXME - count hardwired to be one frame... */
! 	count = frame->width * frame->height * (frame->depth >> 3);
  
  	PDEBUG(4, "Copy to user space: %ld bytes", count);
  	if ((i = copy_to_user(buf, frame->data + frame->bytes_read, count))) {
  		PDEBUG(4, "Copy failed! %d bytes not copied", i);
! 		return -EFAULT;
  	}
  
  	frame->bytes_read += count;
  	PDEBUG(4, "{copy} count used=%ld, new bytes_read=%ld",
  		count, frame->bytes_read);
  
! 	if (frame->bytes_read >= frame->scanlength) { /* All data has been read */
  		frame->bytes_read = 0;
  
  		/* Mark it as available to be used again. */
! 		ov511->frame[frmx].grabstate = FRAME_UNUSED;
! 		if (ov511_new_frame(ov511, !frmx))
! 			err("ov511_new_frame returned error");
  	}
  
  	PDEBUG(4, "read finished, returning %ld (sweet)", count);
  
  	return count;
  }
  
! static int ov511_mmap(struct video_device *dev, const char *adr,
! 	unsigned long size)
  {
+ 	struct usb_ov511 *ov511 = (struct usb_ov511 *)dev;
  	unsigned long start = (unsigned long)adr;
  	unsigned long page, pos;
  
! 	if (ov511->dev == NULL)
  		return -EIO;
  
  	PDEBUG(4, "mmap: %ld (%lX) bytes", size, size);
  
! 	if (size > (((OV511_NUMFRAMES * MAX_DATA_SIZE) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)))
  		return -EINVAL;
  
! 	pos = (unsigned long)ov511->fbuf;
  	while (size > 0) {
  		page = kvirt_to_pa(pos);
! 		if (remap_page_range(start, page, PAGE_SIZE, PAGE_SHARED))
  			return -EAGAIN;
  		start += PAGE_SIZE;
  		pos += PAGE_SIZE;
  		if (size > PAGE_SIZE)
***************
*** 5247,5496 ****
  			size = 0;
  	}
  
- 	up(&ov->lock);
  	return 0;
  }
  
! static struct video_device vdev_template = {
! 	owner:		THIS_MODULE,
  	name:		"OV511 USB Camera",
  	type:		VID_TYPE_CAPTURE,
  	hardware:	VID_HARDWARE_OV511,
! 	open:		ov51x_v4l1_open,
! 	close:		ov51x_v4l1_close,
! 	read:		ov51x_v4l1_read,
! 	ioctl:		ov51x_v4l1_ioctl,
! 	mmap:		ov51x_v4l1_mmap,
  };
  
- #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
- static int
- ov51x_control_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
- 		    unsigned long ularg)
- {
- 	struct proc_dir_entry *pde = inode->u.generic_ip;
- 	struct usb_ov511 *ov;
- 	void *arg = (void *) ularg;
- 	int rc;
- 
- 	if (!pde)
- 		return -ENOENT;
- 
- 	ov = pde->data;
- 	if (!ov)
- 		return -ENODEV;
- 
- 	if (!ov->dev)
- 		return -EIO;
- 
- 	/* Should we pass through standard V4L IOCTLs? */
- 
- 	switch (cmd) {
- 	case OV511IOC_GINTVER:
- 	{
- 		int ver = OV511_INTERFACE_VER;
- 
- 		PDEBUG(4, "Get interface version: %d", ver);
- 		if (copy_to_user(arg, &ver, sizeof(ver)))
- 			return -EFAULT;
- 
- 		return 0;
- 	}
- 	case OV511IOC_GUSHORT:
- 	{
- 		struct ov511_ushort_opt opt;
- 
- 		if (copy_from_user(&opt, arg, sizeof(opt)))
- 			return -EFAULT;
- 
- 		switch (opt.optnum) {
- 		case OV511_USOPT_BRIGHT:
- 			rc = sensor_get_brightness(ov, &(opt.val));
- 			if (rc)	return rc;
- 			break;
- 		case OV511_USOPT_SAT:
- 			rc = sensor_get_saturation(ov, &(opt.val));
- 			if (rc)	return rc;
- 			break;
- 		case OV511_USOPT_HUE:
- 			rc = sensor_get_hue(ov, &(opt.val));
- 			if (rc)	return rc;
- 			break;
- 		case OV511_USOPT_CONTRAST:
- 			rc = sensor_get_contrast(ov, &(opt.val));
- 			if (rc)	return rc;
- 			break;
- 		default:
- 			err("Invalid get short option number");
- 			return -EINVAL;
- 		}
- 
- 		if (copy_to_user(arg, &opt, sizeof(opt)))
- 			return -EFAULT;
- 
- 		return 0;
- 	}
- 	case OV511IOC_SUSHORT:
- 	{
- 		struct ov511_ushort_opt opt;
- 
- 		if (copy_from_user(&opt, arg, sizeof(opt)))
- 			return -EFAULT;
- 
- 		switch (opt.optnum) {
- 		case OV511_USOPT_BRIGHT:
- 			rc = sensor_set_brightness(ov, opt.val);
- 			if (rc)	return rc;
- 			break;
- 		case OV511_USOPT_SAT:
- 			rc = sensor_set_saturation(ov, opt.val);
- 			if (rc)	return rc;
- 			break;
- 		case OV511_USOPT_HUE:
- 			rc = sensor_set_hue(ov, opt.val);
- 			if (rc)	return rc;
- 			break;
- 		case OV511_USOPT_CONTRAST:
- 			rc = sensor_set_contrast(ov, opt.val);
- 			if (rc)	return rc;
- 			break;
- 		default:
- 			err("Invalid set short option number");
- 			return -EINVAL;
- 		}
- 
- 		return 0;
- 	}
- 	case OV511IOC_GUINT:
- 	{
- 		struct ov511_uint_opt opt;
- 
- 		if (copy_from_user(&opt, arg, sizeof(opt)))
- 			return -EFAULT;
- 
- 		switch (opt.optnum) {
- 		case OV511_UIOPT_POWER_FREQ:
- 			opt.val = ov->lightfreq;
- 			break;
- 		case OV511_UIOPT_BFILTER:
- 			opt.val = ov->bandfilt;
- 			break;
- 		case OV511_UIOPT_LED:
- 			opt.val = ov->led_policy;
- 			break;
- 		case OV511_UIOPT_DEBUG:
- 			opt.val = debug;
- 			break;
- 		case OV511_UIOPT_COMPRESS:
- 			opt.val = ov->compress;
- 			break;
- 		default:
- 			err("Invalid get int option number");
- 			return -EINVAL;
- 		}
- 
- 		if (copy_to_user(arg, &opt, sizeof(opt)))
- 			return -EFAULT;
- 
- 		return 0;
- 	}
- 	case OV511IOC_SUINT:
- 	{
- 		struct ov511_uint_opt opt;
- 
- 		if (copy_from_user(&opt, arg, sizeof(opt)))
- 			return -EFAULT;
- 
- 		switch (opt.optnum) {
- 		case OV511_UIOPT_POWER_FREQ:
- 			rc = sensor_set_light_freq(ov, opt.val);
- 			if (rc)	return rc;
- 			break;
- 		case OV511_UIOPT_BFILTER:
- 			rc = sensor_set_banding_filter(ov, opt.val);
- 			if (rc)	return rc;
- 			break;
- 		case OV511_UIOPT_LED:
- 			if (opt.val <= 2) {
- 				ov->led_policy = opt.val;
- 				if (ov->led_policy == LED_OFF)
- 					ov51x_led_control(ov, 0);
- 				else if (ov->led_policy == LED_ON)
- 					ov51x_led_control(ov, 1);
- 			} else {
- 				return -EINVAL;
- 			}
- 			break;
- 		case OV511_UIOPT_DEBUG:
- 			if (opt.val <= 5)
- 				debug = opt.val;
- 			else
- 				return -EINVAL;
- 			break;
- 		case OV511_UIOPT_COMPRESS:
- 			ov->compress = opt.val;
- 			if (ov->compress) {
- 				if (ov->bclass == BCL_OV511)
- 					ov511_init_compression(ov);
- 				else if (ov->bclass == BCL_OV518)
- 					ov518_init_compression(ov);
- 			}
- 			break;
- 		default:
- 			err("Invalid get int option number");
- 			return -EINVAL;
- 		}
- 
- 		return 0;
- 	}
- 	case OV511IOC_WI2C:
- 	{
- 		struct ov511_i2c_struct w;
- 
- 		if (copy_from_user(&w, arg, sizeof(w)))
- 			return -EFAULT;
- 
- 		return i2c_w_slave(ov, w.slave, w.reg, w.value,
- 			w.mask);
- 	}
- 	case OV511IOC_RI2C:
- 	{
- 		struct ov511_i2c_struct r;
- 
- 		if (copy_from_user(&r, arg, sizeof(r)))
- 			return -EFAULT;
- 
- 		rc = i2c_r_slave(ov, r.slave, r.reg);
- 		if (rc < 0)
- 			return rc;
- 
- 		r.value = rc;
- 
- 		if (copy_to_user(arg, &r, sizeof(r)))
- 			return -EFAULT;
- 
- 		return 0;
- 	}
- 	default:
- 		return -EINVAL;
- 	} /* end switch */
- 
- 	return 0;
- }
- #endif
- 
  /****************************************************************************
   *
!  * OV511 and sensor configuration
   *
   ***************************************************************************/
  
! /* This initializes the OV7610, OV7620, or OV76BE sensor. The OV76BE uses
!  * the same register settings as the OV7610, since they are very similar.
!  */
! static int
! ov7xx0_configure(struct usb_ov511 *ov)
  {
  	int i, success;
  	int rc;
  
--- 2779,2809 ----
  			size = 0;
  	}
  
  	return 0;
  }
  
! static struct video_device ov511_template = {
  	name:		"OV511 USB Camera",
  	type:		VID_TYPE_CAPTURE,
  	hardware:	VID_HARDWARE_OV511,
! 	open:		ov511_open,
! 	close:		ov511_close,
! 	read:		ov511_read,
! 	write:		ov511_write,
! 	ioctl:		ov511_ioctl,
! 	mmap:		ov511_mmap,
! 	initialize:	ov511_init_done,
  };
  
  /****************************************************************************
   *
!  * OV511/OV7610 configuration
   *
   ***************************************************************************/
  
! static int ov76xx_configure(struct usb_ov511 *ov511)
  {
+ 	struct usb_device *dev = ov511->dev;
  	int i, success;
  	int rc;
  
***************
*** 5519,5529 ****
  		{ OV511_I2C_BUS, 0x23, 0x2a },
  		{ OV511_I2C_BUS, 0x24, 0x10 },
  		{ OV511_I2C_BUS, 0x25, 0x8a },
- 		{ OV511_I2C_BUS, 0x26, 0xa2 },
  		{ OV511_I2C_BUS, 0x27, 0xc2 },
  		{ OV511_I2C_BUS, 0x2a, 0x04 },
  		{ OV511_I2C_BUS, 0x2c, 0xfe },
- 		{ OV511_I2C_BUS, 0x2d, 0x93 },
  		{ OV511_I2C_BUS, 0x30, 0x71 },
  		{ OV511_I2C_BUS, 0x31, 0x60 },
  		{ OV511_I2C_BUS, 0x32, 0x26 },
--- 2832,2840 ----
***************
*** 5537,5629 ****
  	};
  
  	static struct ov511_regvals aRegvalsNorm7620[] = {
! 		{ OV511_I2C_BUS, 0x00, 0x00 },
! 		{ OV511_I2C_BUS, 0x01, 0x80 },
! 		{ OV511_I2C_BUS, 0x02, 0x80 },
! 		{ OV511_I2C_BUS, 0x03, 0xc0 },
! 		{ OV511_I2C_BUS, 0x06, 0x60 },
! 		{ OV511_I2C_BUS, 0x07, 0x00 },
! 		{ OV511_I2C_BUS, 0x0c, 0x24 },
! 		{ OV511_I2C_BUS, 0x0c, 0x24 },
! 		{ OV511_I2C_BUS, 0x0d, 0x24 },
! 		{ OV511_I2C_BUS, 0x11, 0x01 },
! 		{ OV511_I2C_BUS, 0x12, 0x24 },
! 		{ OV511_I2C_BUS, 0x13, 0x01 },
! 		{ OV511_I2C_BUS, 0x14, 0x84 },
  		{ OV511_I2C_BUS, 0x15, 0x01 },
- 		{ OV511_I2C_BUS, 0x16, 0x03 },
- 		{ OV511_I2C_BUS, 0x17, 0x2f },
- 		{ OV511_I2C_BUS, 0x18, 0xcf },
- 		{ OV511_I2C_BUS, 0x19, 0x06 },
- 		{ OV511_I2C_BUS, 0x1a, 0xf5 },
- 		{ OV511_I2C_BUS, 0x1b, 0x00 },
- 		{ OV511_I2C_BUS, 0x20, 0x18 },
- 		{ OV511_I2C_BUS, 0x21, 0x80 },
- 		{ OV511_I2C_BUS, 0x22, 0x80 },
  		{ OV511_I2C_BUS, 0x23, 0x00 },
! 		{ OV511_I2C_BUS, 0x26, 0xa2 },
! 		{ OV511_I2C_BUS, 0x27, 0xea },
! 		{ OV511_I2C_BUS, 0x28, 0x20 },
! 		{ OV511_I2C_BUS, 0x29, 0x00 },
! 		{ OV511_I2C_BUS, 0x2a, 0x10 },
! 		{ OV511_I2C_BUS, 0x2b, 0x00 },
! 		{ OV511_I2C_BUS, 0x2c, 0x88 },
! 		{ OV511_I2C_BUS, 0x2d, 0x91 },
! 		{ OV511_I2C_BUS, 0x2e, 0x80 },
! 		{ OV511_I2C_BUS, 0x2f, 0x44 },
! 		{ OV511_I2C_BUS, 0x60, 0x27 },
! 		{ OV511_I2C_BUS, 0x61, 0x02 },
! 		{ OV511_I2C_BUS, 0x62, 0x5f },
! 		{ OV511_I2C_BUS, 0x63, 0xd5 },
! 		{ OV511_I2C_BUS, 0x64, 0x57 },
! 		{ OV511_I2C_BUS, 0x65, 0x83 },
! 		{ OV511_I2C_BUS, 0x66, 0x55 },
! 		{ OV511_I2C_BUS, 0x67, 0x92 },
! 		{ OV511_I2C_BUS, 0x68, 0xcf },
! 		{ OV511_I2C_BUS, 0x69, 0x76 },
! 		{ OV511_I2C_BUS, 0x6a, 0x22 },
! 		{ OV511_I2C_BUS, 0x6b, 0x00 },
! 		{ OV511_I2C_BUS, 0x6c, 0x02 },
! 		{ OV511_I2C_BUS, 0x6d, 0x44 },
! 		{ OV511_I2C_BUS, 0x6e, 0x80 },
! 		{ OV511_I2C_BUS, 0x6f, 0x1d },
! 		{ OV511_I2C_BUS, 0x70, 0x8b },
! 		{ OV511_I2C_BUS, 0x71, 0x00 },
! 		{ OV511_I2C_BUS, 0x72, 0x14 },
! 		{ OV511_I2C_BUS, 0x73, 0x54 },
! 		{ OV511_I2C_BUS, 0x74, 0x00 },
! 		{ OV511_I2C_BUS, 0x75, 0x8e },
! 		{ OV511_I2C_BUS, 0x76, 0x00 },
! 		{ OV511_I2C_BUS, 0x77, 0xff },
! 		{ OV511_I2C_BUS, 0x78, 0x80 },
! 		{ OV511_I2C_BUS, 0x79, 0x80 },
! 		{ OV511_I2C_BUS, 0x7a, 0x80 },
! 		{ OV511_I2C_BUS, 0x7b, 0xe2 },
! 		{ OV511_I2C_BUS, 0x7c, 0x00 },
  		{ OV511_DONE_BUS, 0x0, 0x00 },
  	};
  
! 	PDEBUG(4, "starting configuration");
  
  	/* This looks redundant, but is necessary for WebCam 3 */
! 	ov->primary_i2c_slave = OV7xx0_SID;
! 	if (ov51x_set_slave_ids(ov, OV7xx0_SID) < 0)
  		return -1;
  
! 	if (init_ov_sensor(ov) >= 0) {
! 		PDEBUG(1, "OV7xx0 sensor initalized (method 1)");
  	} else {
  		/* Reset the 76xx */
! 		if (i2c_w(ov, 0x12, 0x80) < 0) return -1;
  
  		/* Wait for it to initialize */
! 		schedule_timeout(1 + 150 * HZ / 1000);
  
  		i = 0;
  		success = 0;
  		while (i <= i2c_detect_tries) {
! 			if ((i2c_r(ov, OV7610_REG_ID_HIGH) == 0x7F) &&
! 			    (i2c_r(ov, OV7610_REG_ID_LOW) == 0xA2)) {
  				success = 1;
  				break;
  			} else {
--- 2848,2928 ----
  	};
  
  	static struct ov511_regvals aRegvalsNorm7620[] = {
! 		{ OV511_I2C_BUS, 0x10, 0xff },
! 		{ OV511_I2C_BUS, 0x16, 0x06 },
! 		{ OV511_I2C_BUS, 0x28, 0x24 },
! 		{ OV511_I2C_BUS, 0x2b, 0xac },
! 		{ OV511_I2C_BUS, 0x12, 0x00 },
! 		{ OV511_I2C_BUS, 0x28, 0x24 },
! 		{ OV511_I2C_BUS, 0x0f, 0x85 },	/* lg's setting */
  		{ OV511_I2C_BUS, 0x15, 0x01 },
  		{ OV511_I2C_BUS, 0x23, 0x00 },
! 		{ OV511_I2C_BUS, 0x24, 0x10 },
! 		{ OV511_I2C_BUS, 0x25, 0x8a },
! 		{ OV511_I2C_BUS, 0x27, 0xe2 },
! 		{ OV511_I2C_BUS, 0x2a, 0x00 },
! 		{ OV511_I2C_BUS, 0x2c, 0xfe },
! 		{ OV511_I2C_BUS, 0x30, 0x71 },
! 		{ OV511_I2C_BUS, 0x31, 0x60 },
! 		{ OV511_I2C_BUS, 0x32, 0x26 },
! 		{ OV511_I2C_BUS, 0x33, 0x20 },
! 		{ OV511_I2C_BUS, 0x34, 0x48 },
! 		{ OV511_I2C_BUS, 0x12, 0x24 },
! 		{ OV511_I2C_BUS, 0x11, 0x01 },
! 		{ OV511_I2C_BUS, 0x0c, 0x24 },
! 		{ OV511_I2C_BUS, 0x0d, 0x24 },
  		{ OV511_DONE_BUS, 0x0, 0x00 },
  	};
  
! 	PDEBUG (4, "starting configuration");
  
  	/* This looks redundant, but is necessary for WebCam 3 */
! 	if (ov511_reg_write(dev, OV511_REG_I2C_SLAVE_ID_WRITE,
! 	                    OV7610_I2C_WRITE_ID) < 0)
! 		return -1;
! 
! 	if (ov511_reg_write(dev, OV511_REG_I2C_SLAVE_ID_READ,
! 	                    OV7610_I2C_READ_ID) < 0)
  		return -1;
  
! 	if (ov511_reset(dev, OV511_RESET_NOREGS) < 0)
! 		return -1;
! 
! 	/* Reset the 76xx */ 
! 	if (ov511_i2c_write(dev, 0x12, 0x80) < 0) return -1;
! 
! 	/* Wait for it to initialize */ 
! 	schedule_timeout (1 + 150 * HZ / 1000);
! 
! 	for (i = 0, success = 0; i < i2c_detect_tries && !success; i++) {
! 		if ((ov511_i2c_read(dev, OV7610_REG_ID_HIGH) == 0x7F) &&
! 		    (ov511_i2c_read(dev, OV7610_REG_ID_LOW) == 0xA2)) {
! 			success = 1;
! 			continue;
! 		}
! 
! 		/* Reset the 76xx */ 
! 		if (ov511_i2c_write(dev, 0x12, 0x80) < 0) return -1;
! 		/* Wait for it to initialize */ 
! 		schedule_timeout (1 + 150 * HZ / 1000);
! 		/* Dummy read to sync I2C */
! 		if (ov511_i2c_read(dev, 0x00) < 0) return -1;
! 	}
! 
! 	if (success) {
! 		PDEBUG(1, "I2C synced in %d attempt(s) (method 1)", i);
  	} else {
  		/* Reset the 76xx */
! 		if (ov511_i2c_write(dev, 0x12, 0x80) < 0) return -1;
  
  		/* Wait for it to initialize */
! 		schedule_timeout (1 + 150 * HZ / 1000);
  
  		i = 0;
  		success = 0;
  		while (i <= i2c_detect_tries) {
! 			if ((ov511_i2c_read(dev, OV7610_REG_ID_HIGH) == 0x7F) &&
! 			    (ov511_i2c_read(dev, OV7610_REG_ID_LOW) == 0xA2)) {
  				success = 1;
  				break;
  			} else {
***************
*** 5631,6355 ****
  			}
  		}
  
! // Was (i == i2c_detect_tries) previously. This obviously used to always report
! // success. Whether anyone actually depended on that bug is unknown
! 		if ((i >= i2c_detect_tries) && (success == 0)) {
! 			err("Failed to read sensor ID. You might not have an");
! 			err("OV7610/20, or it may be not responding. Report");
! 			err("this to " EMAIL);
! 			err("This is only a warning. You can attempt to use");
! 			err("your camera anyway");
! // Only issue a warning for now
! //			return -1;
  		} else {
! 			PDEBUG(1, "OV7xx0 initialized (method 2, %dx)", i+1);
  		}
  	}
  
! 	/* Detect sensor (sub)type */
! 	rc = i2c_r(ov, OV7610_REG_COM_I);
  
! 	if (rc < 0) {
! 		err("Error detecting sensor type");
! 		return -1;
! 	} else if ((rc & 3) == 3) {
! 		info("Sensor is an OV7610");
! 		ov->sensor = SEN_OV7610;
! 	} else if ((rc & 3) == 1) {
! 		/* I don't know what's different about the 76BE yet. */
! 		if (i2c_r(ov, 0x15) & 1) {
  			info("Sensor is an OV7620AE");
! 			info("PLEASE REPORT THE EXISTENCE OF THIS SENSOR TO");
! 			info("THE DRIVER AUTHOR");
! 		} else {
! 			info("Sensor is an OV76BE");
! 		}
! 
! 		/* OV511+ will return all zero isoc data unless we
! 		 * configure the sensor as a 7620. Someone needs to
! 		 * find the exact reg. setting that causes this. */
! 		if (ov->bridge == BRG_OV511PLUS) {
! 			info("Enabling 511+/76BE workaround");
! 			ov->sensor = SEN_OV7620;
  		} else {
! 			ov->sensor = SEN_OV76BE;
  		}
! 	} else if ((rc & 3) == 0) {
! 		info("Sensor is an OV7620");
! 		ov->sensor = SEN_OV7620;
! 	} else {
! 		err("Unknown image sensor version: %d", rc & 3);
! 		return -1;
  	}
  
! 	if (ov->sensor == SEN_OV7620) {
  		PDEBUG(4, "Writing 7620 registers");
! 		if (write_regvals(ov, aRegvalsNorm7620))
  			return -1;
  	} else {
  		PDEBUG(4, "Writing 7610 registers");
! 		if (write_regvals(ov, aRegvalsNorm7610))
  			return -1;
  	}
  
! 	/* Set sensor-specific vars */
! 	ov->maxwidth = 640;
! 	ov->maxheight = 480;
! 	ov->minwidth = 64;
! 	ov->minheight = 48;
! 
! 	// FIXME: These do not match the actual settings yet
! 	ov->brightness = 0x80 << 8;
! 	ov->contrast = 0x80 << 8;
! 	ov->colour = 0x80 << 8;
! 	ov->hue = 0x80 << 8;
  
  	return 0;
  }
  
! /* This initializes the OV6620, OV6630, OV6630AE, or OV6630AF sensor. */
! static int
! ov6xx0_configure(struct usb_ov511 *ov)
  {
! 	int rc;
  
  	static struct ov511_regvals aRegvalsNorm6x20[] = {
! 		{ OV511_I2C_BUS, 0x12, 0x80 }, /* reset */
  		{ OV511_I2C_BUS, 0x11, 0x01 },
! 		{ OV511_I2C_BUS, 0x03, 0x60 },
! 		{ OV511_I2C_BUS, 0x05, 0x7f }, /* For when autoadjust is off */
  		{ OV511_I2C_BUS, 0x07, 0xa8 },
- 		/* The ratio of 0x0c and 0x0d  controls the white point */
  		{ OV511_I2C_BUS, 0x0c, 0x24 },
  		{ OV511_I2C_BUS, 0x0d, 0x24 },
! 		{ OV511_I2C_BUS, 0x0f, 0x15 }, /* COMS */
! 		{ OV511_I2C_BUS, 0x10, 0x75 }, /* AEC Exposure time */
! 		{ OV511_I2C_BUS, 0x12, 0x24 }, /* Enable AGC */
  		{ OV511_I2C_BUS, 0x14, 0x04 },
! 		/* 0x16: 0x06 helps frame stability with moving objects */
! 		{ OV511_I2C_BUS, 0x16, 0x06 },
! //		{ OV511_I2C_BUS, 0x20, 0x30 }, /* Aperture correction enable */
! 		{ OV511_I2C_BUS, 0x26, 0xb2 }, /* BLC enable */
! 		/* 0x28: 0x05 Selects RGB format if RGB on */
! 		{ OV511_I2C_BUS, 0x28, 0x05 },
! 		{ OV511_I2C_BUS, 0x2a, 0x04 }, /* Disable framerate adjust */
! //		{ OV511_I2C_BUS, 0x2b, 0xac }, /* Framerate; Set 2a[7] first */
! 		{ OV511_I2C_BUS, 0x2d, 0x99 },
! 		{ OV511_I2C_BUS, 0x33, 0xa0 }, /* Color Procesing Parameter */
! 		{ OV511_I2C_BUS, 0x34, 0xd2 }, /* Max A/D range */
  		{ OV511_I2C_BUS, 0x38, 0x8b },
! 		{ OV511_I2C_BUS, 0x39, 0x40 },
! 
! 		{ OV511_I2C_BUS, 0x3c, 0x39 }, /* Enable AEC mode changing */
! 		{ OV511_I2C_BUS, 0x3c, 0x3c }, /* Change AEC mode */
! 		{ OV511_I2C_BUS, 0x3c, 0x24 }, /* Disable AEC mode changing */
! 
  		{ OV511_I2C_BUS, 0x3d, 0x80 },
! 		/* These next two registers (0x4a, 0x4b) are undocumented. They
! 		 * control the color balance */
! 		{ OV511_I2C_BUS, 0x4a, 0x80 },
! 		{ OV511_I2C_BUS, 0x4b, 0x80 },
! 		{ OV511_I2C_BUS, 0x4d, 0xd2 }, /* This reduces noise a bit */
  		{ OV511_I2C_BUS, 0x4e, 0xc1 },
  		{ OV511_I2C_BUS, 0x4f, 0x04 },
- // Do 50-53 have any effect?
- // Toggle 0x12[2] off and on here?
- 		{ OV511_DONE_BUS, 0x0, 0x00 },
- 	};
- 
- 	/* This chip is undocumented so many of these are guesses. OK=verified,
- 	 * A=Added since 6620, U=unknown function (not a 6620 reg) */
- 	static struct ov511_regvals aRegvalsNorm6x30[] = {
- 	/*OK*/	{ OV511_I2C_BUS, 0x12, 0x80 }, /* reset */
- 	/*00?*/	{ OV511_I2C_BUS, 0x11, 0x01 },
- 	/*OK*/	{ OV511_I2C_BUS, 0x03, 0x60 },
- 	/*0A?*/	{ OV511_I2C_BUS, 0x05, 0x7f }, /* For when autoadjust is off */
- 		{ OV511_I2C_BUS, 0x07, 0xa8 },
- 		/* The ratio of 0x0c and 0x0d  controls the white point */
- 	/*OK*/	{ OV511_I2C_BUS, 0x0c, 0x24 },
- 	/*OK*/	{ OV511_I2C_BUS, 0x0d, 0x24 },
- 	/*A*/	{ OV511_I2C_BUS, 0x0e, 0x20 },
- 
- //	/*24?*/	{ OV511_I2C_BUS, 0x12, 0x28 }, /* Enable AGC */
- //		{ OV511_I2C_BUS, 0x12, 0x24 }, /* Enable AGC */
- 
- //	/*A*/	{ OV511_I2C_BUS, 0x13, 0x21 },
- //	/*A*/	{ OV511_I2C_BUS, 0x13, 0x25 }, /* Tristate Y and UV busses */
- 
- //	/*04?*/	{ OV511_I2C_BUS, 0x14, 0x80 },
- 		/* 0x16: 0x06 helps frame stability with moving objects */
- 	/*03?*/	{ OV511_I2C_BUS, 0x16, 0x06 },
- //	/*OK*/	{ OV511_I2C_BUS, 0x20, 0x30 }, /* Aperture correction enable */
- 		// 21 & 22? The suggested values look wrong. Go with default
- 	/*A*/	{ OV511_I2C_BUS, 0x23, 0xc0 },
- 	/*A*/	{ OV511_I2C_BUS, 0x25, 0x9a }, // Check this against default
- //	/*OK*/	{ OV511_I2C_BUS, 0x26, 0xb2 }, /* BLC enable */
- 
- 		/* 0x28: 0x05 Selects RGB format if RGB on */
- //	/*04?*/	{ OV511_I2C_BUS, 0x28, 0x05 },
- //	/*04?*/	{ OV511_I2C_BUS, 0x28, 0x45 }, // DEBUG: Tristate UV bus
- 
- 	/*OK*/	{ OV511_I2C_BUS, 0x2a, 0x04 }, /* Disable framerate adjust */
- //	/*OK*/	{ OV511_I2C_BUS, 0x2b, 0xac }, /* Framerate; Set 2a[7] first */
- //	/*U*/	{ OV511_I2C_BUS, 0x2c, 0xa0 },
- 		{ OV511_I2C_BUS, 0x2d, 0x99 },
- //	/*A*/	{ OV511_I2C_BUS, 0x33, 0x26 }, // Reserved bits on 6620
- //	/*d2?*/	{ OV511_I2C_BUS, 0x34, 0x03 }, /* Max A/D range */
- //	/*U*/	{ OV511_I2C_BUS, 0x36, 0x8f }, // May not be necessary
- //	/*U*/	{ OV511_I2C_BUS, 0x37, 0x80 }, // May not be necessary
- //	/*8b?*/	{ OV511_I2C_BUS, 0x38, 0x83 },
- //	/*40?*/	{ OV511_I2C_BUS, 0x39, 0xc0 }, // 6630 adds bit 7
- //		{ OV511_I2C_BUS, 0x3c, 0x39 }, /* Enable AEC mode changing */
- //		{ OV511_I2C_BUS, 0x3c, 0x3c }, /* Change AEC mode */
- //		{ OV511_I2C_BUS, 0x3c, 0x24 }, /* Disable AEC mode changing */
- 	/*OK*/	{ OV511_I2C_BUS, 0x3d, 0x80 },
- //	/*A*/	{ OV511_I2C_BUS, 0x3f, 0x0e },
- //	/*U*/	{ OV511_I2C_BUS, 0x40, 0x00 },
- //	/*U*/	{ OV511_I2C_BUS, 0x41, 0x00 },
- //	/*U*/	{ OV511_I2C_BUS, 0x42, 0x80 },
- //	/*U*/	{ OV511_I2C_BUS, 0x43, 0x3f },
- //	/*U*/	{ OV511_I2C_BUS, 0x44, 0x80 },
- //	/*U*/	{ OV511_I2C_BUS, 0x45, 0x20 },
- //	/*U*/	{ OV511_I2C_BUS, 0x46, 0x20 },
- //	/*U*/	{ OV511_I2C_BUS, 0x47, 0x80 },
- //	/*U*/	{ OV511_I2C_BUS, 0x48, 0x7f },
- //	/*U*/	{ OV511_I2C_BUS, 0x49, 0x00 },
- 
- 		/* These next two registers (0x4a, 0x4b) are undocumented. They
- 		 * control the color balance */
- //	/*OK?*/	{ OV511_I2C_BUS, 0x4a, 0x80 }, // Check these
- //	/*OK?*/	{ OV511_I2C_BUS, 0x4b, 0x80 },
- //	/*U*/	{ OV511_I2C_BUS, 0x4c, 0xd0 },
- 	/*d2?*/	{ OV511_I2C_BUS, 0x4d, 0x10 }, /* This reduces noise a bit */
- 	/*c1?*/	{ OV511_I2C_BUS, 0x4e, 0x40 },
- 	/*04?*/	{ OV511_I2C_BUS, 0x4f, 0x07 },
- //	/*U*/	{ OV511_I2C_BUS, 0x50, 0xff },
- 	/*U*/	{ OV511_I2C_BUS, 0x54, 0x23 },
- //	/*U*/	{ OV511_I2C_BUS, 0x55, 0xff },
- //	/*U*/	{ OV511_I2C_BUS, 0x56, 0x12 },
- 	/*U*/	{ OV511_I2C_BUS, 0x57, 0x81 },
- //	/*U*/	{ OV511_I2C_BUS, 0x58, 0x75 },
- 	/*U*/	{ OV511_I2C_BUS, 0x59, 0x01 },
- 	/*U*/	{ OV511_I2C_BUS, 0x5a, 0x2c },
- 	/*U*/	{ OV511_I2C_BUS, 0x5b, 0x0f },
- //	/*U*/	{ OV511_I2C_BUS, 0x5c, 0x10 },
  		{ OV511_DONE_BUS, 0x0, 0x00 },
  	};
  
! 	PDEBUG(4, "starting sensor configuration");
  
! 	if (init_ov_sensor(ov) < 0) {
! 		err("Failed to read sensor ID. You might not have an OV6xx0,");
! 		err("or it may be not responding. Report this to " EMAIL);
! 		return -1;
! 	} else {
! 		PDEBUG(1, "OV6xx0 sensor detected");
! 	}
  
! 	/* Detect sensor (sub)type */
! 	rc = i2c_r(ov, OV7610_REG_COM_I);
  
! 	if (rc < 0) {
! 		err("Error detecting sensor type");
! 		return -1;
  	}
  
! 	if ((rc & 3) == 0)
! 		ov->sensor = SEN_OV6630;
! 	else if ((rc & 3) == 1)
! 		ov->sensor = SEN_OV6620;
! 	else if ((rc & 3) == 2)
! 		ov->sensor = SEN_OV6630;
! 	else if ((rc & 3) == 3)
! 		ov->sensor = SEN_OV6630;
! 
! 	info("Sensor is an %s", symbolic(senlist, ov->sensor));
! 
! 	/* Set sensor-specific vars */
! 	ov->maxwidth = 352;
! 	ov->maxheight = 288;
! 	ov->minwidth = 64;
! 	ov->minheight = 48;
! 
! 	// FIXME: These do not match the actual settings yet
! 	ov->brightness = 0x80 << 8;
! 	ov->contrast = 0x80 << 8;
! 	ov->colour = 0x80 << 8;
! 	ov->hue = 0x80 << 8;
! 
! 	if (ov->sensor == SEN_OV6620) {
! 		PDEBUG(4, "Writing 6x20 registers");
! 		if (write_regvals(ov, aRegvalsNorm6x20))
! 			return -1;
  	} else {
! 		PDEBUG(4, "Writing 6x30 registers");
! 		if (write_regvals(ov, aRegvalsNorm6x30))
! 			return -1;
! 	}
! 
! 	return 0;
! }
! 
! /* This initializes the KS0127 and KS0127B video decoders. */
! static int 
! ks0127_configure(struct usb_ov511 *ov)
! {
! 	int rc;
! 
! // FIXME: I don't know how to sync or reset it yet
! #if 0
! 	if (ov51x_init_ks_sensor(ov) < 0) {
! 		err("Failed to initialize the KS0127");
  		return -1;
- 	} else {
- 		PDEBUG(1, "KS012x(B) sensor detected");
  	}
- #endif
  
! 	/* Detect decoder subtype */
! 	rc = i2c_r(ov, 0x00);
! 	if (rc < 0) {
! 		err("Error detecting sensor type");
! 		return -1;
! 	} else if (rc & 0x08) {
! 		rc = i2c_r(ov, 0x3d);
  		if (rc < 0) {
  			err("Error detecting sensor type");
  			return -1;
! 		} else if ((rc & 0x0f) == 0) {
! 			info("Sensor is a KS0127");
! 			ov->sensor = SEN_KS0127;
! 		} else if ((rc & 0x0f) == 9) {
! 			info("Sensor is a KS0127B Rev. A");
! 			ov->sensor = SEN_KS0127B;
  		}
! 	} else {
! 		err("Error: Sensor is an unsupported KS0122");
! 		return -1;
  	}
  
  	/* Set sensor-specific vars */
! 	ov->maxwidth = 640;
! 	ov->maxheight = 480;
! 	ov->minwidth = 64;
! 	ov->minheight = 48;
! 
! 	// FIXME: These do not match the actual settings yet
! 	ov->brightness = 0x80 << 8;
! 	ov->contrast = 0x80 << 8;
! 	ov->colour = 0x80 << 8;
! 	ov->hue = 0x80 << 8;
! 
! 	/* This device is not supported yet. Bail out now... */
! 	err("This sensor is not supported yet.");
! 	return -1;
  
! 	return 0;
! }
! 
! /* This initializes the SAA7111A video decoder. */
! static int
! saa7111a_configure(struct usb_ov511 *ov)
! {
! 	int rc;
! 
! 	/* Since there is no register reset command, all registers must be
! 	 * written, otherwise gives erratic results */
! 	static struct ov511_regvals aRegvalsNormSAA7111A[] = {
! 		{ OV511_I2C_BUS, 0x06, 0xce },
! 		{ OV511_I2C_BUS, 0x07, 0x00 },
! 		{ OV511_I2C_BUS, 0x10, 0x44 }, /* YUV422, 240/286 lines */
! 		{ OV511_I2C_BUS, 0x0e, 0x01 }, /* NTSC M or PAL BGHI */
! 		{ OV511_I2C_BUS, 0x00, 0x00 },
! 		{ OV511_I2C_BUS, 0x01, 0x00 },
! 		{ OV511_I2C_BUS, 0x03, 0x23 },
! 		{ OV511_I2C_BUS, 0x04, 0x00 },
! 		{ OV511_I2C_BUS, 0x05, 0x00 },
! 		{ OV511_I2C_BUS, 0x08, 0xc8 }, /* Auto field freq */
! 		{ OV511_I2C_BUS, 0x09, 0x01 }, /* Chrom. trap off, APER=0.25 */
! 		{ OV511_I2C_BUS, 0x0a, 0x80 }, /* BRIG=128 */
! 		{ OV511_I2C_BUS, 0x0b, 0x40 }, /* CONT=1.0 */
! 		{ OV511_I2C_BUS, 0x0c, 0x40 }, /* SATN=1.0 */
! 		{ OV511_I2C_BUS, 0x0d, 0x00 }, /* HUE=0 */
! 		{ OV511_I2C_BUS, 0x0f, 0x00 },
! 		{ OV511_I2C_BUS, 0x11, 0x0c },
! 		{ OV511_I2C_BUS, 0x12, 0x00 },
! 		{ OV511_I2C_BUS, 0x13, 0x00 },
! 		{ OV511_I2C_BUS, 0x14, 0x00 },
! 		{ OV511_I2C_BUS, 0x15, 0x00 },
! 		{ OV511_I2C_BUS, 0x16, 0x00 },
! 		{ OV511_I2C_BUS, 0x17, 0x00 },
! 		{ OV511_I2C_BUS, 0x02, 0xc0 },	/* Composite input 0 */
! 		{ OV511_DONE_BUS, 0x0, 0x00 },
! 	};
! 
! // FIXME: I don't know how to sync or reset it yet
! #if 0
! 	if (ov51x_init_saa_sensor(ov) < 0) {
! 		err("Failed to initialize the SAA7111A");
  		return -1;
- 	} else {
- 		PDEBUG(1, "SAA7111A sensor detected");
- 	}
- #endif
  
! 	/* 640x480 not supported with PAL */
! 	if (ov->pal) {
! 		ov->maxwidth = 320;
! 		ov->maxheight = 240;		/* Even field only */
  	} else {
! 		ov->maxwidth = 640;
! 		ov->maxheight = 480;		/* Even/Odd fields */
! 	}
! 
! 	ov->minwidth = 320;
! 	ov->minheight = 240;		/* Even field only */
! 
! 	ov->has_decoder = 1;
! 	ov->num_inputs = 8;
! 	ov->norm = VIDEO_MODE_AUTO;
! 	ov->stop_during_set = 0;	/* Decoder guarantees stable image */
! 
! 	/* Decoder doesn't change these values, so we use these instead of
! 	 * acutally reading the registers (which doesn't work) */
! 	ov->brightness = 0x80 << 8;
! 	ov->contrast = 0x40 << 9;
! 	ov->colour = 0x40 << 9;
! 	ov->hue = 32768;
! 
! 	PDEBUG(4, "Writing SAA7111A registers");
! 	if (write_regvals(ov, aRegvalsNormSAA7111A))
! 		return -1;
! 
! 	/* Detect version of decoder. This must be done after writing the
!          * initial regs or the decoder will lock up. */
! 	rc = i2c_r(ov, 0x00);
! 
! 	if (rc < 0) {
! 		err("Error detecting sensor version");
  		return -1;
- 	} else {
- 		info("Sensor is an SAA7111A (version 0x%x)", rc);
- 		ov->sensor = SEN_SAA7111A;
- 	}
- 
- 	// FIXME: Fix this for OV518(+)
- 	/* Latch to negative edge of clock. Otherwise, we get incorrect
- 	 * colors and jitter in the digital signal. */
- 	if (ov->bclass == BCL_OV511)
- 		reg_w(ov, 0x11, 0x00);
- 	else
- 		warn("SAA7111A not yet supported with OV518/OV518+");
- 
- 	return 0;
- }
- 
- /* This initializes the OV511/OV511+ and the sensor */
- static int 
- ov511_configure(struct usb_ov511 *ov)
- {
- 	static struct ov511_regvals aRegvalsInit511[] = {
- 		{ OV511_REG_BUS, R51x_SYS_RESET,	0x7f },
- 	 	{ OV511_REG_BUS, R51x_SYS_INIT,		0x01 },
- 	 	{ OV511_REG_BUS, R51x_SYS_RESET,	0x7f },
- 		{ OV511_REG_BUS, R51x_SYS_INIT,		0x01 },
- 		{ OV511_REG_BUS, R51x_SYS_RESET,	0x3f },
- 		{ OV511_REG_BUS, R51x_SYS_INIT,		0x01 },
- 		{ OV511_REG_BUS, R51x_SYS_RESET,	0x3d },
- 		{ OV511_DONE_BUS, 0x0, 0x00},
- 	};
- 
- 	static struct ov511_regvals aRegvalsNorm511[] = {
- 		{ OV511_REG_BUS, R511_DRAM_FLOW_CTL, 	0x01 },
- 		{ OV511_REG_BUS, R51x_SYS_SNAP,		0x01 },
- 		{ OV511_REG_BUS, R51x_SYS_SNAP,		0x03 },
- 		{ OV511_REG_BUS, R51x_SYS_SNAP,		0x01 },
- 		{ OV511_REG_BUS, R511_FIFO_OPTS,	0x1f },
- 		{ OV511_REG_BUS, R511_COMP_EN,		0x00 },
- 		{ OV511_REG_BUS, R511_COMP_LUT_EN,	0x03 },
- 		{ OV511_DONE_BUS, 0x0, 0x00 },
- 	};
- 
- 	static struct ov511_regvals aRegvalsNorm511Plus[] = {
- 		{ OV511_REG_BUS, R511_DRAM_FLOW_CTL,	0xff },
- 		{ OV511_REG_BUS, R51x_SYS_SNAP,		0x01 },
- 		{ OV511_REG_BUS, R51x_SYS_SNAP,		0x03 },
- 		{ OV511_REG_BUS, R51x_SYS_SNAP,		0x01 },
- 		{ OV511_REG_BUS, R511_FIFO_OPTS,	0xff },
- 		{ OV511_REG_BUS, R511_COMP_EN,		0x00 },
- 		{ OV511_REG_BUS, R511_COMP_LUT_EN,	0x03 },
- 		{ OV511_DONE_BUS, 0x0, 0x00 },
- 	};
- 
- 	PDEBUG(4, "");
- 
- 	ov->customid = reg_r(ov, R511_SYS_CUST_ID);
- 	if (ov->customid < 0) {
- 		err("Unable to read camera bridge registers");
- 		goto error;
- 	}
- 
- 	PDEBUG (1, "CustomID = %d", ov->customid);
- 	ov->desc = symbolic(camlist, ov->customid);
- 	info("model: %s", ov->desc);
- 
- 	if (0 == strcmp(ov->desc, NOT_DEFINED_STR)) {
- 		err("Camera type (%d) not recognized", ov->customid);
- 		err("Please notify " EMAIL " of the name,");
- 		err("manufacturer, model, and this number of your camera.");
- 		err("Also include the output of the detection process.");
- 	} 
- 
- 	if (ov->customid == 70)		/* USB Life TV (PAL/SECAM) */
- 		ov->pal = 1;
- 
- 	if (write_regvals(ov, aRegvalsInit511)) goto error;
- 
- 	if (ov->led_policy == LED_OFF || ov->led_policy == LED_AUTO)
- 		ov51x_led_control(ov, 0);
- 
- 	/* The OV511+ has undocumented bits in the flow control register.
- 	 * Setting it to 0xff fixes the corruption with moving objects. */
- 	if (ov->bridge == BRG_OV511) {
- 		if (write_regvals(ov, aRegvalsNorm511)) goto error;
- 	} else if (ov->bridge == BRG_OV511PLUS) {
- 		if (write_regvals(ov, aRegvalsNorm511Plus)) goto error;
- 	} else {
- 		err("Invalid bridge");
  	}
  
! 	if (ov511_init_compression(ov)) goto error;
! 
! 	ov->packet_numbering = 1;
! 	ov511_set_packet_size(ov, 0);
! 
! 	ov->snap_enabled = snapshot;
! 
! 	/* Test for 7xx0 */
! 	PDEBUG(3, "Testing for 0V7xx0");
! 	ov->primary_i2c_slave = OV7xx0_SID;
! 	if (ov51x_set_slave_ids(ov, OV7xx0_SID) < 0)
! 		goto error;
! 
! 	if (i2c_w(ov, 0x12, 0x80) < 0) {
! 		/* Test for 6xx0 */
! 		PDEBUG(3, "Testing for 0V6xx0");
! 		ov->primary_i2c_slave = OV6xx0_SID;
! 		if (ov51x_set_slave_ids(ov, OV6xx0_SID) < 0)
! 			goto error;
! 
! 		if (i2c_w(ov, 0x12, 0x80) < 0) {
! 			/* Test for 8xx0 */
! 			PDEBUG(3, "Testing for 0V8xx0");
! 			ov->primary_i2c_slave = OV8xx0_SID;
! 			if (ov51x_set_slave_ids(ov, OV8xx0_SID) < 0)
! 				goto error;
! 
! 			if (i2c_w(ov, 0x12, 0x80) < 0) {
! 				/* Test for SAA7111A */
! 				PDEBUG(3, "Testing for SAA7111A");
! 				ov->primary_i2c_slave = SAA7111A_SID;
! 				if (ov51x_set_slave_ids(ov, SAA7111A_SID) < 0)
! 					goto error;
! 
! 				if (i2c_w(ov, 0x0d, 0x00) < 0) {
! 					/* Test for KS0127 */
! 					PDEBUG(3, "Testing for KS0127");
! 					ov->primary_i2c_slave = KS0127_SID;
! 					if (ov51x_set_slave_ids(ov, KS0127_SID) < 0)
! 						goto error;
! 
! 					if (i2c_w(ov, 0x10, 0x00) < 0) {
! 						err("Can't determine sensor slave IDs");
! 		 				goto error;
! 					} else {
! 						if (ks0127_configure(ov) < 0) {
! 							err("Failed to configure KS0127");
! 	 						goto error;
! 						}
! 					}
! 				} else {
! 					if (saa7111a_configure(ov) < 0) {
! 						err("Failed to configure SAA7111A");
! 	 					goto error;
! 					}
! 				}
! 			} else {
! 				err("Detected unsupported OV8xx0 sensor");
! 				goto error;
! 			}
! 		} else {
! 			if (ov6xx0_configure(ov) < 0) {
! 				err("Failed to configure OV6xx0");
!  				goto error;
! 			}
! 		}
  	} else {
! 		if (ov7xx0_configure(ov) < 0) {
! 			err("Failed to configure OV7xx0");
! 	 		goto error;
! 		}
  	}
  
  	return 0;
- 
- error:
- 	err("OV511 Config failed");
- 
- 	return -EBUSY;
  }
  
! /* This initializes the OV518/OV518+ and the sensor */
! static int
! ov518_configure(struct usb_ov511 *ov)
  {
! 	/* For 518 and 518+ */
! 	static struct ov511_regvals aRegvalsInit518[] = {
! 		{ OV511_REG_BUS, R51x_SYS_RESET,	0x40 },
! 	 	{ OV511_REG_BUS, R51x_SYS_INIT,		0xe1 },
! 	 	{ OV511_REG_BUS, R51x_SYS_RESET,	0x3e },
! 		{ OV511_REG_BUS, R51x_SYS_INIT,		0xe1 },
! 		{ OV511_REG_BUS, R51x_SYS_RESET,	0x00 },
! 		{ OV511_REG_BUS, R51x_SYS_INIT,		0xe1 },
! 		{ OV511_REG_BUS, 0x46,			0x00 }, 
! 		{ OV511_REG_BUS, 0x5d,			0x03 },
! 		{ OV511_DONE_BUS, 0x0, 0x00},
! 	};
  
! 	static struct ov511_regvals aRegvalsNorm518[] = {
! 		{ OV511_REG_BUS, R51x_SYS_SNAP,		0x02 }, /* Reset */
! 		{ OV511_REG_BUS, R51x_SYS_SNAP,		0x01 }, /* Enable */
! 		{ OV511_REG_BUS, 0x31, 			0x0f },
! 		{ OV511_REG_BUS, 0x5d,			0x03 },
! 		{ OV511_REG_BUS, 0x24,			0x9f },
! 		{ OV511_REG_BUS, 0x25,			0x90 },
! 		{ OV511_REG_BUS, 0x20,			0x00 }, /* Was 0x08 */
! 		{ OV511_REG_BUS, 0x51,			0x04 },
! 		{ OV511_REG_BUS, 0x71,			0x19 },
! 		{ OV511_DONE_BUS, 0x0, 0x00 },
  	};
  
! 	static struct ov511_regvals aRegvalsNorm518Plus[] = {
! 		{ OV511_REG_BUS, R51x_SYS_SNAP,		0x02 }, /* Reset */
! 		{ OV511_REG_BUS, R51x_SYS_SNAP,		0x01 }, /* Enable */
! 		{ OV511_REG_BUS, 0x31, 			0x0f },
! 		{ OV511_REG_BUS, 0x5d,			0x03 },
! 		{ OV511_REG_BUS, 0x24,			0x9f },
! 		{ OV511_REG_BUS, 0x25,			0x90 },
! 		{ OV511_REG_BUS, 0x20,			0x60 }, /* Was 0x08 */
! 		{ OV511_REG_BUS, 0x51,			0x02 },
! 		{ OV511_REG_BUS, 0x71,			0x19 },
! 		{ OV511_REG_BUS, 0x40,			0xff },
! 		{ OV511_REG_BUS, 0x41,			0x42 },
! 		{ OV511_REG_BUS, 0x46,			0x00 },
! 		{ OV511_REG_BUS, 0x33,			0x04 },
! 		{ OV511_REG_BUS, 0x21,			0x19 },
! 		{ OV511_REG_BUS, 0x3f,			0x10 },
  		{ OV511_DONE_BUS, 0x0, 0x00 },
  	};
  
! 	PDEBUG(4, "");
! 
! 	/* First 5 bits of custom ID reg are a revision ID on OV518 */
! 	info("Device revision %d", 0x1F & reg_r(ov, R511_SYS_CUST_ID));
! 
! 	/* Give it the default description */
! 	ov->desc = symbolic(camlist, 0);
! 
! 	if (write_regvals(ov, aRegvalsInit518)) goto error;
! 
! 	/* Set LED GPIO pin to output mode */
! 	if (reg_w_mask(ov, 0x57, 0x00, 0x02) < 0) goto error;
! 
! 	/* LED is off by default with OV518; have to explicitly turn it on */
! 	if (ov->led_policy == LED_OFF || ov->led_policy == LED_AUTO)
! 		ov51x_led_control(ov, 0);
! 	else
! 		ov51x_led_control(ov, 1);
! 
! 	/* Don't require compression if dumppix is enabled; otherwise it's
! 	 * required. OV518 has no uncompressed mode, to save RAM. */
! 	if (!dumppix && !ov->compress) {
! 		ov->compress = 1;
! 		warn("Compression required with OV518...enabling");
! 	}
! 
! 	if (ov->bridge == BRG_OV518) {
! 		if (write_regvals(ov, aRegvalsNorm518)) goto error;
! 	} else if (ov->bridge == BRG_OV518PLUS) {
! 		if (write_regvals(ov, aRegvalsNorm518Plus)) goto error;
! 	} else {
! 		err("Invalid bridge");
! 	}
  
! 	if (reg_w(ov, 0x2f, 0x80) < 0) goto error;
  
! 	if (ov518_init_compression(ov)) goto error;
  
! 	/* OV518+ has packet numbering turned on by default */
! 	if (ov->bridge == BRG_OV518)
! 		ov->packet_numbering = 0;
! 	else
! 		ov->packet_numbering = 1;
  
! 	ov518_set_packet_size(ov, 0);
  
! 	ov->snap_enabled = snapshot;
  
  	/* Test for 76xx */
! 	ov->primary_i2c_slave = OV7xx0_SID;
! 	if (ov51x_set_slave_ids(ov, OV7xx0_SID) < 0)
  		goto error;
  
! 	/* The OV518 must be more aggressive about sensor detection since
! 	 * I2C write will never fail if the sensor is not present. We have
! 	 * to try to initialize the sensor to detect its presence */
  
! 	if (init_ov_sensor(ov) < 0) {
  		/* Test for 6xx0 */
! 		ov->primary_i2c_slave = OV6xx0_SID;
! 		if (ov51x_set_slave_ids(ov, OV6xx0_SID) < 0)
  			goto error;
  
! 		if (init_ov_sensor(ov) < 0) {
! 			/* Test for 8xx0 */
! 			ov->primary_i2c_slave = OV8xx0_SID;
! 			if (ov51x_set_slave_ids(ov, OV8xx0_SID) < 0)
! 				goto error;
  
! 			if (init_ov_sensor(ov) < 0) {
! 				err("Can't determine sensor slave IDs");
!  				goto error;
! 			} else {
! 				err("Detected unsupported OV8xx0 sensor");
! 				goto error;
! 			}
! 		} else {
! 			if (ov6xx0_configure(ov) < 0) {
! 				err("Failed to configure OV6xx0");
!  				goto error;
! 			}
  		}
  	} else {
! 		if (ov7xx0_configure(ov) < 0) {
! 			err("Failed to configure OV7xx0");
  	 		goto error;
  		}
  	}
  
! 	ov->maxwidth = 352;
! 	ov->maxheight = 288;
! 
! 	// The OV518 cannot go as low as the sensor can
! 	ov->minwidth = 160;
! 	ov->minheight = 120;
  
  	return 0;
! 
  error:
! 	err("OV518 Config failed");
  
! 	return -EBUSY;
  }
  
  
--- 2930,3240 ----
  			}
  		}
  
! 		if ((i == i2c_detect_tries) && (success == 0)) {
! 			err("Failed to read sensor ID. You might not have an OV7610/20,");
! 			err("or it may be not responding. Report this to");
! 			err("mwm@i.am");
! 			return -1;
  		} else {
! 			PDEBUG(1, "I2C synced in %d attempt(s) (method 2)", i+1);
  		}
  	}
  
! 	/* Detect sensor if user didn't use override param */
! 	if (sensor == 0) {
! 		rc = ov511_i2c_read(dev, OV7610_REG_COM_I);
  
! 		if (rc < 0) {
! 			err("Error detecting sensor type");
! 			return -1;
! 		} else if((rc & 3) == 3) {
! 			info("Sensor is an OV7610");
! 			ov511->sensor = SEN_OV7610;
! 		} else if((rc & 3) == 1) {
  			info("Sensor is an OV7620AE");
! 			ov511->sensor = SEN_OV7620AE;
! 		} else if((rc & 3) == 0) {
! 			info("Sensor is an OV7620");
! 			ov511->sensor = SEN_OV7620;
  		} else {
! 			err("Unknown image sensor version: %d", rc & 3);
! 			return -1;
  		}
! 	} else {	/* sensor != 0; user overrode detection */
! 		ov511->sensor = sensor;
! 		info("Sensor set to type %d", ov511->sensor);
  	}
  
! 	if (ov511->sensor == SEN_OV7620) {
  		PDEBUG(4, "Writing 7620 registers");
! 		if (ov511_write_regvals(dev, aRegvalsNorm7620))
  			return -1;
  	} else {
  		PDEBUG(4, "Writing 7610 registers");
! 		if (ov511_write_regvals(dev, aRegvalsNorm7610))
! 			return -1;
! 	}
! 
! 	/* Set sensor-specific vars */
! 	ov511->maxwidth = 640;
! 	ov511->maxheight = 480;
! 
! 	if (aperture < 0) {          /* go with the default */
! 		if (ov511_i2c_write(dev, 0x26, 0xa2) < 0) return -1;
! 	} else if (aperture <= 0xf) {  /* user overrode default */
! 		if (ov511_i2c_write(dev, 0x26, (aperture << 4) + 2) < 0)
  			return -1;
+ 	} else {
+ 		err("Invalid setting for aperture; legal value: 0 - 15");
+ 		return -1;
  	}
  
! 	if (autoadjust) {
! 		if (ov511_i2c_write(dev, 0x13, 0x01) < 0) return -1;
! 		if (ov511_i2c_write(dev, 0x2d, 
! 		     ov511->sensor==SEN_OV7620?0x91:0x93) < 0) return -1;
! 	} else {
! 		if (ov511_i2c_write(dev, 0x13, 0x00) < 0) return -1;
! 		if (ov511_i2c_write(dev, 0x2d, 
! 		     ov511->sensor==SEN_OV7620?0x81:0x83) < 0) return -1;
! 		ov511_i2c_write(dev, 0x28, ov511_i2c_read(dev, 0x28) | 8);
! 	}
  
  	return 0;
  }
  
! static int ov6xx0_configure(struct usb_ov511 *ov511)
  {
! 	struct usb_device *dev = ov511->dev;
! 	int i, success, rc;
  
  	static struct ov511_regvals aRegvalsNorm6x20[] = {
! 		{ OV511_I2C_BUS, 0x12, 0x80 },  /* reset */
  		{ OV511_I2C_BUS, 0x11, 0x01 },
! 		{ OV511_I2C_BUS, 0x03, 0xd0 },
! 		{ OV511_I2C_BUS, 0x05, 0x7f },
  		{ OV511_I2C_BUS, 0x07, 0xa8 },
  		{ OV511_I2C_BUS, 0x0c, 0x24 },
  		{ OV511_I2C_BUS, 0x0d, 0x24 },
! 		{ OV511_I2C_BUS, 0x10, 0xff },  /* ? */
  		{ OV511_I2C_BUS, 0x14, 0x04 },
! 		{ OV511_I2C_BUS, 0x16, 0x06 },  /* ? */
! 		{ OV511_I2C_BUS, 0x19, 0x04 },
! 		{ OV511_I2C_BUS, 0x1a, 0x93 },
! 		{ OV511_I2C_BUS, 0x20, 0x28 },
! 		{ OV511_I2C_BUS, 0x27, 0xa2 },
! 		{ OV511_I2C_BUS, 0x28, 0x24 },
! 		{ OV511_I2C_BUS, 0x2a, 0x04 },  /* 84? */
! 		{ OV511_I2C_BUS, 0x2b, 0xac },  /* a8? */
! 		{ OV511_I2C_BUS, 0x2d, 0x95 },
! 		{ OV511_I2C_BUS, 0x33, 0x28 },
! 		{ OV511_I2C_BUS, 0x34, 0xc7 },
  		{ OV511_I2C_BUS, 0x38, 0x8b },
! 		{ OV511_I2C_BUS, 0x3c, 0x5c },
  		{ OV511_I2C_BUS, 0x3d, 0x80 },
! 		{ OV511_I2C_BUS, 0x3f, 0x00 },
! 		{ OV511_I2C_BUS, 0x4a, 0x80 }, /* undocumented */
! 		{ OV511_I2C_BUS, 0x4b, 0x80 }, /* undocumented */
! 		{ OV511_I2C_BUS, 0x4d, 0xd2 },
  		{ OV511_I2C_BUS, 0x4e, 0xc1 },
  		{ OV511_I2C_BUS, 0x4f, 0x04 },
  		{ OV511_DONE_BUS, 0x0, 0x00 },
  	};
  
! 	PDEBUG (4, "starting sensor configuration");
! 	
! 	/* Reset the 6xx0 */ 
! 	if (ov511_i2c_write(dev, 0x12, 0x80) < 0) return -1;
  
! 	/* Wait for it to initialize */ 
! 	schedule_timeout (1 + 150 * HZ / 1000);
  
! 	for (i = 0, success = 0; i < i2c_detect_tries && !success; i++) {
! 		if ((ov511_i2c_read(dev, OV7610_REG_ID_HIGH) == 0x7F) &&
! 		    (ov511_i2c_read(dev, OV7610_REG_ID_LOW) == 0xA2)) {
! 			success = 1;
! 			continue;
! 		}
  
! 		/* Reset the 6xx0 */ 
! 		if (ov511_i2c_write(dev, 0x12, 0x80) < 0) return -1;
! 		/* Wait for it to initialize */ 
! 		schedule_timeout (1 + 150 * HZ / 1000);
! 		/* Dummy read to sync I2C */
! 		if (ov511_i2c_read(dev, 0x00) < 0) return -1;
  	}
  
! 	if (success) {
! 		PDEBUG(1, "I2C synced in %d attempt(s)", i);
  	} else {
! 		err("Failed to read sensor ID. You might not have an OV6xx0,");
! 		err("or it may be not responding. Report this to");
! 		err("mwm@i.am");
  		return -1;
  	}
  
! 	/* Detect sensor if user didn't use override param */
! 	if (sensor == 0) {
! 		rc = ov511_i2c_read(dev, OV7610_REG_COM_I);
! 
  		if (rc < 0) {
  			err("Error detecting sensor type");
  			return -1;
! 		} else {
! 			info("Sensor is an OV6xx0 (version %d)", rc & 3);
! 			ov511->sensor = SEN_OV6620;
  		}
! 	} else {	/* sensor != 0; user overrode detection */
! 		ov511->sensor = sensor;
! 		info("Sensor set to type %d", ov511->sensor);
  	}
  
  	/* Set sensor-specific vars */
! 	ov511->maxwidth = 352;
! 	ov511->maxheight = 288;
  
! 	PDEBUG(4, "Writing 6x20 registers");
! 	if (ov511_write_regvals(dev, aRegvalsNorm6x20))
  		return -1;
  
! 	if (aperture < 0) {          /* go with the default */
! 		if (ov511_i2c_write(dev, 0x26, 0xa2) < 0) return -1;
! 	} else if (aperture <= 0xf) {  /* user overrode default */
! 		if (ov511_i2c_write(dev, 0x26, (aperture << 4) + 2) < 0)
! 			return -1;
  	} else {
! 		err("Invalid setting for aperture; legal value: 0 - 15");
  		return -1;
  	}
  
! 	if (autoadjust) {
! 		if (ov511_i2c_write(dev, 0x13, 0x01) < 0) return -1;
! 		if (ov511_i2c_write(dev, 0x2d, 
! 		     ov511->sensor==SEN_OV7620?0x91:0x93) < 0) return -1;
  	} else {
! 		if (ov511_i2c_write(dev, 0x13, 0x00) < 0) return -1;
! 		if (ov511_i2c_write(dev, 0x2d, 
! 		     ov511->sensor==SEN_OV7620?0x81:0x83) < 0) return -1;
! 		ov511_i2c_write(dev, 0x28, ov511_i2c_read(dev, 0x28) | 8);
  	}
  
  	return 0;
  }
  
! 
! static int ov511_configure(struct usb_ov511 *ov511)
  {
! 	struct usb_device *dev = ov511->dev;
! 	int i;
  
! 	static struct ov511_regvals aRegvalsInit[] = {
! 		{ OV511_REG_BUS, OV511_REG_SYSTEM_RESET, 0x7f },
! 	 	{ OV511_REG_BUS, OV511_REG_SYSTEM_INIT, 0x01 },
! 	 	{ OV511_REG_BUS, OV511_REG_SYSTEM_RESET, 0x7f },
! 		{ OV511_REG_BUS, OV511_REG_SYSTEM_INIT, 0x01 },
! 		{ OV511_REG_BUS, OV511_REG_SYSTEM_RESET, 0x3f },
! 		{ OV511_REG_BUS, OV511_REG_SYSTEM_INIT, 0x01 },
! 		{ OV511_REG_BUS, OV511_REG_SYSTEM_RESET, 0x3d },
! 		{ OV511_DONE_BUS, 0x0, 0x00},
  	};
  
! 	static struct ov511_regvals aRegvalsNorm511[] = {
! 		{ OV511_REG_BUS, OV511_REG_DRAM_ENABLE_FLOW_CONTROL, 0x01 },
! 		{ OV511_REG_BUS, OV511_REG_SYSTEM_SNAPSHOT, 0x02 },
! 		{ OV511_REG_BUS, OV511_REG_SYSTEM_SNAPSHOT, 0x00 },
! 		{ OV511_REG_BUS, OV511_REG_FIFO_BITMASK, 0x1f },
! 		{ OV511_REG_BUS, OV511_OMNICE_PREDICTION_HORIZ_Y, 0x08 },
! 		{ OV511_REG_BUS, OV511_OMNICE_PREDICTION_HORIZ_UV, 0x01 },
! 		{ OV511_REG_BUS, OV511_OMNICE_PREDICTION_VERT_Y, 0x08 },
! 		{ OV511_REG_BUS, OV511_OMNICE_PREDICTION_VERT_UV, 0x01 },
! 		{ OV511_REG_BUS, OV511_OMNICE_QUANTIZATION_HORIZ_Y, 0x01 },
! 		{ OV511_REG_BUS, OV511_OMNICE_QUANTIZATION_HORIZ_UV, 0x01 },
! 		{ OV511_REG_BUS, OV511_OMNICE_QUANTIZATION_VERT_Y, 0x01 },
! 		{ OV511_REG_BUS, OV511_OMNICE_QUANTIZATION_VERT_UV, 0x01 },
! 		{ OV511_REG_BUS, OV511_OMNICE_ENABLE, 0x06 },
! 		{ OV511_REG_BUS, OV511_OMNICE_LUT_ENABLE, 0x03 },
  		{ OV511_DONE_BUS, 0x0, 0x00 },
  	};
  
! 	memcpy(&ov511->vdev, &ov511_template, sizeof(ov511_template));
  
! 	for (i = 0; i < OV511_NUMFRAMES; i++)
! 		init_waitqueue_head(&ov511->frame[i].wq);
  
! 	init_waitqueue_head(&ov511->wq);
  
! 	if (ov511_write_regvals(dev, aRegvalsInit)) goto error;
! 	if (ov511_write_regvals(dev, aRegvalsNorm511)) goto error;
  
! 	ov511_set_packet_size(ov511, 0);
  
! 	ov511->snap_enabled = snapshot;	
  
  	/* Test for 76xx */
! 	if (ov511_reg_write(dev, OV511_REG_I2C_SLAVE_ID_WRITE,
! 	                   OV7610_I2C_WRITE_ID) < 0)
! 		goto error;
! 
! 	if (ov511_reg_write(dev, OV511_REG_I2C_SLAVE_ID_READ,
! 	                   OV7610_I2C_READ_ID) < 0)
  		goto error;
  
! 	if (ov511_reset(dev, OV511_RESET_NOREGS) < 0)
! 		goto error;
  
! 	if (ov511_i2c_write(dev, 0x12, 0x80) < 0) {
  		/* Test for 6xx0 */
! 		if (ov511_reg_write(dev, OV511_REG_I2C_SLAVE_ID_WRITE,
! 		                    OV6xx0_I2C_WRITE_ID) < 0)
  			goto error;
  
! 		if (ov511_reg_write(dev, OV511_REG_I2C_SLAVE_ID_READ,
! 		                    OV6xx0_I2C_READ_ID) < 0)
! 			goto error;
  
! 		if (ov511_reset(dev, OV511_RESET_NOREGS) < 0)
! 			goto error;
! 
! 		if (ov511_i2c_write(dev, 0x12, 0x80) < 0) {
! 			err("Can't determine sensor slave IDs");
! 			goto error;
! 		}
! 		
! 		if(ov6xx0_configure(ov511) < 0) {
! 			err("failed to configure OV6xx0");
!  			goto error;
  		}
  	} else {
! 		if(ov76xx_configure(ov511) < 0) {
! 			err("failed to configure OV76xx");
  	 		goto error;
  		}
  	}
+ 	
+ 	/* Set default sizes in case IOCTL (VIDIOCMCAPTURE) is not used
+ 	 * (using read() instead). */
+ 	for (i = 0; i < OV511_NUMFRAMES; i++) {
+ 		ov511->frame[i].width = ov511->maxwidth;
+ 		ov511->frame[i].height = ov511->maxheight;
+ 		ov511->frame[i].depth = 24;
+ 		ov511->frame[i].bytes_read = 0;
+ 		ov511->frame[i].segment = 0;
+ 		ov511->frame[i].format = VIDEO_PALETTE_RGB24;
+ 		ov511->frame[i].segsize = GET_SEGSIZE(ov511->frame[i].format);
+ 	}
  
! 	/* Initialize to max width/height, RGB24 */
! 	if (ov511_mode_init_regs(ov511, ov511->maxwidth, ov511->maxheight,
! 				 VIDEO_PALETTE_RGB24, 0) < 0)
! 		goto error;
  
  	return 0;
! 	
  error:
! 	usb_driver_release_interface(&ov511_driver,
! 		&dev->actconfig->interface[ov511->iface]);
  
! 	return -EBUSY;	
  }
  
  
***************
*** 6360,6372 ****
   ***************************************************************************/
  
  static void *
! ov51x_probe(struct usb_device *dev, unsigned int ifnum,
! 	    const struct usb_device_id *id)
  {
  	struct usb_interface_descriptor *interface;
! 	struct usb_ov511 *ov;
  	int i;
- 	int registered = 0;
  
  	PDEBUG(1, "probing for device...");
  
--- 3245,3256 ----
   ***************************************************************************/
  
  static void *
! ov511_probe(struct usb_device *dev, unsigned int ifnum,
! 	const struct usb_device_id *id)
  {
  	struct usb_interface_descriptor *interface;
! 	struct usb_ov511 *ov511;
  	int i;
  
  	PDEBUG(1, "probing for device...");
  
***************
*** 6385,6550 ****
  	/* Since code below may sleep, we use this as a lock */
  	MOD_INC_USE_COUNT;
  
! 	if ((ov = kmalloc(sizeof(*ov), GFP_KERNEL)) == NULL) {
! 		err("couldn't kmalloc ov struct");
! 		goto error_out;
! 	}
! 
! 	memset(ov, 0, sizeof(*ov));
! 
! 	ov->dev = dev;
! 	ov->iface = interface->bInterfaceNumber;
! 	ov->led_policy = led;
! 	ov->compress = compress;
! 	ov->lightfreq = lightfreq;
! 	ov->num_inputs = 1;	   /* Video decoder init functs. change this */
! 	ov->stop_during_set = !fastset;
! 	ov->backlight = backlight;
! 	ov->mirror = mirror;
! 	ov->auto_brt = autobright;
! 	ov->auto_gain = autogain;
! 	ov->auto_exp = autoexp;
  
  	switch (dev->descriptor.idProduct) {
! 	case PROD_OV511:
! 		ov->bridge = BRG_OV511;
! 		ov->bclass = BCL_OV511;
! 		break;
! 	case PROD_OV511PLUS:
! 		ov->bridge = BRG_OV511PLUS;
! 		ov->bclass = BCL_OV511;
  		break;
! 	case PROD_OV518:
! 		ov->bridge = BRG_OV518;
! 		ov->bclass = BCL_OV518;
! 		break;
! 	case PROD_OV518PLUS:
! 		ov->bridge = BRG_OV518PLUS;
! 		ov->bclass = BCL_OV518;
! 		break;
! 	case PROD_ME2CAM:
! 		if (dev->descriptor.idVendor != VEND_MATTEL)
  			goto error;
! 		ov->bridge = BRG_OV511PLUS;
! 		ov->bclass = BCL_OV511;
  		break;
  	default:
! 		err("Unknown product ID 0x%04x", dev->descriptor.idProduct);
! 		goto error_dealloc;
! 	}
! 
! 	info("USB %s video device found", symbolic(brglist, ov->bridge));
! 
! 	/* Workaround for some applications that want data in RGB
! 	 * instead of BGR. */
! 	if (force_rgb)
! 		info("data format set to RGB");
! 
! 	init_waitqueue_head(&ov->wq);
! 
! 	init_MUTEX(&ov->lock);	/* to 1 == available */
! 	init_MUTEX(&ov->buf_lock);
! 	init_MUTEX(&ov->param_lock);
! 	init_MUTEX(&ov->i2c_lock);
! 	init_MUTEX(&ov->cbuf_lock);
! 
! 	ov->buf_state = BUF_NOT_ALLOCATED;
! 
! 	/* Must be kmalloc()'ed, for DMA accessibility */
! 	ov->cbuf = kmalloc(OV511_CBUF_SIZE, GFP_KERNEL);
! 	if (!ov->cbuf)
  		goto error;
- 
- 	if (ov->bclass == BCL_OV518) {
- 		if (ov518_configure(ov) < 0)
- 			goto error;
- 	} else {
- 		if (ov511_configure(ov) < 0)
- 			goto error;
  	}
  
! 	for (i = 0; i < OV511_NUMFRAMES; i++) {
! 		ov->frame[i].framenum = i;
! 		init_waitqueue_head(&ov->frame[i].wq);
  	}
  
! 	for (i = 0; i < OV511_NUMSBUF; i++) {
! 		ov->sbuf[i].ov = ov;
! 		spin_lock_init(&ov->sbuf[i].lock);
! 		ov->sbuf[i].n = i;
  	}
  
! 	/* Unnecessary? (This is done on open(). Need to make sure variables
! 	 * are properly initialized without this before removing it, though). */
! 	if (ov51x_set_default_params(ov) < 0)
  		goto error;
  
! #ifdef OV511_DEBUG
! 	if (dump_bridge)
! 		ov511_dump_regs(ov);
! #endif
! 
! 	memcpy(&ov->vdev, &vdev_template, sizeof(vdev_template));
! 	ov->vdev.priv = ov;
  
! 	for (i = 0; i < OV511_MAX_UNIT_VIDEO; i++) {
! 		/* Minor 0 cannot be specified; assume user wants autodetect */
! 		if (unit_video[i] == 0)
! 			break;
  
! 		if (video_register_device(&ov->vdev, VFL_TYPE_GRABBER,
! 			unit_video[i]) >= 0) {
! 			registered = 1;
! 			break;
! 		}
  	}
  
! 	/* Use the next available one */
! 	if (!registered &&
! 	    video_register_device(&ov->vdev, VFL_TYPE_GRABBER, -1) < 0) {
  		err("video_register_device failed");
  		goto error;
  	}
  
- 	info("Device registered on minor %d", ov->vdev.minor);
- 
- #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
- 	create_proc_ov511_cam(ov);
- #endif
- 
  	MOD_DEC_USE_COUNT;
!      	return ov;
  
  error:
! #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
! 	/* Safe to call even if entry doesn't exist */
! 	destroy_proc_ov511_cam(ov);
! #endif
! 
! 	if (ov->cbuf) {
! 		down(&ov->cbuf_lock);
! 		kfree(ov->cbuf);
! 		ov->cbuf = NULL;
! 		up(&ov->cbuf_lock);
! 	}
! 
! error_dealloc:
! 	if (ov) {
! 		kfree(ov);
! 		ov = NULL;
  	}
  
- error_out:
  	MOD_DEC_USE_COUNT;
- 	err("Camera initialization failed");
  	return NULL;
  }
  
  
  static void
! ov51x_disconnect(struct usb_device *dev, void *ptr)
  {
! 	struct usb_ov511 *ov = (struct usb_ov511 *) ptr;
  	int n;
  
  	MOD_INC_USE_COUNT;
--- 3269,3370 ----
  	/* Since code below may sleep, we use this as a lock */
  	MOD_INC_USE_COUNT;
  
! 	if ((ov511 = kmalloc(sizeof(*ov511), GFP_KERNEL)) == NULL) {
! 		err("couldn't kmalloc ov511 struct");
! 		goto error;
! 	}
! 
! 	memset(ov511, 0, sizeof(*ov511));
! 
! 	ov511->dev = dev;
! 	ov511->iface = interface->bInterfaceNumber;
  
  	switch (dev->descriptor.idProduct) {
! 	case 0x0511:
! 		info("USB OV511 camera found");
! 		ov511->bridge = BRG_OV511;
! 		break;
! 	case 0xA511:
! 		info("USB OV511+ camera found");
! 		ov511->bridge = BRG_OV511PLUS;
  		break;
! 	case 0x0002:
! 		if (dev->descriptor.idVendor != 0x0813)
  			goto error;
! 		info("Intel Play Me2Cam (OV511+) found");
! 		ov511->bridge = BRG_OV511PLUS;
  		break;
  	default:
! 		err("Unknown product ID");
  		goto error;
  	}
  
! 	ov511->customid = ov511_reg_read(dev, OV511_REG_SYSTEM_CUSTOM_ID);
! 	if (ov511->customid < 0) {
! 		err("Unable to read camera bridge registers");
! 		goto error;
  	}
  
! 	ov511->desc = -1;
! 	PDEBUG (4, "CustomID = %d", ov511->customid);
! 	for (i = 0; clist[i].id >= 0; i++) {
! 		if (ov511->customid == clist[i].id) {
! 			info("camera: %s", clist[i].description);
! 			ov511->desc = i;
! 			break;
! 		}
  	}
  
! 	/* Lifeview USB Life TV not supported */
! 	if (clist[i].id == 38) {
! 		err("This device is not supported yet.");
  		goto error;
+ 	}
  
! 	if (clist[i].id == -1) {
! 		err("Camera type (%d) not recognized", ov511->customid);
! 		err("Please contact mwm@i.am to request");
! 		err("support for your camera.");
! 	}
  
! 	/* Workaround for some applications that want data in RGB
! 	 * instead of BGR */
! 	if (force_rgb)
! 		info("data format set to RGB");
  
! 	if (!ov511_configure(ov511)) {
! 		ov511->user = 0;
! 		init_MUTEX(&ov511->lock);	/* to 1 == available */
! 		init_MUTEX(&ov511->buf_lock);
! 		ov511->buf_state = BUF_NOT_ALLOCATED;
! 	} else {
! 		err("Failed to configure camera");
! 		goto error;
  	}
  
! 	if (video_register_device(&ov511->vdev, VFL_TYPE_GRABBER, video_nr) < 0) {
  		err("video_register_device failed");
  		goto error;
  	}
  
  	MOD_DEC_USE_COUNT;
!      	return ov511;
  
  error:
! 	if (ov511) {
! 		kfree(ov511);
! 		ov511 = NULL;
  	}
  
  	MOD_DEC_USE_COUNT;
  	return NULL;
  }
  
  
  static void
! ov511_disconnect(struct usb_device *dev, void *ptr)
  {
! 	struct usb_ov511 *ov511 = (struct usb_ov511 *) ptr;
  	int n;
  
  	MOD_INC_USE_COUNT;
***************
*** 6552,6594 ****
  	PDEBUG(3, "");
  
  	/* We don't want people trying to open up the device */
! 	if (!ov->user)
! 		video_unregister_device(&ov->vdev);
  	else
  		PDEBUG(3, "Device open...deferring video_unregister_device");
  
  	for (n = 0; n < OV511_NUMFRAMES; n++)
! 		ov->frame[n].grabstate = FRAME_ERROR;
  
! 	ov->curframe = -1;
  
  	/* This will cause the process to request another frame */
  	for (n = 0; n < OV511_NUMFRAMES; n++)
! 		if (waitqueue_active(&ov->frame[n].wq))
! 			wake_up_interruptible(&ov->frame[n].wq);
! 	if (waitqueue_active(&ov->wq))
! 		wake_up_interruptible(&ov->wq);
  
! 	ov->streaming = 0;
  
! 	ov51x_unlink_isoc(ov);
  
  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
!         destroy_proc_ov511_cam(ov);
  #endif
  
- 	ov->dev = NULL;
- 
  	/* Free the memory */
! 	if (ov && !ov->user) {
! 		down(&ov->cbuf_lock);
! 		kfree(ov->cbuf);
! 		ov->cbuf = NULL;
! 		up(&ov->cbuf_lock);
! 
! 		ov51x_dealloc(ov, 1);
! 		kfree(ov);
! 		ov = NULL;
  	}
  
  	MOD_DEC_USE_COUNT;
--- 3372,3419 ----
  	PDEBUG(3, "");
  
  	/* We don't want people trying to open up the device */
! 	if (!ov511->user)
! 		video_unregister_device(&ov511->vdev);
  	else
  		PDEBUG(3, "Device open...deferring video_unregister_device");
  
  	for (n = 0; n < OV511_NUMFRAMES; n++)
! 		ov511->frame[n].grabstate = FRAME_ERROR;
  
! 	ov511->curframe = -1;
  
  	/* This will cause the process to request another frame */
  	for (n = 0; n < OV511_NUMFRAMES; n++)
! 		if (waitqueue_active(&ov511->frame[n].wq))
! 			wake_up_interruptible(&ov511->frame[n].wq);
! 	if (waitqueue_active(&ov511->wq))
! 		wake_up_interruptible(&ov511->wq);
! 
! 	ov511->streaming = 0;
  
! 	/* Unschedule all of the iso td's */
! 	for (n = OV511_NUMSBUF - 1; n >= 0; n--) {
! 		if (ov511->sbuf[n].urb) {
! 			ov511->sbuf[n].urb->next = NULL;
! 			usb_unlink_urb(ov511->sbuf[n].urb);
! 			usb_free_urb(ov511->sbuf[n].urb);
! 			ov511->sbuf[n].urb = NULL;
! 		}
! 	}
  
! 	usb_driver_release_interface(&ov511_driver,
! 		&ov511->dev->actconfig->interface[ov511->iface]);
! 	ov511->dev = NULL;
  
  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
!         destroy_proc_ov511_cam(ov511);
  #endif
  
  	/* Free the memory */
! 	if (ov511 && !ov511->user) {
! 		ov511_dealloc(ov511, 1);
! 		kfree(ov511);
! 		ov511 = NULL;
  	}
  
  	MOD_DEC_USE_COUNT;
***************
*** 6597,6604 ****
  static struct usb_driver ov511_driver = {
  	name:		"ov511",
  	id_table:       device_table,
! 	probe:		ov51x_probe,
! 	disconnect:	ov51x_disconnect
  };
  
  
--- 3422,3429 ----
  static struct usb_driver ov511_driver = {
  	name:		"ov511",
  	id_table:       device_table,
! 	probe:		ov511_probe,
! 	disconnect:	ov511_disconnect
  };
  
  
***************
*** 6608,6695 ****
   *
   ***************************************************************************/
  
! /* Returns 0 for success */
! int
! ov511_register_decomp_module(int ver, struct ov51x_decomp_ops *ops, int ov518,
! 			     int mmx)
! {
! 	if (ver != DECOMP_INTERFACE_VER) {
! 		err("Decompression module has incompatible");
! 		err("interface version %d", ver);
! 		err("Interface version %d is required", DECOMP_INTERFACE_VER);
! 		return -EINVAL;
! 	}
! 
! 	if (!ops)
! 		return -EFAULT;
! 
! 	if (mmx && !ov51x_mmx_available) {
! 		err("MMX not available on this system or kernel");
! 		return -EINVAL;
! 	}
! 
! 	lock_kernel();
! 
! 	if (ov518) {
! 		if (mmx) {
! 			if (ov518_mmx_decomp_ops)
! 				goto err_in_use;
! 			else
! 				ov518_mmx_decomp_ops = ops;
! 		} else {
! 			if (ov518_decomp_ops)
! 				goto err_in_use;
! 			else
! 				ov518_decomp_ops = ops;
! 		}
! 	} else {
! 		if (mmx) {
! 			if (ov511_mmx_decomp_ops)
! 				goto err_in_use;
! 			else
! 				ov511_mmx_decomp_ops = ops;
! 		} else {
! 			if (ov511_decomp_ops)
! 				goto err_in_use;
! 			else
! 				ov511_decomp_ops = ops;
! 		}
! 	}
! 
! 	MOD_INC_USE_COUNT;
! 
! 	unlock_kernel();
! 	return 0;
! 
! err_in_use:
! 	unlock_kernel();
! 	return -EBUSY;
! }
! 
! void
! ov511_deregister_decomp_module(int ov518, int mmx)
! {
! 	lock_kernel();
! 
! 	if (ov518) {
! 		if (mmx)
! 			ov518_mmx_decomp_ops = NULL;
! 		else
! 			ov518_decomp_ops = NULL;
! 	} else {
! 		if (mmx)
! 			ov511_mmx_decomp_ops = NULL;
! 		else
! 			ov511_decomp_ops = NULL;
! 	}
! 
! 	MOD_DEC_USE_COUNT;
! 
! 	unlock_kernel();
! }
! 
! static int __init
! usb_ov511_init(void)
  {
  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
          proc_ov511_create();
--- 3433,3439 ----
   *
   ***************************************************************************/
  
! static int __init usb_ov511_init(void)
  {
  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
          proc_ov511_create();
***************
*** 6698,6726 ****
  	if (usb_register(&ov511_driver) < 0)
  		return -1;
  
! #if defined (__i386__)
! 	if (test_bit(X86_FEATURE_MMX, boot_cpu_data.x86_capability))
! 		ov51x_mmx_available = 1;
! #endif
! 
! 	info(DRIVER_VERSION " : " DRIVER_DESC);
  
  	return 0;
  }
  
! static void __exit
! usb_ov511_exit(void)
  {
  	usb_deregister(&ov511_driver);
  	info("driver deregistered");
  
  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
          proc_ov511_destroy();
! #endif
  }
  
  module_init(usb_ov511_init);
  module_exit(usb_ov511_exit);
- 
- EXPORT_SYMBOL(ov511_register_decomp_module);
- EXPORT_SYMBOL(ov511_deregister_decomp_module);
--- 3442,3461 ----
  	if (usb_register(&ov511_driver) < 0)
  		return -1;
  
! 	info(DRIVER_VERSION ":" DRIVER_DESC);
  
  	return 0;
  }
  
! static void __exit usb_ov511_exit(void)
  {
  	usb_deregister(&ov511_driver);
  	info("driver deregistered");
  
  #if defined(CONFIG_PROC_FS) && defined(CONFIG_VIDEO_PROC_FS)
          proc_ov511_destroy();
! #endif 
  }
  
  module_init(usb_ov511_init);
  module_exit(usb_ov511_exit);
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/ov511.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/ov511.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/ov511.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/ov511.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,140 ****
  #ifndef __LINUX_OV511_H
  #define __LINUX_OV511_H
  
  #include 
  #include 
  #include 
- #include 
  
  #define OV511_DEBUG	/* Turn on debug messages */
  
  #ifdef OV511_DEBUG
! 	#define PDEBUG(level, fmt, args...) \
! 		if (debug >= (level)) info("[%s:%d] " fmt, \
! 		__PRETTY_FUNCTION__, __LINE__ , ## args)
  #else
! 	#define PDEBUG(level, fmt, args...) do {} while(0)
  #endif
  
- /* This macro restricts an int variable to an inclusive range */
- #define RESTRICT_TO_RANGE(v,mi,ma) { \
- 	if ((v) < (mi)) (v) = (mi); \
- 	else if ((v) > (ma)) (v) = (ma); \
- }
- 
- /* --------------------------------- */
- /* DEFINES FOR OV511 AND OTHER CHIPS */
- /* --------------------------------- */
- 
- /* USB IDs */
- #define VEND_OMNIVISION	0x05A9
- #define PROD_OV511	0x0511
- #define PROD_OV511PLUS	0xA511
- #define PROD_OV518	0x0518
- #define PROD_OV518PLUS	0xA518
- 
- #define VEND_MATTEL	0x0813
- #define PROD_ME2CAM	0x0002
- 
- /* --------------------------------- */
- /*     OV51x REGISTER MNEMONICS      */
- /* --------------------------------- */
- 
  /* Camera interface register numbers */
! #define R511_CAM_DELAY		0x10
! #define R511_CAM_EDGE		0x11
! #define R511_CAM_PXCNT		0x12
! #define R511_CAM_LNCNT		0x13
! #define R511_CAM_PXDIV		0x14
! #define R511_CAM_LNDIV		0x15
! #define R511_CAM_UV_EN		0x16
! #define R511_CAM_LINE_MODE	0x17
! #define R511_CAM_OPTS		0x18
  
  /* Snapshot mode camera interface register numbers */
! #define R511_SNAP_FRAME		0x19
! #define R511_SNAP_PXCNT		0x1A
! #define R511_SNAP_LNCNT		0x1B
! #define R511_SNAP_PXDIV		0x1C
! #define R511_SNAP_LNDIV		0x1D
! #define R511_SNAP_UV_EN		0x1E
! #define R511_SNAP_OPTS		0x1F
  
  /* DRAM register numbers */
! #define R511_DRAM_FLOW_CTL	0x20
! #define R511_DRAM_ARCP		0x21
! #define R511_DRAM_MRC		0x22
! #define R511_DRAM_RFC		0x23
  
  /* ISO FIFO register numbers */
! #define R51x_FIFO_PSIZE		0x30	/* 2 bytes wide w/ OV518(+) */
! #define R511_FIFO_OPTS		0x31
  
! /* Parallel IO register numbers */
! #define R511_PIO_OPTS		0x38
! #define R511_PIO_DATA		0x39
! #define R511_PIO_BIST		0x3E
! #define R518_GPIO_IN		0x55	/* OV518(+) only */
! #define R518_GPIO_OUT		0x56	/* OV518(+) only */
! #define R518_GPIO_CTL		0x57	/* OV518(+) only */
! #define R518_GPIO_PULSE_IN	0x58	/* OV518(+) only */
! #define R518_GPIO_PULSE_CLEAR	0x59	/* OV518(+) only */
! #define R518_GPIO_PULSE_POL	0x5a	/* OV518(+) only */
! #define R518_GPIO_PULSE_EN	0x5b	/* OV518(+) only */
! #define R518_GPIO_RESET		0x5c	/* OV518(+) only */
! 
! /* I2C registers */
! #define R511_I2C_CTL		0x40
! #define R518_I2C_CTL		0x47	/* OV518(+) only */
! #define R51x_I2C_W_SID		0x41
! #define R51x_I2C_SADDR_3	0x42
! #define R51x_I2C_SADDR_2	0x43
! #define R51x_I2C_R_SID		0x44
! #define R51x_I2C_DATA		0x45
! #define R51x_I2C_CLOCK		0x46
! #define R51x_I2C_TIMEOUT	0x47
! 
! /* I2C snapshot registers */
! #define R511_SI2C_SADDR_3	0x48
! #define R511_SI2C_DATA		0x49
! 
! /* System control registers */
! #define R51x_SYS_RESET		0x50
! 		/* Reset type definitions */
! #define 	OV511_RESET_UDC		0x01
! #define 	OV511_RESET_I2C		0x02
! #define 	OV511_RESET_FIFO	0x04
! #define 	OV511_RESET_OMNICE	0x08
! #define 	OV511_RESET_DRAM	0x10
! #define 	OV511_RESET_CAM_INT	0x20
! #define 	OV511_RESET_OV511	0x40
! #define 	OV511_RESET_NOREGS	0x3F /* All but OV511 & regs */
! #define 	OV511_RESET_ALL		0x7F
! 
! #define R511_SYS_CLOCK_DIV	0x51
! #define R51x_SYS_SNAP		0x52
! #define R51x_SYS_INIT         	0x53
! #define R511_SYS_PWR_CLK	0x54 /* OV511+/OV518(+) only */
! #define R511_SYS_LED_CTL	0x55 /* OV511+ only */
! #define R511_SYS_USER		0x5E
! #define R511_SYS_CUST_ID	0x5F
! 
! /* OmniCE (compression) registers */
! #define R511_COMP_PHY		0x70
! #define R511_COMP_PHUV		0x71
! #define R511_COMP_PVY		0x72
! #define R511_COMP_PVUV		0x73
! #define R511_COMP_QHY		0x74
! #define R511_COMP_QHUV		0x75
! #define R511_COMP_QVY		0x76
! #define R511_COMP_QVUV		0x77
! #define R511_COMP_EN		0x78
! #define R511_COMP_LUT_EN	0x79		
! #define R511_COMP_LUT_BEGIN	0x80
! 
! /* --------------------------------- */
! /*         ALTERNATE NUMBERS         */
! /* --------------------------------- */
  
  /* Alternate numbers for various max packet sizes (OV511 only) */
  #define OV511_ALT_SIZE_992	0
--- 1,103 ----
+ 
  #ifndef __LINUX_OV511_H
  #define __LINUX_OV511_H
  
  #include 
  #include 
  #include 
  
  #define OV511_DEBUG	/* Turn on debug messages */
  
  #ifdef OV511_DEBUG
! #  define PDEBUG(level, fmt, args...) \
! if (debug >= level) info("[" __PRETTY_FUNCTION__ ":%d] " fmt, __LINE__ , ## args)
  #else
! #  define PDEBUG(level, fmt, args...) do {} while(0)
  #endif
  
  /* Camera interface register numbers */
! #define OV511_REG_CAMERA_DELAY_MODE		0x10
! #define OV511_REG_CAMERA_EDGE_MODE		0x11
! #define OV511_REG_CAMERA_CLAMPED_PIXEL_NUM	0x12
! #define OV511_REG_CAMERA_CLAMPED_LINE_NUM	0x13
! #define OV511_REG_CAMERA_PIXEL_DIVISOR		0x14
! #define OV511_REG_CAMERA_LINE_DIVISOR		0x15
! #define OV511_REG_CAMERA_DATA_INPUT_SELECT	0x16
! #define OV511_REG_CAMERA_RESERVED_LINE_MODE	0x17
! #define OV511_REG_CAMERA_BITMASK		0x18
  
  /* Snapshot mode camera interface register numbers */
! #define OV511_REG_SNAP_CAPTURED_FRAME		0x19
! #define OV511_REG_SNAP_CLAMPED_PIXEL_NUM	0x1A
! #define OV511_REG_SNAP_CLAMPED_LINE_NUM		0x1B
! #define OV511_REG_SNAP_PIXEL_DIVISOR		0x1C
! #define OV511_REG_SNAP_LINE_DIVISOR		0x1D
! #define OV511_REG_SNAP_DATA_INPUT_SELECT	0x1E
! #define OV511_REG_SNAP_BITMASK			0x1F
  
  /* DRAM register numbers */
! #define OV511_REG_DRAM_ENABLE_FLOW_CONTROL	0x20
! #define OV511_REG_DRAM_READ_CYCLE_PREDICT	0x21
! #define OV511_REG_DRAM_MANUAL_READ_CYCLE	0x22
! #define OV511_REG_DRAM_REFRESH_COUNTER		0x23
  
  /* ISO FIFO register numbers */
! #define OV511_REG_FIFO_PACKET_SIZE		0x30
! #define OV511_REG_FIFO_BITMASK			0x31
  
! /* PIO register numbers */
! #define OV511_REG_PIO_BITMASK			0x38
! #define OV511_REG_PIO_DATA_PORT			0x39
! #define OV511_REG_PIO_BIST			0x3E
! 
! /* I2C register numbers */
! #define OV511_REG_I2C_CONTROL			0x40
! #define OV511_REG_I2C_SLAVE_ID_WRITE		0x41
! #define OV511_REG_I2C_SUB_ADDRESS_3_BYTE	0x42
! #define OV511_REG_I2C_SUB_ADDRESS_2_BYTE	0x43
! #define OV511_REG_I2C_SLAVE_ID_READ		0x44
! #define OV511_REG_I2C_DATA_PORT			0x45
! #define OV511_REG_I2C_CLOCK_PRESCALER		0x46
! #define OV511_REG_I2C_TIME_OUT_COUNTER		0x47
! 
! /* I2C snapshot register numbers */
! #define OV511_REG_I2C_SNAP_SUB_ADDRESS		0x48
! #define OV511_REG_I2C_SNAP_DATA_PORT		0x49
! 
! /* System control register numbers */
! #define OV511_REG_SYSTEM_RESET			0x50
! #define 	OV511_RESET_UDC			0x01
! #define 	OV511_RESET_I2C			0x02
! #define 	OV511_RESET_FIFO		0x04
! #define 	OV511_RESET_OMNICE		0x08
! #define 	OV511_RESET_DRAM_INTF		0x10
! #define 	OV511_RESET_CAMERA_INTF		0x20
! #define 	OV511_RESET_OV511		0x40
! #define 	OV511_RESET_NOREGS		0x3F /* All but OV511 & regs */
! #define 	OV511_RESET_ALL			0x7F
! #define OV511_REG_SYSTEM_CLOCK_DIVISOR		0x51
! #define OV511_REG_SYSTEM_SNAPSHOT		0x52
! #define OV511_REG_SYSTEM_INIT         		0x53
! #define OV511_REG_SYSTEM_PWR_CLK		0x54	/* OV511+ only */
! #define OV511_REG_SYSTEM_LED_CTL		0x55	/* OV511+ only */
! #define OV511_REG_SYSTEM_USER_DEFINED		0x5E
! #define OV511_REG_SYSTEM_CUSTOM_ID		0x5F
! 
! /* OmniCE register numbers */
! #define OV511_OMNICE_PREDICTION_HORIZ_Y		0x70
! #define OV511_OMNICE_PREDICTION_HORIZ_UV	0x71
! #define OV511_OMNICE_PREDICTION_VERT_Y		0x72
! #define OV511_OMNICE_PREDICTION_VERT_UV		0x73
! #define OV511_OMNICE_QUANTIZATION_HORIZ_Y	0x74
! #define OV511_OMNICE_QUANTIZATION_HORIZ_UV	0x75
! #define OV511_OMNICE_QUANTIZATION_VERT_Y	0x76
! #define OV511_OMNICE_QUANTIZATION_VERT_UV	0x77
! #define OV511_OMNICE_ENABLE			0x78
! #define OV511_OMNICE_LUT_ENABLE			0x79		
! #define OV511_OMNICE_Y_LUT_BEGIN		0x80
! #define OV511_OMNICE_Y_LUT_END			0x9F
! #define OV511_OMNICE_UV_LUT_BEGIN		0xA0
! #define OV511_OMNICE_UV_LUT_END			0xBF
  
  /* Alternate numbers for various max packet sizes (OV511 only) */
  #define OV511_ALT_SIZE_992	0
***************
*** 156,175 ****
  #define OV511PLUS_ALT_SIZE_769	6
  #define OV511PLUS_ALT_SIZE_961	7
  
- /* Alternate numbers for various max packet sizes (OV518(+) only) */
- #define OV518_ALT_SIZE_0	0
- #define OV518_ALT_SIZE_128	1
- #define OV518_ALT_SIZE_256	2
- #define OV518_ALT_SIZE_384	3
- #define OV518_ALT_SIZE_512	4
- #define OV518_ALT_SIZE_640	5
- #define OV518_ALT_SIZE_768	6
- #define OV518_ALT_SIZE_896	7
- 
- /* --------------------------------- */
- /*     OV7610 REGISTER MNEMONICS     */
- /* --------------------------------- */
- 
  /* OV7610 registers */
  #define OV7610_REG_GAIN          0x00	/* gain setting (5:0) */
  #define OV7610_REG_BLUE          0x01	/* blue channel balance */
--- 119,124 ----
***************
*** 221,306 ****
  					/* 36-37 reserved */
  #define OV7610_REG_COM_K         0x38	/* misc registers */
  
- /* --------------------------------- */
- /*           I2C ADDRESSES           */
- /* --------------------------------- */
- 
- #define OV7xx0_SID   0x42
- #define OV6xx0_SID   0xC0
- #define OV8xx0_SID   0xA0
- #define KS0127_SID   0xD8
- #define SAA7111A_SID 0x48
- 
- /* --------------------------------- */
- /*       MISCELLANEOUS DEFINES       */
- /* --------------------------------- */
  
! #define I2C_CLOCK_PRESCALER 	0x03
  
  #define FRAMES_PER_DESC		10	/* FIXME - What should this be? */
  #define MAX_FRAME_SIZE_PER_DESC	993	/* For statically allocated stuff */
- #define PIXELS_PER_SEG		256	/* Pixels per segment */
- 
- #define OV511_ENDPOINT_ADDRESS	1	/* Isoc endpoint number */
- 
- #define OV511_NUMFRAMES	2
- #if OV511_NUMFRAMES > VIDEO_MAX_FRAME
- 	#error "OV511_NUMFRAMES is too high"
- #endif
  
! #define OV511_NUMSBUF		2
  
! /* Control transfers use up to 4 bytes */
! #define OV511_CBUF_SIZE		4
  
  /* Bridge types */
  enum {
- 	BRG_UNKNOWN,
  	BRG_OV511,
  	BRG_OV511PLUS,
- 	BRG_OV518,
- 	BRG_OV518PLUS,
- };
- 
- /* Bridge classes */
- enum {
- 	BCL_UNKNOWN,
- 	BCL_OV511,
- 	BCL_OV518,
  };
  
  /* Sensor types */
  enum {
  	SEN_UNKNOWN,
- 	SEN_OV76BE,
  	SEN_OV7610,
  	SEN_OV7620,
  	SEN_OV7620AE,
  	SEN_OV6620,
- 	SEN_OV6630,
- 	SEN_OV6630AE,
- 	SEN_OV6630AF,
- 	SEN_OV8600,
- 	SEN_KS0127,
- 	SEN_KS0127B,
- 	SEN_SAA7111A,
  };
  
- // Not implemented yet
- #if 0
- /* Sensor classes */
- enum {
- 	SCL_UNKNOWN,
- 	SCL_OV7610,	/* 7610, 76BE, 7620AE (for now) */
- 	SCL_OV7620,
- 	SCL_OV6620,	
- 	SCL_OV6630,	/* 6630, 6630AE, 6630AF */
- 	SCL_OV8600,
- 	SCL_KS0127,	/* SEN_KS0127, SEN_KS0127B */
- 	SCL_SAA7111A,
- };
- #endif
- 
  enum {
  	STATE_SCANNING,		/* Scanning for start */
  	STATE_HEADER,		/* Parsing header */
--- 170,214 ----
  					/* 36-37 reserved */
  #define OV7610_REG_COM_K         0x38	/* misc registers */
  
  
! #define SCRATCH_BUF_SIZE 512
  
  #define FRAMES_PER_DESC		10	/* FIXME - What should this be? */
+ #define FRAME_SIZE_PER_DESC	993	/* FIXME - Deprecated */
  #define MAX_FRAME_SIZE_PER_DESC	993	/* For statically allocated stuff */
  
! #define OV511_ENDPOINT_ADDRESS 1	/* Isoc endpoint number */
  
! // CAMERA SPECIFIC
! // FIXME - these can vary between specific models
! #define OV7610_I2C_WRITE_ID 0x42
! #define OV7610_I2C_READ_ID  0x43
! #define OV6xx0_I2C_WRITE_ID 0xC0
! #define OV6xx0_I2C_READ_ID  0xC1
! 
! #define OV511_I2C_CLOCK_PRESCALER 0x03
! 
! /* Prototypes */
! int usb_ov511_reg_read(struct usb_device *dev, unsigned char reg);
! int usb_ov511_reg_write(struct usb_device *dev,
!                         unsigned char reg,
!                         unsigned char value);
  
  /* Bridge types */
  enum {
  	BRG_OV511,
  	BRG_OV511PLUS,
  };
  
  /* Sensor types */
  enum {
  	SEN_UNKNOWN,
  	SEN_OV7610,
  	SEN_OV7620,
  	SEN_OV7620AE,
  	SEN_OV6620,
  };
  
  enum {
  	STATE_SCANNING,		/* Scanning for start */
  	STATE_HEADER,		/* Parsing header */
***************
*** 314,399 ****
  	BUF_PEND_DEALLOC,	/* ov511->buf_timer is set */
  };
  
! /* --------- Definition of ioctl interface --------- */
! 
! #define OV511_INTERFACE_VER 101
! 
! /* LED options */
! enum {
! 	LED_OFF,
! 	LED_ON,
! 	LED_AUTO,
! };
! 
! /* Raw frame formats */
! enum {
! 	RAWFMT_INVALID,
! 	RAWFMT_YUV400,
! 	RAWFMT_YUV420,
! 	RAWFMT_YUV422,
! 	RAWFMT_GBR422,
! };
! 
! /* Unsigned short option numbers */
! enum {
! 	OV511_USOPT_INVALID,
! 	OV511_USOPT_BRIGHT,
! 	OV511_USOPT_SAT,
! 	OV511_USOPT_HUE,
! 	OV511_USOPT_CONTRAST,
! };
! 
! /* Unsigned int option numbers */
! enum {
! 	OV511_UIOPT_INVALID,
! 	OV511_UIOPT_POWER_FREQ,
! 	OV511_UIOPT_BFILTER,
! 	OV511_UIOPT_LED,
! 	OV511_UIOPT_DEBUG,
! 	OV511_UIOPT_COMPRESS,
! };
! 
! struct ov511_ushort_opt {
! 	int optnum;		/* Specific option number */
! 	unsigned short val;
! };
! 
! struct ov511_uint_opt {
! 	int optnum;		/* Specific option number */
! 	unsigned int val;
! };
! 
! struct ov511_i2c_struct {
! 	unsigned char slave; /* Write slave ID (read ID - 1) */
! 	unsigned char reg;   /* Index of register */
! 	unsigned char value; /* User sets this w/ write, driver does w/ read */
! 	unsigned char mask;  /* Bits to be changed. Not used with read ops */
! };
! 
! /* ioctls */
! #define OV511IOC_GINTVER  _IOR('v', BASE_VIDIOCPRIVATE + 0, int)
! #define OV511IOC_GUSHORT _IOWR('v', BASE_VIDIOCPRIVATE + 1, \
! 			       struct ov511_ushort_opt)
! #define OV511IOC_SUSHORT  _IOW('v', BASE_VIDIOCPRIVATE + 2, \
! 			       struct ov511_ushort_opt)
! #define OV511IOC_GUINT   _IOWR('v', BASE_VIDIOCPRIVATE + 3, \
! 			       struct ov511_uint_opt)
! #define OV511IOC_SUINT    _IOW('v', BASE_VIDIOCPRIVATE + 4, \
! 			       struct ov511_uint_opt)
! #define OV511IOC_WI2C     _IOW('v', BASE_VIDIOCPRIVATE + 5, \
! 			       struct ov511_i2c_struct)
! #define OV511IOC_RI2C    _IOWR('v', BASE_VIDIOCPRIVATE + 6, \
! 			       struct ov511_i2c_struct)
! /* ------------- End IOCTL interface -------------- */
! 
! struct usb_ov511;		/* Forward declaration */
  
  struct ov511_sbuf {
! 	struct usb_ov511 *ov;
! 	unsigned char *data;
! 	struct urb *urb;
! 	spinlock_t lock;
! 	int n;
  };
  
  enum {
--- 222,232 ----
  	BUF_PEND_DEALLOC,	/* ov511->buf_timer is set */
  };
  
! struct usb_device;
  
  struct ov511_sbuf {
! 	char *data;
! 	urb_t *urb;
  };
  
  enum {
***************
*** 415,461 ****
  };
  
  struct ov511_frame {
! 	int framenum;		/* Index of this frame */
! 	unsigned char *data;	/* Frame buffer */
! 	unsigned char *tempdata; /* Temp buffer for multi-stage conversions */
! 	unsigned char *rawdata;	/* Raw camera data buffer */
! 	unsigned char *compbuf;	/* Temp buffer for decompressor */
  
  	int depth;		/* Bytes per pixel */
  	int width;		/* Width application is expecting */
! 	int height;		/* Height application is expecting */
  
! 	int rawwidth;		/* Actual width of frame sent from camera */
! 	int rawheight;		/* Actual height of frame sent from camera */
  
  	int sub_flag;		/* Sub-capture mode for this frame? */
  	unsigned int format;	/* Format for this frame */
! 	int compressed;		/* Is frame compressed? */
  
  	volatile int grabstate;	/* State of grabbing */
  	int scanstate;		/* State of scanning */
  
! 	int bytes_recvd;	/* Number of image bytes received from camera */
  
! 	long bytes_read;	/* Amount that has been read() */
  
  	wait_queue_head_t wq;	/* Processes waiting */
  
  	int snapshot;		/* True if frame was a snapshot */
  };
  
! #define DECOMP_INTERFACE_VER 4
! 
! /* Compression module operations */
! struct ov51x_decomp_ops {
! 	int (*decomp_400)(unsigned char *, unsigned char *, unsigned char *,
! 			  int, int, int);
! 	int (*decomp_420)(unsigned char *, unsigned char *, unsigned char *,
! 			  int, int, int);
! 	int (*decomp_422)(unsigned char *, unsigned char *, unsigned char *,
! 			  int, int, int);
! 	struct module *owner;
! };
  
  struct usb_ov511 {
  	struct video_device vdev;
--- 248,283 ----
  };
  
  struct ov511_frame {
! 	char *data;		/* Frame buffer */
  
  	int depth;		/* Bytes per pixel */
  	int width;		/* Width application is expecting */
! 	int height;		/* Height */
  
! 	int hdrwidth;		/* Width the frame actually is */
! 	int hdrheight;		/* Height */
  
  	int sub_flag;		/* Sub-capture mode for this frame? */
  	unsigned int format;	/* Format for this frame */
! 	int segsize;		/* How big is each segment from the camera? */
  
  	volatile int grabstate;	/* State of grabbing */
  	int scanstate;		/* State of scanning */
  
! 	int curline;		/* Line of frame we're working on */
! 	int curpix;
! 	int segment;		/* Segment from the incoming data */
  
! 	long scanlength;	/* uncompressed, raw data length of frame */
! 	long bytes_read;	/* amount of scanlength that has been read from *data */
  
  	wait_queue_head_t wq;	/* Processes waiting */
  
  	int snapshot;		/* True if frame was a snapshot */
  };
  
! #define OV511_NUMFRAMES	2
! #define OV511_NUMSBUF	2
  
  struct usb_ov511 {
  	struct video_device vdev;
***************
*** 464,507 ****
  	struct usb_device *dev;
  
  	int customid;
! 	char *desc;
  	unsigned char iface;
  
  	/* Determined by sensor type */
  	int maxwidth;
  	int maxheight;
- 	int minwidth;
- 	int minheight;
  
  	int brightness;
  	int colour;
  	int contrast;
  	int hue;
  	int whiteness;
- 	int exposure;
- 	int auto_brt;		/* Auto brightness enabled flag */
- 	int auto_gain;		/* Auto gain control enabled flag */
- 	int auto_exp;		/* Auto exposure enabled flag */
- 	int backlight;		/* Backlight exposure algorithm flag */
- 	int mirror;		/* Image is reversed horizontally */
- 
- 	int led_policy;		/* LED: off|on|auto; OV511+ only */
  
! 	struct semaphore lock;	/* Serializes user-accessible operations */
  	int user;		/* user count for exclusive use */
  
  	int streaming;		/* Are we streaming Isochronous? */
  	int grabbing;		/* Are we grabbing? */
  
  	int compress;		/* Should the next frame be compressed? */
- 	int compress_inited;	/* Are compression params uploaded? */
- 
- 	int lightfreq;		/* Power (lighting) frequency */
- 	int bandfilt;		/* Banding filter enabled flag */
  
! 	unsigned char *fbuf;	/* Videodev buffer area */
! 	unsigned char *tempfbuf; /* Temporary (intermediate) buffer area */
! 	unsigned char *rawfbuf;	/* Raw camera data buffer area */
  
  	int sub_flag;		/* Pix Array subcapture on flag */
  	int subx;		/* Pix Array subcapture x offset */
--- 286,313 ----
  	struct usb_device *dev;
  
  	int customid;
! 	int desc;
  	unsigned char iface;
  
  	/* Determined by sensor type */
  	int maxwidth;
  	int maxheight;
  
  	int brightness;
  	int colour;
  	int contrast;
  	int hue;
  	int whiteness;
  
! 	struct semaphore lock;
  	int user;		/* user count for exclusive use */
  
  	int streaming;		/* Are we streaming Isochronous? */
  	int grabbing;		/* Are we grabbing? */
  
  	int compress;		/* Should the next frame be compressed? */
  
! 	char *fbuf;		/* Videodev buffer area */
  
  	int sub_flag;		/* Pix Array subcapture on flag */
  	int subx;		/* Pix Array subcapture x offset */
***************
*** 512,629 ****
  	int curframe;		/* Current receiving sbuf */
  	struct ov511_frame frame[OV511_NUMFRAMES];	
  
  	struct ov511_sbuf sbuf[OV511_NUMSBUF];
  
  	wait_queue_head_t wq;	/* Processes waiting */
  
  	int snap_enabled;	/* Snapshot mode enabled */
  	
! 	int bridge;		/* Type of bridge (BRG_*) */
! 	int bclass;		/* Class of bridge (BCL_*) */
! 	int sensor;		/* Type of image sensor chip (SEN_*) */
! 	int sclass;		/* Type of image sensor chip (SCL_*) */
  
  	int packet_size;	/* Frame size per isoc desc */
- 	int packet_numbering;	/* Is ISO frame numbering enabled? */
  
  	struct semaphore param_lock;	/* params lock for this camera */
! 
! 	/* /proc entries, relative to /proc/video/ov511/ */
! 	struct proc_dir_entry *proc_devdir;   /* Per-device proc directory */
! 	struct proc_dir_entry *proc_info;     /* /info entry */
! 	struct proc_dir_entry *proc_button;   /* /button entry */
! 	struct proc_dir_entry *proc_control;  /* /control entry */
! 
  	/* Framebuffer/sbuf management */
  	int buf_state;
  	struct semaphore buf_lock;
  	struct timer_list buf_timer;
  
! 	struct ov51x_decomp_ops *decomp_ops;
! 
! 	/* Stop streaming while changing picture settings */
! 	int stop_during_set;
! 
! 	int stopped;		/* Streaming is temporarily paused */
! 
! 	/* Video decoder stuff */
! 	int input;		/* Composite, S-VIDEO, etc... */
! 	int num_inputs;		/* Number of inputs */
! 	int norm; 		/* NTSC / PAL / SECAM */
! 	int has_decoder;	/* Device has a video decoder */
! 	int pal;		/* Device is designed for PAL resolution */
! 
! 	/* I2C interface */
! 	struct semaphore i2c_lock;	  /* Protect I2C controller regs */
! 	unsigned char primary_i2c_slave;  /* I2C write id of sensor */
! 
! 	/* Control transaction stuff */
! 	unsigned char *cbuf;		/* Buffer for payload */
! 	struct semaphore cbuf_lock;
  };
  
! /* Used to represent a list of values and their respective symbolic names */
! struct symbolic_list {
  	int num;
  	char *name;
  };
  
! #define NOT_DEFINED_STR "Unknown"
! 
! /* Returns the name of the matching element in the symbolic_list array. The
!  * end of the list must be marked with an element that has a NULL name.
!  */
! static inline char * 
! symbolic(struct symbolic_list list[], int num)
! {
! 	int i;
! 
! 	for (i = 0; list[i].name != NULL; i++)
! 			if (list[i].num == num)
! 				return (list[i].name);
! 
! 	return (NOT_DEFINED_STR);
! }
! 
! /* Compression stuff */
! 
! #define OV511_QUANTABLESIZE	64
! #define OV518_QUANTABLESIZE	32
! 
! #define OV511_YQUANTABLE { \
! 	0, 1, 1, 2, 2, 3, 3, 4, \
! 	1, 1, 1, 2, 2, 3, 4, 4, \
! 	1, 1, 2, 2, 3, 4, 4, 4, \
! 	2, 2, 2, 3, 4, 4, 4, 4, \
! 	2, 2, 3, 4, 4, 5, 5, 5, \
! 	3, 3, 4, 4, 5, 5, 5, 5, \
! 	3, 4, 4, 4, 5, 5, 5, 5, \
! 	4, 4, 4, 4, 5, 5, 5, 5  \
! }
! 
! #define OV511_UVQUANTABLE { \
! 	0, 2, 2, 3, 4, 4, 4, 4, \
! 	2, 2, 2, 4, 4, 4, 4, 4, \
! 	2, 2, 3, 4, 4, 4, 4, 4, \
! 	3, 4, 4, 4, 4, 4, 4, 4, \
! 	4, 4, 4, 4, 4, 4, 4, 4, \
! 	4, 4, 4, 4, 4, 4, 4, 4, \
! 	4, 4, 4, 4, 4, 4, 4, 4, \
! 	4, 4, 4, 4, 4, 4, 4, 4  \
! }
! 
! #define OV518_YQUANTABLE { \
! 	5, 4, 5, 6, 6, 7, 7, 7, \
! 	5, 5, 5, 5, 6, 7, 7, 7, \
! 	6, 6, 6, 6, 7, 7, 7, 8, \
! 	7, 7, 6, 7, 7, 7, 8, 8  \
! }
! 
! #define OV518_UVQUANTABLE { \
! 	6, 6, 6, 7, 7, 7, 7, 7, \
! 	6, 6, 6, 7, 7, 7, 7, 7, \
! 	6, 6, 6, 7, 7, 7, 7, 8, \
! 	7, 7, 7, 7, 7, 7, 8, 8  \
! }
  
  #endif
--- 318,371 ----
  	int curframe;		/* Current receiving sbuf */
  	struct ov511_frame frame[OV511_NUMFRAMES];	
  
+ 	int cursbuf;		/* Current receiving sbuf */
  	struct ov511_sbuf sbuf[OV511_NUMSBUF];
  
+ 	/* Scratch space from the Isochronous pipe */
+ 	unsigned char scratch[SCRATCH_BUF_SIZE];
+ 	int scratchlen;
+ 
  	wait_queue_head_t wq;	/* Processes waiting */
  
  	int snap_enabled;	/* Snapshot mode enabled */
  	
! 	int bridge;		/* Type of bridge (OV511 or OV511+) */
! 	int sensor;		/* Type of image sensor chip */
  
  	int packet_size;	/* Frame size per isoc desc */
  
+ 				/* proc interface */
  	struct semaphore param_lock;	/* params lock for this camera */
! 	struct proc_dir_entry *proc_entry;	/* /proc/ov511/videoX */
! 	
  	/* Framebuffer/sbuf management */
  	int buf_state;
  	struct semaphore buf_lock;
  	struct timer_list buf_timer;
+ };
  
! struct cam_list {
! 	int id;
! 	char *description;
  };
  
! struct palette_list {
  	int num;
  	char *name;
  };
  
! struct mode_list {
! 	int width;
! 	int height;
! 	int color;		/* 0=grayscale, 1=color */
! 	u8 pxcnt;		/* pixel counter */
! 	u8 lncnt;		/* line counter */
! 	u8 pxdv;		/* pixel divisor */
! 	u8 lndv;		/* line divisor */
! 	u8 m420;
! 	u8 common_A;
! 	u8 common_L;
! };
  
  #endif
+ 
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pegasus.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pegasus.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pegasus.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pegasus.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,58 ****
  /*
!  *  Copyright (c) 1999-2002 Petko Manolov (petkan@users.sourceforge.net)
!  *
   * This program is free software; you can redistribute it and/or modify
!  * it under the terms of the GNU General Public License version 2 as
!  * published by the Free Software Foundation.
!  *	
   *
!  *	ChangeLog:
!  *		....	Most of the time spend reading sources & docs.
!  *		v0.2.x	First official release for the Linux kernel.
!  *		v0.3.0	Beutified and structured, some bugs fixed.
!  *		v0.3.x	URBifying bulk requests and bugfixing. First relatively
!  *			stable release. Still can touch device's registers only
!  *			from top-halves.
!  *		v0.4.0	Control messages remained unurbified are now URBs.
!  *			Now we can touch the HW at any time.
!  *		v0.4.9	Control urbs again use process context to wait. Argh...
!  *			Some long standing bugs (enable_net_traffic) fixed.
!  *			Also nasty trick about resubmiting control urb from
!  *			interrupt context used. Please let me know how it
!  *			behaves. Pegasus II support added since this version.
!  *			TODO: suppressing HCD warnings spewage on disconnect.
!  *		v0.4.13	Ethernet address is now set at probe(), not at open()
!  *			time as this seems to break dhcpd. 
!  *		v0.4.25	ethtool support added.
   */
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
- #include 
  #include 
  #include 
- #include 
  #include "pegasus.h"
  
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v0.4.26 (2002/03/21)"
! #define DRIVER_AUTHOR "Petko Manolov "
  #define DRIVER_DESC "Pegasus/Pegasus II USB Ethernet driver"
  
  #define	PEGASUS_USE_INTR
  #define	PEGASUS_WRITE_EEPROM
- #define	BMSR_MEDIA	(BMSR_10HALF | BMSR_10FULL | BMSR_100HALF | \
- 			BMSR_100FULL | BMSR_ANEGCAPABLE)
  
  static int loopback = 0;
! static int mii_mode = 1;
  static int multicast_filter_limit = 32;
  
  static struct usb_eth_dev usb_dev_id[] = {
--- 1,67 ----
  /*
! **	Pegasus: USB 10/100Mbps/HomePNA (1Mbps) Controller
! **
! **	Copyright (c) 1999-2001 Petko Manolov (pmanolov@lnxw.com)
! **	
! **
! **	ChangeLog:
! **		....	Most of the time spend reading sources & docs.
! **		v0.2.x	First official release for the Linux kernel.
! **		v0.3.0	Beutified and structured, some bugs fixed.
! **		v0.3.x	URBifying bulk requests and bugfixing. First relatively
! **			stable release. Still can touch device's registers only
! **			from top-halves.
! **		v0.4.0	Control messages remained unurbified are now URBs.
! **			Now we can touch the HW at any time.
! **		v0.4.9	Control urbs again use process context to wait. Argh...
! **			Some long standing bugs (enable_net_traffic) fixed.
! **			Also nasty trick about resubmiting control urb from
! **			interrupt context used. Please let me know how it
! **			behaves. Pegasus II support added since this version.
! **			TODO: suppressing HCD warnings spewage on disconnect.
! **		v0.4.13	Ethernet address is now set at probe(), not at open()
! **			time as this seems to break dhcpd. 
! */
! 
! /*
   * This program is free software; you can redistribute it and/or modify
!  * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
   */
  
+ 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include "pegasus.h"
  
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v0.4.22 (2001/12/07)"
! #define DRIVER_AUTHOR "Petko Manolov "
  #define DRIVER_DESC "Pegasus/Pegasus II USB Ethernet driver"
  
  #define	PEGASUS_USE_INTR
  #define	PEGASUS_WRITE_EEPROM
  
  static int loopback = 0;
! static int mii_mode = 0;
  static int multicast_filter_limit = 32;
  
  static struct usb_eth_dev usb_dev_id[] = {
***************
*** 68,169 ****
  	{match_flags: USB_DEVICE_ID_MATCH_DEVICE, idVendor:vid, idProduct:pid},
  #include "pegasus.h"
  #undef	PEGASUS_DEV
! 	{}
  };
  
! MODULE_AUTHOR(DRIVER_AUTHOR);
! MODULE_DESCRIPTION(DRIVER_DESC);
  MODULE_LICENSE("GPL");
  MODULE_PARM(loopback, "i");
  MODULE_PARM(mii_mode, "i");
  MODULE_PARM_DESC(loopback, "Enable MAC loopback mode (bit 0)");
  MODULE_PARM_DESC(mii_mode, "Enable HomePNA mode (bit 0),default=MII mode = 0");
  
! MODULE_DEVICE_TABLE(usb, pegasus_ids);
  
! static int update_eth_regs_async(pegasus_t *);
  /* Aargh!!! I _really_ hate such tweaks */
! static void ctrl_callback(struct urb *urb)
  {
! 	pegasus_t *pegasus = urb->context;
  
! 	if (!pegasus)
  		return;
  
! 	switch (urb->status) {
! 	case 0:
! 		if (pegasus->flags & ETH_REGS_CHANGE) {
! 			pegasus->flags &= ~ETH_REGS_CHANGE;
! 			pegasus->flags |= ETH_REGS_CHANGED;
! 			update_eth_regs_async(pegasus);
  			return;
! 		}
! 		break;
! 	case -EINPROGRESS:
! 		return;
! 	case -ENOENT:
! 		break;
! 	default:
! 		warn("%s: status %d", __FUNCTION__, urb->status);
  	}
  	pegasus->flags &= ~ETH_REGS_CHANGED;
! 	wake_up(&pegasus->ctrl_wait);
  }
  
! static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
! 			 void *data)
  {
! 	int ret;
  	unsigned char *buffer;
  	DECLARE_WAITQUEUE(wait, current);
  
! 	buffer = kmalloc(size, GFP_KERNEL);
  	if (!buffer) {
  		err("unable to allocate memory for configuration descriptors");
  		return 0;
  	}
! 	memcpy(buffer, data, size);
  
  	add_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_UNINTERRUPTIBLE);
! 	while (pegasus->flags & ETH_REGS_CHANGED)
  		schedule();
  	remove_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_RUNNING);
  
! 	pegasus->dr.bRequestType = PEGASUS_REQT_READ;
! 	pegasus->dr.bRequest = PEGASUS_REQ_GET_REGS;
! 	pegasus->dr.wValue = cpu_to_le16(0);
! 	pegasus->dr.wIndex = cpu_to_le16p(&indx);
! 	pegasus->dr.wLength = cpu_to_le16p(&size);
! 	pegasus->ctrl_urb->transfer_buffer_length = size;
! 
! 	FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
! 			 usb_rcvctrlpipe(pegasus->usb, 0),
! 			 (char *) &pegasus->dr,
! 			 buffer, size, ctrl_callback, pegasus);
  
! 	add_wait_queue(&pegasus->ctrl_wait, &wait);
! 	set_current_state(TASK_UNINTERRUPTIBLE);
  
! 	if ((ret = usb_submit_urb(pegasus->ctrl_urb))) {
! 		err("%s: BAD CTRLs %d", __FUNCTION__, ret);
  		goto out;
  	}
  
  	schedule();
  out:
! 	remove_wait_queue(&pegasus->ctrl_wait, &wait);
! 	memcpy(data, buffer, size);
  	kfree(buffer);
  
  	return ret;
  }
  
! static int set_registers(pegasus_t * pegasus, __u16 indx, __u16 size,
! 			 void *data)
  {
! 	int ret;
  	unsigned char *buffer;
  	DECLARE_WAITQUEUE(wait, current);
  
--- 77,180 ----
  	{match_flags: USB_DEVICE_ID_MATCH_DEVICE, idVendor:vid, idProduct:pid},
  #include "pegasus.h"
  #undef	PEGASUS_DEV
! 	{ }
  };
  
! 
! MODULE_AUTHOR( DRIVER_AUTHOR );
! MODULE_DESCRIPTION( DRIVER_DESC );
  MODULE_LICENSE("GPL");
  MODULE_PARM(loopback, "i");
  MODULE_PARM(mii_mode, "i");
  MODULE_PARM_DESC(loopback, "Enable MAC loopback mode (bit 0)");
  MODULE_PARM_DESC(mii_mode, "Enable HomePNA mode (bit 0),default=MII mode = 0");
  
! MODULE_DEVICE_TABLE (usb, pegasus_ids);
! 
  
! static int update_eth_regs_async( pegasus_t * );
  /* Aargh!!! I _really_ hate such tweaks */
! static void ctrl_callback( urb_t *urb )
  {
! 	pegasus_t	*pegasus = urb->context;
  
! 	if ( !pegasus )
  		return;
  
! 	switch ( urb->status ) {
! 		case USB_ST_NOERROR:
! 			if ( pegasus->flags & ETH_REGS_CHANGE ) {
! 				pegasus->flags &= ~ETH_REGS_CHANGE;
! 				pegasus->flags |= ETH_REGS_CHANGED;
! 				update_eth_regs_async( pegasus );
! 				return;
! 			}
! 			break;
! 		case USB_ST_URB_PENDING:
  			return;
! 		case USB_ST_URB_KILLED:
! 			break;
! 		default:
! 			warn( __FUNCTION__ " status %d", urb->status);
  	}
  	pegasus->flags &= ~ETH_REGS_CHANGED;
! 	wake_up(&pegasus->ctrl_wait );
  }
  
! 
! static int get_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data)
  {
! 	int	ret;
  	unsigned char *buffer;
  	DECLARE_WAITQUEUE(wait, current);
  
! 	buffer = kmalloc(size,GFP_KERNEL);
  	if (!buffer) {
  		err("unable to allocate memory for configuration descriptors");
  		return 0;
  	}
! 	memcpy(buffer,data,size);
  
  	add_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_UNINTERRUPTIBLE);
! 	while ( pegasus->flags & ETH_REGS_CHANGED )
  		schedule();
  	remove_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_RUNNING);
  
! 	pegasus->dr.requesttype = PEGASUS_REQT_READ;
! 	pegasus->dr.request = PEGASUS_REQ_GET_REGS;
! 	pegasus->dr.value = cpu_to_le16 (0);
! 	pegasus->dr.index = cpu_to_le16p(&indx);
! 	pegasus->dr.length = cpu_to_le16p(&size);
! 	pegasus->ctrl_urb.transfer_buffer_length = size;
! 
! 	FILL_CONTROL_URB( &pegasus->ctrl_urb, pegasus->usb,
! 			  usb_rcvctrlpipe(pegasus->usb,0),
! 			  (char *)&pegasus->dr,
! 			  buffer, size, ctrl_callback, pegasus );
  
! 	add_wait_queue( &pegasus->ctrl_wait, &wait );
! 	set_current_state( TASK_UNINTERRUPTIBLE );
  
! 	if ( (ret = usb_submit_urb( &pegasus->ctrl_urb )) ) {
! 		err( __FUNCTION__ " BAD CTRLs %d", ret);
  		goto out;
  	}
  
  	schedule();
  out:
! 	remove_wait_queue( &pegasus->ctrl_wait, &wait );
! 	memcpy(data,buffer,size);
  	kfree(buffer);
  
  	return ret;
  }
  
! 
! static int set_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data)
  {
! 	int	ret;
  	unsigned char *buffer;
  	DECLARE_WAITQUEUE(wait, current);
  
***************
*** 176,221 ****
  
  	add_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_UNINTERRUPTIBLE);
! 	while (pegasus->flags & ETH_REGS_CHANGED)
  		schedule();
  	remove_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_RUNNING);
  
! 	pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
! 	pegasus->dr.bRequest = PEGASUS_REQ_SET_REGS;
! 	pegasus->dr.wValue = cpu_to_le16(0);
! 	pegasus->dr.wIndex = cpu_to_le16p(&indx);
! 	pegasus->dr.wLength = cpu_to_le16p(&size);
! 	pegasus->ctrl_urb->transfer_buffer_length = size;
! 
! 	FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
! 			 usb_sndctrlpipe(pegasus->usb, 0),
! 			 (char *) &pegasus->dr,
! 			 buffer, size, ctrl_callback, pegasus);
! 
! 	add_wait_queue(&pegasus->ctrl_wait, &wait);
! 	set_current_state(TASK_UNINTERRUPTIBLE);
  
! 	if ((ret = usb_submit_urb(pegasus->ctrl_urb))) {
! 		err("%s: BAD CTRL %d", __FUNCTION__, ret);
  		goto out;
  	}
! 
  	schedule();
  out:
! 	remove_wait_queue(&pegasus->ctrl_wait, &wait);
  	kfree(buffer);
! 
  	return ret;
  }
  
! static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data)
  {
! 	int ret;
  	unsigned char *buffer;
  	__u16 dat = data;
  	DECLARE_WAITQUEUE(wait, current);
! 
  	buffer = kmalloc(1, GFP_KERNEL);
  	if (!buffer) {
  		err("unable to allocate memory for configuration descriptors");
--- 187,233 ----
  
  	add_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_UNINTERRUPTIBLE);
! 	while ( pegasus->flags & ETH_REGS_CHANGED )
  		schedule();
  	remove_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_RUNNING);
  
! 	pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
! 	pegasus->dr.request = PEGASUS_REQ_SET_REGS;
! 	pegasus->dr.value = cpu_to_le16 (0);
! 	pegasus->dr.index = cpu_to_le16p( &indx );
! 	pegasus->dr.length = cpu_to_le16p( &size );
! 	pegasus->ctrl_urb.transfer_buffer_length = size;
! 
! 	FILL_CONTROL_URB( &pegasus->ctrl_urb, pegasus->usb,
! 			  usb_sndctrlpipe(pegasus->usb,0),
! 			  (char *)&pegasus->dr,
! 			  buffer, size, ctrl_callback, pegasus );
! 			  
! 	add_wait_queue( &pegasus->ctrl_wait, &wait );
! 	set_current_state( TASK_UNINTERRUPTIBLE );
  
! 	if ( (ret = usb_submit_urb( &pegasus->ctrl_urb )) ) {
! 		err( __FUNCTION__ " BAD CTRL %d", ret);
  		goto out;
  	}
! 	
  	schedule();
  out:
! 	remove_wait_queue( &pegasus->ctrl_wait, &wait );
  	kfree(buffer);
! 	
  	return ret;
  }
  
! 
! static int set_register( pegasus_t *pegasus, __u16 indx, __u8 data )
  {
! 	int	ret;
  	unsigned char *buffer;
  	__u16 dat = data;
  	DECLARE_WAITQUEUE(wait, current);
! 	
  	buffer = kmalloc(1, GFP_KERNEL);
  	if (!buffer) {
  		err("unable to allocate memory for configuration descriptors");
***************
*** 225,539 ****
  
  	add_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_UNINTERRUPTIBLE);
! 	while (pegasus->flags & ETH_REGS_CHANGED)
  		schedule();
  	remove_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_RUNNING);
  
! 	pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
! 	pegasus->dr.bRequest = PEGASUS_REQ_SET_REG;
! 	pegasus->dr.wValue = cpu_to_le16p(&dat);
! 	pegasus->dr.wIndex = cpu_to_le16p(&indx);
! 	pegasus->dr.wLength = cpu_to_le16(1);
! 	pegasus->ctrl_urb->transfer_buffer_length = 1;
! 
! 	FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
! 			 usb_sndctrlpipe(pegasus->usb, 0),
! 			 (char *) &pegasus->dr,
! 			 buffer, 1, ctrl_callback, pegasus);
  
! 	add_wait_queue(&pegasus->ctrl_wait, &wait);
! 	set_current_state(TASK_UNINTERRUPTIBLE);
  
! 	if ((ret = usb_submit_urb(pegasus->ctrl_urb))) {
! 		err("%s: BAD CTRL %d", __FUNCTION__, ret);
  		goto out;
  	}
  
  	schedule();
  out:
! 	remove_wait_queue(&pegasus->ctrl_wait, &wait);
  	kfree(buffer);
  
  	return ret;
  }
  
! static int update_eth_regs_async(pegasus_t * pegasus)
  {
! 	int ret;
  
! 	pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
! 	pegasus->dr.bRequest = PEGASUS_REQ_SET_REGS;
! 	pegasus->dr.wValue = 0;
! 	pegasus->dr.wIndex = cpu_to_le16(EthCtrl0);
! 	pegasus->dr.wLength = cpu_to_le16(3);
! 	pegasus->ctrl_urb->transfer_buffer_length = 3;
! 
! 	FILL_CONTROL_URB(pegasus->ctrl_urb, pegasus->usb,
! 			 usb_sndctrlpipe(pegasus->usb, 0),
! 			 (char *) &pegasus->dr,
! 			 pegasus->eth_regs, 3, ctrl_callback, pegasus);
! 
! 	if ((ret = usb_submit_urb(pegasus->ctrl_urb)))
! 		err("%s: BAD CTRL %d, flgs %x", __FUNCTION__, ret,
! 		    pegasus->flags);
  
! 	return ret;
  }
  
! static int read_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 * regd)
  {
! 	int i;
! 	__u8 data[4] = { phy, 0, 0, indx };
! 	__u16 regdi;
! 
! 	set_register(pegasus, PhyCtrl, 0);
! 	set_registers(pegasus, PhyAddr, sizeof(data), data);
! 	set_register(pegasus, PhyCtrl, (indx | PHY_READ));
  	for (i = 0; i < REG_TIMEOUT; i++) {
  		get_registers(pegasus, PhyCtrl, 1, data);
! 		if (data[0] & PHY_DONE)
  			break;
  	}
! 	if (i < REG_TIMEOUT) {
! 		get_registers(pegasus, PhyData, 2, ®di);
  		*regd = le16_to_cpu(regdi);
! 		return 0;
  	}
! 	warn("%s: failed", __FUNCTION__);
! 
  	return 1;
  }
  
- static int write_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 regd)
- {
- 	int i;
- 	__u8 data[4] = { phy, 0, 0, indx };
  
! 	*(data + 1) = cpu_to_le16p(®d);
! 	set_register(pegasus, PhyCtrl, 0);
! 	set_registers(pegasus, PhyAddr, 4, data);
! 	set_register(pegasus, PhyCtrl, (indx | PHY_WRITE));
  	for (i = 0; i < REG_TIMEOUT; i++) {
  		get_registers(pegasus, PhyCtrl, 1, data);
! 		if (data[0] & PHY_DONE)
  			break;
  	}
! 	if (i < REG_TIMEOUT)
! 		return 0;
! 	warn("%s: failed", __FUNCTION__);
  
  	return 1;
  }
  
! static int read_eprom_word(pegasus_t * pegasus, __u8 index, __u16 * retdata)
  {
! 	int i;
  	__u8 tmp;
  	__u16 retdatai;
! 
! 	set_register(pegasus, EpromCtrl, 0);
! 	set_register(pegasus, EpromOffset, index);
! 	set_register(pegasus, EpromCtrl, EPROM_READ);
! 
! 	for (i = 0; i < REG_TIMEOUT; i++) {
! 		get_registers(pegasus, EpromCtrl, 1, &tmp);
! 		if (tmp & EPROM_DONE)
  			break;
  	}
! 	if (i < REG_TIMEOUT) {
! 		get_registers(pegasus, EpromData, 2, &retdatai);
! 		*retdata = le16_to_cpu(retdatai);
! 		return 0;
  	}
! 	warn("%s: failed", __FUNCTION__);
  
  	return -1;
  }
  
  #ifdef	PEGASUS_WRITE_EEPROM
! static inline void enable_eprom_write(pegasus_t * pegasus)
  {
! 	__u8 tmp;
  
! 	get_registers(pegasus, EthCtrl2, 1, &tmp);
! 	set_register(pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE);
  }
  
! static inline void disable_eprom_write(pegasus_t * pegasus)
  {
! 	__u8 tmp;
  
! 	get_registers(pegasus, EthCtrl2, 1, &tmp);
! 	set_register(pegasus, EpromCtrl, 0);
! 	set_register(pegasus, EthCtrl2, tmp & ~EPROM_WR_ENABLE);
  }
  
! static int write_eprom_word(pegasus_t * pegasus, __u8 index, __u16 data)
  {
! 	int i, tmp;
! 	__u8 d[4] = { 0x3f, 0, 0, EPROM_WRITE };
  
! 	set_registers(pegasus, EpromOffset, 4, d);
! 	enable_eprom_write(pegasus);
! 	set_register(pegasus, EpromOffset, index);
! 	set_registers(pegasus, EpromData, 2, &data);
! 	set_register(pegasus, EpromCtrl, EPROM_WRITE);
  
! 	for (i = 0; i < REG_TIMEOUT; i++) {
! 		get_registers(pegasus, EpromCtrl, 1, &tmp);
! 		if (tmp & EPROM_DONE)
  			break;
  	}
! 	disable_eprom_write(pegasus);
! 	if (i < REG_TIMEOUT)
! 		return 0;
! 	warn("%s: failed", __FUNCTION__);
! 	return -1;
  }
! #endif				/* PEGASUS_WRITE_EEPROM */
  
! static inline void get_node_id(pegasus_t * pegasus, __u8 * id)
  {
! 	int i;
  	__u16 w16;
! 
  	for (i = 0; i < 3; i++) {
! 		read_eprom_word(pegasus, i, &w16);
! 		((__u16 *) id)[i] = cpu_to_le16p(&w16);
  	}
  }
  
! static void set_ethernet_addr(pegasus_t * pegasus)
  {
! 	__u8 node_id[6];
  
  	get_node_id(pegasus, node_id);
! 	set_registers(pegasus, EthID, sizeof(node_id), node_id);
! 	memcpy(pegasus->net->dev_addr, node_id, sizeof(node_id));
  }
  
! static inline int reset_mac(pegasus_t * pegasus)
  {
! 	__u8 data = 0x8;
! 	int i;
  
  	set_register(pegasus, EthCtrl1, data);
  	for (i = 0; i < REG_TIMEOUT; i++) {
  		get_registers(pegasus, EthCtrl1, 1, &data);
  		if (~data & 0x08) {
! 			if (loopback & 1)
  				break;
! 			if (mii_mode && (pegasus->features & HAS_HOME_PNA))
! 				set_register(pegasus, Gpio1, 0x34);
  			else
! 				set_register(pegasus, Gpio1, 0x26);
! 			set_register(pegasus, Gpio0, pegasus->features);
! 			set_register(pegasus, Gpio0, DEFAULT_GPIO_SET);
  			break;
  		}
  	}
! 	if (i == REG_TIMEOUT)
  		return 1;
  
! 	if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS ||
! 	    usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK) {
! 		__u16 auxmode;
! 
! 		read_mii_word(pegasus, 1, 0x1b, &auxmode);
! 		write_mii_word(pegasus, 1, 0x1b, auxmode | 4);
! 	}
! 	if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_ELCON) {
! 		__u16 auxmode;
! 		read_mii_word(pegasus, 3, 0x1b, &auxmode);
! 		write_mii_word(pegasus, 3, 0x1b, auxmode | 4);
  	}
! 	return 0;
  }
  
! static int enable_net_traffic(struct net_device *dev, struct usb_device *usb)
  {
! 	__u16 linkpart, bmsr;
! 	__u8 data[4];
  	pegasus_t *pegasus = dev->priv;
  
! 	/* read twice 'cos this is a latch bit */
! 	read_mii_word(pegasus, pegasus->phy, MII_BMSR, &bmsr);
! 	read_mii_word(pegasus, pegasus->phy, MII_BMSR, &bmsr);
! 	if (read_mii_word(pegasus, pegasus->phy, MII_LPA, &linkpart))
  		return 2;
! 	if (!(linkpart & 1))
! 		warn("link partner stat %x", linkpart);
  
  	data[0] = 0xc9;
  	data[1] = 0;
! 	if (linkpart & (ADVERTISE_100FULL | ADVERTISE_10FULL))
! 		data[1] |= 0x20;	/* set full duplex */
! 	if (linkpart & (ADVERTISE_100FULL | ADVERTISE_100HALF))
! 		data[1] |= 0x10;	/* set 100 Mbps */
! 	if (mii_mode)
  		data[1] = 0;
  	data[2] = (loopback & 1) ? 0x09 : 0x01;
! 	memcpy(pegasus->eth_regs, data, sizeof(data));
! 	set_registers(pegasus, EthCtrl0, 3, data);
  
  	return 0;
  }
  
! static void read_bulk_callback(struct urb *urb)
  {
  	pegasus_t *pegasus = urb->context;
  	struct net_device *net;
  	int count = urb->actual_length, res;
  	int rx_status;
! 	struct sk_buff *skb;
  	__u16 pkt_len;
  
! 	if (!pegasus || !(pegasus->flags & PEGASUS_RUNNING))
  		return;
  
  	net = pegasus->net;
! 	if (!netif_device_present(net))
  		return;
  
! 	if (pegasus->flags & PEGASUS_RX_BUSY) {
  		pegasus->stats.rx_errors++;
  		dbg("pegasus Rx busy");
  		return;
  	}
  	pegasus->flags |= PEGASUS_RX_BUSY;
  
! 	switch (urb->status) {
! 	case 0:
! 		break;
! 	case -ETIMEDOUT:
! 		dbg("reset MAC");
! 		pegasus->flags &= ~PEGASUS_RX_BUSY;
! 		break;
! 	default:
! 		dbg("%s: RX status %d", net->name, urb->status);
! 		goto goon;
  	}
  
! 	if (!count)
  		goto goon;
  
! 	rx_status = le32_to_cpu(*(int *) (pegasus->rx_buff + count - 4));
! 	if (rx_status & 0x000e0000) {
  		dbg("%s: RX packet error %x", net->name, rx_status & 0xe0000);
  		pegasus->stats.rx_errors++;
! 		if (rx_status & 0x060000)
  			pegasus->stats.rx_length_errors++;
! 		if (rx_status & 0x080000)
  			pegasus->stats.rx_crc_errors++;
! 		if (rx_status & 0x100000)
  			pegasus->stats.rx_frame_errors++;
  		goto goon;
  	}
  
  	pkt_len = (rx_status & 0xfff) - 8;
  
! 	if (!(skb = dev_alloc_skb(pkt_len + 2)))
  		goto goon;
  
  	skb->dev = net;
--- 237,561 ----
  
  	add_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_UNINTERRUPTIBLE);
! 	while ( pegasus->flags & ETH_REGS_CHANGED )
  		schedule();
  	remove_wait_queue(&pegasus->ctrl_wait, &wait);
  	set_current_state(TASK_RUNNING);
  
! 	pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
! 	pegasus->dr.request = PEGASUS_REQ_SET_REG;
! 	pegasus->dr.value = cpu_to_le16p( &dat);
! 	pegasus->dr.index = cpu_to_le16p( &indx );
! 	pegasus->dr.length = cpu_to_le16( 1 );
! 	pegasus->ctrl_urb.transfer_buffer_length = 1;
! 
! 	FILL_CONTROL_URB( &pegasus->ctrl_urb, pegasus->usb,
! 			  usb_sndctrlpipe(pegasus->usb,0),
! 			  (char *)&pegasus->dr,
! 			  buffer, 1, ctrl_callback, pegasus );
  
! 	add_wait_queue( &pegasus->ctrl_wait, &wait );
! 	set_current_state( TASK_UNINTERRUPTIBLE );
  
! 	if ( (ret = usb_submit_urb( &pegasus->ctrl_urb )) ) {
! 		err( __FUNCTION__ " BAD CTRL %d", ret);
  		goto out;
  	}
  
  	schedule();
  out:
! 	remove_wait_queue( &pegasus->ctrl_wait, &wait );
  	kfree(buffer);
  
  	return ret;
  }
  
! 
! static int update_eth_regs_async( pegasus_t *pegasus )
  {
! 	int	ret;
  
! 	pegasus->dr.requesttype = PEGASUS_REQT_WRITE;
! 	pegasus->dr.request = PEGASUS_REQ_SET_REGS;
! 	pegasus->dr.value = 0;
! 	pegasus->dr.index =  cpu_to_le16(EthCtrl0);
! 	pegasus->dr.length = cpu_to_le16(3);
! 	pegasus->ctrl_urb.transfer_buffer_length = 3;
  
! 	FILL_CONTROL_URB( &pegasus->ctrl_urb, pegasus->usb,
! 			  usb_sndctrlpipe(pegasus->usb,0),
! 			  (char *)&pegasus->dr,
! 			  pegasus->eth_regs, 3, ctrl_callback, pegasus );
! 
! 	if ( (ret = usb_submit_urb( &pegasus->ctrl_urb )) )
! 		err( __FUNCTION__ " BAD CTRL %d, flags %x",ret,pegasus->flags );
! 
! 	return	ret;
  }
  
! 
! static int read_mii_word( pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 *regd )
  {
! 	int	i;
! 	__u8	data[4] = { phy, 0, 0, indx };
! 	__u16  regdi;
! 	
! 	set_register( pegasus, PhyCtrl, 0 );
! 	set_registers( pegasus, PhyAddr, sizeof(data), data );
! 	set_register( pegasus, PhyCtrl, (indx | PHY_READ) );
  	for (i = 0; i < REG_TIMEOUT; i++) {
  		get_registers(pegasus, PhyCtrl, 1, data);
! 		if ( data[0] & PHY_DONE ) 
  			break;
  	}
! 	if ( i < REG_TIMEOUT ) {
! 		get_registers( pegasus, PhyData, 2, ®di );
  		*regd = le16_to_cpu(regdi);
! 		return	0;
  	}
! 	warn( __FUNCTION__ " failed" );
! 	
  	return 1;
  }
  
  
! static int write_mii_word( pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 regd )
! {
! 	int	i;
! 	__u8	data[4] = { phy, 0, 0, indx };
! 	
! 	*(data + 1) = cpu_to_le16p( ®d );
! 	set_register( pegasus, PhyCtrl, 0 );
! 	set_registers( pegasus, PhyAddr, 4, data );
! 	set_register( pegasus, PhyCtrl, (indx | PHY_WRITE) );
  	for (i = 0; i < REG_TIMEOUT; i++) {
  		get_registers(pegasus, PhyCtrl, 1, data);
! 		if ( data[0] & PHY_DONE ) 
  			break;
  	}
! 	if ( i < REG_TIMEOUT )
! 		return	0;
! 	warn( __FUNCTION__ " failed" );
  
  	return 1;
  }
  
! 
! static int read_eprom_word( pegasus_t *pegasus, __u8 index, __u16 *retdata )
  {
! 	int	i;
  	__u8 tmp;
  	__u16 retdatai;
! 	
! 	set_register( pegasus, EpromCtrl, 0 );
! 	set_register( pegasus, EpromOffset, index );
! 	set_register( pegasus, EpromCtrl, EPROM_READ); 
! 
! 	for ( i=0; i < REG_TIMEOUT; i++ ) {
! 		get_registers( pegasus, EpromCtrl, 1, &tmp );
! 		if ( tmp & EPROM_DONE )
  			break;
  	}
! 	if ( i < REG_TIMEOUT ) {
! 		get_registers( pegasus, EpromData, 2, &retdatai );
! 		*retdata = le16_to_cpu (retdatai);
! 		return	0;
  	}
! 	warn( __FUNCTION__ " failed" );
  
  	return -1;
  }
  
  #ifdef	PEGASUS_WRITE_EEPROM
! static inline void enable_eprom_write( pegasus_t *pegasus )
  {
! 	__u8	tmp;
  
! 	get_registers( pegasus, EthCtrl2, 1, &tmp );
! 	set_register( pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE );
  }
  
! 
! static inline void disable_eprom_write( pegasus_t *pegasus )
  {
! 	__u8 	tmp;
  
! 	get_registers( pegasus, EthCtrl2, 1, &tmp );
! 	set_register( pegasus, EpromCtrl, 0 );
! 	set_register( pegasus, EthCtrl2, tmp & ~EPROM_WR_ENABLE );
  }
  
! 
! static int write_eprom_word( pegasus_t *pegasus, __u8 index, __u16 data )
  {
! 	int	i, tmp;
! 	__u8	d[4] = {0x3f, 0, 0, EPROM_WRITE};
  
! 	set_registers( pegasus, EpromOffset, 4, d );
! 	enable_eprom_write( pegasus );
! 	set_register( pegasus, EpromOffset, index );
! 	set_registers( pegasus, EpromData, 2, &data );
! 	set_register( pegasus, EpromCtrl, EPROM_WRITE );
  
! 	for ( i=0; i < REG_TIMEOUT; i++ ) {
! 		get_registers( pegasus, EpromCtrl, 1, &tmp );
! 		if ( tmp & EPROM_DONE )
  			break;
  	}
! 	disable_eprom_write( pegasus );
! 	if ( i < REG_TIMEOUT )
! 		return	0;
! 	warn( __FUNCTION__ " failed" );
! 	return	-1;
  }
! #endif	/* PEGASUS_WRITE_EEPROM */
  
! static inline void get_node_id( pegasus_t *pegasus, __u8 *id )
  {
! 	int	i;
  	__u16 w16;
! 	
  	for (i = 0; i < 3; i++) {
! 		read_eprom_word( pegasus, i, &w16);
! 		((__u16 *) id)[i] = cpu_to_le16p (&w16);
  	}
  }
  
! 
! static void set_ethernet_addr( pegasus_t *pegasus )
  {
! 	__u8	node_id[6];
  
  	get_node_id(pegasus, node_id);
! 	set_registers( pegasus, EthID, sizeof(node_id), node_id );
! 	memcpy( pegasus->net->dev_addr, node_id, sizeof(node_id) );
  }
  
! 
! static inline int reset_mac( pegasus_t *pegasus )
  {
! 	__u8	data = 0x8;
! 	int	i;
  
  	set_register(pegasus, EthCtrl1, data);
  	for (i = 0; i < REG_TIMEOUT; i++) {
  		get_registers(pegasus, EthCtrl1, 1, &data);
  		if (~data & 0x08) {
! 			if (loopback & 1) 
  				break;
! 			if ( mii_mode && (pegasus->features & HAS_HOME_PNA) )
! 				set_register( pegasus, Gpio1, 0x34 );
  			else
! 				set_register( pegasus, Gpio1, 0x26 );
! 			set_register( pegasus, Gpio0, pegasus->features );
! 			set_register( pegasus, Gpio0, DEFAULT_GPIO_SET );
  			break;
  		}
  	}
! 	if ( i == REG_TIMEOUT )
  		return 1;
  
! 	if ( usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS ||
! 	     usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK ) {
! 		__u16	auxmode;
! 
! 		read_mii_word( pegasus, 0, 0x1b, &auxmode );
! 		write_mii_word( pegasus, 0, 0x1b, auxmode | 4 );
  	}
! 
! 	return	0;
  }
  
! 
! static int enable_net_traffic( struct net_device *dev, struct usb_device *usb )
  {
! 	__u16	linkpart, bmsr;
! 	__u8	data[4];
  	pegasus_t *pegasus = dev->priv;
  
! 
! 	if ( read_mii_word(pegasus, pegasus->phy, MII_BMSR, &bmsr) ) 
! 		return 1;
! 	if ( !(bmsr & 0x20) && !loopback ) 
! 		warn( "%s: link NOT established (0x%x) - check the cable.",
! 			dev->name, bmsr );
! 	if ( read_mii_word(pegasus, pegasus->phy, MII_ANLPA, &linkpart) )
  		return 2;
! 	if ( !(linkpart & 1) )
! 		warn( "link partner stat %x", linkpart );
  
  	data[0] = 0xc9;
  	data[1] = 0;
! 	if ( linkpart & (ANLPA_100TX_FD | ANLPA_10T_FD) )
! 		data[1] |= 0x20; /* set full duplex */
! 	if ( linkpart & (ANLPA_100TX_FD | ANLPA_100TX_HD) )
! 		data[1] |= 0x10; /* set 100 Mbps */
! 	if ( mii_mode )
  		data[1] = 0;
  	data[2] = (loopback & 1) ? 0x09 : 0x01;
! 
! 	memcpy( pegasus->eth_regs, data, sizeof(data) );
! 
! 	set_registers( pegasus, EthCtrl0, 3, data );
  
  	return 0;
  }
  
! 
! static void read_bulk_callback( struct urb *urb )
  {
  	pegasus_t *pegasus = urb->context;
  	struct net_device *net;
  	int count = urb->actual_length, res;
  	int rx_status;
! 	struct sk_buff	*skb;
  	__u16 pkt_len;
  
! 	if ( !pegasus || !(pegasus->flags & PEGASUS_RUNNING) )
  		return;
  
  	net = pegasus->net;
! 	if ( !netif_device_present(net) )
  		return;
  
! 	if ( pegasus->flags & PEGASUS_RX_BUSY ) {
  		pegasus->stats.rx_errors++;
  		dbg("pegasus Rx busy");
  		return;
  	}
  	pegasus->flags |= PEGASUS_RX_BUSY;
  
! 	switch ( urb->status ) {
! 		case USB_ST_NOERROR:
! 			break;
! 		case USB_ST_NORESPONSE:
! 			dbg( "reset MAC" );
! 			pegasus->flags &= ~PEGASUS_RX_BUSY;
! 			break;
! 		default:
! 			dbg( "%s: RX status %d", net->name, urb->status );
! 			goto goon;
  	}
  
! 	if ( !count )
  		goto goon;
  
! 	rx_status = le32_to_cpu(*(int *)(pegasus->rx_buff + count - 4));
! 	if ( rx_status & 0x000e0000 ) {
  		dbg("%s: RX packet error %x", net->name, rx_status & 0xe0000);
  		pegasus->stats.rx_errors++;
! 		if ( rx_status & 0x060000 )
  			pegasus->stats.rx_length_errors++;
! 		if ( rx_status & 0x080000 )
  			pegasus->stats.rx_crc_errors++;
! 		if ( rx_status & 0x100000 )
  			pegasus->stats.rx_frame_errors++;
  		goto goon;
  	}
  
  	pkt_len = (rx_status & 0xfff) - 8;
  
! 	if ( !(skb = dev_alloc_skb(pkt_len+2)) )
  		goto goon;
  
  	skb->dev = net;
***************
*** 547,646 ****
  	pegasus->stats.rx_bytes += pkt_len;
  
  goon:
! 	FILL_BULK_URB(pegasus->rx_urb, pegasus->usb,
! 		      usb_rcvbulkpipe(pegasus->usb, 1),
! 		      pegasus->rx_buff, PEGASUS_MAX_MTU,
! 		      read_bulk_callback, pegasus);
! 	if ((res = usb_submit_urb(pegasus->rx_urb)))
! 		warn("%s: failed submint rx_urb %d", __FUNCTION__, res);
  	pegasus->flags &= ~PEGASUS_RX_BUSY;
  }
  
! static void write_bulk_callback(struct urb *urb)
  {
  	pegasus_t *pegasus = urb->context;
  
! 	if (!pegasus || !(pegasus->flags & PEGASUS_RUNNING))
  		return;
  
! 	if (!netif_device_present(pegasus->net))
  		return;
! 
! 	if (urb->status)
  		info("%s: TX status %d", pegasus->net->name, urb->status);
  
  	pegasus->net->trans_start = jiffies;
! 	netif_wake_queue(pegasus->net);
  }
  
  #ifdef	PEGASUS_USE_INTR
! static void intr_callback(struct urb *urb)
  {
  	pegasus_t *pegasus = urb->context;
  	struct net_device *net;
! 	__u8 *d;
  
! 	if (!pegasus)
  		return;
! 
! 	switch (urb->status) {
! 	case 0:
! 		break;
! 	case -ENOENT:
! 		return;
! 	default:
! 		info("intr status %d", urb->status);
  	}
  
  	d = urb->transfer_buffer;
  	net = pegasus->net;
! 	if (d[0] & 0xfc) {
  		pegasus->stats.tx_errors++;
! 		if (d[0] & TX_UNDERRUN)
  			pegasus->stats.tx_fifo_errors++;
! 		if (d[0] & (EXCESSIVE_COL | JABBER_TIMEOUT))
  			pegasus->stats.tx_aborted_errors++;
! 		if (d[0] & LATE_COL)
  			pegasus->stats.tx_window_errors++;
! 		if (d[0] & (NO_CARRIER | LOSS_CARRIER))
  			pegasus->stats.tx_carrier_errors++;
  	}
  }
  #endif
  
! static void pegasus_tx_timeout(struct net_device *net)
  {
  	pegasus_t *pegasus = net->priv;
  
! 	if (!pegasus)
  		return;
! 
  	warn("%s: Tx timed out.", net->name);
! 	pegasus->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
! 	usb_unlink_urb(pegasus->tx_urb);
  	pegasus->stats.tx_errors++;
  }
  
! static int pegasus_start_xmit(struct sk_buff *skb, struct net_device *net)
  {
! 	pegasus_t *pegasus = net->priv;
! 	int count = ((skb->len + 2) & 0x3f) ? skb->len + 2 : skb->len + 3;
! 	int res;
  	__u16 l16 = skb->len;
! 
! 	netif_stop_queue(net);
! 
! 	((__u16 *) pegasus->tx_buff)[0] = cpu_to_le16(l16);
! 	memcpy(pegasus->tx_buff + 2, skb->data, skb->len);
! 	FILL_BULK_URB(pegasus->tx_urb, pegasus->usb,
! 		      usb_sndbulkpipe(pegasus->usb, 2),
! 		      pegasus->tx_buff, PEGASUS_MAX_MTU,
! 		      write_bulk_callback, pegasus);
! 	pegasus->tx_urb->transfer_buffer_length = count;
! 	if ((res = usb_submit_urb(pegasus->tx_urb))) {
  		warn("failed tx_urb %d", res);
  		pegasus->stats.tx_errors++;
! 		netif_start_queue(net);
  	} else {
  		pegasus->stats.tx_packets++;
  		pegasus->stats.tx_bytes += skb->len;
--- 569,670 ----
  	pegasus->stats.rx_bytes += pkt_len;
  
  goon:
! 	FILL_BULK_URB( &pegasus->rx_urb, pegasus->usb,
! 			usb_rcvbulkpipe(pegasus->usb, 1),
! 			pegasus->rx_buff, PEGASUS_MAX_MTU, 
! 			read_bulk_callback, pegasus );
! 	if ( (res = usb_submit_urb(&pegasus->rx_urb)) )
! 		warn( __FUNCTION__ " failed submint rx_urb %d", res);
  	pegasus->flags &= ~PEGASUS_RX_BUSY;
  }
  
! 
! static void write_bulk_callback( struct urb *urb )
  {
  	pegasus_t *pegasus = urb->context;
  
! 	if ( !pegasus || !(pegasus->flags & PEGASUS_RUNNING) )
  		return;
  
! 	if ( !netif_device_present(pegasus->net) )
  		return;
! 		
! 	if ( urb->status )
  		info("%s: TX status %d", pegasus->net->name, urb->status);
  
  	pegasus->net->trans_start = jiffies;
! 	netif_wake_queue( pegasus->net );
  }
  
  #ifdef	PEGASUS_USE_INTR
! static void intr_callback( struct urb *urb )
  {
  	pegasus_t *pegasus = urb->context;
  	struct net_device *net;
! 	__u8	*d;
  
! 	if ( !pegasus )
  		return;
! 		
! 	switch ( urb->status ) {
! 		case USB_ST_NOERROR:
! 			break;
! 		case USB_ST_URB_KILLED:
! 			return;
! 		default:
! 			info("intr status %d", urb->status);
  	}
  
  	d = urb->transfer_buffer;
  	net = pegasus->net;
! 	if ( d[0] & 0xfc ) {
  		pegasus->stats.tx_errors++;
! 		if ( d[0] & TX_UNDERRUN )
  			pegasus->stats.tx_fifo_errors++;
! 		if ( d[0] & (EXCESSIVE_COL | JABBER_TIMEOUT) )
  			pegasus->stats.tx_aborted_errors++;
! 		if ( d[0] & LATE_COL )
  			pegasus->stats.tx_window_errors++;
! 		if ( d[0] & (NO_CARRIER | LOSS_CARRIER) )
  			pegasus->stats.tx_carrier_errors++;
  	}
  }
  #endif
  
! static void pegasus_tx_timeout( struct net_device *net )
  {
  	pegasus_t *pegasus = net->priv;
  
! 	if ( !pegasus )
  		return;
! 		
  	warn("%s: Tx timed out.", net->name);
! 	pegasus->tx_urb.transfer_flags |= USB_ASYNC_UNLINK;
! 	usb_unlink_urb( &pegasus->tx_urb );
  	pegasus->stats.tx_errors++;
  }
  
! 
! static int pegasus_start_xmit( struct sk_buff *skb, struct net_device *net )
  {
! 	pegasus_t	*pegasus = net->priv;
! 	int 	count = ((skb->len+2) & 0x3f) ? skb->len+2 : skb->len+3;
! 	int 	res;
  	__u16 l16 = skb->len;
! 	
! 	netif_stop_queue( net );
! 		
! 	((__u16 *)pegasus->tx_buff)[0] = cpu_to_le16( l16 );
! 	memcpy(pegasus->tx_buff+2, skb->data, skb->len);
! 	FILL_BULK_URB( &pegasus->tx_urb, pegasus->usb,
! 			usb_sndbulkpipe(pegasus->usb, 2),
! 			pegasus->tx_buff, PEGASUS_MAX_MTU, 
! 			write_bulk_callback, pegasus );
! 	pegasus->tx_urb.transfer_buffer_length = count;
! 	if ((res = usb_submit_urb(&pegasus->tx_urb))) {
  		warn("failed tx_urb %d", res);
  		pegasus->stats.tx_errors++;
! 		netif_start_queue( net );
  	} else {
  		pegasus->stats.tx_packets++;
  		pegasus->stats.tx_bytes += skb->len;
***************
*** 652,866 ****
  	return 0;
  }
  
! static struct net_device_stats *pegasus_netdev_stats(struct net_device *dev)
  {
! 	return &((pegasus_t *) dev->priv)->stats;
  }
  
! static inline void disable_net_traffic(pegasus_t * pegasus)
  {
! 	int tmp = 0;
  
! 	set_registers(pegasus, EthCtrl0, 2, &tmp);
  }
  
! static inline void get_interrupt_interval(pegasus_t * pegasus)
  {
! 	__u8 data[2];
  
! 	read_eprom_word(pegasus, 4, (__u16 *) data);
! 	if (data[1] < 0x80) {
! 		info("intr interval will be changed from %ums to %ums",
! 		     data[1], 0x80);
  		data[1] = 0x80;
  #ifdef	PEGASUS_WRITE_EEPROM
! 		write_eprom_word(pegasus, 4, *(__u16 *) data);
  #endif
  	}
  	pegasus->intr_interval = data[1];
  }
  
- static void set_carrier(struct net_device *net)
- {
- 	pegasus_t *pegasus;
- 	short tmp;
- 
- 	pegasus = net->priv;
- 	read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp);
- 	if (tmp & BMSR_LSTATUS)
- 		netif_carrier_on(net);
- 	else
- 		netif_carrier_off(net);
- 
- }
  
  static int pegasus_open(struct net_device *net)
  {
! 	pegasus_t *pegasus = (pegasus_t *) net->priv;
! 	int res;
  
! 	down(&pegasus->sem);
! 	FILL_BULK_URB(pegasus->rx_urb, pegasus->usb,
! 		      usb_rcvbulkpipe(pegasus->usb, 1),
! 		      pegasus->rx_buff, PEGASUS_MAX_MTU,
! 		      read_bulk_callback, pegasus);
! 	if ((res = usb_submit_urb(pegasus->rx_urb)))
! 		warn("%s: failed rx_urb %d", __FUNCTION__, res);
  #ifdef	PEGASUS_USE_INTR
! 	FILL_INT_URB(pegasus->intr_urb, pegasus->usb,
! 		     usb_rcvintpipe(pegasus->usb, 3),
! 		     pegasus->intr_buff, sizeof(pegasus->intr_buff),
! 		     intr_callback, pegasus, pegasus->intr_interval);
! 	if ((res = usb_submit_urb(pegasus->intr_urb)))
! 		warn("%s: failed intr_urb %d", __FUNCTION__, res);
  #endif
! 	netif_start_queue(net);
  	pegasus->flags |= PEGASUS_RUNNING;
- 	if ((res = enable_net_traffic(net, pegasus->usb))) {
- 		err("can't enable_net_traffic() - %d", res);
- 		res = -EIO;
- 		goto exit;
- 	}
- 
- 	set_carrier(net);
- 	res = 0;
- exit:
- 	up(&pegasus->sem);
  
! 	return res;
  }
  
! static int pegasus_close(struct net_device *net)
  {
! 	pegasus_t *pegasus = net->priv;
  
- 	down(&pegasus->sem);
  	pegasus->flags &= ~PEGASUS_RUNNING;
! 	netif_stop_queue(net);
! 	if (!(pegasus->flags & PEGASUS_UNPLUG))
! 		disable_net_traffic(pegasus);
! 
! 	usb_unlink_urb(pegasus->rx_urb);
! 	usb_unlink_urb(pegasus->tx_urb);
! 	usb_unlink_urb(pegasus->ctrl_urb);
  #ifdef	PEGASUS_USE_INTR
! 	usb_unlink_urb(pegasus->intr_urb);
  #endif
- 	up(&pegasus->sem);
  
  	return 0;
  }
  
! static int pegasus_ethtool_ioctl(struct net_device *net, void *uaddr)
  {
! 	pegasus_t *pegasus;
! 	int cmd;
! 	char tmp[128];
! 
! 	pegasus = net->priv;
! 	if (get_user(cmd, (int *) uaddr))
! 		return -EFAULT;
! 	switch (cmd) {
! 	case ETHTOOL_GDRVINFO:{
! 			struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
! 			strncpy(info.driver, DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
! 			strncpy(info.version, DRIVER_VERSION,
! 				ETHTOOL_BUSINFO_LEN);
! 			sprintf(tmp, "usb%d:%d", pegasus->usb->bus->busnum,
! 				pegasus->usb->devnum);
! 			strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
! 			if (copy_to_user(uaddr, &info, sizeof(info)))
! 				return -EFAULT;
! 			return 0;
! 		}
! 	case ETHTOOL_GSET:{
! 			struct ethtool_cmd ecmd;
! 			short lpa, bmcr;
! 
! 			if (copy_from_user(&ecmd, uaddr, sizeof(ecmd)))
! 				return -EFAULT;
! 			ecmd.supported = (SUPPORTED_10baseT_Half |
! 					  SUPPORTED_10baseT_Full |
! 					  SUPPORTED_100baseT_Half |
! 					  SUPPORTED_100baseT_Full |
! 					  SUPPORTED_Autoneg |
! 					  SUPPORTED_TP | SUPPORTED_MII);
! 			ecmd.port = PORT_TP;
! 			ecmd.transceiver = XCVR_INTERNAL;
! 			ecmd.phy_address = pegasus->phy;
! 			read_mii_word(pegasus, pegasus->phy, MII_BMCR, &bmcr);
! 			read_mii_word(pegasus, pegasus->phy, MII_LPA, &lpa);
! 			if (bmcr & BMCR_ANENABLE) {
! 				ecmd.autoneg = AUTONEG_ENABLE;
! 				ecmd.speed = lpa & (LPA_100HALF | LPA_100FULL) ?
! 				    SPEED_100 : SPEED_10;
! 				if (ecmd.speed == SPEED_100)
! 					ecmd.duplex = lpa & LPA_100FULL ?
! 					    DUPLEX_FULL : DUPLEX_HALF;
! 				else
! 					ecmd.duplex = lpa & LPA_10FULL ?
! 					    DUPLEX_FULL : DUPLEX_HALF;
! 			} else {
! 				ecmd.autoneg = AUTONEG_DISABLE;
! 				ecmd.speed = bmcr & BMCR_SPEED100 ?
! 				    SPEED_100 : SPEED_10;
! 				ecmd.duplex = bmcr & BMCR_FULLDPLX ?
! 				    DUPLEX_FULL : DUPLEX_HALF;
! 			}
! 			if (copy_to_user(uaddr, &ecmd, sizeof(ecmd)))
! 				return -EFAULT;
  
  			return 0;
! 		}
! 	case ETHTOOL_SSET:{
! 			return -EOPNOTSUPP;
! 		}
! 	case ETHTOOL_GLINK:{
! 			struct ethtool_value edata = { ETHTOOL_GLINK };
! 			edata.data = netif_carrier_ok(net);
! 			if (copy_to_user(uaddr, &edata, sizeof(edata)))
! 				return -EFAULT;
  			return 0;
! 		}
! 	default:
! 		return -EOPNOTSUPP;
  	}
  }
  
- static int pegasus_ioctl(struct net_device *net, struct ifreq *rq, int cmd)
- {
- 	__u16 *data = (__u16 *) & rq->ifr_data;
- 	pegasus_t *pegasus = net->priv;
- 	int res;
- 
- 	down(&pegasus->sem);
- 	switch (cmd) {
- 	case SIOCETHTOOL:
- 		res = pegasus_ethtool_ioctl(net, rq->ifr_data);
- 		break;
- 	case SIOCDEVPRIVATE:
- 		data[0] = pegasus->phy;
- 	case SIOCDEVPRIVATE + 1:
- 		read_mii_word(pegasus, data[0], data[1] & 0x1f, &data[3]);
- 		res = 0;
- 		break;
- 	case SIOCDEVPRIVATE + 2:
- 		if (!capable(CAP_NET_ADMIN)) {
- 			up(&pegasus->sem);
- 			return -EPERM;
- 		}
- 		write_mii_word(pegasus, pegasus->phy, data[1] & 0x1f, data[2]);
- 		res = 0;
- 		break;
- 	default:
- 		res = -EOPNOTSUPP;
- 	}
- 	up(&pegasus->sem);
- 
- 	return res;
- }
  
! static void pegasus_set_multicast(struct net_device *net)
  {
  	pegasus_t *pegasus = net->priv;
  
--- 676,786 ----
  	return 0;
  }
  
! 
! static struct net_device_stats *pegasus_netdev_stats( struct net_device *dev )
  {
! 	return &((pegasus_t *)dev->priv)->stats;
  }
  
! 
! static inline void disable_net_traffic( pegasus_t *pegasus )
  {
! 	int 	tmp=0;
  
! 	set_registers( pegasus, EthCtrl0, 2, &tmp );
  }
  
! 
! static inline void get_interrupt_interval( pegasus_t *pegasus )
  {
! 	__u8	data[2];
  
! 	read_eprom_word( pegasus, 4, (__u16 *)data );
! 	if ( data[1] < 0x80 ) {
! 		info( "intr interval will be changed from %ums to %ums",
! 		     data[1], 0x80 );
  		data[1] = 0x80;
  #ifdef	PEGASUS_WRITE_EEPROM
! 		write_eprom_word( pegasus, 4, *(__u16 *)data );
  #endif
  	}
  	pegasus->intr_interval = data[1];
  }
  
  
  static int pegasus_open(struct net_device *net)
  {
! 	pegasus_t *pegasus = (pegasus_t *)net->priv;
! 	int	res;
  
! 	if ( (res = enable_net_traffic(net, pegasus->usb)) ) {
! 		err("can't enable_net_traffic() - %d", res);
! 		return -EIO;
! 	}
! 	FILL_BULK_URB( &pegasus->rx_urb, pegasus->usb,
! 			usb_rcvbulkpipe(pegasus->usb, 1),
! 			pegasus->rx_buff, PEGASUS_MAX_MTU, 
! 			read_bulk_callback, pegasus );
! 	if ( (res = usb_submit_urb(&pegasus->rx_urb)) )
! 		warn( __FUNCTION__ " failed rx_urb %d", res );
  #ifdef	PEGASUS_USE_INTR
! 	FILL_INT_URB( &pegasus->intr_urb, pegasus->usb,
! 			usb_rcvintpipe(pegasus->usb, 3),
! 			pegasus->intr_buff, sizeof(pegasus->intr_buff),
! 			intr_callback, pegasus, pegasus->intr_interval );
! 	if ( (res = usb_submit_urb(&pegasus->intr_urb)) )
! 		warn( __FUNCTION__ " failed intr_urb %d", res);
  #endif
! 	netif_start_queue( net );
  	pegasus->flags |= PEGASUS_RUNNING;
  
! 	return 0;
  }
  
! 
! static int pegasus_close( struct net_device *net )
  {
! 	pegasus_t	*pegasus = net->priv;
  
  	pegasus->flags &= ~PEGASUS_RUNNING;
! 	netif_stop_queue( net );
! 	if ( !(pegasus->flags & PEGASUS_UNPLUG) )
! 		disable_net_traffic( pegasus );
! 
! 	usb_unlink_urb( &pegasus->rx_urb );
! 	usb_unlink_urb( &pegasus->tx_urb );
! 	usb_unlink_urb( &pegasus->ctrl_urb );
  #ifdef	PEGASUS_USE_INTR
! 	usb_unlink_urb( &pegasus->intr_urb );
  #endif
  
  	return 0;
  }
  
! 
! static int pegasus_ioctl( struct net_device *net, struct ifreq *rq, int cmd )
  {
! 	__u16 *data = (__u16 *)&rq->ifr_data;
! 	pegasus_t	*pegasus = net->priv;
  
+ 	switch(cmd) {
+ 		case SIOCDEVPRIVATE:
+ 			data[0] = pegasus->phy;
+ 		case SIOCDEVPRIVATE+1:
+ 			read_mii_word(pegasus, data[0], data[1]&0x1f, &data[3]);
  			return 0;
! 		case SIOCDEVPRIVATE+2:
! 			if ( !capable(CAP_NET_ADMIN) )
! 				return -EPERM;
! 			write_mii_word(pegasus, pegasus->phy, data[1] & 0x1f, data[2]);
  			return 0;
! 		default:
! 			return -EOPNOTSUPP;
  	}
  }
  
  
! static void pegasus_set_multicast( struct net_device *net )
  {
  	pegasus_t *pegasus = net->priv;
  
***************
*** 870,876 ****
  		pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS;
  		info("%s: Promiscuous mode enabled", net->name);
  	} else if ((net->mc_count > multicast_filter_limit) ||
! 		   (net->flags & IFF_ALLMULTI)) {
  		pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST;
  		pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS;
  		info("%s set allmulti", net->name);
--- 790,796 ----
  		pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS;
  		info("%s: Promiscuous mode enabled", net->name);
  	} else if ((net->mc_count > multicast_filter_limit) ||
! 			(net->flags & IFF_ALLMULTI)) {
  		pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST;
  		pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS;
  		info("%s set allmulti", net->name);
***************
*** 880,976 ****
  	}
  
  	pegasus->flags |= ETH_REGS_CHANGE;
! 	ctrl_callback(pegasus->ctrl_urb);
  
  	netif_wake_queue(net);
  }
  
! static __u8 mii_phy_probe(pegasus_t * pegasus)
  {
! 	int i;
! 	__u16 tmp;
  
! 	for (i = 0; i < 32; i++) {
! 		read_mii_word(pegasus, i, MII_BMSR, &tmp);
! 		if (tmp == 0 || tmp == 0xffff || (tmp & BMSR_MEDIA) == 0)
  			continue;
  		else
! 			return i;
  	}
  
! 	return 0xff;
  }
  
! static inline void setup_pegasus_II(pegasus_t * pegasus)
  {
! 	set_register(pegasus, Reg1d, 0);
! 	set_register(pegasus, Reg7b, 2);
! 	if (pegasus->features & HAS_HOME_PNA && mii_mode)
! 		set_register(pegasus, Reg81, 6);
  	else
! 		set_register(pegasus, Reg81, 2);
  }
  
! static void *pegasus_probe(struct usb_device *dev, unsigned int ifnum,
! 			   const struct usb_device_id *id)
  {
! 	struct net_device *net;
! 	pegasus_t *pegasus;
! 	int dev_index = id - pegasus_ids;
  
  	if (usb_set_configuration(dev, dev->config[0].bConfigurationValue)) {
  		err("usb_set_configuration() failed");
  		return NULL;
  	}
  
! 	if (!(pegasus = kmalloc(sizeof(struct pegasus), GFP_KERNEL))) {
  		err("out of memory allocating device structure");
  		return NULL;
  	}
  
! 	usb_inc_dev_use(dev);
  	memset(pegasus, 0, sizeof(struct pegasus));
  	pegasus->dev_index = dev_index;
! 	init_waitqueue_head(&pegasus->ctrl_wait);
! 
! 	pegasus->ctrl_urb = usb_alloc_urb(0);
! 	if (!pegasus->ctrl_urb) {
! 		kfree(pegasus);
! 		return NULL;
! 	}
! 	pegasus->rx_urb = usb_alloc_urb(0);
! 	if (!pegasus->rx_urb) {
! 		usb_free_urb(pegasus->ctrl_urb);
! 		kfree(pegasus);
! 		return NULL;
! 	}
! 	pegasus->tx_urb = usb_alloc_urb(0);
! 	if (!pegasus->tx_urb) {
! 		usb_free_urb(pegasus->rx_urb);
! 		usb_free_urb(pegasus->ctrl_urb);
! 		kfree(pegasus);
! 		return NULL;
! 	}
! 	pegasus->intr_urb = usb_alloc_urb(0);
! 	if (!pegasus->intr_urb) {
! 		usb_free_urb(pegasus->tx_urb);
! 		usb_free_urb(pegasus->rx_urb);
! 		usb_free_urb(pegasus->ctrl_urb);
! 		kfree(pegasus);
! 		return NULL;
! 	}
  
! 	net = init_etherdev(NULL, 0);
! 	if (!net) {
! 		usb_free_urb(pegasus->tx_urb);
! 		usb_free_urb(pegasus->rx_urb);
! 		usb_free_urb(pegasus->ctrl_urb);
! 		kfree(pegasus);
! 		return NULL;
  	}
! 
! 	init_MUTEX(&pegasus->sem);
! 	down(&pegasus->sem);
  	pegasus->usb = dev;
  	pegasus->net = net;
  	SET_MODULE_OWNER(net);
--- 800,867 ----
  	}
  
  	pegasus->flags |= ETH_REGS_CHANGE;
! 	ctrl_callback( &pegasus->ctrl_urb );
  
  	netif_wake_queue(net);
  }
  
! 
! static __u8 mii_phy_probe( pegasus_t *pegasus )
  {
! 	int	i;
! 	__u16	tmp;
  
! 	for ( i=0; i < 32; i++ ) {
! 		read_mii_word( pegasus, i, MII_BMSR, &tmp );
! 		if ( tmp == 0 || tmp == 0xffff || (tmp & BMSR_MEDIA) == 0 )
  			continue;
  		else
! 			return	i;
  	}
  
! 	return	0xff;
  }
  
! 
! static inline void setup_pegasus_II( pegasus_t *pegasus )
  {
! 	set_register( pegasus, Reg1d, 0 );
! 	set_register( pegasus, Reg7b, 2 );
! 	if ( pegasus->features & HAS_HOME_PNA  && mii_mode )
! 		set_register( pegasus, Reg81, 6 );
  	else
! 		set_register( pegasus, Reg81, 2 );
  }
  
! 
! static void * pegasus_probe( struct usb_device *dev, unsigned int ifnum,
! 			     const struct usb_device_id *id)
  {
! 	struct net_device	*net;
! 	pegasus_t		*pegasus;
! 	int			dev_index = id - pegasus_ids;
  
  	if (usb_set_configuration(dev, dev->config[0].bConfigurationValue)) {
  		err("usb_set_configuration() failed");
  		return NULL;
  	}
  
! 	if(!(pegasus = kmalloc(sizeof(struct pegasus), GFP_KERNEL))) {
  		err("out of memory allocating device structure");
  		return NULL;
  	}
  
! 	usb_inc_dev_use( dev );
  	memset(pegasus, 0, sizeof(struct pegasus));
  	pegasus->dev_index = dev_index;
! 	init_waitqueue_head( &pegasus->ctrl_wait );
  
! 	net = init_etherdev( NULL, 0 );
! 	if ( !net ) {
! 		kfree( pegasus );
! 		return	NULL;
  	}
! 	
  	pegasus->usb = dev;
  	pegasus->net = net;
  	SET_MODULE_OWNER(net);
***************
*** 987,1051 ****
  
  	pegasus->features = usb_dev_id[dev_index].private;
  #ifdef	PEGASUS_USE_INTR
! 	get_interrupt_interval(pegasus);
  #endif
! 	if (reset_mac(pegasus)) {
  		err("can't reset MAC");
! 		unregister_netdev(pegasus->net);
! 		usb_free_urb(pegasus->tx_urb);
! 		usb_free_urb(pegasus->rx_urb);
! 		usb_free_urb(pegasus->ctrl_urb);
! 		kfree(pegasus->net);
  		kfree(pegasus);
  		pegasus = NULL;
! 		goto exit;
  	}
  
! 	info("%s: %s", net->name, usb_dev_id[dev_index].name);
  
! 	set_ethernet_addr(pegasus);
  
! 	if (pegasus->features & PEGASUS_II) {
! 		info("setup Pegasus II specific registers");
! 		setup_pegasus_II(pegasus);
! 	}
! 
! 	pegasus->phy = mii_phy_probe(pegasus);
! 	if (pegasus->phy == 0xff) {
! 		warn("can't locate MII phy, using default");
  		pegasus->phy = 1;
  	}
  
- exit:
- 	up(&pegasus->sem);
  	return pegasus;
  }
  
! static void pegasus_disconnect(struct usb_device *dev, void *ptr)
  {
  	struct pegasus *pegasus = ptr;
  
! 	if (!pegasus) {
  		warn("unregistering non-existant device");
  		return;
  	}
  
  	pegasus->flags |= PEGASUS_UNPLUG;
! 	unregister_netdev(pegasus->net);
! 	usb_dec_dev_use(dev);
! 	usb_unlink_urb(pegasus->intr_urb);
! 	usb_unlink_urb(pegasus->tx_urb);
! 	usb_unlink_urb(pegasus->rx_urb);
! 	usb_unlink_urb(pegasus->ctrl_urb);
! 	usb_free_urb(pegasus->intr_urb);
! 	usb_free_urb(pegasus->tx_urb);
! 	usb_free_urb(pegasus->rx_urb);
! 	usb_free_urb(pegasus->ctrl_urb);
! 	kfree(pegasus->net);
! 	kfree(pegasus);
  	pegasus = NULL;
  }
  
  static struct usb_driver pegasus_driver = {
  	name:		"pegasus",
  	probe:		pegasus_probe,
--- 878,929 ----
  
  	pegasus->features = usb_dev_id[dev_index].private;
  #ifdef	PEGASUS_USE_INTR
! 	get_interrupt_interval( pegasus );
  #endif
! 	if ( reset_mac(pegasus) ) {
  		err("can't reset MAC");
! 		unregister_netdev( pegasus->net );
  		kfree(pegasus);
  		pegasus = NULL;
! 		return NULL;
  	}
  
! 	info( "%s: %s", net->name, usb_dev_id[dev_index].name );
  
! 	set_ethernet_addr( pegasus );
  
! 	if ( pegasus->features & PEGASUS_II ) {
! 		info( "setup Pegasus II specific registers" );
! 		setup_pegasus_II( pegasus );
! 	}
! 	
! 	pegasus->phy = mii_phy_probe( pegasus );
! 	if ( pegasus->phy == 0xff ) {
! 		warn( "can't locate MII phy, using default" );
  		pegasus->phy = 1;
  	}
  
  	return pegasus;
  }
  
! 
! static void pegasus_disconnect( struct usb_device *dev, void *ptr )
  {
  	struct pegasus *pegasus = ptr;
  
! 	if ( !pegasus ) {
  		warn("unregistering non-existant device");
  		return;
  	}
  
  	pegasus->flags |= PEGASUS_UNPLUG;
! 	unregister_netdev( pegasus->net );
! 	usb_dec_dev_use( dev );
! 	kfree( pegasus );
  	pegasus = NULL;
  }
  
+ 
  static struct usb_driver pegasus_driver = {
  	name:		"pegasus",
  	probe:		pegasus_probe,
***************
*** 1056,1068 ****
  int __init pegasus_init(void)
  {
  	info(DRIVER_VERSION ":" DRIVER_DESC);
! 	return usb_register(&pegasus_driver);
  }
  
  void __exit pegasus_exit(void)
  {
! 	usb_deregister(&pegasus_driver);
  }
  
! module_init(pegasus_init);
! module_exit(pegasus_exit);
--- 934,946 ----
  int __init pegasus_init(void)
  {
  	info(DRIVER_VERSION ":" DRIVER_DESC);
! 	return usb_register( &pegasus_driver );
  }
  
  void __exit pegasus_exit(void)
  {
! 	usb_deregister( &pegasus_driver );
  }
  
! module_init( pegasus_init );
! module_exit( pegasus_exit );
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pegasus.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pegasus.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pegasus.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pegasus.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,10 ****
  /*
!  * Copyright (c) 1999-2002 Petko Manolov - Petkan (petkan@users.sourceforge.net)
   *
   * This program is free software; you can redistribute it and/or modify
!  * it under the terms of the GNU General Public License version 2 as published
!  * by the Free Software Foundation.
   *
   */
  
  
--- 1,19 ----
  /*
!  *  Copyright (c) 1999,2000 Petko Manolov - Petkan (pmanolov@lnxw.com)
   *
   * This program is free software; you can redistribute it and/or modify
!  * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
   */
  
  
***************
*** 22,27 ****
--- 31,44 ----
  #define	EPROM_WR_ENABLE		0x10
  #define	EPROM_LOAD		0x20
  
+ #define	MII_BMCR		0x00
+ #define	MII_BMSR		0x01
+ #define	BMSR_MEDIA		0x7808
+ #define	MII_ANLPA		0x05
+ #define	ANLPA_100TX_FD		0x0100
+ #define	ANLPA_100TX_HD		0x0080
+ #define	ANLPA_10T_FD		0x0040
+ #define	ANLPA_10T_HD		0x0020
  #define	PHY_DONE		0x80
  #define	PHY_READ		0x40
  #define	PHY_WRITE		0x20
***************
*** 57,62 ****
--- 74,80 ----
  #define	PEGASUS_REQ_GET_REGS	0xf0
  #define	PEGASUS_REQ_SET_REGS	0xf1
  #define	PEGASUS_REQ_SET_REG	PEGASUS_REQ_SET_REGS
+ #define	ALIGN(x)		x __attribute__((aligned(L1_CACHE_BYTES)))
  
  enum pegasus_registers {
  	EthCtrl0 = 0,
***************
*** 89,101 ****
  	unsigned		features;
  	int			dev_index;
  	int			intr_interval;
! 	struct urb		*ctrl_urb, *rx_urb, *tx_urb, *intr_urb;
! 	struct usb_ctrlrequest	dr;
  	wait_queue_head_t	ctrl_wait;
! 	struct semaphore	sem;
! 	unsigned char		rx_buff[PEGASUS_MAX_MTU];
! 	unsigned char		tx_buff[PEGASUS_MAX_MTU];
! 	unsigned char		intr_buff[8];
  	__u8			eth_regs[4];
  	__u8			phy;
  	__u8			gpio_res;
--- 107,119 ----
  	unsigned		features;
  	int			dev_index;
  	int			intr_interval;
! 	struct urb		ctrl_urb, rx_urb, tx_urb, intr_urb;
! 	devrequest		dr;
  	wait_queue_head_t	ctrl_wait;
! 	struct semaphore	ctrl_sem;
! 	unsigned char		ALIGN(rx_buff[PEGASUS_MAX_MTU]);
! 	unsigned char		ALIGN(tx_buff[PEGASUS_MAX_MTU]);
! 	unsigned char		ALIGN(intr_buff[8]);
  	__u8			eth_regs[4];
  	__u8			phy;
  	__u8			gpio_res;
***************
*** 113,128 ****
  #define	VENDOR_ABOCOM		0x07b8
  #define	VENDOR_ACCTON		0x083a
  #define	VENDOR_ADMTEK		0x07a6
- #define	VENDOR_AEILAB		0x3334
  #define	VENDOR_ALLIEDTEL	0x07c9
  #define	VENDOR_BELKIN		0x050d
  #define	VENDOR_BILLIONTON	0x08dd
- #define	VENDOR_COMPAQ		0x049f
  #define	VENDOR_COREGA		0x07aa
  #define	VENDOR_DLINK		0x2001
- #define VENDOR_ELCON		0x0db7
  #define	VENDOR_ELSA		0x05cc
- #define	VENDOR_HAWKING		0x0e66
  #define	VENDOR_IODATA		0x04bb
  #define	VENDOR_KINGSTON		0x0951
  #define	VENDOR_LANEED		0x056e
--- 131,142 ----
***************
*** 131,137 ****
  #define	VENDOR_SMARTBRIDGES	0x08d1
  #define	VENDOR_SMC		0x0707
  #define	VENDOR_SOHOWARE		0x15e8
! #define	VENDOR_SIEMENS		0x067c
  
  #else	/* PEGASUS_DEV */
  
--- 145,151 ----
  #define	VENDOR_SMARTBRIDGES	0x08d1
  #define	VENDOR_SMC		0x0707
  #define	VENDOR_SOHOWARE		0x15e8
! 
  
  #else	/* PEGASUS_DEV */
  
***************
*** 159,176 ****
  		DEFAULT_GPIO_RESET | PEGASUS_II ) 	
  PEGASUS_DEV( "Accton USB 10/100 Ethernet Adapter", VENDOR_ACCTON, 0x1046,
  		DEFAULT_GPIO_RESET )
- PEGASUS_DEV( "SpeedStream USB 10/100 Ethernet", VENDOR_ACCTON, 0x5046,
- 		DEFAULT_GPIO_RESET )
  PEGASUS_DEV( "ADMtek ADM8511 \"Pegasus II\" USB Ethernet",
  		VENDOR_ADMTEK, 0x8511,
  		DEFAULT_GPIO_RESET | PEGASUS_II )
  PEGASUS_DEV( "ADMtek AN986 \"Pegasus\" USB Ethernet (eval. board)",
  		VENDOR_ADMTEK, 0x0986,
  		DEFAULT_GPIO_RESET | HAS_HOME_PNA )
- PEGASUS_DEV( "ADMtek AN986A USB MAC", VENDOR_ADMTEK, 0x1986,
- 		DEFAULT_GPIO_RESET | PEGASUS_II )
- PEGASUS_DEV( "AEI USB Fast Ethernet Adapter", VENDOR_AEILAB, 0x1701,
- 		DEFAULT_GPIO_RESET | PEGASUS_II )
  PEGASUS_DEV( "Allied Telesyn Int. AT-USB100", VENDOR_ALLIEDTEL, 0xb100,
  		DEFAULT_GPIO_RESET | PEGASUS_II )
  PEGASUS_DEV( "Belkin F5D5050 USB Ethernet", VENDOR_BELKIN, 0x0121,
--- 173,184 ----
***************
*** 179,194 ****
  		DEFAULT_GPIO_RESET )
  PEGASUS_DEV( "Billionton USBLP-100", VENDOR_BILLIONTON, 0x0987,
  		DEFAULT_GPIO_RESET | HAS_HOME_PNA )
- PEGASUS_DEV( "iPAQ Networking 10/100 USB", VENDOR_COMPAQ, 0x8511,
- 		DEFAULT_GPIO_RESET | PEGASUS_II )
  PEGASUS_DEV( "Billionton USBEL-100", VENDOR_BILLIONTON, 0x0988,
  		DEFAULT_GPIO_RESET )
  PEGASUS_DEV( "Billionton USBE-100", VENDOR_BILLIONTON, 0x8511,
  		DEFAULT_GPIO_RESET | PEGASUS_II )
  PEGASUS_DEV( "Corega FEter USB-TX", VENDOR_COREGA, 0x0004,
  		DEFAULT_GPIO_RESET )
- PEGASUS_DEV( "Corega FEter", VENDOR_COREGA, 0x000d,
- 		DEFAULT_GPIO_RESET | PEGASUS_II )
  PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4001,
  		LINKSYS_GPIO_RESET )
  PEGASUS_DEV( "D-Link DSB-650TX", VENDOR_DLINK, 0x4002,
--- 187,198 ----
***************
*** 203,218 ****
  		DEFAULT_GPIO_RESET | HAS_HOME_PNA )
  PEGASUS_DEV( "D-Link DSB-650", VENDOR_DLINK, 0xabc1,
  		DEFAULT_GPIO_RESET )
- PEGASUS_DEV( "GOLDPFEIL USB Adapter", VENDOR_ELCON, 0x0002,
- 		DEFAULT_GPIO_RESET | PEGASUS_II | HAS_HOME_PNA )
  PEGASUS_DEV( "Elsa Micolink USB2Ethernet", VENDOR_ELSA, 0x3000,
  		DEFAULT_GPIO_RESET )
- PEGASUS_DEV( "Hawking UF100 10/100 Ethernet", VENDOR_HAWKING, 0x400c,
- 		DEFAULT_GPIO_RESET | PEGASUS_II )
  PEGASUS_DEV( "IO DATA USB ET/TX", VENDOR_IODATA, 0x0904,
  		DEFAULT_GPIO_RESET )
- PEGASUS_DEV( "IO DATA USB ET/TX-S", VENDOR_IODATA, 0x0913,
- 		DEFAULT_GPIO_RESET | PEGASUS_II )
  PEGASUS_DEV( "Kingston KNU101TX Ethernet", VENDOR_KINGSTON, 0x000a,
  		DEFAULT_GPIO_RESET)
  PEGASUS_DEV( "LANEED USB Ethernet LD-USB/TX", VENDOR_LANEED, 0x4002,
--- 207,216 ----
***************
*** 245,257 ****
  		DEFAULT_GPIO_RESET | PEGASUS_II )
  PEGASUS_DEV( "SMC 202 USB Ethernet", VENDOR_SMC, 0x0200,
  		DEFAULT_GPIO_RESET )
- PEGASUS_DEV( "SMC 2206 USB Ethernet", VENDOR_SMC, 0x0201,
- 		DEFAULT_GPIO_RESET | PEGASUS_II )
  PEGASUS_DEV( "SOHOware NUB100 Ethernet", VENDOR_SOHOWARE, 0x9100,
  		DEFAULT_GPIO_RESET )
! PEGASUS_DEV( "SOHOware NUB110 Ethernet", VENDOR_SOHOWARE, 0x9110,
! 		DEFAULT_GPIO_RESET | PEGASUS_II )
! PEGASUS_DEV( "SpeedStream USB 10/100 Ethernet", VENDOR_SIEMENS, 0x1001,
! 		DEFAULT_GPIO_RESET | PEGASUS_II )
  
  #endif	/* PEGASUS_DEV */
--- 243,250 ----
  		DEFAULT_GPIO_RESET | PEGASUS_II )
  PEGASUS_DEV( "SMC 202 USB Ethernet", VENDOR_SMC, 0x0200,
  		DEFAULT_GPIO_RESET )
  PEGASUS_DEV( "SOHOware NUB100 Ethernet", VENDOR_SOHOWARE, 0x9100,
  		DEFAULT_GPIO_RESET )
! 
  
  #endif	/* PEGASUS_DEV */
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/printer.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/printer.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/printer.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/printer.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,12 ****
  /*
!  * printer.c  Version 0.11
   *
   * Copyright (c) 1999 Michael Gee	
   * Copyright (c) 1999 Pavel Machek	
   * Copyright (c) 2000 Randy Dunlap	
   * Copyright (c) 2000 Vojtech Pavlik	
-  # Copyright (c) 2001 Pete Zaitcev	
-  # Copyright (c) 2001 David Paschal	
   *
   * USB Printer Device Class driver for USB printers and printer cables
   *
--- 1,10 ----
  /*
!  * printer.c  Version 0.8
   *
   * Copyright (c) 1999 Michael Gee	
   * Copyright (c) 1999 Pavel Machek	
   * Copyright (c) 2000 Randy Dunlap	
   * Copyright (c) 2000 Vojtech Pavlik	
   *
   * USB Printer Device Class driver for USB printers and printer cables
   *
***************
*** 19,29 ****
   *	v0.4 - fixes in unidirectional mode
   *	v0.5 - add DEVICE_ID string support
   *	v0.6 - never time out
!  *	v0.7 - fixed bulk-IN read and poll (David Paschal)
   *	v0.8 - add devfs support
   *	v0.9 - fix unplug-while-open paths
-  *	v0.10 - add proto_bias option (Pete Zaitcev)
-  *	v0.11 - add hpoj.sourceforge.net ioctls (David Paschal)
   */
  
  /*
--- 17,25 ----
   *	v0.4 - fixes in unidirectional mode
   *	v0.5 - add DEVICE_ID string support
   *	v0.6 - never time out
!  *	v0.7 - fixed bulk-IN read and poll (David Paschal, paschal@rcsis.com)
   *	v0.8 - add devfs support
   *	v0.9 - fix unplug-while-open paths
   */
  
  /*
***************
*** 58,93 ****
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v0.11"
! #define DRIVER_AUTHOR "Michael Gee, Pavel Machek, Vojtech Pavlik, Randy Dunlap, Pete Zaitcev, David Paschal"
  #define DRIVER_DESC "USB Printer Device Class driver"
  
  #define USBLP_BUF_SIZE		8192
  #define DEVICE_ID_SIZE		1024
  
! /* ioctls: */
  #define LPGETSTATUS		0x060b		/* same as in drivers/char/lp.c */
- #define IOCNR_GET_DEVICE_ID		1
- #define IOCNR_GET_PROTOCOLS		2
- #define IOCNR_SET_PROTOCOL		3
- #define IOCNR_HP_SET_CHANNEL		4
- #define IOCNR_GET_BUS_ADDRESS		5
- #define IOCNR_GET_VID_PID		6
- /* Get device_id string: */
- #define LPIOC_GET_DEVICE_ID(len) _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
- /* The following ioctls were added for http://hpoj.sourceforge.net: */
- /* Get two-int array:
-  * [0]=current protocol (1=7/1/1, 2=7/1/2, 3=7/1/3),
-  * [1]=supported protocol mask (mask&(1<dev);
- 	dbg("devfs=0x%p", usblp->devfs);
- 	dbg("buf=0x%p", usblp->buf);
- 	dbg("readcount=%d", usblp->readcount);
- 	dbg("ifnum=%d", usblp->ifnum);
-     for (p = USBLP_FIRST_PROTOCOL; p <= USBLP_LAST_PROTOCOL; p++) {
- 	dbg("protocol[%d].alt_setting=%d", p, usblp->protocol[p].alt_setting);
- 	dbg("protocol[%d].epwrite=%p", p, usblp->protocol[p].epwrite);
- 	dbg("protocol[%d].epread=%p", p, usblp->protocol[p].epread);
-     }
- 	dbg("current_protocol=%d", usblp->current_protocol);
- 	dbg("minor=%d", usblp->minor);
- 	dbg("quirks=%d", usblp->quirks);
- 	dbg("used=%d", usblp->used);
- 	dbg("bidir=%d", usblp->bidir);
- 	dbg("device_id_string=\"%s\"",
- 		usblp->device_id_string ?
- 			usblp->device_id_string + 2 :
- 			(unsigned char *)"(null)");
- }
- #endif
- 
  extern devfs_handle_t usb_devfs_handle;			/* /dev/usb dir. */
  
  static struct usblp *usblp_table[USBLP_MINORS];
--- 102,107 ----
***************
*** 188,239 ****
  	{ 0x03f0, 0x0204, USBLP_QUIRK_BIDIR }, /* HP DeskJet 815C */
  	{ 0x03f0, 0x0304, USBLP_QUIRK_BIDIR }, /* HP DeskJet 810C/812C */
  	{ 0x03f0, 0x0404, USBLP_QUIRK_BIDIR }, /* HP DeskJet 830C */
- 	{ 0x03f0, 0x0504, USBLP_QUIRK_BIDIR }, /* HP DeskJet 885C */
- 	{ 0x03f0, 0x0604, USBLP_QUIRK_BIDIR }, /* HP DeskJet 840C */   
- 	{ 0x03f0, 0x0804, USBLP_QUIRK_BIDIR }, /* HP DeskJet 816C */   
- 	{ 0x03f0, 0x1104, USBLP_QUIRK_BIDIR }, /* HP Deskjet 959C */
- 	{ 0x0409, 0xefbe, USBLP_QUIRK_BIDIR }, /* NEC Picty900 (HP OEM) */
- 	{ 0x0409, 0xbef4, USBLP_QUIRK_BIDIR }, /* NEC Picty760 (HP OEM) */
- 	{ 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */
- 	{ 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */
  	{ 0, 0 }
  };
  
- static int usblp_select_alts(struct usblp *usblp);
- static int usblp_set_protocol(struct usblp *usblp, int protocol);
- static int usblp_cache_device_id_string(struct usblp *usblp);
- 
- 
  /*
   * Functions for usblp control messages.
   */
  
! static int usblp_ctrl_msg(struct usblp *usblp, int request, int type, int dir, int recip, int value, void *buf, int len)
  {
  	int retval = usb_control_msg(usblp->dev,
  		dir ? usb_rcvctrlpipe(usblp->dev, 0) : usb_sndctrlpipe(usblp->dev, 0),
! 		request, type | dir | recip, value, usblp->ifnum, buf, len, USBLP_WRITE_TIMEOUT);
  	dbg("usblp_control_msg: rq: 0x%02x dir: %d recip: %d value: %d len: %#x result: %d",
  		request, !!dir, recip, value, len, retval);
  	return retval < 0 ? retval : 0;
  }
  
  #define usblp_read_status(usblp, status)\
! 	usblp_ctrl_msg(usblp, USBLP_REQ_GET_STATUS, USB_TYPE_CLASS, USB_DIR_IN, USB_RECIP_INTERFACE, 0, status, 1)
  #define usblp_get_id(usblp, config, id, maxlen)\
! 	usblp_ctrl_msg(usblp, USBLP_REQ_GET_ID, USB_TYPE_CLASS, USB_DIR_IN, USB_RECIP_INTERFACE, config, id, maxlen)
  #define usblp_reset(usblp)\
! 	usblp_ctrl_msg(usblp, USBLP_REQ_RESET, USB_TYPE_CLASS, USB_DIR_OUT, USB_RECIP_OTHER, 0, NULL, 0)
! 
! #define usblp_hp_channel_change_request(usblp, channel, buffer) \
! 	usblp_ctrl_msg(usblp, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, USB_TYPE_VENDOR, USB_DIR_IN, USB_RECIP_INTERFACE, channel, buffer, 1)
! 
! /*
!  * See the description for usblp_select_alts() below for the usage
!  * explanation.  Look into your /proc/bus/usb/devices and dmesg in
!  * case of any trouble.
!  */
! static int proto_bias = -1;
  
  /*
   * URB callback.
--- 123,151 ----
  	{ 0x03f0, 0x0204, USBLP_QUIRK_BIDIR }, /* HP DeskJet 815C */
  	{ 0x03f0, 0x0304, USBLP_QUIRK_BIDIR }, /* HP DeskJet 810C/812C */
  	{ 0x03f0, 0x0404, USBLP_QUIRK_BIDIR }, /* HP DeskJet 830C */
  	{ 0, 0 }
  };
  
  /*
   * Functions for usblp control messages.
   */
  
! static int usblp_ctrl_msg(struct usblp *usblp, int request, int dir, int recip, int value, void *buf, int len)
  {
  	int retval = usb_control_msg(usblp->dev,
  		dir ? usb_rcvctrlpipe(usblp->dev, 0) : usb_sndctrlpipe(usblp->dev, 0),
! 		request, USB_TYPE_CLASS | dir | recip, value, usblp->ifnum, buf, len, HZ * 5);
  	dbg("usblp_control_msg: rq: 0x%02x dir: %d recip: %d value: %d len: %#x result: %d",
  		request, !!dir, recip, value, len, retval);
  	return retval < 0 ? retval : 0;
  }
  
  #define usblp_read_status(usblp, status)\
! 	usblp_ctrl_msg(usblp, USBLP_REQ_GET_STATUS, USB_DIR_IN, USB_RECIP_INTERFACE, 0, status, 1)
  #define usblp_get_id(usblp, config, id, maxlen)\
! 	usblp_ctrl_msg(usblp, USBLP_REQ_GET_ID, USB_DIR_IN, USB_RECIP_INTERFACE, config, id, maxlen)
  #define usblp_reset(usblp)\
! 	usblp_ctrl_msg(usblp, USBLP_REQ_RESET, USB_DIR_OUT, USB_RECIP_OTHER, 0, NULL, 0)
  
  /*
   * URB callback.
***************
*** 257,263 ****
   * Get and print printer errors.
   */
  
! static char *usblp_messages[] = { "ok", "out of paper", "off-line", "unknown error" };
  
  static int usblp_check_status(struct usblp *usblp, int err)
  {
--- 169,175 ----
   * Get and print printer errors.
   */
  
! static char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" };
  
  static int usblp_check_status(struct usblp *usblp, int err)
  {
***************
*** 345,364 ****
  {
  	devfs_unregister (usblp->devfs);
  	usblp_table [usblp->minor] = NULL;
! 	info("usblp%d: removed", usblp->minor);
  
  	kfree (usblp->writeurb.transfer_buffer);
  	kfree (usblp->device_id_string);
  	kfree (usblp);
  }
  
- static void usblp_unlink_urbs(struct usblp *usblp)
- {
- 	usb_unlink_urb(&usblp->writeurb);
- 	if (usblp->bidir)
- 		usb_unlink_urb(&usblp->readurb);
- }
- 
  static int usblp_release(struct inode *inode, struct file *file)
  {
  	struct usblp *usblp = file->private_data;
--- 257,269 ----
  {
  	devfs_unregister (usblp->devfs);
  	usblp_table [usblp->minor] = NULL;
! 	info ("usblp%d: removed", usblp->minor);
  
  	kfree (usblp->writeurb.transfer_buffer);
  	kfree (usblp->device_id_string);
  	kfree (usblp);
  }
  
  static int usblp_release(struct inode *inode, struct file *file)
  {
  	struct usblp *usblp = file->private_data;
***************
*** 367,373 ****
  	lock_kernel();
  	usblp->used = 0;
  	if (usblp->dev) {
! 		usblp_unlink_urbs(usblp);
  		up(&usblp->sem);
  	} else 		/* finish cleanup from disconnect */
  		usblp_cleanup (usblp);
--- 272,280 ----
  	lock_kernel();
  	usblp->used = 0;
  	if (usblp->dev) {
! 		if (usblp->bidir)
! 			usb_unlink_urb(&usblp->readurb);
! 		usb_unlink_urb(&usblp->writeurb);
  		up(&usblp->sem);
  	} else 		/* finish cleanup from disconnect */
  		usblp_cleanup (usblp);
***************
*** 387,396 ****
  static int usblp_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
  {
  	struct usblp *usblp = file->private_data;
! 	int length, err, i;
! 	unsigned char lpstatus, newChannel;
! 	int status;
! 	int twoints[2];
  	int retval = 0;
  
  	down (&usblp->sem);
--- 294,301 ----
  static int usblp_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
  {
  	struct usblp *usblp = file->private_data;
! 	int length, err;
! 	unsigned char status;
  	int retval = 0;
  
  	down (&usblp->sem);
***************
*** 409,536 ****
  					goto done;
  				}
  
! 				length = usblp_cache_device_id_string(usblp);
! 				if (length < 0) {
! 					retval = length;
! 					goto done;
! 				}
! 				if (length > _IOC_SIZE(cmd))
! 					length = _IOC_SIZE(cmd); /* truncate */
! 
! 				if (copy_to_user((unsigned char *) arg,
! 						usblp->device_id_string,
! 						(unsigned long) length)) {
! 					retval = -EFAULT;
! 					goto done;
! 				}
! 
! 				break;
! 
! 			case IOCNR_GET_PROTOCOLS:
! 				if (_IOC_DIR(cmd) != _IOC_READ ||
! 				    _IOC_SIZE(cmd) < sizeof(twoints)) {
! 					retval = -EINVAL;
! 					goto done;
! 				}
! 
! 				twoints[0] = usblp->current_protocol;
! 				twoints[1] = 0;
! 				for (i = USBLP_FIRST_PROTOCOL;
! 				     i <= USBLP_LAST_PROTOCOL; i++) {
! 					if (usblp->protocol[i].alt_setting >= 0)
! 						twoints[1] |= (1<current_protocol);
! 				}
! 				break;
! 
! 			case IOCNR_HP_SET_CHANNEL:
! 				if (_IOC_DIR(cmd) != _IOC_WRITE ||
! 				    usblp->dev->descriptor.idVendor != 0x03F0 ||
! 				    usblp->quirks & USBLP_QUIRK_BIDIR) {
! 					retval = -EINVAL;
! 					goto done;
! 				}
! 
! 				err = usblp_hp_channel_change_request(usblp,
! 					arg, &newChannel);
  				if (err < 0) {
! 					err("usblp%d: error = %d setting "
! 						"HP channel",
  						usblp->minor, err);
  					retval = -EIO;
  					goto done;
  				}
  
! 				dbg("usblp%d requested/got HP channel %ld/%d",
! 					usblp->minor, arg, newChannel);
! 				break;
! 
! 			case IOCNR_GET_BUS_ADDRESS:
! 				if (_IOC_DIR(cmd) != _IOC_READ ||
! 				    _IOC_SIZE(cmd) < sizeof(twoints)) {
! 					retval = -EINVAL;
! 					goto done;
! 				}
! 
! 				twoints[0] = usblp->dev->bus->busnum;
! 				twoints[1] = usblp->dev->devnum;
! 				if (copy_to_user((unsigned char *)arg,
! 						(unsigned char *)twoints,
! 						sizeof(twoints))) {
! 					retval = -EFAULT;
! 					goto done;
! 				}
  
! 				dbg("usblp%d is bus=%d, device=%d",
! 					usblp->minor, twoints[0], twoints[1]);
! 				break;
  
! 			case IOCNR_GET_VID_PID:
! 				if (_IOC_DIR(cmd) != _IOC_READ ||
! 				    _IOC_SIZE(cmd) < sizeof(twoints)) {
! 					retval = -EINVAL;
! 					goto done;
! 				}
  
! 				twoints[0] = usblp->dev->descriptor.idVendor;
! 				twoints[1] = usblp->dev->descriptor.idProduct;
! 				if (copy_to_user((unsigned char *)arg,
! 						(unsigned char *)twoints,
! 						sizeof(twoints))) {
  					retval = -EFAULT;
  					goto done;
  				}
  
- 				dbg("usblp%d is VID=0x%4.4X, PID=0x%4.4X",
- 					usblp->minor, twoints[0], twoints[1]);
  				break;
  
  			default:
--- 314,345 ----
  					goto done;
  				}
  
! 				err = usblp_get_id(usblp, 0, usblp->device_id_string, DEVICE_ID_SIZE - 1);
  				if (err < 0) {
! 					dbg ("usblp%d: error = %d reading IEEE-1284 Device ID string",
  						usblp->minor, err);
+ 					usblp->device_id_string[0] = usblp->device_id_string[1] = '\0';
  					retval = -EIO;
  					goto done;
  				}
  
! 				length = (usblp->device_id_string[0] << 8) + usblp->device_id_string[1]; /* big-endian */
! 				if (length < DEVICE_ID_SIZE)
! 					usblp->device_id_string[length] = '\0';
! 				else
! 					usblp->device_id_string[DEVICE_ID_SIZE - 1] = '\0';
  
! 				dbg ("usblp%d Device ID string [%d/max %d]='%s'",
! 					usblp->minor, length, _IOC_SIZE(cmd), &usblp->device_id_string[2]);
  
! 				if (length > _IOC_SIZE(cmd)) length = _IOC_SIZE(cmd); /* truncate */
  
! 				if (copy_to_user((unsigned char *) arg,
! 						usblp->device_id_string, (unsigned long) length)) {
  					retval = -EFAULT;
  					goto done;
  				}
  
  				break;
  
  			default:
***************
*** 540,552 ****
  		switch (cmd) {
  
  			case LPGETSTATUS:
! 				if (usblp_read_status(usblp, &lpstatus)) {
  					err("usblp%d: failed reading printer status", usblp->minor);
  					retval = -EIO;
  					goto done;
  				}
! 				status = lpstatus;
! 				if (copy_to_user ((int *)arg, &status, sizeof(int)))
  					retval = -EFAULT;
  				break;
  
--- 349,360 ----
  		switch (cmd) {
  
  			case LPGETSTATUS:
! 				if (usblp_read_status(usblp, &status)) {
  					err("usblp%d: failed reading printer status", usblp->minor);
  					retval = -EIO;
  					goto done;
  				}
! 				if (copy_to_user ((unsigned char *)arg, &status, 1))
  					retval = -EFAULT;
  				break;
  
***************
*** 562,569 ****
  static ssize_t usblp_write(struct file *file, const char *buffer, size_t count, loff_t *ppos)
  {
  	struct usblp *usblp = file->private_data;
! 	int timeout, err = 0;
! 	size_t writecount = 0;
  
  	while (writecount < count) {
  
--- 370,376 ----
  static ssize_t usblp_write(struct file *file, const char *buffer, size_t count, loff_t *ppos)
  {
  	struct usblp *usblp = file->private_data;
! 	int timeout, err = 0, writecount = 0;
  
  	while (writecount < count) {
  
***************
*** 619,628 ****
  							 (count - writecount) : USBLP_BUF_SIZE;
  
  		if (copy_from_user(usblp->writeurb.transfer_buffer, buffer + writecount,
! 				usblp->writeurb.transfer_buffer_length)) {
! 			up(&usblp->sem);
! 			return writecount ? writecount : -EFAULT;
! 		}
  
  		usblp->writeurb.dev = usblp->dev;
  		usb_submit_urb(&usblp->writeurb);
--- 426,432 ----
  							 (count - writecount) : USBLP_BUF_SIZE;
  
  		if (copy_from_user(usblp->writeurb.transfer_buffer, buffer + writecount,
! 				usblp->writeurb.transfer_buffer_length)) return -EFAULT;
  
  		usblp->writeurb.dev = usblp->dev;
  		usb_submit_urb(&usblp->writeurb);
***************
*** 741,996 ****
  static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
  			 const struct usb_device_id *id)
  {
! 	struct usblp *usblp = 0;
! 	int protocol;
  	char name[6];
  
! 	/* Malloc and start initializing usblp structure so we can use it
! 	 * directly. */
  	if (!(usblp = kmalloc(sizeof(struct usblp), GFP_KERNEL))) {
! 		err("out of memory for usblp");
! 		goto abort;
  	}
  	memset(usblp, 0, sizeof(struct usblp));
- 	usblp->dev = dev;
  	init_MUTEX (&usblp->sem);
! 	init_waitqueue_head(&usblp->wait);
  	usblp->ifnum = ifnum;
  
! 	/* Look for a free usblp_table entry. */
! 	while (usblp_table[usblp->minor]) {
! 		usblp->minor++;
! 		if (usblp->minor >= USBLP_MINORS) {
! 			err("no more free usblp devices");
! 			goto abort;
! 		}
  	}
  
- 	/* Malloc device ID string buffer to the largest expected length,
- 	 * since we can re-query it on an ioctl and a dynamic string
- 	 * could change in length. */
  	if (!(usblp->device_id_string = kmalloc(DEVICE_ID_SIZE, GFP_KERNEL))) {
! 		err("out of memory for device_id_string");
! 		goto abort;
  	}
  
! 	/* Malloc write/read buffers in one chunk.  We somewhat wastefully
! 	 * malloc both regardless of bidirectionality, because the
! 	 * alternate setting can be changed later via an ioctl. */
! 	if (!(usblp->buf = kmalloc(2 * USBLP_BUF_SIZE, GFP_KERNEL))) {
! 		err("out of memory for buf");
! 		goto abort;
! 	}
! 
! 	/* Lookup quirks for this printer. */
! 	usblp->quirks = usblp_quirks(
! 		dev->descriptor.idVendor,
! 		dev->descriptor.idProduct);
! 
! 	/* Analyze and pick initial alternate settings and endpoints. */
! 	protocol = usblp_select_alts(usblp);
! 	if (protocol < 0) {
! 		dbg("incompatible printer-class device 0x%4.4X/0x%4.4X",
! 			dev->descriptor.idVendor,
! 			dev->descriptor.idProduct);
! 		goto abort;
! 	}
! 
! 	/* Setup the selected alternate setting and endpoints. */
! 	if (usblp_set_protocol(usblp, protocol) < 0)
! 		goto abort;
  
! 	/* Retrieve and store the device ID string. */
! 	usblp_cache_device_id_string(usblp);
  
  #ifdef DEBUG
  	usblp_check_status(usblp, 0);
  #endif
  
! 	usblp_table[usblp->minor] = usblp;
! 	/* If we have devfs, create with perms=660. */
! 	sprintf(name, "lp%d", usblp->minor);
  	usblp->devfs = devfs_register(usb_devfs_handle, name,
  				      DEVFS_FL_DEFAULT, USB_MAJOR,
! 				      USBLP_MINOR_BASE + usblp->minor,
  				      S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP |
  				      S_IWGRP, &usblp_fops, NULL);
  
! 	info("usblp%d: USB %sdirectional printer dev %d "
! 		"if %d alt %d proto %d vid 0x%4.4X pid 0x%4.4X",
! 		usblp->minor, usblp->bidir ? "Bi" : "Uni", dev->devnum, ifnum,
! 		usblp->protocol[usblp->current_protocol].alt_setting,
! 		usblp->current_protocol, usblp->dev->descriptor.idVendor,
! 		usblp->dev->descriptor.idProduct);
! 
! 	return usblp;
! 
! abort:
! 	if (usblp) {
! 		if (usblp->buf) kfree(usblp->buf);
! 		if (usblp->device_id_string) kfree(usblp->device_id_string);
! 		kfree(usblp);
! 	}
! 	return NULL;
! }
  
! /*
!  * We are a "new" style driver with usb_device_id table,
!  * but our requirements are too intricate for simple match to handle.
!  *
!  * The "proto_bias" option may be used to specify the preferred protocol
!  * for all USB printers (1=7/1/1, 2=7/1/2, 3=7/1/3).  If the device
!  * supports the preferred protocol, then we bind to it.
!  *
!  * The best interface for us is 7/1/2, because it is compatible
!  * with a stream of characters. If we find it, we bind to it.
!  *
!  * Note that the people from hpoj.sourceforge.net need to be able to
!  * bind to 7/1/3 (MLC/1284.4), so we provide them ioctls for this purpose.
!  *
!  * Failing 7/1/2, we look for 7/1/3, even though it's probably not
!  * stream-compatible, because this matches the behaviour of the old code.
!  *
!  * If nothing else, we bind to 7/1/1 - the unidirectional interface.
!  */
! static int usblp_select_alts(struct usblp *usblp)
! {
! 	struct usb_interface *if_alt;
! 	struct usb_interface_descriptor *ifd;
! 	struct usb_endpoint_descriptor *epd, *epwrite, *epread;
! 	int p, i, e;
! 
! 	if_alt = &usblp->dev->actconfig->interface[usblp->ifnum];
! 
! 	for (p = 0; p < USBLP_MAX_PROTOCOLS; p++)
! 		usblp->protocol[p].alt_setting = -1;
! 
! 	/* Find out what we have. */
! 	for (i = 0; i < if_alt->num_altsetting; i++) {
! 		ifd = &if_alt->altsetting[i];
! 
! 		if (ifd->bInterfaceClass != 7 || ifd->bInterfaceSubClass != 1)
! 			continue;
! 
! 		if (ifd->bInterfaceProtocol < USBLP_FIRST_PROTOCOL ||
! 		    ifd->bInterfaceProtocol > USBLP_LAST_PROTOCOL)
! 			continue;
! 
! 		/* Look for bulk OUT and IN endpoints. */
! 		epwrite = epread = 0;
! 		for (e = 0; e < ifd->bNumEndpoints; e++) {
! 			epd = &ifd->endpoint[e];
! 
! 			if ((epd->bmAttributes&USB_ENDPOINT_XFERTYPE_MASK)!=
! 			    USB_ENDPOINT_XFER_BULK)
! 				continue;
! 
! 			if (!(epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK)) {
! 				if (!epwrite) epwrite=epd;
! 
! 			} else {
! 				if (!epread) epread=epd;
! 			}
! 		}
! 
! 		/* Ignore buggy hardware without the right endpoints. */
! 		if (!epwrite || (ifd->bInterfaceProtocol > 1 && !epread))
! 			continue;
! 
! 		/* Turn off reads for 7/1/1 (unidirectional) interfaces
! 		 * and buggy bidirectional printers. */
! 		if (ifd->bInterfaceProtocol == 1) {
! 			epread = NULL;
! 		} else if (usblp->quirks & USBLP_QUIRK_BIDIR) {
! 			info("Disabling reads from problem bidirectional "
! 				"printer on usblp%d", usblp->minor);
! 			epread = NULL;
! 		}
! 
! 		usblp->protocol[ifd->bInterfaceProtocol].alt_setting = i;
! 		usblp->protocol[ifd->bInterfaceProtocol].epwrite = epwrite;
! 		usblp->protocol[ifd->bInterfaceProtocol].epread = epread;
! 	}
! 
! 	/* If our requested protocol is supported, then use it. */
! 	if (proto_bias >= USBLP_FIRST_PROTOCOL &&
! 	    proto_bias <= USBLP_LAST_PROTOCOL &&
! 	    usblp->protocol[proto_bias].alt_setting != -1)
! 		return proto_bias;
! 
! 	/* Ordering is important here. */
! 	if (usblp->protocol[2].alt_setting != -1) return 2;
! 	if (usblp->protocol[1].alt_setting != -1) return 1;
! 	if (usblp->protocol[3].alt_setting != -1) return 3;
! 
! 	/* If nothing is available, then don't bind to this device. */
! 	return -1;
! }
! 
! static int usblp_set_protocol(struct usblp *usblp, int protocol)
! {
! 	int r, alts;
! 
! 	if (protocol < USBLP_FIRST_PROTOCOL || protocol > USBLP_LAST_PROTOCOL)
! 		return -EINVAL;
! 
! 	alts = usblp->protocol[protocol].alt_setting;
! 	if (alts < 0) return -EINVAL;
! 	r = usb_set_interface(usblp->dev, usblp->ifnum, alts);
! 	if (r < 0) {
! 		err("can't set desired altsetting %d on interface %d",
! 			alts, usblp->ifnum);
! 		return r;
! 	}
! 
! 	FILL_BULK_URB(&usblp->writeurb, usblp->dev,
! 		usb_sndbulkpipe(usblp->dev,
! 		 usblp->protocol[protocol].epwrite->bEndpointAddress),
! 		usblp->buf, 0,
! 		usblp_bulk, usblp);
! 
! 	usblp->bidir = (usblp->protocol[protocol].epread != 0);
! 	if (usblp->bidir)
! 		FILL_BULK_URB(&usblp->readurb, usblp->dev,
! 			usb_rcvbulkpipe(usblp->dev,
! 			 usblp->protocol[protocol].epread->bEndpointAddress),
! 			usblp->buf + USBLP_BUF_SIZE, USBLP_BUF_SIZE,
! 			usblp_bulk, usblp);
! 
! 	usblp->current_protocol = protocol;
! 	dbg("usblp%d set protocol %d", usblp->minor, protocol);
! 	return 0;
! }
! 
! /* Retrieves and caches device ID string.
!  * Returns length, including length bytes but not null terminator.
!  * On error, returns a negative errno value. */
! static int usblp_cache_device_id_string(struct usblp *usblp)
! {
! 	int err, length;
! 
! 	err = usblp_get_id(usblp, 0, usblp->device_id_string, DEVICE_ID_SIZE - 1);
! 	if (err < 0) {
! 		dbg("usblp%d: error = %d reading IEEE-1284 Device ID string",
! 			usblp->minor, err);
! 		usblp->device_id_string[0] = usblp->device_id_string[1] = '\0';
! 		return -EIO;
! 	}
! 
! 	/* First two bytes are length in big-endian.
! 	 * They count themselves, and we copy them into
! 	 * the user's buffer. */
! 	length = (usblp->device_id_string[0] << 8) + usblp->device_id_string[1];
! 	if (length < 2)
! 		length = 2;
! 	else if (length >= DEVICE_ID_SIZE)
! 		length = DEVICE_ID_SIZE - 1;
! 	usblp->device_id_string[length] = '\0';
! 
! 	dbg("usblp%d Device ID string [len=%d]=\"%s\"",
! 		usblp->minor, length, &usblp->device_id_string[2]);
! 
! 	return length;
  }
  
  static void usblp_disconnect(struct usb_device *dev, void *ptr)
--- 545,681 ----
  static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
  			 const struct usb_device_id *id)
  {
! 	struct usb_interface_descriptor *interface;
! 	struct usb_endpoint_descriptor *epread, *epwrite;
! 	struct usblp *usblp;
! 	int minor, i, bidir = 0, quirks;
! 	int alts = dev->actconfig->interface[ifnum].act_altsetting;
! 	int length, err;
! 	char *buf;
  	char name[6];
  
! 	/* If a bidirectional interface exists, use it. */
! 	for (i = 0; i < dev->actconfig->interface[ifnum].num_altsetting; i++) {
! 
! 		interface = &dev->actconfig->interface[ifnum].altsetting[i];
! 
! 		if (interface->bInterfaceClass != 7 || interface->bInterfaceSubClass != 1 ||
! 		    interface->bInterfaceProtocol < 1 || interface->bInterfaceProtocol > 3 ||
! 		   (interface->bInterfaceProtocol > 1 && interface->bNumEndpoints < 2))
! 			continue;
! 
! 		if (interface->bInterfaceProtocol > 1) {
! 			bidir = 1;
! 			alts = i;
! 			break;
! 		}
! 	}
! 
! 	interface = &dev->actconfig->interface[ifnum].altsetting[alts];
! 	if (usb_set_interface(dev, ifnum, alts))
! 		err("can't set desired altsetting %d on interface %d", alts, ifnum);
! 
! 	epwrite = interface->endpoint + 0;
! 	epread = bidir ? interface->endpoint + 1 : NULL;
! 
! 	if ((epwrite->bEndpointAddress & 0x80) == 0x80) {
! 		if (interface->bNumEndpoints == 1)
! 			return NULL;
! 		epwrite = interface->endpoint + 1;
! 		epread = bidir ? interface->endpoint + 0 : NULL;
! 	}
! 
! 	if ((epwrite->bEndpointAddress & 0x80) == 0x80)
! 		return NULL;
! 
! 	if (bidir && (epread->bEndpointAddress & 0x80) != 0x80)
! 		return NULL;
! 
! 	for (minor = 0; minor < USBLP_MINORS && usblp_table[minor]; minor++);
! 	if (usblp_table[minor]) {
! 		err("no more free usblp devices");
! 		return NULL;
! 	}
! 
  	if (!(usblp = kmalloc(sizeof(struct usblp), GFP_KERNEL))) {
! 		err("out of memory");
! 		return NULL;
  	}
  	memset(usblp, 0, sizeof(struct usblp));
  	init_MUTEX (&usblp->sem);
! 
! 	/* lookup quirks for this printer */
! 	quirks = usblp_quirks(dev->descriptor.idVendor, dev->descriptor.idProduct);
! 
! 	if (bidir && (quirks & USBLP_QUIRK_BIDIR)) {
! 		bidir = 0;
! 		epread = NULL;
! 		info ("Disabling reads from problem bidirectional printer on usblp%d",
! 			minor);
! 	}
! 
! 	usblp->dev = dev;
  	usblp->ifnum = ifnum;
+ 	usblp->minor = minor;
+ 	usblp->bidir = bidir;
+ 	usblp->quirks = quirks;
  
! 	init_waitqueue_head(&usblp->wait);
! 
! 	if (!(buf = kmalloc(USBLP_BUF_SIZE * (bidir ? 2 : 1), GFP_KERNEL))) {
! 		err("out of memory");
! 		kfree(usblp);
! 		return NULL;
  	}
  
  	if (!(usblp->device_id_string = kmalloc(DEVICE_ID_SIZE, GFP_KERNEL))) {
! 		err("out of memory");
! 		kfree(usblp);
! 		kfree(buf);
! 		return NULL;
  	}
  
! 	FILL_BULK_URB(&usblp->writeurb, dev, usb_sndbulkpipe(dev, epwrite->bEndpointAddress),
! 		buf, 0, usblp_bulk, usblp);
  
! 	if (bidir)
! 		FILL_BULK_URB(&usblp->readurb, dev, usb_rcvbulkpipe(dev, epread->bEndpointAddress),
! 			buf + USBLP_BUF_SIZE, USBLP_BUF_SIZE, usblp_bulk, usblp);
! 
! 	/* Get the device_id string if possible. FIXME: Could make this kmalloc(length). */
! 	err = usblp_get_id(usblp, 0, usblp->device_id_string, DEVICE_ID_SIZE - 1);
! 	if (err >= 0) {
! 		length = (usblp->device_id_string[0] << 8) + usblp->device_id_string[1]; /* big-endian */
! 		if (length < DEVICE_ID_SIZE)
! 			usblp->device_id_string[length] = '\0';
! 		else
! 			usblp->device_id_string[DEVICE_ID_SIZE - 1] = '\0';
! 		dbg ("usblp%d Device ID string [%d]=%s",
! 			minor, length, &usblp->device_id_string[2]);
! 	}
! 	else {
! 		err ("usblp%d: error = %d reading IEEE-1284 Device ID string",
! 			minor, err);
! 		usblp->device_id_string[0] = usblp->device_id_string[1] = '\0';
! 	}
  
  #ifdef DEBUG
  	usblp_check_status(usblp, 0);
  #endif
  
! 	sprintf(name, "lp%d", minor);
! 
! 	/* if we have devfs, create with perms=660 */
  	usblp->devfs = devfs_register(usb_devfs_handle, name,
  				      DEVFS_FL_DEFAULT, USB_MAJOR,
! 				      USBLP_MINOR_BASE + minor,
  				      S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP |
  				      S_IWGRP, &usblp_fops, NULL);
  
! 	info("usblp%d: USB %sdirectional printer dev %d if %d alt %d",
! 		minor, bidir ? "Bi" : "Uni", dev->devnum, ifnum, alts);
  
! 	return usblp_table[minor] = usblp;
  }
  
  static void usblp_disconnect(struct usb_device *dev, void *ptr)
***************
*** 1006,1012 ****
  	lock_kernel();
  	usblp->dev = NULL;
  
! 	usblp_unlink_urbs(usblp);
  
  	if (!usblp->used)
  		usblp_cleanup (usblp);
--- 691,699 ----
  	lock_kernel();
  	usblp->dev = NULL;
  
! 	usb_unlink_urb(&usblp->writeurb);
! 	if (usblp->bidir)
! 		usb_unlink_urb(&usblp->readurb);
  
  	if (!usblp->used)
  		usblp_cleanup (usblp);
***************
*** 1040,1046 ****
  {
  	if (usb_register(&usblp_driver))
  		return -1;
! 	info(DRIVER_VERSION ": " DRIVER_DESC);
  	return 0;
  }
  
--- 727,733 ----
  {
  	if (usb_register(&usblp_driver))
  		return -1;
! 	info(DRIVER_VERSION ":" DRIVER_DESC);
  	return 0;
  }
  
***************
*** 1054,1059 ****
  
  MODULE_AUTHOR( DRIVER_AUTHOR );
  MODULE_DESCRIPTION( DRIVER_DESC );
- MODULE_PARM(proto_bias, "i");
- MODULE_PARM_DESC(proto_bias, "Favourite protocol number");
  MODULE_LICENSE("GPL");
--- 741,745 ----
  
  MODULE_AUTHOR( DRIVER_AUTHOR );
  MODULE_DESCRIPTION( DRIVER_DESC );
  MODULE_LICENSE("GPL");
+ 
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-ctrl.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-ctrl.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-ctrl.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-ctrl.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,7 ****
  /* Driver for Philips webcam
     Functions that send various control messages to the webcam, including
     video modes.
!    (C) 1999-2002 Nemosoft Unv. (webcam@smcc.demon.nl)
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- 1,7 ----
  /* Driver for Philips webcam
     Functions that send various control messages to the webcam, including
     video modes.
!    (C) 1999-2001 Nemosoft Unv. (webcam@smcc.demon.nl)
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
***************
*** 78,89 ****
  #define READ_SHUTTER_FORMATTER			0x0600
  #define READ_RED_GAIN_FORMATTER			0x0700
  #define READ_BLUE_GAIN_FORMATTER		0x0800
- #define SENSOR_TYPE_FORMATTER1			0x0C00
  #define READ_RAW_Y_MEAN_FORMATTER		0x3100
  #define SET_POWER_SAVE_MODE_FORMATTER		0x3200
  #define MIRROR_IMAGE_FORMATTER			0x3300
  #define LED_FORMATTER				0x3400
- #define SENSOR_TYPE_FORMATTER2			0x3700
  
  /* Formatters for the Video Endpoint controls [GS]ET_EP_STREAM_CTL */
  #define VIDEO_OUTPUT_CONTROL_FORMATTER		0x0100
--- 78,87 ----
***************
*** 164,184 ****
  /****************************************************************************/
  
  
- #define SendControlMsg(request, value, buflen) \
- 	usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0), \
- 		request, \
- 		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, \
- 		value, \
- 		pdev->vcinterface, \
- 		&buf, buflen, HZ / 2)
- 
- #define RecvControlMsg(request, value, buflen) \
- 	usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0), \
- 		request, \
- 		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, \
- 		value, \
- 		pdev->vcinterface, \
- 		&buf, buflen, HZ / 2)
  
  
  #if PWC_DEBUG
--- 162,167 ----
***************
*** 258,264 ****
  	ret = send_video_command(pdev->udev, pdev->vendpoint, buf, 3);
  	if (ret < 0)
  		return ret;
! 	if (pEntry->compressed && pdev->decompressor != NULL)
  		pdev->decompressor->init(pdev->release, buf, pdev->decompress_data);
  		
  	/* Set various parameters */
--- 241,247 ----
  	ret = send_video_command(pdev->udev, pdev->vendpoint, buf, 3);
  	if (ret < 0)
  		return ret;
! 	if (pEntry->compressed)
  		pdev->decompressor->init(pdev->release, buf, pdev->decompress_data);
  		
  	/* Set various parameters */
***************
*** 928,934 ****
  	int ret;
  	
  	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
!  	        GET_CHROM_CTL, 
  		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
  	        PRESET_MANUAL_RED_GAIN_FORMATTER,
  		pdev->vcinterface,
--- 911,917 ----
  	int ret;
  	
  	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
!  	        GET_STATUS_CTL, 
  		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
  	        PRESET_MANUAL_RED_GAIN_FORMATTER,
  		pdev->vcinterface,
***************
*** 967,973 ****
  	int ret;
  	
  	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
!    	        GET_CHROM_CTL,
  		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
  		PRESET_MANUAL_BLUE_GAIN_FORMATTER,
  		pdev->vcinterface,
--- 950,956 ----
  	int ret;
  	
  	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
!    	        GET_STATUS_CTL,
  		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
  		PRESET_MANUAL_BLUE_GAIN_FORMATTER,
  		pdev->vcinterface,
***************
*** 979,985 ****
  	return (buf << 8);
  }
  
- 
  /* The following two functions are different, since they only read the
     internal red/blue gains, which may be different from the manual 
     gains set or read above.
--- 962,967 ----
***************
*** 1015,1096 ****
  		&buf, 1, HZ / 2);
  
  	if (ret < 0)
! 		return ret;
  	
  	return (buf << 8);
  }
  
- 
- static inline int pwc_set_wb_speed(struct pwc_device *pdev, int speed)
- {
- 	unsigned char buf;
- 	
- 	/* useful range is 0x01..0x20 */
- 	buf = speed / 0x7f0;
- 	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
- 		SET_CHROM_CTL,
- 		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 		AWB_CONTROL_SPEED_FORMATTER,
- 		pdev->vcinterface,
- 		&buf, 1, HZ / 2);
- }
- 
- static inline int pwc_get_wb_speed(struct pwc_device *pdev)
- {
- 	unsigned char buf;
- 	int ret;
- 	
- 	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
- 		GET_CHROM_CTL,
- 		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 		AWB_CONTROL_SPEED_FORMATTER,
- 		pdev->vcinterface,
- 		&buf, 1, HZ / 2);
- 	if (ret < 0)
- 		return ret;
- 	return (buf * 0x7f0);
- }
- 
- 
- static inline int pwc_set_wb_delay(struct pwc_device *pdev, int delay)
- {
- 	unsigned char buf;
- 	
- 	/* useful range is 0x01..0x3F */
- 	buf = (delay >> 10);
- 	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
- 		SET_CHROM_CTL,
- 		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 		AWB_CONTROL_DELAY_FORMATTER,
- 		pdev->vcinterface,
- 		&buf, 1, HZ / 2);
- }
- 
- static inline int pwc_get_wb_delay(struct pwc_device *pdev)
- {
- 	unsigned char buf;
- 	int ret;
- 	
- 	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
- 		GET_CHROM_CTL,
- 		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 		AWB_CONTROL_DELAY_FORMATTER,
- 		pdev->vcinterface,
- 		&buf, 1, HZ / 2);
- 	if (ret < 0)
- 		return ret;
- 	return (buf << 10);
- }
- 
- 
  int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value)
  {
  	unsigned char buf[2];
  
  	if (pdev->type < 730)
  		return 0;
- 	on_value /= 100;
- 	off_value /= 100;
  	if (on_value < 0)
  		on_value = 0;
  	if (on_value > 0xff)
--- 997,1013 ----
  		&buf, 1, HZ / 2);
  
  	if (ret < 0)
! 	    return ret;
  	
  	return (buf << 8);
  }
  
  int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value)
  {
  	unsigned char buf[2];
  
  	if (pdev->type < 730)
  		return 0;
  	if (on_value < 0)
  		on_value = 0;
  	if (on_value > 0xff)
***************
*** 1131,1377 ****
  
  	if (ret < 0)
  		return ret;
! 	*on_value = buf[0] * 100;
! 	*off_value = buf[1] * 100;
  	return 0;
  }
  
- static inline int pwc_set_contour(struct pwc_device *pdev, int contour)
- {
- 	unsigned char buf;
- 	int ret;
- 	
- 	if (contour < 0)
- 		buf = 0xff; /* auto contour on */
- 	else
- 		buf = 0x0; /* auto contour off */
- 	ret = usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
- 		SET_LUM_CTL,
- 		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 		AUTO_CONTOUR_FORMATTER,
- 		pdev->vcinterface,
- 		&buf, 1, HZ / 2);
- 	if (ret < 0)
- 		return ret;
- 	
- 	if (contour < 0)
- 		return 0;
- 	if (contour > 0xffff)
- 		contour = 0xffff;
- 	
- 	buf = (contour >> 10); /* contour preset is [0..3f] */
- 	ret = usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
- 		SET_LUM_CTL,
- 		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 		PRESET_CONTOUR_FORMATTER,
- 		pdev->vcinterface,
- 		&buf, 1, HZ / 2);
- 	if (ret < 0)	
- 		return ret;	
- 	return 0;
- }
- 
- static inline int pwc_get_contour(struct pwc_device *pdev, int *contour)
- {
- 	unsigned char buf;
- 	int ret;
- 	
- 	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
- 		GET_LUM_CTL,
- 		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 		AUTO_CONTOUR_FORMATTER,
- 		pdev->vcinterface,
- 		&buf, 1, HZ / 2);
- 	if (ret < 0)
- 		return ret;
- 
- 	if (buf == 0) {
- 		/* auto mode off, query current preset value */
- 		ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
- 			GET_LUM_CTL,
- 			USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 			PRESET_CONTOUR_FORMATTER,
- 			pdev->vcinterface,
- 			&buf, 1, HZ / 2);
- 		if (ret < 0)	
- 			return ret;
- 		*contour =  (buf << 10);
- 	}
- 	else
- 		*contour = -1;
- 	return 0;
- }
- 
- 
- static inline int pwc_set_backlight(struct pwc_device *pdev, int backlight)
- {
- 	unsigned char buf;
- 	
- 	if (backlight)
- 		buf = 0xff;
- 	else
- 		buf = 0x0;
- 	return usb_control_msg(pdev->udev, usb_sndctrlpipe(pdev->udev, 0),
- 		SET_LUM_CTL,
- 		USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 		BACK_LIGHT_COMPENSATION_FORMATTER,
- 		pdev->vcinterface,
- 		&buf, 1, HZ / 2);
- }
- 
- static inline int pwc_get_backlight(struct pwc_device *pdev)
- {
- 	int ret;
- 	unsigned char buf;
- 	
- 	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
- 		GET_LUM_CTL,
- 		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 		BACK_LIGHT_COMPENSATION_FORMATTER,
- 		pdev->vcinterface,
- 		&buf, 1, HZ / 2);
- 	if (ret < 0)
- 		return ret;
- 	return buf;
- }
- 
- 
- static inline int pwc_set_flicker(struct pwc_device *pdev, int flicker)
- {
- 	unsigned char buf;
- 	
- 	if (flicker)
- 		buf = 0xff;
- 	else
- 		buf = 0x0;
- 	return SendControlMsg(SET_LUM_CTL, FLICKERLESS_MODE_FORMATTER, 1);
- }
- 
- static inline int pwc_get_flicker(struct pwc_device *pdev)
- {
- 	int ret;
- 	unsigned char buf;
- 	
- 	ret = RecvControlMsg(SET_LUM_CTL, FLICKERLESS_MODE_FORMATTER, 1);
- 	if (ret < 0)
- 		return ret;
- 	return buf;
- }
- 
- 
- static inline int pwc_set_dynamic_noise(struct pwc_device *pdev, int noise)
- {
- 	unsigned char buf;
- 
- 	if (noise < 0)
- 		noise = 0;
- 	if (noise > 3)
- 		noise = 3;
- 	buf = noise;
- 	return SendControlMsg(SET_LUM_CTL, DYNAMIC_NOISE_CONTROL_FORMATTER, 1);
- }
- 
- static inline int pwc_get_dynamic_noise(struct pwc_device *pdev)
- {
- 	int ret;
- 	unsigned char buf;
- 	
- 	ret = RecvControlMsg(SET_LUM_CTL, DYNAMIC_NOISE_CONTROL_FORMATTER, 1);
- 	if (ret < 0)
- 		return ret;
- Debug("pwc_get_dynamic_noise = %d\n", buf);
- 	return buf;
- }
- 
- 
- int pwc_get_cmos_sensor(struct pwc_device *pdev)
- {
- 	unsigned char buf;
- 	int ret = -1, request;
- 	
- 	if (pdev->type < 675)
- 		request = SENSOR_TYPE_FORMATTER1;
- 	else if (pdev->type < 730)
- 		return -1; /* The Vesta series doesn't have this call */
- 	else
- 		request = SENSOR_TYPE_FORMATTER2;
- 	
- 	ret = usb_control_msg(pdev->udev, usb_rcvctrlpipe(pdev->udev, 0),
- 		GET_STATUS_CTL,
- 		USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
- 		request,
- 		pdev->vcinterface,
- 		&buf, 1, HZ / 2);
- 	if (ret < 0)
- 		return ret;
- 	if (pdev->type < 675)
- 		return buf | 0x100;
- 	else
- 		return buf;
- }
- 
- 
   /* End of Add-Ons                                    */
   /* ************************************************* */
  
  int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
  {
- 	int ret = 0;
- 
  	switch(cmd) {
  	case VIDIOCPWCRUSER:
  	{
  		if (pwc_restore_user(pdev))
! 			ret = -EINVAL;
  		break;
  	}
  	
  	case VIDIOCPWCSUSER:
  	{
  		if (pwc_save_user(pdev))
! 			ret = -EINVAL;
  		break;
  	}
  		
  	case VIDIOCPWCFACTORY:
  	{
  		if (pwc_restore_factory(pdev))
! 			ret = -EINVAL;
  		break;
  	}
  	
  	case VIDIOCPWCSCQUAL:
  	{	
! 		int qual;
  
  		if (copy_from_user(&qual, arg, sizeof(int)))
! 			ret = -EFAULT;
! 		else {
! 			if (qual < 0 || qual > 3)
! 				ret = -EINVAL;
! 			else
! 				ret = pwc_try_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, qual, pdev->vsnapshot);
! 			if (ret >= 0)
! 				pdev->vcompression = qual;
! 		}
  		break;
  	}
  	
  	case VIDIOCPWCGCQUAL:
  	{
  		if (copy_to_user(arg, &pdev->vcompression, sizeof(int)))
! 			ret = -EFAULT;
! 		break;
! 	}
! 
! 	case VIDIOCPWCPROBE:
! 	{
! 		struct pwc_probe probe;
! 		
! 		strcpy(probe.name, pdev->vdev->name);
! 		probe.type = pdev->type;
! 		if (copy_to_user(arg, &probe, sizeof(probe)))
! 			ret = -EFAULT;
  		break;
  	}
  
--- 1048,1105 ----
  
  	if (ret < 0)
  		return ret;
! 	*on_value = buf[0];
! 	*off_value = buf[1];
  	return 0;
  }
  
   /* End of Add-Ons                                    */
   /* ************************************************* */
  
  int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
  {
  	switch(cmd) {
  	case VIDIOCPWCRUSER:
  	{
  		if (pwc_restore_user(pdev))
! 			return -EINVAL;
  		break;
  	}
  	
  	case VIDIOCPWCSUSER:
  	{
  		if (pwc_save_user(pdev))
! 			return -EINVAL;
  		break;
  	}
  		
  	case VIDIOCPWCFACTORY:
  	{
  		if (pwc_restore_factory(pdev))
! 			return -EINVAL;
  		break;
  	}
  	
  	case VIDIOCPWCSCQUAL:
  	{	
! 		int qual, ret;
  
  		if (copy_from_user(&qual, arg, sizeof(int)))
! 			return -EFAULT;
! 			
! 		if (qual < 0 || qual > 3)
! 			return -EINVAL;
! 		ret = pwc_try_video_mode(pdev, pdev->view.x, pdev->view.y, pdev->vframes, qual, pdev->vsnapshot);
! 		if (ret < 0)
! 			return ret;
! 		pdev->vcompression = qual;
  		break;
  	}
  	
  	case VIDIOCPWCGCQUAL:
  	{
  		if (copy_to_user(arg, &pdev->vcompression, sizeof(int)))
! 			return -EFAULT;
  		break;
  	}
  
***************
*** 1380,1389 ****
  		int agc;
  		
  		if (copy_from_user(&agc, arg, sizeof(agc)))
! 			ret = -EFAULT;	
  		else {
  			if (pwc_set_agc(pdev, agc < 0 ? 1 : 0, agc))
! 				ret = -EINVAL;
  		}
  		break;
  	}
--- 1108,1117 ----
  		int agc;
  		
  		if (copy_from_user(&agc, arg, sizeof(agc)))
! 			return -EFAULT;	
  		else {
  			if (pwc_set_agc(pdev, agc < 0 ? 1 : 0, agc))
! 				return -EINVAL;
  		}
  		break;
  	}
***************
*** 1393,1428 ****
  		int agc;
  		
  		if (pwc_get_agc(pdev, &agc))
! 			ret = -EINVAL;
! 		else
! 			if (copy_to_user(arg, &agc, sizeof(agc)))
! 				ret = -EFAULT;
  		break;
  	}
  	
  	case VIDIOCPWCSSHUTTER:
  	{
! 		int shutter_speed;
  
  		if (copy_from_user(&shutter_speed, arg, sizeof(shutter_speed)))
! 			ret = -EFAULT;
! 		else
  			ret = pwc_set_shutter_speed(pdev, shutter_speed < 0 ? 1 : 0, shutter_speed);
  		break;
  	}
  	
          case VIDIOCPWCSAWB:
  	{
  		struct pwc_whitebalance wb;
  		
  		if (copy_from_user(&wb, arg, sizeof(wb)))
! 			ret = -EFAULT;
! 		else {
! 			ret = pwc_set_awb(pdev, wb.mode);
! 			if (ret >= 0 && wb.mode == PWC_WB_MANUAL) {
! 				pwc_set_red_gain(pdev, wb.manual_red);
! 				pwc_set_blue_gain(pdev, wb.manual_blue);
! 			}
  		}
  		break;
  	}
--- 1121,1162 ----
  		int agc;
  		
  		if (pwc_get_agc(pdev, &agc))
! 			return -EINVAL;
! 		if (copy_to_user(arg, &agc, sizeof(agc)))
! 			return -EFAULT;
  		break;
  	}
  	
  	case VIDIOCPWCSSHUTTER:
  	{
! 		int shutter_speed, ret;
  
  		if (copy_from_user(&shutter_speed, arg, sizeof(shutter_speed)))
! 			return -EFAULT;
! 		else {
  			ret = pwc_set_shutter_speed(pdev, shutter_speed < 0 ? 1 : 0, shutter_speed);
+ 			if (ret < 0)
+ 				return ret;
+ 		}
  		break;
  	}
  	
+ 
+  /* ************************************************* */
+  /* Begin of Add-Ons for color compensation           */
+ 
          case VIDIOCPWCSAWB:
  	{
  		struct pwc_whitebalance wb;
+ 		int ret;
  		
  		if (copy_from_user(&wb, arg, sizeof(wb)))
! 			return -EFAULT;
! 	
! 		ret = pwc_set_awb(pdev, wb.mode);
! 		if (ret >= 0 && wb.mode == PWC_WB_MANUAL) {
! 			pwc_set_red_gain(pdev, wb.manual_red);
! 			pwc_set_blue_gain(pdev, wb.manual_blue);
  		}
  		break;
  	}
***************
*** 1434,1609 ****
  		memset(&wb, 0, sizeof(wb));
  		wb.mode = pwc_get_awb(pdev);
  		if (wb.mode < 0)
! 			ret = -EINVAL;
! 		else {
! 			if (wb.mode == PWC_WB_MANUAL) {
! 				wb.manual_red = pwc_get_red_gain(pdev);
! 				wb.manual_blue = pwc_get_blue_gain(pdev);
! 			}
! 			if (wb.mode == PWC_WB_AUTO) {
! 				wb.read_red = pwc_read_red_gain(pdev);
! 				wb.read_blue = pwc_read_blue_gain(pdev);
! 			}
! 			if (copy_to_user(arg, &wb, sizeof(wb)))
! 				ret= -EFAULT;
  		}
  		break;
  	}
- 	
- 	case VIDIOCPWCSAWBSPEED:
- 	{
- 		struct pwc_wb_speed wbs;
- 		
- 		if (copy_from_user(&wbs, arg, sizeof(wbs)))
- 			ret = -EFAULT;
- 		else {
- 			if (wbs.control_speed > 0) {
- 				ret = pwc_set_wb_speed(pdev, wbs.control_speed);
- 			}
- 			if (wbs.control_delay > 0) {
- 				ret = pwc_set_wb_delay(pdev, wbs.control_delay);
- 			}
- 		}
- 		break;
- 	}
- 	
- 	case VIDIOCPWCGAWBSPEED:
- 	{
- 		struct pwc_wb_speed wbs;
- 		
- 		ret = pwc_get_wb_speed(pdev);
- 		if (ret < 0)
- 			break;
- 		wbs.control_speed = ret;
- 		ret = pwc_get_wb_delay(pdev);
- 		if (ret < 0)
- 			break;
- 		wbs.control_delay = ret;
- 		if (copy_to_user(arg, &wbs, sizeof(wbs)))
- 			ret = -EFAULT;
- 		break;
- 	}
  
          case VIDIOCPWCSLED:
  	{
  		struct pwc_leds leds;
  
  		if (copy_from_user(&leds, arg, sizeof(leds)))
! 			ret = -EFAULT;
! 		else
! 			ret = pwc_set_leds(pdev, leds.led_on, leds.led_off);
! 	    	break;
  	}
  
  
  	case VIDIOCPWCGLED:
  	{
  		struct pwc_leds leds;
  		
! 		ret = pwc_get_leds(pdev, &leds.led_on, &leds.led_off); 
! 		if (ret < 0)
! 			break;
  		if (copy_to_user(arg, &leds, sizeof(leds)))
! 			ret = -EFAULT;
! 		break;
! 	}
! 
! 	case VIDIOCPWCSCONTOUR:
! 	{
! 		int contour;
! 		
! 		if (copy_from_user(&contour, arg, sizeof(contour)))
! 			ret = -EFAULT;
! 		else
! 			ret = pwc_set_contour(pdev, contour);
! 		break;
! 	}
! 			
! 	case VIDIOCPWCGCONTOUR:
! 	{
! 		int contour;
! 		
! 		ret = pwc_get_contour(pdev, &contour);
! 		if (ret < 0)
! 			break;
! 			
! 		if (copy_to_user(arg, &contour, sizeof(contour)))
! 			ret = -EFAULT;
! 		break;
! 	}
! 	
! 	case VIDIOCPWCSBACKLIGHT:
! 	{
! 		int backlight;
! 		
! 		if (copy_from_user(&backlight, arg, sizeof(backlight)))
! 			ret = -EFAULT;
! 		else
! 			ret = pwc_set_backlight(pdev, backlight);
! 		break;
! 	}
! 
! 	case VIDIOCPWCGBACKLIGHT:
! 	{
! 		ret = pwc_get_backlight(pdev);
! 		if (ret < 0)
! 			break;
! 		if (copy_to_user(arg, &ret, sizeof(ret)))
! 			ret = -EFAULT;
! 		break;
! 	}
! 	
! 	case VIDIOCPWCSFLICKER:
! 	{
! 		int flicker;
! 		
! 		if (copy_from_user(&flicker, arg, sizeof(flicker)))
! 			ret = -EFAULT;
! 		else
! 			ret = pwc_set_flicker(pdev, flicker);
  		break;
  	}
  
! 	case VIDIOCPWCGFLICKER:
! 	{
! 		ret = pwc_get_flicker(pdev);
! 		if (ret < 0)
! 			break;
! 		if (copy_to_user(arg, &ret, sizeof(ret)))
! 			ret = -EFAULT;
! 		break;
! 	}
! 	
! 	case VIDIOCPWCSDYNNOISE:
! 	{
! 		int dynnoise;
! 		
! 		if (copy_from_user(&dynnoise, arg, sizeof(dynnoise)))
! 			ret = -EFAULT;
! 		else
! 			ret = pwc_set_dynamic_noise(pdev, dynnoise);
! 		break;
! 	}
! 	
! 	case VIDIOCPWCGDYNNOISE:
! 	{
! 		ret = pwc_get_dynamic_noise(pdev);
! 		if (ret < 0)
! 			break;
! 		if (copy_to_user(arg, &ret, sizeof(ret)))
! 			ret = -EFAULT;
! 		break;
! 	}
! 	
  
  	default:
! 		ret = -ENOIOCTLCMD;
  		break;
  	}
! 	
! 	if (ret > 0)
! 		return 0;
! 	return ret;
  }
  
  
--- 1168,1220 ----
  		memset(&wb, 0, sizeof(wb));
  		wb.mode = pwc_get_awb(pdev);
  		if (wb.mode < 0)
! 			return -EINVAL;
! 		wb.manual_red = pwc_get_red_gain(pdev);
! 		wb.manual_blue = pwc_get_blue_gain(pdev);
! 		if (wb.mode == PWC_WB_AUTO) {
! 			wb.read_red = pwc_read_red_gain(pdev);
! 			wb.read_blue = pwc_read_blue_gain(pdev);
  		}
  		break;
  	}
  
          case VIDIOCPWCSLED:
  	{
+ 		int ret;
  		struct pwc_leds leds;
  
  		if (copy_from_user(&leds, arg, sizeof(leds)))
! 			return -EFAULT;
! 
! 		ret = pwc_set_leds(pdev, leds.led_on, leds.led_off);
! 		if (ret<0)
! 		    return ret;
! 	    break;
  	}
  
  
+ 
  	case VIDIOCPWCGLED:
  	{
+ 		int led;
  		struct pwc_leds leds;
  		
! 		led = pwc_get_leds(pdev, &leds.led_on, &leds.led_off); 
! 		if (led < 0)
! 			return -EINVAL;
  		if (copy_to_user(arg, &leds, sizeof(leds)))
! 			return -EFAULT;
  		break;
  	}
  
!  /* End of Add-Ons                                    */
!  /* ************************************************* */
  
  	default:
! 		return -ENOIOCTLCMD;
  		break;
  	}
! 	return 0;
  }
  
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-if.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-if.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-if.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-if.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,6 ****
  /* Linux driver for Philips webcam 
     USB and Video4Linux interface part.
!    (C) 1999-2002 Nemosoft Unv.
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- 1,6 ----
  /* Linux driver for Philips webcam 
     USB and Video4Linux interface part.
!    (C) 1999-2001 Nemosoft Unv.
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
***************
*** 39,48 ****
  
  /* Contributors:
     - Alvarado: adding whitebalance code
!    - Alistar Moire: QuickCam 3000 Pro device/product ID
!    - Tony Hoyle: Creative Labs Webcam 5 device/product ID
!    - Mark Burazin: solving hang in VIDIOCSYNC when camera gets unplugged
!    - Jk Fang: SOTEC device/product ID
  */
  
  #include 
--- 39,45 ----
  
  /* Contributors:
     - Alvarado: adding whitebalance code
!    - Alistar Moire: QuickCam 3000 Pro testing
  */
  
  #include 
***************
*** 65,72 ****
  /* Function prototypes and driver templates */
  
  /* hotplug device table support */
! static struct usb_device_id pwc_device_table [] = {
! 	{ USB_DEVICE(0x0471, 0x0302) }, /* Philips models */
  	{ USB_DEVICE(0x0471, 0x0303) },
  	{ USB_DEVICE(0x0471, 0x0304) },
  	{ USB_DEVICE(0x0471, 0x0307) },
--- 62,69 ----
  /* Function prototypes and driver templates */
  
  /* hotplug device table support */
! static __devinitdata struct usb_device_id pwc_device_table [] = {
! 	{ USB_DEVICE(0x0471, 0x0302) },
  	{ USB_DEVICE(0x0471, 0x0303) },
  	{ USB_DEVICE(0x0471, 0x0304) },
  	{ USB_DEVICE(0x0471, 0x0307) },
***************
*** 75,88 ****
  	{ USB_DEVICE(0x0471, 0x0310) },
  	{ USB_DEVICE(0x0471, 0x0311) },
  	{ USB_DEVICE(0x0471, 0x0312) },
! 	{ USB_DEVICE(0x069A, 0x0001) }, /* Askey */
! 	{ USB_DEVICE(0x046D, 0x08b0) }, /* Logitech */
! 	{ USB_DEVICE(0x055D, 0x9000) }, /* Samsung */
  	{ USB_DEVICE(0x055D, 0x9001) },
- 	{ USB_DEVICE(0x041E, 0x400C) }, /* Creative */
- 	{ USB_DEVICE(0x04CC, 0x8116) }, /* Afina Eye */
- 	{ USB_DEVICE(0x0d81, 0x1910) }, /* Visionite */
- 	{ USB_DEVICE(0x0d81, 0x1900) },
  	{ }
  };
  MODULE_DEVICE_TABLE(usb, pwc_device_table);
--- 72,81 ----
  	{ USB_DEVICE(0x0471, 0x0310) },
  	{ USB_DEVICE(0x0471, 0x0311) },
  	{ USB_DEVICE(0x0471, 0x0312) },
! 	{ USB_DEVICE(0x069A, 0x0001) },
! 	{ USB_DEVICE(0x046D, 0x08b0) },
! 	{ USB_DEVICE(0x055D, 0x9000) },
  	{ USB_DEVICE(0x055D, 0x9001) },
  	{ }
  };
  MODULE_DEVICE_TABLE(usb, pwc_device_table);
***************
*** 107,113 ****
  static int default_mbufs = 2;	/* Default number of mmap() buffers */
         int pwc_trace = TRACE_MODULE | TRACE_FLOW | TRACE_PWCX;
  static int power_save = 0;
! static int led_on = 100, led_off = 0; /* defaults to LED that is on while in use */
         int pwc_preferred_compression = 2; /* 0..3 = uncompressed..high */
  static struct {
  	int type;
--- 100,106 ----
  static int default_mbufs = 2;	/* Default number of mmap() buffers */
         int pwc_trace = TRACE_MODULE | TRACE_FLOW | TRACE_PWCX;
  static int power_save = 0;
! static int led_on = 1, led_off = 0; /* defaults to LED that is on while in use */
         int pwc_preferred_compression = 2; /* 0..3 = uncompressed..high */
  static struct {
  	int type;
***************
*** 165,171 ****
     succeeded. The pwc_device struct links back to both structures.
  
     When a device is unplugged while in use it will be removed from the 
!    list of known USB devices; I also de-register it as a V4L device, but 
     unfortunately I can't free the memory since the struct is still in use
     by the file descriptor. This free-ing is then deferend until the first
     opportunity. Crude, but it works.
--- 158,164 ----
     succeeded. The pwc_device struct links back to both structures.
  
     When a device is unplugged while in use it will be removed from the 
!    list of known USB devices; I also de-register as a V4L device, but 
     unfortunately I can't free the memory since the struct is still in use
     by the file descriptor. This free-ing is then deferend until the first
     opportunity. Crude, but it works.
***************
*** 179,203 ****
  /***************************************************************************/
  /* Private functions */
  
  /* Here we want the physical address of the memory.
!  * This is used when initializing the contents of the area.
   */
  static inline unsigned long kvirt_to_pa(unsigned long adr) 
  {
!         unsigned long kva, ret;
  
! 	kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
! 	kva |= adr & (PAGE_SIZE-1); /* restore the offset */
  	ret = __pa(kva);
          return ret;
  }
  
! static void * rvmalloc(unsigned long size)
  {
  	void * mem;
! 	unsigned long adr;
  
! 	size=PAGE_ALIGN(size);
          mem=vmalloc_32(size);
  	if (mem) 
  	{
--- 172,231 ----
  /***************************************************************************/
  /* Private functions */
  
+ /* Memory management functions, nicked from cpia.c, which nicked them from
+    bttv.c. So far, I've counted duplication of this code 6 times 
+    (bttv, cpia, ibmcam, ov511, pwc, ieee1394).
+  */
+ 
+ /* Given PGD from the address space's page table, return the kernel
+  * virtual mapping of the physical memory mapped at ADR.
+  */
+ static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
+ {
+         unsigned long ret = 0UL;
+ 	pmd_t *pmd;
+ 	pte_t *ptep, pte;
+   
+ 	if (!pgd_none(*pgd)) {
+                 pmd = pmd_offset(pgd, adr);
+                 if (!pmd_none(*pmd)) {
+                         ptep = pte_offset(pmd, adr);
+                         pte = *ptep;
+                         if(pte_present(pte)) {
+ 				ret  = (unsigned long) page_address(pte_page(pte));
+ 				ret |= (adr & (PAGE_SIZE - 1));
+ 				
+ 			}
+                 }
+         }
+ 	return ret;
+ }
+ 
+ 
+ 
  /* Here we want the physical address of the memory.
!  * This is used when initializing the contents of the
!  * area and marking the pages as reserved.
   */
  static inline unsigned long kvirt_to_pa(unsigned long adr) 
  {
!         unsigned long va, kva, ret;
  
!         va = VMALLOC_VMADDR(adr);
!         kva = uvirt_to_kva(pgd_offset_k(va), va);
  	ret = __pa(kva);
          return ret;
  }
  
! static void * rvmalloc(signed long size)
  {
  	void * mem;
! 	unsigned long adr, page;
  
!         /* Round it off to PAGE_SIZE */
!         size += (PAGE_SIZE - 1);
!         size &= ~(PAGE_SIZE - 1);	
!         
          mem=vmalloc_32(size);
  	if (mem) 
  	{
***************
*** 205,211 ****
  	        adr=(unsigned long) mem;
  		while (size > 0) 
                  {
! 			mem_map_reserve(vmalloc_to_page((void *)adr));
  			adr+=PAGE_SIZE;
  			size-=PAGE_SIZE;
  		}
--- 233,240 ----
  	        adr=(unsigned long) mem;
  		while (size > 0) 
                  {
! 	                page = kvirt_to_pa(adr);
! 			mem_map_reserve(virt_to_page(__va(page)));
  			adr+=PAGE_SIZE;
  			size-=PAGE_SIZE;
  		}
***************
*** 213,228 ****
  	return mem;
  }
  
! static void rvfree(void * mem, unsigned long size)
  {
!         unsigned long adr;
! 
  	if (mem) 
  	{
  	        adr=(unsigned long) mem;
! 		while ((long) size > 0) 
                  {
! 			mem_map_unreserve(vmalloc_to_page((void *)adr));
  			adr+=PAGE_SIZE;
  			size-=PAGE_SIZE;
  		}
--- 242,261 ----
  	return mem;
  }
  
! static void rvfree(void * mem, signed long size)
  {
!         unsigned long adr, page;
!         
!         /* Round it off to PAGE_SIZE */
!         size += (PAGE_SIZE - 1);
!         size &= ~(PAGE_SIZE - 1);	
  	if (mem) 
  	{
  	        adr=(unsigned long) mem;
! 		while (size > 0) 
                  {
! 	                page = kvirt_to_pa(adr);
! 			mem_map_unreserve(virt_to_page(__va(page)));
  			adr+=PAGE_SIZE;
  			size-=PAGE_SIZE;
  		}
***************
*** 313,320 ****
  	for (; i < MAX_IMAGES; i++)
  		pdev->image_ptr[i] = NULL;
  
- 	kbuf = NULL;
- 	  
  	Trace(TRACE_MEMORY, "Leaving pwc_allocate_buffers().\n");
  	return 0;
  }
--- 346,351 ----
***************
*** 369,375 ****
  		rvfree(pdev->image_data, default_mbufs * pdev->len_per_image);
  	}
  	pdev->image_data = NULL;
- 	
  	Trace(TRACE_MEMORY, "Leaving free_buffers().\n");
  }
  
--- 400,405 ----
***************
*** 571,580 ****
  	pdev->fill_image = (pdev->fill_image + 1) % default_mbufs;
  }
  
! /* 2001-10-14: YUV420P is the only palette remaining. */
  static int pwc_set_palette(struct pwc_device *pdev, int pal)
  {
! 	if (   pal == VIDEO_PALETTE_YUV420P
  #if PWC_DEBUG
              || pal == VIDEO_PALETTE_RAW
  #endif
--- 601,612 ----
  	pdev->fill_image = (pdev->fill_image + 1) % default_mbufs;
  }
  
! /* 2001-10-14: The YUV420 is still there, but you can only set it from within 
!    a program (YUV420P being the default) */
  static int pwc_set_palette(struct pwc_device *pdev, int pal)
  {
! 	if (   pal == VIDEO_PALETTE_YUV420
!             || pal == VIDEO_PALETTE_YUV420P
  #if PWC_DEBUG
              || pal == VIDEO_PALETTE_RAW
  #endif
***************
*** 592,598 ****
  /* This gets called for the Isochronous pipe (video). This is done in
   * interrupt time, so it has to be fast, not crash, and not stall. Neat.
   */
! static void pwc_isoc_handler(struct urb *urb)
  {
  	struct pwc_device *pdev;
  	int i, fst, flen;
--- 624,630 ----
  /* This gets called for the Isochronous pipe (video). This is done in
   * interrupt time, so it has to be fast, not crash, and not stall. Neat.
   */
! static void pwc_isoc_handler(purb_t urb)
  {
  	struct pwc_device *pdev;
  	int i, fst, flen;
***************
*** 754,760 ****
  static int pwc_isoc_init(struct pwc_device *pdev)
  {
  	struct usb_device *udev;
! 	struct urb *urb;
  	int i, j, ret;
  
  	struct usb_interface_descriptor *idesc;
--- 786,792 ----
  static int pwc_isoc_init(struct pwc_device *pdev)
  {
  	struct usb_device *udev;
! 	purb_t urb;
  	int i, j, ret;
  
  	struct usb_interface_descriptor *idesc;
***************
*** 855,861 ****
  	/* Stop camera, but only if we are sure the camera is still there */
  	if (!pdev->unplugged)
  		usb_set_interface(pdev->udev, 0, 0);
- 	/* Unlinking ISOC buffers one by one */
  	for (i = MAX_ISO_BUFS - 1; i >= 0; i--) {
  		pdev->sbuf[i].urb->next = NULL;
  		usb_unlink_urb(pdev->sbuf[i].urb);
--- 887,892 ----
***************
*** 868,873 ****
--- 899,905 ----
  int pwc_try_video_mode(struct pwc_device *pdev, int width, int height, int new_fps, int new_compression, int new_snapshot)
  {
  	int ret;
+ 
  	/* Stop isoc stuff */
  	pwc_isoc_cleanup(pdev);
  	/* Reset parameters */
***************
*** 930,958 ****
  		if (usb_set_interface(pdev->udev, 0, 0))
  			Info("Failed to set alternate interface to 0.\n");
  		pdev->usb_init = 1;
- 		
- 		if (pwc_trace & TRACE_OPEN) {
- 			/* Query CMOS sensor type */
- 			const char *sensor_type = NULL;
- 
- 			i = pwc_get_cmos_sensor(pdev);
- 			switch(i) {
- 			case -1: /* Unknown, show nothing */; break;
- 			case 0x00:  sensor_type = "Hyundai CMOS sensor"; break;
- 			case 0x20:  sensor_type = "Sony CCD sensor + TDA8787"; break;
- 			case 0x2E:  sensor_type = "Sony CCD sensor + Exas 98L59"; break;
- 			case 0x2F:  sensor_type = "Sony CCD sensor + ADI 9804"; break;
- 			case 0x30:  sensor_type = "Sharp CCD sensor + TDA8787"; break;
- 			case 0x3E:  sensor_type = "Sharp CCD sensor + Exas 98L59"; break;
- 			case 0x3F:  sensor_type = "Sharp CCD sensor + ADI 9804"; break;
- 			case 0x40:  sensor_type = "UPA 1021 sensor"; break;
- 			case 0x100: sensor_type = "VGA sensor"; break;
- 			case 0x101: sensor_type = "PAL MR sensor"; break;
- 			default:   sensor_type = "unknown type of sensor"; break;
- 			}
- 			if (sensor_type != NULL)
- 				Info("Thes %s camera is equipped with a %s (%d).\n", pdev->vdev->name, sensor_type, i);
- 		}
  	}
  
  	/* Turn on camera */
--- 962,967 ----
***************
*** 1484,1495 ****
  			 */
  			add_wait_queue(&pdev->frameq, &wait);
  			while (pdev->full_frames == NULL) {
- 				if (pdev->unplugged) {
- 					remove_wait_queue(&pdev->frameq, &wait);
- 					set_current_state(TASK_RUNNING);
- 					return -ENODEV;
- 				}
- 			
  	                	if (signal_pending(current)) {
  	                		remove_wait_queue(&pdev->frameq, &wait);
  		                	set_current_state(TASK_RUNNING);
--- 1493,1498 ----
***************
*** 1575,1581 ****
  	pdev = vdev->priv;
  
  	/* FIXME - audit mmap during a read */		
- 	/* Nemo: 9 months and 20 kernel revisions later I still don't know what you mean by this :-) */
  	pos = (unsigned long)pdev->image_data;
  	while (size > 0) {
  		page = kvirt_to_pa(pos);
--- 1578,1583 ----
***************
*** 1607,1613 ****
  	int vendor_id, product_id, type_id;
  	int i, hint;
  	int video_nr = -1; /* default: use next available device */
! 	char serial_number[30], *name;
  
  	free_mem_leak();
  	
--- 1609,1615 ----
  	int vendor_id, product_id, type_id;
  	int i, hint;
  	int video_nr = -1; /* default: use next available device */
! 	char serial_number[30];
  
  	free_mem_leak();
  	
***************
*** 1628,1674 ****
  		switch (product_id) {
  		case 0x0302:
  			Info("Philips PCA645VC USB webcam detected.\n");
- 			name = "Philips 645 webcam";
  			type_id = 645;
  			break;
  		case 0x0303:
  			Info("Philips PCA646VC USB webcam detected.\n");
- 			name = "Philips 646 webcam";
  			type_id = 646;
  			break;
  		case 0x0304:
  			Info("Askey VC010 type 2 USB webcam detected.\n");
- 			name = "Askey VC010 webcam";
  			type_id = 646;
  			break;
  		case 0x0307:
  			Info("Philips PCVC675K (Vesta) USB webcam detected.\n");
- 			name = "Philips 675 webcam";
  			type_id = 675;
  			break;
  		case 0x0308:
  			Info("Philips PCVC680K (Vesta Pro) USB webcam detected.\n");
- 			name = "Philips 680 webcam";
  			type_id = 680;
  			break;
  		case 0x030C:
  			Info("Philips PCVC690K (Vesta Pro Scan) USB webcam detected.\n");
- 			name = "Philips 690 webcam";
  			type_id = 690;
  			break;
  		case 0x0310:
  			Info("Philips PCVC730K (ToUCam Fun) USB webcam detected.\n");
- 			name = "Philips 730 webcam";
  			type_id = 730;
  			break;
  		case 0x0311:
  			Info("Philips PCVC740K (ToUCam Pro) USB webcam detected.\n");
- 			name = "Philips 740 webcam";
  			type_id = 740;
  			break;
  		case 0x0312:
  			Info("Philips PCVC750K (ToUCam Pro Scan) USB webcam detected.\n");
- 			name = "Philips 750 webcam";
  			type_id = 750;
  			break;
  		default:
--- 1630,1667 ----
***************
*** 1680,1686 ****
  		switch(product_id) {
  		case 0x0001:
  			Info("Askey VC010 type 1 USB webcam detected.\n");
- 			name = "Askey VC010 webcam";
  			type_id = 645;
  			break;
  		default:
--- 1673,1678 ----
***************
*** 1691,1698 ****
  	else if (vendor_id == 0x046d) {
  		switch(product_id) {
  		case 0x08b0:
! 			Info("Logitech QuickCam 3000 Pro USB webcam detected.\n");
! 			name = "Logitech QuickCam 3000 Pro";
  			type_id = 730;
          		break;
          	default:
--- 1683,1689 ----
  	else if (vendor_id == 0x046d) {
  		switch(product_id) {
  		case 0x08b0:
! 			Info("Logitech QuickCam 3000 Pro detected.\n");
  			type_id = 730;
          		break;
          	default:
***************
*** 1708,1719 ****
  		switch(product_id) {
  		case 0x9000:
  			Info("Samsung MPC-C10 USB webcam detected.\n");
- 			name = "Samsung MPC-C10";
  			type_id = 675;
  			break;
  		case 0x9001:
  			Info("Samsung MPC-C30 USB webcam detected.\n");
- 			name = "Samsung MPC-C30";
  			type_id = 675;
  			break;
  		default:
--- 1699,1708 ----
***************
*** 1721,1769 ****
  			break;
  		}
  	}
! 	else if (vendor_id == 0x041e) {
! 		switch(product_id) {
! 		case 0x400c:
! 			Info("Creative Labs Webcam 5 detected.\n");
! 			name = "Creative Labs Webcam 5";
! 			type_id = 730;
! 			break;
! 		default:
! 			return NULL;
! 			break;
! 		}
! 	}
! 	else if (vendor_id == 0x04cc) { 
! 		switch(product_id) {
! 		case 0x8116:
! 			Info("Sotec Afina Eye USB webcam detected.\n");
! 			name = "Sotec Afina Eye";
! 			type_id = 730;
! 			break;  
! 		default:
! 			return NULL;
! 			break;
! 		}
! 	}
! 	else if (vendor_id == 0x0d81) {
! 		switch(product_id) {
! 		case 0x1900:
! 			Info("Visionite VCS-UC300 USB webcam detected.\n");
! 			name = "Visionite VCS-UC300";
! 			type_id = 740; /* CCD sensor */
! 			break;
! 		case 0x1910:
! 			Info("Visionite VCS-UM100 USB webcam detected.\n");
! 			name = "Visionite VCS-UM100";
! 			type_id = 730; /* CMOS sensor */
! 			break;
! 		default:
! 			return NULL;
! 			break;
! 		}
! 	}
! 	else 
! 		return NULL; /* Not any of the know types; but the list keeps growing. */
  
  	memset(serial_number, 0, 30);
  	usb_string(udev, udev->descriptor.iSerialNumber, serial_number, 29);
--- 1710,1716 ----
  			break;
  		}
  	}
! 	else return NULL; /* Not Philips, Askey, Logitech or Samsung, for sure. */
  
  	memset(serial_number, 0, 30);
  	usb_string(udev, udev->descriptor.iSerialNumber, serial_number, 29);
***************
*** 1797,1803 ****
  		return NULL;
  	}
  	memcpy(vdev, &pwc_template, sizeof(pwc_template));
! 	strcpy(vdev->name, name);
  	SET_MODULE_OWNER(vdev);
  	pdev->vdev = vdev;
  	vdev->priv = pdev;
--- 1744,1750 ----
  		return NULL;
  	}
  	memcpy(vdev, &pwc_template, sizeof(pwc_template));
! 	sprintf(vdev->name, "Philips %d webcam", pdev->type);
  	SET_MODULE_OWNER(vdev);
  	pdev->vdev = vdev;
  	vdev->priv = pdev;
***************
*** 1805,1810 ****
--- 1752,1758 ----
  	pdev->release = udev->descriptor.bcdDevice;
  	Trace(TRACE_PROBE, "Release: %04x\n", pdev->release);
  
+ 
  	/* Now search device_hint[] table for a match, so we can hint a node number. */
  	for (hint = 0; hint < MAX_DEV_HINTS; hint++) {
  		if (((device_hint[hint].type == -1) || (device_hint[hint].type == pdev->type)) &&
***************
*** 1832,1837 ****
--- 1780,1795 ----
  	if (hint < MAX_DEV_HINTS) 
  		device_hint[hint].pdev = pdev;
  
+ #if 0
+ 	/* Shut down camera now (some people like the LED off) */
+ 	if (power_save) {
+ 		Trace(TRACE_PROBE, "Powering down camera");
+ 		i = pwc_camera_power(pdev, 0);
+ 		if (i < 0)
+ 			Info("Failed to power-down the camera (%d)\n", i);
+ 	}
+ #endif
+ 
  	Trace(TRACE_PROBE, "probe() function returning struct at 0x%p.\n", pdev);
  	return pdev;
  }
***************
*** 1841,1847 ****
  {
  	struct pwc_device *pdev;
  	int hint;
- 	DECLARE_WAITQUEUE(wait, current);
  
  	lock_kernel();
  	free_mem_leak();
--- 1799,1804 ----
***************
*** 1876,1894 ****
  			 */
  			wake_up(&pdev->frameq);
  			
! 			/* Wait until we get a 'go' from _close(). This used
! 			   to have a gigantic race condition, since we kfree()
  			   stuff here, but we have to wait until close() 
! 			   is finished. 
! 			 */
  			   
  			Trace(TRACE_PROBE, "Sleeping on remove_ok.\n");
! 			add_wait_queue(&pdev->remove_ok, &wait);
! 			set_current_state(TASK_UNINTERRUPTIBLE);
! 			/* ... wait ... */
! 			schedule();
! 			remove_wait_queue(&pdev->remove_ok, &wait);
! 			set_current_state(TASK_RUNNING);
  			Trace(TRACE_PROBE, "Done sleeping.\n");
  			set_mem_leak(pdev->vdev);
  			pdev->vdev = NULL;
--- 1833,1845 ----
  			 */
  			wake_up(&pdev->frameq);
  			
! 			/* Wait until we get a 'go' from _close(). This
! 			   had a gigantic race condition, since we kfree()
  			   stuff here, but we have to wait until close() 
! 			   is finished. */
  			   
  			Trace(TRACE_PROBE, "Sleeping on remove_ok.\n");
! 			sleep_on(&pdev->remove_ok);
  			Trace(TRACE_PROBE, "Done sleeping.\n");
  			set_mem_leak(pdev->vdev);
  			pdev->vdev = NULL;
***************
*** 1969,1980 ****
  	char *sizenames[PSZ_MAX] = { "sqcif", "qsif", "qcif", "sif", "cif", "vga" };
  
  	Info("Philips PCA645/646 + PCVC675/680/690 + PCVC730/740/750 webcam module version " PWC_VERSION " loaded.\n");
! 	Info("Also supports the Askey VC010, Logitech Quickcam 3000 Pro, Samsung MPC-C10 and MPC-C30,\n");
! 	Info("the Creative WebCam 5, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.\n");
  
  	if (fps) {
! 		if (fps < 4 || fps > 30) {
! 			Err("Framerate out of bounds (4-30).\n");
  			return -EINVAL;
  		}
  		default_fps = fps;
--- 1920,1930 ----
  	char *sizenames[PSZ_MAX] = { "sqcif", "qsif", "qcif", "sif", "cif", "vga" };
  
  	Info("Philips PCA645/646 + PCVC675/680/690 + PCVC730/740/750 webcam module version " PWC_VERSION " loaded.\n");
! 	Info("Also supports the Askey VC010, Logitech Quickcam 3000 Pro and the Samsung MPC-C10 and MPC-C30.\n");
  
  	if (fps) {
! 		if (fps < 5 || fps > 30) {
! 			Err("Framerate out of bounds (5-30).\n");
  			return -EINVAL;
  		}
  		default_fps = fps;
***************
*** 2026,2034 ****
  	if (power_save)
  		Info("Enabling power save on open/close.\n");
  	if (leds[0] >= 0)
! 		led_on = leds[0];
  	if (leds[1] >= 0)
! 		led_off = leds[1];
  
  	/* Big device node whoopla. Basicly, it allows you to assign a 
  	   device node (/dev/videoX) to a camera, based on its type 
--- 1976,1984 ----
  	if (power_save)
  		Info("Enabling power save on open/close.\n");
  	if (leds[0] >= 0)
! 		led_on = leds[0] / 100;
  	if (leds[1] >= 0)
! 		led_off = leds[1] / 100;
  
  	/* Big device node whoopla. Basicly, it allows you to assign a 
  	   device node (/dev/videoX) to a camera, based on its type 
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-ioctl.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-ioctl.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-ioctl.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-ioctl.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,7 ****
  #ifndef PWC_IOCTL_H
  #define PWC_IOCTL_H
  
! /* (C) 2001-2002 Nemosoft Unv.    webcam@smcc.demon.nl
     
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- 1,7 ----
  #ifndef PWC_IOCTL_H
  #define PWC_IOCTL_H
  
! /* (C) 2001 Nemosoft Unv.    webcam@smcc.demon.nl
     
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
***************
*** 18,26 ****
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  
! /*         This is pwc-ioctl.h belonging to PWC 8.6                        */
! 
! /* 
     Changes
     2001/08/03  Alvarado   Added ioctl constants to access methods for 
                            changing white balance and red/blue gains
--- 18,24 ----
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  
! /*
     Changes
     2001/08/03  Alvarado   Added ioctl constants to access methods for 
                            changing white balance and red/blue gains
***************
*** 54,67 ****
  #define PWC_FPS_SNAPSHOT	0x00400000
  
  
- 
- struct pwc_probe
- {
- 	char name[32];
- 	int type;
- };
- 
- 
  /* pwc_whitebalance.mode values */
  #define PWC_WB_INDOOR		0
  #define PWC_WB_OUTDOOR		1
--- 52,57 ----
***************
*** 73,81 ****
     Set mode to one of the PWC_WB_* values above.
     *red and *blue are the respective gains of these colour components inside 
     the camera; range 0..65535
!    When 'mode' == PWC_WB_MANUAL, 'manual_red' and 'manual_blue' are set or read; 
     otherwise undefined.
!    'read_red' and 'read_blue' are read-only.
  */   
     
  struct pwc_whitebalance
--- 63,71 ----
     Set mode to one of the PWC_WB_* values above.
     *red and *blue are the respective gains of these colour components inside 
     the camera; range 0..65535
!    When mode == PWC_WB_MANUAL, manual_red and manual_blue are set or read; 
     otherwise undefined.
!    read_red and read_blue are read-only.
  */   
     
  struct pwc_whitebalance
***************
*** 85,107 ****
  	int read_red, read_blue;	/* R/O */
  };
  
- /* 
-    'control_speed' and 'control_delay' are used in automatic whitebalance mode,
-    and tell the camera how fast it should react to changes in lighting, and 
-    with how much delay. Valid values are 0..65535.
- */
- struct pwc_wb_speed
- {
- 	int control_speed;
- 	int control_delay;
- 
- };
  
  /* Used with VIDIOCPWC[SG]LED */
  struct pwc_leds
  {
! 	int led_on;			/* Led on-time; range = 0..25000 */
! 	int led_off;			/* Led off-time; range = 0..25000  */
  };
  
  
--- 75,86 ----
  	int read_red, read_blue;	/* R/O */
  };
  
  
  /* Used with VIDIOCPWC[SG]LED */
  struct pwc_leds
  {
! 	int led_on;			/* Led on-time; range = 0..255 */
! 	int led_off;			/*  */
  };
  
  
***************
*** 125,143 ****
   /* Get preferred compression quality */
  #define VIDIOCPWCGCQUAL		_IOR('v', 195, int)
  
- 
-  /* This is a probe function; since so many devices are supported, it
-     becomes difficult to include all the names in programs that want to
-     check for the enhanced Philips stuff. So in stead, try this PROBE;
-     it returns a structure with the original name, and the corresponding 
-     Philips type.
-     To use, fill the structure with zeroes, call PROBE and if that succeeds,
-     compare the name with that returned from VIDIOCGCAP; they should be the
-     same. If so, you can be assured it is a Philips (OEM) cam and the type
-     is valid.
-  */    
- #define VIDIOCPWCPROBE		_IOR('v', 199, struct pwc_probe)
- 
   /* Set AGC (Automatic Gain Control); int < 0 = auto, 0..65535 = fixed */
  #define VIDIOCPWCSAGC		_IOW('v', 200, int)
   /* Get AGC; int < 0 = auto; >= 0 = fixed, range 0..65535 */
--- 104,109 ----
***************
*** 149,176 ****
  #define VIDIOCPWCSAWB           _IOW('v', 202, struct pwc_whitebalance)
  #define VIDIOCPWCGAWB           _IOR('v', 202, struct pwc_whitebalance)
  
!  /* Auto WB speed */
! #define VIDIOCPWCSAWBSPEED	_IOW('v', 203, struct pwc_wb_speed)
! #define VIDIOCPWCGAWBSPEED	_IOR('v', 203, struct pwc_wb_speed)
! 
!  /* LEDs on/off/blink; int range 0..65535 */
  #define VIDIOCPWCSLED           _IOW('v', 205, struct pwc_leds)
  #define VIDIOCPWCGLED           _IOR('v', 205, struct pwc_leds)
  
-   /* Contour (sharpness); int < 0 = auto, 0..65536 = fixed */
- #define VIDIOCPWCSCONTOUR	_IOW('v', 206, int)
- #define VIDIOCPWCGCONTOUR	_IOR('v', 206, int)
- 
-   /* Backlight compensation; 0 = off, otherwise on */
- #define VIDIOCPWCSBACKLIGHT	_IOW('v', 207, int)
- #define VIDIOCPWCGBACKLIGHT	_IOR('v', 207, int)
- 
-   /* Flickerless mode; = 0 off, otherwise on */
- #define VIDIOCPWCSFLICKER	_IOW('v', 208, int)
- #define VIDIOCPWCGFLICKER	_IOR('v', 208, int)  
- 
-   /* Dynamic noise reduction; 0 off, 3 = high noise reduction */
- #define VIDIOCPWCSDYNNOISE	_IOW('v', 209, int)
- #define VIDIOCPWCGDYNNOISE	_IOR('v', 209, int)
- 
  #endif
--- 115,123 ----
  #define VIDIOCPWCSAWB           _IOW('v', 202, struct pwc_whitebalance)
  #define VIDIOCPWCGAWB           _IOR('v', 202, struct pwc_whitebalance)
  
!  /* Turn LED on/off ; int range 0..65535 */
  #define VIDIOCPWCSLED           _IOW('v', 205, struct pwc_leds)
+  /* Get state of LED; int range 0..65535 */
  #define VIDIOCPWCGLED           _IOR('v', 205, struct pwc_leds)
  
  #endif
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-misc.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-misc.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-misc.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-misc.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,6 ****
  /* Linux driver for Philips webcam 
     Various miscellaneous functions and tables.
!    (C) 1999-2002 Nemosoft Unv. (webcam@smcc.demon.nl)
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- 1,6 ----
  /* Linux driver for Philips webcam 
     Various miscellaneous functions and tables.
!    (C) 1999-2001 Nemosoft Unv. (webcam@smcc.demon.nl)
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-uncompress.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-uncompress.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-uncompress.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-uncompress.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,6 ****
  /* Linux driver for Philips webcam 
     Decompression frontend.
!    (C) 1999-2002 Nemosoft Unv. (webcam@smcc.demon.nl)
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- 1,6 ----
  /* Linux driver for Philips webcam 
     Decompression frontend.
!    (C) 1999-2001 Nemosoft Unv. (webcam@smcc.demon.nl)
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-uncompress.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-uncompress.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc-uncompress.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc-uncompress.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,4 ****
! /* (C) 1999-2002 Nemosoft Unv. (webcam@smcc.demon.nl)
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- 1,4 ----
! /* (C) 1999-2001 Nemosoft Unv. (webcam@smcc.demon.nl)
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
***************
*** 20,27 ****
     significant change should be reflected by increasing the 
     pwc_decompressor_version major number.
   */
! #ifndef PWC_UNCOMPRESS_H
! #define PWC_UNCOMPRESS_H
  
  #include 
  #include 
--- 20,27 ----
     significant change should be reflected by increasing the 
     pwc_decompressor_version major number.
   */
! #ifndef PWC_DEC_H
! #define PWC_DEC_H
  
  #include 
  #include 
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/pwc.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/pwc.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,4 ****
! /* (C) 1999-2002 Nemosoft Unv. (webcam@smcc.demon.nl)
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- 1,4 ----
! /* (C) 1999-2001 Nemosoft Unv. (webcam@smcc.demon.nl)
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
***************
*** 60,67 ****
  
  /* Version block */
  #define PWC_MAJOR	8
! #define PWC_MINOR	6
! #define PWC_VERSION 	"8.6"
  #define PWC_NAME 	"pwc"
  
  /* Turn certain features on/off */
--- 60,67 ----
  
  /* Version block */
  #define PWC_MAJOR	8
! #define PWC_MINOR	4
! #define PWC_VERSION 	"8.4"
  #define PWC_NAME 	"pwc"
  
  /* Turn certain features on/off */
***************
*** 96,102 ****
  	void *data;
  	int  length;
  	int  read;
! 	struct urb *urb;
  };
  
  /* intermediate buffers with raw data from the USB cam */
--- 96,102 ----
  	void *data;
  	int  length;
  	int  read;
! 	purb_t urb;
  };
  
  /* intermediate buffers with raw data from the USB cam */
***************
*** 247,253 ****
  extern int pwc_set_saturation(struct pwc_device *pdev, int value);
  extern int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value);
  extern int pwc_get_leds(struct pwc_device *pdev, int *on_value, int *off_value);
- extern int pwc_get_cmos_sensor(struct pwc_device *pdev);
  
  /* Power down or up the camera; not supported by all models */
  extern int pwc_camera_power(struct pwc_device *pdev, int power);
--- 247,252 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/rio500.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/rio500.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/rio500.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/rio500.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 141,147 ****
  			retval = -EFAULT;
  			goto err_out;
  		}
! 		if (rio_cmd.length < 0 || rio_cmd.length > PAGE_SIZE) {
  			retval = -EINVAL;
  			goto err_out;
  		}
--- 141,147 ----
  			retval = -EFAULT;
  			goto err_out;
  		}
! 		if (rio_cmd.length > PAGE_SIZE) {
  			retval = -EINVAL;
  			goto err_out;
  		}
***************
*** 211,217 ****
  			retval = -EFAULT;
  			goto err_out;
  		}
! 		if (rio_cmd.length < 0 || rio_cmd.length > PAGE_SIZE) {
  			retval = -EINVAL;
  			goto err_out;
  		}
--- 211,217 ----
  			retval = -EFAULT;
  			goto err_out;
  		}
! 		if (rio_cmd.length > PAGE_SIZE) {
  			retval = -EINVAL;
  			goto err_out;
  		}
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: rtl8150.c
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/scanner.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/scanner.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/scanner.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/scanner.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,13 ****
  /* -*- linux-c -*- */
  
  /* 
!  * Driver for USB Scanners (linux-2.4.18)
   *
!  * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
   *
   * Portions may be copyright Brad Keryan and Michael Gee.
   *
!  * Brian Beattie 
   * 
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License as
--- 1,13 ----
  /* -*- linux-c -*- */
  
  /* 
!  * Driver for USB Scanners (linux-2.4.12)
   *
!  * Copyright (C) 1999, 2000, 2001 David E. Nelson
   *
   * Portions may be copyright Brad Keryan and Michael Gee.
   *
!  * David E. Nelson (dnelson@jump.net)
   * 
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License as
***************
*** 300,323 ****
   *      Frank Zago  and
   *      Oliver Neukum <520047054719-0001@t-online.de> for reviewing/testing.
   *
-  * 0.4.8  5/30/2002
-  *    - Added Mustek BearPaw 2400 TA.  Thanks to Sergey
-  *      Vlasov .
-  *    - Added Mustek 1200UB Plus and Mustek BearPaw 1200 CU ID's.  These use
-  *      the Grandtech GT-6801 chip. Thanks to Henning
-  *      Meier-Geinitz .
-  *    - Increased Epson timeout to 60 secs as requested from 
-  *      Karl Heinz Kremer .
-  *    - Changed maintainership from David E. Nelson to Brian
-  *      Beattie .
-  *
   * TODO
-  *    - Remove the 2/3 endpoint limitation
   *    - Performance
   *    - Select/poll methods
   *    - More testing
   *    - Proper registry/assignment for LM9830 ioctl's
-  *    - More general usage ioctl's
   *
   *
   *  Thanks to:
--- 300,310 ----
***************
*** 333,340 ****
   *    - All the folks who chimed in with reports and suggestions.
   *    - All the developers that are working on USB SANE backends or other
   *      applications to use USB scanners.
-  *    - Thanks to Greg KH  for setting up Brian Beattie
-  *      to be the new USB Scanner maintainer.
   *
   *  Performance:
   *
--- 320,325 ----
***************
*** 762,768 ****
   	case SCANNER_IOCTL_CTRLMSG:
   	{
   		struct ctrlmsg_ioctl {
!  			struct usb_ctrlrequest	req;
   			void		*data;
   		} cmsg;
   		int pipe, nb, ret;
--- 747,753 ----
   	case SCANNER_IOCTL_CTRLMSG:
   	{
   		struct ctrlmsg_ioctl {
!  			devrequest	req;
   			void		*data;
   		} cmsg;
   		int pipe, nb, ret;
***************
*** 771,782 ****
   		if (copy_from_user(&cmsg, (void *)arg, sizeof(cmsg)))
   			return -EFAULT;
  
!  		nb = cmsg.req.wLength;
  
   		if (nb > sizeof(buf))
   			return -EINVAL;
  
!  		if ((cmsg.req.bRequestType & 0x80) == 0) {
   			pipe = usb_sndctrlpipe(dev, 0);
   			if (nb > 0 && copy_from_user(buf, cmsg.data, nb))
   				return -EFAULT;
--- 756,767 ----
   		if (copy_from_user(&cmsg, (void *)arg, sizeof(cmsg)))
   			return -EFAULT;
  
!  		nb = le16_to_cpup(&cmsg.req.length);
  
   		if (nb > sizeof(buf))
   			return -EINVAL;
  
!  		if ((cmsg.req.requesttype & 0x80) == 0) {
   			pipe = usb_sndctrlpipe(dev, 0);
   			if (nb > 0 && copy_from_user(buf, cmsg.data, nb))
   				return -EFAULT;
***************
*** 784,793 ****
   			pipe = usb_rcvctrlpipe(dev, 0);
  		}
  
!  		ret = usb_control_msg(dev, pipe, cmsg.req.bRequest,
!  				      cmsg.req.bRequestType,
!  				      cmsg.req.wValue,
!  				      cmsg.req.wIndex,
   				      buf, nb, HZ);
  
   		if (ret < 0) {
--- 769,778 ----
   			pipe = usb_rcvctrlpipe(dev, 0);
  		}
  
!  		ret = usb_control_msg(dev, pipe, cmsg.req.request,
!  				      cmsg.req.requesttype,
!  				      le16_to_cpup(&cmsg.req.value),
!  				      le16_to_cpup(&cmsg.req.index),
   				      buf, nb, HZ);
  
   		if (ret < 0) {
***************
*** 795,801 ****
   			return -EIO;
   		}
  
!  		if (nb > 0 && (cmsg.req.bRequestType & 0x80) && copy_to_user(cmsg.data, buf, nb))
   			return -EFAULT;
  
   		return 0;
--- 780,786 ----
   			return -EIO;
   		}
  
!  		if (nb > 0 && (cmsg.req.requesttype & 0x80) && copy_to_user(cmsg.data, buf, nb))
   			return -EFAULT;
  
   		return 0;
***************
*** 1032,1038 ****
  
  	switch (dev->descriptor.idVendor) { /* Scanner specific read timeout parameters */
  	case 0x04b8:		/* Seiko/Epson */
! 		scn->rd_nak_timeout = HZ * 60;
  		break;
  	case 0x055f:		/* Mustek */
  	case 0x0400:		/* Another Mustek */
--- 1017,1023 ----
  
  	switch (dev->descriptor.idVendor) { /* Scanner specific read timeout parameters */
  	case 0x04b8:		/* Seiko/Epson */
! 		scn->rd_nak_timeout = HZ * 40;
  		break;
  	case 0x055f:		/* Mustek */
  	case 0x0400:		/* Another Mustek */
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/scanner.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/scanner.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/scanner.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/scanner.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,9 ****
  /*
!  * Driver for USB Scanners (linux-2.4.18)
   *
!  * Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
   *
!  * Brian Beattie 
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License as
--- 1,9 ----
  /*
!  * Driver for USB Scanners (linux-2.4.12)
   *
!  * Copyright (C) 1999, 2000, 2001 David E. Nelson
   *
!  * David E. Nelson (dnelson@jump.net)
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License as
***************
*** 48,54 ****
  
  static __s32 vendor=-1, product=-1, read_timeout=0;
  
! MODULE_AUTHOR("Brian Beattie, beattie@beattie-home.net");
  MODULE_DESCRIPTION(DRIVER_DESC" "DRIVER_VERSION);
  MODULE_LICENSE("GPL");
  
--- 48,54 ----
  
  static __s32 vendor=-1, product=-1, read_timeout=0;
  
! MODULE_AUTHOR("David E. Nelson, dnelson@jump.net, http://www.jump.net/~dnelson");
  MODULE_DESCRIPTION(DRIVER_DESC" "DRIVER_VERSION);
  MODULE_LICENSE("GPL");
  
***************
*** 90,101 ****
  	{ USB_DEVICE(0x06bd, 0x2097) }, /* SnapScan e26 */
  	{ USB_DEVICE(0x06bd, 0x208d) }, /* Snapscan e40 */
  	/* Canon */
! 	{ USB_DEVICE(0x04a9, 0x2202) }, /* CanoScan FB620U */
! 	{ USB_DEVICE(0x04a9, 0x2204) }, /* CanoScan FB630U/FB636U */
! 	{ USB_DEVICE(0x04a9, 0x2206) }, /* CanoScan N650U/N656U */
! 	{ USB_DEVICE(0x04a9, 0x2207) }, /* CanoScan N1220U */
! 	{ USB_DEVICE(0x04a9, 0x2208) }, /* CanoScan D660U */ 
  	{ USB_DEVICE(0x04a9, 0x220b) }, /* D646U */
  	/* Colorado -- See Primax/Colorado below */
  	/* Epson -- See Seiko/Epson below */
  	/* Genius */
--- 90,98 ----
  	{ USB_DEVICE(0x06bd, 0x2097) }, /* SnapScan e26 */
  	{ USB_DEVICE(0x06bd, 0x208d) }, /* Snapscan e40 */
  	/* Canon */
! 	{ USB_DEVICE(0x04a9, 0x2202) }, /* FB620U */
  	{ USB_DEVICE(0x04a9, 0x220b) }, /* D646U */
+ 	{ USB_DEVICE(0x04a9, 0x2207) }, /* 1220U */
  	/* Colorado -- See Primax/Colorado below */
  	/* Epson -- See Seiko/Epson below */
  	/* Genius */
***************
*** 113,119 ****
  	{ USB_DEVICE(0x03f0, 0x0105) },	/* 4200C */
  	{ USB_DEVICE(0x03f0, 0x0305) }, /* 4300C */
  	{ USB_DEVICE(0x03f0, 0x0102) },	/* PhotoSmart S20 */
- 	{ USB_DEVICE(0x03f0, 0x0705) }, /* 4400C */
  	{ USB_DEVICE(0x03f0, 0x0401) },	/* 5200C */
  	//	{ USB_DEVICE(0x03f0, 0x0701) },	/* 5300C - NOT SUPPORTED - see http://www.neatech.nl/oss/HP5300C/ */
  	{ USB_DEVICE(0x03f0, 0x0201) },	/* 6200C */
--- 110,115 ----
***************
*** 145,152 ****
  	{ USB_DEVICE(0x0400, 0x1001) }, /* BearPaw 2400 */
  	{ USB_DEVICE(0x055f, 0x0008) }, /* 1200 CU Plus */
  	{ USB_DEVICE(0x0ff5, 0x0010) }, /* BearPaw 1200F */
- 	{ USB_DEVICE(0x055f, 0x0218) }, /* BearPaw 2400 TA */
- 	{ USB_DEVICE(0x05d8, 0x4002) }, /* 1200 CU and 1200 UB Plus */
  	/* Plustek */
  	{ USB_DEVICE(0x07b3, 0x0017) }, /* OpticPro UT12 */
  	{ USB_DEVICE(0x07b3, 0x0011) }, /* OpticPro UT24 */
--- 141,146 ----
***************
*** 185,196 ****
  	{ USB_DEVICE(0x04b8, 0x010b) }, /* Perfection 1240U */
  	{ USB_DEVICE(0x04b8, 0x010c) }, /* Perfection 640U */
  	{ USB_DEVICE(0x04b8, 0x010e) }, /* Expression 1680 */
- 	{ USB_DEVICE(0x04b8, 0x010f) }, /* Perfection 1250U */
  	{ USB_DEVICE(0x04b8, 0x0110) }, /* Perfection 1650 */
  	{ USB_DEVICE(0x04b8, 0x0112) }, /* Perfection 2450 - GT-9700 for the Japanese mkt */
- 	{ USB_DEVICE(0x04b8, 0x0114) }, /* Perfection 660 */
- 	{ USB_DEVICE(0x04b8, 0x011b) }, /* Perfection 2400 Photo */
- 	{ USB_DEVICE(0x04b8, 0x011e) }, /* Perfection 1660 Photo */
  	/* Umax */
  	{ USB_DEVICE(0x1606, 0x0010) },	/* Astra 1220U */
  	{ USB_DEVICE(0x1606, 0x0030) },	/* Astra 2000U */
--- 179,186 ----
***************
*** 240,246 ****
  #define SCANNER_IOCTL_VENDOR _IOR('U', 0x20, int)
  #define SCANNER_IOCTL_PRODUCT _IOR('U', 0x21, int)
  /* send/recv a control message to the scanner */
! #define SCANNER_IOCTL_CTRLMSG _IOWR('U', 0x22, struct usb_ctrlrequest )
  
  
  #define SCN_MAX_MNR 16		/* We're allocated 16 minors */
--- 230,236 ----
  #define SCANNER_IOCTL_VENDOR _IOR('U', 0x20, int)
  #define SCANNER_IOCTL_PRODUCT _IOR('U', 0x21, int)
  /* send/recv a control message to the scanner */
! #define SCANNER_IOCTL_CTRLMSG _IOWR('U', 0x22, devrequest )
  
  
  #define SCN_MAX_MNR 16		/* We're allocated 16 minors */
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/se401.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/se401.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/se401.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/se401.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 41,52 ****
  #include 
  #include 
  
  #include "se401.h"
  
  static int flickerless=0;
  static int video_nr = -1;
  
! static struct usb_device_id device_table [] = {
  	{ USB_DEVICE(0x03e8, 0x0004) },/* Endpoints/Aox SE401 */
  	{ USB_DEVICE(0x0471, 0x030b) },/* Philips PCVC665K */
  	{ USB_DEVICE(0x047d, 0x5001) },/* Kensington 67014 */
--- 41,58 ----
  #include 
  #include 
  
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
+ #define virt_to_page(arg)	MAP_NR(arg)
+ #define vmalloc_32		vmalloc
+ #endif
+ 
  #include "se401.h"
  
  static int flickerless=0;
  static int video_nr = -1;
  
! #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 3, 0)
! static __devinitdata struct usb_device_id device_table [] = {
  	{ USB_DEVICE(0x03e8, 0x0004) },/* Endpoints/Aox SE401 */
  	{ USB_DEVICE(0x0471, 0x030b) },/* Philips PCVC665K */
  	{ USB_DEVICE(0x047d, 0x5001) },/* Kensington 67014 */
***************
*** 56,61 ****
--- 62,68 ----
  };
  
  MODULE_DEVICE_TABLE(usb, device_table);
+ #endif
  
  MODULE_AUTHOR("Jeroen Vreeken ");
  MODULE_DESCRIPTION("SE401 USB Camera Driver");
***************
*** 73,89 ****
   *
   * Memory management
   *
   **********************************************************************/
  
  /* Here we want the physical address of the memory.
!  * This is used when initializing the contents of the area.
   */
  static inline unsigned long kvirt_to_pa(unsigned long adr)
  {
! 	unsigned long kva, ret;
  
! 	kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
! 	kva |= adr & (PAGE_SIZE-1); /* restore the offset */
  	ret = __pa(kva);
  	return ret;
  }
--- 80,133 ----
   *
   * Memory management
   *
+  * This is a shameless copy from the USB-cpia driver (linux kernel
+  * version 2.3.29 or so, I have no idea what this code actually does ;).
+  * Actually it seems to be a copy of a shameless copy of the bttv-driver.
+  * Or that is a copy of a shameless copy of ... (To the powers: is there
+  * no generic kernel-function to do this sort of stuff?)
+  *
+  * Yes, it was a shameless copy from the bttv-driver. IIRC, Alan says
+  * there will be one, but apparentely not yet -jerdfelt
+  *
+  * So I copied it again for the ov511 driver -claudio
+  *
+  * Same for the se401 driver -Jeroen
   **********************************************************************/
  
+ /* Given PGD from the address space's page table, return the kernel
+  * virtual mapping of the physical memory mapped at ADR.
+  */
+ static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
+ {
+ 	unsigned long ret = 0UL;
+ 	pmd_t *pmd;
+ 	pte_t *ptep, pte;
+ 
+ 	if (!pgd_none(*pgd)) {
+ 		pmd = pmd_offset(pgd, adr);
+ 		if (!pmd_none(*pmd)) {
+ 			ptep = pte_offset(pmd, adr);
+ 			pte = *ptep;
+ 			if (pte_present(pte)) {
+ 				ret = (unsigned long) page_address(pte_page(pte));
+ 				ret |= (adr & (PAGE_SIZE - 1));
+ 			}
+ 		}
+ 	}
+ 
+ 	return ret;
+ }
+ 
  /* Here we want the physical address of the memory.
!  * This is used when initializing the contents of the
!  * area and marking the pages as reserved.
   */
  static inline unsigned long kvirt_to_pa(unsigned long adr)
  {
! 	unsigned long va, kva, ret;
  
! 	va = VMALLOC_VMADDR(adr);
! 	kva = uvirt_to_kva(pgd_offset_k(va), va);
  	ret = __pa(kva);
  	return ret;
  }
***************
*** 91,99 ****
  static void *rvmalloc(unsigned long size)
  {
  	void *mem;
! 	unsigned long adr;
  
- 	size = PAGE_ALIGN(size);
  	mem = vmalloc_32(size);
  	if (!mem)
  		return NULL;
--- 135,146 ----
  static void *rvmalloc(unsigned long size)
  {
  	void *mem;
! 	unsigned long adr, page;
! 
! 	/* Round it off to PAGE_SIZE */
! 	size += (PAGE_SIZE - 1);
! 	size &= ~(PAGE_SIZE - 1);
  
  	mem = vmalloc_32(size);
  	if (!mem)
  		return NULL;
***************
*** 101,109 ****
  	memset(mem, 0, size); /* Clear the ram out, no junk to the user */
  	adr = (unsigned long) mem;
  	while (size > 0) {
! 		mem_map_reserve(vmalloc_to_page((void *)adr));
  		adr += PAGE_SIZE;
! 		size -= PAGE_SIZE;
  	}
  
  	return mem;
--- 148,160 ----
  	memset(mem, 0, size); /* Clear the ram out, no junk to the user */
  	adr = (unsigned long) mem;
  	while (size > 0) {
! 		page = kvirt_to_pa(adr);
! 		mem_map_reserve(virt_to_page(__va(page)));
  		adr += PAGE_SIZE;
! 		if (size > PAGE_SIZE)
! 			size -= PAGE_SIZE;
! 		else
! 			size = 0;
  	}
  
  	return mem;
***************
*** 111,126 ****
  
  static void rvfree(void *mem, unsigned long size)
  {
! 	unsigned long adr;
  
  	if (!mem)
  		return;
  
! 	adr = (unsigned long) mem;
! 	while ((long) size > 0) {
! 		mem_map_unreserve(vmalloc_to_page((void *)adr));
  		adr += PAGE_SIZE;
! 		size -= PAGE_SIZE;
  	}
  	vfree(mem);
  }
--- 162,184 ----
  
  static void rvfree(void *mem, unsigned long size)
  {
! 	unsigned long adr, page;
  
  	if (!mem)
  		return;
  
! 	size += (PAGE_SIZE - 1);
! 	size &= ~(PAGE_SIZE - 1);
! 
! 	adr=(unsigned long) mem;
! 	while (size > 0) {
! 		page = kvirt_to_pa(adr);
! 		mem_map_unreserve(virt_to_page(__va(page)));
  		adr += PAGE_SIZE;
! 		if (size > PAGE_SIZE)
! 			size -= PAGE_SIZE;
! 		else
! 			size = 0;
  	}
  	vfree(mem);
  }
***************
*** 552,558 ****
  */
  static int se401_start_stream(struct usb_se401 *se401)
  {
! 	struct urb *urb;
  	int err=0, i;
  	se401->streaming=1;
  
--- 610,616 ----
  */
  static int se401_start_stream(struct usb_se401 *se401)
  {
! 	urb_t *urb;
  	int err=0, i;
  	se401->streaming=1;
  
***************
*** 588,594 ****
  	for (i=0; idev,
  			usb_rcvbulkpipe(se401->dev, SE401_VIDEO_ENDPOINT),
--- 646,652 ----
  	for (i=0; idev,
  			usb_rcvbulkpipe(se401->dev, SE401_VIDEO_ENDPOINT),
***************
*** 646,652 ****
  		return 0;
  
  	/* Check for a valid mode */
! 	if (width <= 0 || height <= 0)
  		return 1;
  	if ((width & 1) || (height & 1))
  		return 1;
--- 704,710 ----
  		return 0;
  
  	/* Check for a valid mode */
! 	if (!width || !height)
  		return 1;
  	if ((width & 1) || (height & 1))
  		return 1;
***************
*** 680,687 ****
  static inline void enhance_picture(unsigned char *frame, int len)
  {
  	while (len--) {
! 		*frame=(((*frame^255)*(*frame^255))/255)^255;
! 		frame++;
  	}
  }
  
--- 738,744 ----
  static inline void enhance_picture(unsigned char *frame, int len)
  {
  	while (len--) {
! 		*frame++=(((*frame^255)*(*frame^255))/255)^255;
  	}
  }
  
***************
*** 915,922 ****
  		/* Fix the top line */
  		framedata+=linelength;
  		for (i=0; icheight; i++) {
--- 972,978 ----
  		/* Fix the top line */
  		framedata+=linelength;
  		for (i=0; icheight; i++) {
***************
*** 1369,1381 ****
  
  	se401->sizes=cp[4]+cp[5]*256;
  	se401->width=kmalloc(se401->sizes*sizeof(int), GFP_KERNEL);
- 	if (!se401->width)
- 		return 1;
  	se401->height=kmalloc(se401->sizes*sizeof(int), GFP_KERNEL);
- 	if (!se401->height) {
- 		kfree(se401->width);
- 		return 1;
- 	}
  	for (i=0; isizes; i++) {
  		    se401->width[i]=cp[6+i*4+0]+cp[6+i*4+1]*256;
  		    se401->height[i]=cp[6+i*4+2]+cp[6+i*4+3]*256;
--- 1425,1431 ----
***************
*** 1441,1448 ****
          return 0;
  }
  
! static void* se401_probe(struct usb_device *dev, unsigned int ifnum,
  	const struct usb_device_id *id)
  {
          struct usb_interface_descriptor *interface;
          struct usb_se401 *se401;
--- 1491,1502 ----
          return 0;
  }
  
! #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
! static void* se401_probe(struct usb_device *dev, unsigned int ifnum)
! #else
! static void* __devinit se401_probe(struct usb_device *dev, unsigned int ifnum,
  	const struct usb_device_id *id)
+ #endif
  {
          struct usb_interface_descriptor *interface;
          struct usb_se401 *se401;
***************
*** 1571,1577 ****
--- 1625,1633 ----
  
  static struct usb_driver se401_driver = {
          name:		"se401",
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 3, 0)
          id_table:	device_table,
+ #endif
  	probe:		se401_probe,
          disconnect:	se401_disconnect
  };
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/se401.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/se401.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/se401.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/se401.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 10,16 ****
  
  #ifdef se401_DEBUG
  #  define PDEBUG(level, fmt, args...) \
! if (debug >= level) info("[%s:%d] " fmt, __PRETTY_FUNCTION__, __LINE__ , ## args)
  #else
  #  define PDEBUG(level, fmt, args...) do {} while(0)
  #endif
--- 10,16 ----
  
  #ifdef se401_DEBUG
  #  define PDEBUG(level, fmt, args...) \
! if (debug >= level) info("[" __PRETTY_FUNCTION__ ":%d] " fmt, __LINE__ , ## args)
  #else
  #  define PDEBUG(level, fmt, args...) do {} while(0)
  #endif
***************
*** 197,204 ****
  
  	char *fbuf;		/* Videodev buffer area */
  
! 	struct urb *urb[SE401_NUMSBUF];
! 	struct urb *inturb;
  	
  	int button;
  	int buttonpressed;
--- 197,204 ----
  
  	char *fbuf;		/* Videodev buffer area */
  
! 	urb_t *urb[SE401_NUMSBUF];
! 	urb_t *inturb;
  	
  	int button;
  	int buttonpressed;
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/Config.in LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/Config.in
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/Config.in	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/Config.in	2004-05-24 17:35:29.000000000 +0900
***************
*** 5,43 ****
  comment 'USB Serial Converter support'
  
  dep_tristate 'USB Serial Converter support' CONFIG_USB_SERIAL $CONFIG_USB
! if [ "$CONFIG_USB_SERIAL" != "n" ]; then
!    dep_bool '  USB Serial Converter verbose debug' CONFIG_USB_SERIAL_DEBUG $CONFIG_USB_SERIAL
!    dep_mbool '  USB Generic Serial Driver' CONFIG_USB_SERIAL_GENERIC $CONFIG_USB_SERIAL
!    dep_tristate '  USB Belkin and Peracom Single Port Serial Driver' CONFIG_USB_SERIAL_BELKIN $CONFIG_USB_SERIAL
!    dep_tristate '  USB ConnectTech WhiteHEAT Serial Driver' CONFIG_USB_SERIAL_WHITEHEAT $CONFIG_USB_SERIAL
!    dep_tristate '  USB Digi International AccelePort USB Serial Driver' CONFIG_USB_SERIAL_DIGI_ACCELEPORT $CONFIG_USB_SERIAL
!    dep_tristate '  USB Empeg empeg-car Mark I/II Driver' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL
!    dep_tristate '  USB FTDI Single Port Serial Driver' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL
!    dep_tristate '  USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL
!    dep_tristate '  USB Compaq iPAQ / HP Jornada / Casio EM500 Driver' CONFIG_USB_SERIAL_IPAQ $CONFIG_USB_SERIAL
!    dep_tristate '  USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB Inside Out Edgeport Serial Driver' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL
!    dep_tristate '  USB Inside Out Edgeport Serial Driver (TI devices)' CONFIG_USB_SERIAL_EDGEPORT_TI $CONFIG_USB_SERIAL
!    dep_tristate '  USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB Keyspan USA-xxx Serial Driver' CONFIG_USB_SERIAL_KEYSPAN $CONFIG_USB_SERIAL
!    if [ "$CONFIG_USB_SERIAL_KEYSPAN" != "n" ]; then
!       bool '    USB Keyspan USA-28 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28
!       bool '    USB Keyspan USA-28X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28X
!       bool '    USB Keyspan USA-28XA Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XA
!       bool '    USB Keyspan USA-28XB Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XB
!       bool '    USB Keyspan USA-19 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19
!       bool '    USB Keyspan USA-18X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA18X
!       bool '    USB Keyspan USA-19W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19W
!       bool '    USB Keyspan USA-19QW Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19QW
!       bool '    USB Keyspan USA-19QI Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19QI
!       bool '    USB Keyspan USA-49W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA49W
!    fi
!    dep_tristate '  USB MCT Single Port Serial Driver' CONFIG_USB_SERIAL_MCT_U232 $CONFIG_USB_SERIAL
!    dep_tristate '  USB KL5KUSB105 (Palmconnect) Driver' CONFIG_USB_SERIAL_KLSI $CONFIG_USB_SERIAL
!    dep_tristate '  USB Prolific 2303 Single Port Serial Driver' CONFIG_USB_SERIAL_PL2303 $CONFIG_USB_SERIAL
!    dep_tristate '  USB REINER SCT cyberJack pinpad/e-com chipcard reader (EXPERIMENTAL)' CONFIG_USB_SERIAL_CYBERJACK $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB Xircom / Entregra Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_XIRCOM $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
!    dep_tristate '  USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_OMNINET $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
  fi
  
  endmenu
--- 5,36 ----
  comment 'USB Serial Converter support'
  
  dep_tristate 'USB Serial Converter support' CONFIG_USB_SERIAL $CONFIG_USB
! if [ "$CONFIG_USB_SERIAL" = "y" ]; then
!   dep_mbool '  USB Serial Converter verbose debug' CONFIG_USB_SERIAL_DEBUG $CONFIG_USB_SERIAL
  fi
+ dep_mbool '  USB Generic Serial Driver' CONFIG_USB_SERIAL_GENERIC $CONFIG_USB_SERIAL
+ dep_tristate '  USB Belkin and Peracom Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_BELKIN $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+ dep_tristate '  USB ConnectTech WhiteHEAT Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_WHITEHEAT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+ dep_tristate '  USB Digi International AccelePort USB Serial Driver' CONFIG_USB_SERIAL_DIGI_ACCELEPORT $CONFIG_USB_SERIAL
+ dep_tristate '  USB Empeg empeg-car Mark I/II Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+ dep_tristate '  USB FTDI Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+ dep_tristate '  USB Handspring Visor / Palm m50x / Sony Clie Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL
+ dep_tristate '  USB IR Dongle Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_IR $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+ dep_tristate '  USB Inside Out Edgeport Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+ dep_tristate '  USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+ dep_tristate '  USB Keyspan USA-xxx Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+    dep_mbool '    USB Keyspan USA-28 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28 $CONFIG_USB_SERIAL_KEYSPAN
+    dep_mbool '    USB Keyspan USA-28X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28X $CONFIG_USB_SERIAL_KEYSPAN
+    dep_mbool '    USB Keyspan USA-28XA Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XA $CONFIG_USB_SERIAL_KEYSPAN
+    dep_mbool '    USB Keyspan USA-28XB Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28XB $CONFIG_USB_SERIAL_KEYSPAN
+    dep_mbool '    USB Keyspan USA-19 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19 $CONFIG_USB_SERIAL_KEYSPAN
+    dep_mbool '    USB Keyspan USA-18X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA18X $CONFIG_USB_SERIAL_KEYSPAN
+    dep_mbool '    USB Keyspan USA-19W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19W $CONFIG_USB_SERIAL_KEYSPAN
+    dep_mbool '    USB Keyspan USA-49W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA49W $CONFIG_USB_SERIAL_KEYSPAN
+ dep_tristate '  USB MCT Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_MCT_U232 $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+ dep_tristate '  USB Prolific 2303 Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_PL2303 $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+ dep_tristate '  USB REINER SCT cyberJack pinpad/e-com chipcard reader (EXPERIMENTAL)' CONFIG_USB_SERIAL_CYBERJACK $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+ dep_tristate '  USB Xircom / Entregra Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_XIRCOM $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
+ dep_tristate '  USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_OMNINET $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL
  
  endmenu
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/Makefile LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/Makefile
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/Makefile	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/Makefile	2004-05-24 17:35:29.000000000 +0900
***************
*** 8,14 ****
  
  obj-$(CONFIG_USB_SERIAL)                        += usbserial.o
  obj-$(CONFIG_USB_SERIAL_VISOR)			+= visor.o
- obj-$(CONFIG_USB_SERIAL_IPAQ)			+= ipaq.o
  obj-$(CONFIG_USB_SERIAL_WHITEHEAT)		+= whiteheat.o
  obj-$(CONFIG_USB_SERIAL_FTDI_SIO)		+= ftdi_sio.o
  obj-$(CONFIG_USB_SERIAL_KEYSPAN_PDA)		+= keyspan_pda.o
--- 8,13 ----
***************
*** 20,31 ****
  obj-$(CONFIG_USB_SERIAL_EMPEG)			+= empeg.o
  obj-$(CONFIG_USB_SERIAL_MCT_U232)		+= mct_u232.o
  obj-$(CONFIG_USB_SERIAL_EDGEPORT)		+= io_edgeport.o
- obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI)		+= io_ti.o
  obj-$(CONFIG_USB_SERIAL_PL2303)			+= pl2303.o
  obj-$(CONFIG_USB_SERIAL_CYBERJACK)		+= cyberjack.o
  obj-$(CONFIG_USB_SERIAL_IR)			+= ir-usb.o
! obj-$(CONFIG_USB_SERIAL_KLSI)			+= kl5kusb105.o
! 
  # Objects that export symbols.
  export-objs	:= usbserial.o
  
--- 19,28 ----
  obj-$(CONFIG_USB_SERIAL_EMPEG)			+= empeg.o
  obj-$(CONFIG_USB_SERIAL_MCT_U232)		+= mct_u232.o
  obj-$(CONFIG_USB_SERIAL_EDGEPORT)		+= io_edgeport.o
  obj-$(CONFIG_USB_SERIAL_PL2303)			+= pl2303.o
  obj-$(CONFIG_USB_SERIAL_CYBERJACK)		+= cyberjack.o
  obj-$(CONFIG_USB_SERIAL_IR)			+= ir-usb.o
!  
  # Objects that export symbols.
  export-objs	:= usbserial.o
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/belkin_sa.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/belkin_sa.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/belkin_sa.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/belkin_sa.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,8 ****
  /*
   * Belkin USB Serial Adapter Driver
   *
!  *  Copyright (C) 2000		William Greathouse (wgreathouse@smva.com)
!  *  Copyright (C) 2000-2001 	Greg Kroah-Hartman (greg@kroah.com)
   *
   *  This program is largely derived from work by the linux-usb group
   *  and associated source files.  Please see the usb/serial files for
--- 1,8 ----
  /*
   * Belkin USB Serial Adapter Driver
   *
!  *  Copyright (C) 2000
!  *      William Greathouse (wgreathouse@smva.com)
   *
   *  This program is largely derived from work by the linux-usb group
   *  and associated source files.  Please see the usb/serial files for
***************
*** 24,32 ****
   * -- Add support for flush commands
   * -- Add everything that is missing :)
   *
-  * 27-Nov-2001 gkh
-  * 	compressed all the differnent device entries into 1.
-  *
   * 30-May-2001 gkh
   *	switched from using spinlock to a semaphore, which fixes lots of problems.
   *
--- 24,29 ----
***************
*** 65,79 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
--- 62,79 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
***************
*** 88,94 ****
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.2"
  #define DRIVER_AUTHOR "William Greathouse "
  #define DRIVER_DESC "USB Belkin Serial converter driver"
  
--- 88,94 ----
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.1"
  #define DRIVER_AUTHOR "William Greathouse "
  #define DRIVER_DESC "USB Belkin Serial converter driver"
  
***************
*** 103,137 ****
  static void belkin_sa_break_ctl		(struct usb_serial_port *port, int break_state );
  
  
! static struct usb_device_id id_table_combined [] = {
  	{ USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
  	{ USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
  	{ USB_DEVICE(PERACOM_VID, PERACOM_PID) },
  	{ USB_DEVICE(GOHUBS_VID, GOHUBS_PID) },
- 	{ USB_DEVICE(GOHUBS_VID, HANDYLINK_PID) },
  	{ USB_DEVICE(BELKIN_DOCKSTATION_VID, BELKIN_DOCKSTATION_PID) },
  	{ }							/* Terminating entry */
  };
  
  MODULE_DEVICE_TABLE (usb, id_table_combined);
  
! /* All of the device info needed for the serial converters */
! static struct usb_serial_device_type belkin_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"Belkin / Peracom / GoHubs USB Serial Adapter",
! 	.id_table =		id_table_combined,
! 	.num_interrupt_in =	1,
! 	.num_bulk_in =		1,
! 	.num_bulk_out =		1,
! 	.num_ports =		1,
! 	.open =			belkin_sa_open,
! 	.close =		belkin_sa_close,
! 	.read_int_callback =	belkin_sa_read_int_callback,	/* How we get the status info */
! 	.ioctl =		belkin_sa_ioctl,
! 	.set_termios =		belkin_sa_set_termios,
! 	.break_ctl =		belkin_sa_break_ctl,
! 	.startup =		belkin_sa_startup,
! 	.shutdown =		belkin_sa_shutdown,
  };
  
  
--- 103,248 ----
  static void belkin_sa_break_ctl		(struct usb_serial_port *port, int break_state );
  
  
! static __devinitdata struct usb_device_id id_table_combined [] = {
  	{ USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
  	{ USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
  	{ USB_DEVICE(PERACOM_VID, PERACOM_PID) },
  	{ USB_DEVICE(GOHUBS_VID, GOHUBS_PID) },
  	{ USB_DEVICE(BELKIN_DOCKSTATION_VID, BELKIN_DOCKSTATION_PID) },
  	{ }							/* Terminating entry */
  };
  
+ static __devinitdata struct usb_device_id belkin_dockstation_table [] = {
+ 	{ USB_DEVICE(BELKIN_DOCKSTATION_VID, BELKIN_DOCKSTATION_PID) },
+ 	{ }							/* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id belkin_sa_table [] = {
+ 	{ USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
+ 	{ }							/* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id belkin_old_table [] = {
+ 	{ USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
+ 	{ }							/* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id peracom_table [] = {
+ 	{ USB_DEVICE(PERACOM_VID, PERACOM_PID) },
+ 	{ }							/* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id gocom232_table [] = {
+ 	{ USB_DEVICE(GOHUBS_VID, GOHUBS_PID) },
+ 	{ }							/* Terminating entry */
+ };
+ 
  MODULE_DEVICE_TABLE (usb, id_table_combined);
  
! /* All of the device info needed for the Belkin dockstation serial converter */
! static struct usb_serial_device_type belkin_dockstation_device = {
! 	name:			"Belkin F5U120-PC USB Serial Adapter",
! 	id_table:		belkin_dockstation_table,		/* the Belkin F5U103 device */
! 	needs_interrupt_in:	MUST_HAVE,			/* this device must have an interrupt in endpoint */
! 	needs_bulk_in:		MUST_HAVE,			/* this device must have a bulk in endpoint */
! 	needs_bulk_out:		MUST_HAVE,			/* this device must have a bulk out endpoint */
! 	num_interrupt_in:	1,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	open:			belkin_sa_open,
! 	close:			belkin_sa_close,
! 	read_int_callback:	belkin_sa_read_int_callback,	/* How we get the status info */
! 	ioctl:			belkin_sa_ioctl,
! 	set_termios:		belkin_sa_set_termios,
! 	break_ctl:		belkin_sa_break_ctl,
! 	startup:		belkin_sa_startup,
! 	shutdown:		belkin_sa_shutdown,
! };
! 
! /* All of the device info needed for the Belkin serial converter */
! static struct usb_serial_device_type belkin_sa_device = {
! 	name:			"Belkin F5U103 USB Serial Adapter",
! 	id_table:		belkin_sa_table,		/* the Belkin F5U103 device */
! 	needs_interrupt_in:	MUST_HAVE,			/* this device must have an interrupt in endpoint */
! 	needs_bulk_in:		MUST_HAVE,			/* this device must have a bulk in endpoint */
! 	needs_bulk_out:		MUST_HAVE,			/* this device must have a bulk out endpoint */
! 	num_interrupt_in:	1,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	open:			belkin_sa_open,
! 	close:			belkin_sa_close,
! 	read_int_callback:	belkin_sa_read_int_callback,	/* How we get the status info */
! 	ioctl:			belkin_sa_ioctl,
! 	set_termios:		belkin_sa_set_termios,
! 	break_ctl:		belkin_sa_break_ctl,
! 	startup:		belkin_sa_startup,
! 	shutdown:		belkin_sa_shutdown,
! };
! 
! 
! /* This driver also supports the "old" school Belkin single port adaptor */
! static struct usb_serial_device_type belkin_old_device = {
! 	name:			"Belkin USB Serial Adapter",
! 	id_table:		belkin_old_table,		/* the old Belkin device */
! 	needs_interrupt_in:	MUST_HAVE,			/* this device must have an interrupt in endpoint */
! 	needs_bulk_in:		MUST_HAVE,			/* this device must have a bulk in endpoint */
! 	needs_bulk_out:		MUST_HAVE,			/* this device must have a bulk out endpoint */
! 	num_interrupt_in:	1,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	open:			belkin_sa_open,
! 	close:			belkin_sa_close,
! 	read_int_callback:	belkin_sa_read_int_callback,	/* How we get the status info */
! 	ioctl:			belkin_sa_ioctl,
! 	set_termios:		belkin_sa_set_termios,
! 	break_ctl:		belkin_sa_break_ctl,
! 	startup:		belkin_sa_startup,
! 	shutdown:		belkin_sa_shutdown,
! };
! 
! /* this driver also works for the Peracom single port adapter */
! static struct usb_serial_device_type peracom_device = {
! 	name:			"Peracom single port USB Serial Adapter",
! 	id_table:		peracom_table,			/* the Peracom device */
! 	needs_interrupt_in:	MUST_HAVE,			/* this device must have an interrupt in endpoint */
! 	needs_bulk_in:		MUST_HAVE,			/* this device must have a bulk in endpoint */
! 	needs_bulk_out:		MUST_HAVE,			/* this device must have a bulk out endpoint */
! 	num_interrupt_in:	1,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	open:			belkin_sa_open,
! 	close:			belkin_sa_close,
! 	read_int_callback:	belkin_sa_read_int_callback,	/* How we get the status info */
! 	ioctl:			belkin_sa_ioctl,
! 	set_termios:		belkin_sa_set_termios,
! 	break_ctl:		belkin_sa_break_ctl,
! 	startup:		belkin_sa_startup,
! 	shutdown:		belkin_sa_shutdown,
! };
! 
! /* the GoHubs Go-COM232 device is the same as the Peracom single port adapter */
! static struct usb_serial_device_type gocom232_device = {
! 	name:			"GO-COM232 USB Serial Converter",
! 	id_table:		gocom232_table,			/* the GO-COM232 device */
! 	needs_interrupt_in:	MUST_HAVE,			/* this device must have an interrupt in endpoint */
! 	needs_bulk_in:		MUST_HAVE,			/* this device must have a bulk in endpoint */
! 	needs_bulk_out:		MUST_HAVE,			/* this device must have a bulk out endpoint */
! 	num_interrupt_in:	1,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	open:			belkin_sa_open,
! 	close:			belkin_sa_close,
! 	read_int_callback:	belkin_sa_read_int_callback,	/* How we get the status info */
! 	ioctl:			belkin_sa_ioctl,
! 	set_termios:		belkin_sa_set_termios,
! 	break_ctl:		belkin_sa_break_ctl,
! 	startup:		belkin_sa_startup,
! 	shutdown:		belkin_sa_shutdown,
  };
  
  
***************
*** 185,194 ****
  {
  	int i;
  	
! 	dbg ("%s", __FUNCTION__);
  
  	/* stop reads and writes on all ports */
  	for (i=0; i < serial->num_ports; ++i) {
  		/* My special items, the standard routines free my urbs */
  		if (serial->port[i].private)
  			kfree(serial->port[i].private);
--- 296,308 ----
  {
  	int i;
  	
! 	dbg (__FUNCTION__);
  
  	/* stop reads and writes on all ports */
  	for (i=0; i < serial->num_ports; ++i) {
+ 		while (serial->port[i].open_count > 0) {
+ 			belkin_sa_close (&serial->port[i], NULL);
+ 		}
  		/* My special items, the standard routines free my urbs */
  		if (serial->port[i].private)
  			kfree(serial->port[i].private);
***************
*** 200,224 ****
  {
  	int retval = 0;
  
! 	dbg("%s port %d", __FUNCTION__, port->number);
  
! 	/*Start reading from the device*/
! 	/* TODO: Look at possibility of submitting mulitple URBs to device to
! 	 *       enhance buffering.  Win trace shows 16 initial read URBs.
! 	 */
! 	port->read_urb->dev = port->serial->dev;
! 	retval = usb_submit_urb(port->read_urb);
! 	if (retval) {
! 		err("usb_submit_urb(read bulk) failed");
! 		goto exit;
! 	}
! 
! 	port->interrupt_in_urb->dev = port->serial->dev;
! 	retval = usb_submit_urb(port->interrupt_in_urb);
! 	if (retval)
! 		err(" usb_submit_urb(read int) failed");
  
  exit:
  	return retval;
  } /* belkin_sa_open */
  
--- 314,349 ----
  {
  	int retval = 0;
  
! 	dbg(__FUNCTION__" port %d", port->number);
  
! 	down (&port->sem);
! 	
! 	++port->open_count;
! 	MOD_INC_USE_COUNT;
! 	
! 	if (!port->active) {
! 		port->active = 1;
  
+ 		/*Start reading from the device*/
+ 		/* TODO: Look at possibility of submitting mulitple URBs to device to
+ 		 *       enhance buffering.  Win trace shows 16 initial read URBs.
+ 		 */
+ 		port->read_urb->dev = port->serial->dev;
+ 		retval = usb_submit_urb(port->read_urb);
+ 		if (retval) {
+ 			err("usb_submit_urb(read bulk) failed");
+ 			goto exit;
+ 		}
+ 
+ 		port->interrupt_in_urb->dev = port->serial->dev;
+ 		retval = usb_submit_urb(port->interrupt_in_urb);
+ 		if (retval)
+ 			err(" usb_submit_urb(read int) failed");
+ 	}
+ 	
  exit:
+ 	up (&port->sem);
+ 
  	return retval;
  } /* belkin_sa_open */
  
***************
*** 234,247 ****
  	if (!serial)
  		return;
  
! 	dbg("%s port %d", __FUNCTION__, port->number);
  
! 	if (serial->dev) {
! 		/* shutdown our bulk reads and writes */
! 		usb_unlink_urb (port->write_urb);
! 		usb_unlink_urb (port->read_urb);
! 		usb_unlink_urb (port->interrupt_in_urb);
  	}
  } /* belkin_sa_close */
  
  
--- 359,382 ----
  	if (!serial)
  		return;
  
! 	dbg(__FUNCTION__" port %d", port->number);
! 
! 	down (&port->sem);
! 
! 	--port->open_count;
  
! 	if (port->open_count <= 0) {
! 		if (serial->dev) {
! 			/* shutdown our bulk reads and writes */
! 			usb_unlink_urb (port->write_urb);
! 			usb_unlink_urb (port->read_urb);
! 			usb_unlink_urb (port->interrupt_in_urb);
! 		}
! 		port->active = 0;
  	}
+ 	
+ 	up (&port->sem);
+ 	MOD_DEC_USE_COUNT;
  } /* belkin_sa_close */
  
  
***************
*** 322,352 ****
  {
  	struct usb_serial *serial = port->serial;
  	struct belkin_sa_private *priv = (struct belkin_sa_private *)port->private;
! 	unsigned int iflag;
! 	unsigned int cflag;
! 	unsigned int old_iflag = 0;
! 	unsigned int old_cflag = 0;
  	__u16 urb_value = 0; /* Will hold the new flags */
  	
- 	if ((!port->tty) || (!port->tty->termios)) {
- 		dbg ("%s - no tty or termios structure", __FUNCTION__);
- 		return;
- 	}
- 
- 	iflag = port->tty->termios->c_iflag;
- 	cflag = port->tty->termios->c_cflag;
- 
- 	/* check that they really want us to change something */
- 	if (old_termios) {
- 		if ((cflag == old_termios->c_cflag) &&
- 		    (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
- 			dbg("%s - nothing to change...", __FUNCTION__);
- 			return;
- 		}
- 		old_iflag = old_termios->c_iflag;
- 		old_cflag = old_termios->c_cflag;
- 	}
- 
  	/* Set the baud rate */
  	if( (cflag&CBAUD) != (old_cflag&CBAUD) ) {
  		/* reassert DTR and (maybe) RTS on transition from B0 */
--- 457,468 ----
  {
  	struct usb_serial *serial = port->serial;
  	struct belkin_sa_private *priv = (struct belkin_sa_private *)port->private;
! 	unsigned int iflag = port->tty->termios->c_iflag;
! 	unsigned int cflag = port->tty->termios->c_cflag;
! 	unsigned int old_iflag = old_termios->c_iflag;
! 	unsigned int old_cflag = old_termios->c_cflag;
  	__u16 urb_value = 0; /* Will hold the new flags */
  	
  	/* Set the baud rate */
  	if( (cflag&CBAUD) != (old_cflag&CBAUD) ) {
  		/* reassert DTR and (maybe) RTS on transition from B0 */
***************
*** 526,532 ****
  
  static int __init belkin_sa_init (void)
  {
! 	usb_serial_register (&belkin_device);
  	info(DRIVER_DESC " " DRIVER_VERSION);
  	return 0;
  }
--- 642,652 ----
  
  static int __init belkin_sa_init (void)
  {
! 	usb_serial_register (&belkin_dockstation_device);
! 	usb_serial_register (&belkin_sa_device);
! 	usb_serial_register (&belkin_old_device);
! 	usb_serial_register (&peracom_device);
! 	usb_serial_register (&gocom232_device);
  	info(DRIVER_DESC " " DRIVER_VERSION);
  	return 0;
  }
***************
*** 534,540 ****
  
  static void __exit belkin_sa_exit (void)
  {
! 	usb_serial_deregister (&belkin_device);
  }
  
  
--- 654,664 ----
  
  static void __exit belkin_sa_exit (void)
  {
! 	usb_serial_deregister (&belkin_dockstation_device);
! 	usb_serial_deregister (&belkin_sa_device);
! 	usb_serial_deregister (&belkin_old_device);
! 	usb_serial_deregister (&peracom_device);
! 	usb_serial_deregister (&gocom232_device);
  }
  
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/belkin_sa.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/belkin_sa.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/belkin_sa.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/belkin_sa.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 47,53 ****
  
  #define GOHUBS_VID	0x0921	/* GoHubs vendor id */
  #define GOHUBS_PID	0x1000	/* GoHubs single port serial converter's id (identical to the Peracom device) */
- #define HANDYLINK_PID	0x1200	/* HandyLink USB's id (identical to the Peracom device) */
  
  /* Vendor Request Interface */
  #define BELKIN_SA_SET_BAUDRATE_REQUEST	0  /* Set baud rate */
--- 47,52 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/cyberjack.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/cyberjack.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/cyberjack.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/cyberjack.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 25,39 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
--- 25,42 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
***************
*** 66,72 ****
  static void cyberjack_read_bulk_callback (struct urb *urb);
  static void cyberjack_write_bulk_callback (struct urb *urb);
  
! static struct usb_device_id id_table [] = {
  	{ USB_DEVICE(CYBERJACK_VENDOR_ID, CYBERJACK_PRODUCT_ID) },
  	{ }			/* Terminating entry */
  };
--- 69,75 ----
  static void cyberjack_read_bulk_callback (struct urb *urb);
  static void cyberjack_write_bulk_callback (struct urb *urb);
  
! static __devinitdata struct usb_device_id id_table [] = {
  	{ USB_DEVICE(CYBERJACK_VENDOR_ID, CYBERJACK_PRODUCT_ID) },
  	{ }			/* Terminating entry */
  };
***************
*** 74,94 ****
  MODULE_DEVICE_TABLE (usb, id_table);
  
  static struct usb_serial_device_type cyberjack_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"Reiner SCT Cyberjack USB card reader",
! 	.id_table =		id_table,
! 	.num_interrupt_in =	1,
! 	.num_bulk_in =		1,
! 	.num_bulk_out =		1,
! 	.num_ports =		1,
! 	.startup =		cyberjack_startup,
! 	.shutdown =		cyberjack_shutdown,
! 	.open =			cyberjack_open,
! 	.close =		cyberjack_close,
! 	.write =		cyberjack_write,
! 	.read_int_callback =	cyberjack_read_int_callback,
! 	.read_bulk_callback =	cyberjack_read_bulk_callback,
! 	.write_bulk_callback =	cyberjack_write_bulk_callback,
  };
  
  struct cyberjack_private {
--- 77,99 ----
  MODULE_DEVICE_TABLE (usb, id_table);
  
  static struct usb_serial_device_type cyberjack_device = {
! 	name:			"Reiner SCT Cyberjack USB card reader",
! 	id_table:		id_table,
! 	needs_interrupt_in:	MUST_HAVE,
! 	needs_bulk_in:		MUST_HAVE,
! 	needs_bulk_out:		MUST_HAVE,
! 	num_interrupt_in:	1,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	startup:		cyberjack_startup,
! 	shutdown:		cyberjack_shutdown,
! 	open:			cyberjack_open,
! 	close:			cyberjack_close,
! 	write:			cyberjack_write,
! 	read_int_callback:	cyberjack_read_int_callback,
! 	read_bulk_callback:	cyberjack_read_bulk_callback,
! 	write_bulk_callback:	cyberjack_write_bulk_callback,
  };
  
  struct cyberjack_private {
***************
*** 103,109 ****
  {
  	struct cyberjack_private *priv;
  
! 	dbg("%s", __FUNCTION__);
  
  	/* allocate the private data structure */
  	serial->port->private = kmalloc(sizeof(struct cyberjack_private), GFP_KERNEL);
--- 108,114 ----
  {
  	struct cyberjack_private *priv;
  
! 	dbg (__FUNCTION__);
  
  	/* allocate the private data structure */
  	serial->port->private = kmalloc(sizeof(struct cyberjack_private), GFP_KERNEL);
***************
*** 125,133 ****
  {
  	int i;
  	
! 	dbg("%s", __FUNCTION__);
  
  	for (i=0; i < serial->num_ports; ++i) {
  		/* My special items, the standard routines free my urbs */
  		if (serial->port[i].private)
  			kfree(serial->port[i].private);
--- 130,142 ----
  {
  	int i;
  	
! 	dbg (__FUNCTION__);
  
+ 	/* stop reads and writes on all ports */
  	for (i=0; i < serial->num_ports; ++i) {
+ 		while (serial->port[i].open_count > 0) {
+ 			cyberjack_close (&serial->port[i], NULL);
+ 		}
  		/* My special items, the standard routines free my urbs */
  		if (serial->port[i].private)
  			kfree(serial->port[i].private);
***************
*** 142,184 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	/* force low_latency on so that our tty_push actually forces
! 	 * the data through, otherwise it is scheduled, and with high
! 	 * data rates (like with OHCI) data can get lost.
! 	 */
! 	port->tty->low_latency = 1;
  
! 	priv = (struct cyberjack_private *)port->private;
! 	priv->rdtodo = 0;
! 	priv->wrfilled = 0;
! 	priv->wrsent = 0;
  
! 	/* shutdown any bulk reads that might be going on */
! 	usb_unlink_urb (port->write_urb);
! 	usb_unlink_urb (port->read_urb);
! 	usb_unlink_urb (port->interrupt_in_urb);
! 
! 	port->interrupt_in_urb->dev = port->serial->dev;
! 	result = usb_submit_urb(port->interrupt_in_urb);
! 	if (result)
! 		err(" usb_submit_urb(read int) failed");
! 	dbg("%s - usb_submit_urb(int urb)", __FUNCTION__);
  
  	return result;
  }
  
  static void cyberjack_close (struct usb_serial_port *port, struct file *filp)
  {
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	if (port->serial->dev) {
! 		/* shutdown any bulk reads that might be going on */
! 		usb_unlink_urb (port->write_urb);
! 		usb_unlink_urb (port->read_urb);
! 		usb_unlink_urb (port->interrupt_in_urb);
  	}
  }
  
  static int cyberjack_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
--- 151,216 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  
! 	MOD_INC_USE_COUNT;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
! 	down (&port->sem);
! 
! 	++port->open_count;
! 
! 	if (!port->active) {
! 		port->active = 1;
! 		/* force low_latency on so that our tty_push actually forces
! 		 * the data through, otherwise it is scheduled, and with high
! 		 * data rates (like with OHCI) data can get lost.
! 		 */
! 		port->tty->low_latency = 1;
! 
! 		priv = (struct cyberjack_private *)port->private;
! 		priv->rdtodo = 0;
! 		priv->wrfilled = 0;
! 		priv->wrsent = 0;
! 
! 		/* shutdown any bulk reads that might be going on */
! 		usb_unlink_urb (port->write_urb);
! 		usb_unlink_urb (port->read_urb);
! 		usb_unlink_urb (port->interrupt_in_urb);
! 
! 		port->interrupt_in_urb->dev = port->serial->dev;
! 		result = usb_submit_urb(port->interrupt_in_urb);
! 		if (result)
! 			err(" usb_submit_urb(read int) failed");
! 		dbg(__FUNCTION__ " - usb_submit_urb(int urb)");
! 	}
  
! 	up (&port->sem);
  
  	return result;
  }
  
  static void cyberjack_close (struct usb_serial_port *port, struct file *filp)
  {
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
! 	down (&port->sem);
! 
! 	--port->open_count;
! 
! 	if (port->open_count <= 0) {
! 		if (port->serial->dev) {
! 			/* shutdown any bulk reads that might be going on */
! 			usb_unlink_urb (port->write_urb);
! 			usb_unlink_urb (port->read_urb);
! 			usb_unlink_urb (port->interrupt_in_urb);
! 		}
! 
! 		port->active = 0;
! 		port->open_count = 0;
  	}
+ 
+ 	up (&port->sem);
+ 	MOD_DEC_USE_COUNT;
  }
  
  static int cyberjack_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
***************
*** 188,206 ****
  	int result;
  	int wrexpected;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
! 	dbg("%s - from_user %d", __FUNCTION__, from_user);
  
  	if (count == 0) {
! 		dbg("%s - write request of 0 bytes", __FUNCTION__);
  		return (0);
  	}
  
  	if (port->write_urb->status == -EINPROGRESS) {
! 		dbg("%s - already writing", __FUNCTION__);
  		return (0);
  	}
  
  	if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ) {
  		/* To much data  for buffer. Reset buffer. */
  		priv->wrfilled=0;
--- 220,240 ----
  	int result;
  	int wrexpected;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
! 	dbg(__FUNCTION__ " - from_user %d", from_user);
  
  	if (count == 0) {
! 		dbg(__FUNCTION__ " - write request of 0 bytes");
  		return (0);
  	}
  
  	if (port->write_urb->status == -EINPROGRESS) {
! 		dbg (__FUNCTION__ " - already writing");
  		return (0);
  	}
  
+ 	down (&port->sem);
+ 
  	if( (count+priv->wrfilled)>sizeof(priv->wrbuf) ) {
  		/* To much data  for buffer. Reset buffer. */
  		priv->wrfilled=0;
***************
*** 209,217 ****
  
  	/* Copy data */
  	if (from_user) {
! 		if (copy_from_user(priv->wrbuf+priv->wrfilled, buf, count)) {
  			return -EFAULT;
- 		}
  	} else {
  		memcpy (priv->wrbuf+priv->wrfilled, buf, count);
  	}  
--- 243,250 ----
  
  	/* Copy data */
  	if (from_user) {
! 		if (copy_from_user(priv->wrbuf+priv->wrfilled, buf, count))
  			return -EFAULT;
  	} else {
  		memcpy (priv->wrbuf+priv->wrfilled, buf, count);
  	}  
***************
*** 221,227 ****
  
  	if( priv->wrfilled >= 3 ) {
  		wrexpected = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
! 		dbg("%s - expected data: %d", __FUNCTION__, wrexpected);
  	} else {
  		wrexpected = sizeof(priv->wrbuf);
  	}
--- 254,260 ----
  
  	if( priv->wrfilled >= 3 ) {
  		wrexpected = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
! 		dbg(__FUNCTION__ " - expected data: %d", wrexpected);
  	} else {
  		wrexpected = sizeof(priv->wrbuf);
  	}
***************
*** 230,236 ****
  		/* We have enough data to begin transmission */
  		int length;
  
! 		dbg("%s - transmitting data (frame 1)", __FUNCTION__);
  		length = (wrexpected > port->bulk_out_size) ? port->bulk_out_size : wrexpected;
  
  		memcpy (port->write_urb->transfer_buffer, priv->wrbuf, length );
--- 263,269 ----
  		/* We have enough data to begin transmission */
  		int length;
  
! 		dbg(__FUNCTION__ " - transmitting data (frame 1)");
  		length = (wrexpected > port->bulk_out_size) ? port->bulk_out_size : wrexpected;
  
  		memcpy (port->write_urb->transfer_buffer, priv->wrbuf, length );
***************
*** 248,271 ****
  		/* send the data out the bulk port */
  		result = usb_submit_urb(port->write_urb);
  		if (result) {
! 			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
  			/* Throw away data. No better idea what to do with it. */
  			priv->wrfilled=0;
  			priv->wrsent=0;
  			return 0;
  		}
  
! 		dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent);
! 		dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled);
  
  		if( priv->wrsent>=priv->wrfilled ) {
! 			dbg("%s - buffer cleaned", __FUNCTION__);
  			memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
  			priv->wrfilled=0;
  			priv->wrsent=0;
  		}
  	}
  
  	return (count);
  } 
  
--- 281,306 ----
  		/* send the data out the bulk port */
  		result = usb_submit_urb(port->write_urb);
  		if (result) {
! 			err(__FUNCTION__ " - failed submitting write urb, error %d", result);
  			/* Throw away data. No better idea what to do with it. */
  			priv->wrfilled=0;
  			priv->wrsent=0;
+ 			up (&port->sem);
  			return 0;
  		}
  
! 		dbg(__FUNCTION__ " - priv->wrsent=%d",priv->wrsent);
! 		dbg(__FUNCTION__ " - priv->wrfilled=%d",priv->wrfilled);
  
  		if( priv->wrsent>=priv->wrfilled ) {
! 			dbg(__FUNCTION__ " - buffer cleaned");
  			memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
  			priv->wrfilled=0;
  			priv->wrsent=0;
  		}
  	}
  
+ 	up (&port->sem);
  	return (count);
  } 
  
***************
*** 278,284 ****
  
  	if (port_paranoia_check (port, __FUNCTION__)) return;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	/* the urb might have been killed. */
  	if (urb->status)
--- 313,319 ----
  
  	if (port_paranoia_check (port, __FUNCTION__)) return;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	/* the urb might have been killed. */
  	if (urb->status)
***************
*** 311,324 ****
  		/* "+=" is probably more fault tollerant than "=" */
  		priv->rdtodo += size;
  
! 		dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo);
  
  		if( !old_rdtodo ) {
  			port->read_urb->dev = port->serial->dev;
  			result = usb_submit_urb(port->read_urb);
  			if( result )
! 				err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
! 			dbg("%s - usb_submit_urb(read urb)", __FUNCTION__);
  		}
  	}
  }
--- 346,359 ----
  		/* "+=" is probably more fault tollerant than "=" */
  		priv->rdtodo += size;
  
! 		dbg(__FUNCTION__ " - rdtodo: %d", priv->rdtodo);
  
  		if( !old_rdtodo ) {
  			port->read_urb->dev = port->serial->dev;
  			result = usb_submit_urb(port->read_urb);
  			if( result )
! 				err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
! 			dbg(__FUNCTION__ " - usb_submit_urb(read urb)");
  		}
  	}
  }
***************
*** 333,348 ****
  	int i;
  	int result;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
  		usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
! 		dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
--- 368,383 ----
  	int i;
  	int result;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  	
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
  		usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, urb->transfer_buffer);
! 		dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
  		return;
  	}
  
***************
*** 366,380 ****
  	/* Just to be sure */
  	if( priv->rdtodo<0 ) priv->rdtodo=0;
  
! 	dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo);
  
  	/* Continue to read if we have still urbs to do. */
  	if( priv->rdtodo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/ ) {
  		port->read_urb->dev = port->serial->dev;
  		result = usb_submit_urb(port->read_urb);
  		if (result)
! 			err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
! 		dbg("%s - usb_submit_urb(read urb)", __FUNCTION__);
  	}
  }
  
--- 401,415 ----
  	/* Just to be sure */
  	if( priv->rdtodo<0 ) priv->rdtodo=0;
  
! 	dbg(__FUNCTION__ " - rdtodo: %d", priv->rdtodo);
  
  	/* Continue to read if we have still urbs to do. */
  	if( priv->rdtodo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/ ) {
  		port->read_urb->dev = port->serial->dev;
  		result = usb_submit_urb(port->read_urb);
  		if (result)
! 			err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
! 		dbg(__FUNCTION__ " - usb_submit_urb(read urb)");
  	}
  }
  
***************
*** 384,398 ****
  	struct cyberjack_private *priv = (struct cyberjack_private *)port->private;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
--- 419,433 ----
  	struct cyberjack_private *priv = (struct cyberjack_private *)port->private;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  	
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
  		return;
  	}
  
***************
*** 401,411 ****
  		int length, blksize, result;
  
  		if (port->write_urb->status == -EINPROGRESS) {
! 			dbg("%s - already writing", __FUNCTION__);
  			return;
  		}
  
! 		dbg("%s - transmitting data (frame n)", __FUNCTION__);
  
  		length = ((priv->wrfilled - priv->wrsent) > port->bulk_out_size) ?
  			port->bulk_out_size : (priv->wrfilled - priv->wrsent);
--- 436,448 ----
  		int length, blksize, result;
  
  		if (port->write_urb->status == -EINPROGRESS) {
! 			dbg (__FUNCTION__ " - already writing");
  			return;
  		}
  
! 		down (&port->sem);
! 
! 		dbg(__FUNCTION__ " - transmitting data (frame n)");
  
  		length = ((priv->wrfilled - priv->wrsent) > port->bulk_out_size) ?
  			port->bulk_out_size : (priv->wrfilled - priv->wrsent);
***************
*** 426,452 ****
  		/* send the data out the bulk port */
  		result = usb_submit_urb(port->write_urb);
  		if (result) {
! 			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
  			/* Throw away data. No better idea what to do with it. */
  			priv->wrfilled=0;
  			priv->wrsent=0;
  			queue_task(&port->tqueue, &tq_immediate);
  			mark_bh(IMMEDIATE_BH);
  			return;
  		}
  
! 		dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent);
! 		dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled);
  
  		blksize = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
  
  		if( (priv->wrsent>=priv->wrfilled) || (priv->wrsent>=blksize) ) {
! 			dbg("%s - buffer cleaned", __FUNCTION__);
  			memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
  			priv->wrfilled=0;
  			priv->wrsent=0;
  		}
  
  		queue_task(&port->tqueue, &tq_immediate);
  		mark_bh(IMMEDIATE_BH);
  		return;
--- 463,491 ----
  		/* send the data out the bulk port */
  		result = usb_submit_urb(port->write_urb);
  		if (result) {
! 			err(__FUNCTION__ " - failed submitting write urb, error %d", result);
  			/* Throw away data. No better idea what to do with it. */
  			priv->wrfilled=0;
  			priv->wrsent=0;
+ 			up (&port->sem);
  			queue_task(&port->tqueue, &tq_immediate);
  			mark_bh(IMMEDIATE_BH);
  			return;
  		}
  
! 		dbg(__FUNCTION__ " - priv->wrsent=%d",priv->wrsent);
! 		dbg(__FUNCTION__ " - priv->wrfilled=%d",priv->wrfilled);
  
  		blksize = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3;
  
  		if( (priv->wrsent>=priv->wrfilled) || (priv->wrsent>=blksize) ) {
! 			dbg(__FUNCTION__ " - buffer cleaned");
  			memset( priv->wrbuf, 0, sizeof(priv->wrbuf) );
  			priv->wrfilled=0;
  			priv->wrsent=0;
  		}
  
+ 		up (&port->sem);
  		queue_task(&port->tqueue, &tq_immediate);
  		mark_bh(IMMEDIATE_BH);
  		return;
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/digi_acceleport.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/digi_acceleport.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/digi_acceleport.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/digi_acceleport.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 14,23 ****
  *  Peter Berger (pberger@brimson.com)
  *  Al Borchers (borchers@steinerpoint.com)
  * 
- * (12/03/2001) gkh
- *	switched to using port->open_count instead of private version.
- *	Removed port->active
- *
  * (04/08/2001) gb
  *	Identify version on module load.
  *
--- 14,19 ----
***************
*** 235,250 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
--- 231,249 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
***************
*** 412,425 ****
  
  /* Structures */
  
! struct digi_serial {
  	spinlock_t ds_serial_lock;
  	struct usb_serial_port *ds_oob_port;	/* out-of-band port */
  	int ds_oob_port_num;			/* index of out-of-band port */
  	int ds_device_started;
! };
  
! struct digi_port {
  	spinlock_t dp_port_lock;
  	int dp_port_num;
  	int dp_out_buf_len;
--- 411,424 ----
  
  /* Structures */
  
! typedef struct digi_serial {
  	spinlock_t ds_serial_lock;
  	struct usb_serial_port *ds_oob_port;	/* out-of-band port */
  	int ds_oob_port_num;			/* index of out-of-band port */
  	int ds_device_started;
! } digi_serial_t;
  
! typedef struct digi_port {
  	spinlock_t dp_port_lock;
  	int dp_port_num;
  	int dp_out_buf_len;
***************
*** 430,435 ****
--- 429,435 ----
  	int dp_write_urb_in_use;
  	unsigned int dp_modem_signals;
  	wait_queue_head_t dp_modem_change_wait;
+ 	int dp_open_count;			/* inc on open, dec on close */
  	int dp_transmit_idle;
  	wait_queue_head_t dp_transmit_idle_wait;
  	int dp_throttled;
***************
*** 438,444 ****
  	int dp_in_close;			/* close in progress */
  	wait_queue_head_t dp_close_wait;	/* wait queue for close */
  	struct tq_struct dp_wakeup_task;
! };
  
  
  /* Local Function Declarations */
--- 438,444 ----
  	int dp_in_close;			/* close in progress */
  	wait_queue_head_t dp_close_wait;	/* wait queue for close */
  	struct tq_struct dp_wakeup_task;
! } digi_port_t;
  
  
  /* Local Function Declarations */
***************
*** 483,494 ****
  	{ }						/* Terminating entry */
  };
  
! static struct usb_device_id id_table_2 [] = {
  	{ USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) },
  	{ }						/* Terminating entry */
  };
  
! static struct usb_device_id id_table_4 [] = {
  	{ USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) },
  	{ }						/* Terminating entry */
  };
--- 483,494 ----
  	{ }						/* Terminating entry */
  };
  
! static __devinitdata struct usb_device_id id_table_2 [] = {
  	{ USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) },
  	{ }						/* Terminating entry */
  };
  
! static __devinitdata struct usb_device_id id_table_4 [] = {
  	{ USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) },
  	{ }						/* Terminating entry */
  };
***************
*** 498,548 ****
  /* device info needed for the Digi serial converter */
  
  static struct usb_serial_device_type digi_acceleport_2_device = {
! 	.owner =			THIS_MODULE,
! 	.name =				"Digi USB",
! 	.id_table =			id_table_2,
! 	.num_interrupt_in =		0,
! 	.num_bulk_in =			4,
! 	.num_bulk_out =			4,
! 	.num_ports =			3,
! 	.open =				digi_open,
! 	.close =			digi_close,
! 	.write =			digi_write,
! 	.write_room =			digi_write_room,
! 	.write_bulk_callback = 		digi_write_bulk_callback,
! 	.read_bulk_callback =		digi_read_bulk_callback,
! 	.chars_in_buffer =		digi_chars_in_buffer,
! 	.throttle =			digi_rx_throttle,
! 	.unthrottle =			digi_rx_unthrottle,
! 	.ioctl =			digi_ioctl,
! 	.set_termios =			digi_set_termios,
! 	.break_ctl =			digi_break_ctl,
! 	.startup =			digi_startup,
! 	.shutdown =			digi_shutdown,
  };
  
  static struct usb_serial_device_type digi_acceleport_4_device = {
! 	.owner =			THIS_MODULE,
! 	.name =				"Digi USB",
! 	.id_table =			id_table_4,
! 	.num_interrupt_in =		0,
! 	.num_bulk_in =			5,
! 	.num_bulk_out =			5,
! 	.num_ports =			4,
! 	.open =				digi_open,
! 	.close =			digi_close,
! 	.write =			digi_write,
! 	.write_room =			digi_write_room,
! 	.write_bulk_callback = 		digi_write_bulk_callback,
! 	.read_bulk_callback =		digi_read_bulk_callback,
! 	.chars_in_buffer =		digi_chars_in_buffer,
! 	.throttle =			digi_rx_throttle,
! 	.unthrottle =			digi_rx_unthrottle,
! 	.ioctl =			digi_ioctl,
! 	.set_termios =			digi_set_termios,
! 	.break_ctl =			digi_break_ctl,
! 	.startup =			digi_startup,
! 	.shutdown =			digi_shutdown,
  };
  
  
--- 498,552 ----
  /* device info needed for the Digi serial converter */
  
  static struct usb_serial_device_type digi_acceleport_2_device = {
! 	name:				"Digi USB",
! 	id_table:			id_table_2,
! 	needs_interrupt_in:		DONT_CARE,
! 	needs_bulk_in:			MUST_HAVE,
! 	needs_bulk_out:			MUST_HAVE,
! 	num_interrupt_in:		0,
! 	num_bulk_in:			4,
! 	num_bulk_out:			4,
! 	num_ports:			3,
! 	open:				digi_open,
! 	close:				digi_close,
! 	write:				digi_write,
! 	write_room:			digi_write_room,
! 	write_bulk_callback: 		digi_write_bulk_callback,
! 	read_bulk_callback:		digi_read_bulk_callback,
! 	chars_in_buffer:		digi_chars_in_buffer,
! 	throttle:			digi_rx_throttle,
! 	unthrottle:			digi_rx_unthrottle,
! 	ioctl:				digi_ioctl,
! 	set_termios:			digi_set_termios,
! 	break_ctl:			digi_break_ctl,
! 	startup:			digi_startup,
! 	shutdown:			digi_shutdown,
  };
  
  static struct usb_serial_device_type digi_acceleport_4_device = {
! 	name:				"Digi USB",
! 	id_table:			id_table_4,
! 	needs_interrupt_in:		DONT_CARE,
! 	needs_bulk_in:			MUST_HAVE,
! 	needs_bulk_out:			MUST_HAVE,
! 	num_interrupt_in:		0,
! 	num_bulk_in:			5,
! 	num_bulk_out:			5,
! 	num_ports:			4,
! 	open:				digi_open,
! 	close:				digi_close,
! 	write:				digi_write,
! 	write_room:			digi_write_room,
! 	write_bulk_callback: 		digi_write_bulk_callback,
! 	read_bulk_callback:		digi_read_bulk_callback,
! 	chars_in_buffer:		digi_chars_in_buffer,
! 	throttle:			digi_rx_throttle,
! 	unthrottle:			digi_rx_unthrottle,
! 	ioctl:				digi_ioctl,
! 	set_termios:			digi_set_termios,
! 	break_ctl:			digi_break_ctl,
! 	startup:			digi_startup,
! 	shutdown:			digi_shutdown,
  };
  
  
***************
*** 596,607 ****
  {
  
  	unsigned long flags;
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  
  
  	spin_lock_irqsave( &priv->dp_port_lock, flags );
  	digi_wakeup_write( port );
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
  }
  
  static void digi_wakeup_write( struct usb_serial_port *port )
--- 600,612 ----
  {
  
  	unsigned long flags;
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  
  
  	spin_lock_irqsave( &priv->dp_port_lock, flags );
  	digi_wakeup_write( port );
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+ 	MOD_DEC_USE_COUNT;
  }
  
  static void digi_wakeup_write( struct usb_serial_port *port )
***************
*** 642,649 ****
  
  	int ret = 0;
  	int len;
! 	struct usb_serial_port *oob_port = (struct usb_serial_port *)((struct digi_serial *)port->serial->private)->ds_oob_port;
! 	struct digi_port *oob_priv = (struct digi_port *)oob_port->private;
  	unsigned long flags = 0;
  
  
--- 647,654 ----
  
  	int ret = 0;
  	int len;
! 	struct usb_serial_port *oob_port = (struct usb_serial_port *)((digi_serial_t *)port->serial->private)->ds_oob_port;
! 	digi_port_t *oob_priv = (digi_port_t *)oob_port->private;
  	unsigned long flags = 0;
  
  
***************
*** 684,690 ****
  	spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags );
  
  	if( ret ) {
! 		err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__,
  			ret );
  	}
  
--- 689,695 ----
  	spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags );
  
  	if( ret ) {
! 		err( __FUNCTION__ ": usb_submit_urb failed, ret=%d",
  			ret );
  	}
  
***************
*** 711,717 ****
  
  	int ret = 0;
  	int len;
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  	unsigned char *data = port->write_urb->transfer_buffer;
  	unsigned long flags = 0;
  
--- 716,722 ----
  
  	int ret = 0;
  	int len;
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  	unsigned char *data = port->write_urb->transfer_buffer;
  	unsigned long flags = 0;
  
***************
*** 729,735 ****
  	while( count > 0 && ret == 0 ) {
  
  		while( (port->write_urb->status == -EINPROGRESS
! 		|| priv->dp_write_urb_in_use) && time_before(jiffies, timeout)) {
  			cond_wait_interruptible_timeout_irqrestore(
  				&port->write_wait, DIGI_RETRY_TIMEOUT,
  				&priv->dp_port_lock, flags );
--- 734,740 ----
  	while( count > 0 && ret == 0 ) {
  
  		while( (port->write_urb->status == -EINPROGRESS
! 		|| priv->dp_write_urb_in_use) && jiffies < timeout ) {
  			cond_wait_interruptible_timeout_irqrestore(
  				&port->write_wait, DIGI_RETRY_TIMEOUT,
  				&priv->dp_port_lock, flags );
***************
*** 773,779 ****
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
  
  	if( ret ) {
! 		err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
  		ret, priv->dp_port_num );
  	}
  
--- 778,784 ----
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
  
  	if( ret ) {
! 		err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
  		ret, priv->dp_port_num );
  	}
  
***************
*** 797,805 ****
  {
  
  	int ret;
! 	struct digi_port *port_priv = (struct digi_port *)port->private;
! 	struct usb_serial_port *oob_port = (struct usb_serial_port *)((struct digi_serial *)port->serial->private)->ds_oob_port;
! 	struct digi_port *oob_priv = (struct digi_port *)oob_port->private;
  	unsigned char *data = oob_port->write_urb->transfer_buffer;
  	unsigned long flags = 0;
  
--- 802,810 ----
  {
  
  	int ret;
! 	digi_port_t *port_priv = (digi_port_t *)port->private;
! 	struct usb_serial_port *oob_port = (struct usb_serial_port *)((digi_serial_t *)port->serial->private)->ds_oob_port;
! 	digi_port_t *oob_priv = (digi_port_t *)oob_port->private;
  	unsigned char *data = oob_port->write_urb->transfer_buffer;
  	unsigned long flags = 0;
  
***************
*** 849,855 ****
  	spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags );
  
  	if( ret ) {
! 		err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__,
  		ret );
  	}
  
--- 854,860 ----
  	spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags );
  
  	if( ret ) {
! 		err( __FUNCTION__ ": usb_submit_urb failed, ret=%d",
  		ret );
  	}
  
***************
*** 876,882 ****
  
  	int ret;
  	unsigned char buf[2];
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  	unsigned long flags = 0;
  
  
--- 881,887 ----
  
  	int ret;
  	unsigned char buf[2];
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  	unsigned long flags = 0;
  
  
***************
*** 894,900 ****
  
  	spin_lock_irqsave( &priv->dp_port_lock, flags );
  
! 	while( time_before(jiffies, timeout) && !priv->dp_transmit_idle ) {
  		cond_wait_interruptible_timeout_irqrestore(
  			&priv->dp_transmit_idle_wait, DIGI_RETRY_TIMEOUT,
  			&priv->dp_port_lock, flags );
--- 899,905 ----
  
  	spin_lock_irqsave( &priv->dp_port_lock, flags );
  
! 	while( jiffies < timeout && !priv->dp_transmit_idle ) {
  		cond_wait_interruptible_timeout_irqrestore(
  			&priv->dp_transmit_idle_wait, DIGI_RETRY_TIMEOUT,
  			&priv->dp_port_lock, flags );
***************
*** 916,922 ****
  {
  
  	unsigned long flags;
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  
  
  dbg( "digi_rx_throttle: TOP: port=%d", priv->dp_port_num );
--- 921,927 ----
  {
  
  	unsigned long flags;
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  
  
  dbg( "digi_rx_throttle: TOP: port=%d", priv->dp_port_num );
***************
*** 937,943 ****
  	int ret = 0;
  	int len;
  	unsigned long flags;
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  	struct tty_struct *tty = port->tty;
  
  
--- 942,948 ----
  	int ret = 0;
  	int len;
  	unsigned long flags;
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  	struct tty_struct *tty = port->tty;
  
  
***************
*** 970,976 ****
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
  
  	if( ret ) {
! 		err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
  			ret, priv->dp_port_num );
  	}
  
--- 975,981 ----
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
  
  	if( ret ) {
! 		err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
  			ret, priv->dp_port_num );
  	}
  
***************
*** 981,987 ****
  	struct termios *old_termios )
  {
  
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  	unsigned int iflag = port->tty->termios->c_iflag;
  	unsigned int cflag = port->tty->termios->c_cflag;
  	unsigned int old_iflag = old_termios->c_iflag;
--- 986,992 ----
  	struct termios *old_termios )
  {
  
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  	unsigned int iflag = port->tty->termios->c_iflag;
  	unsigned int cflag = port->tty->termios->c_cflag;
  	unsigned int old_iflag = old_termios->c_iflag;
***************
*** 1205,1211 ****
  	unsigned int cmd, unsigned long arg )
  {
  
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  	unsigned int val;
  	unsigned long flags = 0;
  
--- 1210,1216 ----
  	unsigned int cmd, unsigned long arg )
  {
  
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  	unsigned int val;
  	unsigned long flags = 0;
  
***************
*** 1257,1263 ****
  {
  
  	int ret,data_len,new_len;
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  	unsigned char *data = port->write_urb->transfer_buffer;
  	unsigned char user_buf[64];	/* 64 bytes is max USB bulk packet */
  	unsigned long flags = 0;
--- 1262,1268 ----
  {
  
  	int ret,data_len,new_len;
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  	unsigned char *data = port->write_urb->transfer_buffer;
  	unsigned char user_buf[64];	/* 64 bytes is max USB bulk packet */
  	unsigned long flags = 0;
***************
*** 1329,1335 ****
  	/* return length of new data written, or error */
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
  	if( ret < 0 ) {
! 		err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
  			ret, priv->dp_port_num );
  	}
  
--- 1334,1340 ----
  	/* return length of new data written, or error */
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
  	if( ret < 0 ) {
! 		err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
  			ret, priv->dp_port_num );
  	}
  
***************
*** 1344,1370 ****
  
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct usb_serial *serial;
! 	struct digi_port *priv;
  	int ret = 0;
  
  
  dbg( "digi_write_bulk_callback: TOP, urb->status=%d", urb->status );
  
  	/* port and serial sanity check */
! 	if( port == NULL || (priv=(struct digi_port *)(port->private)) == NULL ) {
! 		err("%s: port or port->private is NULL, status=%d", __FUNCTION__,
  			urb->status );
  		return;
  	}
  	serial = port->serial;
  	if( serial == NULL || serial->private == NULL ) {
! 		err("%s: serial or serial->private is NULL, status=%d", __FUNCTION__, urb->status );
  		return;
  	}
  
  	/* handle oob callback */
  	if( priv->dp_port_num
! 	== ((struct digi_serial *)(serial->private))->ds_oob_port_num ) {
  		dbg( "digi_write_bulk_callback: oob callback" );
  		spin_lock( &priv->dp_port_lock );
  		priv->dp_write_urb_in_use = 0;
--- 1349,1375 ----
  
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct usb_serial *serial;
! 	digi_port_t *priv;
  	int ret = 0;
  
  
  dbg( "digi_write_bulk_callback: TOP, urb->status=%d", urb->status );
  
  	/* port and serial sanity check */
! 	if( port == NULL || (priv=(digi_port_t *)(port->private)) == NULL ) {
! 		err( __FUNCTION__ ": port or port->private is NULL, status=%d",
  			urb->status );
  		return;
  	}
  	serial = port->serial;
  	if( serial == NULL || serial->private == NULL ) {
! 		err( __FUNCTION__ ": serial or serial->private is NULL, status=%d", urb->status );
  		return;
  	}
  
  	/* handle oob callback */
  	if( priv->dp_port_num
! 	== ((digi_serial_t *)(serial->private))->ds_oob_port_num ) {
  		dbg( "digi_write_bulk_callback: oob callback" );
  		spin_lock( &priv->dp_port_lock );
  		priv->dp_write_urb_in_use = 0;
***************
*** 1381,1387 ****
  	/* try to send any buffered data on this port, if it is open */
  	spin_lock( &priv->dp_port_lock );
  	priv->dp_write_urb_in_use = 0;
! 	if( port->open_count && port->write_urb->status != -EINPROGRESS
  	&& priv->dp_out_buf_len > 0 ) {
  
  		*((unsigned char *)(port->write_urb->transfer_buffer))
--- 1386,1392 ----
  	/* try to send any buffered data on this port, if it is open */
  	spin_lock( &priv->dp_port_lock );
  	priv->dp_write_urb_in_use = 0;
! 	if( priv->dp_open_count && port->write_urb->status != -EINPROGRESS
  	&& priv->dp_out_buf_len > 0 ) {
  
  		*((unsigned char *)(port->write_urb->transfer_buffer))
***************
*** 1408,1419 ****
  
  	/* also queue up a wakeup at scheduler time, in case we */
  	/* lost the race in write_chan(). */
! 	schedule_task(&priv->dp_wakeup_task);
  
  	spin_unlock( &priv->dp_port_lock );
  
  	if( ret ) {
! 		err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
  			ret, priv->dp_port_num );
  	}
  
--- 1413,1426 ----
  
  	/* also queue up a wakeup at scheduler time, in case we */
  	/* lost the race in write_chan(). */
! 	MOD_INC_USE_COUNT;
! 	if (schedule_task(&priv->dp_wakeup_task) == 0)
! 		MOD_DEC_USE_COUNT;
  
  	spin_unlock( &priv->dp_port_lock );
  
  	if( ret ) {
! 		err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
  			ret, priv->dp_port_num );
  	}
  
***************
*** 1424,1430 ****
  {
  
  	int room;
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  	unsigned long flags = 0;
  
  
--- 1431,1437 ----
  {
  
  	int room;
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  	unsigned long flags = 0;
  
  
***************
*** 1447,1453 ****
  static int digi_chars_in_buffer( struct usb_serial_port *port )
  {
  
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  
  
  	if( port->write_urb->status == -EINPROGRESS
--- 1454,1460 ----
  static int digi_chars_in_buffer( struct usb_serial_port *port )
  {
  
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  
  
  	if( port->write_urb->status == -EINPROGRESS
***************
*** 1468,1479 ****
  
  	int ret;
  	unsigned char buf[32];
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  	struct termios not_termios;
  	unsigned long flags = 0;
  
  
! dbg( "digi_open: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_count );
  
  	/* be sure the device is started up */
  	if( digi_startup_device( port->serial ) != 0 )
--- 1475,1486 ----
  
  	int ret;
  	unsigned char buf[32];
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  	struct termios not_termios;
  	unsigned long flags = 0;
  
  
! dbg( "digi_open: TOP: port=%d, active=%d, open_count=%d", priv->dp_port_num, port->active, priv->dp_open_count );
  
  	/* be sure the device is started up */
  	if( digi_startup_device( port->serial ) != 0 )
***************
*** 1487,1503 ****
--- 1494,1525 ----
  		return( -EAGAIN );
  	}
  
+ 	/* inc module use count before sleeping to wait for closes */
+ 	++priv->dp_open_count;
+ 	MOD_INC_USE_COUNT;
+ 
  	/* wait for a close in progress to finish */
  	while( priv->dp_in_close ) {
  		cond_wait_interruptible_timeout_irqrestore(
  			&priv->dp_close_wait, DIGI_RETRY_TIMEOUT,
  			&priv->dp_port_lock, flags );
  		if( signal_pending(current) ) {
+ 			--priv->dp_open_count;
+ 			MOD_DEC_USE_COUNT;
  			return( -EINTR );
  		}
  		spin_lock_irqsave( &priv->dp_port_lock, flags );
  	}
  
+ 	/* if port is already open, just return */
+ 	/* be sure exactly one open proceeds */
+ 	if( port->active ) {
+ 		spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+ 		return( 0 );
+ 	}
+ 
+ 	/* first open, mark port as active */
+ 	port->active = 1;
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
   
  	/* read modem signals automatically whenever they change */
***************
*** 1534,1548 ****
  	int ret;
  	unsigned char buf[32];
  	struct tty_struct *tty = port->tty;
! 	struct digi_port *priv = (struct digi_port *)port->private;
  	unsigned long flags = 0;
  
  
! dbg( "digi_close: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_count );
  
  
  	/* do cleanup only after final close on this port */
  	spin_lock_irqsave( &priv->dp_port_lock, flags );
  	priv->dp_in_close = 1;
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
  
--- 1556,1579 ----
  	int ret;
  	unsigned char buf[32];
  	struct tty_struct *tty = port->tty;
! 	digi_port_t *priv = (digi_port_t *)port->private;
  	unsigned long flags = 0;
  
  
! dbg( "digi_close: TOP: port=%d, active=%d, open_count=%d", priv->dp_port_num, port->active, priv->dp_open_count );
  
  
  	/* do cleanup only after final close on this port */
  	spin_lock_irqsave( &priv->dp_port_lock, flags );
+ 	if( priv->dp_open_count > 1 ) {
+ 		--priv->dp_open_count;
+ 		MOD_DEC_USE_COUNT;
+ 		spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+ 		return;
+ 	} else if( priv->dp_open_count <= 0 ) {
+ 		spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+ 		return;
+ 	}
  	priv->dp_in_close = 1;
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
  
***************
*** 1613,1620 ****
--- 1644,1654 ----
  	tty->closing = 0;
  
  	spin_lock_irqsave( &priv->dp_port_lock, flags );
+ 	port->active = 0;
  	priv->dp_write_urb_in_use = 0;
  	priv->dp_in_close = 0;
+ 	--priv->dp_open_count;
+ 	MOD_DEC_USE_COUNT;
  	wake_up_interruptible( &priv->dp_close_wait );
  	spin_unlock_irqrestore( &priv->dp_port_lock, flags );
  
***************
*** 1633,1639 ****
  {
  
  	int i,ret = 0;
! 	struct digi_serial *serial_priv = (struct digi_serial *)serial->private;
  	struct usb_serial_port *port;
  
  
--- 1667,1673 ----
  {
  
  	int i,ret = 0;
! 	digi_serial_t *serial_priv = (digi_serial_t *)serial->private;
  	struct usb_serial_port *port;
  
  
***************
*** 1655,1661 ****
  		port->write_urb->dev = port->serial->dev;
  
  		if( (ret=usb_submit_urb(port->read_urb)) != 0 ) {
! 			err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__,
  			ret, i );
  			break;
  		}
--- 1689,1696 ----
  		port->write_urb->dev = port->serial->dev;
  
  		if( (ret=usb_submit_urb(port->read_urb)) != 0 ) {
! 			err(
! 			__FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d",
  			ret, i );
  			break;
  		}
***************
*** 1671,1678 ****
  {
  
  	int i;
! 	struct digi_port *priv;
! 	struct digi_serial *serial_priv;
  
  
  dbg( "digi_startup: TOP" );
--- 1706,1713 ----
  {
  
  	int i;
! 	digi_port_t *priv;
! 	digi_serial_t *serial_priv;
  
  
  dbg( "digi_startup: TOP" );
***************
*** 1681,1691 ****
  	/* number of regular ports + 1 for the out-of-band port */
  	for( i=0; itype->num_ports+1; i++ ) {
  
  		/* allocate port private structure */
  		priv = serial->port[i].private =
! 			(struct digi_port *)kmalloc( sizeof(struct digi_port),
  			GFP_KERNEL );
! 		if( priv == (struct digi_port *)0 ) {
  			while( --i >= 0 )
  				kfree( serial->port[i].private );
  			return( 1 );			/* error */
--- 1716,1728 ----
  	/* number of regular ports + 1 for the out-of-band port */
  	for( i=0; itype->num_ports+1; i++ ) {
  
+ 		serial->port[i].active = 0;
+ 
  		/* allocate port private structure */
  		priv = serial->port[i].private =
! 			(digi_port_t *)kmalloc( sizeof(digi_port_t),
  			GFP_KERNEL );
! 		if( priv == (digi_port_t *)0 ) {
  			while( --i >= 0 )
  				kfree( serial->port[i].private );
  			return( 1 );			/* error */
***************
*** 1699,1704 ****
--- 1736,1742 ----
  		priv->dp_write_urb_in_use = 0;
  		priv->dp_modem_signals = 0;
  		init_waitqueue_head( &priv->dp_modem_change_wait );
+ 		priv->dp_open_count = 0;
  		priv->dp_transmit_idle = 0;
  		init_waitqueue_head( &priv->dp_transmit_idle_wait );
  		priv->dp_throttled = 0;
***************
*** 1718,1726 ****
  
  	/* allocate serial private structure */
  	serial_priv = serial->private =
! 		(struct digi_serial *)kmalloc( sizeof(struct digi_serial),
  		GFP_KERNEL );
! 	if( serial_priv == (struct digi_serial *)0 ) {
  		for( i=0; itype->num_ports+1; i++ )
  			kfree( serial->port[i].private );
  		return( 1 );			/* error */
--- 1756,1764 ----
  
  	/* allocate serial private structure */
  	serial_priv = serial->private =
! 		(digi_serial_t *)kmalloc( sizeof(digi_serial_t),
  		GFP_KERNEL );
! 	if( serial_priv == (digi_serial_t *)0 ) {
  		for( i=0; itype->num_ports+1; i++ )
  			kfree( serial->port[i].private );
  		return( 1 );			/* error */
***************
*** 1741,1746 ****
--- 1779,1786 ----
  {
  
  	int i;
+ 	digi_port_t *priv;
+ 	unsigned long flags;
  
  
  dbg( "digi_shutdown: TOP, in_interrupt()=%d", in_interrupt() );
***************
*** 1751,1756 ****
--- 1791,1807 ----
  		usb_unlink_urb( serial->port[i].write_urb );
  	}
  
+ 	/* dec module use count */
+ 	for( i=0; itype->num_ports; i++ ) {
+ 		priv = serial->port[i].private;
+ 		spin_lock_irqsave( &priv->dp_port_lock, flags );
+ 		while( priv->dp_open_count > 0 ) {
+ 			MOD_DEC_USE_COUNT;
+ 			--priv->dp_open_count;
+ 		}
+ 		spin_unlock_irqrestore( &priv->dp_port_lock, flags );
+ 	}
+ 
  	/* free the private data structures for all ports */
  	/* number of regular ports + 1 for the out-of-band port */
  	for( i=0; itype->num_ports+1; i++ )
***************
*** 1764,1797 ****
  {
  
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
! 	struct digi_port *priv;
  	int ret;
  
  
  dbg( "digi_read_bulk_callback: TOP" );
  
  	/* port sanity check, do not resubmit if port is not valid */
! 	if( port == NULL || (priv=(struct digi_port *)(port->private)) == NULL ) {
! 		err("%s: port or port->private is NULL, status=%d", __FUNCTION__,
  			urb->status );
  		return;
  	}
  	if( port->serial == NULL
  	|| serial_paranoia_check( port->serial, __FUNCTION__ )
  	|| port->serial->private == NULL ) {
! 		err("%s: serial is bad or serial->private is NULL, status=%d", __FUNCTION__, urb->status );
  		return;
  	}
  
  	/* do not resubmit urb if it has any status error */
  	if( urb->status ) {
! 		err("%s: nonzero read bulk status: status=%d, port=%d", __FUNCTION__, urb->status, priv->dp_port_num );
  		return;
  	}
  
  	/* handle oob or inb callback, do not resubmit if error */
  	if( priv->dp_port_num
! 	== ((struct digi_serial *)(port->serial->private))->ds_oob_port_num ) {
  		if( digi_read_oob_callback( urb ) != 0 )
  			return;
  	} else {
--- 1815,1848 ----
  {
  
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
! 	digi_port_t *priv;
  	int ret;
  
  
  dbg( "digi_read_bulk_callback: TOP" );
  
  	/* port sanity check, do not resubmit if port is not valid */
! 	if( port == NULL || (priv=(digi_port_t *)(port->private)) == NULL ) {
! 		err( __FUNCTION__ ": port or port->private is NULL, status=%d",
  			urb->status );
  		return;
  	}
  	if( port->serial == NULL
  	|| serial_paranoia_check( port->serial, __FUNCTION__ )
  	|| port->serial->private == NULL ) {
! 		err( __FUNCTION__ ": serial is bad or serial->private is NULL, status=%d", urb->status );
  		return;
  	}
  
  	/* do not resubmit urb if it has any status error */
  	if( urb->status ) {
! 		err( __FUNCTION__ ": nonzero read bulk status: status=%d, port=%d", urb->status, priv->dp_port_num );
  		return;
  	}
  
  	/* handle oob or inb callback, do not resubmit if error */
  	if( priv->dp_port_num
! 	== ((digi_serial_t *)(port->serial->private))->ds_oob_port_num ) {
  		if( digi_read_oob_callback( urb ) != 0 )
  			return;
  	} else {
***************
*** 1802,1808 ****
  	/* continue read */
  	urb->dev = port->serial->dev;
  	if( (ret=usb_submit_urb(urb)) != 0 ) {
! 		err("%s: failed resubmitting urb, ret=%d, port=%d", __FUNCTION__,
  			ret, priv->dp_port_num );
  	}
  
--- 1853,1859 ----
  	/* continue read */
  	urb->dev = port->serial->dev;
  	if( (ret=usb_submit_urb(urb)) != 0 ) {
! 		err( __FUNCTION__ ": failed resubmitting urb, ret=%d, port=%d",
  			ret, priv->dp_port_num );
  	}
  
***************
*** 1824,1830 ****
  
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct tty_struct *tty = port->tty;
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  	int opcode = ((unsigned char *)urb->transfer_buffer)[0];
  	int len = ((unsigned char *)urb->transfer_buffer)[1];
  	int status = ((unsigned char *)urb->transfer_buffer)[2];
--- 1875,1881 ----
  
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct tty_struct *tty = port->tty;
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  	int opcode = ((unsigned char *)urb->transfer_buffer)[0];
  	int len = ((unsigned char *)urb->transfer_buffer)[1];
  	int status = ((unsigned char *)urb->transfer_buffer)[2];
***************
*** 1838,1849 ****
  
  	/* do not process callbacks on closed ports */
  	/* but do continue the read chain */
! 	if( port->open_count == 0 )
  		return( 0 );
  
  	/* short/multiple packet check */
  	if( urb->actual_length != len + 2 ) {
!      		err("%s: INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, port=%d, opcode=%d, len=%d, actual_length=%d, status=%d", __FUNCTION__, urb->status, priv->dp_port_num, opcode, len, urb->actual_length, status );
  		return( -1 );
  	}
  
--- 1889,1900 ----
  
  	/* do not process callbacks on closed ports */
  	/* but do continue the read chain */
! 	if( priv->dp_open_count == 0 )
  		return( 0 );
  
  	/* short/multiple packet check */
  	if( urb->actual_length != len + 2 ) {
!      		err( __FUNCTION__ ": INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, port=%d, opcode=%d, len=%d, actual_length=%d, status=%d", urb->status, priv->dp_port_num, opcode, len, urb->actual_length, status );
  		return( -1 );
  	}
  
***************
*** 1912,1920 ****
  	spin_unlock( &priv->dp_port_lock );
  
  	if( opcode == DIGI_CMD_RECEIVE_DISABLE ) {
! 		dbg("%s: got RECEIVE_DISABLE", __FUNCTION__ );
  	} else if( opcode != DIGI_CMD_RECEIVE_DATA ) {
! 		dbg("%s: unknown opcode: %d", __FUNCTION__, opcode );
  	}
  
  	return( throttled ? 1 : 0 );
--- 1963,1971 ----
  	spin_unlock( &priv->dp_port_lock );
  
  	if( opcode == DIGI_CMD_RECEIVE_DISABLE ) {
! 		dbg( __FUNCTION__ ": got RECEIVE_DISABLE" );
  	} else if( opcode != DIGI_CMD_RECEIVE_DATA ) {
! 		dbg( __FUNCTION__ ": unknown opcode: %d", opcode );
  	}
  
  	return( throttled ? 1 : 0 );
***************
*** 1936,1942 ****
  
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct usb_serial *serial = port->serial;
! 	struct digi_port *priv = (struct digi_port *)(port->private);
  	int opcode, line, status, val;
  	int i;
  
--- 1987,1993 ----
  
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct usb_serial *serial = port->serial;
! 	digi_port_t *priv = (digi_port_t *)(port->private);
  	int opcode, line, status, val;
  	int i;
  
***************
*** 1972,1978 ****
  			if( val & DIGI_READ_INPUT_SIGNALS_CTS ) {
  				priv->dp_modem_signals |= TIOCM_CTS;
  				/* port must be open to use tty struct */
! 				if( port->open_count
  				&& port->tty->termios->c_cflag & CRTSCTS ) {
  					port->tty->hw_stopped = 0;
  					digi_wakeup_write( port );
--- 2023,2029 ----
  			if( val & DIGI_READ_INPUT_SIGNALS_CTS ) {
  				priv->dp_modem_signals |= TIOCM_CTS;
  				/* port must be open to use tty struct */
! 				if( priv->dp_open_count
  				&& port->tty->termios->c_cflag & CRTSCTS ) {
  					port->tty->hw_stopped = 0;
  					digi_wakeup_write( port );
***************
*** 1980,1986 ****
  			} else {
  				priv->dp_modem_signals &= ~TIOCM_CTS;
  				/* port must be open to use tty struct */
! 				if( port->open_count
  				&& port->tty->termios->c_cflag & CRTSCTS ) {
  					port->tty->hw_stopped = 1;
  				}
--- 2031,2037 ----
  			} else {
  				priv->dp_modem_signals &= ~TIOCM_CTS;
  				/* port must be open to use tty struct */
! 				if( priv->dp_open_count
  				&& port->tty->termios->c_cflag & CRTSCTS ) {
  					port->tty->hw_stopped = 1;
  				}
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/empeg.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/empeg.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/empeg.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/empeg.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 53,67 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
--- 53,70 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
***************
*** 103,109 ****
  static void empeg_write_bulk_callback	(struct urb *urb);
  static void empeg_read_bulk_callback	(struct urb *urb);
  
! static struct usb_device_id id_table [] = {
  	{ USB_DEVICE(EMPEG_VENDOR_ID, EMPEG_PRODUCT_ID) },
  	{ }					/* Terminating entry */
  };
--- 106,112 ----
  static void empeg_write_bulk_callback	(struct urb *urb);
  static void empeg_read_bulk_callback	(struct urb *urb);
  
! static __devinitdata struct usb_device_id id_table [] = {
  	{ USB_DEVICE(EMPEG_VENDOR_ID, EMPEG_PRODUCT_ID) },
  	{ }					/* Terminating entry */
  };
***************
*** 111,136 ****
  MODULE_DEVICE_TABLE (usb, id_table);
  
  static struct usb_serial_device_type empeg_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"Empeg",
! 	.id_table =		id_table,
! 	.num_interrupt_in =	0,
! 	.num_bulk_in =		1,
! 	.num_bulk_out =		1,
! 	.num_ports =		1,
! 	.open =			empeg_open,
! 	.close =		empeg_close,
! 	.throttle =		empeg_throttle,
! 	.unthrottle =		empeg_unthrottle,
! 	.startup =		empeg_startup,
! 	.shutdown =		empeg_shutdown,
! 	.ioctl =		empeg_ioctl,
! 	.set_termios =		empeg_set_termios,
! 	.write =		empeg_write,
! 	.write_room =		empeg_write_room,
! 	.chars_in_buffer =	empeg_chars_in_buffer,
! 	.write_bulk_callback =	empeg_write_bulk_callback,
! 	.read_bulk_callback =	empeg_read_bulk_callback,
  };
  
  #define NUM_URBS			16
--- 114,141 ----
  MODULE_DEVICE_TABLE (usb, id_table);
  
  static struct usb_serial_device_type empeg_device = {
! 	name:			"Empeg",
! 	id_table:		id_table,
! 	needs_interrupt_in:	MUST_HAVE_NOT,	/* must not have an interrupt in endpoint */
! 	needs_bulk_in:		MUST_HAVE,	/* must have a bulk in endpoint */
! 	needs_bulk_out:		MUST_HAVE,	/* must have a bulk out endpoint */
! 	num_interrupt_in:	0,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	open:			empeg_open,
! 	close:			empeg_close,
! 	throttle:		empeg_throttle,
! 	unthrottle:		empeg_unthrottle,
! 	startup:		empeg_startup,
! 	shutdown:		empeg_shutdown,
! 	ioctl:			empeg_ioctl,
! 	set_termios:		empeg_set_termios,
! 	write:			empeg_write,
! 	write_room:		empeg_write_room,
! 	chars_in_buffer:	empeg_chars_in_buffer,
! 	write_bulk_callback:	empeg_write_bulk_callback,
! 	read_bulk_callback:	empeg_read_bulk_callback,
  };
  
  #define NUM_URBS			16
***************
*** 152,182 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	/* Force default termio settings */
! 	empeg_set_termios (port, NULL) ;
  
! 	bytes_in = 0;
! 	bytes_out = 0;
  
! 	/* Start reading from the device */
! 	FILL_BULK_URB(
! 		port->read_urb,
! 		serial->dev, 
! 		usb_rcvbulkpipe(serial->dev,
! 			port->bulk_in_endpointAddress),
! 		port->read_urb->transfer_buffer,
! 		port->read_urb->transfer_buffer_length,
! 		empeg_read_bulk_callback,
! 		port);
  
! 	port->read_urb->transfer_flags |= USB_QUEUE_BULK;
  
! 	result = usb_submit_urb(port->read_urb);
  
! 	if (result)
! 		err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
  
  	return result;
  }
--- 157,199 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
! 	down (&port->sem);
  
! 	++port->open_count;
! 	MOD_INC_USE_COUNT;
  
! 	if (!port->active) {
  
! 		/* Force default termio settings */
! 		empeg_set_termios (port, NULL) ;
! 
! 		port->active = 1;
! 		bytes_in = 0;
! 		bytes_out = 0;
! 
! 		/* Start reading from the device */
! 		FILL_BULK_URB(
! 			port->read_urb,
! 			serial->dev, 
! 			usb_rcvbulkpipe(serial->dev,
! 				port->bulk_in_endpointAddress),
! 			port->read_urb->transfer_buffer,
! 			port->read_urb->transfer_buffer_length,
! 			empeg_read_bulk_callback,
! 			port);
  
! 		port->read_urb->transfer_flags |= USB_QUEUE_BULK;
  
! 		result = usb_submit_urb(port->read_urb);
! 
! 		if (result)
! 			err(__FUNCTION__ " - failed submitting read urb, error %d", result);
! 
! 	}
! 
! 	up (&port->sem);
  
  	return result;
  }
***************
*** 189,206 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
  		return;
  
! 	if (serial->dev) {
! 		/* shutdown our bulk read */
! 		usb_unlink_urb (port->read_urb);
  	}
  	/* Uncomment the following line if you want to see some statistics in your syslog */
  	/* info ("Bytes In = %d  Bytes Out = %d", bytes_in, bytes_out); */
  }
  
  
--- 206,236 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
  		return;
  
! 	down (&port->sem);
! 
! 	--port->open_count;
! 
! 	if (port->open_count <= 0) {
! 		if (serial->dev) {
! 			/* shutdown our bulk read */
! 			usb_unlink_urb (port->read_urb);
! 		}
! 		port->active = 0;
! 		port->open_count = 0;
  	}
+ 
+ 	up (&port->sem);
+ 
  	/* Uncomment the following line if you want to see some statistics in your syslog */
  	/* info ("Bytes In = %d  Bytes Out = %d", bytes_in, bytes_out); */
+ 
+ 	MOD_DEC_USE_COUNT;
  }
  
  
***************
*** 215,221 ****
  	int bytes_sent = 0;
  	int transfer_size;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	usb_serial_debug_data (__FILE__, __FUNCTION__, count, buf);
  
--- 245,251 ----
  	int bytes_sent = 0;
  	int transfer_size;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	usb_serial_debug_data (__FILE__, __FUNCTION__, count, buf);
  
***************
*** 236,249 ****
  		spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  
  		if (urb == NULL) {
! 			dbg("%s - no more free urbs", __FUNCTION__);
  			goto exit;
  		}
  
  		if (urb->transfer_buffer == NULL) {
! 			urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
  			if (urb->transfer_buffer == NULL) {
! 				err("%s no more kernel memory...", __FUNCTION__);
  				goto exit;
  			}
  		}
--- 266,279 ----
  		spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  
  		if (urb == NULL) {
! 			dbg (__FUNCTION__ " - no more free urbs");
  			goto exit;
  		}
  
  		if (urb->transfer_buffer == NULL) {
! 			urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
  			if (urb->transfer_buffer == NULL) {
! 				err(__FUNCTION__" no more kernel memory...");
  				goto exit;
  			}
  		}
***************
*** 275,281 ****
  		/* send it down the pipe */
  		status = usb_submit_urb(urb);
  		if (status) {
! 			err("%s - usb_submit_urb(write bulk) failed with status = %d", __FUNCTION__, status);
  			bytes_sent = status;
  			break;
  		}
--- 305,311 ----
  		/* send it down the pipe */
  		status = usb_submit_urb(urb);
  		if (status) {
! 			err(__FUNCTION__ " - usb_submit_urb(write bulk) failed with status = %d", status);
  			bytes_sent = status;
  			break;
  		}
***************
*** 299,305 ****
  	int i;
  	int room = 0;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	spin_lock_irqsave (&write_urb_pool_lock, flags);
  
--- 329,335 ----
  	int i;
  	int room = 0;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	spin_lock_irqsave (&write_urb_pool_lock, flags);
  
***************
*** 312,318 ****
  
  	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  
! 	dbg("%s - returns %d", __FUNCTION__, room);
  
  	return (room);
  
--- 342,348 ----
  
  	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  
! 	dbg(__FUNCTION__ " - returns %d", room);
  
  	return (room);
  
***************
*** 325,331 ****
  	int i;
  	int chars = 0;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	spin_lock_irqsave (&write_urb_pool_lock, flags);
  
--- 355,361 ----
  	int i;
  	int chars = 0;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	spin_lock_irqsave (&write_urb_pool_lock, flags);
  
***************
*** 338,344 ****
  
  	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  
! 	dbg("%s - returns %d", __FUNCTION__, chars);
  
  	return (chars);
  
--- 368,374 ----
  
  	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  
! 	dbg (__FUNCTION__ " - returns %d", chars);
  
  	return (chars);
  
***************
*** 352,361 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (urb->status) {
! 		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
--- 382,391 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
  		return;
  	}
  
***************
*** 379,393 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
--- 409,423 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
  		return;
  	}
  
***************
*** 429,435 ****
  	result = usb_submit_urb(port->read_urb);
  
  	if (result)
! 		err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
  
  	return;
  
--- 459,465 ----
  	result = usb_submit_urb(port->read_urb);
  
  	if (result)
! 		err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
  
  	return;
  
***************
*** 438,445 ****
  
  static void empeg_throttle (struct usb_serial_port *port)
  {
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	usb_unlink_urb (port->read_urb);
  }
  
  
--- 468,483 ----
  
  static void empeg_throttle (struct usb_serial_port *port)
  {
! 	dbg(__FUNCTION__ " - port %d", port->number);
! 
! 	down (&port->sem);
! 
  	usb_unlink_urb (port->read_urb);
+ 
+ 	up (&port->sem);
+ 
+ 	return;
+ 
  }
  
  
***************
*** 447,471 ****
  {
  	int result;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	port->read_urb->dev = port->serial->dev;
  
  	result = usb_submit_urb(port->read_urb);
  
  	if (result)
! 		err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
  
  	return;
  }
  
  
  static int  empeg_startup (struct usb_serial *serial)
  {
  
! 	dbg("%s", __FUNCTION__);
  
! 	dbg("%s - Set config to 1", __FUNCTION__);
  	usb_set_configuration (serial->dev, 1);
  
  	/* continue on with initialization */
--- 485,514 ----
  {
  	int result;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
! 
! 	down (&port->sem);
  
  	port->read_urb->dev = port->serial->dev;
  
  	result = usb_submit_urb(port->read_urb);
  
  	if (result)
! 		err(__FUNCTION__ " - failed submitting read urb, error %d", result);
! 
! 	up (&port->sem);
  
  	return;
+ 
  }
  
  
  static int  empeg_startup (struct usb_serial *serial)
  {
  
! 	dbg(__FUNCTION__);
  
! 	dbg(__FUNCTION__ " - Set config to 1");
  	usb_set_configuration (serial->dev, 1);
  
  	/* continue on with initialization */
***************
*** 476,488 ****
  
  static void empeg_shutdown (struct usb_serial *serial)
  {
! 	dbg ("%s", __FUNCTION__);
  }
  
  
  static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
  {
! 	dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
  
  	return -ENOIOCTLCMD;
  }
--- 519,541 ----
  
  static void empeg_shutdown (struct usb_serial *serial)
  {
! 	int i;
! 
! 	dbg (__FUNCTION__);
! 
! 	/* stop reads and writes on all ports */
! 	for (i=0; i < serial->num_ports; ++i) {
! 		while (serial->port[i].open_count > 0) {
! 			empeg_close (&serial->port[i], NULL);
! 		}
! 	}
! 
  }
  
  
  static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
  {
! 	dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
  
  	return -ENOIOCTLCMD;
  }
***************
*** 491,500 ****
  static void empeg_set_termios (struct usb_serial_port *port, struct termios *old_termios)
  {
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if ((!port->tty) || (!port->tty->termios)) {
! 		dbg("%s - no tty structures", __FUNCTION__);
  		return;
  	}
  
--- 544,553 ----
  static void empeg_set_termios (struct usb_serial_port *port, struct termios *old_termios)
  {
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if ((!port->tty) || (!port->tty->termios)) {
! 		dbg(__FUNCTION__" - no tty structures");
  		return;
  	}
  
***************
*** 571,578 ****
  		urb->transfer_buffer = NULL;
  		urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
  		if (!urb->transfer_buffer) {
! 			err("%s - out of memory for urb buffers.", 
! 			    __FUNCTION__);
  			continue;
  		}
  	}
--- 624,630 ----
  		urb->transfer_buffer = NULL;
  		urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
  		if (!urb->transfer_buffer) {
! 			err (__FUNCTION__ " - out of memory for urb buffers.");
  			continue;
  		}
  	}
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/ftdi_sio.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/ftdi_sio.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/ftdi_sio.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/ftdi_sio.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 4,11 ****
   * 	Copyright (C) 1999 - 2001
   * 	    Greg Kroah-Hartman (greg@kroah.com)
   *          Bill Ryder (bryder@sgi.com)
-  *	Copyright (C) 2002
-  *	    Kuba Ober (kuba@mareimbrium.org)
   *
   * 	This program is free software; you can redistribute it and/or modify
   * 	it under the terms of the GNU General Public License as published by
--- 4,9 ----
***************
*** 15,77 ****
   * See Documentation/usb/usb-serial.txt for more information on using this driver
   *
   * See http://ftdi-usb-sio.sourceforge.net for upto date testing info
!  *	and extra documentation
!  *
!  * (25/Jul/2002) Bill Ryder inserted Dmitri's TIOCMIWAIT patch
!  *      Not tested by me but it doesn't break anything I use.
   * 
-  * (04/Jan/2002) Kuba Ober
-  *	Implemented 38400 baudrate kludge, where it can be substituted with other
-  *	  values. That's the only way to set custom baudrates.
-  *	Implemented TIOCSSERIAL, TIOCGSERIAL ioctl's so that setserial is happy.
-  *	FIXME: both baudrate things should eventually go to usbserial.c as other
-  *	  devices may need that functionality too. Actually, it can probably be
-  *	  merged in serial.c somehow - too many drivers repeat this code over
-  *	  and over.
-  *	Fixed baudrate forgetfulness - open() used to reset baudrate to 9600 every time.
-  *	Divisors for baudrates are calculated by a macro.
-  *	Small code cleanups. Ugly whitespace changes for Plato's sake only ;-].
-  *
   * (04/Nov/2001) Bill Ryder
!  *	Fixed bug in read_bulk_callback where incorrect urb buffer was used.
!  *	Cleaned up write offset calculation
!  *	Added write_room since default values can be incorrect for sio
!  *	Changed write_bulk_callback to use same queue_task as other drivers
!  *        (the previous version caused panics)
!  *	Removed port iteration code since the device only has one I/O port and it
!  *	  was wrong anyway.
   * 
   * (31/May/2001) gkh
!  *	Switched from using spinlock to a semaphore, which fixes lots of problems.
   *
   * (23/May/2001)   Bill Ryder
!  *	Added runtime debug patch (thanx Tyson D Sawyer).
!  *	Cleaned up comments for 8U232
!  *	Added parity, framing and overrun error handling
!  *	Added receive break handling.
   * 
   * (04/08/2001) gb
   *	Identify version on module load.
   *       
   * (18/March/2001) Bill Ryder
!  *	(Not released)
!  *	Added send break handling. (requires kernel patch too)
!  *	Fixed 8U232AM hardware RTS/CTS etc status reporting.
!  *	Added flipbuf fix copied from generic device
   * 
   * (12/3/2000) Bill Ryder
!  *	Added support for 8U232AM device.
!  *	Moved PID and VIDs into header file only.
!  *	Turned on low-latency for the tty (device will do high baudrates)
!  *	Added shutdown routine to close files when device removed.
!  *	More debug and error message cleanups.
   *
   * (11/13/2000) Bill Ryder
!  *	Added spinlock protected open code and close code.
!  *	Multiple opens work (sort of - see webpage mentioned above).
!  *	Cleaned up comments. Removed multiple PID/VID definitions.
!  *	Factorised cts/dtr code
!  *	Made use of __FUNCTION__ in dbg's
   *      
   * (11/01/2000) Adam J. Richter
   *	usb_device_id table support
--- 13,61 ----
   * See Documentation/usb/usb-serial.txt for more information on using this driver
   *
   * See http://ftdi-usb-sio.sourceforge.net for upto date testing info
!  *     and extra documentation
   * 
   * (04/Nov/2001) Bill Ryder
!  *     Fixed bug in read_bulk_callback where incorrect urb buffer was used.
!  *     cleaned up write offset calculation
!  *     added write_room since default values can be incorrect for sio
!  *     changed write_bulk_callback to use same queue_task as other drivers
!  *       (the previous version caused panics)
!  *     Removed port iteration code since the device only has one I/O port and it 
!  *       was wrong anyway.
   * 
   * (31/May/2001) gkh
!  *	switched from using spinlock to a semaphore, which fixes lots of problems.
   *
   * (23/May/2001)   Bill Ryder
!  *     Added runtime debug patch (thanx Tyson D Sawyer).
!  *     Cleaned up comments for 8U232
!  *     Added parity, framing and overrun error handling
!  *     Added receive break handling.
   * 
   * (04/08/2001) gb
   *	Identify version on module load.
   *       
   * (18/March/2001) Bill Ryder
!  *     (Not released)
!  *     Added send break handling. (requires kernel patch too)
!  *     Fixed 8U232AM hardware RTS/CTS etc status reporting.
!  *     Added flipbuf fix copied from generic device
   * 
   * (12/3/2000) Bill Ryder
!  *     Added support for 8U232AM device.
!  *     Moved PID and VIDs into header file only.
!  *     Turned on low-latency for the tty (device will do high baudrates)
!  *     Added shutdown routine to close files when device removed.
!  *     More debug and error message cleanups.
!  *     
   *
   * (11/13/2000) Bill Ryder
!  *     Added spinlock protected open code and close code.
!  *     Multiple opens work (sort of - see webpage mentioned above).
!  *     Cleaned up comments. Removed multiple PID/VID definitions.
!  *     Factorised cts/dtr code
!  *     Made use of __FUNCTION__ in dbg's
   *      
   * (11/01/2000) Adam J. Richter
   *	usb_device_id table support
***************
*** 88,103 ****
   *	driver is a loadable module now.
   *
   * (04/04/2000) Bill Ryder 
!  *	Fixed bugs in TCGET/TCSET ioctls (by removing them - they are
   *        handled elsewhere in the tty io driver chain).
   *
   * (03/30/2000) Bill Ryder 
!  *	Implemented lots of ioctls
!  *	Fixed a race condition in write
!  *	Changed some dbg's to errs
   *
   * (03/26/2000) gkh
!  *	Split driver up into device specific pieces.
   *
   */
  
--- 72,87 ----
   *	driver is a loadable module now.
   *
   * (04/04/2000) Bill Ryder 
!  *      Fixed bugs in TCGET/TCSET ioctls (by removing them - they are 
   *        handled elsewhere in the tty io driver chain).
   *
   * (03/30/2000) Bill Ryder 
!  *      Implemented lots of ioctls
!  * 	Fixed a race condition in write
!  * 	Changed some dbg's to errs
   *
   * (03/26/2000) gkh
!  * 	Split driver up into device specific pieces.
   *
   */
  
***************
*** 106,124 ****
  /*   to talk to the device */
  /* Thanx to gkh and the rest of the usb dev group for all code I have assimilated :-) */
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
- #include 
  #ifdef CONFIG_USB_SERIAL_DEBUG
  	static int debug = 1;
  #else
--- 90,111 ----
  /*   to talk to the device */
  /* Thanx to gkh and the rest of the usb dev group for all code I have assimilated :-) */
  
+ 
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #ifdef CONFIG_USB_SERIAL_DEBUG
  	static int debug = 1;
  #else
***************
*** 128,159 ****
  #include "usb-serial.h"
  #include "ftdi_sio.h"
  
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.2.1"
! #define DRIVER_AUTHOR "Greg Kroah-Hartman , Bill Ryder , Kuba Ober "
! #define DRIVER_DESC "USB FTDI Serial Converters Driver"
  
! static struct usb_device_id id_table_sio [] = {
  	{ USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
  	{ }						/* Terminating entry */
  };
  
! /*
!  * The 8U232AM has the same API as the sio except for:
!  * - it can support MUCH higher baudrates; up to:
!  *   o 921600 for RS232 and 2000000 for RS422/485 at 48MHz
!  *   o 230400 at 12MHz
!  *   so .. 8U232AM's baudrate setting codes are different
!  * - it has a two byte status code.
!  * - it returns characters every 16ms (the FTDI does it every 40ms)
!  */
  
! 
! static struct usb_device_id id_table_8U232AM [] = {
  	{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
- 	{ USB_DEVICE(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID) },
  	{ }						/* Terminating entry */
  };
  
--- 115,143 ----
  #include "usb-serial.h"
  #include "ftdi_sio.h"
  
+ 
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.2.0"
! #define DRIVER_AUTHOR "Greg Kroah-Hartman , Bill Ryder "
! #define DRIVER_DESC "USB FTDI RS232 Converters Driver"
  
! static __devinitdata struct usb_device_id id_table_sio [] = {
  	{ USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
  	{ }						/* Terminating entry */
  };
  
! /* THe 8U232AM has the same API as the sio except for:
!    - it can support MUCH higher baudrates (921600 at 48MHz/230400 
!      at 12MHz so .. it's baudrate setting codes are different 
!    - it has a two byte status code.
!    - it returns characters very 16ms (the FTDI does it every 40ms)
!   */
  
!    
! static __devinitdata struct usb_device_id id_table_8U232AM [] = {
  	{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
  	{ }						/* Terminating entry */
  };
  
***************
*** 161,264 ****
  static __devinitdata struct usb_device_id id_table_combined [] = {
  	{ USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
  	{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
- 	{ USB_DEVICE(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID) },
  	{ }						/* Terminating entry */
  };
  
  MODULE_DEVICE_TABLE (usb, id_table_combined);
  
  struct ftdi_private {
! 	ftdi_chip_type_t chip_type;
! 				/* type of the device, either SIO or FT8U232AM */
! 	int baud_base;		/* baud base clock for divisor setting */
! 	int custom_divisor;	/* custom_divisor kludge, this is for baud_base (different from what goes to the chip!) */
! 	__u16 last_set_data_urb_value ;
! 				/* the last data state set - needed for doing a break */
!         int write_offset;       /* This is the offset in the usb data block to write the serial data - 
! 				 * it is different between devices
! 				 */
! 	int flags;		/* some ASYNC_xxxx flags are supported */
!         wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */
!  	char prev_status, diff_status;        /* Used for TIOCMIWAIT */
  };
- 
- /* Used for TIOCMIWAIT */
- #define FTDI_STATUS_B0_MASK	(FTDI_RS0_CTS | FTDI_RS0_DSR | FTDI_RS0_RI | FTDI_RS0_RLSD)
- #define FTDI_STATUS_B1_MASK	(FTDI_RS_BI)
- /* End TIOCMIWAIT */
- 
- #define FTDI_IMPL_ASYNC_FLAGS = ( ASYNC_SPD_HI | ASYNC_SPD_VHI \
-  ASYNC_SPD_CUST | ASYNC_SPD_SHI | ASYNC_SPD_WARP )
- 
  /* function prototypes for a FTDI serial converter */
! static int  ftdi_SIO_startup		(struct usb_serial *serial);
  static int  ftdi_8U232AM_startup	(struct usb_serial *serial);
! static void ftdi_shutdown		(struct usb_serial *serial);
! static int  ftdi_open			(struct usb_serial_port *port, struct file *filp);
! static void ftdi_close			(struct usb_serial_port *port, struct file *filp);
! static int  ftdi_write			(struct usb_serial_port *port, int from_user, const unsigned char *buf, int count);
! static int  ftdi_write_room		(struct usb_serial_port *port);
! static void ftdi_write_bulk_callback	(struct urb *urb);
! static void ftdi_read_bulk_callback	(struct urb *urb);
! static void ftdi_set_termios		(struct usb_serial_port *port, struct termios * old);
! static int  ftdi_ioctl			(struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
! static void ftdi_break_ctl		(struct usb_serial_port *port, int break_state );
! 
! static struct usb_serial_device_type ftdi_SIO_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"FTDI SIO",
! 	.id_table =		id_table_sio,
! 	.num_interrupt_in =	0,
! 	.num_bulk_in =		1,
! 	.num_bulk_out =		1,
! 	.num_ports =		1,
! 	.open =			ftdi_open,
! 	.close =		ftdi_close,
! 	.write =		ftdi_write,
! 	.write_room =		ftdi_write_room,
! 	.read_bulk_callback =	ftdi_read_bulk_callback,
! 	.write_bulk_callback =	ftdi_write_bulk_callback,
! 	.ioctl =		ftdi_ioctl,
! 	.set_termios =		ftdi_set_termios,
! 	.break_ctl =		ftdi_break_ctl,
! 	.startup =		ftdi_SIO_startup,
! 	.shutdown =		ftdi_shutdown,
  };
  
  static struct usb_serial_device_type ftdi_8U232AM_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"FTDI 8U232AM",
! 	.id_table =		id_table_8U232AM,
! 	.num_interrupt_in =	0,
! 	.num_bulk_in =		1,
! 	.num_bulk_out =		1,
! 	.num_ports =		1,
! 	.open =			ftdi_open,
! 	.close =		ftdi_close,
! 	.write =		ftdi_write,
! 	.write_room =		ftdi_write_room,
! 	.read_bulk_callback =	ftdi_read_bulk_callback,
! 	.write_bulk_callback =	ftdi_write_bulk_callback,
! 	.ioctl =		ftdi_ioctl,
! 	.set_termios =		ftdi_set_termios,
! 	.break_ctl =		ftdi_break_ctl,
! 	.startup =		ftdi_8U232AM_startup,
! 	.shutdown =		ftdi_shutdown,
  };
  
- #define WDR_TIMEOUT (HZ * 5 ) /* default urb timeout */
- 
- #define HIGH 1
- #define LOW 0
  
  /*
   * ***************************************************************************
!  * Utlity functions
   * ***************************************************************************
   */
  
  
! static int set_rts(struct usb_device *dev,
  		   unsigned int pipe,
  		   int high_or_low)
  {
--- 145,237 ----
  static __devinitdata struct usb_device_id id_table_combined [] = {
  	{ USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
  	{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
  	{ }						/* Terminating entry */
  };
  
  MODULE_DEVICE_TABLE (usb, id_table_combined);
  
+ 
  struct ftdi_private {
! 	ftdi_type_t ftdi_type;
! 	__u16 last_set_data_urb_value ; /* the last data state set - needed for doing a break */
!         int write_offset;
  };
  /* function prototypes for a FTDI serial converter */
! static int  ftdi_sio_startup		(struct usb_serial *serial);
  static int  ftdi_8U232AM_startup	(struct usb_serial *serial);
! static void ftdi_sio_shutdown		(struct usb_serial *serial);
! static int  ftdi_sio_open		(struct usb_serial_port *port, struct file *filp);
! static void ftdi_sio_close		(struct usb_serial_port *port, struct file *filp);
! static int  ftdi_sio_write		(struct usb_serial_port *port, int from_user, const unsigned char *buf, int count);
! static int  ftdi_sio_write_room		(struct usb_serial_port *port);
! static void ftdi_sio_write_bulk_callback (struct urb *urb);
! static void ftdi_sio_read_bulk_callback	(struct urb *urb);
! static void ftdi_sio_set_termios	(struct usb_serial_port *port, struct termios * old);
! static int  ftdi_sio_ioctl		(struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
! static void ftdi_sio_break_ctl		(struct usb_serial_port *port, int break_state );
! 
! /* Should rename most ftdi_sio's to ftdi_ now since there are two devices 
!    which share common code */ 
! 
! static struct usb_serial_device_type ftdi_sio_device = {
! 	name:			"FTDI SIO",
! 	id_table:		id_table_sio,
! 	needs_interrupt_in:	MUST_HAVE_NOT,
! 	needs_bulk_in:		MUST_HAVE,
! 	needs_bulk_out:		MUST_HAVE,
! 	num_interrupt_in:	0,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	open:			ftdi_sio_open,
! 	close:			ftdi_sio_close,
! 	write:			ftdi_sio_write,
! 	write_room:		ftdi_sio_write_room,
! 	read_bulk_callback:	ftdi_sio_read_bulk_callback,
! 	write_bulk_callback:	ftdi_sio_write_bulk_callback,
! 	ioctl:			ftdi_sio_ioctl,
! 	set_termios:		ftdi_sio_set_termios,
! 	break_ctl:		ftdi_sio_break_ctl,
! 	startup:		ftdi_sio_startup,
!         shutdown:               ftdi_sio_shutdown,
  };
  
  static struct usb_serial_device_type ftdi_8U232AM_device = {
! 	name:			"FTDI 8U232AM",
! 	id_table:		id_table_8U232AM,
! 	needs_interrupt_in:	DONT_CARE,
! 	needs_bulk_in:		MUST_HAVE,
! 	needs_bulk_out:		MUST_HAVE,
! 	num_interrupt_in:	0,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	open:			ftdi_sio_open,
! 	close:			ftdi_sio_close,
! 	write:			ftdi_sio_write,
! 	write_room:		ftdi_sio_write_room,
! 	read_bulk_callback:	ftdi_sio_read_bulk_callback,
! 	write_bulk_callback:	ftdi_sio_write_bulk_callback,
! 	ioctl:			ftdi_sio_ioctl,
! 	set_termios:		ftdi_sio_set_termios,
! 	break_ctl:		ftdi_sio_break_ctl,
! 	startup:		ftdi_8U232AM_startup,
!         shutdown:               ftdi_sio_shutdown,
  };
  
  
  /*
   * ***************************************************************************
!  * FTDI SIO Serial Converter specific driver functions
   * ***************************************************************************
   */
  
+ #define WDR_TIMEOUT (HZ * 5 ) /* default urb timeout */
  
! /* utility functions to set and unset dtr and rts */
! #define HIGH 1
! #define LOW 0
! static int set_rts(struct usb_device *dev, 
  		   unsigned int pipe,
  		   int high_or_low)
  {
***************
*** 271,281 ****
  			       ftdi_high_or_low, 0, 
  			       buf, 0, WDR_TIMEOUT));
  }
! 
! 
! static int set_dtr(struct usb_device *dev,
!                    unsigned int pipe,
!                    int high_or_low)
  {
  	static char buf[1];
  	unsigned ftdi_high_or_low = (high_or_low? FTDI_SIO_SET_DTR_HIGH : 
--- 244,252 ----
  			       ftdi_high_or_low, 0, 
  			       buf, 0, WDR_TIMEOUT));
  }
! static int set_dtr(struct usb_device *dev, 
! 		   unsigned int pipe,
! 		   int high_or_low)
  {
  	static char buf[1];
  	unsigned ftdi_high_or_low = (high_or_low? FTDI_SIO_SET_DTR_HIGH : 
***************
*** 288,525 ****
  }
  
  
- static __u16 get_ftdi_divisor(struct usb_serial_port * port);
- 
  
! static int change_speed(struct usb_serial_port *port)
  {
! 	char buf[1];
!         __u16 urb_value;
! 
! 	urb_value = get_ftdi_divisor(port);
  	
- 	return (usb_control_msg(port->serial->dev,
- 			    usb_sndctrlpipe(port->serial->dev, 0),
- 			    FTDI_SIO_SET_BAUDRATE_REQUEST,
- 			    FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
- 			    urb_value, 0,
- 			    buf, 0, 100) < 0);
- }
- 
- 
- static __u16 get_ftdi_divisor(struct usb_serial_port * port)
- { /* get_ftdi_divisor */
  	
- 	struct ftdi_private * priv = (struct ftdi_private *)port->private;
- 	__u16 urb_value = 0;
- 	int baud;
- 
- 	/*
- 	 * The logic involved in setting the baudrate can be cleanly split in 3 steps.
- 	 * Obtaining the actual baud rate is a little tricky since unix traditionally
- 	 * somehow ignored the possibility to set non-standard baud rates.
- 	 * 1. Standard baud rates are set in tty->termios->c_cflag
- 	 * 2. If these are not enough, you can set any speed using alt_speed as follows:
- 	 *    - set tty->termios->c_cflag speed to B38400
- 	 *    - set your real speed in tty->alt_speed; it gets ignored when
- 	 *      alt_speed==0, (or)
- 	 *    - call TIOCSSERIAL ioctl with (struct serial_struct) set as follows:
- 	 *      flags & ASYNC_SPD_MASK == ASYNC_SPD_[HI, VHI, SHI, WARP], this just
- 	 *      sets alt_speed to (HI: 57600, VHI: 115200, SHI: 230400, WARP: 460800)
- 	 * ** Steps 1, 2 are done courtesy of tty_get_baud_rate
- 	 * 3. You can also set baud rate by setting custom divisor as follows
- 	 *    - set tty->termios->c_cflag speed to B38400
- 	 *    - call TIOCSSERIAL ioctl with (struct serial_struct) set as follows:
- 	 *      o flags & ASYNC_SPD_MASK == ASYNC_SPD_CUST
- 	 *      o custom_divisor set to baud_base / your_new_baudrate
- 	 * ** Step 3 is done courtesy of code borrowed from serial.c - I should really
- 	 *    spend some time and separate+move this common code to serial.c, it is
- 	 *    replicated in nearly every serial driver you see.
- 	 */
- 
- 	/* 1. Get the baud rate from the tty settings, this observes alt_speed hack */
- 
- 	baud = tty_get_baud_rate(port->tty);
- 	dbg("%s - tty_get_baud_rate reports speed %d", __FUNCTION__, baud);
- 
- 	/* 2. Observe async-compatible custom_divisor hack, update baudrate if needed */
- 
- 	if (baud == 38400 &&
- 	    ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) &&
- 	     (priv->custom_divisor)) {
- 		baud = priv->baud_base / priv->custom_divisor;
- 		dbg("%s - custom divisor %d sets baud rate to %d", __FUNCTION__, priv->custom_divisor, baud);
- 	}
- 
- 	/* 3. Convert baudrate to device-specific divisor */
- 
- 	if (!baud) baud = 9600;	
- 	switch(priv->chip_type) {
- 	case SIO: /* SIO chip */
- 		switch(baud) {
- 		case 300: urb_value = ftdi_sio_b300; break;
- 		case 600: urb_value = ftdi_sio_b600; break;
- 		case 1200: urb_value = ftdi_sio_b1200; break;
- 		case 2400: urb_value = ftdi_sio_b2400; break;
- 		case 4800: urb_value = ftdi_sio_b4800; break;
- 		case 9600: urb_value = ftdi_sio_b9600; break;
- 		case 19200: urb_value = ftdi_sio_b19200; break;
- 		case 38400: urb_value = ftdi_sio_b38400; break;
- 		case 57600: urb_value = ftdi_sio_b57600;  break;
- 		case 115200: urb_value = ftdi_sio_b115200; break;
- 		} /* baud */
- 		if (urb_value == 0)
- 			dbg("%s - Baudrate (%d) requested is not supported", __FUNCTION__,  baud);
- 		break;
- 	case FT8U232AM: /* 8U232AM chip */
- 		if (baud <= 3000000) {
- 			urb_value = FTDI_SIO_BAUD_TO_DIVISOR(baud);
- 		} else {
- 	                dbg("%s - Baud rate too high!", __FUNCTION__);
- 		}
- 		break;
- 	} /* priv->chip_type */
- 
- 	if (urb_value == 0) {
- 		urb_value = ftdi_sio_b9600;
- 	} else {
- 		dbg("%s - Baud rate set to %d (divisor %d) on chip %s", __FUNCTION__, baud, urb_value, (priv->chip_type == SIO) ? "SIO" : "FT8U232AM" );
- 	}
- 
- 	return(urb_value);
- }
- 
- 
- static int get_serial_info(struct usb_serial_port * port, struct serial_struct * retinfo)
- {
- 	struct ftdi_private * priv = (struct ftdi_private*) port->private;
- 	struct serial_struct tmp;
- 
- 	if (!retinfo)
- 		return -EFAULT;
- 	memset(&tmp, 0, sizeof(tmp));
- 	tmp.flags = priv->flags;
- 	tmp.baud_base = priv->baud_base;
- 	tmp.custom_divisor = priv->custom_divisor;
- 	if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
- 		return -EFAULT;
- 	return 0;
- } /* get_serial_info */
- 
- 
- static int set_serial_info(struct usb_serial_port * port, struct serial_struct * newinfo)
- { /* set_serial_info */
- 	struct ftdi_private * priv = (struct ftdi_private *) port->private;
- 	struct serial_struct new_serial;
- 	struct ftdi_private old_priv;
- 
- 	if (copy_from_user(&new_serial, newinfo, sizeof(new_serial)))
- 		return -EFAULT;
- 	old_priv = * priv;
- 
- 	/* Do error checking and permission checking */
- 
- 	if (!capable(CAP_SYS_ADMIN)) {
- 		if (((new_serial.flags & ~ASYNC_USR_MASK) !=
- 		     (priv->flags & ~ASYNC_USR_MASK)))
- 			return -EPERM;
- 		priv->flags = ((priv->flags & ~ASYNC_USR_MASK) |
- 			       (new_serial.flags & ASYNC_USR_MASK));
- 		priv->custom_divisor = new_serial.custom_divisor;
- 		goto check_and_exit;
- 	}
- 
- 	if ((new_serial.baud_base != priv->baud_base) ||
- 	    (new_serial.baud_base < 9600))
- 		return -EINVAL;
- 
- 	/* Make the changes - these are privileged changes! */
- 
- 	priv->flags = ((priv->flags & ~ASYNC_FLAGS) |
- 	               (new_serial.flags & ASYNC_FLAGS));	
- 	priv->custom_divisor = new_serial.custom_divisor;
- 
- 	port->tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
- 
- check_and_exit:
- 	if (((old_priv.flags & ASYNC_SPD_MASK) !=
- 	     (priv->flags & ASYNC_SPD_MASK)) ||
- 	    (old_priv.custom_divisor != priv->custom_divisor)) {
- 		if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
- 			port->tty->alt_speed = 57600;
- 		if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
- 			port->tty->alt_speed = 115200;
- 		if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
- 			port->tty->alt_speed = 230400;
- 		if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
- 			port->tty->alt_speed = 460800;
- 		change_speed(port);
- 	}
- 	
- 	return (0);
- 
- } /* set_serial_info */
- 
- /*
-  * ***************************************************************************
-  * FTDI driver specific functions
-  * ***************************************************************************
-  */
- 
- /* Startup for the SIO chip */
- static int ftdi_SIO_startup (struct usb_serial *serial)
- {
- 	struct ftdi_private *priv;
- 
  	priv = serial->port->private = kmalloc(sizeof(struct ftdi_private), GFP_KERNEL);
  	if (!priv){
! 		err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private));
  		return -ENOMEM;
  	}
  
! 	priv->chip_type = SIO;
! 	priv->baud_base = 12000000 / 16;
! 	priv->custom_divisor = 0;
  	priv->write_offset = 1;
-  	priv->prev_status = priv->diff_status = 0;
- 	/* This will push the characters through immediately rather
- 	   than queue a task to deliver them */
- 	priv->flags = ASYNC_LOW_LATENCY;
  	
  	return (0);
  }
  
! /* Startup for the 8U232AM chip */
  static int ftdi_8U232AM_startup (struct usb_serial *serial)
  {
  	struct ftdi_private *priv;
  
  	priv = serial->port->private = kmalloc(sizeof(struct ftdi_private), GFP_KERNEL);
  	if (!priv){
! 		err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private));
  		return -ENOMEM;
  	}
  
! 	priv->chip_type = FT8U232AM;
! 	priv->baud_base = 48000000 / 2; /* Would be / 16, but FTDI supports 0.125, 0.25 and 0.5 divisor fractions! */
! 	priv->custom_divisor = 0;
  	priv->write_offset = 0;
-         init_waitqueue_head(&priv->delta_msr_wait);
- 	/* This will push the characters through immediately rather
- 	   than queue a task to deliver them */
- 	priv->flags = ASYNC_LOW_LATENCY;
  	
  	return (0);
  }
  
! 
! static void ftdi_shutdown (struct usb_serial *serial)
  {
! 	dbg("%s", __FUNCTION__);
  
  	/* stop reads and writes on all ports */
  	while (serial->port[0].open_count > 0) {
! 	        ftdi_close (&serial->port[0], NULL);
  	}
  	if (serial->port[0].private){
  		kfree(serial->port[0].private);
--- 259,309 ----
  }
  
  
  
! static int ftdi_sio_startup (struct usb_serial *serial)
  {
! 	struct ftdi_private *priv;
  	
  	
  	priv = serial->port->private = kmalloc(sizeof(struct ftdi_private), GFP_KERNEL);
  	if (!priv){
! 		err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct ftdi_private));
  		return -ENOMEM;
  	}
  
! 	priv->ftdi_type = sio;
  	priv->write_offset = 1;
  	
  	return (0);
  }
  
! 
  static int ftdi_8U232AM_startup (struct usb_serial *serial)
  {
  	struct ftdi_private *priv;
+  
  
  	priv = serial->port->private = kmalloc(sizeof(struct ftdi_private), GFP_KERNEL);
  	if (!priv){
! 		err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct ftdi_private));
  		return -ENOMEM;
  	}
  
! 	priv->ftdi_type = F8U232AM;
  	priv->write_offset = 0;
  	
  	return (0);
  }
  
! static void ftdi_sio_shutdown (struct usb_serial *serial)
  {
! 	
! 	dbg (__FUNCTION__);
! 
  
  	/* stop reads and writes on all ports */
  	while (serial->port[0].open_count > 0) {
! 	        ftdi_sio_close (&serial->port[0], NULL);
  	}
  	if (serial->port[0].private){
  		kfree(serial->port[0].private);
***************
*** 528,619 ****
  }
  
  
! static int  ftdi_open (struct usb_serial_port *port, struct file *filp)
! { /* ftdi_open */
  	struct termios tmp_termios;
  	struct usb_serial *serial = port->serial;
- 	struct ftdi_private *priv = port->private;
- 	
  	int result = 0;
  	char buf[1]; /* Needed for the usb_control_msg I think */
  
! 	dbg("%s", __FUNCTION__);
  
  
! 	port->tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
  
! 	/* No error checking for this (will get errors later anyway) */
! 	/* See ftdi_sio.h for description of what is reset */
! 	usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
! 			FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
! 			FTDI_SIO_RESET_SIO, 
! 			0, buf, 0, WDR_TIMEOUT);
  
! 	/* Termios defaults are set by usb_serial_init. We don't change
! 	   port->tty->termios - this would loose speed settings, etc.
! 	   This is same behaviour as serial.c/rs_open() - Kuba */
  
! 	/* ftdi_set_termios  will send usb control messages */
! 	ftdi_set_termios(port, &tmp_termios);
  
! 	/* FIXME: Flow control might be enabled, so it should be checked -
! 	   we have no control of defaults! */
! 	/* Turn on RTS and DTR since we are not flow controlling by default */
! 	if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0) {
! 		err("%s Error from DTR HIGH urb", __FUNCTION__);
! 	}
! 	if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0){
! 		err("%s Error from RTS HIGH urb", __FUNCTION__);
! 	}
  
! 	/* Start reading from the device */
! 	FILL_BULK_URB(port->read_urb, serial->dev, 
! 		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
! 		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
! 		      ftdi_read_bulk_callback, port);
! 	result = usb_submit_urb(port->read_urb);
! 	if (result)
! 		err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
  
  	return result;
! } /* ftdi_open */
  
  
! static void ftdi_close (struct usb_serial_port *port, struct file *filp)
! { /* ftdi_close */
  	struct usb_serial *serial = port->serial; /* Checked in usbserial.c */
  	unsigned int c_cflag = port->tty->termios->c_cflag;
  	char buf[1];
  
! 	dbg("%s", __FUNCTION__);
  
! 	if (serial->dev) {
! 		if (c_cflag & HUPCL){
! 			/* Disable flow control */
! 			if (usb_control_msg(serial->dev, 
! 					    usb_sndctrlpipe(serial->dev, 0),
! 					    FTDI_SIO_SET_FLOW_CTRL_REQUEST,
! 					    FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
! 					    0, 0, buf, 0, WDR_TIMEOUT) < 0) {
! 				err("error from flowcontrol urb");
! 			}	    
! 
! 			/* drop DTR */
! 			if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0), LOW) < 0){
! 				err("Error from DTR LOW urb");
! 			}
! 			/* drop RTS */
! 			if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0) {
! 				err("Error from RTS LOW urb");
! 			}	
! 		} /* Note change no line is hupcl is off */
! 
! 		/* shutdown our bulk reads and writes */
! 		/* ***CHECK*** behaviour when there is nothing queued */
! 		usb_unlink_urb (port->write_urb);
! 		usb_unlink_urb (port->read_urb);
  	}
! } /* ftdi_close */
  
  
    
--- 312,428 ----
  }
  
  
! 
! static int  ftdi_sio_open (struct usb_serial_port *port, struct file *filp)
! { /* ftdi_sio_open */
  	struct termios tmp_termios;
  	struct usb_serial *serial = port->serial;
  	int result = 0;
  	char buf[1]; /* Needed for the usb_control_msg I think */
  
! 	dbg(__FUNCTION__);
  
+ 	down (&port->sem);
+ 	
+ 	MOD_INC_USE_COUNT;
+ 	++port->open_count;
  
! 	if (!port->active){
! 		port->active = 1;
  
! 		/* This will push the characters through immediately rather 
! 		   than queue a task to deliver them */
! 		port->tty->low_latency = 1;
  
! 		/* No error checking for this (will get errors later anyway) */
! 		/* See ftdi_sio.h for description of what is reset */
! 		usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
! 				FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
! 				FTDI_SIO_RESET_SIO, 
! 				0, buf, 0, WDR_TIMEOUT);
  
! 		/* Setup termios defaults. According to tty_io.c the 
! 		   settings are driver specific */
! 		port->tty->termios->c_cflag =
! 			B9600 | CS8 | CREAD | HUPCL | CLOCAL;
  
! 		/* ftdi_sio_set_termios  will send usb control messages */
! 		ftdi_sio_set_termios(port, &tmp_termios);	
  
! 		/* Turn on RTS and DTR since we are not flow controlling by default */
! 		if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0) {
! 			err(__FUNCTION__ " Error from DTR HIGH urb");
! 		}
! 		if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),HIGH) < 0){
! 			err(__FUNCTION__ " Error from RTS HIGH urb");
! 		}
! 	
! 		/* Start reading from the device */
! 		FILL_BULK_URB(port->read_urb, serial->dev, 
! 			      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
! 			      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
! 			      ftdi_sio_read_bulk_callback, port);
! 		result = usb_submit_urb(port->read_urb);
! 		if (result)
! 			err(__FUNCTION__ " - failed submitting read urb, error %d", result);
! 	}
  
+ 	up (&port->sem);
  	return result;
! } /* ftdi_sio_open */
  
  
! static void ftdi_sio_close (struct usb_serial_port *port, struct file *filp)
! { /* ftdi_sio_close */
  	struct usb_serial *serial = port->serial; /* Checked in usbserial.c */
  	unsigned int c_cflag = port->tty->termios->c_cflag;
  	char buf[1];
  
! 	dbg( __FUNCTION__);
  
! 	down (&port->sem);
! 	--port->open_count;
! 
! 	if (port->open_count <= 0) {
! 		if (serial->dev) {
! 			if (c_cflag & HUPCL){
! 				/* Disable flow control */
! 				if (usb_control_msg(serial->dev, 
! 						    usb_sndctrlpipe(serial->dev, 0),
! 						    FTDI_SIO_SET_FLOW_CTRL_REQUEST,
! 						    FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
! 						    0, 0, buf, 0, WDR_TIMEOUT) < 0) {
! 					err("error from flowcontrol urb");
! 				}	    
! 
! 				/* drop DTR */
! 				if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0), LOW) < 0){
! 					err("Error from DTR LOW urb");
! 				}
! 				/* drop RTS */
! 				if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0) {
! 					err("Error from RTS LOW urb");
! 				}	
! 			} /* Note change no line is hupcl is off */
! 
! 			/* shutdown our bulk reads and writes */
! 			/* ***CHECK*** behaviour when there is nothing queued */
! 			usb_unlink_urb (port->write_urb);
! 			usb_unlink_urb (port->read_urb);
! 		}
! 		port->active = 0;
! 		port->open_count = 0;
! 	} else {  
! 		/* Send a HUP if necessary */
! 		if (!(port->tty->termios->c_cflag & CLOCAL)){
! 			tty_hangup(port->tty);
! 		}
  	}
! 
! 	up (&port->sem);
! 	MOD_DEC_USE_COUNT;
! 
! } /* ftdi_sio_close */
  
  
    
***************
*** 622,637 ****
   *  B1 0
   *  B2..7 length of message excluding byte 0
   */
! static int ftdi_write (struct usb_serial_port *port, int from_user,
  			   const unsigned char *buf, int count)
! { /* ftdi_write */
  	struct usb_serial *serial = port->serial;
  	struct ftdi_private *priv = (struct ftdi_private *)port->private;
  	unsigned char *first_byte = port->write_urb->transfer_buffer;
  	int data_offset ;
  	int result;
  	
! 	dbg("%s port %d, %d bytes", __FUNCTION__, port->number, count);
  
  	if (count == 0) {
  		err("write request of 0 bytes");
--- 431,446 ----
   *  B1 0
   *  B2..7 length of message excluding byte 0
   */
! static int ftdi_sio_write (struct usb_serial_port *port, int from_user, 
  			   const unsigned char *buf, int count)
! { /* ftdi_sio_write */
  	struct usb_serial *serial = port->serial;
  	struct ftdi_private *priv = (struct ftdi_private *)port->private;
  	unsigned char *first_byte = port->write_urb->transfer_buffer;
  	int data_offset ;
  	int result;
  	
! 	dbg(__FUNCTION__ " port %d, %d bytes", port->number, count);
  
  	if (count == 0) {
  		err("write request of 0 bytes");
***************
*** 642,658 ****
          dbg("data_offset set to %d",data_offset);
  
  	if (port->write_urb->status == -EINPROGRESS) {
! 		dbg("%s - already writing", __FUNCTION__);
  		return (0);
  	}		
  
  	count += data_offset;
  	count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
  
! 	/* Copy in the data to send */
  	if (from_user) {
  		if (copy_from_user(port->write_urb->transfer_buffer + data_offset,
  				   buf, count - data_offset )){
  			return -EFAULT;
  		}
  	} else {
--- 451,470 ----
          dbg("data_offset set to %d",data_offset);
  
  	if (port->write_urb->status == -EINPROGRESS) {
! 		dbg (__FUNCTION__ " - already writing");
  		return (0);
  	}		
  
+ 	down(&port->sem);
+ 
  	count += data_offset;
  	count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
  
! 		/* Copy in the data to send */
  	if (from_user) {
  		if (copy_from_user(port->write_urb->transfer_buffer + data_offset,
  				   buf, count - data_offset )){
+ 			up (&port->sem);
  			return -EFAULT;
  		}
  	} else {
***************
*** 666,704 ****
  		*first_byte = 1 | ((count-data_offset) << 2) ; 
  	}
  
! 	dbg("%s Bytes: %d, First Byte: 0x%02x", __FUNCTION__,count, first_byte[0]);
  	usb_serial_debug_data (__FILE__, __FUNCTION__, count, first_byte);
  		
  	/* send the data out the bulk port */
  	FILL_BULK_URB(port->write_urb, serial->dev, 
  		      usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
  		      port->write_urb->transfer_buffer, count,
! 		      ftdi_write_bulk_callback, port);
  		
  	result = usb_submit_urb(port->write_urb);
  	if (result) {
! 		err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
  		return 0;
  	}
  
! 	dbg("%s write returning: %d", __FUNCTION__, count - data_offset);
  	return (count - data_offset);
- } /* ftdi_write */
  
  
! static void ftdi_write_bulk_callback (struct urb *urb)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct usb_serial *serial;
  
! 	dbg("%s", __FUNCTION__);
  
! 	if (port_paranoia_check (port, "ftdi_write_bulk_callback")) {
  		return;
  	}
  	
  	serial = port->serial;
! 	if (serial_paranoia_check (serial, "ftdi_write_bulk_callback")) {
  		return;
  	}
  	
--- 478,518 ----
  		*first_byte = 1 | ((count-data_offset) << 2) ; 
  	}
  
! 	dbg(__FUNCTION__ " Bytes: %d, First Byte: 0x%02x",count, first_byte[0]);
  	usb_serial_debug_data (__FILE__, __FUNCTION__, count, first_byte);
  		
  	/* send the data out the bulk port */
  	FILL_BULK_URB(port->write_urb, serial->dev, 
  		      usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
  		      port->write_urb->transfer_buffer, count,
! 		      ftdi_sio_write_bulk_callback, port);
  		
  	result = usb_submit_urb(port->write_urb);
  	if (result) {
! 		err(__FUNCTION__ " - failed submitting write urb, error %d", result);
! 		up (&port->sem);
  		return 0;
  	}
+ 	up (&port->sem);
  
! 	dbg(__FUNCTION__ " write returning: %d", count - data_offset);
  	return (count - data_offset);
  
+ } /* ftdi_sio_write */
  
! static void ftdi_sio_write_bulk_callback (struct urb *urb)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct usb_serial *serial;
  
! 	dbg("ftdi_sio_write_bulk_callback");
  
! 	if (port_paranoia_check (port, "ftdi_sio_write_bulk_callback")) {
  		return;
  	}
  	
  	serial = port->serial;
! 	if (serial_paranoia_check (serial, "ftdi_sio_write_bulk_callback")) {
  		return;
  	}
  	
***************
*** 710,723 ****
  	mark_bh(IMMEDIATE_BH);
  
  	return;
! } /* ftdi_write_bulk_callback */
  
  
! static int ftdi_write_room( struct usb_serial_port *port )
  {
  	struct ftdi_private *priv = (struct ftdi_private *)port->private;
  	int room;
- 
  	if ( port->write_urb->status == -EINPROGRESS) {
  		/* There is a race here with the _write routines but it won't hurt */
  		room = 0;
--- 524,536 ----
  	mark_bh(IMMEDIATE_BH);
  
  	return;
! } /* ftdi_sio_write_bulk_callback */
  
  
! static int ftdi_sio_write_room( struct usb_serial_port *port )
  {
  	struct ftdi_private *priv = (struct ftdi_private *)port->private;
  	int room;
  	if ( port->write_urb->status == -EINPROGRESS) {
  		/* There is a race here with the _write routines but it won't hurt */
  		room = 0;
***************
*** 725,739 ****
  		room = port->bulk_out_size - priv->write_offset;
  	}
  	return(room);
- } /* ftdi_write_room */
  
  
! static void ftdi_read_bulk_callback (struct urb *urb)
! { /* ftdi_read_bulk_callback */
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct usb_serial *serial;
         	struct tty_struct *tty = port->tty ;
- 	struct ftdi_private *priv = (struct ftdi_private *) port->private;
  	char error_flag;
         	unsigned char *data = urb->transfer_buffer;
  
--- 538,553 ----
  		room = port->bulk_out_size - priv->write_offset;
  	}
  	return(room);
  
  
! } /* ftdi_sio_write_room */
! 
! 
! static void ftdi_sio_read_bulk_callback (struct urb *urb)
! { /* ftdi_sio_serial_buld_callback */
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct usb_serial *serial;
         	struct tty_struct *tty = port->tty ;
  	char error_flag;
         	unsigned char *data = urb->transfer_buffer;
  
***************
*** 741,747 ****
  	int i;
  	int result;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (port_paranoia_check (port, "ftdi_sio_read_bulk_callback")) {
  		return;
--- 555,561 ----
  	int i;
  	int result;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if (port_paranoia_check (port, "ftdi_sio_read_bulk_callback")) {
  		return;
***************
*** 770,785 ****
  	/* See acm.c - you do a tty_hangup  - eg tty_hangup(tty) */
  	/* if CD is dropped and the line is not CLOCAL then we should hangup */
  
- 	/* Compare new line status to the old one, signal if different */
- 	if (priv != NULL) {
- 		char new_status = data[0] & FTDI_STATUS_B0_MASK;
- 		if (new_status != priv->prev_status) {
- 			priv->diff_status |= new_status ^ priv->prev_status;
- 			wake_up_interruptible(&priv->delta_msr_wait);
- 			priv->prev_status = new_status;
- 		}
- 	}
- 
  	/* Handle errors and break */
  	error_flag = TTY_NORMAL;
          /* Although the device uses a bitmask and hence can have multiple */
--- 584,589 ----
***************
*** 846,862 ****
  	FILL_BULK_URB(port->read_urb, serial->dev, 
  		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
  		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
! 		      ftdi_read_bulk_callback, port);
  
  	result = usb_submit_urb(port->read_urb);
  	if (result)
! 		err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
  
  	return;
! } /* ftdi_read_bulk_callback */
  
  
! static void ftdi_break_ctl( struct usb_serial_port *port, int break_state )
  {
  	struct usb_serial *serial = port->serial;
  	struct ftdi_private *priv = (struct ftdi_private *)port->private;
--- 650,712 ----
  	FILL_BULK_URB(port->read_urb, serial->dev, 
  		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
  		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
! 		      ftdi_sio_read_bulk_callback, port);
  
  	result = usb_submit_urb(port->read_urb);
  	if (result)
! 		err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
  
  	return;
! } /* ftdi_sio_serial_read_bulk_callback */
! 
! 
! static __u16 translate_baudrate_to_ftdi(unsigned int cflag, ftdi_type_t ftdi_type) 
! { /* translate_baudrate_to_ftdi */
! 	
! 	__u16 urb_value = ftdi_sio_b9600;
  
+ 	if (ftdi_type == sio){
+ 		switch(cflag & CBAUD){
+ 		case B0: break; /* ignored by this */
+ 		case B300: urb_value = ftdi_sio_b300; dbg("Set to 300"); break;
+ 		case B600: urb_value = ftdi_sio_b600; dbg("Set to 600") ; break;
+ 		case B1200: urb_value = ftdi_sio_b1200; dbg("Set to 1200") ; break;
+ 		case B2400: urb_value = ftdi_sio_b2400; dbg("Set to 2400") ; break;
+ 		case B4800: urb_value = ftdi_sio_b4800; dbg("Set to 4800") ; break;
+ 		case B9600: urb_value = ftdi_sio_b9600; dbg("Set to 9600") ; break;
+ 		case B19200: urb_value = ftdi_sio_b19200; dbg("Set to 19200") ; break;
+ 		case B38400: urb_value = ftdi_sio_b38400; dbg("Set to 38400") ; break;
+ 		case B57600: urb_value = ftdi_sio_b57600; dbg("Set to 57600") ; break;
+ 		case B115200: urb_value = ftdi_sio_b115200; dbg("Set to 115200") ; break;
+ 		default: dbg(__FUNCTION__ " FTDI_SIO does not support the baudrate (%d) requested",
+ 			     (cflag & CBAUD)); 
+ 		   break;
+ 		}
+ 	} else { /* it is 8U232AM */
+ 		switch(cflag & CBAUD){
+ 		case B0: break; /* ignored by this */
+ 		case B300: urb_value = ftdi_8U232AM_48MHz_b300; dbg("Set to 300"); break;
+ 		case B600: urb_value = ftdi_8U232AM_48MHz_b600; dbg("Set to 600") ; break;
+ 		case B1200: urb_value = ftdi_8U232AM_48MHz_b1200; dbg("Set to 1200") ; break;
+ 		case B2400: urb_value = ftdi_8U232AM_48MHz_b2400; dbg("Set to 2400") ; break;
+ 		case B4800: urb_value = ftdi_8U232AM_48MHz_b4800; dbg("Set to 4800") ; break;
+ 		case B9600: urb_value = ftdi_8U232AM_48MHz_b9600; dbg("Set to 9600") ; break;
+ 		case B19200: urb_value = ftdi_8U232AM_48MHz_b19200; dbg("Set to 19200") ; break;
+ 		case B38400: urb_value = ftdi_8U232AM_48MHz_b38400; dbg("Set to 38400") ; break;
+ 		case B57600: urb_value = ftdi_8U232AM_48MHz_b57600; dbg("Set to 57600") ; break;
+ 		case B115200: urb_value = ftdi_8U232AM_48MHz_b115200; dbg("Set to 115200") ; break;
+ 		case B230400: urb_value = ftdi_8U232AM_48MHz_b230400; dbg("Set to 230400") ; break;
+ 		case B460800: urb_value = ftdi_8U232AM_48MHz_b460800; dbg("Set to 460800") ; break;
+ 		case B921600: urb_value = ftdi_8U232AM_48MHz_b921600; dbg("Set to 921600") ; break;
+ 		default: dbg(__FUNCTION__ " The baudrate (%d) requested is not implemented",
+ 			     (cflag & CBAUD)); 
+ 		   break;
+ 		}
+ 	}
+ 	return(urb_value);
+ }
  
! static void ftdi_sio_break_ctl( struct usb_serial_port *port, int break_state )
  {
  	struct usb_serial *serial = port->serial;
  	struct ftdi_private *priv = (struct ftdi_private *)port->private;
***************
*** 879,899 ****
  			    FTDI_SIO_SET_DATA_REQUEST_TYPE,
  			    urb_value , 0,
  			    buf, 0, WDR_TIMEOUT) < 0) {
! 		err("%s FAILED to enable/disable break state (state was %d)", __FUNCTION__,break_state);
  	}	   
  
! 	dbg("%s break state is %d - urb is %d", __FUNCTION__,break_state, urb_value);
  	
  }
  
  
- /* old_termios contains the original termios settings and tty->termios contains
-  * the new setting to be used
-  * WARNING: set_termios calls this with old_termios in kernel space
-  */
  
! static void ftdi_set_termios (struct usb_serial_port *port, struct termios *old_termios)
! { /* ftdi_termios */
  	struct usb_serial *serial = port->serial;
  	unsigned int cflag = port->tty->termios->c_cflag;
  	struct ftdi_private *priv = (struct ftdi_private *)port->private;	
--- 729,750 ----
  			    FTDI_SIO_SET_DATA_REQUEST_TYPE,
  			    urb_value , 0,
  			    buf, 0, WDR_TIMEOUT) < 0) {
! 		err(__FUNCTION__ " FAILED to enable/disable break state (state was %d)",break_state);
  	}	   
  
! 	dbg(__FUNCTION__ " break state is %d - urb is %d",break_state, urb_value);
  	
  }
  
  
  
! /* As I understand this - old_termios contains the original termios settings */
! /*  and tty->termios contains the new setting to be used */
! /* */
! /*   WARNING: set_termios calls this with old_termios in kernel space */
! 
! static void ftdi_sio_set_termios (struct usb_serial_port *port, struct termios *old_termios)
! { /* ftdi_sio_set_termios */
  	struct usb_serial *serial = port->serial;
  	unsigned int cflag = port->tty->termios->c_cflag;
  	struct ftdi_private *priv = (struct ftdi_private *)port->private;	
***************
*** 901,907 ****
  	char buf[1]; /* Perhaps I should dynamically alloc this? */
  	
  	
! 	dbg("%s", __FUNCTION__);
  
  
  	/* FIXME -For this cut I don't care if the line is really changing or 
--- 752,758 ----
  	char buf[1]; /* Perhaps I should dynamically alloc this? */
  	
  	
! 	dbg(__FUNCTION__);
  
  
  	/* FIXME -For this cut I don't care if the line is really changing or 
***************
*** 940,949 ****
  			    FTDI_SIO_SET_DATA_REQUEST_TYPE,
  			    urb_value , 0,
  			    buf, 0, 100) < 0) {
! 		err("%s FAILED to set databits/stopbits/parity", __FUNCTION__);
  	}	   
  
  	/* Now do the baudrate */
  	if ((cflag & CBAUD) == B0 ) {
  		/* Disable flow control */
  		if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
--- 791,802 ----
  			    FTDI_SIO_SET_DATA_REQUEST_TYPE,
  			    urb_value , 0,
  			    buf, 0, 100) < 0) {
! 		err(__FUNCTION__ " FAILED to set databits/stopbits/parity");
  	}	   
  
  	/* Now do the baudrate */
+ 	urb_value = translate_baudrate_to_ftdi((cflag & CBAUD), priv->ftdi_type);
+ 	
  	if ((cflag & CBAUD) == B0 ) {
  		/* Disable flow control */
  		if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
***************
*** 951,977 ****
  				    FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
  				    0, 0, 
  				    buf, 0, WDR_TIMEOUT) < 0) {
! 			err("%s error from disable flowcontrol urb", __FUNCTION__);
  		}	    
  		/* Drop RTS and DTR */
  		if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0){
! 			err("%s Error from DTR LOW urb", __FUNCTION__);
  		}
  		if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0){
! 			err("%s Error from RTS LOW urb", __FUNCTION__);
  		}	
  		
  	} else {
  		/* set the baudrate determined before */
! 		if (change_speed(port)) {
! 			err("%s urb failed to set baurdrate", __FUNCTION__);
  		}
  	}
- 
  	/* Set flow control */
  	/* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */
  	if (cflag & CRTSCTS) {
! 		dbg("%s Setting to CRTSCTS flow control", __FUNCTION__);
  		if (usb_control_msg(serial->dev, 
  				    usb_sndctrlpipe(serial->dev, 0),
  				    FTDI_SIO_SET_FLOW_CTRL_REQUEST, 
--- 804,834 ----
  				    FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
  				    0, 0, 
  				    buf, 0, WDR_TIMEOUT) < 0) {
! 			err(__FUNCTION__ " error from disable flowcontrol urb");
  		}	    
  		/* Drop RTS and DTR */
  		if (set_dtr(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0){
! 			err(__FUNCTION__ " Error from DTR LOW urb");
  		}
  		if (set_rts(serial->dev, usb_sndctrlpipe(serial->dev, 0),LOW) < 0){
! 			err(__FUNCTION__ " Error from RTS LOW urb");
  		}	
  		
  	} else {
  		/* set the baudrate determined before */
! 		if (usb_control_msg(serial->dev, 
! 				    usb_sndctrlpipe(serial->dev, 0),
! 				    FTDI_SIO_SET_BAUDRATE_REQUEST, 
! 				    FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
! 				    urb_value, 0, 
! 				    buf, 0, 100) < 0) {
! 			err(__FUNCTION__ " urb failed to set baurdrate");
  		}
  	}
  	/* Set flow control */
  	/* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */
  	if (cflag & CRTSCTS) {
! 		dbg(__FUNCTION__ " Setting to CRTSCTS flow control");
  		if (usb_control_msg(serial->dev, 
  				    usb_sndctrlpipe(serial->dev, 0),
  				    FTDI_SIO_SET_FLOW_CTRL_REQUEST, 
***************
*** 983,989 ****
  		
  	} else { 
  		/* CHECKME Assuming XON/XOFF handled by tty stack - not by device */
! 		dbg("%s Turning off hardware flow control", __FUNCTION__);
  		if (usb_control_msg(serial->dev, 
  				    usb_sndctrlpipe(serial->dev, 0),
  				    FTDI_SIO_SET_FLOW_CTRL_REQUEST, 
--- 840,846 ----
  		
  	} else { 
  		/* CHECKME Assuming XON/XOFF handled by tty stack - not by device */
! 		dbg(__FUNCTION__ " Turning off hardware flow control");
  		if (usb_control_msg(serial->dev, 
  				    usb_sndctrlpipe(serial->dev, 0),
  				    FTDI_SIO_SET_FLOW_CTRL_REQUEST, 
***************
*** 995,1021 ****
  		
  	}
  	return;
! } /* ftdi_termios */
! 
  
! static int ftdi_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
  {
  	struct usb_serial *serial = port->serial;
  	struct ftdi_private *priv = (struct ftdi_private *)port->private;
- 
  	__u16 urb_value=0; /* Will hold the new flags */
  	char buf[2];
  	int  ret, mask;
  	
! 	dbg("%s cmd 0x%04x", __FUNCTION__, cmd);
  
  	/* Based on code from acm.c and others */
  	switch (cmd) {
  
  	case TIOCMGET:
! 		dbg("%s TIOCMGET", __FUNCTION__);
! 		switch (priv->chip_type) {
! 		case SIO:
  			/* Request the status from the device */
  			if ((ret = usb_control_msg(serial->dev, 
  						   usb_rcvctrlpipe(serial->dev, 0),
--- 852,875 ----
  		
  	}
  	return;
! } /* ftdi_sio_set_termios */
  
! static int ftdi_sio_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
  {
  	struct usb_serial *serial = port->serial;
  	struct ftdi_private *priv = (struct ftdi_private *)port->private;
  	__u16 urb_value=0; /* Will hold the new flags */
  	char buf[2];
  	int  ret, mask;
  	
! 	dbg(__FUNCTION__ " cmd 0x%04x", cmd);
  
  	/* Based on code from acm.c and others */
  	switch (cmd) {
  
  	case TIOCMGET:
! 		dbg(__FUNCTION__ " TIOCMGET");
! 		if (priv->ftdi_type == sio){
  			/* Request the status from the device */
  			if ((ret = usb_control_msg(serial->dev, 
  						   usb_rcvctrlpipe(serial->dev, 0),
***************
*** 1023,1035 ****
  						   FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
  						   0, 0, 
  						   buf, 1, WDR_TIMEOUT)) < 0 ) {
! 				err("%s Could not get modem status of device - err: %d", __FUNCTION__,
  				    ret);
  				return(ret);
  			}
! 			break;
! 		case FT8U232AM:
! 			/* the 8U232AM returns a two byte value (the sio is a 1 byte value) - in the same
  			   format as the data returned from the in point */
  			if ((ret = usb_control_msg(serial->dev, 
  						   usb_rcvctrlpipe(serial->dev, 0),
--- 877,888 ----
  						   FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
  						   0, 0, 
  						   buf, 1, WDR_TIMEOUT)) < 0 ) {
! 				err(__FUNCTION__ " Could not get modem status of device - err: %d",
  				    ret);
  				return(ret);
  			}
! 		} else {
! 			/* the 8U232AM returns a two byte value (the sio is a 1 byte value) - in the same 
  			   format as the data returned from the in point */
  			if ((ret = usb_control_msg(serial->dev, 
  						   usb_rcvctrlpipe(serial->dev, 0),
***************
*** 1037,1050 ****
  						   FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
  						   0, 0, 
  						   buf, 2, WDR_TIMEOUT)) < 0 ) {
! 				err("%s Could not get modem status of device - err: %d", __FUNCTION__,
  				    ret);
  				return(ret);
  			}
- 			break;
- 		default:
- 			return -EFAULT;
- 			break;
  		}
  
  		return put_user((buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) |
--- 890,899 ----
  						   FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
  						   0, 0, 
  						   buf, 2, WDR_TIMEOUT)) < 0 ) {
! 				err(__FUNCTION__ " Could not get modem status of device - err: %d",
  				    ret);
  				return(ret);
  			}
  		}
  
  		return put_user((buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) |
***************
*** 1055,1061 ****
  		break;
  
  	case TIOCMSET: /* Turns on and off the lines as specified by the mask */
! 		dbg("%s TIOCMSET", __FUNCTION__);
  		if (get_user(mask, (unsigned long *) arg))
  			return -EFAULT;
  		urb_value = ((mask & TIOCM_DTR) ? HIGH : LOW);
--- 904,910 ----
  		break;
  
  	case TIOCMSET: /* Turns on and off the lines as specified by the mask */
! 		dbg(__FUNCTION__ " TIOCMSET");
  		if (get_user(mask, (unsigned long *) arg))
  			return -EFAULT;
  		urb_value = ((mask & TIOCM_DTR) ? HIGH : LOW);
***************
*** 1069,1075 ****
  		break;
  					
  	case TIOCMBIS: /* turns on (Sets) the lines as specified by the mask */
! 		dbg("%s TIOCMBIS", __FUNCTION__);
   	        if (get_user(mask, (unsigned long *) arg))
  			return -EFAULT;
    	        if (mask & TIOCM_DTR){
--- 918,924 ----
  		break;
  					
  	case TIOCMBIS: /* turns on (Sets) the lines as specified by the mask */
! 		dbg(__FUNCTION__ " TIOCMBIS");
   	        if (get_user(mask, (unsigned long *) arg))
  			return -EFAULT;
    	        if (mask & TIOCM_DTR){
***************
*** 1091,1097 ****
  					break;
  
  	case TIOCMBIC: /* turns off (Clears) the lines as specified by the mask */
! 		dbg("%s TIOCMBIC", __FUNCTION__);
   	        if (get_user(mask, (unsigned long *) arg))
  			return -EFAULT;
    	        if (mask & TIOCM_DTR){
--- 940,946 ----
  					break;
  
  	case TIOCMBIC: /* turns off (Clears) the lines as specified by the mask */
! 		dbg(__FUNCTION__ " TIOCMBIC");
   	        if (get_user(mask, (unsigned long *) arg))
  			return -EFAULT;
    	        if (mask & TIOCM_DTR){
***************
*** 1121,1203 ****
  		 *
  		 */
  
- 	case TIOCGSERIAL: /* gets serial port data */
- 		return get_serial_info(port, (struct serial_struct *) arg);
- 
- 	case TIOCSSERIAL: /* sets serial port data */
- 		return set_serial_info(port, (struct serial_struct *) arg);
- 
- 	/*
- 	 * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change
- 	 * - mask passed in arg for lines of interest
- 	 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
- 	 * Caller should use TIOCGICOUNT to see which one it was.
- 	 *
- 	 * This code is borrowed from linux/drivers/char/serial.c
- 	 */
- 	case TIOCMIWAIT:
- 		while (priv != NULL) {
- 			interruptible_sleep_on(&priv->delta_msr_wait);
- 			/* see if a signal did it */
- 			if (signal_pending(current))
- 				return -ERESTARTSYS;
- 			else {
- 				char diff = priv->diff_status;
- 
- 				if (diff == 0) {
- 					return -EIO; /* no change => error */
- 				}
- 
- 				/* Consume all events */
- 				priv->diff_status = 0;
- 
- 				/* Return 0 if caller wanted to know about these bits */
- 				if ( ((arg & TIOCM_RNG) && (diff & FTDI_RS0_RI)) ||
- 				     ((arg & TIOCM_DSR) && (diff & FTDI_RS0_DSR)) ||
- 				     ((arg & TIOCM_CD)  && (diff & FTDI_RS0_RLSD)) ||
- 				     ((arg & TIOCM_CTS) && (diff & FTDI_RS0_CTS)) ) {
- 					return 0;
- 				}
- 				/*
- 				 * Otherwise caller can't care less about what happened,
- 				 * and so we continue to wait for more events.
- 				 */
- 			}
- 		}
- 		/* NOTREACHED */
- 
  	default:
  	  /* This is not an error - turns out the higher layers will do 
  	   *  some ioctls itself (see comment above)
   	   */
! 		dbg("%s arg not supported - it was 0x%04x", __FUNCTION__,cmd);
  		return(-ENOIOCTLCMD);
  		break;
  	}
  	return 0;
! } /* ftdi_ioctl */
  
  
! static int __init ftdi_init (void)
  {
! 	dbg("%s", __FUNCTION__);
! 	usb_serial_register (&ftdi_SIO_device);
  	usb_serial_register (&ftdi_8U232AM_device);
  	info(DRIVER_VERSION ":" DRIVER_DESC);
  	return 0;
  }
  
  
! static void __exit ftdi_exit (void)
  {
! 	dbg("%s", __FUNCTION__);
! 	usb_serial_deregister (&ftdi_SIO_device);
  	usb_serial_deregister (&ftdi_8U232AM_device);
  }
  
  
! module_init(ftdi_init);
! module_exit(ftdi_exit);
  
  MODULE_AUTHOR( DRIVER_AUTHOR );
  MODULE_DESCRIPTION( DRIVER_DESC );
--- 970,1007 ----
  		 *
  		 */
  
  	default:
  	  /* This is not an error - turns out the higher layers will do 
  	   *  some ioctls itself (see comment above)
   	   */
! 		dbg(__FUNCTION__ " arg not supported - it was 0x%04x",cmd);
  		return(-ENOIOCTLCMD);
  		break;
  	}
  	return 0;
! } /* ftdi_sio_ioctl */
  
  
! static int __init ftdi_sio_init (void)
  {
! 	dbg(__FUNCTION__);
! 	usb_serial_register (&ftdi_sio_device);
  	usb_serial_register (&ftdi_8U232AM_device);
  	info(DRIVER_VERSION ":" DRIVER_DESC);
  	return 0;
  }
  
  
! static void __exit ftdi_sio_exit (void)
  {
! 	dbg(__FUNCTION__);
! 	usb_serial_deregister (&ftdi_sio_device);
  	usb_serial_deregister (&ftdi_8U232AM_device);
  }
  
  
! module_init(ftdi_sio_init);
! module_exit(ftdi_sio_exit);
  
  MODULE_AUTHOR( DRIVER_AUTHOR );
  MODULE_DESCRIPTION( DRIVER_DESC );
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/ftdi_sio.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/ftdi_sio.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/ftdi_sio.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/ftdi_sio.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 22,29 ****
  #define FTDI_VID	0x0403	/* Vendor Id */
  #define FTDI_SIO_PID	0x8372	/* Product Id SIO application of 8U100AX  */
  #define FTDI_8U232AM_PID 0x6001 /* Similar device to SIO above */
- #define FTDI_NF_RIC_VID	0x0DCD	/* Vendor Id */
- #define FTDI_NF_RIC_PID	0x0001	/* Product Id */
  
  #define FTDI_SIO_RESET 		0 /* Reset the port */
  #define FTDI_SIO_MODEM_CTRL 	1 /* Set the modem control register */
--- 22,27 ----
***************
*** 81,116 ****
  /*
   * BmRequestType:  0100 0000B
   * bRequest:       FTDI_SIO_SET_BAUDRATE
!  * wValue:         BaudDivisor value - see below
   * wIndex:         Port
   * wLength:        0
   * Data:           None
-  * The BaudDivisor values are calculated as follows:
-  * - BaseClock is either 12000000 or 48000000 depending on the device. FIXME: I wish
-  *   I knew how to detect old chips to select proper base clock!
-  * - BaudDivisor is a fixed point number encoded in a funny way.
-  *   (--WRONG WAY OF THINKING--)
-  *   BaudDivisor is a fixed point number encoded with following bit weighs:
-  *   (-2)(-1)(13..0). It is a radical with a denominator of 4, so values
-  *   end with 0.0 (00...), 0.25 (10...), 0.5 (01...), and 0.75 (11...).
-  *   (--THE REALITY--)
-  *   The both-bits-set has quite different meaning from 0.75 - the chip designers
-  *   have decided it to mean 0.125 instead of 0.75.
-  *   This info looked up in FTDI application note "FT8U232 DEVICES \ Data Rates
-  *   and Flow Control Consideration for USB to RS232".
-  * - BaudDivisor = (BaseClock / 16) / BaudRate, where the (=) operation should
-  *   automagically re-encode the resulting value to take fractions into consideration.
-  * As all values are integers, some bit twiddling is in order:
-  *   BaudDivisor = (BaseClock / 16 / BaudRate) |
-  *   (((BaseClock / 2 / BaudRate) & 2) ? 0x8000 : 0) | // 0.25
-  *   (((BaseClock / 2 / BaudRate) & 4) ? 0x4000 : 0) | // 0.5
-  *   (((BaseClock / 2 / BaudRate) & 0x7) == 1 ? 0xc000) // 0.125 - this line due to funny encoding only
   */
  
  typedef enum {
! 	SIO = 1,
! 	FT8U232AM = 2,
! } ftdi_chip_type_t;
  
  typedef enum {
   ftdi_sio_b300 = 0, 
--- 79,95 ----
  /*
   * BmRequestType:  0100 0000B
   * bRequest:       FTDI_SIO_SET_BAUDRATE
!  * wValue:         BaudRate value - see below
   * wIndex:         Port
   * wLength:        0
   * Data:           None
   */
  
  typedef enum {
! 	sio = 1,
! 	F8U232AM = 2,
! } ftdi_type_t;
! 
  
  typedef enum {
   ftdi_sio_b300 = 0, 
***************
*** 125,142 ****
   ftdi_sio_b115200 = 9
  } FTDI_SIO_baudrate_t ;
  
- #define FTDI_SIO_BASE_BAUD_TO_DIVISOR(base, baud) ( \
- ((base/2/baud) >> 3) | \
- (((base/2/baud) & 2) ? 0x8000 : 0) | \
- (((base/2/baud) & 4) ? 0x4000 : 0) | \
- ((((base/2/baud) & 0x7) == 1) ? 0xc000 : 0) )
  
! #define FTDI_SIO_BAUD_TO_DIVISOR(baud) FTDI_SIO_BASE_BAUD_TO_DIVISOR(48000000, baud)
  
! /*
!  * The ftdi_8U232AM_xxMHz_byyy constans have been removed. Their values can
!  * be calculated as follows: FTDI_SIO_BAUD_TO_DIVISOR(xx000000, yyy)
!  */
  
  #define FTDI_SIO_SET_DATA_REQUEST FTDI_SIO_SET_DATA
  #define FTDI_SIO_SET_DATA_REQUEST_TYPE 0x40
--- 104,140 ----
   ftdi_sio_b115200 = 9
  } FTDI_SIO_baudrate_t ;
  
  
! typedef enum {
!   ftdi_8U232AM_12MHz_b300 = 0x09c4,
!   ftdi_8U232AM_12MHz_b600 = 0x04E2,
!   ftdi_8U232AM_12MHz_b1200 = 0x0271,
!   ftdi_8U232AM_12MHz_b2400 = 0x4138,
!   ftdi_8U232AM_12MHz_b4800 = 0x809c,
!   ftdi_8U232AM_12MHz_b9600 = 0xc04e,
!   ftdi_8U232AM_12MHz_b19200 = 0x0027,
!   ftdi_8U232AM_12MHz_b38400 = 0x4013,
!   ftdi_8U232AM_12MHz_b57600 = 0x000d,
!   ftdi_8U232AM_12MHz_b115200 = 0x4006,
!   ftdi_8U232AM_12MHz_b230400 = 0x8003,
! } FTDI_8U232AM_12MHz_baudrate_t;
! /* Apparently all devices are 48MHz */
! typedef enum {
!   ftdi_8U232AM_48MHz_b300 = 0x2710,
!   ftdi_8U232AM_48MHz_b600 = 0x1388,
!   ftdi_8U232AM_48MHz_b1200 = 0x09c4,
!   ftdi_8U232AM_48MHz_b2400 = 0x04e2,
!   ftdi_8U232AM_48MHz_b4800 = 0x0271,
!   ftdi_8U232AM_48MHz_b9600 = 0x4138,
!   ftdi_8U232AM_48MHz_b19200 = 0x809c,
!   ftdi_8U232AM_48MHz_b38400 = 0xc04e,
!   ftdi_8U232AM_48MHz_b57600 = 0x0034,
!   ftdi_8U232AM_48MHz_b115200 = 0x001a,
!   ftdi_8U232AM_48MHz_b230400 = 0x000d,
!   ftdi_8U232AM_48MHz_b460800 = 0x4006,
!   ftdi_8U232AM_48MHz_b921600 = 0x8003,
  
! } FTDI_8U232AM_48MHz_baudrate_t;
  
  #define FTDI_SIO_SET_DATA_REQUEST FTDI_SIO_SET_DATA
  #define FTDI_SIO_SET_DATA_REQUEST_TYPE 0x40
***************
*** 440,450 ****
   * B7	Error in RCVR FIFO
   * 
   */
- #define FTDI_RS0_CTS	(1 << 4)
- #define FTDI_RS0_DSR	(1 << 5)
- #define FTDI_RS0_RI	(1 << 6)
- #define FTDI_RS0_RLSD	(1 << 7)
- 
  #define FTDI_RS_DR  1
  #define FTDI_RS_OE (1<<1)
  #define FTDI_RS_PE (1<<2)
--- 438,443 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_edgeport.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_edgeport.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_edgeport.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_edgeport.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 2,8 ****
   * Edgeport USB Serial Converter driver
   *
   * Copyright(c) 2000 Inside Out Networks, All rights reserved.
!  * Copyright(c) 2001-2002 Greg Kroah-Hartman 
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
--- 2,8 ----
   * Edgeport USB Serial Converter driver
   *
   * Copyright(c) 2000 Inside Out Networks, All rights reserved.
!  * Copyright(c) 2001 Greg Kroah-Hartman 
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
***************
*** 25,33 ****
   *
   * Version history:
   * 
-  * 2.3 2002_03_08 greg kroah-hartman
-  *	- fixed bug when multiple devices were attached at the same time.
-  *
   * 2.2 2001_11_14 greg kroah-hartman
   *	- fixed bug in edge_close that kept the port from being used more
   *	  than once.
--- 25,30 ----
***************
*** 242,250 ****
--- 239,251 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
***************
*** 252,258 ****
  #include 
  #include 
  #include 
! #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
--- 253,259 ----
  #include 
  #include 
  #include 
! #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
***************
*** 270,276 ****
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v2.3"
  #define DRIVER_AUTHOR "Greg Kroah-Hartman  and David Iacovelli"
  #define DRIVER_DESC "Edgeport USB Serial Driver"
  
--- 271,277 ----
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v2.2"
  #define DRIVER_AUTHOR "Greg Kroah-Hartman  and David Iacovelli"
  #define DRIVER_DESC "Edgeport USB Serial Driver"
  
***************
*** 368,375 ****
  struct edgeport_serial {
  	char			name[MAX_NAME_LEN+1];		/* string name of this device */
  
! 	struct edge_manuf_descriptor	manuf_descriptor;	/* the manufacturer descriptor */
! 	struct edge_boot_descriptor	boot_descriptor;	/* the boot firmware descriptor */
  	struct edgeport_product_info	product_info;		/* Product Info */
  
  	__u8			interrupt_in_endpoint;		/* the interrupt endpoint handle */
--- 369,376 ----
  struct edgeport_serial {
  	char			name[MAX_NAME_LEN+1];		/* string name of this device */
  
! 	EDGE_MANUF_DESCRIPTOR		manuf_descriptor;	/* the manufacturer descriptor */
! 	EDGE_BOOT_DESCRIPTOR		boot_descriptor;	/* the boot firmware descriptor */
  	struct edgeport_product_info	product_info;		/* Product Info */
  
  	__u8			interrupt_in_endpoint;		/* the interrupt endpoint handle */
***************
*** 396,412 ****
  };
  
  /* baud rate information */
! struct divisor_table_entry {
  	__u32   BaudRate;
  	__u16  Divisor;
! };
  
  //
  // Define table of divisors for Rev A EdgePort/4 hardware
  // These assume a 3.6864MHz crystal, the standard /16, and
  // MCR.7 = 0.
  //
! static struct divisor_table_entry divisor_table[] = {
  	{   75,		3072},  
  	{   110,	2095},		/* 2094.545455 => 230450   => .0217 % over */
  	{   134,	1713},		/* 1713.011152 => 230398.5 => .00065% under */
--- 397,413 ----
  };
  
  /* baud rate information */
! typedef struct _DIVISOR_TABLE_ENTRY {
  	__u32   BaudRate;
  	__u16  Divisor;
! } DIVISOR_TABLE_ENTRY, *PDIVISOR_TABLE_ENTRY;
  
  //
  // Define table of divisors for Rev A EdgePort/4 hardware
  // These assume a 3.6864MHz crystal, the standard /16, and
  // MCR.7 = 0.
  //
! static DIVISOR_TABLE_ENTRY  DivisorTable[] = {
  	{   75,		3072},  
  	{   110,	2095},		/* 2094.545455 => 230450   => .0217 % over */
  	{   134,	1713},		/* 1713.011152 => 230398.5 => .00065% under */
***************
*** 506,512 ****
  	__u16 BootBuildNumber;
  	__u8 *BootImage;      
  	__u32 BootSize;
! 	struct edge_firmware_image_record *record;
  	unsigned char *firmware;
  	int response;
  
--- 507,513 ----
  	__u16 BootBuildNumber;
  	__u8 *BootImage;      
  	__u32 BootSize;
! 	PEDGE_FIRMWARE_IMAGE_RECORD record;
  	unsigned char *firmware;
  	int response;
  
***************
*** 562,574 ****
  		firmware = BootImage;
  
  		for (;;) {
! 			record = (struct edge_firmware_image_record *)firmware;
  			response = rom_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
  			if (response < 0) {
  				err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len);
  				break;
  			}
! 			firmware += sizeof (struct edge_firmware_image_record) + record->Len;
  			if (firmware >= &BootImage[BootSize]) {
  				break;
  			}
--- 563,575 ----
  		firmware = BootImage;
  
  		for (;;) {
! 			record = (PEDGE_FIRMWARE_IMAGE_RECORD)firmware;
  			response = rom_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
  			if (response < 0) {
  				err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len);
  				break;
  			}
! 			firmware += sizeof (EDGE_FIRMWARE_IMAGE_RECORD) + record->Len;
  			if (firmware >= &BootImage[BootSize]) {
  				break;
  			}
***************
*** 589,595 ****
  	struct usb_string_descriptor StringDesc;
  	struct usb_string_descriptor *pStringDesc;
  
! 	dbg("%s - USB String ID = %d", __FUNCTION__, Id );
  
  	if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {
  		return 0;
--- 590,596 ----
  	struct usb_string_descriptor StringDesc;
  	struct usb_string_descriptor *pStringDesc;
  
! 	dbg(__FUNCTION__ " - USB String ID = %d", Id );
  
  	if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {
  		return 0;
***************
*** 624,630 ****
  	struct usb_string_descriptor StringDesc;
  	struct usb_string_descriptor *pStringDesc;
  
! 	dbg("%s - USB String ID = %d", __FUNCTION__, Id );
  
  	if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {
  		return 0;
--- 625,631 ----
  	struct usb_string_descriptor StringDesc;
  	struct usb_string_descriptor *pStringDesc;
  
! 	dbg(__FUNCTION__ " - USB String ID = %d", Id );
  
  	if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) {
  		return 0;
***************
*** 759,772 ****
  	int portNumber;
  	int result;
  
! 	dbg("%s", __FUNCTION__);
  
  	if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero control read status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
--- 760,773 ----
  	int portNumber;
  	int result;
  
! 	dbg(__FUNCTION__);
  
  	if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__" - nonzero control read status received: %d", urb->status);
  		return;
  	}
  
***************
*** 778,784 ****
  			bytes_avail = data[0] | (data[1] << 8);
  			if (bytes_avail) {
  				edge_serial->rxBytesAvail += bytes_avail;
! 				dbg("%s - bytes_avail = %d, rxBytesAvail %d", __FUNCTION__, bytes_avail, edge_serial->rxBytesAvail);
  
  				if ((edge_serial->rxBytesAvail > 0) &&
  				    (edge_serial->read_urb->status != -EINPROGRESS)) {
--- 779,785 ----
  			bytes_avail = data[0] | (data[1] << 8);
  			if (bytes_avail) {
  				edge_serial->rxBytesAvail += bytes_avail;
! 				dbg(__FUNCTION__" - bytes_avail = %d, rxBytesAvail %d", bytes_avail, edge_serial->rxBytesAvail);
  
  				if ((edge_serial->rxBytesAvail > 0) &&
  				    (edge_serial->read_urb->status != -EINPROGRESS)) {
***************
*** 788,794 ****
  					edge_serial->read_urb->dev = edge_serial->serial->dev;
  					result = usb_submit_urb(edge_serial->read_urb);
  					if (result) {
! 						dbg("%s - usb_submit_urb(read bulk) failed with result = %d", __FUNCTION__, result);
  					}
  				}
  			}
--- 789,795 ----
  					edge_serial->read_urb->dev = edge_serial->serial->dev;
  					result = usb_submit_urb(edge_serial->read_urb);
  					if (result) {
! 						dbg(__FUNCTION__" - usb_submit_urb(read bulk) failed with result = %d", result);
  					}
  				}
  			}
***************
*** 804,814 ****
  					edge_port = (struct edgeport_port *)port->private;
  					if (edge_port->open) {
  						edge_port->txCredits += txCredits;
! 						dbg("%s - txcredits for port%d = %d", __FUNCTION__, portNumber, edge_port->txCredits);
  
  						/* tell the tty driver that something has changed */
! 						if (edge_port->port->tty)
! 							wake_up_interruptible(&edge_port->port->tty->write_wait);
  
  						// Since we have more credit, check if more data can be sent
  						send_more_port_data(edge_serial, edge_port);
--- 805,814 ----
  					edge_port = (struct edgeport_port *)port->private;
  					if (edge_port->open) {
  						edge_port->txCredits += txCredits;
! 						dbg(__FUNCTION__" - txcredits for port%d = %d", portNumber, edge_port->txCredits);
  
  						/* tell the tty driver that something has changed */
! 						wake_up_interruptible(&edge_port->port->tty->write_wait);
  
  						// Since we have more credit, check if more data can be sent
  						send_more_port_data(edge_serial, edge_port);
***************
*** 834,847 ****
  	int			status;
  	__u16			raw_data_length;
  
! 	dbg("%s", __FUNCTION__);
  
  	if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
--- 834,847 ----
  	int			status;
  	__u16			raw_data_length;
  
! 	dbg(__FUNCTION__);
  
  	if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) {
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__" - nonzero read bulk status received: %d", urb->status);
  		return;
  	}
  
***************
*** 853,859 ****
  		/* decrement our rxBytes available by the number that we just got */
  		edge_serial->rxBytesAvail -= raw_data_length;
  
! 		dbg("%s - Received = %d, rxBytesAvail %d", __FUNCTION__, raw_data_length, edge_serial->rxBytesAvail);
  
  		process_rcvd_data (edge_serial, data, urb->actual_length);
  
--- 853,859 ----
  		/* decrement our rxBytes available by the number that we just got */
  		edge_serial->rxBytesAvail -= raw_data_length;
  
! 		dbg(__FUNCTION__" - Received = %d, rxBytesAvail %d", raw_data_length, edge_serial->rxBytesAvail);
  
  		process_rcvd_data (edge_serial, data, urb->actual_length);
  
***************
*** 866,872 ****
  			edge_serial->read_urb->dev = edge_serial->serial->dev;
  			status = usb_submit_urb(edge_serial->read_urb);
  			if (status) {
! 				err("%s - usb_submit_urb(read bulk) failed, status = %d", __FUNCTION__, status);
  			}
  		}
  	}
--- 866,872 ----
  			edge_serial->read_urb->dev = edge_serial->serial->dev;
  			status = usb_submit_urb(edge_serial->read_urb);
  			if (status) {
! 				err(__FUNCTION__" - usb_submit_urb(read bulk) failed, status = %d", status);
  			}
  		}
  	}
***************
*** 883,910 ****
  	struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;
  	struct tty_struct *tty;
  
! 	dbg("%s", __FUNCTION__);
  
  	if (port_paranoia_check (edge_port->port, __FUNCTION__)) {
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
  	}
  
  	tty = edge_port->port->tty;
  
! 	if (tty) {
! 		/* let the tty driver wakeup if it has a special write_wakeup function */
! 		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
! 			(tty->ldisc.write_wakeup)(tty);
! 		}
! 
! 		/* tell the tty driver that something has changed */
! 		wake_up_interruptible(&tty->write_wait);
  	}
  
  	// Release the Write URB
  	edge_port->write_in_progress = FALSE;
  
--- 883,908 ----
  	struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;
  	struct tty_struct *tty;
  
! 	dbg(__FUNCTION__);
  
  	if (port_paranoia_check (edge_port->port, __FUNCTION__)) {
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__" - nonzero write bulk status received: %d", urb->status);
  	}
  
  	tty = edge_port->port->tty;
  
! 	/* let the tty driver wakeup if it has a special write_wakeup function */
! 	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
! 		(tty->ldisc.write_wakeup)(tty);
  	}
  
+ 	/* tell the tty driver that something has changed */
+ 	wake_up_interruptible(&tty->write_wait);
+ 
  	// Release the Write URB
  	edge_port->write_in_progress = FALSE;
  
***************
*** 924,933 ****
  	struct tty_struct *tty;
  	int status = urb->status;
  
! 	dbg("%s", __FUNCTION__);
  
  	CmdUrbs--;
! 	dbg("%s - FREE URB %p (outstanding %d)", __FUNCTION__, urb, CmdUrbs);
  
  
  	/* clean up the transfer buffer */
--- 922,931 ----
  	struct tty_struct *tty;
  	int status = urb->status;
  
! 	dbg(__FUNCTION__);
  
  	CmdUrbs--;
! 	dbg(__FUNCTION__" - FREE URB %p (outstanding %d)", urb, CmdUrbs);
  
  
  	/* clean up the transfer buffer */
***************
*** 944,950 ****
  	}
  
  	if (status) {
! 		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, status);
  		return;
  	}
  
--- 942,948 ----
  	}
  
  	if (status) {
! 		dbg(__FUNCTION__" - nonzero write bulk status received: %d", status);
  		return;
  	}
  
***************
*** 952,959 ****
  	tty = edge_port->port->tty;
  
  	/* tell the tty driver that something has changed */
! 	if (tty)
! 		wake_up_interruptible(&tty->write_wait);
  
  	/* we have completed the command */
  	edge_port->commandPending = FALSE;
--- 950,956 ----
  	tty = edge_port->port->tty;
  
  	/* tell the tty driver that something has changed */
! 	wake_up_interruptible(&tty->write_wait);
  
  	/* we have completed the command */
  	edge_port->commandPending = FALSE;
***************
*** 982,1105 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  	
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (edge_port == NULL)
  		return -ENODEV;
  
! 	/* force low_latency on so that our tty_push actually forces the data through, 
! 	   otherwise it is scheduled, and with high data rates (like with OHCI) data
! 	   can get lost. */
! 	if (port->tty)
! 		port->tty->low_latency = 1;
  
! 	/* see if we've set up our endpoint info yet (can't set it up in edge_startup
! 	   as the structures were not set up at that time.) */
! 	serial = port->serial;
! 	edge_serial = (struct edgeport_serial *)serial->private;
! 	if (edge_serial == NULL) {
! 		return -ENODEV;
! 	}
! 	if (edge_serial->interrupt_in_buffer == NULL) {
! 		struct usb_serial_port *port0 = &serial->port[0];
! 		
! 		/* not set up yet, so do it now */
! 		edge_serial->interrupt_in_buffer = port0->interrupt_in_buffer;
! 		edge_serial->interrupt_in_endpoint = port0->interrupt_in_endpointAddress;
! 		edge_serial->interrupt_read_urb = port0->interrupt_in_urb;
! 		edge_serial->bulk_in_buffer = port0->bulk_in_buffer;
! 		edge_serial->bulk_in_endpoint = port0->bulk_in_endpointAddress;
! 		edge_serial->read_urb = port0->read_urb;
! 		edge_serial->bulk_out_endpoint = port0->bulk_out_endpointAddress;
  	
! 		/* set up our interrupt urb */
! 		FILL_INT_URB(edge_serial->interrupt_read_urb,
! 			     serial->dev,
! 			     usb_rcvintpipe(serial->dev,
! 					    port0->interrupt_in_endpointAddress),
! 			     port0->interrupt_in_buffer,
! 			     edge_serial->interrupt_read_urb->transfer_buffer_length,
! 			     edge_interrupt_callback, edge_serial,
! 			     edge_serial->interrupt_read_urb->interval);
  		
! 		/* set up our bulk in urb */
! 		FILL_BULK_URB(edge_serial->read_urb, serial->dev,
! 			      usb_rcvbulkpipe(serial->dev, port0->bulk_in_endpointAddress),
! 			      port0->bulk_in_buffer,
! 			      edge_serial->read_urb->transfer_buffer_length,
! 			      edge_bulk_in_callback, edge_serial);
! 
! 		/* start interrupt read for this edgeport
! 		 * this interrupt will continue as long as the edgeport is connected */
! 		response = usb_submit_urb (edge_serial->interrupt_read_urb);
! 		if (response) {
! 			err("%s - Error %d submitting control urb", __FUNCTION__, response);
  		}
! 	}
! 	
! 	/* initialize our wait queues */
! 	init_waitqueue_head(&edge_port->wait_open);
! 	init_waitqueue_head(&edge_port->wait_chase);
! 	init_waitqueue_head(&edge_port->delta_msr_wait);
! 	init_waitqueue_head(&edge_port->wait_command);
! 
! 	/* initialize our icount structure */
! 	memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount));
! 
! 	/* initialize our port settings */
! 	edge_port->txCredits            = 0;			/* Can't send any data yet */
! 	edge_port->shadowMCR            = MCR_MASTER_IE;	/* Must always set this bit to enable ints! */
! 	edge_port->chaseResponsePending = FALSE;
! 
! 	/* send a open port command */
! 	edge_port->openPending = TRUE;
! 	edge_port->open        = FALSE;
! 	response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0);
! 
! 	if (response < 0) {
! 		err("%s - error sending open port command", __FUNCTION__);
! 		edge_port->openPending = FALSE;
! 		return -ENODEV;
! 	}
  
! 	/* now wait for the port to be completly opened */
! 	timeout = OPEN_TIMEOUT;
! 	while (timeout && edge_port->openPending == TRUE) {
! 		timeout = interruptible_sleep_on_timeout (&edge_port->wait_open, timeout);
! 	}
  
! 	if (edge_port->open == FALSE) {
! 		/* open timed out */
! 		dbg("%s - open timedout", __FUNCTION__);
! 		edge_port->openPending = FALSE;
! 		return -ENODEV;
! 	}
  
! 	/* create the txfifo */
! 	edge_port->txfifo.head	= 0;
! 	edge_port->txfifo.tail	= 0;
! 	edge_port->txfifo.count	= 0;
! 	edge_port->txfifo.size	= edge_port->maxTxCredits;
! 	edge_port->txfifo.fifo	= kmalloc (edge_port->maxTxCredits, GFP_KERNEL);
! 
! 	if (!edge_port->txfifo.fifo) {
! 		dbg("%s - no memory", __FUNCTION__);
! 		edge_close (port, filp);
! 		return -ENOMEM;
! 	}
  
! 	/* Allocate a URB for the write */
! 	edge_port->write_urb = usb_alloc_urb (0);
  
! 	if (!edge_port->write_urb) {
! 		dbg("%s - no memory", __FUNCTION__);
! 		edge_close (port, filp);
! 		return -ENOMEM;
  	}
  
! 	dbg("%s(%d) - Initialize TX fifo to %d bytes", __FUNCTION__, port->number, edge_port->maxTxCredits);
! 
! 	dbg("%s exited", __FUNCTION__);
  
  	return 0;
  }
--- 979,1117 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  	
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if (edge_port == NULL)
  		return -ENODEV;
  
! 	++port->open_count;
! 	MOD_INC_USE_COUNT;
! 	
! 	if (!port->active) {
! 		port->active = 1;
  
! 		/* force low_latency on so that our tty_push actually forces the data through, 
! 		   otherwise it is scheduled, and with high data rates (like with OHCI) data
! 		   can get lost. */
! 		port->tty->low_latency = 1;
  	
! 		/* see if we've set up our endpoint info yet (can't set it up in edge_startup
! 		   as the structures were not set up at that time.) */
! 		serial = port->serial;
! 		edge_serial = (struct edgeport_serial *)serial->private;
! 		if (edge_serial == NULL) {
! 			port->active = 0;
! 			port->open_count = 0;
! 			MOD_DEC_USE_COUNT;
! 			return -ENODEV;
! 		}
! 		if (edge_serial->interrupt_in_buffer == NULL) {
! 			struct usb_serial_port *port0 = &serial->port[0];
! 			
! 			/* not set up yet, so do it now */
! 			edge_serial->interrupt_in_buffer = port0->interrupt_in_buffer;
! 			edge_serial->interrupt_in_endpoint = port0->interrupt_in_endpointAddress;
! 			edge_serial->interrupt_read_urb = port0->interrupt_in_urb;
! 			edge_serial->bulk_in_buffer = port0->bulk_in_buffer;
! 			edge_serial->bulk_in_endpoint = port0->bulk_in_endpointAddress;
! 			edge_serial->read_urb = port0->read_urb;
! 			edge_serial->bulk_out_endpoint = port0->bulk_out_endpointAddress;
  		
! 			/* set up our interrupt urb */
! 			FILL_INT_URB(edge_serial->interrupt_read_urb,
! 				     serial->dev,
! 				     usb_rcvintpipe(serial->dev,
! 					            port0->interrupt_in_endpointAddress),
! 				     port0->interrupt_in_buffer,
! 				     edge_serial->interrupt_read_urb->transfer_buffer_length,
! 				     edge_interrupt_callback, edge_serial,
! 				     edge_serial->interrupt_read_urb->interval);
! 			
! 			/* set up our bulk in urb */
! 			FILL_BULK_URB(edge_serial->read_urb, serial->dev,
! 				      usb_rcvbulkpipe(serial->dev, port0->bulk_in_endpointAddress),
! 				      port0->bulk_in_buffer,
! 				      edge_serial->read_urb->transfer_buffer_length,
! 				      edge_bulk_in_callback, edge_serial);
! 
! 			/* start interrupt read for this edgeport
! 			 * this interrupt will continue as long as the edgeport is connected */
! 			response = usb_submit_urb (edge_serial->interrupt_read_urb);
! 			if (response) {
! 				err(__FUNCTION__" - Error %d submitting control urb", response);
! 			}
  		}
! 		
! 		/* initialize our wait queues */
! 		init_waitqueue_head(&edge_port->wait_open);
! 		init_waitqueue_head(&edge_port->wait_chase);
! 		init_waitqueue_head(&edge_port->delta_msr_wait);
! 		init_waitqueue_head(&edge_port->wait_command);
! 
! 		/* initialize our icount structure */
! 		memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount));
! 
! 		/* initialize our port settings */
! 		edge_port->txCredits            = 0;			/* Can't send any data yet */
! 		edge_port->shadowMCR            = MCR_MASTER_IE;	/* Must always set this bit to enable ints! */
! 		edge_port->chaseResponsePending = FALSE;
  
! 		/* send a open port command */
! 		edge_port->openPending = TRUE;
! 		edge_port->open        = FALSE;
! 		response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0);
  
! 		if (response < 0) {
! 			err(__FUNCTION__" - error sending open port command");
! 			edge_port->openPending = FALSE;
! 			port->active = 0;
! 			port->open_count = 0;
! 			MOD_DEC_USE_COUNT;
! 			return -ENODEV;
! 		}
! 
! 		/* now wait for the port to be completly opened */
! 		timeout = OPEN_TIMEOUT;
! 		while (timeout && edge_port->openPending == TRUE) {
! 			timeout = interruptible_sleep_on_timeout (&edge_port->wait_open, timeout);
! 		}
! 
! 		if (edge_port->open == FALSE) {
! 			/* open timed out */
! 			dbg(__FUNCTION__" - open timedout");
! 			edge_port->openPending = FALSE;
! 			port->active = 0;
! 			port->open_count = 0;
! 			MOD_DEC_USE_COUNT;
! 			return -ENODEV;
! 		}
! 
! 		/* create the txfifo */
! 		edge_port->txfifo.head	= 0;
! 		edge_port->txfifo.tail	= 0;
! 		edge_port->txfifo.count	= 0;
! 		edge_port->txfifo.size	= edge_port->maxTxCredits;
! 		edge_port->txfifo.fifo	= kmalloc (edge_port->maxTxCredits, GFP_KERNEL);
! 
! 		if (!edge_port->txfifo.fifo) {
! 			dbg(__FUNCTION__" - no memory");
! 			edge_close (port, filp);
! 			return -ENOMEM;
! 		}
  
! 		/* Allocate a URB for the write */
! 		edge_port->write_urb = usb_alloc_urb (0);
  
! 		if (!edge_port->write_urb) {
! 			dbg(__FUNCTION__" - no memory");
! 			edge_close (port, filp);
! 			return -ENOMEM;
! 		}
  
! 		dbg(__FUNCTION__"(%d) - Initialize TX fifo to %d bytes", port->number, edge_port->maxTxCredits);
  	}
  
! 	dbg(__FUNCTION__" exited");
  
  	return 0;
  }
***************
*** 1127,1137 ****
  
  		// Did we get our Chase response
  		if (edge_port->chaseResponsePending == FALSE) {
! 			dbg("%s - Got Chase Response", __FUNCTION__);
  
  			// did we get all of our credit back?
  			if (edge_port->txCredits == edge_port->maxTxCredits ) {
! 				dbg("%s - Got all credits", __FUNCTION__);
  				return;
  			}
  		}
--- 1139,1149 ----
  
  		// Did we get our Chase response
  		if (edge_port->chaseResponsePending == FALSE) {
! 			dbg(__FUNCTION__" - Got Chase Response");
  
  			// did we get all of our credit back?
  			if (edge_port->txCredits == edge_port->maxTxCredits ) {
! 				dbg(__FUNCTION__" - Got all credits");
  				return;
  			}
  		}
***************
*** 1144,1155 ****
  			wait--;
  			if (wait == 0) {
  				edge_port->chaseResponsePending = FALSE;
! 				dbg("%s - Chase TIMEOUT", __FUNCTION__);
  				return;
  			}
  		} else {
  			// Reset timout value back to 10 seconds
! 			dbg("%s - Last %d, Current %d", __FUNCTION__, lastCredits, edge_port->txCredits);
  			wait = 10;
  		}
  	}
--- 1156,1167 ----
  			wait--;
  			if (wait == 0) {
  				edge_port->chaseResponsePending = FALSE;
! 				dbg(__FUNCTION__" - Chase TIMEOUT");
  				return;
  			}
  		} else {
  			// Reset timout value back to 10 seconds
! 			dbg(__FUNCTION__" - Last %d, Current %d", lastCredits, edge_port->txCredits);
  			wait = 10;
  		}
  	}
***************
*** 1179,1198 ****
  
  		// Is the Edgeport Buffer empty?
  		if (lastCount == 0) {
! 			dbg("%s - TX Buffer Empty", __FUNCTION__);
  			return;
  		}
  
  		// Block the thread for a while
  		interruptible_sleep_on_timeout (&edge_port->wait_chase, timeout);
  
! 		dbg("%s wait", __FUNCTION__);
  
  		if (lastCount == fifo->count) {
  			// No activity.. count down.
  			wait--;
  			if (wait == 0) {
! 				dbg("%s - TIMEOUT", __FUNCTION__);
  				return;
  			}
  		} else {
--- 1191,1210 ----
  
  		// Is the Edgeport Buffer empty?
  		if (lastCount == 0) {
! 			dbg(__FUNCTION__" - TX Buffer Empty");
  			return;
  		}
  
  		// Block the thread for a while
  		interruptible_sleep_on_timeout (&edge_port->wait_chase, timeout);
  
! 		dbg(__FUNCTION__ " wait");
  
  		if (lastCount == fifo->count) {
  			// No activity.. count down.
  			wait--;
  			if (wait == 0) {
! 				dbg(__FUNCTION__" - TIMEOUT");
  				return;
  			}
  		} else {
***************
*** 1217,1223 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  			 
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
--- 1229,1235 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg(__FUNCTION__ " - port %d", port->number);
  			 
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
***************
*** 1228,1277 ****
  	if ((edge_serial == NULL) || (edge_port == NULL))
  		return;
  	
! 	if (serial->dev) {
! 		// block until tx is empty
! 		block_until_tx_empty(edge_port);
! 
! 		edge_port->closePending = TRUE;
! 
! 		/* flush and chase */
! 		edge_port->chaseResponsePending = TRUE;
! 
! 		dbg("%s - Sending IOSP_CMD_CHASE_PORT", __FUNCTION__);
! 		status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
! 		if (status == 0) {
! 			// block until chase finished
! 			block_until_chase_response(edge_port);
! 		} else {
! 			edge_port->chaseResponsePending = FALSE;
! 		}
  
! 		/* close the port */
! 		dbg("%s - Sending IOSP_CMD_CLOSE_PORT", __FUNCTION__);
! 		send_iosp_ext_cmd (edge_port, IOSP_CMD_CLOSE_PORT, 0);
  
! 		//port->close = TRUE;
! 		edge_port->closePending = FALSE;
! 		edge_port->open = FALSE;
! 		edge_port->openPending = FALSE;
  
  		if (edge_port->write_urb) {
! 			usb_unlink_urb (edge_port->write_urb);
  		}
! 	}
! 
! 	if (edge_port->write_urb) {
! 		/* if this urb had a transfer buffer already (old transfer) free it */
! 		if (edge_port->write_urb->transfer_buffer != NULL) {
! 			kfree(edge_port->write_urb->transfer_buffer);
  		}
! 		usb_free_urb   (edge_port->write_urb);
! 	}
! 	if (edge_port->txfifo.fifo) {
! 		kfree(edge_port->txfifo.fifo);
  	}
  
! 	dbg("%s exited", __FUNCTION__);
  }   
  
  /*****************************************************************************
--- 1240,1296 ----
  	if ((edge_serial == NULL) || (edge_port == NULL))
  		return;
  	
! 	--port->open_count;
  
! 	if (port->open_count <= 0) {
! 		if (serial->dev) {
! 			// block until tx is empty
! 			block_until_tx_empty(edge_port);
! 
! 			edge_port->closePending = TRUE;
! 
! 			/* flush and chase */
! 			edge_port->chaseResponsePending = TRUE;
! 
! 			dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT");
! 			status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
! 			if (status == 0) {
! 				// block until chase finished
! 				block_until_chase_response(edge_port);
! 			} else {
! 				edge_port->chaseResponsePending = FALSE;
! 			}
  
! 			/* close the port */
! 			dbg(__FUNCTION__" - Sending IOSP_CMD_CLOSE_PORT");
! 			send_iosp_ext_cmd (edge_port, IOSP_CMD_CLOSE_PORT, 0);
! 
! 			//port->close = TRUE;
! 			edge_port->closePending = FALSE;
! 			edge_port->open = FALSE;
! 			edge_port->openPending = FALSE;
  
+ 			if (edge_port->write_urb) {
+ 				usb_unlink_urb (edge_port->write_urb);
+ 			}
+ 		}
+ 	
  		if (edge_port->write_urb) {
! 			/* if this urb had a transfer buffer already (old transfer) free it */
! 			if (edge_port->write_urb->transfer_buffer != NULL) {
! 				kfree(edge_port->write_urb->transfer_buffer);
! 			}
! 			usb_free_urb   (edge_port->write_urb);
  		}
! 		if (edge_port->txfifo.fifo) {
! 			kfree(edge_port->txfifo.fifo);
  		}
! 		port->active = 0;
! 		port->open_count = 0;
  	}
  
! 	MOD_DEC_USE_COUNT;
! 	dbg(__FUNCTION__" exited");
  }   
  
  /*****************************************************************************
***************
*** 1290,1296 ****
  	int firsthalf;
  	int secondhalf;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (edge_port == NULL)
  		return -ENODEV;
--- 1309,1315 ----
  	int firsthalf;
  	int secondhalf;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if (edge_port == NULL)
  		return -ENODEV;
***************
*** 1301,1312 ****
  	// calculate number of bytes to put in fifo
  	copySize = min ((unsigned int)count, (edge_port->txCredits - fifo->count));
  
! 	dbg("%s(%d) of %d byte(s) Fifo room  %d -- will copy %d bytes", __FUNCTION__, 
  	    port->number, count, edge_port->txCredits - fifo->count, copySize);
  
  	/* catch writes of 0 bytes which the tty driver likes to give us, and when txCredits is empty */
  	if (copySize == 0) {
! 		dbg("%s - copySize = Zero", __FUNCTION__);
  		return 0;
  	}
  
--- 1320,1331 ----
  	// calculate number of bytes to put in fifo
  	copySize = min ((unsigned int)count, (edge_port->txCredits - fifo->count));
  
! 	dbg(__FUNCTION__"(%d) of %d byte(s) Fifo room  %d -- will copy %d bytes", 
  	    port->number, count, edge_port->txCredits - fifo->count, copySize);
  
  	/* catch writes of 0 bytes which the tty driver likes to give us, and when txCredits is empty */
  	if (copySize == 0) {
! 		dbg (__FUNCTION__" - copySize = Zero");
  		return 0;
  	}
  
***************
*** 1318,1324 ****
  
  	bytesleft = fifo->size - fifo->head;
  	firsthalf = min (bytesleft, copySize);
! 	dbg("%s - copy %d bytes of %d into fifo ", __FUNCTION__, firsthalf, bytesleft);
  
  	/* now copy our data */
  	if (from_user) {
--- 1337,1343 ----
  
  	bytesleft = fifo->size - fifo->head;
  	firsthalf = min (bytesleft, copySize);
! 	dbg (__FUNCTION__" - copy %d bytes of %d into fifo ", firsthalf, bytesleft);
  
  	/* now copy our data */
  	if (from_user) {
***************
*** 1340,1346 ****
  	secondhalf = copySize-firsthalf;
  
  	if (secondhalf) {
! 		dbg("%s - copy rest of data %d", __FUNCTION__, secondhalf);
  		if (from_user) {
  			if (copy_from_user(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf))
  				return -EFAULT;
--- 1359,1365 ----
  	secondhalf = copySize-firsthalf;
  
  	if (secondhalf) {
! 		dbg (__FUNCTION__" - copy rest of data %d", secondhalf);
  		if (from_user) {
  			if (copy_from_user(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf))
  				return -EFAULT;
***************
*** 1359,1365 ****
  
  	send_more_port_data((struct edgeport_serial *)port->serial->private, edge_port);
  
! 	dbg("%s wrote %d byte(s) TxCredits %d, Fifo %d", __FUNCTION__, copySize, edge_port->txCredits, fifo->count);
  
  	return copySize;   
  }
--- 1378,1384 ----
  
  	send_more_port_data((struct edgeport_serial *)port->serial->private, edge_port);
  
! 	dbg(__FUNCTION__" wrote %d byte(s) TxCredits %d, Fifo %d", copySize, edge_port->txCredits, fifo->count);
  
  	return copySize;   
  }
***************
*** 1389,1400 ****
  	int		firsthalf;
  	int		secondhalf;
  
! 	dbg("%s(%d)", __FUNCTION__, edge_port->port->number);
  
  	if (edge_port->write_in_progress ||
  	    !edge_port->open             ||
  	    (fifo->count == 0)) {
! 		dbg("%s(%d) EXIT - fifo %d, PendingWrite = %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->write_in_progress);
  		return;
  	}
  
--- 1408,1419 ----
  	int		firsthalf;
  	int		secondhalf;
  
! 	dbg(__FUNCTION__"(%d)", edge_port->port->number);
  
  	if (edge_port->write_in_progress ||
  	    !edge_port->open             ||
  	    (fifo->count == 0)) {
! 		dbg(__FUNCTION__"(%d) EXIT - fifo %d, PendingWrite = %d", edge_port->port->number, fifo->count, edge_port->write_in_progress);
  		return;
  	}
  
***************
*** 1406,1412 ****
  	//	it's better to wait for more credits so we can do a larger
  	//	write.
  	if (edge_port->txCredits < EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(edge_port->maxTxCredits)) {
! 		dbg("%s(%d) Not enough credit - fifo %d TxCredit %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->txCredits );
  		return;
  	}
  
--- 1425,1431 ----
  	//	it's better to wait for more credits so we can do a larger
  	//	write.
  	if (edge_port->txCredits < EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(edge_port->maxTxCredits)) {
! 		dbg(__FUNCTION__"(%d) Not enough credit - fifo %d TxCredit %d", edge_port->port->number, fifo->count, edge_port->txCredits );
  		return;
  	}
  
***************
*** 1424,1437 ****
  
  	/* build the data header for the buffer and port that we are about to send out */
  	count = fifo->count;
! 	buffer = kmalloc (count+2, GFP_ATOMIC);
  	if (buffer == NULL) {
! 		err("%s - no more kernel memory...", __FUNCTION__);
  		edge_port->write_in_progress = FALSE;
  		return;
  	}
! 	buffer[0] = IOSP_BUILD_DATA_HDR1 (edge_port->port->number - edge_port->port->serial->minor, count);
! 	buffer[1] = IOSP_BUILD_DATA_HDR2 (edge_port->port->number - edge_port->port->serial->minor, count);
  
  	/* now copy our data */
  	bytesleft =  fifo->size - fifo->tail;
--- 1443,1456 ----
  
  	/* build the data header for the buffer and port that we are about to send out */
  	count = fifo->count;
! 	buffer = kmalloc (count+2, GFP_KERNEL);
  	if (buffer == NULL) {
! 		err(__FUNCTION__" - no more kernel memory...");
  		edge_port->write_in_progress = FALSE;
  		return;
  	}
! 	buffer[0] = IOSP_BUILD_DATA_HDR1 (edge_port->port->number, count);
! 	buffer[1] = IOSP_BUILD_DATA_HDR2 (edge_port->port->number, count);
  
  	/* now copy our data */
  	bytesleft =  fifo->size - fifo->tail;
***************
*** 1466,1479 ****
  	status = usb_submit_urb(urb);
  	if (status) {
  		/* something went wrong */
! 		dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__);
  		edge_port->write_in_progress = FALSE;
  	} else {
  		/* decrement the number of credits we have by the number we just sent */
  		edge_port->txCredits -= count;
  		edge_port->icount.tx += count;
  	}
! 	dbg("%s wrote %d byte(s) TxCredit %d, Fifo %d", __FUNCTION__, count, edge_port->txCredits, fifo->count);
  }
  
  
--- 1485,1498 ----
  	status = usb_submit_urb(urb);
  	if (status) {
  		/* something went wrong */
! 		dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed");
  		edge_port->write_in_progress = FALSE;
  	} else {
  		/* decrement the number of credits we have by the number we just sent */
  		edge_port->txCredits -= count;
  		edge_port->icount.tx += count;
  	}
! 	dbg(__FUNCTION__" wrote %d byte(s) TxCredit %d, Fifo %d", count, edge_port->txCredits, fifo->count);
  }
  
  
***************
*** 1490,1513 ****
  	struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
  	int room;
  
! 	dbg("%s", __FUNCTION__);
  
  	if (edge_port == NULL)
  		return -ENODEV;
  	if (edge_port->closePending == TRUE)
  		return -ENODEV;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (!edge_port->open) {
! 		dbg("%s - port not opened", __FUNCTION__);
  		return -EINVAL;
  	}
  
  	// total of both buffers is still txCredit
  	room = edge_port->txCredits - edge_port->txfifo.count;
  
! 	dbg("%s - returns %d", __FUNCTION__, room);
  	return room;
  }
  
--- 1509,1532 ----
  	struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
  	int room;
  
! 	dbg(__FUNCTION__);
  
  	if (edge_port == NULL)
  		return -ENODEV;
  	if (edge_port->closePending == TRUE)
  		return -ENODEV;
  
! 	dbg(__FUNCTION__" - port %d", port->number);
  
  	if (!edge_port->open) {
! 		dbg (__FUNCTION__" - port not opened");
  		return -EINVAL;
  	}
  
  	// total of both buffers is still txCredit
  	room = edge_port->txCredits - edge_port->txfifo.count;
  
! 	dbg(__FUNCTION__" - returns %d", room);
  	return room;
  }
  
***************
*** 1526,1532 ****
  	struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
  	int num_chars;
  
! 	dbg("%s", __FUNCTION__);
  
  	if (edge_port == NULL)
  		return -ENODEV;
--- 1545,1551 ----
  	struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
  	int num_chars;
  
! 	dbg(__FUNCTION__);
  
  	if (edge_port == NULL)
  		return -ENODEV;
***************
*** 1534,1546 ****
  		return -ENODEV;
  
  	if (!edge_port->open) {
! 		dbg("%s - port not opened", __FUNCTION__);
  		return -EINVAL;
  	}
  
  	num_chars = edge_port->maxTxCredits - edge_port->txCredits + edge_port->txfifo.count;
  	if (num_chars) {
! 		dbg("%s(port %d) - returns %d", __FUNCTION__, port->number, num_chars);
  	}
  
  	return num_chars;
--- 1553,1565 ----
  		return -ENODEV;
  
  	if (!edge_port->open) {
! 		dbg (__FUNCTION__" - port not opened");
  		return -EINVAL;
  	}
  
  	num_chars = edge_port->maxTxCredits - edge_port->txCredits + edge_port->txfifo.count;
  	if (num_chars) {
! 		dbg(__FUNCTION__"(port %d) - returns %d", port->number, num_chars);
  	}
  
  	return num_chars;
***************
*** 1558,1578 ****
  	struct tty_struct *tty;
  	int status;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (edge_port == NULL)
  		return;
  
  	if (!edge_port->open) {
! 		dbg("%s - port not opened", __FUNCTION__);
  		return;
  	}
  
  	tty = port->tty;
- 	if (!tty) {
- 		dbg ("%s - no tty available", __FUNCTION__);
- 		return;
- 	}
  
  	/* if we are implementing XON/XOFF, send the stop character */
  	if (I_IXOFF(tty)) {
--- 1577,1593 ----
  	struct tty_struct *tty;
  	int status;
  
! 	dbg(__FUNCTION__" - port %d", port->number);
  
  	if (edge_port == NULL)
  		return;
  
  	if (!edge_port->open) {
! 		dbg (__FUNCTION__" - port not opened");
  		return;
  	}
  
  	tty = port->tty;
  
  	/* if we are implementing XON/XOFF, send the stop character */
  	if (I_IXOFF(tty)) {
***************
*** 1607,1627 ****
  	struct tty_struct *tty;
  	int status;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (edge_port == NULL)
  		return;
  
  	if (!edge_port->open) {
! 		dbg("%s - port not opened", __FUNCTION__);
  		return;
  	}
  
  	tty = port->tty;
- 	if (!tty) {
- 		dbg ("%s - no tty available", __FUNCTION__);
- 		return;
- 	}
  
  	/* if we are implementing XON/XOFF, send the start character */
  	if (I_IXOFF(tty)) {
--- 1622,1638 ----
  	struct tty_struct *tty;
  	int status;
  
! 	dbg(__FUNCTION__" - port %d", port->number);
  
  	if (edge_port == NULL)
  		return;
  
  	if (!edge_port->open) {
! 		dbg (__FUNCTION__" - port not opened");
  		return;
  	}
  
  	tty = port->tty;
  
  	/* if we are implementing XON/XOFF, send the start character */
  	if (I_IXOFF(tty)) {
***************
*** 1653,1691 ****
  {
  	struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
  	struct tty_struct *tty = port->tty;
! 	unsigned int cflag;
  
! 	if (!port->tty || !port->tty->termios) {
! 		dbg ("%s - no tty or termios", __FUNCTION__);
! 		return;
! 	}
  
- 	cflag = tty->termios->c_cflag;
  	/* check that they really want us to change something */
  	if (old_termios) {
  		if ((cflag == old_termios->c_cflag) &&
  		    (RELEVANT_IFLAG(tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
! 			dbg("%s - nothing to change", __FUNCTION__);
  			return;
  		}
  	}
  
! 	dbg("%s - clfag %08x iflag %08x", __FUNCTION__, 
! 	    tty->termios->c_cflag,
! 	    RELEVANT_IFLAG(tty->termios->c_iflag));
! 	if (old_termios) {
! 		dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__,
! 		    old_termios->c_cflag,
! 		    RELEVANT_IFLAG(old_termios->c_iflag));
! 	}
! 
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (edge_port == NULL)
  		return;
  
  	if (!edge_port->open) {
! 		dbg("%s - port not opened", __FUNCTION__);
  		return;
  	}
  
--- 1664,1694 ----
  {
  	struct edgeport_port *edge_port = (struct edgeport_port *)(port->private);
  	struct tty_struct *tty = port->tty;
! 	unsigned int cflag = tty->termios->c_cflag;
  
! 	dbg(__FUNCTION__" - clfag %08x %08x iflag %08x %08x", 
! 	    tty->termios->c_cflag,
! 	    old_termios->c_cflag,
! 	    RELEVANT_IFLAG(tty->termios->c_iflag),
! 	    RELEVANT_IFLAG(old_termios->c_iflag)
! 	   );
  
  	/* check that they really want us to change something */
  	if (old_termios) {
  		if ((cflag == old_termios->c_cflag) &&
  		    (RELEVANT_IFLAG(tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
! 			dbg(__FUNCTION__" - nothing to change");
  			return;
  		}
  	}
  
! 	dbg(__FUNCTION__" - port %d", port->number);
  
  	if (edge_port == NULL)
  		return;
  
  	if (!edge_port->open) {
! 		dbg (__FUNCTION__" - port not opened");
  		return;
  	}
  
***************
*** 1712,1718 ****
  
  	if (edge_port->maxTxCredits == edge_port->txCredits &&
  	    edge_port->txfifo.count == 0) {
! 		dbg("%s -- Empty", __FUNCTION__);
  		result = TIOCSER_TEMT;
  	}
  
--- 1715,1721 ----
  
  	if (edge_port->maxTxCredits == edge_port->txCredits &&
  	    edge_port->txfifo.count == 0) {
! 		dbg(__FUNCTION__" -- Empty");
  		result = TIOCSER_TEMT;
  	}
  
***************
*** 1726,1737 ****
  	unsigned int result = 0;
  	struct tty_struct *tty = edge_port->port->tty;
  
- 	if (!tty)
- 		return -ENOIOCTLCMD;
- 
  	result = tty->read_cnt;
  
! 	dbg("%s(%d) = %d", __FUNCTION__,  edge_port->port->number, result);
  	if (copy_to_user(value, &result, sizeof(int)))
  		return -EFAULT;
  	//return 0;
--- 1729,1737 ----
  	unsigned int result = 0;
  	struct tty_struct *tty = edge_port->port->tty;
  
  	result = tty->read_cnt;
  
! 	dbg(__FUNCTION__"(%d) = %d",  edge_port->port->number, result);
  	if (copy_to_user(value, &result, sizeof(int)))
  		return -EFAULT;
  	//return 0;
***************
*** 1796,1802 ****
  		  | ((msr & MSR_DSR)	? TIOCM_DSR: 0);  /* 0x100 */
  
  
! 	dbg("%s -- %x", __FUNCTION__, result);
  
  	if (copy_to_user(value, &result, sizeof(int)))
  		return -EFAULT;
--- 1796,1802 ----
  		  | ((msr & MSR_DSR)	? TIOCM_DSR: 0);  /* 0x100 */
  
  
! 	dbg(__FUNCTION__" -- %x", result);
  
  	if (copy_to_user(value, &result, sizeof(int)))
  		return -EFAULT;
***************
*** 1847,1886 ****
  	struct serial_icounter_struct icount;
  
  
! 	dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd);
  
  	switch (cmd) {
  		// return number of bytes available
  		case TIOCINQ:
! 			dbg("%s (%d) TIOCINQ", __FUNCTION__,  port->number);
  			return get_number_bytes_avail(edge_port, (unsigned int *) arg);
  			break;
  
  		case TIOCSERGETLSR:
! 			dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__,  port->number);
  			return get_lsr_info(edge_port, (unsigned int *) arg);
  			return 0;
  
  		case TIOCMBIS:
  		case TIOCMBIC:
  		case TIOCMSET:
! 			dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__,  port->number);
  			return set_modem_info(edge_port, cmd, (unsigned int *) arg);
  
  		case TIOCMGET:  
! 			dbg("%s (%d) TIOCMGET", __FUNCTION__,  port->number);
  			return get_modem_info(edge_port, (unsigned int *) arg);
  
  		case TIOCGSERIAL:
! 			dbg("%s (%d) TIOCGSERIAL", __FUNCTION__,  port->number);
  			return get_serial_info(edge_port, (struct serial_struct *) arg);
  
  		case TIOCSSERIAL:
! 			dbg("%s (%d) TIOCSSERIAL", __FUNCTION__,  port->number);
  			break;
  
  		case TIOCMIWAIT:
! 			dbg("%s (%d) TIOCMIWAIT", __FUNCTION__,  port->number);
  			cprev = edge_port->icount;
  			while (1) {
  				interruptible_sleep_on(&edge_port->delta_msr_wait);
--- 1847,1886 ----
  	struct serial_icounter_struct icount;
  
  
! 	dbg(__FUNCTION__" - port %d, cmd = 0x%x", port->number, cmd);
  
  	switch (cmd) {
  		// return number of bytes available
  		case TIOCINQ:
! 			dbg(__FUNCTION__" (%d) TIOCINQ",  port->number);
  			return get_number_bytes_avail(edge_port, (unsigned int *) arg);
  			break;
  
  		case TIOCSERGETLSR:
! 			dbg(__FUNCTION__" (%d) TIOCSERGETLSR",  port->number);
  			return get_lsr_info(edge_port, (unsigned int *) arg);
  			return 0;
  
  		case TIOCMBIS:
  		case TIOCMBIC:
  		case TIOCMSET:
! 			dbg(__FUNCTION__" (%d) TIOCMSET/TIOCMBIC/TIOCMSET",  port->number);
  			return set_modem_info(edge_port, cmd, (unsigned int *) arg);
  
  		case TIOCMGET:  
! 			dbg(__FUNCTION__" (%d) TIOCMGET",  port->number);
  			return get_modem_info(edge_port, (unsigned int *) arg);
  
  		case TIOCGSERIAL:
! 			dbg(__FUNCTION__" (%d) TIOCGSERIAL",  port->number);
  			return get_serial_info(edge_port, (struct serial_struct *) arg);
  
  		case TIOCSSERIAL:
! 			dbg(__FUNCTION__" (%d) TIOCSSERIAL",  port->number);
  			break;
  
  		case TIOCMIWAIT:
! 			dbg(__FUNCTION__" (%d) TIOCMIWAIT",  port->number);
  			cprev = edge_port->icount;
  			while (1) {
  				interruptible_sleep_on(&edge_port->delta_msr_wait);
***************
*** 1916,1922 ****
  			icount.brk = cnow.brk;
  			icount.buf_overrun = cnow.buf_overrun;
  
! 			dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__,  port->number, icount.rx, icount.tx );
  			if (copy_to_user((void *)arg, &icount, sizeof(icount)))
  				return -EFAULT;
  			return 0;
--- 1916,1922 ----
  			icount.brk = cnow.brk;
  			icount.buf_overrun = cnow.buf_overrun;
  
! 			dbg(__FUNCTION__" (%d) TIOCGICOUNT RX=%d, TX=%d",  port->number, icount.rx, icount.tx );
  			if (copy_to_user((void *)arg, &icount, sizeof(icount)))
  				return -EFAULT;
  			return 0;
***************
*** 1938,1944 ****
  	/* flush and chase */
  	edge_port->chaseResponsePending = TRUE;
  
! 	dbg("%s - Sending IOSP_CMD_CHASE_PORT", __FUNCTION__);
  	status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
  	if (status == 0) {
  		// block until chase finished
--- 1938,1944 ----
  	/* flush and chase */
  	edge_port->chaseResponsePending = TRUE;
  
! 	dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT");
  	status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0);
  	if (status == 0) {
  		// block until chase finished
***************
*** 1948,1961 ****
  	}
  
  	if (break_state == -1) {
! 		dbg("%s - Sending IOSP_CMD_SET_BREAK", __FUNCTION__);
  		status = send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_BREAK, 0);
  	} else {
! 		dbg("%s - Sending IOSP_CMD_CLEAR_BREAK", __FUNCTION__);
  		status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CLEAR_BREAK, 0);
  	}
  	if (status) {
! 		dbg("%s - error sending break set/clear command.", __FUNCTION__);
  	}
  
  	return;
--- 1948,1961 ----
  	}
  
  	if (break_state == -1) {
! 		dbg(__FUNCTION__" - Sending IOSP_CMD_SET_BREAK");
  		status = send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_BREAK, 0);
  	} else {
! 		dbg(__FUNCTION__" - Sending IOSP_CMD_CLEAR_BREAK");
  		status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CLEAR_BREAK, 0);
  	}
  	if (status) {
! 		dbg(__FUNCTION__" - error sending break set/clear command.");
  	}
  
  	return;
***************
*** 1975,1988 ****
  	__u16 rxLen;
  	int i;
  
! 	dbg("%s", __FUNCTION__);
  
  	lastBufferLength = bufferLength + 1;
  
  	while (bufferLength > 0) {
  		/* failsafe incase we get a message that we don't understand */
  		if (lastBufferLength == bufferLength) {
! 			dbg("%s - stuck in loop, exiting it.", __FUNCTION__);
  			break;
  		}
  		lastBufferLength = bufferLength;
--- 1975,1988 ----
  	__u16 rxLen;
  	int i;
  
! 	dbg(__FUNCTION__);
  
  	lastBufferLength = bufferLength + 1;
  
  	while (bufferLength > 0) {
  		/* failsafe incase we get a message that we don't understand */
  		if (lastBufferLength == bufferLength) {
! 			dbg(__FUNCTION__" - stuck in loop, exiting it.");
  			break;
  		}
  		lastBufferLength = bufferLength;
***************
*** 2004,2010 ****
  				++buffer;
  				--bufferLength;
  
! 				dbg("%s - Hdr1=%02X Hdr2=%02X", __FUNCTION__, edge_serial->rxHeader1, edge_serial->rxHeader2);
  
  				// Process depending on whether this header is
  				// data or status
--- 2004,2010 ----
  				++buffer;
  				--bufferLength;
  
! 				dbg(__FUNCTION__" - Hdr1=%02X Hdr2=%02X", edge_serial->rxHeader1, edge_serial->rxHeader2);
  
  				// Process depending on whether this header is
  				// data or status
***************
*** 2035,2041 ****
  					edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1);
  					edge_serial->rxBytesRemaining = IOSP_GET_HDR_DATA_LEN(edge_serial->rxHeader1, edge_serial->rxHeader2);
  
! 					dbg("%s - Data for Port %u Len %u", __FUNCTION__, edge_serial->rxPort, edge_serial->rxBytesRemaining);
  
  					//ASSERT( DevExt->RxPort < DevExt->NumPorts );
  					//ASSERT( DevExt->RxBytesRemaining < IOSP_MAX_DATA_LENGTH );
--- 2035,2041 ----
  					edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1);
  					edge_serial->rxBytesRemaining = IOSP_GET_HDR_DATA_LEN(edge_serial->rxHeader1, edge_serial->rxHeader2);
  
! 					dbg(__FUNCTION__" - Data for Port %u Len %u", edge_serial->rxPort, edge_serial->rxBytesRemaining);
  
  					//ASSERT( DevExt->RxPort < DevExt->NumPorts );
  					//ASSERT( DevExt->RxBytesRemaining < IOSP_MAX_DATA_LENGTH );
***************
*** 2069,2075 ****
  						if (edge_port->open) {
  							tty = edge_port->port->tty;
  							if (tty) {
! 								dbg("%s - Sending %d bytes to TTY for port %d", __FUNCTION__, rxLen, edge_serial->rxPort);
  								for (i = 0; i < rxLen ; ++i) {
  									/* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
  									if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
--- 2069,2075 ----
  						if (edge_port->open) {
  							tty = edge_port->port->tty;
  							if (tty) {
! 								dbg (__FUNCTION__" - Sending %d bytes to TTY for port %d", rxLen, edge_serial->rxPort);
  								for (i = 0; i < rxLen ; ++i) {
  									/* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
  									if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
***************
*** 2122,2138 ****
  	}
  	edge_port = (struct edgeport_port *)port->private;
  	if (edge_port == NULL) {
! 		err("%s - edge_port == NULL for port %d", __FUNCTION__, edge_serial->rxPort);
  		return;
  	}
  
! 	dbg("%s - port %d", __FUNCTION__, edge_serial->rxPort);
  
  	if (code == IOSP_EXT_STATUS) {
  		switch (byte2) {
  			case IOSP_EXT_STATUS_CHASE_RSP:
  				// we want to do EXT status regardless of port open/closed 
! 				dbg("%s - Port %u EXT CHASE_RSP Data = %02x", __FUNCTION__, edge_serial->rxPort, byte3 );
  				// Currently, the only EXT_STATUS is Chase, so process here instead of one more call
  				// to one more subroutine. If/when more EXT_STATUS, there'll be more work to do.
  				// Also, we currently clear flag and close the port regardless of content of above's Byte3.
--- 2122,2138 ----
  	}
  	edge_port = (struct edgeport_port *)port->private;
  	if (edge_port == NULL) {
! 		err (__FUNCTION__ " - edge_port == NULL for port %d", edge_serial->rxPort);
  		return;
  	}
  
! 	dbg(__FUNCTION__" - port %d", edge_serial->rxPort);
  
  	if (code == IOSP_EXT_STATUS) {
  		switch (byte2) {
  			case IOSP_EXT_STATUS_CHASE_RSP:
  				// we want to do EXT status regardless of port open/closed 
! 				dbg(__FUNCTION__" - Port %u EXT CHASE_RSP Data = %02x", edge_serial->rxPort, byte3 );
  				// Currently, the only EXT_STATUS is Chase, so process here instead of one more call
  				// to one more subroutine. If/when more EXT_STATUS, there'll be more work to do.
  				// Also, we currently clear flag and close the port regardless of content of above's Byte3.
***************
*** 2143,2149 ****
  				return;
  
  			case IOSP_EXT_STATUS_RX_CHECK_RSP:
! 				dbg("%s ========== Port %u CHECK_RSP Sequence = %02x =============\n", __FUNCTION__, edge_serial->rxPort, byte3 );
  				//Port->RxCheckRsp = TRUE;
  				return;
  		}
--- 2143,2149 ----
  				return;
  
  			case IOSP_EXT_STATUS_RX_CHECK_RSP:
! 				dbg( __FUNCTION__" ========== Port %u CHECK_RSP Sequence = %02x =============\n", edge_serial->rxPort, byte3 );
  				//Port->RxCheckRsp = TRUE;
  				return;
  		}
***************
*** 2152,2163 ****
  	if (code == IOSP_STATUS_OPEN_RSP) {
  		edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3);
  		edge_port->maxTxCredits = edge_port->txCredits;
! 		dbg("%s - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", __FUNCTION__, edge_serial->rxPort, byte2, edge_port->txCredits);
  		handle_new_msr (edge_port, byte2);
  
  		/* send the current line settings to the port so we are in sync with any further termios calls */
! 		if (edge_port->port->tty)
! 			change_port_settings (edge_port, edge_port->port->tty->termios);
  
  		/* we have completed the open */
  		edge_port->openPending = FALSE;
--- 2152,2162 ----
  	if (code == IOSP_STATUS_OPEN_RSP) {
  		edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3);
  		edge_port->maxTxCredits = edge_port->txCredits;
! 		dbg (__FUNCTION__" - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", edge_serial->rxPort, byte2, edge_port->txCredits);
  		handle_new_msr (edge_port, byte2);
  
  		/* send the current line settings to the port so we are in sync with any further termios calls */
! 		change_port_settings (edge_port, edge_port->port->tty->termios);
  
  		/* we have completed the open */
  		edge_port->openPending = FALSE;
***************
*** 2176,2198 ****
  	switch (code) {
  		// Not currently sent by Edgeport
  		case IOSP_STATUS_LSR:
! 			dbg("%s - Port %u LSR Status = %02x", __FUNCTION__, edge_serial->rxPort, byte2);
  			handle_new_lsr (edge_port, FALSE, byte2, 0);
  			break;
  
  		case IOSP_STATUS_LSR_DATA:
! 			dbg("%s - Port %u LSR Status = %02x, Data = %02x", __FUNCTION__, edge_serial->rxPort, byte2, byte3);
  			// byte2 is LSR Register
  			// byte3 is broken data byte
  			handle_new_lsr (edge_port, TRUE, byte2, byte3);
  			break;
  			//
  			//	case IOSP_EXT_4_STATUS:
! 			//		dbg("%s - Port %u LSR Status = %02x Data = %02x", __FUNCTION__, edge_serial->rxPort, byte2, byte3);
  			//		break;
  			//
  		case IOSP_STATUS_MSR:
! 			dbg("%s - Port %u MSR Status = %02x", __FUNCTION__, edge_serial->rxPort, byte2);
  
  			// Process this new modem status and generate appropriate
  			// events, etc, based on the new status. This routine
--- 2175,2197 ----
  	switch (code) {
  		// Not currently sent by Edgeport
  		case IOSP_STATUS_LSR:
! 			dbg(__FUNCTION__" - Port %u LSR Status = %02x", edge_serial->rxPort, byte2);
  			handle_new_lsr (edge_port, FALSE, byte2, 0);
  			break;
  
  		case IOSP_STATUS_LSR_DATA:
! 			dbg(__FUNCTION__" - Port %u LSR Status = %02x, Data = %02x", edge_serial->rxPort, byte2, byte3);
  			// byte2 is LSR Register
  			// byte3 is broken data byte
  			handle_new_lsr (edge_port, TRUE, byte2, byte3);
  			break;
  			//
  			//	case IOSP_EXT_4_STATUS:
! 			//		dbg(__FUNCTION__" - Port %u LSR Status = %02x Data = %02x", edge_serial->rxPort, byte2, byte3);
  			//		break;
  			//
  		case IOSP_STATUS_MSR:
! 			dbg(__FUNCTION__" - Port %u MSR Status = %02x", edge_serial->rxPort, byte2);
  
  			// Process this new modem status and generate appropriate
  			// events, etc, based on the new status. This routine
***************
*** 2201,2207 ****
  			break;
  
  		default:
! 			dbg("%s - Unrecognized IOSP status code %u\n", __FUNCTION__, code);
  			break;
  	}
  
--- 2200,2206 ----
  			break;
  
  		default:
! 			dbg(__FUNCTION__" - Unrecognized IOSP status code %u\n", code);
  			break;
  	}
  
***************
*** 2217,2223 ****
  {
  	struct  async_icount *icount;
  
! 	dbg("%s %02x", __FUNCTION__, newMsr);
  
  	if (newMsr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) {
  		icount = &edge_port->icount;
--- 2216,2222 ----
  {
  	struct  async_icount *icount;
  
! 	dbg(__FUNCTION__" %02x", newMsr);
  
  	if (newMsr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) {
  		icount = &edge_port->icount;
***************
*** 2254,2260 ****
  	__u8    newLsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK));
  	struct  async_icount *icount;
  
! 	dbg("%s - %02x", __FUNCTION__, newLsr);
  
  	edge_port->shadowLSR = lsr;
  
--- 2253,2259 ----
  	__u8    newLsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK));
  	struct  async_icount *icount;
  
! 	dbg(__FUNCTION__" - %02x", newLsr);
  
  	edge_port->shadowLSR = lsr;
  
***************
*** 2268,2274 ****
  	}
  
  	/* Place LSR data byte into Rx buffer */
! 	if (lsrData && edge_port->port->tty) {
  		tty_insert_flip_char(edge_port->port->tty, data, 0);
  		tty_flip_buffer_push(edge_port->port->tty);
  	}
--- 2267,2273 ----
  	}
  
  	/* Place LSR data byte into Rx buffer */
! 	if (lsrData) {
  		tty_insert_flip_char(edge_port->port->tty, data, 0);
  		tty_flip_buffer_push(edge_port->port->tty);
  	}
***************
*** 2305,2315 ****
  	__u16 current_length;
  	unsigned char *transfer_buffer;
  
! //	dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length);
  
  	transfer_buffer =  kmalloc (64, GFP_KERNEL);
  	if (!transfer_buffer) {
! 		err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
  		return -ENOMEM;
  	}
  
--- 2304,2314 ----
  	__u16 current_length;
  	unsigned char *transfer_buffer;
  
! //	dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);
  
  	transfer_buffer =  kmalloc (64, GFP_KERNEL);
  	if (!transfer_buffer) {
! 		err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
  		return -ENOMEM;
  	}
  
***************
*** 2321,2327 ****
  		} else {
  			current_length = length;
  		}
! //		dbg("%s - writing %x, %x, %d", __FUNCTION__, extAddr, addr, current_length);
  		memcpy (transfer_buffer, data, current_length);
  		result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_RAM, 
  					  0x40, addr, extAddr, transfer_buffer, current_length, 300);
--- 2320,2326 ----
  		} else {
  			current_length = length;
  		}
! //		dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length);
  		memcpy (transfer_buffer, data, current_length);
  		result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_RAM, 
  					  0x40, addr, extAddr, transfer_buffer, current_length, 300);
***************
*** 2350,2360 ****
  	__u16 current_length;
  	unsigned char *transfer_buffer;
  
! //	dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length);
  
  	transfer_buffer =  kmalloc (64, GFP_KERNEL);
  	if (!transfer_buffer) {
! 		err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
  		return -ENOMEM;
  	}
  
--- 2349,2359 ----
  	__u16 current_length;
  	unsigned char *transfer_buffer;
  
! //	dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);
  
  	transfer_buffer =  kmalloc (64, GFP_KERNEL);
  	if (!transfer_buffer) {
! 		err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
  		return -ENOMEM;
  	}
  
***************
*** 2366,2372 ****
  		} else {
  			current_length = length;
  		}
! //		dbg("%s - writing %x, %x, %d", __FUNCTION__, extAddr, addr, current_length);
  		memcpy (transfer_buffer, data, current_length);
  		result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_ROM, 
  					  0x40, addr, extAddr, transfer_buffer, current_length, 300);
--- 2365,2371 ----
  		} else {
  			current_length = length;
  		}
! //		dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length);
  		memcpy (transfer_buffer, data, current_length);
  		result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_ROM, 
  					  0x40, addr, extAddr, transfer_buffer, current_length, 300);
***************
*** 2395,2405 ****
  	__u16 current_length;
  	unsigned char *transfer_buffer;
  
! 	dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length);
  
  	transfer_buffer =  kmalloc (64, GFP_KERNEL);
  	if (!transfer_buffer) {
! 		err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
  		return -ENOMEM;
  	}
  
--- 2394,2404 ----
  	__u16 current_length;
  	unsigned char *transfer_buffer;
  
! 	dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length);
  
  	transfer_buffer =  kmalloc (64, GFP_KERNEL);
  	if (!transfer_buffer) {
! 		err(__FUNCTION__" - kmalloc(%d) failed.\n", 64);
  		return -ENOMEM;
  	}
  
***************
*** 2411,2417 ****
  		} else {
  			current_length = length;
  		}
! //		dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, current_length);
  		result = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), USB_REQUEST_ION_READ_ROM, 
  					  0xC0, addr, extAddr, transfer_buffer, current_length, 300);
  		if (result < 0)
--- 2410,2416 ----
  		} else {
  			current_length = length;
  		}
! //		dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, current_length);
  		result = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), USB_REQUEST_ION_READ_ROM, 
  					  0xC0, addr, extAddr, transfer_buffer, current_length, 300);
  		if (result < 0)
***************
*** 2438,2456 ****
  	int             length = 0;
  	int             status = 0;
  
! 	dbg("%s - %d, %d", __FUNCTION__, command, param);
  
! 	buffer =  kmalloc (10, GFP_ATOMIC);
  	if (!buffer) {
! 		err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 10);
  		return -ENOMEM;
  	}
  
  	currentCommand = buffer;
  
! 	MAKE_CMD_EXT_CMD (¤tCommand, &length,
! 			  edge_port->port->number - edge_port->port->serial->minor,
! 			  command, param);
  
  	status = write_cmd_usb (edge_port, buffer, length);
  	if (status) {
--- 2437,2453 ----
  	int             length = 0;
  	int             status = 0;
  
! 	dbg(__FUNCTION__" - %d, %d", command, param);
  
! 	buffer =  kmalloc (10, GFP_KERNEL);
  	if (!buffer) {
! 		err(__FUNCTION__" - kmalloc(%d) failed.\n", 10);
  		return -ENOMEM;
  	}
  
  	currentCommand = buffer;
  
! 	MAKE_CMD_EXT_CMD( ¤tCommand, &length, edge_port->port->number, command, param);
  
  	status = write_cmd_usb (edge_port, buffer, length);
  	if (status) {
***************
*** 2470,2476 ****
  {
  	struct edgeport_serial *edge_serial = (struct edgeport_serial *)edge_port->port->serial->private;
  	int status = 0;
! 	struct urb *urb;
  	int timeout;
  
  	usb_serial_debug_data (__FILE__, __FUNCTION__, length, buffer);
--- 2467,2473 ----
  {
  	struct edgeport_serial *edge_serial = (struct edgeport_serial *)edge_port->port->serial->private;
  	int status = 0;
! 	urb_t *urb;
  	int timeout;
  
  	usb_serial_debug_data (__FILE__, __FUNCTION__, length, buffer);
***************
*** 2481,2487 ****
  		return -ENOMEM;
  
  	CmdUrbs++;
! 	dbg("%s - ALLOCATE URB %p (outstanding %d)", __FUNCTION__, urb, CmdUrbs);
  
  	FILL_BULK_URB (urb, edge_serial->serial->dev, 
  		       usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint),
--- 2478,2484 ----
  		return -ENOMEM;
  
  	CmdUrbs++;
! 	dbg(__FUNCTION__" - ALLOCATE URB %p (outstanding %d)", urb, CmdUrbs);
  
  	FILL_BULK_URB (urb, edge_serial->serial->dev, 
  		       usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint),
***************
*** 2495,2501 ****
  
  	if (status) {
  		/* something went wrong */
! 		dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__);
  		usb_unlink_urb (urb);
  		usb_free_urb   (urb);
  		return status;
--- 2492,2498 ----
  
  	if (status) {
  		/* something went wrong */
! 		dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed");
  		usb_unlink_urb (urb);
  		usb_free_urb   (urb);
  		return status;
***************
*** 2510,2516 ****
  
  	if (edge_port->commandPending == TRUE) {
  		/* command timed out */
! 		dbg("%s - command timed out", __FUNCTION__);
  		status = -EINVAL;
  	}
  #endif
--- 2507,2513 ----
  
  	if (edge_port->commandPending == TRUE) {
  		/* command timed out */
! 		dbg(__FUNCTION__" - command timed out");
  		status = -EINVAL;
  	}
  #endif
***************
*** 2530,2549 ****
  	int cmdLen = 0;
  	int divisor;
  	int status;
! 	unsigned char number = edge_port->port->number - edge_port->port->serial->minor;
  
! 	dbg("%s - port = %d, baud = %d", __FUNCTION__, edge_port->port->number, baudRate);
  
  	status = calc_baud_rate_divisor (baudRate, &divisor);
  	if (status) {
! 		err("%s - bad baud rate", __FUNCTION__);
  		return status;
  	}
  
  	// Alloc memory for the string of commands.
! 	cmdBuffer =  kmalloc (0x100, GFP_ATOMIC);
  	if (!cmdBuffer) {
! 		err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100);
  		return -ENOMEM;
  	}
  	currCmd = cmdBuffer;
--- 2527,2546 ----
  	int cmdLen = 0;
  	int divisor;
  	int status;
! 	unsigned char number = edge_port->port->number;
  
! 	dbg(__FUNCTION__" - port = %d, baud = %d", number, baudRate);
  
  	status = calc_baud_rate_divisor (baudRate, &divisor);
  	if (status) {
! 		err(__FUNCTION__" - bad baud rate");
  		return status;
  	}
  
  	// Alloc memory for the string of commands.
! 	cmdBuffer =  kmalloc (0x100, GFP_KERNEL);
  	if (!cmdBuffer) {
! 		err(__FUNCTION__" - kmalloc(%d) failed.\n", 0x100);
  		return -ENOMEM;
  	}
  	currCmd = cmdBuffer;
***************
*** 2581,2591 ****
  	__u16 round;
  
  
! 	dbg("%s - %d", __FUNCTION__, baudrate);
  
! 	for (i = 0; i < NUM_ENTRIES(divisor_table); i++) {
! 		if ( divisor_table[i].BaudRate == baudrate ) {
! 			*divisor = divisor_table[i].Divisor;
  			return 0;
  		}
  	}
--- 2578,2588 ----
  	__u16 round;
  
  
! 	dbg(__FUNCTION__" - %d", baudrate);
  
! 	for (i = 0; i < NUM_ENTRIES(DivisorTable); i++) {
! 		if ( DivisorTable[i].BaudRate == baudrate ) {
! 			*divisor = DivisorTable[i].Divisor;
  			return 0;
  		}
  	}
***************
*** 2605,2611 ****
  		}
  		*divisor = custom;
  
! 		dbg("%s - Baud %d = %d\n", __FUNCTION__, baudrate, custom);
  		return 0;
  	}
  
--- 2602,2608 ----
  		}
  		*divisor = custom;
  
! 		dbg(__FUNCTION__" - Baud %d = %d\n", baudrate, custom);
  		return 0;
  	}
  
***************
*** 2624,2633 ****
  	unsigned long cmdLen = 0;
  	int status;
  
! 	dbg("%s - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", __FUNCTION__, regValue);
  
  	// Alloc memory for the string of commands.
! 	cmdBuffer = kmalloc (0x10, GFP_ATOMIC);
  	if (cmdBuffer == NULL ) {
  		return -ENOMEM;
  	}
--- 2621,2630 ----
  	unsigned long cmdLen = 0;
  	int status;
  
! 	dbg (__FUNCTION__" - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", regValue);
  
  	// Alloc memory for the string of commands.
! 	cmdBuffer = kmalloc (0x10, GFP_KERNEL);
  	if (cmdBuffer == NULL ) {
  		return -ENOMEM;
  	}
***************
*** 2635,2643 ****
  	currCmd = cmdBuffer;
  
  	// Build a cmd in the buffer to write the given register
! 	MAKE_CMD_WRITE_REG (&currCmd, &cmdLen,
! 			    edge_port->port->number - edge_port->port->serial->minor,
! 			    regNum, regValue);
  
  	status = write_cmd_usb(edge_port, cmdBuffer, cmdLen);
  	if (status) {
--- 2632,2638 ----
  	currCmd = cmdBuffer;
  
  	// Build a cmd in the buffer to write the given register
! 	MAKE_CMD_WRITE_REG(&currCmd, &cmdLen, edge_port->port->number, regNum, regValue);
  
  	status = write_cmd_usb(edge_port, cmdBuffer, cmdLen);
  	if (status) {
***************
*** 2667,2716 ****
  	__u8 txFlow;
  	int status;
  
! 	dbg("%s - port %d", __FUNCTION__, edge_port->port->number);
  
  	if ((!edge_port->open) &&
  	    (!edge_port->openPending)) {
! 		dbg("%s - port not opened", __FUNCTION__);
  		return;
  	}
  
  	tty = edge_port->port->tty;
  	if ((!tty) ||
  	    (!tty->termios)) {
! 		dbg("%s - no tty structures", __FUNCTION__);
  		return;
  	}
  
  	cflag = tty->termios->c_cflag;
  
  	switch (cflag & CSIZE) {
! 		case CS5:   lData = LCR_BITS_5; mask = 0x1f;    dbg("%s - data bits = 5", __FUNCTION__);   break;
! 		case CS6:   lData = LCR_BITS_6; mask = 0x3f;    dbg("%s - data bits = 6", __FUNCTION__);   break;
! 		case CS7:   lData = LCR_BITS_7; mask = 0x7f;    dbg("%s - data bits = 7", __FUNCTION__);   break;
  		default:
! 		case CS8:   lData = LCR_BITS_8;                 dbg("%s - data bits = 8", __FUNCTION__);   break;
  	}
  
  	lParity = LCR_PAR_NONE;
  	if (cflag & PARENB) {
  		if (cflag & PARODD) {
  			lParity = LCR_PAR_ODD;
! 			dbg("%s - parity = odd", __FUNCTION__);
  		} else {
  			lParity = LCR_PAR_EVEN;
! 			dbg("%s - parity = even", __FUNCTION__);
  		}
  	} else {
! 		dbg("%s - parity = none", __FUNCTION__);
  	}
  
  	if (cflag & CSTOPB) {
  		lStop = LCR_STOP_2;
! 		dbg("%s - stop bits = 2", __FUNCTION__);
  	} else {
  		lStop = LCR_STOP_1;
! 		dbg("%s - stop bits = 1", __FUNCTION__);
  	}
  
  	/* figure out the flow control settings */
--- 2662,2711 ----
  	__u8 txFlow;
  	int status;
  
! 	dbg(__FUNCTION__" - port %d", edge_port->port->number);
  
  	if ((!edge_port->open) &&
  	    (!edge_port->openPending)) {
! 		dbg(__FUNCTION__" - port not opened");
  		return;
  	}
  
  	tty = edge_port->port->tty;
  	if ((!tty) ||
  	    (!tty->termios)) {
! 		dbg(__FUNCTION__" - no tty structures");
  		return;
  	}
  
  	cflag = tty->termios->c_cflag;
  
  	switch (cflag & CSIZE) {
! 		case CS5:   lData = LCR_BITS_5; mask = 0x1f;    dbg(__FUNCTION__" - data bits = 5");   break;
! 		case CS6:   lData = LCR_BITS_6; mask = 0x3f;    dbg(__FUNCTION__" - data bits = 6");   break;
! 		case CS7:   lData = LCR_BITS_7; mask = 0x7f;    dbg(__FUNCTION__" - data bits = 7");   break;
  		default:
! 		case CS8:   lData = LCR_BITS_8;                 dbg(__FUNCTION__" - data bits = 8");   break;
  	}
  
  	lParity = LCR_PAR_NONE;
  	if (cflag & PARENB) {
  		if (cflag & PARODD) {
  			lParity = LCR_PAR_ODD;
! 			dbg(__FUNCTION__" - parity = odd");
  		} else {
  			lParity = LCR_PAR_EVEN;
! 			dbg(__FUNCTION__" - parity = even");
  		}
  	} else {
! 		dbg(__FUNCTION__" - parity = none");
  	}
  
  	if (cflag & CSTOPB) {
  		lStop = LCR_STOP_2;
! 		dbg(__FUNCTION__" - stop bits = 2");
  	} else {
  		lStop = LCR_STOP_1;
! 		dbg(__FUNCTION__" - stop bits = 1");
  	}
  
  	/* figure out the flow control settings */
***************
*** 2718,2726 ****
  	if (cflag & CRTSCTS) {
  		rxFlow |= IOSP_RX_FLOW_RTS;
  		txFlow |= IOSP_TX_FLOW_CTS;
! 		dbg("%s - RTS/CTS is enabled", __FUNCTION__);
  	} else {
! 		dbg("%s - RTS/CTS is disabled", __FUNCTION__);
  	}
  
  	/* if we are implementing XON/XOFF, set the start and stop character in the device */
--- 2713,2721 ----
  	if (cflag & CRTSCTS) {
  		rxFlow |= IOSP_RX_FLOW_RTS;
  		txFlow |= IOSP_TX_FLOW_CTS;
! 		dbg(__FUNCTION__" - RTS/CTS is enabled");
  	} else {
! 		dbg(__FUNCTION__" - RTS/CTS is disabled");
  	}
  
  	/* if we are implementing XON/XOFF, set the start and stop character in the device */
***************
*** 2734,2750 ****
  		/* if we are implementing INBOUND XON/XOFF */
  		if (I_IXOFF(tty)) {
  			rxFlow |= IOSP_RX_FLOW_XON_XOFF;
! 			dbg("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __FUNCTION__, start_char, stop_char);
  		} else {
! 			dbg("%s - INBOUND XON/XOFF is disabled", __FUNCTION__);
  		}
  
  		/* if we are implementing OUTBOUND XON/XOFF */
  		if (I_IXON(tty)) {
  			txFlow |= IOSP_TX_FLOW_XON_XOFF;
! 			dbg("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __FUNCTION__, start_char, stop_char);
  		} else {
! 			dbg("%s - OUTBOUND XON/XOFF is disabled", __FUNCTION__);
  		}
  	}
  
--- 2729,2745 ----
  		/* if we are implementing INBOUND XON/XOFF */
  		if (I_IXOFF(tty)) {
  			rxFlow |= IOSP_RX_FLOW_XON_XOFF;
! 			dbg(__FUNCTION__" - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char);
  		} else {
! 			dbg(__FUNCTION__" - INBOUND XON/XOFF is disabled");
  		}
  
  		/* if we are implementing OUTBOUND XON/XOFF */
  		if (I_IXON(tty)) {
  			txFlow |= IOSP_TX_FLOW_XON_XOFF;
! 			dbg(__FUNCTION__" - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char);
  		} else {
! 			dbg(__FUNCTION__" - OUTBOUND XON/XOFF is disabled");
  		}
  	}
  
***************
*** 2781,2787 ****
  		baud = 9600;
  	}
  
! 	dbg("%s - baud rate = %d", __FUNCTION__, baud);
  	status = send_cmd_write_baud_rate (edge_port, baud);
  
  	return;
--- 2776,2782 ----
  		baud = 9600;
  	}
  
! 	dbg(__FUNCTION__ " - baud rate = %d", baud);
  	status = send_cmd_write_baud_rate (edge_port, baud);
  
  	return;
***************
*** 2879,2885 ****
   ****************************************************************************/
  static void load_application_firmware (struct edgeport_serial *edge_serial)
  {
! 	struct edge_firmware_image_record *record;
  	unsigned char *firmware;
  	unsigned char *FirmwareImage;
  	int ImageSize;
--- 2874,2880 ----
   ****************************************************************************/
  static void load_application_firmware (struct edgeport_serial *edge_serial)
  {
! 	PEDGE_FIRMWARE_IMAGE_RECORD record;
  	unsigned char *firmware;
  	unsigned char *FirmwareImage;
  	int ImageSize;
***************
*** 2917,2929 ****
  
  
  	for (;;) {
! 		record = (struct edge_firmware_image_record *)firmware;
  		response = sram_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
  		if (response < 0) {
  			err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len);
  			break;
  		}
! 		firmware += sizeof (struct edge_firmware_image_record) + record->Len;
  		if (firmware >= &FirmwareImage[ImageSize]) {
  			break;
  		}
--- 2912,2924 ----
  
  
  	for (;;) {
! 		record = (PEDGE_FIRMWARE_IMAGE_RECORD)firmware;
  		response = sram_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
  		if (response < 0) {
  			err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len);
  			break;
  		}
! 		firmware += sizeof (EDGE_FIRMWARE_IMAGE_RECORD) + record->Len;
  		if (firmware >= &FirmwareImage[ImageSize]) {
  			break;
  		}
***************
*** 2956,2962 ****
  	/* create our private serial structure */
  	edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
  	if (edge_serial == NULL) {
! 		err("%s - Out of memory", __FUNCTION__);
  		return -ENOMEM;
  	}
  	memset (edge_serial, 0, sizeof(struct edgeport_serial));
--- 2951,2957 ----
  	/* create our private serial structure */
  	edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
  	if (edge_serial == NULL) {
! 		err(__FUNCTION__" - Out of memory");
  		return -ENOMEM;
  	}
  	memset (edge_serial, 0, sizeof(struct edgeport_serial));
***************
*** 2983,3005 ****
  	/* set the number of ports from the manufacturing description */
  	/* serial->num_ports = serial->product_info.NumPorts; */
  	if (edge_serial->product_info.NumPorts != serial->num_ports) {
! 		warn("%s - Device Reported %d serial ports vs core "
  		     "thinking we have %d ports, email greg@kroah.com this info.",
! 		     __FUNCTION__, edge_serial->product_info.NumPorts, 
! 		     serial->num_ports);
  	}
  
! 	dbg("%s - time 1 %ld", __FUNCTION__, jiffies);
  
  	/* now load the application firmware into this device */
  	load_application_firmware (edge_serial);
  
! 	dbg("%s - time 2 %ld", __FUNCTION__, jiffies);
  
  	/* Check current Edgeport EEPROM and update if necessary */
  	update_edgeport_E2PROM (edge_serial);
  	
! 	dbg("%s - time 3 %ld", __FUNCTION__, jiffies);
  
  	/* set the configuration to use #1 */
  //	dbg("set_configuration 1");
--- 2978,2999 ----
  	/* set the number of ports from the manufacturing description */
  	/* serial->num_ports = serial->product_info.NumPorts; */
  	if (edge_serial->product_info.NumPorts != serial->num_ports) {
! 		warn(__FUNCTION__ " - Device Reported %d serial ports vs core "
  		     "thinking we have %d ports, email greg@kroah.com this info.",
! 		     edge_serial->product_info.NumPorts, serial->num_ports);
  	}
  
! 	dbg(__FUNCTION__ " - time 1 %ld", jiffies);
  
  	/* now load the application firmware into this device */
  	load_application_firmware (edge_serial);
  
! 	dbg(__FUNCTION__ " - time 2 %ld", jiffies);
  
  	/* Check current Edgeport EEPROM and update if necessary */
  	update_edgeport_E2PROM (edge_serial);
  	
! 	dbg(__FUNCTION__ " - time 3 %ld", jiffies);
  
  	/* set the configuration to use #1 */
  //	dbg("set_configuration 1");
***************
*** 3012,3018 ****
  	for (i = 0; i < serial->num_ports; ++i) {
  		edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
  		if (edge_port == NULL) {
! 			err("%s - Out of memory", __FUNCTION__);
  			return -ENOMEM;
  		}
  		memset (edge_port, 0, sizeof(struct edgeport_port));
--- 3006,3012 ----
  	for (i = 0; i < serial->num_ports; ++i) {
  		edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
  		if (edge_port == NULL) {
! 			err(__FUNCTION__" - Out of memory");
  			return -ENOMEM;
  		}
  		memset (edge_port, 0, sizeof(struct edgeport_port));
***************
*** 3033,3042 ****
  {
  	int i;
  
! 	dbg("%s", __FUNCTION__);
  
  	/* stop reads and writes on all ports */
  	for (i=0; i < serial->num_ports; ++i) {
  		kfree (serial->port[i].private);
  		serial->port[i].private = NULL;
  	}
--- 3027,3039 ----
  {
  	int i;
  
! 	dbg (__FUNCTION__);
  
  	/* stop reads and writes on all ports */
  	for (i=0; i < serial->num_ports; ++i) {
+ 		while (serial->port[i].open_count > 0) {
+ 			edge_close (&serial->port[i], NULL);
+ 		}
  		kfree (serial->port[i].private);
  		serial->port[i].private = NULL;
  	}
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_edgeport.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_edgeport.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_edgeport.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_edgeport.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 136,141 ****
--- 136,142 ----
  	__u16	Strings[1];			/* Start of string block */
  };
  
+ typedef struct string_block STRING_BLOCK, *PSTRING_BLOCK;
  
  
  #endif
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_fw_boot.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_fw_boot.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_fw_boot.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_fw_boot.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 12,29 ****
  //Image structure definition
  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
  #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
! 	struct edge_firmware_image_record {
  		unsigned short ExtAddr;
  		unsigned short Addr;
  		unsigned short Len;
  		unsigned char  Data[0];
! 	};
  
! 	struct edge_firmware_version_info {
  		unsigned char	 MajorVersion;
  		unsigned char  MinorVersion;
  		unsigned short BuildNumber;
! 	};
  
  #endif
  
--- 12,31 ----
  //Image structure definition
  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
  #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
! 	typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
! 	{
  		unsigned short ExtAddr;
  		unsigned short Addr;
  		unsigned short Len;
  		unsigned char  Data[0];
! 	} EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
  
! 	typedef struct _EDGE_FIRMWARE_VERSION_INFO
! 	{
  		unsigned char	 MajorVersion;
  		unsigned char  MinorVersion;
  		unsigned short BuildNumber;
! 	} EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
  
  #endif
  
***************
*** 547,553 ****
      0x7e, 0x74, 0x00, 0x01, 0x02, 0x08, 0xd6, 
  };
  
! static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
  	1, 12, 2 };		// Major, Minor, Build
  
  #undef IMAGE_VERSION_NAME
--- 549,555 ----
      0x7e, 0x74, 0x00, 0x01, 0x02, 0x08, 0xd6, 
  };
  
! static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
  	1, 12, 2 };		// Major, Minor, Build
  
  #undef IMAGE_VERSION_NAME
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_fw_boot2.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_fw_boot2.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_fw_boot2.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_fw_boot2.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 12,29 ****
  //Image structure definition
  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
  #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
! 	struct edge_firmware_image_record {
  		unsigned short ExtAddr;
  		unsigned short Addr;
  		unsigned short Len;
  		unsigned char  Data[0];
! 	};
  
! 	struct edge_firmware_version_info {
  		unsigned char	 MajorVersion;
  		unsigned char  MinorVersion;
  		unsigned short BuildNumber;
! 	};
  
  #endif
  
--- 12,31 ----
  //Image structure definition
  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
  #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
! 	typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
! 	{
  		unsigned short ExtAddr;
  		unsigned short Addr;
  		unsigned short Len;
  		unsigned char  Data[0];
! 	} EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
  
! 	typedef struct _EDGE_FIRMWARE_VERSION_INFO
! 	{
  		unsigned char	 MajorVersion;
  		unsigned char  MinorVersion;
  		unsigned short BuildNumber;
! 	} EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
  
  #endif
  
***************
*** 537,543 ****
  
  };
  
! static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
  	2, 0, 3 };		// Major, Minor, Build
  
  #undef IMAGE_VERSION_NAME
--- 539,545 ----
  
  };
  
! static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
  	2, 0, 3 };		// Major, Minor, Build
  
  #undef IMAGE_VERSION_NAME
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_fw_down.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_fw_down.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_fw_down.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_fw_down.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 12,29 ****
  //Image structure definition
  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
  	#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
! 	struct edge_firmware_image_record {
  		unsigned short	ExtAddr;
  		unsigned short	Addr;
  		unsigned short	Len;
  		unsigned char	Data[0];
! 	};
  
! 	struct edge_firmware_version_info {
  		unsigned char	MajorVersion;
  		unsigned char	MinorVersion;
  		unsigned short	BuildNumber;
! 	};
  
  #endif
  
--- 12,31 ----
  //Image structure definition
  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
  	#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
! 	typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
! 	{
  		unsigned short	ExtAddr;
  		unsigned short	Addr;
  		unsigned short	Len;
  		unsigned char	Data[0];
! 	} EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
  
! 	typedef struct _EDGE_FIRMWARE_VERSION_INFO
! 	{
  		unsigned char	MajorVersion;
  		unsigned char	MinorVersion;
  		unsigned short	BuildNumber;
! 	} EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
  
  #endif
  
***************
*** 1112,1118 ****
      0x08, 0xa5, 0xb8, 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 
  };
  
! static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
  	1, 12, 3 };		// Major, Minor, Build
  
  #undef IMAGE_VERSION_NAME
--- 1114,1120 ----
      0x08, 0xa5, 0xb8, 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 
  };
  
! static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
  	1, 12, 3 };		// Major, Minor, Build
  
  #undef IMAGE_VERSION_NAME
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_fw_down2.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_fw_down2.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_fw_down2.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_fw_down2.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 12,29 ****
  //Image structure definition
  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
  	#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
! 	struct edge_firmware_image_record {
  		unsigned short ExtAddr;
  		unsigned short Addr;
  		unsigned short Len;
  		unsigned char  Data[0];
! 	};
  
! 	struct edge_firmware_version_info {
! 		unsigned char  MajorVersion;
  		unsigned char  MinorVersion;
  		unsigned short BuildNumber;
! 	};
  
  #endif
  
--- 12,31 ----
  //Image structure definition
  #if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD)
  	#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD
! 	typedef struct _EDGE_FIRMWARE_IMAGE_RECORD
! 	{
  		unsigned short ExtAddr;
  		unsigned short Addr;
  		unsigned short Len;
  		unsigned char  Data[0];
! 	} EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD;
  
! 	typedef struct _EDGE_FIRMWARE_VERSION_INFO
! 	{
! 		unsigned char	 MajorVersion;
  		unsigned char  MinorVersion;
  		unsigned short BuildNumber;
! 	} EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO;
  
  #endif
  
***************
*** 1124,1130 ****
      0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 
  };
  
! static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
  	2, 0, 3 };		// Major, Minor, Build
  
  #undef IMAGE_VERSION_NAME
--- 1126,1132 ----
      0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 
  };
  
! static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = {
  	2, 0, 3 };		// Major, Minor, Build
  
  #undef IMAGE_VERSION_NAME
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial$B$@$1$KH/8+(B: io_fw_down3.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_ionsp.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_ionsp.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_ionsp.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_ionsp.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 88,99 ****
  // Interrupt pipe
  //
  
! struct int_status_pkt {
  	__u16      RxBytesAvail;		    // Additional bytes available to
  						    // be read from Bulk IN pipe
  	__u16      TxCredits[ MAX_RS232_PORTS ];   // Additional space available in
  						    // given port's TxBuffer
! };
  
  
  #define GET_INT_STATUS_SIZE(NumPorts) (sizeof(__u16) + (sizeof(__u16) * (NumPorts)))
--- 88,99 ----
  // Interrupt pipe
  //
  
! typedef struct _INT_STATUS_PKT {
  	__u16      RxBytesAvail;		    // Additional bytes available to
  						    // be read from Bulk IN pipe
  	__u16      TxCredits[ MAX_RS232_PORTS ];   // Additional space available in
  						    // given port's TxBuffer
! } INT_STATUS_PKT, *PINT_STATUS_PKT;
  
  
  #define GET_INT_STATUS_SIZE(NumPorts) (sizeof(__u16) + (sizeof(__u16) * (NumPorts)))
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_tables.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_tables.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_tables.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_tables.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 14,39 ****
  #ifndef IO_TABLES_H
  #define IO_TABLES_H
  
! static struct usb_device_id edgeport_1port_id_table [] = {
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) },
  	{ }
  };
  
! static struct usb_device_id edgeport_2port_id_table [] = {
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2I) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_421) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_21) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2_DIN) },
  	{ }
  };
  
! static struct usb_device_id edgeport_4port_id_table [] = {
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
--- 14,34 ----
  #ifndef IO_TABLES_H
  #define IO_TABLES_H
  
! static __devinitdata struct usb_device_id edgeport_1port_id_table [] = {
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) },
  	{ }
  };
  
! static __devinitdata struct usb_device_id edgeport_2port_id_table [] = {
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_21) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2_DIN) },
  	{ }
  };
  
! static __devinitdata struct usb_device_id edgeport_4port_id_table [] = {
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) },
***************
*** 42,62 ****
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4T) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4I) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8_DUAL_CPU) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4_DIN) },
  	{ }
  };
  
! static struct usb_device_id edgeport_8port_id_table [] = {
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8I) },
  	{ }
  };
  
--- 37,49 ----
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4_DIN) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
  	{ }
  };
  
! static __devinitdata struct usb_device_id edgeport_8port_id_table [] = {
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) },
  	{ }
  };
  
***************
*** 79,106 ****
  	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_8I) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2I) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_421) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_21) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_2_DIN) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4T) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4I) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8_DUAL_CPU) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_4_DIN) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU) },
- 	{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_BB_EDGEPORT_8I) },
  	{ }							/* Terminating entry */
  };
  
  MODULE_DEVICE_TABLE (usb, id_table_combined);
  
  static struct usb_serial_device_type edgeport_1port_device = {
- 	owner:			THIS_MODULE,
  	name:			"Edgeport 1 port adapter",
  	id_table:		edgeport_1port_id_table,
  	num_interrupt_in:	1,
  	num_bulk_in:		1,
  	num_bulk_out:		1,
--- 66,82 ----
  	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_COMPATIBLE) },
  	{ USB_DEVICE(USB_VENDOR_ID_ION,	ION_DEVICE_ID_EDGEPORT_8I) },
  	{ }							/* Terminating entry */
  };
  
  MODULE_DEVICE_TABLE (usb, id_table_combined);
  
  static struct usb_serial_device_type edgeport_1port_device = {
  	name:			"Edgeport 1 port adapter",
  	id_table:		edgeport_1port_id_table,
+ 	needs_interrupt_in:	MUST_HAVE,
+ 	needs_bulk_in:		MUST_HAVE,
+ 	needs_bulk_out:		MUST_HAVE,
  	num_interrupt_in:	1,
  	num_bulk_in:		1,
  	num_bulk_out:		1,
***************
*** 120,128 ****
  };
  
  static struct usb_serial_device_type edgeport_2port_device = {
- 	owner:			THIS_MODULE,
  	name:			"Edgeport 2 port adapter",
  	id_table:		edgeport_2port_id_table,
  	num_interrupt_in:	1,
  	num_bulk_in:		1,
  	num_bulk_out:		1,
--- 96,106 ----
  };
  
  static struct usb_serial_device_type edgeport_2port_device = {
  	name:			"Edgeport 2 port adapter",
  	id_table:		edgeport_2port_id_table,
+ 	needs_interrupt_in:	MUST_HAVE,
+ 	needs_bulk_in:		MUST_HAVE,
+ 	needs_bulk_out:		MUST_HAVE,
  	num_interrupt_in:	1,
  	num_bulk_in:		1,
  	num_bulk_out:		1,
***************
*** 142,150 ****
  };
  
  static struct usb_serial_device_type edgeport_4port_device = {
- 	owner:			THIS_MODULE,
  	name:			"Edgeport 4 port adapter",
  	id_table:		edgeport_4port_id_table,
  	num_interrupt_in:	1,
  	num_bulk_in:		1,
  	num_bulk_out:		1,
--- 120,130 ----
  };
  
  static struct usb_serial_device_type edgeport_4port_device = {
  	name:			"Edgeport 4 port adapter",
  	id_table:		edgeport_4port_id_table,
+ 	needs_interrupt_in:	MUST_HAVE,
+ 	needs_bulk_in:		MUST_HAVE,
+ 	needs_bulk_out:		MUST_HAVE,
  	num_interrupt_in:	1,
  	num_bulk_in:		1,
  	num_bulk_out:		1,
***************
*** 164,172 ****
  };
  
  static struct usb_serial_device_type edgeport_8port_device = {
- 	owner:			THIS_MODULE,
  	name:			"Edgeport 8 port adapter",
  	id_table:		edgeport_8port_id_table,
  	num_interrupt_in:	1,
  	num_bulk_in:		1,
  	num_bulk_out:		1,
--- 144,154 ----
  };
  
  static struct usb_serial_device_type edgeport_8port_device = {
  	name:			"Edgeport 8 port adapter",
  	id_table:		edgeport_8port_id_table,
+ 	needs_interrupt_in:	MUST_HAVE,
+ 	needs_bulk_in:		MUST_HAVE,
+ 	needs_bulk_out:		MUST_HAVE,
  	num_interrupt_in:	1,
  	num_bulk_in:		1,
  	num_bulk_out:		1,
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial$B$@$1$KH/8+(B: io_ti.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial$B$@$1$KH/8+(B: io_ti.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_usbvend.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_usbvend.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/io_usbvend.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/io_usbvend.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 92,128 ****
  #define ION_DEVICE_ID_EDGEPORT_8I		0x014	// Edgeport/8 RS422 (single-CPU)
  #define ION_DEVICE_ID_MT4X56USB			0x1403	// OEM device
  
! // BlackBox OEM devices
! #define ION_DEVICE_ID_BB_EDGEPORT_4		0x001	// Edgeport/4 RS232
! #define ION_DEVICE_ID_BB_EDGEPORT_4T		0x004	// Edgeport/4 RS232 for Telxon (aka "Fleetport")
! #define ION_DEVICE_ID_BB_EDGEPORT_2		0x005	// Edgeport/2 RS232
! #define ION_DEVICE_ID_BB_EDGEPORT_4I		0x006	// Edgeport/4 RS422
! #define ION_DEVICE_ID_BB_EDGEPORT_2I		0x007	// Edgeport/2 RS422/RS485
! #define	ION_DEVICE_ID_BB_EDGEPORT_421		0x00C	// Edgeport/421 Hub+RS232+Parallel
! #define	ION_DEVICE_ID_BB_EDGEPORT_21		0x00D	// Edgeport/21  RS232+Parallel
! #define ION_DEVICE_ID_BB_EDGEPORT_8_DUAL_CPU	0x00E	// Half of an Edgeport/8 (the kind with 2 EP/4s on 1 PCB)
! #define ION_DEVICE_ID_BB_EDGEPORT_8		0x00F	// Edgeport/8 (single-CPU)
! #define ION_DEVICE_ID_BB_EDGEPORT_2_DIN		0x010	// Edgeport/2 RS232 with Apple DIN connector
! #define ION_DEVICE_ID_BB_EDGEPORT_4_DIN		0x011	// Edgeport/4 RS232 with Apple DIN connector
! #define ION_DEVICE_ID_BB_EDGEPORT_16_DUAL_CPU	0x012	// Half of an Edgeport/16 (the kind with 2 EP/8s)
! #define ION_DEVICE_ID_BB_EDGEPORT_8I		0x014	// Edgeport/8 RS422 (single-CPU)
! 
! 
! /* Edgeport TI based devices */
! #define ION_DEVICE_ID_TI_EDGEPORT_4		0x0201	/* Edgeport/4 RS232 */
! #define ION_DEVICE_ID_TI_EDGEPORT_2		0x0205	/* Edgeport/2 RS232 */
! #define ION_DEVICE_ID_TI_EDGEPORT_4I		0x0206	/* Edgeport/4i RS422 */
! #define ION_DEVICE_ID_TI_EDGEPORT_2I		0x0207	/* Edgeport/2i RS422/RS485 */
! #define ION_DEVICE_ID_TI_EDGEPORT_421		0x020C	/* Edgeport/421 4 hub 2 RS232 + Parallel (lucent on a different hub port) */
! #define ION_DEVICE_ID_TI_EDGEPORT_21		0x020D	/* Edgeport/21 2 RS232 + Parallel (lucent on a different hub port) */
! #define ION_DEVICE_ID_TI_EDGEPORT_1		0x0215	/* Edgeport/1 RS232 */
! #define ION_DEVICE_ID_TI_EDGEPORT_42		0x0217	/* Edgeport/42 4 hub 2 RS232 */
! #define ION_DEVICE_ID_TI_EDGEPORT_22		0x021A	/* Edgeport/22  Edgeport/22I is an Edgeport/4 with ports 1&2 RS422 and ports 3&4 RS232 */
! 
! #define ION_DEVICE_ID_TI_EDGEPORT_421_BOOT	0x0240	/* Edgeport/421 in boot mode */
! #define ION_DEVICE_ID_TI_EDGEPORT_421_DOWN	0x0241	/* Edgeport/421 in download mode first interface is 2 RS232 (Note that the second interface of this multi interface device should be a standard USB class 7 printer port) */
! #define ION_DEVICE_ID_TI_EDGEPORT_21_BOOT	0x0242	/* Edgeport/21 in boot mode */
! #define ION_DEVICE_ID_TI_EDGEPORT_21_DOWN	0x0243	/*Edgeport/42 in download mode: first interface is 2 RS232 (Note that the second interface of this multi interface device should be a standard USB class 7 printer port) */
  
  
  #define	MAKE_USB_PRODUCT_ID( OemId, DeviceId )					\
--- 92,102 ----
  #define ION_DEVICE_ID_EDGEPORT_8I		0x014	// Edgeport/8 RS422 (single-CPU)
  #define ION_DEVICE_ID_MT4X56USB			0x1403	// OEM device
  
! // These IDs are used by the Edgeport.exe program for uninstalling.
! // 
! #define EDGEPORT_DEVICE_IDS	{0x001, 0x003, 0x004, 0x005, 0x006, 0x007, 0x00B, \
! 				 0x00C, 0x00D, 0x00E, 0x00F, 0x010, 0x011, 0x012, \
! 				 0x013, 0x014 }
  
  
  #define	MAKE_USB_PRODUCT_ID( OemId, DeviceId )					\
***************
*** 208,218 ****
  // Version 2 format of DeviceParams. This format is longer (3C0h)
  // and starts lower in memory, at the uppermost 1K in ROM.
  #define	EDGE_MANUF_DESC_ADDR		0x00FF7C00
! #define	EDGE_MANUF_DESC_LEN		sizeof(struct edge_manuf_descriptor)
  
  // Boot params descriptor
  #define	EDGE_BOOT_DESC_ADDR		0x00FF7FC0
! #define	EDGE_BOOT_DESC_LEN		sizeof(struct edge_boot_descriptor)
  
  // Define the max block size that may be read or written
  // in a read/write RAM/ROM command.
--- 182,192 ----
  // Version 2 format of DeviceParams. This format is longer (3C0h)
  // and starts lower in memory, at the uppermost 1K in ROM.
  #define	EDGE_MANUF_DESC_ADDR		0x00FF7C00
! #define	EDGE_MANUF_DESC_LEN		sizeof(EDGE_MANUF_DESCRIPTOR)
  
  // Boot params descriptor
  #define	EDGE_BOOT_DESC_ADDR		0x00FF7FC0
! #define	EDGE_BOOT_DESC_LEN		sizeof(EDGE_BOOT_DESCRIPTOR)
  
  // Define the max block size that may be read or written
  // in a read/write RAM/ROM command.
***************
*** 229,235 ****
  //		descriptor format, so that they may be separately retrieved,
  //		if necessary, with a minimum of work on the 930. This also
  //		requires them to be in UNICODE format, which, for English at
! //		least, simply means extending each __u8 into a __u16.
  //	3.	For all fields, 00 means 'uninitialized'.
  //	4.	All unused areas should be set to 00 for future expansion.
  //
--- 203,209 ----
  //		descriptor format, so that they may be separately retrieved,
  //		if necessary, with a minimum of work on the 930. This also
  //		requires them to be in UNICODE format, which, for English at
! //		least, simply means extending each UCHAR into a USHORT.
  //	3.	For all fields, 00 means 'uninitialized'.
  //	4.	All unused areas should be set to 00 for future expansion.
  //
***************
*** 253,259 ****
  #define MAX_SERIALNUMBER_LEN	12
  #define MAX_ASSEMBLYNUMBER_LEN	14
  
! struct edge_manuf_descriptor {
  
  	__u16	RootDescTable[0x10];			// C00 Root of descriptor tables (just a placeholder)
  	__u8	DescriptorArea[0x2E0];			// C20 Descriptors go here, up to 2E0h (just a placeholder)
--- 227,233 ----
  #define MAX_SERIALNUMBER_LEN	12
  #define MAX_ASSEMBLYNUMBER_LEN	14
  
! typedef struct _EDGE_MANUF_DESCRIPTOR {
  
  	__u16	RootDescTable[0x10];			// C00 Root of descriptor tables (just a placeholder)
  	__u8	DescriptorArea[0x2E0];			// C20 Descriptors go here, up to 2E0h (just a placeholder)
***************
*** 298,304 ****
  	__u8	IonConfig;				// FBF Config byte for ION manufacturing use
  							// FBF end of structure, total len = 3C0h
  
! };
  
  
  #define MANUF_DESC_VER_1	1	// Original definition of MANUF_DESC
--- 272,278 ----
  	__u8	IonConfig;				// FBF Config byte for ION manufacturing use
  							// FBF end of structure, total len = 3C0h
  
! } EDGE_MANUF_DESCRIPTOR, *PEDGE_MANUF_DESCRIPTOR;
  
  
  #define MANUF_DESC_VER_1	1	// Original definition of MANUF_DESC
***************
*** 343,352 ****
  
  
  
! #define	MANUF_SERNUM_LENGTH		sizeof(((struct edge_manuf_descriptor *)0)->SerialNumber)
! #define	MANUF_ASSYNUM_LENGTH		sizeof(((struct edge_manuf_descriptor *)0)->AssemblyNumber)
! #define	MANUF_OEMASSYNUM_LENGTH		sizeof(((struct edge_manuf_descriptor *)0)->OemAssyNumber)
! #define	MANUF_MANUFDATE_LENGTH		sizeof(((struct edge_manuf_descriptor *)0)->ManufDate)
  
  #define	MANUF_ION_CONFIG_MASTER		0x80	// 1=Master mode, 0=Normal
  #define	MANUF_ION_CONFIG_DIAG		0x40	// 1=Run h/w diags, 0=norm
--- 317,326 ----
  
  
  
! #define	MANUF_SERNUM_LENGTH		sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->SerialNumber)
! #define	MANUF_ASSYNUM_LENGTH		sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->AssemblyNumber)
! #define	MANUF_OEMASSYNUM_LENGTH		sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->OemAssyNumber)
! #define	MANUF_MANUFDATE_LENGTH		sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->ManufDate)
  
  #define	MANUF_ION_CONFIG_MASTER		0x80	// 1=Master mode, 0=Normal
  #define	MANUF_ION_CONFIG_DIAG		0x40	// 1=Run h/w diags, 0=norm
***************
*** 361,367 ****
  // - FF:xFFF. Note that the 930-mandated UCONFIG bytes are
  // included in this structure.
  //
! struct edge_boot_descriptor {
  	__u8		Length;			// C0 Desc length, per USB (= 40h)
  	__u8		DescType;		// C1 Desc type, per USB (= DEVICE type)
  	__u8		DescVer;		// C2 Desc version/format
--- 335,341 ----
  // - FF:xFFF. Note that the 930-mandated UCONFIG bytes are
  // included in this structure.
  //
! typedef struct _EDGE_BOOT_DESCRIPTOR {
  	__u8		Length;			// C0 Desc length, per USB (= 40h)
  	__u8		DescType;		// C1 Desc type, per USB (= DEVICE type)
  	__u8		DescVer;		// C2 Desc version/format
***************
*** 385,391 ****
  	__u8		UConfig1;		// F9 930-defined CPU configuration byte 1
  	__u8		Reserved3[6];		// FA -- unused, set to 0 --
  						// FF end of structure, total len = 80
! };
  
  
  #define BOOT_DESC_VER_1		1	// Original definition of BOOT_PARAMS
--- 359,366 ----
  	__u8		UConfig1;		// F9 930-defined CPU configuration byte 1
  	__u8		Reserved3[6];		// FA -- unused, set to 0 --
  						// FF end of structure, total len = 80
! 
! } EDGE_BOOT_DESCRIPTOR, *PEDGE_BOOT_DESCRIPTOR;
  
  
  #define BOOT_DESC_VER_1		1	// Original definition of BOOT_PARAMS
***************
*** 396,487 ****
  
  #define	BOOT_CAP_RESET_CMD	0x0001	// If set, boot correctly supports ION_RESET_DEVICE
  
  
- 
- /************************************************************************
-                  T I   U M P   D E F I N I T I O N S
-  ***********************************************************************/
- 
- //************************************************************************
- //	TI I2C Format Definitions
- //************************************************************************
- #define I2C_DESC_TYPE_INFO_BASIC	1
- #define I2C_DESC_TYPE_FIRMWARE_BASIC	2
- #define I2C_DESC_TYPE_DEVICE		3
- #define I2C_DESC_TYPE_CONFIG		4
- #define I2C_DESC_TYPE_STRING		5
- #define I2C_DESC_TYPE_FIRMWARE_BLANK 	0xf2
- 
- #define I2C_DESC_TYPE_MAX		5
- // 3410 may define types 6, 7 for other firmware downloads
- 
- // Special section defined by ION
- #define I2C_DESC_TYPE_ION		0	// Not defined by TI
- 
- 
- struct ti_i2c_desc
- {
- 	__u8	Type;			// Type of descriptor
- 	__u16	Size;			// Size of data only not including header
- 	__u8	CheckSum;		// Checksum (8 bit sum of data only)
- 	__u8	Data[0];		// Data starts here
- }__attribute__((packed));
- 
- struct ti_i2c_firmware_rec 
- {
- 	__u8	Ver_Major;		// Firmware Major version number
- 	__u8	Ver_Minor;		// Firmware Minor version number
- 	__u8	Data[0];		// Download starts here
- }__attribute__((packed));
- 
- 
- // Structure of header of download image in fw_down.h
- struct ti_i2c_image_header
- {
- 	__u16	Length;
- 	__u8	CheckSum;
- }__attribute__((packed));
- 
- struct ti_basic_descriptor
- {
- 	__u8	Power;		// Self powered
- 				// bit 7: 1 - power switching supported
- 				//        0 - power switching not supported
- 				//
- 				// bit 0: 1 - self powered
- 				//        0 - bus powered
- 				//
- 				//
- 	__u16	HubVid;		// VID HUB
- 	__u16	HubPid;		// PID HUB
- 	__u16	DevPid;		// PID Edgeport
- 	__u8	HubTime;	// Time for power on to power good
- 	__u8	HubCurrent;	// HUB Current = 100ma
- } __attribute__((packed));
- 
- 
- #define TI_GET_CPU_REVISION(x)		(__u8)((((x)>>4)&0x0f))
- #define TI_GET_BOARD_REVISION(x)	(__u8)(((x)&0x0f))
- 
- #define TI_I2C_SIZE_MASK		0x1f  // 5 bits
- #define TI_GET_I2C_SIZE(x)		((((x) & TI_I2C_SIZE_MASK)+1)*256)
- 
- #define TI_MAX_I2C_SIZE			( 16 * 1024 )
- 
- /* TI USB 5052 definitions */
- struct edge_ti_manuf_descriptor
- {
- 	__u8 IonConfig;		//  Config byte for ION manufacturing use
- 	__u8 IonConfig2;	//  Expansion
- 	__u8 Version;		//  Verqsion
- 	__u8 CpuRev_BoardRev;	//  CPU revision level (0xF0) and Board Rev Level (0x0F)
- 	__u8 NumPorts;		//  Number of ports	for this UMP
- 	__u8 NumVirtualPorts;	//  Number of Virtual ports
- 	__u8 HubConfig1;	//  Used to configure the Hub
- 	__u8 HubConfig2;	//  Used to configure the Hub
- 	__u8 TotalPorts;	//  Total Number of Com Ports for the entire device (All UMPs)
- 	__u8 Reserved;
- }__attribute__((packed));
- 
- 
- #endif		// if !defined()
--- 371,375 ----
  
  #define	BOOT_CAP_RESET_CMD	0x0001	// If set, boot correctly supports ION_RESET_DEVICE
  
+ #endif	// if !defined()
  
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial$B$@$1$KH/8+(B: ipaq.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial$B$@$1$KH/8+(B: ipaq.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/ir-usb.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/ir-usb.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/ir-usb.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/ir-usb.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,8 ****
  /*
   * USB IR Dongle driver
   *
!  *	Copyright (C) 2001-2002	Greg Kroah-Hartman (greg@kroah.com)
!  *	Copyright (C) 2002	Gary Brubaker (xavyer@ix.netcom.com)
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
--- 1,7 ----
  /*
   * USB IR Dongle driver
   *
!  *	Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
   *
   *	This program is free software; you can redistribute it and/or modify
   *	it under the terms of the GNU General Public License as published by
***************
*** 21,37 ****
   *
   * See Documentation/usb/usb-serial.txt for more information on using this driver
   *
-  * 2002_Mar_07	greg kh
-  *	moved some needed structures and #define values from the
-  *	net/irda/irda-usb.h file into our file, as we don't want to depend on
-  *	that codebase compiling correctly :)
-  *
-  * 2002_Jan_14  gb
-  *	Added module parameter to force specific number of XBOFs.
-  *	Added ir_xbof_change().
-  *	Reorganized read_bulk_callback error handling.
-  *	Switched from FILL_BULK_URB() to usb_fill_bulk_urb().
-  *
   * 2001_Nov_08  greg kh
   *	Changed the irda_usb_find_class_desc() function based on comments and
   *	code from Martin Diehl.
--- 20,25 ----
***************
*** 48,63 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
  	static int debug = 1;
--- 36,55 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
+ #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
  	static int debug = 1;
***************
*** 70,111 ****
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v0.4"
  #define DRIVER_AUTHOR "Greg Kroah-Hartman "
  #define DRIVER_DESC "USB IR Dongle driver"
  
- /* USB IrDA class spec information */
- #define USB_CLASS_IRDA		0x02
- #define USB_DT_IRDA		0x21
- #define IU_REQ_GET_CLASS_DESC	0x06
- #define SPEED_2400		0x01
- #define SPEED_9600		0x02
- #define SPEED_19200		0x03
- #define SPEED_38400		0x04
- #define SPEED_57600		0x05
- #define SPEED_115200		0x06
- #define SPEED_576000		0x07
- #define SPEED_1152000		0x08
- #define SPEED_4000000		0x09
- 
- struct irda_class_desc {
- 	u8	bLength;
- 	u8	bDescriptorType;
- 	u16	bcdSpecRevision;
- 	u8	bmDataSize;
- 	u8	bmWindowSize;
- 	u8	bmMinTurnaroundTime;
- 	u16	wBaudRate;
- 	u8	bmAdditionalBOFs;
- 	u8	bIrdaRateSniff;
- 	u8	bMaxUnicastList;
- } __attribute__ ((packed));
- 
  /* if overridden by the user, then use their value for the size of the read and
   * write urbs */
  static int buffer_size = 0;
- /* if overridden by the user, then use the specified number of XBOFs */
- static int xbof = -1;
  
  static int  ir_startup (struct usb_serial *serial);
  static int  ir_open (struct usb_serial_port *port, struct file *filep);
--- 62,74 ----
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v0.3"
  #define DRIVER_AUTHOR "Greg Kroah-Hartman "
  #define DRIVER_DESC "USB IR Dongle driver"
  
  /* if overridden by the user, then use their value for the size of the read and
   * write urbs */
  static int buffer_size = 0;
  
  static int  ir_startup (struct usb_serial *serial);
  static int  ir_open (struct usb_serial_port *port, struct file *filep);
***************
*** 115,125 ****
  static void ir_read_bulk_callback (struct urb *urb);
  static void ir_set_termios (struct usb_serial_port *port, struct termios *old_termios);
  
- static u8 ir_baud = 0;
- static u8 ir_xbof = 0;
- static u8 ir_add_bof = 0;
  
! static struct usb_device_id id_table [] = {
  	{ USB_DEVICE(0x050f, 0x0180) },		/* KC Technology, KC-180 */
  	{ USB_DEVICE(0x08e9, 0x0100) },		/* XTNDAccess */
  	{ USB_DEVICE(0x09c4, 0x0011) },		/* ACTiSys ACT-IR2000U */
--- 78,85 ----
  static void ir_read_bulk_callback (struct urb *urb);
  static void ir_set_termios (struct usb_serial_port *port, struct termios *old_termios);
  
  
! static __devinitdata struct usb_device_id id_table [] = {
  	{ USB_DEVICE(0x050f, 0x0180) },		/* KC Technology, KC-180 */
  	{ USB_DEVICE(0x08e9, 0x0100) },		/* XTNDAccess */
  	{ USB_DEVICE(0x09c4, 0x0011) },		/* ACTiSys ACT-IR2000U */
***************
*** 131,150 ****
  
  
  struct usb_serial_device_type ir_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"IR Dongle",
! 	.id_table =		id_table,
! 	.num_interrupt_in =	1,
! 	.num_bulk_in =		1,
! 	.num_bulk_out =		1,
! 	.num_ports =		1,
! 	.set_termios =		ir_set_termios,
! 	.startup =		ir_startup,
! 	.open =			ir_open,
! 	.close =		ir_close,
! 	.write =		ir_write,
! 	.write_bulk_callback =	ir_write_bulk_callback,
! 	.read_bulk_callback =	ir_read_bulk_callback,
  };
  
  static inline void irda_usb_dump_class_desc(struct irda_class_desc *desc)
--- 91,112 ----
  
  
  struct usb_serial_device_type ir_device = {
! 	name:			"IR Dongle",
! 	id_table:		id_table,
! 	needs_interrupt_in:	MUST_HAVE,
! 	needs_bulk_in:		MUST_HAVE,
! 	needs_bulk_out:		MUST_HAVE,
! 	num_interrupt_in:	1,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	set_termios:		ir_set_termios,
! 	startup:		ir_startup,
! 	open:			ir_open,
! 	close:			ir_close,
! 	write:			ir_write,
! 	write_bulk_callback:	ir_write_bulk_callback,
! 	read_bulk_callback:	ir_read_bulk_callback,
  };
  
  static inline void irda_usb_dump_class_desc(struct irda_class_desc *desc)
***************
*** 186,203 ****
  	ret = usb_control_msg(dev, usb_rcvctrlpipe(dev,0),
  			IU_REQ_GET_CLASS_DESC,
  			USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
! 			0, ifnum, desc, sizeof(*desc), HZ);
  	
! 	dbg("%s -  ret=%d", __FUNCTION__, ret);
  	if (ret < sizeof(*desc)) {
! 		dbg("%s - class descriptor read %s (%d)",
! 				__FUNCTION__, 
! 				(ret<0) ? "failed" : "too short",
! 				ret);
  		goto error;
  	}
  	if (desc->bDescriptorType != USB_DT_IRDA) {
! 		dbg("%s - bad class descriptor type", __FUNCTION__);
  		goto error;
  	}
  	
--- 148,163 ----
  	ret = usb_control_msg(dev, usb_rcvctrlpipe(dev,0),
  			IU_REQ_GET_CLASS_DESC,
  			USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
! 			0, ifnum, desc, sizeof(*desc), MSECS_TO_JIFFIES(500));
  	
! 	dbg(__FUNCTION__ " -  ret=%d", ret);
  	if (ret < sizeof(*desc)) {
! 		dbg(__FUNCTION__ " - class descriptor read %s (%d)",
! 				(ret<0) ? "failed" : "too short", ret);
  		goto error;
  	}
  	if (desc->bDescriptorType != USB_DT_IRDA) {
! 		dbg(__FUNCTION__ " - bad class descriptor type");
  		goto error;
  	}
  	
***************
*** 208,235 ****
  	return NULL;
  }
  
- 
- static u8 ir_xbof_change(u8 xbof)
- {
- 	u8 result;
- 	/* reference irda-usb.c */
- 	switch(xbof) {
- 		case 48: result = 0x10; break;
- 		case 28:
- 		case 24: result = 0x20; break;
- 		default:
- 		case 12: result = 0x30; break;
- 		case  5:
- 		case  6: result = 0x40; break;
- 		case  3: result = 0x50; break;
- 		case  2: result = 0x60; break;
- 		case  1: result = 0x70; break;
- 		case  0: result = 0x80; break;
- 	}
- 	return(result);
- }
- 
- 
  static int ir_startup (struct usb_serial *serial)
  {
  	struct irda_class_desc *irda_desc;
--- 168,173 ----
***************
*** 239,268 ****
  		err ("IRDA class descriptor not found, device not bound");
  		return -ENODEV;
  	}
! 
! 	dbg ("%s - Baud rates supported:%s%s%s%s%s%s%s%s%s",
! 		__FUNCTION__,
! 		(irda_desc->wBaudRate & 0x0001) ? " 2400"    : "",
! 		(irda_desc->wBaudRate & 0x0002) ? " 9600"    : "",
! 		(irda_desc->wBaudRate & 0x0004) ? " 19200"   : "",
! 		(irda_desc->wBaudRate & 0x0008) ? " 38400"   : "",
! 		(irda_desc->wBaudRate & 0x0010) ? " 57600"   : "",
! 		(irda_desc->wBaudRate & 0x0020) ? " 115200"  : "",
! 		(irda_desc->wBaudRate & 0x0040) ? " 576000"  : "",
! 		(irda_desc->wBaudRate & 0x0080) ? " 1152000" : "",
! 		(irda_desc->wBaudRate & 0x0100) ? " 4000000" : "");
! 
! 	switch( irda_desc->bmAdditionalBOFs ) {
! 		case 0x01: ir_add_bof = 48; break;
! 		case 0x02: ir_add_bof = 24; break;
! 		case 0x04: ir_add_bof = 12; break;
! 		case 0x08: ir_add_bof =  6; break;
! 		case 0x10: ir_add_bof =  3; break;
! 		case 0x20: ir_add_bof =  2; break;
! 		case 0x40: ir_add_bof =  1; break;
! 		case 0x80: ir_add_bof =  0; break;
! 		default:;
! 	}
  
  	kfree (irda_desc);
  
--- 177,192 ----
  		err ("IRDA class descriptor not found, device not bound");
  		return -ENODEV;
  	}
! 	dbg (__FUNCTION__" - Baud rates supported: %s%s%s%s%s%s%s%s%s",
! 	     (irda_desc->wBaudRate & 0x0001) ? "2400 " : "",
! 	     irda_desc->wBaudRate & 0x0002 ? "9600 " : "",
! 	     irda_desc->wBaudRate & 0x0004 ? "19200 " : "",
! 	     irda_desc->wBaudRate & 0x0008 ? "38400 " : "",
! 	     irda_desc->wBaudRate & 0x0010 ? "57600 " : "",
! 	     irda_desc->wBaudRate & 0x0020 ? "115200 " : "",
! 	     irda_desc->wBaudRate & 0x0040 ? "576000 " : "",
! 	     irda_desc->wBaudRate & 0x0080 ? "1152000 " : "",
! 	     irda_desc->wBaudRate & 0x0100 ? "4000000 " : "");
  
  	kfree (irda_desc);
  
***************
*** 278,321 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  	
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	if (buffer_size) {
! 		/* override the default buffer sizes */
! 		buffer = kmalloc (buffer_size, GFP_KERNEL);
! 		if (!buffer) {
! 			err ("%s - out of memory.", __FUNCTION__);
! 			return -ENOMEM;
! 		}
! 		kfree (port->read_urb->transfer_buffer);
! 		port->read_urb->transfer_buffer = buffer;
! 		port->read_urb->transfer_buffer_length = buffer_size;
! 
! 		buffer = kmalloc (buffer_size, GFP_KERNEL);
! 		if (!buffer) {
! 			err ("%s - out of memory.", __FUNCTION__);
! 			return -ENOMEM;
  		}
- 		kfree (port->write_urb->transfer_buffer);
- 		port->write_urb->transfer_buffer = buffer;
- 		port->write_urb->transfer_buffer_length = buffer_size;
- 		port->bulk_out_size = buffer_size;
- 	}
- 
- 	/* Start reading from the device */
- 	usb_fill_bulk_urb (
- 		port->read_urb,
- 		serial->dev, 
- 		usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
- 		port->read_urb->transfer_buffer,
- 		port->read_urb->transfer_buffer_length,
- 		ir_read_bulk_callback,
- 		port);
- 	port->read_urb->transfer_flags = USB_QUEUE_BULK;
- 	result = usb_submit_urb(port->read_urb);
- 	if (result)
- 		err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
  
  	return result;
  }
  
--- 202,251 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  	
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
! 	down (&port->sem);
! 	
! 	++port->open_count;
! 	MOD_INC_USE_COUNT;
! 	
! 	if (!port->active) {
! 		port->active = 1;
! 
! 		if (buffer_size) {
! 			/* override the default buffer sizes */
! 			buffer = kmalloc (buffer_size, GFP_KERNEL);
! 			if (!buffer) {
! 				err (__FUNCTION__ " - out of memory.");
! 				return -ENOMEM;
! 			}
! 			kfree (port->read_urb->transfer_buffer);
! 			port->read_urb->transfer_buffer = buffer;
! 			port->read_urb->transfer_buffer_length = buffer_size;
! 
! 			buffer = kmalloc (buffer_size, GFP_KERNEL);
! 			if (!buffer) {
! 				err (__FUNCTION__ " - out of memory.");
! 				return -ENOMEM;
! 			}
! 			kfree (port->write_urb->transfer_buffer);
! 			port->write_urb->transfer_buffer = buffer;
! 			port->write_urb->transfer_buffer_length = buffer_size;
! 			port->bulk_out_size = buffer_size;
  		}
  
+ 		/* Start reading from the device */
+ 		FILL_BULK_URB(port->read_urb, serial->dev, 
+ 			      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
+ 			      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
+ 			      ir_read_bulk_callback, port);
+ 		result = usb_submit_urb(port->read_urb);
+ 		if (result)
+ 			err(__FUNCTION__ " - failed submitting read urb, error %d", result);
+ 	}
+ 	
+ 	up (&port->sem);
+ 	
  	return result;
  }
  
***************
*** 326,353 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  			 
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
  		return;
  	
! 	if (serial->dev) {
! 		/* shutdown our bulk read */
! 		usb_unlink_urb (port->read_urb);
  	}
  }
  
  static int ir_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
  {
  	unsigned char *transfer_buffer;
  	int result;
- 	int transfer_size;
  
! 	dbg("%s - port = %d, count = %d", __FUNCTION__, port->number, count);
  
  	if (!port->tty) {
! 		err ("%s - no tty???", __FUNCTION__);
  		return 0;
  	}
  
--- 256,293 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg(__FUNCTION__ " - port %d", port->number);
  			 
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
  		return;
  	
! 	down (&port->sem);
! 
! 	--port->open_count;
! 
! 	if (port->open_count <= 0) {
! 		if (serial->dev) {
! 			/* shutdown our bulk read */
! 			usb_unlink_urb (port->read_urb);
! 		}
! 		port->active = 0;
! 		port->open_count = 0;
! 
  	}
+ 	up (&port->sem);
+ 	MOD_DEC_USE_COUNT;
  }
  
  static int ir_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
  {
  	unsigned char *transfer_buffer;
  	int result;
  
! 	dbg(__FUNCTION__ " - port = %d, count = %d", port->number, count);
  
  	if (!port->tty) {
! 		err (__FUNCTION__ " - no tty???");
  		return 0;
  	}
  
***************
*** 355,403 ****
  		return 0;
  
  	if (port->write_urb->status == -EINPROGRESS) {
! 		dbg ("%s - already writing", __FUNCTION__);
  		return 0;
  	}
  
- 	transfer_buffer = port->write_urb->transfer_buffer;
- 	transfer_size = min(count, port->bulk_out_size - 1);
- 
  	/*
! 	 * The first byte of the packet we send to the device contains an
! 	 * inband header which indicates an additional number of BOFs and
! 	 * a baud rate change.
! 	 *
  	 * See section 5.4.2.2 of the USB IrDA spec.
  	 */
! 	*transfer_buffer = ir_xbof | ir_baud;
! 	++transfer_buffer;
! 
  	if (from_user) {
! 		if (copy_from_user (transfer_buffer, buf, transfer_size))
  			return -EFAULT;
  	} else {
! 		memcpy (transfer_buffer, buf, transfer_size);
  	}
  
! 	usb_fill_bulk_urb (
! 		port->write_urb,
! 		port->serial->dev,
! 		usb_sndbulkpipe(port->serial->dev,
! 			port->bulk_out_endpointAddress),
! 		port->write_urb->transfer_buffer,
! 		transfer_size + 1,
! 		ir_write_bulk_callback,
! 		port);
! 
! 	port->write_urb->transfer_flags
! 		= USB_QUEUE_BULK
! 		| USB_ZERO_PACKET;
  
  	result = usb_submit_urb (port->write_urb);
  	if (result)
! 		err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
  	else
! 		result = transfer_size;
  
  	return result;
  }
--- 295,331 ----
  		return 0;
  
  	if (port->write_urb->status == -EINPROGRESS) {
! 		dbg (__FUNCTION__ " - already writing");
  		return 0;
  	}
  
  	/*
! 	 * The first byte of the packet we send to the device contains a BOD
! 	 * and baud rate change.  So we set it to 0.
  	 * See section 5.4.2.2 of the USB IrDA spec.
  	 */
! 	transfer_buffer = port->write_urb->transfer_buffer;
! 	count = min (port->bulk_out_size-1, count);
  	if (from_user) {
! 		if (copy_from_user (&transfer_buffer[1], buf, count))
  			return -EFAULT;
  	} else {
! 		memcpy (&transfer_buffer[1], buf, count);
  	}
  
! 	/* use 12 XBOF's as default */
! 	transfer_buffer[0] = 0x30;
! 
! 	usb_serial_debug_data (__FILE__, __FUNCTION__, count+1, transfer_buffer);
  
+ 	port->write_urb->transfer_buffer_length = count + 1;
+ 	port->write_urb->dev = port->serial->dev;
+ 	port->write_urb->transfer_flags |= USB_ZERO_PACKET;
  	result = usb_submit_urb (port->write_urb);
  	if (result)
! 		err(__FUNCTION__ " - failed submitting write urb, error %d", result);
  	else
! 		result = count;
  
  	return result;
  }
***************
*** 409,427 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	
  	if (urb->status) {
! 		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
- 	usb_serial_debug_data (
- 		__FILE__,
- 		__FUNCTION__,
- 		urb->actual_length,
- 		urb->transfer_buffer);
- 
  	queue_task(&port->tqueue, &tq_immediate);
  	mark_bh(IMMEDIATE_BH);
  	
--- 337,349 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg(__FUNCTION__ " - port %d", port->number);
  	
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
  		return;
  	}
  
  	queue_task(&port->tqueue, &tq_immediate);
  	mark_bh(IMMEDIATE_BH);
  	
***************
*** 439,525 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  
! 	if (!port->open_count) {
! 		dbg("%s - port closed.", __FUNCTION__);
  		return;
  	}
  
! 	switch (urb->status) {
! 
! 		case 0: /* Successful */
! 
! 			/*
! 			 * The first byte of the packet we get from the device
! 			 * contains a busy indicator and baud rate change.
! 			 * See section 5.4.1.2 of the USB IrDA spec.
! 			 */
! 			if((*data & 0x0f) > 0) ir_baud = *data & 0x0f;
! 
! 			usb_serial_debug_data (
! 				__FILE__,
! 				__FUNCTION__,
! 				urb->actual_length,
! 				data);
! 
! 			/*
! 			 * Bypass flip-buffers, and feed the ldisc directly
! 			 * due to our potentally large buffer size.  Since we
! 			 * used to set low_latency, this is exactly what the
! 			 * tty layer did anyway :)
! 			 */
! 			tty = port->tty;
! 
! 			tty->ldisc.receive_buf(
! 				tty,
! 				data+1,
! 				NULL,
! 				urb->actual_length-1);
! 
! 			/*
! 			 * No break here.
! 			 * We want to resubmit the urb so we can read
! 			 * again.
! 			 */
! 
! 		case -EPROTO: /* taking inspiration from pl2303.c */
! 
! 			/* Continue trying to always read */
! 			usb_fill_bulk_urb (
! 				port->read_urb,
! 				serial->dev, 
! 				usb_rcvbulkpipe(serial->dev,
! 					port->bulk_in_endpointAddress),
! 				port->read_urb->transfer_buffer,
! 				port->read_urb->transfer_buffer_length,
! 				ir_read_bulk_callback,
! 				port);
! 
! 			port->read_urb->transfer_flags = USB_QUEUE_BULK;
! 
! 			result = usb_submit_urb(port->read_urb);
! 
! 			if (result)
! 				err("%s - failed resubmitting read urb, error %d",
! 					__FUNCTION__, 
! 					result);
! 
! 			break ;
! 
! 		default:
! 			dbg("%s - nonzero read bulk status received: %d",
! 				__FUNCTION__, 
! 				urb->status);
! 			break ;
! 
! 	}
  
  	return;
  }
  
--- 361,394 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  
! 	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
  		return;
  	}
  
! 	usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
  
+ 	/* Bypass flip-buffers, and feed the ldisc directly due to our 
+ 	 * potentally large buffer size.  Since we used to set low_latency,
+ 	 * this is exactly what the tty layer did anyway :) */
+ 	tty = port->tty;
+ 	tty->ldisc.receive_buf(tty, data+1, NULL, urb->actual_length-1);
+ 
+ 	/* Continue trying to always read  */
+ 	FILL_BULK_URB(port->read_urb, serial->dev, 
+ 		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
+ 		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
+ 		      ir_read_bulk_callback, port);
+ 	result = usb_submit_urb(port->read_urb);
+ 	if (result)
+ 		err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
  	return;
  }
  
***************
*** 528,538 ****
  	unsigned char *transfer_buffer;
  	unsigned int cflag;
  	int result;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if ((!port->tty) || (!port->tty->termios)) {
! 		dbg("%s - no tty structures", __FUNCTION__);
  		return;
  	}
  
--- 397,408 ----
  	unsigned char *transfer_buffer;
  	unsigned int cflag;
  	int result;
+ 	u8 baud;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if ((!port->tty) || (!port->tty->termios)) {
! 		dbg(__FUNCTION__" - no tty structures");
  		return;
  	}
  
***************
*** 541,610 ****
  	if (old_termios) {
  		if ((cflag == old_termios->c_cflag) &&
  		    (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
! 			dbg("%s - nothing to change...", __FUNCTION__);
  			return;
  		}
  	}
  
  	/* All we can change is the baud rate */
  	if (cflag & CBAUD) {
! 
! 		dbg ("%s - asking for baud %d",
! 			__FUNCTION__,
! 			tty_get_baud_rate(port->tty));
! 
  		/* 
  		 * FIXME, we should compare the baud request against the
  		 * capability stated in the IR header that we got in the
  		 * startup funtion.
  		 */
  		switch (cflag & CBAUD) {
! 			case B2400:    ir_baud = SPEED_2400;    break;
  			default:
! 			case B9600:    ir_baud = SPEED_9600;    break;
! 			case B19200:   ir_baud = SPEED_19200;   break;
! 			case B38400:   ir_baud = SPEED_38400;   break;
! 			case B57600:   ir_baud = SPEED_57600;   break;
! 			case B115200:  ir_baud = SPEED_115200;  break;
! 			case B576000:  ir_baud = SPEED_576000;  break;
! 			case B1152000: ir_baud = SPEED_1152000; break;
! 			case B4000000: ir_baud = SPEED_4000000; break;
  		}
! 
! 		if (xbof == -1) {
! 			ir_xbof = ir_xbof_change(ir_add_bof);
! 		} else {
! 			ir_xbof = ir_xbof_change(xbof) ;
! 		}
! 
! 		/* Notify the tty driver that the termios have changed. */
! 		port->tty->ldisc.set_termios(port->tty, NULL);
! 
  		/* FIXME need to check to see if our write urb is busy right
! 		 * now, or use a urb pool.
! 		 *
! 		 * send the baud change out on an "empty" data packet
! 		 */
  		transfer_buffer = port->write_urb->transfer_buffer;
! 		*transfer_buffer = ir_xbof | ir_baud;
! 
! 		usb_fill_bulk_urb (
! 			port->write_urb,
! 			port->serial->dev,
! 			usb_sndbulkpipe(port->serial->dev,
! 				port->bulk_out_endpointAddress),
! 			port->write_urb->transfer_buffer,
! 			1,
! 			ir_write_bulk_callback,
! 			port);
! 
! 		port->write_urb->transfer_flags
! 			= USB_QUEUE_BULK
! 			| USB_ZERO_PACKET;
! 
  		result = usb_submit_urb (port->write_urb);
  		if (result)
! 			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
  	}
  	return;
  }
--- 411,454 ----
  	if (old_termios) {
  		if ((cflag == old_termios->c_cflag) &&
  		    (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
! 			dbg(__FUNCTION__ " - nothing to change...");
  			return;
  		}
  	}
  
  	/* All we can change is the baud rate */
  	if (cflag & CBAUD) {
! 		dbg (__FUNCTION__ " - asking for baud %d", tty_get_baud_rate(port->tty));
  		/* 
  		 * FIXME, we should compare the baud request against the
  		 * capability stated in the IR header that we got in the
  		 * startup funtion.
  		 */
  		switch (cflag & CBAUD) {
! 			case B2400:	baud = SPEED_2400;	break;
! 			case B9600:	baud = SPEED_9600;	break;
! 			case B19200:	baud = SPEED_19200;	break;
! 			case B38400:	baud = SPEED_38400;	break;
! 			case B57600:	baud = SPEED_57600;	break;
! 			case B115200:	baud = SPEED_115200;	break;
! 			case B576000:	baud = SPEED_576000;	break;
! 			case B1152000:	baud = SPEED_1152000;	break;
! 			case B4000000:	baud = SPEED_4000000;	break;
  			default:
! 				err ("ir-usb driver does not support the baudrate (%d) requested", tty_get_baud_rate(port->tty));
! 				return;
  		}
! 		
  		/* FIXME need to check to see if our write urb is busy right
! 		 * now, or use a urb pool. */
! 		/* send the baud change out on an "empty" data packet */
  		transfer_buffer = port->write_urb->transfer_buffer;
! 		transfer_buffer[0] = baud;
! 		port->write_urb->transfer_buffer_length = 1;
! 		port->write_urb->dev = port->serial->dev;
  		result = usb_submit_urb (port->write_urb);
  		if (result)
! 			err(__FUNCTION__ " - failed submitting write urb, error %d", result);
  	}
  	return;
  }
***************
*** 633,640 ****
  
  MODULE_PARM(debug, "i");
  MODULE_PARM_DESC(debug, "Debug enabled or not");
- MODULE_PARM(xbof, "i");
- MODULE_PARM_DESC(xbof, "Force specific number of XBOFs");
  MODULE_PARM(buffer_size, "i");
  MODULE_PARM_DESC(buffer_size, "Size of the transfer buffers");
  
--- 477,482 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,8 ****
  /*
    Keyspan USB to Serial Converter driver
   
!   (C) Copyright (C) 2000-2001	Hugh Blemings 
!   (C) Copyright (C) 2002	Greg Kroah-Hartman 
     
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
--- 1,8 ----
  /*
    Keyspan USB to Serial Converter driver
   
!   (C) Copyright (C) 2000-2001
!       Hugh Blemings 
     
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
***************
*** 28,44 ****
  
    Change History
  
-     Wed Apr 25 12:00:00 PST 2002 (Keyspan)
-       Started with Hugh Blemings' code dated Jan 17, 2002.  All adapters
-       now supported (including QI and QW).  Modified port open, port
-       close, and send setup() logic to fix various data and endpoint
-       synchronization bugs and device LED status bugs.  Changed keyspan_
-       write_room() to accurately return transmit buffer availability.
-       Changed forwardingLength from 1 to 16 for all adapters.
- 
-     Fri Oct 12 16:45:00 EST 2001
-       Preliminary USA-19QI and USA-28 support (both test OK for me, YMMV)
- 
      Mon Oct  8 14:29:00 EST 2001 hugh
        Fixed bug that prevented mulitport devices operating correctly
        if they weren't the first unit attached.
--- 28,33 ----
***************
*** 76,90 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
! #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
  	static int debug = 1;
--- 65,83 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
! #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
  	static int debug = 1;
***************
*** 102,108 ****
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.1.3"
  #define DRIVER_AUTHOR "Hugh Blemings number);
  }
  
  
  static void keyspan_rx_unthrottle (struct usb_serial_port *port)
  {
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  }
  
  
--- 227,239 ----
  
  static void keyspan_rx_throttle (struct usb_serial_port *port)
  {
! 	dbg("keyspan_rx_throttle port %d\n", port->number);
  }
  
  
  static void keyspan_rx_unthrottle (struct usb_serial_port *port)
  {
! 	dbg("keyspan_rx_unthrottle port %d\n", port->number);
  }
  
  
***************
*** 215,221 ****
  {
  	struct keyspan_port_private 	*p_priv;
  
!  	dbg("%s", __FUNCTION__);
  
  	p_priv = (struct keyspan_port_private *)port->private;
  
--- 241,247 ----
  {
  	struct keyspan_port_private 	*p_priv;
  
!  	dbg("keyspan_break_ctl\n");
  
  	p_priv = (struct keyspan_port_private *)port->private;
  
***************
*** 231,247 ****
  static void keyspan_set_termios (struct usb_serial_port *port, 
  				     struct termios *old_termios)
  {
! 	int				baud_rate, device_port;
  	struct keyspan_port_private 	*p_priv;
! 	const struct keyspan_device_details	*d_details;
  	unsigned int 			cflag;
  
! 	dbg("%s", __FUNCTION__); 
  
  	p_priv = (struct keyspan_port_private *)(port->private);
  	d_details = p_priv->device_details;
  	cflag = port->tty->termios->c_cflag;
- 	device_port = port->number - port->serial->minor;
  
  	/* Baud rate calculation takes baud rate as an integer
  	   so other rates can be generated if desired. */
--- 257,272 ----
  static void keyspan_set_termios (struct usb_serial_port *port, 
  				     struct termios *old_termios)
  {
! 	int				baud_rate;
  	struct keyspan_port_private 	*p_priv;
! 	const keyspan_device_details	*d_details;
  	unsigned int 			cflag;
  
! 	dbg(__FUNCTION__ ".\n"); 
  
  	p_priv = (struct keyspan_port_private *)(port->private);
  	d_details = p_priv->device_details;
  	cflag = port->tty->termios->c_cflag;
  
  	/* Baud rate calculation takes baud rate as an integer
  	   so other rates can be generated if desired. */
***************
*** 249,255 ****
  	/* If no match or invalid, don't change */		
  	if (baud_rate >= 0
  	    && d_details->calculate_baud_rate(baud_rate, d_details->baudclk,
! 				NULL, NULL, NULL, device_port) == KEYSPAN_BAUD_RATE_OK) {
  		/* FIXME - more to do here to ensure rate changes cleanly */
  		p_priv->baud = baud_rate;
  	}
--- 274,280 ----
  	/* If no match or invalid, don't change */		
  	if (baud_rate >= 0
  	    && d_details->calculate_baud_rate(baud_rate, d_details->baudclk,
! 				NULL, NULL, NULL) == KEYSPAN_BAUD_RATE_OK) {
  		/* FIXME - more to do here to ensure rate changes cleanly */
  		p_priv->baud = baud_rate;
  	}
***************
*** 312,328 ****
  			 const unsigned char *buf, int count)
  {
  	struct keyspan_port_private 	*p_priv;
! 	const struct keyspan_device_details	*d_details;
  	int				flip;
  	int 				left, todo;
! 	struct urb			*this_urb;
  	int 				err;
  
  	p_priv = (struct keyspan_port_private *)(port->private);
  	d_details = p_priv->device_details;
  
! 	dbg("%s - for port %d (%d chars [%x]), flip=%d",
! 	    __FUNCTION__, port->number, count, buf[0], p_priv->out_flip);
  
  	for (left = count; left > 0; left -= todo) {
  		todo = left;
--- 337,355 ----
  			 const unsigned char *buf, int count)
  {
  	struct keyspan_port_private 	*p_priv;
! 	const keyspan_device_details	*d_details;
  	int				flip;
  	int 				left, todo;
! 	urb_t 				*this_urb;
  	int 				err;
  
  	p_priv = (struct keyspan_port_private *)(port->private);
  	d_details = p_priv->device_details;
  
! #if 0
! 	dbg(__FUNCTION__ " for port %d (%d chars [%x]), flip=%d\n",
! 	    port->number, count, buf[0], p_priv->out_flip);
! #endif
  
  	for (left = count; left > 0; left -= todo) {
  		todo = left;
***************
*** 334,344 ****
  		/* Check we have a valid urb/endpoint before we use it... */
  		if ((this_urb = p_priv->out_urbs[flip]) == 0) {
  			/* no bulk out, so return 0 bytes written */
! 			dbg("%s - no output urb :(", __FUNCTION__);
  			return count;
  		}
  
! 		dbg("%s - endpoint %d flip %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe), flip);
  
  		if (this_urb->status == -EINPROGRESS) {
  			if (this_urb->transfer_flags & USB_ASYNC_UNLINK)
--- 361,371 ----
  		/* Check we have a valid urb/endpoint before we use it... */
  		if ((this_urb = p_priv->out_urbs[flip]) == 0) {
  			/* no bulk out, so return 0 bytes written */
! 			dbg(__FUNCTION__ " no output urb :(\n");
  			return count;
  		}
  
! 		dbg(__FUNCTION__ " endpoint %d\n", usb_pipeendpoint(this_urb->pipe));
  
  		if (this_urb->status == -EINPROGRESS) {
  			if (this_urb->transfer_flags & USB_ASYNC_UNLINK)
***************
*** 368,374 ****
  		this_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
  		this_urb->dev = port->serial->dev;
  		if ((err = usb_submit_urb(this_urb)) != 0) {
! 			dbg("usb_submit_urb(write bulk) failed (%d)", err);
  		}
  		p_priv->tx_start_time[flip] = jiffies;
  
--- 395,401 ----
  		this_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
  		this_urb->dev = port->serial->dev;
  		if ((err = usb_submit_urb(this_urb)) != 0) {
! 			dbg("usb_submit_urb(write bulk) failed (%d)\n", err);
  		}
  		p_priv->tx_start_time[flip] = jiffies;
  
***************
*** 388,415 ****
  	struct tty_struct	*tty;
  	unsigned char 		*data = urb->transfer_buffer;
  
! 	dbg ("%s", __FUNCTION__); 
  
  	endpoint = usb_pipeendpoint(urb->pipe);
  
  	if (urb->status) {
! 		dbg("%s - nonzero status: %x on endpoint %d.",
! 		    __FUNCTION__, urb->status, endpoint);
  		return;
  	}
  
  	port = (struct usb_serial_port *) urb->context;
  	tty = port->tty;
  	if (urb->actual_length) {
! 		/* 0x80 bit is error flag */
! 		if ((data[0] & 0x80) == 0) {
  			/* no error on any byte */
  			for (i = 1; i < urb->actual_length ; ++i) {
  				tty_insert_flip_char(tty, data[i], 0);
  			}
  		} else {
  			/* some bytes had errors, every byte has status */
- 			dbg("%s - RX error!!!!", __FUNCTION__);
  			for (i = 0; i + 1 < urb->actual_length; i += 2) {
  				int stat = data[i], flag = 0;
  				if (stat & RXERROR_OVERRUN)
--- 415,440 ----
  	struct tty_struct	*tty;
  	unsigned char 		*data = urb->transfer_buffer;
  
! 	dbg ("%s\n", __FUNCTION__); 
  
  	endpoint = usb_pipeendpoint(urb->pipe);
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ "nonzero status: %x on endpoint %d.\n",
! 			      		urb->status, endpoint);
  		return;
  	}
  
  	port = (struct usb_serial_port *) urb->context;
  	tty = port->tty;
  	if (urb->actual_length) {
! 		if (data[0] == 0) {
  			/* no error on any byte */
  			for (i = 1; i < urb->actual_length ; ++i) {
  				tty_insert_flip_char(tty, data[i], 0);
  			}
  		} else {
  			/* some bytes had errors, every byte has status */
  			for (i = 0; i + 1 < urb->actual_length; i += 2) {
  				int stat = data[i], flag = 0;
  				if (stat & RXERROR_OVERRUN)
***************
*** 427,436 ****
  				
  		/* Resubmit urb so we continue receiving */
  	urb->dev = port->serial->dev;
! 	if (port->open_count)
! 		if ((err = usb_submit_urb(urb)) != 0) {
! 			dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
! 		}
  	return;
  }
  
--- 452,460 ----
  				
  		/* Resubmit urb so we continue receiving */
  	urb->dev = port->serial->dev;
! 	if ((err = usb_submit_urb(urb)) != 0) {
! 		dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
! 	}
  	return;
  }
  
***************
*** 442,450 ****
  
  	port = (struct usb_serial_port *) urb->context;
  	p_priv = (struct keyspan_port_private *)(port->private);
! 	dbg ("%s - urb %d", __FUNCTION__, urb == p_priv->out_urbs[1]); 
  
! 	if (port->open_count) {
  		queue_task(&port->tqueue, &tq_immediate);
  		mark_bh(IMMEDIATE_BH);
  	}
--- 466,474 ----
  
  	port = (struct usb_serial_port *) urb->context;
  	p_priv = (struct keyspan_port_private *)(port->private);
! 	dbg (__FUNCTION__ " urb %d\n", urb == p_priv->out_urbs[1]); 
  
! 	if (port->active) {
  		queue_task(&port->tqueue, &tq_immediate);
  		mark_bh(IMMEDIATE_BH);
  	}
***************
*** 452,458 ****
  
  static void	usa26_inack_callback(struct urb *urb)
  {
! 	dbg ("%s", __FUNCTION__); 
  	
  }
  
--- 476,482 ----
  
  static void	usa26_inack_callback(struct urb *urb)
  {
! 	dbg ("%s\n", __FUNCTION__); 
  	
  }
  
***************
*** 465,479 ****
  	p_priv = (struct keyspan_port_private *)(port->private);
  
  	if (p_priv->resend_cont) {
! 		dbg ("%s - sending setup", __FUNCTION__); 
! 		keyspan_usa26_send_setup(port->serial, port, p_priv->resend_cont - 1);
  	}
  }
  
  static void	usa26_instat_callback(struct urb *urb)
  {
  	unsigned char 				*data = urb->transfer_buffer;
! 	struct keyspan_usa26_portStatusMessage	*msg;
  	struct usb_serial			*serial;
  	struct usb_serial_port			*port;
  	struct keyspan_port_private	 	*p_priv;
--- 489,503 ----
  	p_priv = (struct keyspan_port_private *)(port->private);
  
  	if (p_priv->resend_cont) {
! 		dbg (__FUNCTION__ " sending setup\n"); 
! 		keyspan_usa26_send_setup(port->serial, port, 0);
  	}
  }
  
  static void	usa26_instat_callback(struct urb *urb)
  {
  	unsigned char 				*data = urb->transfer_buffer;
! 	keyspan_usa26_portStatusMessage		*msg;
  	struct usb_serial			*serial;
  	struct usb_serial_port			*port;
  	struct keyspan_port_private	 	*p_priv;
***************
*** 482,500 ****
  	serial = (struct usb_serial *) urb->context;
  
  	if (urb->status) {
! 		dbg("%s - nonzero status: %x", __FUNCTION__, urb->status);
  		return;
  	}
  	if (urb->actual_length != 9) {
! 		dbg("%s - %d byte report??", __FUNCTION__, urb->actual_length);
  		goto exit;
  	}
  
! 	msg = (struct keyspan_usa26_portStatusMessage *)data;
  
  #if 0
! 	dbg("%s - port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d",
! 	    __FUNCTION__, msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff,
  	    msg->_txXoff, msg->rxEnabled, msg->controlResponse);
  #endif
  
--- 506,524 ----
  	serial = (struct usb_serial *) urb->context;
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " nonzero status: %x\n", urb->status);
  		return;
  	}
  	if (urb->actual_length != 9) {
! 		dbg(__FUNCTION__ " %d byte report??\n", urb->actual_length);
  		goto exit;
  	}
  
! 	msg = (keyspan_usa26_portStatusMessage *)data;
  
  #if 0
! 	dbg(__FUNCTION__ " port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d\n",
! 	    msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff,
  	    msg->_txXoff, msg->rxEnabled, msg->controlResponse);
  #endif
  
***************
*** 503,509 ****
  
  	/* Check port number from message and retrieve private data */	
  	if (msg->port >= serial->num_ports) {
! 		dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port);
  		goto exit;
  	}
  	port = &serial->port[msg->port];
--- 527,533 ----
  
  	/* Check port number from message and retrieve private data */	
  	if (msg->port >= serial->num_ports) {
! 		dbg ("Unexpected port number %d\n", msg->port);
  		goto exit;
  	}
  	port = &serial->port[msg->port];
***************
*** 524,540 ****
  		/*	wake_up_interruptible(&p_priv->open_wait); */
  	}
  	
  	/* Resubmit urb so we continue receiving */
  	urb->dev = serial->dev;
  	if ((err = usb_submit_urb(urb)) != 0) {
! 		dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
  	}
- exit:
  }
  
  static void	usa26_glocont_callback(struct urb *urb)
  {
! 	dbg ("%s", __FUNCTION__);
  	
  }
  
--- 548,564 ----
  		/*	wake_up_interruptible(&p_priv->open_wait); */
  	}
  	
+ exit:
  	/* Resubmit urb so we continue receiving */
  	urb->dev = serial->dev;
  	if ((err = usb_submit_urb(urb)) != 0) {
! 		dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
  	}
  }
  
  static void	usa26_glocont_callback(struct urb *urb)
  {
! 	dbg ("%s\n", __FUNCTION__);
  	
  }
  
***************
*** 547,553 ****
  	unsigned char           *data;
  	struct keyspan_port_private             *p_priv;
  
! 	dbg ("%s", __FUNCTION__);
  
  	port = (struct usb_serial_port *) urb->context;
  	p_priv = (struct keyspan_port_private *)(port->private);
--- 571,577 ----
  	unsigned char           *data;
  	struct keyspan_port_private             *p_priv;
  
! 	dbg ("%s\n", __FUNCTION__);
  
  	port = (struct usb_serial_port *) urb->context;
  	p_priv = (struct keyspan_port_private *)(port->private);
***************
*** 558,565 ****
  
  	do {
  		if (urb->status) {
! 			dbg("%s - nonzero status: %x on endpoint %d.",
! 			    __FUNCTION__, urb->status, usb_pipeendpoint(urb->pipe));
  			return;
  		}
  
--- 582,590 ----
  
  	do {
  		if (urb->status) {
! 			dbg(__FUNCTION__ "nonzero status: %x on endpoint
! %d.\n",
! 			    urb->status, usb_pipeendpoint(urb->pipe));
  			return;
  		}
  
***************
*** 577,586 ****
  
  		/* Resubmit urb so we continue receiving */
  		urb->dev = port->serial->dev;
! 		if (port->open_count)
! 			if ((err = usb_submit_urb(urb)) != 0) {
! 				dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
! 			}
  		p_priv->in_flip ^= 1;
  
  		urb = p_priv->in_urbs[p_priv->in_flip];
--- 602,611 ----
  
  		/* Resubmit urb so we continue receiving */
  		urb->dev = port->serial->dev;
! 		if ((err = usb_submit_urb(urb)) != 0) {
! 			dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n",
! err);
! 		}
  		p_priv->in_flip ^= 1;
  
  		urb = p_priv->in_urbs[p_priv->in_flip];
***************
*** 589,595 ****
  
  static void	usa28_inack_callback(struct urb *urb)
  {
! 	dbg ("%s", __FUNCTION__);
  }
  
  static void	usa28_outcont_callback(struct urb *urb)
--- 614,620 ----
  
  static void	usa28_inack_callback(struct urb *urb)
  {
! 	dbg ("%s\n", __FUNCTION__);
  }
  
  static void	usa28_outcont_callback(struct urb *urb)
***************
*** 601,608 ****
  	p_priv = (struct keyspan_port_private *)(port->private);
  
  	if (p_priv->resend_cont) {
! 		dbg ("%s - sending setup", __FUNCTION__);
! 		keyspan_usa28_send_setup(port->serial, port, p_priv->resend_cont - 1);
  	}
  }
  
--- 626,633 ----
  	p_priv = (struct keyspan_port_private *)(port->private);
  
  	if (p_priv->resend_cont) {
! 		dbg (__FUNCTION__ " sending setup\n");
! 		keyspan_usa28_send_setup(port->serial, port, 0);
  	}
  }
  
***************
*** 610,616 ****
  {
  	int					err;
  	unsigned char 				*data = urb->transfer_buffer;
! 	struct keyspan_usa28_portStatusMessage	*msg;
  	struct usb_serial			*serial;
  	struct usb_serial_port			*port;
  	struct keyspan_port_private	 	*p_priv;
--- 635,641 ----
  {
  	int					err;
  	unsigned char 				*data = urb->transfer_buffer;
! 	keyspan_usa28_portStatusMessage		*msg;
  	struct usb_serial			*serial;
  	struct usb_serial_port			*port;
  	struct keyspan_port_private	 	*p_priv;
***************
*** 619,644 ****
  	serial = (struct usb_serial *) urb->context;
  
  	if (urb->status) {
! 		dbg("%s - nonzero status: %x", __FUNCTION__, urb->status);
  		return;
  	}
  
  	if (urb->actual_length != sizeof(struct keyspan_usa28_portStatusMessage)) {
! 		dbg("%s - bad length %d", __FUNCTION__, urb->actual_length);
  		goto exit;
  	}
  
! 	/*dbg("%s %x %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__
  	    data[0], data[1], data[2], data[3], data[4], data[5],
  	    data[6], data[7], data[8], data[9], data[10], data[11]);*/
  	
  		/* Now do something useful with the data */
! 	msg = (struct keyspan_usa28_portStatusMessage *)data;
  
  
  		/* Check port number from message and retrieve private data */	
  	if (msg->port >= serial->num_ports) {
! 		dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port);
  		goto exit;
  	}
  	port = &serial->port[msg->port];
--- 644,669 ----
  	serial = (struct usb_serial *) urb->context;
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " nonzero status: %x\n", urb->status);
  		return;
  	}
  
  	if (urb->actual_length != sizeof(struct keyspan_usa28_portStatusMessage)) {
! 		dbg(__FUNCTION__ " bad length %d\n", urb->actual_length);
  		goto exit;
  	}
  
! 	/*dbg(__FUNCTION__ " %x %x %x %x %x %x %x %x %x %x %x %x\n",
  	    data[0], data[1], data[2], data[3], data[4], data[5],
  	    data[6], data[7], data[8], data[9], data[10], data[11]);*/
  	
  		/* Now do something useful with the data */
! 	msg = (keyspan_usa28_portStatusMessage *)data;
  
  
  		/* Check port number from message and retrieve private data */	
  	if (msg->port >= serial->num_ports) {
! 		dbg ("Unexpected port number %d\n", msg->port);
  		goto exit;
  	}
  	port = &serial->port[msg->port];
***************
*** 659,675 ****
  		/*	wake_up_interruptible(&p_priv->open_wait); */
  	}
  
  		/* Resubmit urb so we continue receiving */
  	urb->dev = serial->dev;
  	if ((err = usb_submit_urb(urb)) != 0) {
! 		dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
  	}
- exit:	
  }
  
  static void	usa28_glocont_callback(struct urb *urb)
  {
! 	dbg ("%s", __FUNCTION__);
  }
  
  
--- 684,700 ----
  		/*	wake_up_interruptible(&p_priv->open_wait); */
  	}
  
+ exit:	
  		/* Resubmit urb so we continue receiving */
  	urb->dev = serial->dev;
  	if ((err = usb_submit_urb(urb)) != 0) {
! 		dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
  	}
  }
  
  static void	usa28_glocont_callback(struct urb *urb)
  {
! 	dbg ("%s\n", __FUNCTION__);
  }
  
  
***************
*** 680,686 ****
  	struct keyspan_port_private *p_priv;
  	int i;
  
! 	dbg ("%s", __FUNCTION__);
  
  	serial = (struct usb_serial *) urb->context;
  	for (i = 0; i < serial->num_ports; ++i) {
--- 705,711 ----
  	struct keyspan_port_private *p_priv;
  	int i;
  
! 	dbg ("%s\n", __FUNCTION__);
  
  	serial = (struct usb_serial *) urb->context;
  	for (i = 0; i < serial->num_ports; ++i) {
***************
*** 688,695 ****
  		p_priv = (struct keyspan_port_private *)(port->private);
  
  		if (p_priv->resend_cont) {
! 			dbg ("%s - sending setup", __FUNCTION__); 
! 			keyspan_usa49_send_setup(serial, port, p_priv->resend_cont - 1);
  			break;
  		}
  	}
--- 713,720 ----
  		p_priv = (struct keyspan_port_private *)(port->private);
  
  		if (p_priv->resend_cont) {
! 			dbg (__FUNCTION__ " sending setup\n"); 
! 			keyspan_usa49_send_setup(serial, port, 0);
  			break;
  		}
  	}
***************
*** 701,736 ****
  {
  	int					err;
  	unsigned char 				*data = urb->transfer_buffer;
! 	struct keyspan_usa49_portStatusMessage	*msg;
  	struct usb_serial			*serial;
  	struct usb_serial_port			*port;
  	struct keyspan_port_private	 	*p_priv;
  	int old_dcd_state;
  
! 	dbg ("%s", __FUNCTION__);
  
  	serial = (struct usb_serial *) urb->context;
  
  	if (urb->status) {
! 		dbg("%s - nonzero status: %x", __FUNCTION__, urb->status);
  		return;
  	}
  
  	if (urb->actual_length != sizeof(struct keyspan_usa49_portStatusMessage)) {
! 		dbg("%s - bad length %d", __FUNCTION__, urb->actual_length);
  		goto exit;
  	}
  
! 	/*dbg(" %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__, 
  	    data[0], data[1], data[2], data[3], data[4], data[5],
  	    data[6], data[7], data[8], data[9], data[10]);*/
  	
  		/* Now do something useful with the data */
! 	msg = (struct keyspan_usa49_portStatusMessage *)data;
  
  		/* Check port number from message and retrieve private data */	
  	if (msg->portNumber >= serial->num_ports) {
! 		dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->portNumber);
  		goto exit;
  	}
  	port = &serial->port[msg->portNumber];
--- 726,761 ----
  {
  	int					err;
  	unsigned char 				*data = urb->transfer_buffer;
! 	keyspan_usa49_portStatusMessage		*msg;
  	struct usb_serial			*serial;
  	struct usb_serial_port			*port;
  	struct keyspan_port_private	 	*p_priv;
  	int old_dcd_state;
  
! 	dbg ("%s\n", __FUNCTION__);
  
  	serial = (struct usb_serial *) urb->context;
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " nonzero status: %x\n", urb->status);
  		return;
  	}
  
  	if (urb->actual_length != sizeof(struct keyspan_usa49_portStatusMessage)) {
! 		dbg(__FUNCTION__ " bad length %d\n", urb->actual_length);
  		goto exit;
  	}
  
! 	/*dbg(__FUNCTION__ " %x %x %x %x %x %x %x %x %x %x %x\n",
  	    data[0], data[1], data[2], data[3], data[4], data[5],
  	    data[6], data[7], data[8], data[9], data[10]);*/
  	
  		/* Now do something useful with the data */
! 	msg = (keyspan_usa49_portStatusMessage *)data;
  
  		/* Check port number from message and retrieve private data */	
  	if (msg->portNumber >= serial->num_ports) {
! 		dbg ("Unexpected port number %d\n", msg->portNumber);
  		goto exit;
  	}
  	port = &serial->port[msg->portNumber];
***************
*** 751,768 ****
  		/*	wake_up_interruptible(&p_priv->open_wait); */
  	}
  
  		/* Resubmit urb so we continue receiving */
  	urb->dev = serial->dev;
  
  	if ((err = usb_submit_urb(urb)) != 0) {
! 		dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
  	}
- exit:	
  }
  
  static void	usa49_inack_callback(struct urb *urb)
  {
! 	dbg ("%s", __FUNCTION__);
  }
  
  static void	usa49_indat_callback(struct urb *urb)
--- 776,793 ----
  		/*	wake_up_interruptible(&p_priv->open_wait); */
  	}
  
+ exit:	
  		/* Resubmit urb so we continue receiving */
  	urb->dev = serial->dev;
  
  	if ((err = usb_submit_urb(urb)) != 0) {
! 		dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
  	}
  }
  
  static void	usa49_inack_callback(struct urb *urb)
  {
! 	dbg ("%s\n", __FUNCTION__);
  }
  
  static void	usa49_indat_callback(struct urb *urb)
***************
*** 773,793 ****
  	struct tty_struct	*tty;
  	unsigned char 		*data = urb->transfer_buffer;
  
! 	dbg ("%s", __FUNCTION__);
  
  	endpoint = usb_pipeendpoint(urb->pipe);
  
  	if (urb->status) {
! 		dbg("%s - nonzero status: %x on endpoint %d.", __FUNCTION__,
! 		    urb->status, endpoint);
  		return;
  	}
  
  	port = (struct usb_serial_port *) urb->context;
  	tty = port->tty;
  	if (urb->actual_length) {
! 		/* 0x80 bit is error flag */
! 		if ((data[0] & 0x80) == 0) {
  			/* no error on any byte */
  			for (i = 1; i < urb->actual_length ; ++i) {
  				tty_insert_flip_char(tty, data[i], 0);
--- 798,817 ----
  	struct tty_struct	*tty;
  	unsigned char 		*data = urb->transfer_buffer;
  
! 	dbg ("%s\n", __FUNCTION__);
  
  	endpoint = usb_pipeendpoint(urb->pipe);
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ "nonzero status: %x on endpoint %d.\n",
! 			      		urb->status, endpoint);
  		return;
  	}
  
  	port = (struct usb_serial_port *) urb->context;
  	tty = port->tty;
  	if (urb->actual_length) {
! 		if (data[0] == 0) {
  			/* no error on any byte */
  			for (i = 1; i < urb->actual_length ; ++i) {
  				tty_insert_flip_char(tty, data[i], 0);
***************
*** 811,853 ****
  				
  		/* Resubmit urb so we continue receiving */
  	urb->dev = port->serial->dev;
! 	if (port->open_count)
! 		if ((err = usb_submit_urb(urb)) != 0) {
! 			dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
! 		}
  }
  
  /* not used, usa-49 doesn't have per-port control endpoints */
  static void	usa49_outcont_callback(struct urb *urb)
  {
! 	dbg ("%s", __FUNCTION__);
  }
  
  
  
  static int keyspan_write_room (struct usb_serial_port *port)
  {
! 	struct keyspan_port_private	*p_priv;
! 	const struct keyspan_device_details	*d_details;
! 	int				flip;
! 	struct urb			*this_urb;
  
- 	dbg("%s", __FUNCTION__);
- 	p_priv = (struct keyspan_port_private *)(port->private);
- 	d_details = p_priv->device_details;
- 
- 	flip = p_priv->out_flip;
- 
- 	/* Check both endpoints to see if any are available. */
- 	if ((this_urb = p_priv->out_urbs[flip]) != 0) {
- 		if (this_urb->status != -EINPROGRESS)
- 			return (63);
- 		flip = (flip + 1) & d_details->outdat_endp_flip;        
- 		if ((this_urb = p_priv->out_urbs[flip]) != 0) 
- 			if (this_urb->status != -EINPROGRESS)
- 				return (63);
- 	}
- 	return (0);
  }
  
  
--- 835,858 ----
  				
  		/* Resubmit urb so we continue receiving */
  	urb->dev = port->serial->dev;
! 	if ((err = usb_submit_urb(urb)) != 0) {
! 		dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err);
! 	}
  }
  
  /* not used, usa-49 doesn't have per-port control endpoints */
  static void	usa49_outcont_callback(struct urb *urb)
  {
! 	dbg ("%s\n", __FUNCTION__);
  }
  
  
  
  static int keyspan_write_room (struct usb_serial_port *port)
  {
! 	dbg("keyspan_write_room called\n");
! 	return (32);
  
  }
  
  
***************
*** 862,876 ****
  	struct keyspan_port_private 	*p_priv;
  	struct keyspan_serial_private 	*s_priv;
  	struct usb_serial 		*serial = port->serial;
! 	const struct keyspan_device_details	*d_details;
! 	int				i, err;
! 	struct urb			*urb;
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	p_priv = (struct keyspan_port_private *)(port->private);
  	d_details = s_priv->device_details;
  	
! 	dbg("%s - port%d.", __FUNCTION__, port->number); 
  
  	p_priv = (struct keyspan_port_private *)(port->private);
  	
--- 867,892 ----
  	struct keyspan_port_private 	*p_priv;
  	struct keyspan_serial_private 	*s_priv;
  	struct usb_serial 		*serial = port->serial;
! 	const keyspan_device_details	*d_details;
! 	int				i, already_active, err;
! 	urb_t *urb;
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	p_priv = (struct keyspan_port_private *)(port->private);
  	d_details = s_priv->device_details;
  	
! 	dbg("keyspan_open called for port%d.\n", port->number); 
! 
! 	MOD_INC_USE_COUNT;
! 
! 	down (&port->sem);
! 	++port->open_count;
! 	already_active = port->active;
! 	port->active = 1;
! 	up (&port->sem);
! 
! 	if (already_active)
! 		return 0;
  
  	p_priv = (struct keyspan_port_private *)(port->private);
  	
***************
*** 878,914 ****
  	p_priv->rts_state = 1;
  	p_priv->dtr_state = 1;
  
! 	p_priv->out_flip = 0;
! 	p_priv->in_flip = 0;
! 
! 	/* Reset low level data toggle and start reading from endpoints */
  	for (i = 0; i < 2; i++) {
  		if ((urb = p_priv->in_urbs[i]) == NULL)
  			continue;
  		urb->dev = serial->dev;
- 		usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe), 0);
- 
  		if ((err = usb_submit_urb(urb)) != 0) {
! 			dbg("%s - submit urb %d failed (%d)", __FUNCTION__, i, err);
  		}
  	}
  
- 	/* Reset low level data toggle on out endpoints */
- 	for (i = 0; i < 2; i++) {
- 		if ((urb = p_priv->out_urbs[i]) == NULL)
- 			continue;
- 		urb->dev = serial->dev;
- 		/* usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe), 0); */
- 	}
- 
- 	keyspan_send_setup(port, 1);
- 	//mdelay(100);
  	keyspan_set_termios(port, NULL);
  
  	return (0);
  }
  
! static inline void stop_urb(struct urb *urb)
  {
  	if (urb && urb->status == -EINPROGRESS) {
  		urb->transfer_flags &= ~USB_ASYNC_UNLINK;
--- 894,915 ----
  	p_priv->rts_state = 1;
  	p_priv->dtr_state = 1;
  
! 	/* Start reading from endpoints */
  	for (i = 0; i < 2; i++) {
  		if ((urb = p_priv->in_urbs[i]) == NULL)
  			continue;
  		urb->dev = serial->dev;
  		if ((err = usb_submit_urb(urb)) != 0) {
! 			dbg(__FUNCTION__ " submit urb %d failed (%d)\n", i, err);
  		}
  	}
  
  	keyspan_set_termios(port, NULL);
  
  	return (0);
  }
  
! static inline void stop_urb(urb_t *urb)
  {
  	if (urb && urb->status == -EINPROGRESS) {
  		urb->transfer_flags &= ~USB_ASYNC_UNLINK;
***************
*** 927,963 ****
  	if (!serial)
  		return;
  
! 	dbg("%s", __FUNCTION__);
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	p_priv = (struct keyspan_port_private *)(port->private);
  	
  	p_priv->rts_state = 0;
  	p_priv->dtr_state = 0;
  	
! 	if (serial->dev) {
! 		keyspan_send_setup(port, 2);
! 		/* pilot-xfer seems to work best with this delay */
! 		mdelay(100);
! 		keyspan_set_termios(port, NULL);
! 	}
  
  	/*while (p_priv->outcont_urb->status == -EINPROGRESS) {
! 		dbg("%s - urb in progress", __FUNCTION__);
  	}*/
  
  	p_priv->out_flip = 0;
  	p_priv->in_flip = 0;
  
! 	if (serial->dev) {
! 		/* Stop reading/writing urbs */
! 		stop_urb(p_priv->inack_urb);
! 		/* stop_urb(p_priv->outcont_urb); */
! 		for (i = 0; i < 2; i++) {
! 			stop_urb(p_priv->in_urbs[i]);
! 			stop_urb(p_priv->out_urbs[i]);
  		}
  	}
! 	port->tty = 0;
  }
  
  
--- 928,971 ----
  	if (!serial)
  		return;
  
! 	dbg("keyspan_close called\n");
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	p_priv = (struct keyspan_port_private *)(port->private);
  	
  	p_priv->rts_state = 0;
  	p_priv->dtr_state = 0;
  	
! 	if (serial->dev)
! 		keyspan_send_setup(port, 1);
  
  	/*while (p_priv->outcont_urb->status == -EINPROGRESS) {
! 		dbg("close - urb in progress\n");
  	}*/
  
  	p_priv->out_flip = 0;
  	p_priv->in_flip = 0;
  
! 	down (&port->sem);
! 
! 	if (--port->open_count <= 0) {
! 		if (port->active) {
! 			if (serial->dev) {
! 				/* Stop reading/writing urbs */
! 				stop_urb(p_priv->inack_urb);
! 				stop_urb(p_priv->outcont_urb);
! 				for (i = 0; i < 2; i++) {
! 					stop_urb(p_priv->in_urbs[i]);
! 					stop_urb(p_priv->out_urbs[i]);
! 				}
! 			}
  		}
+ 		port->active = 0;
+ 		port->open_count = 0;
+ 		port->tty = 0;
  	}
! 	up (&port->sem);
! 
! 	MOD_DEC_USE_COUNT;
  }
  
  
***************
*** 968,979 ****
  	const struct ezusb_hex_record 	*record;
  	char				*fw_name;
  
! 	dbg("Keyspan startup version %04x product %04x",
  	    serial->dev->descriptor.bcdDevice,
  	    serial->dev->descriptor.idProduct); 
  	
  	if ((serial->dev->descriptor.bcdDevice & 0x8000) != 0x8000) {
! 		dbg("Firmware already loaded.  Quitting.");
  		return(1);
  	}
  
--- 976,987 ----
  	const struct ezusb_hex_record 	*record;
  	char				*fw_name;
  
! 	dbg("Keyspan startup version %04x product %04x\n",
  	    serial->dev->descriptor.bcdDevice,
  	    serial->dev->descriptor.idProduct); 
  	
  	if ((serial->dev->descriptor.bcdDevice & 0x8000) != 0x8000) {
! 		dbg("Firmware already loaded.  Quitting.\n");
  		return(1);
  	}
  
***************
*** 1004,1019 ****
  		fw_name = "USA19";
  		break;
  			     
- 	case keyspan_usa19qi_pre_product_id:
- 		record = &keyspan_usa19qi_firmware[0];
- 		fw_name = "USA19QI";
- 		break;
- 			     
- 	case keyspan_usa19qw_pre_product_id:
- 		record = &keyspan_usa19qw_firmware[0];
- 		fw_name = "USA19QI";
- 		break;
- 			     
  	case keyspan_usa18x_pre_product_id:
  		record = &keyspan_usa18x_firmware[0];
  		fw_name = "USA18X";
--- 1012,1017 ----
***************
*** 1040,1046 ****
  		return(1);
  	}
  
! 	dbg("Uploading Keyspan %s firmware.", fw_name);
  
  		/* download the firmware image */
  	response = ezusb_set_reset(serial, 1);
--- 1038,1044 ----
  		return(1);
  	}
  
! 	dbg("Uploading Keyspan %s firmware.\n", fw_name);
  
  		/* download the firmware image */
  	response = ezusb_set_reset(serial, 1);
***************
*** 1067,1085 ****
  }
  
  /* Helper functions used by keyspan_setup_urbs */
! static struct urb *keyspan_setup_urb (struct usb_serial *serial, int endpoint,
! 				      int dir, void *ctx, char *buf, int len,
! 				      void (*callback)(struct urb *))
  {
! 	struct urb *urb;
  
  	if (endpoint == -1)
  		return NULL;		/* endpoint not needed */
  
! 	dbg ("%s - alloc for endpoint %d.", __FUNCTION__, endpoint);
  	urb = usb_alloc_urb(0);		/* No ISO */
  	if (urb == NULL) {
! 		dbg ("%s - alloc for endpoint %d failed.", __FUNCTION__, endpoint);
  		return NULL;
  	}
  
--- 1065,1083 ----
  }
  
  /* Helper functions used by keyspan_setup_urbs */
! static urb_t *keyspan_setup_urb(struct usb_serial *serial, int endpoint,
! 				int dir, void *ctx, char *buf, int len,
! 				void (*callback)(urb_t *))
  {
! 	urb_t *urb;
  
  	if (endpoint == -1)
  		return NULL;		/* endpoint not needed */
  
! 	dbg (__FUNCTION__ " alloc for endpoint %d.\n", endpoint);
  	urb = usb_alloc_urb(0);		/* No ISO */
  	if (urb == NULL) {
! 		dbg (__FUNCTION__ " alloc for endpoint %d failed.\n", endpoint);
  		return NULL;
  	}
  
***************
*** 1092,1128 ****
  }
  
  static struct callbacks {
! 	void	(*instat_callback)(struct urb *);
! 	void	(*glocont_callback)(struct urb *);
! 	void	(*indat_callback)(struct urb *);
! 	void	(*outdat_callback)(struct urb *);
! 	void	(*inack_callback)(struct urb *);
! 	void	(*outcont_callback)(struct urb *);
  } keyspan_callbacks[] = {
  	{
  		/* msg_usa26 callbacks */
! 		.instat_callback =	usa26_instat_callback,
! 		.glocont_callback =	usa26_glocont_callback,
! 		.indat_callback =	usa26_indat_callback,
! 		.outdat_callback =	usa2x_outdat_callback,
! 		.inack_callback =	usa26_inack_callback,
! 		.outcont_callback =	usa26_outcont_callback,
  	}, {
  		/* msg_usa28 callbacks */
! 		.instat_callback =	usa28_instat_callback,
! 		.glocont_callback =	usa28_glocont_callback,
! 		.indat_callback =	usa28_indat_callback,
! 		.outdat_callback =	usa2x_outdat_callback,
! 		.inack_callback =	usa28_inack_callback,
! 		.outcont_callback =	usa28_outcont_callback,
  	}, {
  		/* msg_usa49 callbacks */
! 		.instat_callback =	usa49_instat_callback,
! 		.glocont_callback =	usa49_glocont_callback,
! 		.indat_callback =	usa49_indat_callback,
! 		.outdat_callback =	usa2x_outdat_callback,
! 		.inack_callback =	usa49_inack_callback,
! 		.outcont_callback =	usa49_outcont_callback,
  	}
  };
  
--- 1090,1126 ----
  }
  
  static struct callbacks {
! 	void	(*instat_callback)(urb_t *);
! 	void	(*glocont_callback)(urb_t *);
! 	void	(*indat_callback)(urb_t *);
! 	void	(*outdat_callback)(urb_t *);
! 	void	(*inack_callback)(urb_t *);
! 	void	(*outcont_callback)(urb_t *);
  } keyspan_callbacks[] = {
  	{
  		/* msg_usa26 callbacks */
! 		instat_callback: usa26_instat_callback,
! 		glocont_callback: usa26_glocont_callback,
! 		indat_callback: usa26_indat_callback,
! 		outdat_callback: usa2x_outdat_callback,
! 		inack_callback: usa26_inack_callback,
! 		outcont_callback: usa26_outcont_callback,
  	}, {
  		/* msg_usa28 callbacks */
! 		instat_callback: usa28_instat_callback,
! 		glocont_callback: usa28_glocont_callback,
! 		indat_callback: usa28_indat_callback,
! 		outdat_callback: usa2x_outdat_callback,
! 		inack_callback: usa28_inack_callback,
! 		outcont_callback: usa28_outcont_callback,
  	}, {
  		/* msg_usa49 callbacks */
! 		instat_callback: usa49_instat_callback,
! 		glocont_callback: usa49_glocont_callback,
! 		indat_callback: usa49_indat_callback,
! 		outdat_callback: usa2x_outdat_callback,
! 		inack_callback: usa49_inack_callback,
! 		outcont_callback: usa49_outcont_callback,
  	}
  };
  
***************
*** 1132,1144 ****
  {
  	int				i, j;
  	struct keyspan_serial_private 	*s_priv;
! 	const struct keyspan_device_details	*d_details;
  	struct usb_serial_port		*port;
  	struct keyspan_port_private	*p_priv;
  	struct callbacks		*cback;
  	int				endp;
  
! 	dbg ("%s", __FUNCTION__);
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	d_details = s_priv->device_details;
--- 1130,1142 ----
  {
  	int				i, j;
  	struct keyspan_serial_private 	*s_priv;
! 	const keyspan_device_details	*d_details;
  	struct usb_serial_port		*port;
  	struct keyspan_port_private	*p_priv;
  	struct callbacks		*cback;
  	int				endp;
  
! 	dbg ("%s\n", __FUNCTION__);
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	d_details = s_priv->device_details;
***************
*** 1200,1213 ****
  }
  
  /* usa19 function doesn't require prescaler */
! static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
! 				   u8 *rate_low, u8 *prescaler, int portnum)
  {
  	u32 	b16,	/* baud rate times 16 (actual rate used internally) */
  		div,	/* divisor */	
  		cnt;	/* inverse of divisor (programmed into 8051) */
  		
- 	dbg ("%s - %d.", __FUNCTION__, baud_rate);
  
  		/* prevent divide by zero...  */
  	if( (b16 = (baud_rate * 16L)) == 0) {
--- 1198,1210 ----
  }
  
  /* usa19 function doesn't require prescaler */
! static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk,
! 				   u8 *rate_hi, u8 *rate_low, u8 *prescaler)
  {
  	u32 	b16,	/* baud rate times 16 (actual rate used internally) */
  		div,	/* divisor */	
  		cnt;	/* inverse of divisor (programmed into 8051) */
  		
  
  		/* prevent divide by zero...  */
  	if( (b16 = (baud_rate * 16L)) == 0) {
***************
*** 1240,1253 ****
  		*rate_hi = (u8) ((cnt >> 8) & 0xff);
  	}
  	if (rate_low && rate_hi) {
! 		dbg ("%s - %d %02x %02x.", __FUNCTION__, baud_rate, *rate_hi, *rate_low);
  	}
  	
  	return (KEYSPAN_BAUD_RATE_OK);
  }
  
! static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
! 				    u8 *rate_low, u8 *prescaler, int portnum)
  {
  	u32 	b16,	/* baud rate times 16 (actual rate used internally) */
  		clk,	/* clock with 13/8 prescaler */
--- 1237,1250 ----
  		*rate_hi = (u8) ((cnt >> 8) & 0xff);
  	}
  	if (rate_low && rate_hi) {
! 		dbg (__FUNCTION__ " %d %02x %02x.", baud_rate, *rate_hi, *rate_low);
  	}
  	
  	return (KEYSPAN_BAUD_RATE_OK);
  }
  
! static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk,
! 				    u8 *rate_hi, u8 *rate_low, u8 *prescaler)
  {
  	u32 	b16,	/* baud rate times 16 (actual rate used internally) */
  		clk,	/* clock with 13/8 prescaler */
***************
*** 1258,1264 ****
  	u8	best_prescaler;
  	int	i;
  
! 	dbg ("%s - %d.", __FUNCTION__, baud_rate);
  
  		/* prevent divide by zero */
  	if( (b16 = baud_rate * 16L) == 0) {
--- 1255,1261 ----
  	u8	best_prescaler;
  	int	i;
  
! 	dbg (__FUNCTION__ " %d.\n", baud_rate);
  
  		/* prevent divide by zero */
  	if( (b16 = baud_rate * 16L) == 0) {
***************
*** 1274,1280 ****
  		/* 0 is an invalid prescaler, used as a flag */
  	best_prescaler = 0;
  
! 	for(i = 8; i <= 0xff; ++i) {
  		clk = (baudclk * 8) / (u32) i;
  		
  		if( (div = clk / b16) == 0) {
--- 1271,1278 ----
  		/* 0 is an invalid prescaler, used as a flag */
  	best_prescaler = 0;
  
! 	for(i = 8; i <= 0xff; ++i)
! 	{
  		clk = (baudclk * 8) / (u32) i;
  		
  		if( (div = clk / b16) == 0) {
***************
*** 1284,1290 ****
  		res = clk / div;
  		diff= (res > b16) ? (res-b16) : (b16-res);
  
! 		if(diff < smallest_diff) {
  			best_prescaler = i;
  			smallest_diff = diff;
  		}
--- 1282,1289 ----
  		res = clk / div;
  		diff= (res > b16) ? (res-b16) : (b16-res);
  
! 		if(diff < smallest_diff)
! 		{
  			best_prescaler = i;
  			smallest_diff = diff;
  		}
***************
*** 1306,1364 ****
  	}
  	if (prescaler) {
  		*prescaler = best_prescaler;
! 		/*  dbg("%s - %d %d", __FUNCTION__, *prescaler, div); */
! 	}
! 	return (KEYSPAN_BAUD_RATE_OK);
! }
! 
! 	/* USA-28 supports different maximum baud rates on each port */
! static int keyspan_usa28_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
! 				    u8 *rate_low, u8 *prescaler, int portnum)
! {
! 	u32 	b16,	/* baud rate times 16 (actual rate used internally) */
! 		div,	/* divisor */	
! 		cnt;	/* inverse of divisor (programmed into 8051) */
! 
! 	dbg ("%s - %d.", __FUNCTION__, baud_rate);
! 
! 		/* prevent divide by zero */
! 	if ((b16 = baud_rate * 16L) == 0)
! 		return (KEYSPAN_INVALID_BAUD_RATE);
! 
! 		/* calculate the divisor and the counter (its inverse) */
! 	if ((div = (KEYSPAN_USA28_BAUDCLK / b16)) == 0) {
! 		return (KEYSPAN_INVALID_BAUD_RATE);
! 	}
! 	else {
! 		cnt = 0 - div;
! 	}
! 
! 		/* check for out of range, based on portnum, 
! 		   and return result */
! 	if(portnum == 0) {
! 		if(div > 0xffff)
! 			return (KEYSPAN_INVALID_BAUD_RATE);
! 	}
! 	else {
! 		if(portnum == 1) {
! 			if(div > 0xff) {
! 				return (KEYSPAN_INVALID_BAUD_RATE);
! 			}
! 		}
! 		else {
! 			return (KEYSPAN_INVALID_BAUD_RATE);
! 		}
! 	}
! 
! 		/* return the counter values if not NULL
! 		   (port 1 will ignore retHi) */
! 	if (rate_low) {
! 		*rate_low = (u8) (cnt & 0xff);
! 	}
! 	if (rate_hi) {
! 		*rate_hi = (u8) ((cnt >> 8) & 0xff);
  	}
- 	dbg ("%s - %d OK.", __FUNCTION__, baud_rate);
  	return (KEYSPAN_BAUD_RATE_OK);
  }
  
--- 1305,1312 ----
  	}
  	if (prescaler) {
  		*prescaler = best_prescaler;
! 		/*  dbg(__FUNCTION__ " %d %d", *prescaler, div); */
  	}
  	return (KEYSPAN_BAUD_RATE_OK);
  }
  
***************
*** 1369,1403 ****
  	struct keyspan_usa26_portControlMessage	msg;		
  	struct keyspan_serial_private 		*s_priv;
  	struct keyspan_port_private 		*p_priv;
! 	const struct keyspan_device_details	*d_details;
  	int 					outcont_urb;
! 	struct urb				*this_urb;
! 	int 					device_port, err;
  
! 	dbg ("%s reset=%d", __FUNCTION__, reset_port); 
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	p_priv = (struct keyspan_port_private *)(port->private);
  	d_details = s_priv->device_details;
- 	device_port = port->number - port->serial->minor;
  
  	outcont_urb = d_details->outcont_endpoints[port->number];
  	this_urb = p_priv->outcont_urb;
  
! 	dbg("%s - endpoint %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe));
  
  		/* Make sure we have an urb then send the message */
  	if (this_urb == NULL) {
! 		dbg("%s - oops no urb.", __FUNCTION__);
  		return -1;
  	}
  
! 	/* Save reset port val for resend.
! 	Don't overwrite resend for close condition. */
! 	if (p_priv->resend_cont != 3)
! 		p_priv->resend_cont = reset_port + 1;
  	if (this_urb->status == -EINPROGRESS) {
! 		/*  dbg ("%s - already writing", __FUNCTION__); */
  		return(-1);
  	}
  
--- 1317,1347 ----
  	struct keyspan_usa26_portControlMessage	msg;		
  	struct keyspan_serial_private 		*s_priv;
  	struct keyspan_port_private 		*p_priv;
! 	const  keyspan_device_details		*d_details;
  	int 					outcont_urb;
! 	urb_t *this_urb;
! 	int err;
  
! 	dbg ("%s reset=%d\n", __FUNCTION__, reset_port); 
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	p_priv = (struct keyspan_port_private *)(port->private);
  	d_details = s_priv->device_details;
  
  	outcont_urb = d_details->outcont_endpoints[port->number];
  	this_urb = p_priv->outcont_urb;
  
! 	dbg(__FUNCTION__ " endpoint %d\n", usb_pipeendpoint(this_urb->pipe));
  
  		/* Make sure we have an urb then send the message */
  	if (this_urb == NULL) {
! 		dbg(__FUNCTION__ " oops no urb.\n");
  		return -1;
  	}
  
! 	p_priv->resend_cont = 1;
  	if (this_urb->status == -EINPROGRESS) {
! 		/*  dbg (__FUNCTION__ " already writing"); */
  		return(-1);
  	}
  
***************
*** 1409,1416 ****
  		msg.setClocking = 0xff;
  		if (d_details->calculate_baud_rate
  		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
! 		     &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
! 			dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__,
  			    p_priv->baud);
  			msg.baudLo = 0;
  			msg.baudHi = 125;	/* Values for 9600 baud */
--- 1353,1360 ----
  		msg.setClocking = 0xff;
  		if (d_details->calculate_baud_rate
  		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
! 		     &msg.baudLo, &msg.prescaler) == KEYSPAN_INVALID_BAUD_RATE ) {
! 			dbg(__FUNCTION__ "Invalid baud rate %d requested, using 9600.\n",
  			    p_priv->baud);
  			msg.baudLo = 0;
  			msg.baudHi = 125;	/* Values for 9600 baud */
***************
*** 1444,1469 ****
  	msg.ctsFlowControl = (p_priv->flow_control == flow_cts);
  	msg.xonFlowControl = 0;
  	msg.setFlowControl = 0xff;
! 	msg.forwardingLength = 16;
  	msg.xonChar = 17;
  	msg.xoffChar = 19;
  
! 	/* Opening port */
! 	if (reset_port == 1) {
! 		msg._txOn = 1;
! 		msg._txOff = 0;
! 		msg.txFlush = 0;
! 		msg.txBreak = 0;
! 		msg.rxOn = 1;
! 		msg.rxOff = 0;
! 		msg.rxFlush = 1;
! 		msg.rxForward = 0;
! 		msg.returnStatus = 0;
! 		msg.resetDataToggle = 0xff;
! 	}
! 
! 	/* Closing port */
! 	else if (reset_port == 2) {
  		msg._txOn = 0;
  		msg._txOff = 1;
  		msg.txFlush = 0;
--- 1388,1399 ----
  	msg.ctsFlowControl = (p_priv->flow_control == flow_cts);
  	msg.xonFlowControl = 0;
  	msg.setFlowControl = 0xff;
! 	
! 	msg.forwardingLength = 1;
  	msg.xonChar = 17;
  	msg.xoffChar = 19;
  
! 	if (reset_port) {
  		msg._txOn = 0;
  		msg._txOff = 1;
  		msg.txFlush = 0;
***************
*** 1473,1488 ****
  		msg.rxFlush = 1;
  		msg.rxForward = 0;
  		msg.returnStatus = 0;
! 		msg.resetDataToggle = 0;
  	}
- 
- 	/* Sending intermediate configs */
  	else {
  		msg._txOn = (! p_priv->break_on);
  		msg._txOff = 0;
  		msg.txFlush = 0;
  		msg.txBreak = (p_priv->break_on);
! 		msg.rxOn = 0;
  		msg.rxOff = 0;
  		msg.rxFlush = 0;
  		msg.rxForward = 0;
--- 1403,1416 ----
  		msg.rxFlush = 1;
  		msg.rxForward = 0;
  		msg.returnStatus = 0;
! 		msg.resetDataToggle = 0xff;
  	}
  	else {
  		msg._txOn = (! p_priv->break_on);
  		msg._txOff = 0;
  		msg.txFlush = 0;
  		msg.txBreak = (p_priv->break_on);
! 		msg.rxOn = 1;
  		msg.rxOff = 0;
  		msg.rxFlush = 0;
  		msg.rxForward = 0;
***************
*** 1505,1515 ****
  
  	this_urb->dev = serial->dev;
  	if ((err = usb_submit_urb(this_urb)) != 0) {
! 		dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err);
  	}
  #if 0
  	else {
! 		dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__
  		    outcont_urb, this_urb->transfer_buffer_length,
  		    usb_pipeendpoint(this_urb->pipe));
  	}
--- 1433,1443 ----
  
  	this_urb->dev = serial->dev;
  	if ((err = usb_submit_urb(this_urb)) != 0) {
! 		dbg(__FUNCTION__ " usb_submit_urb(setup) failed (%d)\n", err);
  	}
  #if 0
  	else {
! 		dbg(__FUNCTION__ " usb_submit_urb(%d) OK %d bytes (end %d)",
  		    outcont_urb, this_urb->transfer_buffer_length,
  		    usb_pipeendpoint(this_urb->pipe));
  	}
***************
*** 1525,1562 ****
  	struct keyspan_usa28_portControlMessage	msg;		
  	struct keyspan_serial_private	 	*s_priv;
  	struct keyspan_port_private 		*p_priv;
! 	const struct keyspan_device_details	*d_details;
! 	struct urb				*this_urb;
! 	int 					device_port, err;
! 
! 	dbg ("%s", __FUNCTION__);
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	p_priv = (struct keyspan_port_private *)(port->private);
  	d_details = s_priv->device_details;
- 	device_port = port->number - port->serial->minor;
  
  	/* only do something if we have a bulk out endpoint */
  	if ((this_urb = p_priv->outcont_urb) == NULL) {
! 		dbg("%s - oops no urb.", __FUNCTION__);
  		return -1;
  	}
  
! 	/* Save reset port val for resend.
! 	   Don't overwrite resend for close condition. */
! 	if (p_priv->resend_cont != 3)
! 		p_priv->resend_cont = reset_port + 1;
  	if (this_urb->status == -EINPROGRESS) {
! 		dbg ("%s already writing", __FUNCTION__);
  		return(-1);
  	}
  
  	memset(&msg, 0, sizeof (struct keyspan_usa28_portControlMessage));
  
  	msg.setBaudRate = 1;
! 	if (d_details->calculate_baud_rate(p_priv->baud, d_details->baudclk,
! 		&msg.baudHi, &msg.baudLo, NULL, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
! 		dbg("%s - Invalid baud rate requested %d.", __FUNCTION__, p_priv->baud);
  		msg.baudLo = 0xff;
  		msg.baudHi = 0xb2;	/* Values for 9600 baud */
  	}
--- 1453,1484 ----
  	struct keyspan_usa28_portControlMessage	msg;		
  	struct keyspan_serial_private	 	*s_priv;
  	struct keyspan_port_private 		*p_priv;
! 	const  keyspan_device_details		*d_details;
! 	urb_t *this_urb;
! 	int err;
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	p_priv = (struct keyspan_port_private *)(port->private);
  	d_details = s_priv->device_details;
  
  	/* only do something if we have a bulk out endpoint */
  	if ((this_urb = p_priv->outcont_urb) == NULL) {
! 		dbg(__FUNCTION__ " oops no urb.\n");
  		return -1;
  	}
  
! 	p_priv->resend_cont = 1;
  	if (this_urb->status == -EINPROGRESS) {
! 		dbg (__FUNCTION__ " already writing\n");
  		return(-1);
  	}
  
  	memset(&msg, 0, sizeof (struct keyspan_usa28_portControlMessage));
  
  	msg.setBaudRate = 1;
! 	if (keyspan_usa19_calc_baud(p_priv->baud, d_details->baudclk,
! 		&msg.baudHi, &msg.baudLo, NULL) == KEYSPAN_INVALID_BAUD_RATE ) {
! 		dbg(__FUNCTION__ "Invalid baud rate requested %d.", p_priv->baud);
  		msg.baudLo = 0xff;
  		msg.baudHi = 0xb2;	/* Values for 9600 baud */
  	}
***************
*** 1571,1626 ****
  	msg.rts = p_priv->rts_state;
  	msg.dtr = p_priv->dtr_state;
  
! 	msg.forwardingLength = 16;
  	msg.forwardMs = 10;
  	msg.breakThreshold = 45;
  	msg.xonChar = 17;
  	msg.xoffChar = 19;
  
  	/*msg.returnStatus = 1;
  	msg.resetDataToggle = 0xff;*/
- 	/* Opening port */
- 	if (reset_port == 1) {
- 		msg._txOn = 1;
- 		msg._txOff = 0;
- 		msg.txFlush = 0;
- 		msg.txForceXoff = 0;
- 		msg.txBreak = 0;
- 		msg.rxOn = 1;
- 		msg.rxOff = 0;
- 		msg.rxFlush = 1;
- 		msg.rxForward = 0;
- 		msg.returnStatus = 0;
- 		msg.resetDataToggle = 0xff;
- 	}
- 	/* Closing port */
- 	else if (reset_port == 2) {
- 		msg._txOn = 0;
- 		msg._txOff = 1;
- 		msg.txFlush = 0;
- 		msg.txForceXoff = 0;
- 		msg.txBreak = 0;
- 		msg.rxOn = 0;
- 		msg.rxOff = 1;
- 		msg.rxFlush = 1;
- 		msg.rxForward = 0;
- 		msg.returnStatus = 0;
- 		msg.resetDataToggle = 0;
- 	}
- 	/* Sending intermediate configs */
- 	else {
- 		msg._txOn = (! p_priv->break_on);
- 		msg._txOff = 0;
- 		msg.txFlush = 0;
- 		msg.txForceXoff = 0;
- 		msg.txBreak = (p_priv->break_on);
- 		msg.rxOn = 0;
- 		msg.rxOff = 0;
- 		msg.rxFlush = 0;
- 		msg.rxForward = 0;
- 		msg.returnStatus = 0;
- 		msg.resetDataToggle = 0x0;
- 	}
  
  	p_priv->resend_cont = 0;
  	memcpy (this_urb->transfer_buffer, &msg, sizeof(msg));
--- 1493,1515 ----
  	msg.rts = p_priv->rts_state;
  	msg.dtr = p_priv->dtr_state;
  
! 	msg.forwardingLength = 1;
  	msg.forwardMs = 10;
  	msg.breakThreshold = 45;
  	msg.xonChar = 17;
  	msg.xoffChar = 19;
  
+ 	msg._txOn = 1;
+ 	msg._txOff = 0;
+ 	msg.txFlush = 0;
+ 	msg.txForceXoff = 0;
+ 	msg.txBreak = 0;
+ 	msg.rxOn = 1;
+ 	msg.rxOff = 0;
+ 	msg.rxFlush = 0;
+ 	msg.rxForward = 0;
  	/*msg.returnStatus = 1;
  	msg.resetDataToggle = 0xff;*/
  
  	p_priv->resend_cont = 0;
  	memcpy (this_urb->transfer_buffer, &msg, sizeof(msg));
***************
*** 1630,1640 ****
  
  	this_urb->dev = serial->dev;
  	if ((err = usb_submit_urb(this_urb)) != 0) {
! 		dbg("%s - usb_submit_urb(setup) failed", __FUNCTION__);
  	}
  #if 0
  	else {
! 		dbg("%s - usb_submit_urb(setup) OK %d bytes", __FUNCTION__,
  		    this_urb->transfer_buffer_length);
  	}
  #endif
--- 1519,1529 ----
  
  	this_urb->dev = serial->dev;
  	if ((err = usb_submit_urb(this_urb)) != 0) {
! 		dbg(__FUNCTION__ " usb_submit_urb(setup) failed\n");
  	}
  #if 0
  	else {
! 		dbg(__FUNCTION__ " usb_submit_urb(setup) OK %d bytes",
  		    this_urb->transfer_buffer_length);
  	}
  #endif
***************
*** 1649,1660 ****
  	struct keyspan_usa49_portControlMessage	msg;		
  	struct keyspan_serial_private 		*s_priv;
  	struct keyspan_port_private 		*p_priv;
! 	const struct keyspan_device_details	*d_details;
  	int 					glocont_urb;
! 	struct urb				*this_urb;
! 	int 					err, device_port;
  
! 	dbg ("%s", __FUNCTION__);
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	p_priv = (struct keyspan_port_private *)(port->private);
--- 1538,1550 ----
  	struct keyspan_usa49_portControlMessage	msg;		
  	struct keyspan_serial_private 		*s_priv;
  	struct keyspan_port_private 		*p_priv;
! 	const  keyspan_device_details		*d_details;
  	int 					glocont_urb;
! 	urb_t 					*this_urb;
! 	int 					err;
! 	int					device_port;
  
! 	dbg ("%s\n", __FUNCTION__);
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	p_priv = (struct keyspan_port_private *)(port->private);
***************
*** 1666,1685 ****
  		/* Work out which port within the device is being setup */
  	device_port = port->number - port->serial->minor;
  
! 	dbg("%s - endpoint %d port %d (%d)",__FUNCTION__, usb_pipeendpoint(this_urb->pipe), port->number, device_port);
  
  		/* Make sure we have an urb then send the message */
  	if (this_urb == NULL) {
! 		dbg("%s - oops no urb for port %d.", __FUNCTION__, port->number);
  		return -1;
  	}
  
! 	/* Save reset port val for resend.
! 	   Don't overwrite resend for close condition. */
! 	if (p_priv->resend_cont != 3)
! 		p_priv->resend_cont = reset_port + 1;
  	if (this_urb->status == -EINPROGRESS) {
! 		/*  dbg ("%s - already writing", __FUNCTION__); */
  		return(-1);
  	}
  
--- 1556,1572 ----
  		/* Work out which port within the device is being setup */
  	device_port = port->number - port->serial->minor;
  
! 	dbg(__FUNCTION__ " endpoint %d port %d (%d)\n", usb_pipeendpoint(this_urb->pipe), port->number, device_port);
  
  		/* Make sure we have an urb then send the message */
  	if (this_urb == NULL) {
! 		dbg(__FUNCTION__ " oops no urb for port %d.\n", port->number);
  		return -1;
  	}
  
! 	p_priv->resend_cont = 1;
  	if (this_urb->status == -EINPROGRESS) {
! 		/*  dbg (__FUNCTION__ " already writing"); */
  		return(-1);
  	}
  
***************
*** 1694,1701 ****
  		msg.setClocking = 0xff;
  		if (d_details->calculate_baud_rate
  		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
! 		     &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
! 			dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__,
  			    p_priv->baud);
  			msg.baudLo = 0;
  			msg.baudHi = 125;	/* Values for 9600 baud */
--- 1581,1588 ----
  		msg.setClocking = 0xff;
  		if (d_details->calculate_baud_rate
  		    (p_priv->baud, d_details->baudclk, &msg.baudHi,
! 		     &msg.baudLo, &msg.prescaler) == KEYSPAN_INVALID_BAUD_RATE ) {
! 			dbg(__FUNCTION__ "Invalid baud rate %d requested, using 9600.\n",
  			    p_priv->baud);
  			msg.baudLo = 0;
  			msg.baudHi = 125;	/* Values for 9600 baud */
***************
*** 1730,1784 ****
  	msg.xonFlowControl = 0;
  	msg.setFlowControl = 0xff;
  	
! 	msg.forwardingLength = 16;
  	msg.xonChar = 17;
  	msg.xoffChar = 19;
! 
! 	/* Opening port */ 
! 	if (reset_port == 1) {
! 		msg._txOn = 1;
! 		msg._txOff = 0;
! 		msg.txFlush = 0;
! 		msg.txBreak = 0;
! 		msg.rxOn = 1;
! 		msg.rxOff = 0;
! 		msg.rxFlush = 1;
! 		msg.rxForward = 0;
! 		msg.returnStatus = 0;
! 		msg.resetDataToggle = 0xff;
! 		msg.enablePort = 1;
! 		msg.disablePort = 0;
! 	}
! 	/* Closing port */
! 	else if (reset_port == 2) {
! 		msg._txOn = 0;
! 		msg._txOff = 1;
! 		msg.txFlush = 0;
! 		msg.txBreak = 0;
! 		msg.rxOn = 0;
! 		msg.rxOff = 1;
! 		msg.rxFlush = 1;
! 		msg.rxForward = 0;
! 		msg.returnStatus = 0;
! 		msg.resetDataToggle = 0;
! 		msg.enablePort = 0;
! 		msg.disablePort = 1;
! 	}
! 	/* Sending intermediate configs */
! 	else {
! 		msg._txOn = (! p_priv->break_on);
! 		msg._txOff = 0;
! 		msg.txFlush = 0;
! 		msg.txBreak = (p_priv->break_on);
! 		msg.rxOn = 0;
! 		msg.rxOff = 0;
! 		msg.rxFlush = 0;
! 		msg.rxForward = 0;
! 		msg.returnStatus = 0;
! 		msg.resetDataToggle = 0x0;
! 		msg.enablePort = 0;
! 		msg.disablePort = 0;
! 	}
  
  		/* Do handshaking outputs */	
  	msg.setRts = 0xff;
--- 1617,1636 ----
  	msg.xonFlowControl = 0;
  	msg.setFlowControl = 0xff;
  	
! 	msg.forwardingLength = 1;
  	msg.xonChar = 17;
  	msg.xoffChar = 19;
! 	
! 	msg._txOn = 1;
! 	msg._txOff = 0;
! 	msg.txFlush = 0;
! 	msg.txBreak = 0;
! 	msg.rxOn = 1;
! 	msg.rxOff = 0;
! 	msg.rxFlush = 0;
! 	msg.rxForward = 0;
! 	msg.enablePort = 0xff;
! 	msg.disablePort = 0;
  
  		/* Do handshaking outputs */	
  	msg.setRts = 0xff;
***************
*** 1795,1805 ****
  
  	this_urb->dev = serial->dev;
  	if ((err = usb_submit_urb(this_urb)) != 0) {
! 		dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err);
  	}
  #if 0
  	else {
! 		dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__,
  		    outcont_urb, this_urb->transfer_buffer_length,
  		    usb_pipeendpoint(this_urb->pipe));
  	}
--- 1647,1657 ----
  
  	this_urb->dev = serial->dev;
  	if ((err = usb_submit_urb(this_urb)) != 0) {
! 		dbg(__FUNCTION__ " usb_submit_urb(setup) failed (%d)\n", err);
  	}
  #if 0
  	else {
! 		dbg(__FUNCTION__ " usb_submit_urb(%d) OK %d bytes (end %d)",
  		    outcont_urb, this_urb->transfer_buffer_length,
  		    usb_pipeendpoint(this_urb->pipe));
  	}
***************
*** 1811,1820 ****
  static void keyspan_send_setup(struct usb_serial_port *port, int reset_port)
  {
  	struct usb_serial *serial = port->serial;
! 	struct keyspan_serial_private *s_priv;
! 	const struct keyspan_device_details *d_details;
! 
! 	dbg ("%s", __FUNCTION__);
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	d_details = s_priv->device_details;
--- 1663,1670 ----
  static void keyspan_send_setup(struct usb_serial_port *port, int reset_port)
  {
  	struct usb_serial *serial = port->serial;
! 	struct keyspan_serial_private 	*s_priv;
! 	const keyspan_device_details	*d_details;
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  	d_details = s_priv->device_details;
***************
*** 1840,1854 ****
  	struct usb_serial_port		*port;
  	struct keyspan_serial_private 	*s_priv;
  	struct keyspan_port_private	*p_priv;
! 	const struct keyspan_device_details	*d_details;
  
! 	dbg("%s", __FUNCTION__);
  
  	for (i = 0; (d_details = keyspan_devices[i]) != NULL; ++i)
  		if (d_details->product_id == serial->dev->descriptor.idProduct)
  			break;
  	if (d_details == NULL) {
! 		err("%s - unknown product id %x", __FUNCTION__, serial->dev->descriptor.idProduct);
  		return 1;
  	}
  
--- 1690,1705 ----
  	struct usb_serial_port		*port;
  	struct keyspan_serial_private 	*s_priv;
  	struct keyspan_port_private	*p_priv;
! 	const keyspan_device_details	*d_details;
  
! 	dbg("keyspan_startup called.\n");
  
  	for (i = 0; (d_details = keyspan_devices[i]) != NULL; ++i)
  		if (d_details->product_id == serial->dev->descriptor.idProduct)
  			break;
  	if (d_details == NULL) {
! 		printk(KERN_ERR __FUNCTION__ ": unknown product id %x\n",
! 		       serial->dev->descriptor.idProduct);
  		return 1;
  	}
  
***************
*** 1856,1862 ****
  	serial->private = kmalloc(sizeof(struct keyspan_serial_private),
  				  GFP_KERNEL);
  	if (!serial->private) {
! 		dbg("%s - kmalloc for keyspan_serial_private failed.", __FUNCTION__);
  		return (1);
  	}
  	memset(serial->private, 0, sizeof(struct keyspan_serial_private));
--- 1707,1713 ----
  	serial->private = kmalloc(sizeof(struct keyspan_serial_private),
  				  GFP_KERNEL);
  	if (!serial->private) {
! 		dbg(__FUNCTION__ "kmalloc for keyspan_serial_private failed.\n");
  		return (1);
  	}
  	memset(serial->private, 0, sizeof(struct keyspan_serial_private));
***************
*** 1870,1876 ****
  		port->private = kmalloc(sizeof(struct keyspan_port_private),
  					GFP_KERNEL);
  		if (!port->private) {
! 			dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __FUNCTION__, i);
  			return (1);
  		}
  		memset(port->private, 0, sizeof(struct keyspan_port_private));
--- 1721,1727 ----
  		port->private = kmalloc(sizeof(struct keyspan_port_private),
  					GFP_KERNEL);
  		if (!port->private) {
! 			dbg(__FUNCTION__ "kmalloc for keyspan_port_private (%d) failed!.\n", i);
  			return (1);
  		}
  		memset(port->private, 0, sizeof(struct keyspan_port_private));
***************
*** 1882,1888 ****
  
  	s_priv->instat_urb->dev = serial->dev;
  	if ((err = usb_submit_urb(s_priv->instat_urb)) != 0) {
! 		dbg("%s - submit instat urb failed %d", __FUNCTION__, err);
  	}
  			
  	return (0);
--- 1733,1739 ----
  
  	s_priv->instat_urb->dev = serial->dev;
  	if ((err = usb_submit_urb(s_priv->instat_urb)) != 0) {
! 		dbg(__FUNCTION__ " submit instat urb failed %d\n", err);
  	}
  			
  	return (0);
***************
*** 1895,1901 ****
  	struct keyspan_serial_private 	*s_priv;
  	struct keyspan_port_private	*p_priv;
  
! 	dbg("%s", __FUNCTION__);
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  
--- 1746,1752 ----
  	struct keyspan_serial_private 	*s_priv;
  	struct keyspan_port_private	*p_priv;
  
! 	dbg("keyspan_shutdown called\n");
  
  	s_priv = (struct keyspan_serial_private *)(serial->private);
  
***************
*** 1940,1945 ****
--- 1791,1800 ----
  	/* Now free per port private data */
  	for (i = 0; i < serial->num_ports; i++) {
  		port = &serial->port[i];
+ 		while (port->open_count > 0) {
+ 			--port->open_count;
+ 			MOD_DEC_USE_COUNT;
+ 		}
  		kfree(port->private);
  	}
  }
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 2,8 ****
    Keyspan USB to Serial Converter driver
   
    (C) Copyright (C) 2000-2001
!       Hugh Blemings 
     
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
--- 2,8 ----
    Keyspan USB to Serial Converter driver
   
    (C) Copyright (C) 2000-2001
!       Hugh Blemings 
     
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
***************
*** 33,40 ****
  #ifndef __LINUX_USB_SERIAL_KEYSPAN_H
  #define __LINUX_USB_SERIAL_KEYSPAN_H
  
  
! /* Function prototypes for Keyspan serial converter */
  static int  keyspan_open		(struct usb_serial_port *port,
  					 struct file *filp);
  static void keyspan_close		(struct usb_serial_port *port,
--- 33,41 ----
  #ifndef __LINUX_USB_SERIAL_KEYSPAN_H
  #define __LINUX_USB_SERIAL_KEYSPAN_H
  
+ #include 
  
! 	/* Function prototypes for Keyspan serial converter */
  static int  keyspan_open		(struct usb_serial_port *port,
  					 struct file *filp);
  static void keyspan_close		(struct usb_serial_port *port,
***************
*** 53,59 ****
--- 54,65 ----
  static void keyspan_send_setup		(struct usb_serial_port *port,
  					 int reset_port);
  
+ #if 0
+ static void keyspan_write_bulk_callback (struct urb *urb);
+ #endif
  
+ //static void keyspan_usa26_read_int_callback  (struct urb *urb);
+ //static void keyspan_usa28_read_int_callback  (struct urb *urb);
  static int  keyspan_chars_in_buffer 	(struct usb_serial_port *port);
  static int  keyspan_ioctl		(struct usb_serial_port *port,
  					 struct file *file,
***************
*** 66,81 ****
  static int  keyspan_fake_startup	(struct usb_serial *serial);
  
  static int  keyspan_usa19_calc_baud	(u32 baud_rate, u32 baudclk, 
! 					 u8 *rate_hi, u8 *rate_low,
! 					 u8 *prescaler, int portnum);
  
  static int  keyspan_usa19w_calc_baud	(u32 baud_rate, u32 baudclk,
! 					 u8 *rate_hi, u8 *rate_low,
! 					 u8 *prescaler, int portnum);
  
! static int  keyspan_usa28_calc_baud	(u32 baud_rate, u32 baudclk,
! 					 u8 *rate_hi, u8 *rate_low,
! 					 u8 *prescaler, int portnum);
  
  static int  keyspan_usa28_send_setup	(struct usb_serial *serial,
  					 struct usb_serial_port *port,
--- 72,83 ----
  static int  keyspan_fake_startup	(struct usb_serial *serial);
  
  static int  keyspan_usa19_calc_baud	(u32 baud_rate, u32 baudclk, 
! 					 u8 *rate_hi, u8 *rate_low, u8 *prescaler);
  
  static int  keyspan_usa19w_calc_baud	(u32 baud_rate, u32 baudclk,
! 					 u8 *rate_hi, u8 *rate_low, u8 *prescaler);
  
! //static void keyspan_usa19_setup_urbs	(struct usb_serial *serial);
  
  static int  keyspan_usa28_send_setup	(struct usb_serial *serial,
  					 struct usb_serial_port *port,
***************
*** 87,188 ****
  					 struct usb_serial_port *port,
  					 int reset_port);
  
  
! /* Struct used for firmware - increased size of data section
!    to allow Keyspan's 'C' firmware struct to be used unmodified */
  struct ezusb_hex_record {
  	__u16 address;
  	__u8 data_size;
  	__u8 data[64];
  };
! 
! /* Conditionally include firmware images, if they aren't
!    included create a null pointer instead.  Current 
!    firmware images aren't optimised to remove duplicate
!    addresses in the image itself. */
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28
! 	#include "keyspan_usa28_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa28_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28X
! 	#include "keyspan_usa28x_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa28x_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28XA
! 	#include "keyspan_usa28xa_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa28xa_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28XB
! 	#include "keyspan_usa28xb_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa28xb_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19
! 	#include "keyspan_usa19_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa19_firmware = NULL;
  #endif
  
- #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19QI
- 	#include "keyspan_usa19qi_fw.h"
- #else
- 	static const struct ezusb_hex_record *keyspan_usa19qi_firmware = NULL;
- #endif
- 
- #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19QW
- 	#include "keyspan_usa19qw_fw.h"
- #else
- 	static const struct ezusb_hex_record *keyspan_usa19qw_firmware = NULL;
- #endif
- 
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA18X
! 	#include "keyspan_usa18x_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa18x_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19W
! 	#include "keyspan_usa19w_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa19w_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA49W
! 	#include "keyspan_usa49w_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa49w_firmware = NULL;
  #endif
! 
! /* Values used for baud rate calculation - device specific */
  #define	KEYSPAN_INVALID_BAUD_RATE		(-1)
  #define	KEYSPAN_BAUD_RATE_OK			(0)
  #define	KEYSPAN_USA18X_BAUDCLK			(12000000L)	/* a guess */
  #define	KEYSPAN_USA19_BAUDCLK			(12000000L)
  #define	KEYSPAN_USA19W_BAUDCLK			(24000000L)
- #define	KEYSPAN_USA28_BAUDCLK			(1843200L)
  #define	KEYSPAN_USA28X_BAUDCLK			(12000000L)
  #define	KEYSPAN_USA49W_BAUDCLK			(48000000L)
  
! /* Some constants used to characterise each device.  */
  #define		KEYSPAN_MAX_NUM_PORTS		(4)
  #define		KEYSPAN_MAX_FLIPS		(2)
! 
! /* Device info for the Keyspan serial converter, used
!    by the overall usb-serial probe function */
  #define KEYSPAN_VENDOR_ID			(0x06cd)
  
! /* Product IDs for the products supported, pre-renumeration */
  #define	keyspan_usa18x_pre_product_id		0x0105
  #define	keyspan_usa19_pre_product_id		0x0103
- #define	keyspan_usa19qi_pre_product_id		0x010b
- #define	keyspan_usa19qw_pre_product_id		0x0118
  #define	keyspan_usa19w_pre_product_id		0x0106
  #define	keyspan_usa28_pre_product_id		0x0101
  #define	keyspan_usa28x_pre_product_id		0x0102
--- 89,179 ----
  					 struct usb_serial_port *port,
  					 int reset_port);
  
+ 	/* Functions from usbserial.c for ezusb firmware handling */
+ extern int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit);
+ extern int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest);
  
! 	/* Struct used for firmware - increased size of data section
! 	   to allow Keyspan's 'C' firmware struct to be used unmodified */
  struct ezusb_hex_record {
  	__u16 address;
  	__u8 data_size;
  	__u8 data[64];
  };
! 	/* Conditionally include firmware images, if they aren't
! 	   included create a null pointer instead.  Current 
! 	   firmware images aren't optimised to remove duplicate
! 	   addresses in the image itself. */
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28
!         #include "keyspan_usa28_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa28_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28X
!         #include "keyspan_usa28x_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa28x_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28XA
!         #include "keyspan_usa28xa_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa28xa_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA28XB
!         #include "keyspan_usa28xb_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa28xb_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19
!         #include "keyspan_usa19_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa19_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA18X
!         #include "keyspan_usa18x_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa18x_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA19W
!         #include "keyspan_usa19w_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa19w_firmware = NULL;
  #endif
  
  #ifdef CONFIG_USB_SERIAL_KEYSPAN_USA49W
!         #include "keyspan_usa49w_fw.h"
  #else
  	static const struct ezusb_hex_record *keyspan_usa49w_firmware = NULL;
  #endif
! 	
! 	/* Values used for baud rate calculation - device specific */
  #define	KEYSPAN_INVALID_BAUD_RATE		(-1)
  #define	KEYSPAN_BAUD_RATE_OK			(0)
  #define	KEYSPAN_USA18X_BAUDCLK			(12000000L)	/* a guess */
  #define	KEYSPAN_USA19_BAUDCLK			(12000000L)
  #define	KEYSPAN_USA19W_BAUDCLK			(24000000L)
  #define	KEYSPAN_USA28X_BAUDCLK			(12000000L)
  #define	KEYSPAN_USA49W_BAUDCLK			(48000000L)
  
! 	/* Some constants used to characterise each device. 
! 	   There is a four port device due later in the year,
! 	   we allow for it now in the following */
  #define		KEYSPAN_MAX_NUM_PORTS		(4)
  #define		KEYSPAN_MAX_FLIPS		(2)
! 	
! 	/* Device info for the Keyspan serial converter, used
! 	   by the overall usb-serial probe function */
  #define KEYSPAN_VENDOR_ID			(0x06cd)
  
! 	/* Product IDs for the eight products supported, pre-renumeration */
  #define	keyspan_usa18x_pre_product_id		0x0105
  #define	keyspan_usa19_pre_product_id		0x0103
  #define	keyspan_usa19w_pre_product_id		0x0106
  #define	keyspan_usa28_pre_product_id		0x0101
  #define	keyspan_usa28x_pre_product_id		0x0102
***************
*** 190,202 ****
  #define	keyspan_usa28xb_pre_product_id		0x0113
  #define	keyspan_usa49w_pre_product_id		0x0109
  
! /* Product IDs post-renumeration.  Note that the 28x and 28xb
!    have the same id's post-renumeration but behave identically
!    so it's not an issue. */
  #define	keyspan_usa18x_product_id		0x0112
  #define	keyspan_usa19_product_id		0x0107
- #define	keyspan_usa19qi_product_id		0x010c
- #define	keyspan_usa19qw_product_id		0x0119
  #define	keyspan_usa19w_product_id		0x0108
  #define	keyspan_usa28_product_id		0x010f
  #define	keyspan_usa28x_product_id		0x0110
--- 181,191 ----
  #define	keyspan_usa28xb_pre_product_id		0x0113
  #define	keyspan_usa49w_pre_product_id		0x0109
  
! 	/* Product IDs post-renumeration.  Note that the 28x and 28xb
! 	   have the same id's post-renumeration but behave identically
! 	   so it's not an issue. */
  #define	keyspan_usa18x_product_id		0x0112
  #define	keyspan_usa19_product_id		0x0107
  #define	keyspan_usa19w_product_id		0x0108
  #define	keyspan_usa28_product_id		0x010f
  #define	keyspan_usa28x_product_id		0x0110
***************
*** 205,214 ****
  #define	keyspan_usa49w_product_id		0x010a
  
  
! struct keyspan_device_details {
  	/* product ID value */
  	int	product_id;
! 
  	enum	{msg_usa26, msg_usa28, msg_usa49} msg_format;
  
  		/* Number of physical ports */
--- 194,203 ----
  #define	keyspan_usa49w_product_id		0x010a
  
  
! typedef struct {
  	/* product ID value */
  	int	product_id;
! 	
  	enum	{msg_usa26, msg_usa28, msg_usa49} msg_format;
  
  		/* Number of physical ports */
***************
*** 230,419 ****
  		/* Input acknowledge endpoints */
  	int	inack_endpoints[KEYSPAN_MAX_NUM_PORTS];
  
! 		/* Output control endpoints */
  	int	outcont_endpoints[KEYSPAN_MAX_NUM_PORTS];
  
  		/* Endpoint used for input status */
  	int	instat_endpoint;
  
  		/* Endpoint used for global control functions */
! 	int	glocont_endpoint;
! 
  	int	(*calculate_baud_rate) (u32 baud_rate, u32 baudclk,
! 			u8 *rate_hi, u8 *rate_low, u8 *prescaler, int portnum);
  	u32	baudclk;
- }; 
- 
- /* Now for each device type we setup the device detail
-    structure with the appropriate information (provided
-    in Keyspan's documentation) */
- 
- static const struct keyspan_device_details usa18x_device_details = {
- 	product_id:		keyspan_usa18x_product_id,
- 	msg_format:		msg_usa26,
- 	num_ports:		1,
- 	indat_endp_flip:	0,
- 	outdat_endp_flip:	1,
- 	indat_endpoints:	{0x81},
- 	outdat_endpoints:	{0x01},
- 	inack_endpoints:	{0x85},
- 	outcont_endpoints:	{0x05},
- 	instat_endpoint:	0x87,
- 	glocont_endpoint:	0x07,
- 	calculate_baud_rate:	keyspan_usa19w_calc_baud,
- 	baudclk:		KEYSPAN_USA18X_BAUDCLK,
- };
- 
- static const struct keyspan_device_details usa19_device_details = {
- 	product_id:		keyspan_usa19_product_id,
- 	msg_format:		msg_usa28,
- 	num_ports:		1,
- 	indat_endp_flip:	1,
- 	outdat_endp_flip:	1,
- 	indat_endpoints:	{0x81},
- 	outdat_endpoints:	{0x01},
- 	inack_endpoints:	{0x83},
- 	outcont_endpoints:	{0x03},
- 	instat_endpoint:	0x84,
- 	glocont_endpoint:	-1,
- 	calculate_baud_rate:	keyspan_usa19_calc_baud,
- 	baudclk:		KEYSPAN_USA19_BAUDCLK,
- };
- 
- static const struct keyspan_device_details usa19qi_device_details = {
- 	product_id:		keyspan_usa19qi_product_id,
- 	msg_format:		msg_usa28,
- 	num_ports:		1,
- 	indat_endp_flip:	1,
- 	outdat_endp_flip:	1,
- 	indat_endpoints:	{0x81},
- 	outdat_endpoints:	{0x01},
- 	inack_endpoints:	{0x83},
- 	outcont_endpoints:	{0x03},
- 	instat_endpoint:	0x84,
- 	glocont_endpoint:	-1,
- 	calculate_baud_rate:	keyspan_usa28_calc_baud,
- 	baudclk:		KEYSPAN_USA19_BAUDCLK,
- };
- 
- static const struct keyspan_device_details usa19qw_device_details = {
- 	product_id:		keyspan_usa19qw_product_id,
- 	msg_format:		msg_usa26,
- 	num_ports:		1,
- 	indat_endp_flip:	0,
- 	outdat_endp_flip:	1,
- 	indat_endpoints:	{0x81},
- 	outdat_endpoints:	{0x01},
- 	inack_endpoints:	{0x85},
- 	outcont_endpoints:	{0x05},
- 	instat_endpoint:	0x87,
- 	glocont_endpoint:	0x07,
- 	calculate_baud_rate:	keyspan_usa19w_calc_baud,
- 	baudclk:		KEYSPAN_USA19W_BAUDCLK,
- };
- 
- static const struct keyspan_device_details usa19w_device_details = {
- 	product_id:		keyspan_usa19w_product_id,
- 	msg_format:		msg_usa26,
- 	num_ports:		1,
- 	indat_endp_flip:	0,
- 	outdat_endp_flip:	1,
- 	indat_endpoints:	{0x81},
- 	outdat_endpoints:	{0x01},
- 	inack_endpoints:	{0x85},
- 	outcont_endpoints:	{0x05},
- 	instat_endpoint:	0x87,
- 	glocont_endpoint:	0x07,
- 	calculate_baud_rate:	keyspan_usa19w_calc_baud,
- 	baudclk:		KEYSPAN_USA19W_BAUDCLK,
- };
- 
- static const struct keyspan_device_details usa28_device_details = {
- 	product_id:		keyspan_usa28_product_id,
- 	msg_format:		msg_usa28,
- 	num_ports:		2,
- 	indat_endp_flip:	1,
- 	outdat_endp_flip:	1,
- 	indat_endpoints:	{0x81, 0x83},
- 	outdat_endpoints:	{0x01, 0x03},
- 	inack_endpoints:	{0x85, 0x86},
- 	outcont_endpoints:	{0x05, 0x06},
- 	instat_endpoint:	0x87,
- 	glocont_endpoint:	0x07,
- 	calculate_baud_rate:	keyspan_usa28_calc_baud,
- 	baudclk:		KEYSPAN_USA28_BAUDCLK,		
- };
  
! static const struct keyspan_device_details usa28x_device_details = {
! 	product_id:		keyspan_usa28x_product_id,
! 	msg_format:		msg_usa26,
! 	num_ports:		2,
! 	indat_endp_flip:	0,
! 	outdat_endp_flip:	1,
! 	indat_endpoints:	{0x81, 0x83},
! 	outdat_endpoints:	{0x01, 0x03},
! 	inack_endpoints:	{0x85, 0x86},
! 	outcont_endpoints:	{0x05, 0x06},
! 	instat_endpoint:	0x87,
! 	glocont_endpoint:	0x07,
! 	calculate_baud_rate:	keyspan_usa19w_calc_baud,
! 	baudclk:		KEYSPAN_USA28X_BAUDCLK,
! };
  
! static const struct keyspan_device_details usa28xa_device_details = {
! 	product_id:		keyspan_usa28xa_product_id,
! 	msg_format:		msg_usa26,
! 	num_ports:		2,
! 	indat_endp_flip:	0,
! 	outdat_endp_flip:	1,
! 	indat_endpoints:	{0x81, 0x83},
! 	outdat_endpoints:	{0x01, 0x03},
! 	inack_endpoints:	{0x85, 0x86},
! 	outcont_endpoints:	{0x05, 0x06},
! 	instat_endpoint:	0x87,
! 	glocont_endpoint:	0x07,
! 	calculate_baud_rate:	keyspan_usa19w_calc_baud,
! 	baudclk:		KEYSPAN_USA28X_BAUDCLK,
! };
! 
! /* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */
! 
! static const struct keyspan_device_details usa49w_device_details = {
! 	product_id:		keyspan_usa49w_product_id,
! 	msg_format:		msg_usa49,
! 	num_ports:		4,
! 	indat_endp_flip:	0,
! 	outdat_endp_flip:	0,
! 	indat_endpoints:	{0x81, 0x82, 0x83, 0x84},
! 	outdat_endpoints:	{0x01, 0x02, 0x03, 0x04},
! 	inack_endpoints:	{-1, -1, -1, -1},
! 	outcont_endpoints:	{-1, -1, -1, -1},
! 	instat_endpoint:	0x87,
! 	glocont_endpoint:	0x07,
! 	calculate_baud_rate:	keyspan_usa19w_calc_baud,
! 	baudclk:		KEYSPAN_USA49W_BAUDCLK,
  };
  
! static const struct keyspan_device_details *keyspan_devices[] = {
  	&usa18x_device_details,
  	&usa19_device_details,
- 	&usa19qi_device_details,
- 	&usa19qw_device_details,
  	&usa19w_device_details,
- 	&usa28_device_details,
  	&usa28x_device_details,
  	&usa28xa_device_details,
- 	/* 28xb not required as it renumerates as a 28x */
  	&usa49w_device_details,
! 	NULL,
  };
  
  static __devinitdata struct usb_device_id keyspan_ids_combined[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },
- 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_pre_product_id) },
- 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_pre_product_id) },
--- 219,355 ----
  		/* Input acknowledge endpoints */
  	int	inack_endpoints[KEYSPAN_MAX_NUM_PORTS];
  
! 		/* Output control endpoints */	
  	int	outcont_endpoints[KEYSPAN_MAX_NUM_PORTS];
  
  		/* Endpoint used for input status */
  	int	instat_endpoint;
  
  		/* Endpoint used for global control functions */
! 	int	glocont_endpoint;	
! 	
  	int	(*calculate_baud_rate) (u32 baud_rate, u32 baudclk,
! 			u8 *rate_hi, u8 *rate_low, u8 *prescaler);
  	u32	baudclk;
  
! } keyspan_device_details; 
  
! 	/* Now for each device type we setup the device detail
! 	   structure with the appropriate information (provided
! 	   in Keyspan's documentation) */
! 
! static const keyspan_device_details usa18x_device_details = {
! 	keyspan_usa18x_product_id,	/* product ID */
!        	msg_usa26, 			/* msg type*/
! 	1,				/* num ports */
! 	0,				/* indat endpoint flip */
! 	1,				/* outdat endpoint flip */
!   	{0x81},				/* per port indat */
!   	{0x01},				/* per port outdat */
! 	{0x85},				/* per port inack */
! 	{0x05},				/* per port outcont */
! 	0x87,				/* instat endpoint */
! 	0x07,				/* glocont endpoint */
! 	keyspan_usa19w_calc_baud,	/* calc baud rate */
! 	KEYSPAN_USA18X_BAUDCLK		/* base baud clock */
! };
! 
! static const keyspan_device_details usa19_device_details = {
! 	keyspan_usa19_product_id,	/* product ID */
!        	msg_usa28, 			/* msg type*/
! 	1,				/* num ports */
! 	1,				/* indat endpoint flip */
! 	1,				/* outdat endpoint flip */
!   	{0x81},				/* per port indat */
!   	{0x01},				/* per port outdat */
! 	{0x83},				/* per port inack */
! 	{0x03},				/* per port outcont */
! 	0x84,				/* instat endpoint */
! 	-1,				/* glocont endpoint */
! 	keyspan_usa19_calc_baud,	/* calc baud rate */
! 	KEYSPAN_USA19_BAUDCLK		/* base baud clock */
! };
! 
! static const keyspan_device_details usa19w_device_details = {
! 	keyspan_usa19w_product_id,	/* product ID */
!        	msg_usa26, 			/* msg type*/
! 	1,				/* num ports */
! 	0,				/* indat endpoint flip */
! 	1,				/* outdat endpoint flip */
!   	{0x81},				/* per port indat */
!   	{0x01},				/* per port outdat */
! 	{0x85},				/* per port inack */
! 	{0x05},				/* per port outcont */
! 	0x87,				/* instat endpoint */
! 	0x07,				/* glocont endpoint */
! 	keyspan_usa19w_calc_baud,	/* calc baud rate */
! 	KEYSPAN_USA19W_BAUDCLK		/* base baud clock */
! };
! 
! static const keyspan_device_details usa28x_device_details = {
! 	keyspan_usa28x_product_id,	/* product ID */
!        	msg_usa26, 			/* msg type*/
! 	2,				/* num ports */
! 	0,				/* indat endpoint flip */
! 	1,				/* outdat endpoint flip */
!   	{0x81, 0x83},			/* per port indat */
!   	{0x01, 0x03},			/* per port outdat */
! 	{0x85, 0x86},			/* per port inack */
! 	{0x05, 0x06},			/* per port outcont */
! 	0x87,				/* instat endpoint */
! 	0x07,				/* glocont endpoint */
! 	keyspan_usa19w_calc_baud,	/* calc baud rate */
! 	KEYSPAN_USA28X_BAUDCLK
! };
! 
! static const keyspan_device_details usa28xa_device_details = {
! 	keyspan_usa28xa_product_id,	/* product ID */
!        	msg_usa26, 			/* msg type*/
! 	2,				/* num ports */
! 	0,				/* indat endpoint flip */
! 	1,				/* outdat endpoint flip */
!   	{0x81, 0x83},			/* per port indat */
!   	{0x01, 0x03},			/* per port outdat */
! 	{0x85, 0x86},			/* per port inack */
! 	{0x05, 0x06},			/* per port outcont */
! 	0x87,				/* instat endpoint */
! 	0x07,				/* glocont endpoint */
! 	keyspan_usa19w_calc_baud,	/* calc baud rate */
! 	KEYSPAN_USA28X_BAUDCLK
! };
! 
! 	/* We don't need a separate entry for the usa28xb as it appears as a 28x anyway */
! 
! static const keyspan_device_details usa49w_device_details = {
! 	keyspan_usa49w_product_id,	/* product ID */
!        	msg_usa49, 			/* msg type*/
! 	4,				/* num ports */
! 	0,				/* indat endpoint flip */
! 	0,				/* outdat endpoint flip */
!   	{ 0x81, 0x82, 0x83, 0x84},	/* per port indat */
!   	{ 0x01, 0x02, 0x03, 0x04},	/* per port outdat */
! 	{-1, -1, -1, -1},		/* per port inack */
! 	{-1, -1, -1, -1},		/* per port outcont */
! 	0x87,				/* instat endpoint */
! 	0x07,				/* glocont endpoint */
! 	keyspan_usa19w_calc_baud,	/* calc baud rate */
! 	KEYSPAN_USA49W_BAUDCLK
  };
  
! static const keyspan_device_details *keyspan_devices[] = {
  	&usa18x_device_details,
  	&usa19_device_details,
  	&usa19w_device_details,
  	&usa28x_device_details,
  	&usa28xa_device_details,
  	&usa49w_device_details,
! 	NULL
  };
  
  static __devinitdata struct usb_device_id keyspan_ids_combined[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_pre_product_id) },
***************
*** 422,429 ****
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },
- 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_product_id) },
- 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },
--- 358,363 ----
***************
*** 434,491 ****
  
  MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
  
! /* usb_device_id table for the pre-firmware download keyspan devices */
! static struct usb_device_id keyspan_pre_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },
! 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_pre_product_id) },
! 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_pre_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_pre_product_id) },
  	{ } /* Terminating entry */
  };
  
! static struct usb_device_id keyspan_1port_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },
! 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qi_product_id) },
! 	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19qw_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },
  	{ } /* Terminating entry */
  };
  
! static struct usb_device_id keyspan_2port_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },
  	{ } /* Terminating entry */
  };
  
! static struct usb_device_id keyspan_4port_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id) },
  	{ } /* Terminating entry */
  };
  
! /* Structs for the devices, pre and post renumeration. */
! static struct usb_serial_device_type keyspan_pre_device = {
! 	owner:			THIS_MODULE,
! 	name:			"Keyspan - (without firmware)",
! 	id_table:		keyspan_pre_ids,
  	num_interrupt_in:	NUM_DONT_CARE,
  	num_bulk_in:		NUM_DONT_CARE,
  	num_bulk_out:		NUM_DONT_CARE,
  	num_ports:		1,
! 	startup:		keyspan_fake_startup,
  };
  
! static struct usb_serial_device_type keyspan_1port_device = {
! 	owner:			THIS_MODULE,
! 	name:			"Keyspan 1 port adapter",
! 	id_table:		keyspan_1port_ids,
  	num_interrupt_in:	NUM_DONT_CARE,
  	num_bulk_in:		3,
  	num_bulk_out:		4,
--- 368,591 ----
  
  MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
  
! /* Eventually, we will not need separate id tables for each USB
!    ID pattern.  But, for now, it looks like we need slightly different
!    behavior for each match. */
! 
! static __devinitdata struct usb_device_id keyspan_usa18x_pre_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
+ 	{ }	/* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id keyspan_usa19_pre_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) },
! 	{ } /* Terminating entry */
! };
! 
! static __devinitdata struct usb_device_id keyspan_usa19w_pre_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) },
+ 	{ } /* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id keyspan_usa28_pre_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) },
+ 	{ } /* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id keyspan_usa28x_pre_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) },
+ 	{ } /* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id keyspan_usa28xa_pre_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_pre_product_id) },
+ 	{ } /* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id keyspan_usa28xb_pre_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_pre_product_id) },
+ 	{ } /* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id keyspan_usa49w_pre_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_pre_product_id) },
  	{ } /* Terminating entry */
  };
  
! static __devinitdata struct usb_device_id keyspan_usa18x_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) },
+ 	{ } /* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id keyspan_usa19_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) },
! 	{ } /* Terminating entry */
! };
! 
! static __devinitdata struct usb_device_id keyspan_usa19w_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) },
  	{ } /* Terminating entry */
  };
  
! static __devinitdata struct usb_device_id keyspan_usa28_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) },
+ 	{ } /* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id keyspan_usa28x_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) },
+ 	{ } /* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id keyspan_usa28xa_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) },
  	{ } /* Terminating entry */
  };
  
! static __devinitdata struct usb_device_id keyspan_usa49w_ids[] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id) },
  	{ } /* Terminating entry */
  };
  
!     /* Structs for the devices, pre and post renumeration. */
! static struct usb_serial_device_type keyspan_usa18x_pre_device = {
! 	name:			"Keyspan USA18X - (without firmware)",
! 	id_table:		keyspan_usa18x_pre_ids,
! 	needs_interrupt_in:	DONT_CARE,
! 	needs_bulk_in:		DONT_CARE,
! 	needs_bulk_out:		DONT_CARE,
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		NUM_DONT_CARE,
! 	num_bulk_out:		NUM_DONT_CARE,
! 	num_ports:		1,
! 	startup:		keyspan_fake_startup	
! };
! 
! static struct usb_serial_device_type keyspan_usa19_pre_device = {
! 	name:			"Keyspan USA19 - (without firmware)",
! 	id_table:		keyspan_usa19_pre_ids,
! 	needs_interrupt_in:	DONT_CARE,
! 	needs_bulk_in:		DONT_CARE,
! 	needs_bulk_out:		DONT_CARE,
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		NUM_DONT_CARE,
! 	num_bulk_out:		NUM_DONT_CARE,
! 	num_ports:		1,
! 	startup:		keyspan_fake_startup	
! };
! 
! 
! static struct usb_serial_device_type keyspan_usa19w_pre_device = {
! 	name:			"Keyspan USA19W - (without firmware)",
! 	id_table:		keyspan_usa19w_pre_ids,
! 	needs_interrupt_in:	DONT_CARE,
! 	needs_bulk_in:		DONT_CARE,
! 	needs_bulk_out:		DONT_CARE,
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		NUM_DONT_CARE,
! 	num_bulk_out:		NUM_DONT_CARE,
! 	num_ports:		1,
! 	startup:		keyspan_fake_startup	
! };
! 
! 
! static struct usb_serial_device_type keyspan_usa28_pre_device = {
! 	name:			"Keyspan USA28 - (without firmware)",
! 	id_table:		keyspan_usa28_pre_ids,
! 	needs_interrupt_in:	DONT_CARE,
! 	needs_bulk_in:		DONT_CARE,
! 	needs_bulk_out:		DONT_CARE,
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		NUM_DONT_CARE,
! 	num_bulk_out:		NUM_DONT_CARE,
! 	num_ports:		2,
! 	startup:		keyspan_fake_startup	
! };
! 
! static struct usb_serial_device_type keyspan_usa28x_pre_device = {
! 	name:			"Keyspan USA28X - (without firmware)",
! 	id_table:		keyspan_usa28x_pre_ids,
! 	needs_interrupt_in:	DONT_CARE,
! 	needs_bulk_in:		DONT_CARE,
! 	needs_bulk_out:		DONT_CARE,
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		NUM_DONT_CARE,
! 	num_bulk_out:		NUM_DONT_CARE,
! 	num_ports:		2,
! 	startup:		keyspan_fake_startup	
! };
! 
! static struct usb_serial_device_type keyspan_usa28xa_pre_device = {
! 	name:			"Keyspan USA28XA - (without firmware)",
! 	id_table:		keyspan_usa28xa_pre_ids,
! 	needs_interrupt_in:	DONT_CARE,
! 	needs_bulk_in:		DONT_CARE,
! 	needs_bulk_out:		DONT_CARE,
  	num_interrupt_in:	NUM_DONT_CARE,
  	num_bulk_in:		NUM_DONT_CARE,
  	num_bulk_out:		NUM_DONT_CARE,
+ 	num_ports:		2,
+ 	startup:		keyspan_fake_startup	
+ };
+ 
+ static struct usb_serial_device_type keyspan_usa28xb_pre_device = {
+ 	name:			"Keyspan USA28XB - (without firmware)",
+ 	id_table:		keyspan_usa28xb_pre_ids,
+ 	needs_interrupt_in:	DONT_CARE,
+ 	needs_bulk_in:		DONT_CARE,
+ 	needs_bulk_out:		DONT_CARE,
+ 	num_interrupt_in:	NUM_DONT_CARE,
+ 	num_bulk_in:		NUM_DONT_CARE,
+ 	num_bulk_out:		NUM_DONT_CARE,
+ 	num_ports:		2,
+ 	startup:		keyspan_fake_startup	
+ };
+ 
+ static struct usb_serial_device_type keyspan_usa49w_pre_device = {
+ 	name:			"Keyspan USA49W - (without firmware)",
+ 	id_table:		keyspan_usa49w_pre_ids,
+ 	needs_interrupt_in:	DONT_CARE,
+ 	needs_bulk_in:		DONT_CARE,
+ 	needs_bulk_out:		DONT_CARE,
+ 	num_interrupt_in:	NUM_DONT_CARE,
+ 	num_bulk_in:		NUM_DONT_CARE,
+ 	num_bulk_out:		NUM_DONT_CARE,
+ 	num_ports:		4,
+ 	startup:		keyspan_fake_startup	
+ };
+ 
+ static struct usb_serial_device_type keyspan_usa18x_device = {
+ 	name:			"Keyspan USA18X",
+ 	id_table:		keyspan_usa18x_ids,
+ 	needs_interrupt_in:	DONT_CARE,	
+ 	needs_bulk_in:		MUST_HAVE,
+ 	needs_bulk_out:		MUST_HAVE,
+ 	num_interrupt_in:	NUM_DONT_CARE,
+ 	num_bulk_in:		3,
+ 	num_bulk_out:		4,
  	num_ports:		1,
! 	open:			keyspan_open,
! 	close:			keyspan_close,
! 	write:			keyspan_write,
! 	write_room:		keyspan_write_room,
! 	//write_bulk_callback: 	Not used - we define our own herbs
! 	//read_int_callback:	keyspan_usa26_read_int_callback,
! 	chars_in_buffer:	keyspan_chars_in_buffer,
! 	throttle:		keyspan_rx_throttle,
! 	unthrottle:		keyspan_rx_unthrottle,
! 	ioctl:			keyspan_ioctl,
! 	set_termios:		keyspan_set_termios,
! 	break_ctl:		keyspan_break_ctl,
! 	startup:		keyspan_startup,
! 	shutdown:		keyspan_shutdown,
  };
  
! static struct usb_serial_device_type keyspan_usa19_device = {
! 	name:			"Keyspan USA19",
! 	id_table:		keyspan_usa19_ids,
! 	needs_interrupt_in:	DONT_CARE,	
! 	needs_bulk_in:		MUST_HAVE,
! 	needs_bulk_out:		MUST_HAVE,
  	num_interrupt_in:	NUM_DONT_CARE,
  	num_bulk_in:		3,
  	num_bulk_out:		4,
***************
*** 494,499 ****
--- 594,601 ----
  	close:			keyspan_close,
  	write:			keyspan_write,
  	write_room:		keyspan_write_room,
+ //	write_bulk_callback: 	keyspan_write_bulk_callback,
+ //	read_int_callback:	keyspan_usa28_read_int_callback,
  	chars_in_buffer:	keyspan_chars_in_buffer,
  	throttle:		keyspan_rx_throttle,
  	unthrottle:		keyspan_rx_unthrottle,
***************
*** 504,513 ****
  	shutdown:		keyspan_shutdown,
  };
  
! static struct usb_serial_device_type keyspan_2port_device = {
! 	owner:			THIS_MODULE,
! 	name:			"Keyspan 2 port adapter",
! 	id_table:		keyspan_2port_ids,
  	num_interrupt_in:	NUM_DONT_CARE,
  	num_bulk_in:		NUM_DONT_CARE,
  	num_bulk_out:		NUM_DONT_CARE,
--- 606,690 ----
  	shutdown:		keyspan_shutdown,
  };
  
! 
! static struct usb_serial_device_type keyspan_usa19w_device = {
! 	name:			"Keyspan USA19W",
! 	id_table:		keyspan_usa19w_ids,
! 	needs_interrupt_in:	DONT_CARE,	
! 	needs_bulk_in:		MUST_HAVE,
! 	needs_bulk_out:		MUST_HAVE,
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		3,
! 	num_bulk_out:		4,
! 	num_ports:		1,
! 	open:			keyspan_open,
! 	close:			keyspan_close,
! 	write:			keyspan_write,
! 	write_room:		keyspan_write_room,
! 	//write_bulk_callback: 	Not used - we define our own herbs
! 	//read_int_callback:	keyspan_usa26_read_int_callback,
! 	chars_in_buffer:	keyspan_chars_in_buffer,
! 	throttle:		keyspan_rx_throttle,
! 	unthrottle:		keyspan_rx_unthrottle,
! 	ioctl:			keyspan_ioctl,
! 	set_termios:		keyspan_set_termios,
! 	break_ctl:		keyspan_break_ctl,
! 	startup:		keyspan_startup,
! 	shutdown:		keyspan_shutdown,
! };
! 
! 
! static struct usb_serial_device_type keyspan_usa28_device = {
! 	name:			"Keyspan USA28",
! 	id_table:		keyspan_usa28_ids,
! 	needs_interrupt_in:	DONT_CARE,	
! 	needs_bulk_in:		DONT_CARE,
! 	needs_bulk_out:		DONT_CARE,
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		NUM_DONT_CARE,
! 	num_bulk_out:		NUM_DONT_CARE,
! 	num_ports:		2,
! 	open:			keyspan_open,
! 	close:			keyspan_close,
! 	throttle:		keyspan_rx_throttle,
! 	unthrottle:		keyspan_rx_unthrottle,
! 	set_termios:		keyspan_set_termios,
! };
! 
! 
! static struct usb_serial_device_type keyspan_usa28x_device = {
! 	name:			"Keyspan USA28X/XB",
! 	id_table:		keyspan_usa28x_ids,
! 	needs_interrupt_in:	DONT_CARE,	
! 	needs_bulk_in:		DONT_CARE,
! 	needs_bulk_out:		DONT_CARE,
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		NUM_DONT_CARE,
! 	num_bulk_out:		NUM_DONT_CARE,
! 	num_ports:		2,
! 	open:			keyspan_open,
! 	close:			keyspan_close,
! 	write:			keyspan_write,
! 	write_room:		keyspan_write_room,
! //	write_bulk_callback: 	keyspan_write_bulk_callback,
! //	read_int_callback:	keyspan_usa26_read_int_callback,
! 	chars_in_buffer:	keyspan_chars_in_buffer,
! 	throttle:		keyspan_rx_throttle,
! 	unthrottle:		keyspan_rx_unthrottle,
! 	ioctl:			keyspan_ioctl,
! 	set_termios:		keyspan_set_termios,
! 	break_ctl:		keyspan_break_ctl,
! 	startup:		keyspan_startup,
! 	shutdown:		keyspan_shutdown,
! 
! };
! 
! static struct usb_serial_device_type keyspan_usa28xa_device = {
! 	name:			"Keyspan USA28XA",
! 	id_table:		keyspan_usa28xa_ids,
! 	needs_interrupt_in:	DONT_CARE,	
! 	needs_bulk_in:		DONT_CARE,
! 	needs_bulk_out:		DONT_CARE,
  	num_interrupt_in:	NUM_DONT_CARE,
  	num_bulk_in:		NUM_DONT_CARE,
  	num_bulk_out:		NUM_DONT_CARE,
***************
*** 516,521 ****
--- 693,700 ----
  	close:			keyspan_close,
  	write:			keyspan_write,
  	write_room:		keyspan_write_room,
+ //	write_bulk_callback: 	keyspan_write_bulk_callback,
+ //	read_int_callback:	keyspan_usa26_read_int_callback,
  	chars_in_buffer:	keyspan_chars_in_buffer,
  	throttle:		keyspan_rx_throttle,
  	unthrottle:		keyspan_rx_unthrottle,
***************
*** 524,535 ****
  	break_ctl:		keyspan_break_ctl,
  	startup:		keyspan_startup,
  	shutdown:		keyspan_shutdown,
  };
  
! static struct usb_serial_device_type keyspan_4port_device = {
! 	owner:			THIS_MODULE,
! 	name:			"Keyspan 4 port adapter",
! 	id_table:		keyspan_4port_ids,
  	num_interrupt_in:	NUM_DONT_CARE,
  	num_bulk_in:		5,
  	num_bulk_out:		5,
--- 703,717 ----
  	break_ctl:		keyspan_break_ctl,
  	startup:		keyspan_startup,
  	shutdown:		keyspan_shutdown,
+ 
  };
  
! static struct usb_serial_device_type keyspan_usa49w_device = {
! 	name:			"Keyspan USA49W",
! 	id_table:		keyspan_usa49w_ids,
! 	needs_interrupt_in:	DONT_CARE,	
! 	needs_bulk_in:		MUST_HAVE,
! 	needs_bulk_out:		MUST_HAVE,
  	num_interrupt_in:	NUM_DONT_CARE,
  	num_bulk_in:		5,
  	num_bulk_out:		5,
***************
*** 538,543 ****
--- 720,727 ----
  	close:			keyspan_close,
  	write:			keyspan_write,
  	write_room:		keyspan_write_room,
+ 	//write_bulk_callback: 	Not used - we define our own herbs
+ 	//read_int_callback:	keyspan_usa26_read_int_callback,
  	chars_in_buffer:	keyspan_chars_in_buffer,
  	throttle:		keyspan_rx_throttle,
  	unthrottle:		keyspan_rx_unthrottle,
***************
*** 548,551 ****
--- 732,736 ----
  	shutdown:		keyspan_shutdown,
  };
  
+ 
  #endif
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_pda.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_pda.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_pda.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_pda.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 68,83 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
--- 68,86 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
***************
*** 154,174 ****
  
  MODULE_DEVICE_TABLE (usb, id_table_combined);
  
! static struct usb_device_id id_table_std [] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) },
  	{ }						/* Terminating entry */
  };
  
  #ifdef KEYSPAN
! static struct usb_device_id id_table_fake [] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) },
  	{ }						/* Terminating entry */
  };
  #endif
  
  #ifdef XIRCOM
! static struct usb_device_id id_table_fake_xircom [] = {
          { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) },
          { USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) },
          { }                                             
  };
--- 157,181 ----
  
  MODULE_DEVICE_TABLE (usb, id_table_combined);
  
! static __devinitdata struct usb_device_id id_table_std [] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) },
  	{ }						/* Terminating entry */
  };
  
  #ifdef KEYSPAN
! static __devinitdata struct usb_device_id id_table_fake [] = {
  	{ USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) },
  	{ }						/* Terminating entry */
  };
  #endif
  
  #ifdef XIRCOM
! static __devinitdata struct usb_device_id id_table_fake_xircom [] = {
          { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) },
+         { }                                             
+ };
+ 
+ static __devinitdata struct usb_device_id id_table_fake_entregra [] = {
          { USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) },
          { }                                             
  };
***************
*** 190,217 ****
  	/* wake up other tty processes */
  	wake_up_interruptible( &tty->write_wait );
  	/* For 2.2.16 backport -- wake_up_interruptible( &tty->poll_wait ); */
  }
  
  static void keyspan_pda_request_unthrottle( struct usb_serial *serial )
  {
- 	int result;
  
  	dbg(" request_unthrottle");
  	/* ask the device to tell us when the tx buffer becomes
  	   sufficiently empty */
! 	result = usb_control_msg(serial->dev, 
! 				 usb_sndctrlpipe(serial->dev, 0),
! 				 7, /* request_unthrottle */
! 				 USB_TYPE_VENDOR | USB_RECIP_INTERFACE
! 				 | USB_DIR_OUT,
! 				 16, /* value: threshold */
! 				 0, /* index */
! 				 NULL,
! 				 0,
! 				 2*HZ);
! 	if (result < 0)
! 		dbg("%s - error %d from usb_control_msg", 
! 		    __FUNCTION__, result);
  }
  
  
--- 197,222 ----
  	/* wake up other tty processes */
  	wake_up_interruptible( &tty->write_wait );
  	/* For 2.2.16 backport -- wake_up_interruptible( &tty->poll_wait ); */
+ 	MOD_DEC_USE_COUNT;
  }
  
  static void keyspan_pda_request_unthrottle( struct usb_serial *serial )
  {
  
  	dbg(" request_unthrottle");
  	/* ask the device to tell us when the tx buffer becomes
  	   sufficiently empty */
! 	usb_control_msg(serial->dev, 
! 			     usb_sndctrlpipe(serial->dev, 0),
! 			     7, /* request_unthrottle */
! 			     USB_TYPE_VENDOR | USB_RECIP_INTERFACE
! 			     | USB_DIR_OUT,
! 			     16, /* value: threshold */
! 			     0, /* index */
! 			     NULL,
! 			     0,
! 			     2*HZ);
! 	MOD_DEC_USE_COUNT;
  }
  
  
***************
*** 260,266 ****
  			tty = serial->port[0].tty;
  			priv->tx_throttled = 0;
  			/* queue up a wakeup at scheduler time */
! 			schedule_task(&priv->wakeup_task);
  			break;
  		default:
  			break;
--- 265,273 ----
  			tty = serial->port[0].tty;
  			priv->tx_throttled = 0;
  			/* queue up a wakeup at scheduler time */
! 			MOD_INC_USE_COUNT;
! 			if (schedule_task(&priv->wakeup_task) == 0)
! 				MOD_DEC_USE_COUNT;
  			break;
  		default:
  			break;
***************
*** 338,356 ****
  {
  	struct usb_serial *serial = port->serial;
  	int value;
- 	int result;
- 
  	if (break_state == -1)
  		value = 1; /* start break */
  	else
  		value = 0; /* clear break */
! 	result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
! 				4, /* set break */
! 				USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
! 				value, 0, NULL, 0, 2*HZ);
! 	if (result < 0)
! 		dbg("%s - error %d from usb_control_msg", 
! 		    __FUNCTION__, result);
  	/* there is something funky about this.. the TCSBRK that 'cu' performs
  	   ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
  	   seconds apart, but it feels like the break sent isn't as long as it
--- 345,358 ----
  {
  	struct usb_serial *serial = port->serial;
  	int value;
  	if (break_state == -1)
  		value = 1; /* start break */
  	else
  		value = 0; /* clear break */
! 	usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
! 			4, /* set break */
! 			USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
! 			value, 0, NULL, 0, 2*HZ);
  	/* there is something funky about this.. the TCSBRK that 'cu' performs
  	   ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
  	   seconds apart, but it feels like the break sent isn't as long as it
***************
*** 604,610 ****
  
  	if (request_unthrottle) {
  		priv->tx_throttled = 1; /* block writers */
! 		schedule_task(&priv->unthrottle_task);
  	}
  
  	rc = count;
--- 606,614 ----
  
  	if (request_unthrottle) {
  		priv->tx_throttled = 1; /* block writers */
! 		MOD_INC_USE_COUNT;
! 		if (schedule_task(&priv->unthrottle_task) == 0)
! 			MOD_DEC_USE_COUNT;
  	}
  
  	rc = count;
***************
*** 631,637 ****
  	}
  	
  	/* queue up a wakeup at scheduler time */
! 	schedule_task(&priv->wakeup_task);
  }
  
  
--- 635,643 ----
  	}
  	
  	/* queue up a wakeup at scheduler time */
! 	MOD_INC_USE_COUNT;
! 	if (schedule_task(&priv->wakeup_task) == 0)
! 		MOD_DEC_USE_COUNT;
  }
  
  
***************
*** 668,712 ****
  	int rc = 0;
  	struct keyspan_pda_private *priv;
  
! 	/* find out how much room is in the Tx ring */
! 	rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
! 			     6, /* write_room */
! 			     USB_TYPE_VENDOR | USB_RECIP_INTERFACE
! 			     | USB_DIR_IN,
! 			     0, /* value */
! 			     0, /* index */
! 			     &room,
! 			     1,
! 			     2*HZ);
! 	if (rc < 0) {
! 		dbg("%s - roomquery failed", __FUNCTION__);
! 		goto error;
! 	}
! 	if (rc == 0) {
! 		dbg("%s - roomquery returned 0 bytes", __FUNCTION__);
! 		rc = -EIO;
! 		goto error;
! 	}
! 	priv = (struct keyspan_pda_private *)(port->private);
! 	priv->tx_room = room;
! 	priv->tx_throttled = room ? 0 : 1;
  
! 	/* the normal serial device seems to always turn on DTR and RTS here,
! 	   so do the same */
! 	if (port->tty->termios->c_cflag & CBAUD)
! 		keyspan_pda_set_modem_info(serial, (1<<7) | (1<<2) );
! 	else
! 		keyspan_pda_set_modem_info(serial, 0);
  
- 	/*Start reading from the device*/
- 	port->interrupt_in_urb->dev = serial->dev;
- 	rc = usb_submit_urb(port->interrupt_in_urb);
- 	if (rc) {
- 		dbg("%s - usb_submit_urb(read int) failed", __FUNCTION__);
- 		goto error;
  	}
  
  error:
  	return rc;
  }
  
--- 674,735 ----
  	int rc = 0;
  	struct keyspan_pda_private *priv;
  
! 	down (&port->sem);
  
! 	MOD_INC_USE_COUNT;
! 	++port->open_count;
! 
! 	if (!port->active) {
! 		port->active = 1;
!  
! 		/* find out how much room is in the Tx ring */
! 		rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
! 				     6, /* write_room */
! 				     USB_TYPE_VENDOR | USB_RECIP_INTERFACE
! 				     | USB_DIR_IN,
! 				     0, /* value */
! 				     0, /* index */
! 				     &room,
! 				     1,
! 				     2*HZ);
! 		if (rc < 0) {
! 			dbg(__FUNCTION__" - roomquery failed");
! 			goto error;
! 		}
! 		if (rc == 0) {
! 			dbg(__FUNCTION__" - roomquery returned 0 bytes");
! 			rc = -EIO;
! 			goto error;
! 		}
! 		priv = (struct keyspan_pda_private *)(port->private);
! 		priv->tx_room = room;
! 		priv->tx_throttled = room ? 0 : 1;
! 
! 		/* the normal serial device seems to always turn on DTR and RTS here,
! 		   so do the same */
! 		if (port->tty->termios->c_cflag & CBAUD)
! 			keyspan_pda_set_modem_info(serial, (1<<7) | (1<<2) );
! 		else
! 			keyspan_pda_set_modem_info(serial, 0);
! 
! 		/*Start reading from the device*/
! 		port->interrupt_in_urb->dev = serial->dev;
! 		rc = usb_submit_urb(port->interrupt_in_urb);
! 		if (rc) {
! 			dbg(__FUNCTION__" - usb_submit_urb(read int) failed");
! 			goto error;
! 		}
  
  	}
  
+ 
+ 	up (&port->sem);
+ 	return rc;
  error:
+ 	--port->open_count;
+ 	port->active = 0;
+ 	MOD_DEC_USE_COUNT;
+ 	up (&port->sem);
  	return rc;
  }
  
***************
*** 715,729 ****
  {
  	struct usb_serial *serial = port->serial;
  
! 	if (serial->dev) {
! 		/* the normal serial device seems to always shut off DTR and RTS now */
! 		if (port->tty->termios->c_cflag & HUPCL)
! 			keyspan_pda_set_modem_info(serial, 0);
  
! 		/* shutdown our bulk reads and writes */
! 		usb_unlink_urb (port->write_urb);
! 		usb_unlink_urb (port->interrupt_in_urb);
  	}
  }
  
  
--- 738,763 ----
  {
  	struct usb_serial *serial = port->serial;
  
! 	down (&port->sem);
! 
! 	--port->open_count;
  
! 	if (port->open_count <= 0) {
! 		if (serial->dev) {
! 			/* the normal serial device seems to always shut off DTR and RTS now */
! 			if (port->tty->termios->c_cflag & HUPCL)
! 				keyspan_pda_set_modem_info(serial, 0);
! 
! 			/* shutdown our bulk reads and writes */
! 			usb_unlink_urb (port->write_urb);
! 			usb_unlink_urb (port->interrupt_in_urb);
! 		}
! 		port->active = 0;
! 		port->open_count = 0;
  	}
+ 
+ 	up (&port->sem);
+ 	MOD_DEC_USE_COUNT;
  }
  
  
***************
*** 746,752 ****
  		record = &xircom_pgs_firmware[0];
  #endif
  	if (record == NULL) {
! 		err("%s: unknown vendor, aborting.", __FUNCTION__);
  		return -ENODEV;
  	}
  
--- 780,786 ----
  		record = &xircom_pgs_firmware[0];
  #endif
  	if (record == NULL) {
! 		err(__FUNCTION__": unknown vendor, aborting.");
  		return -ENODEV;
  	}
  
***************
*** 797,855 ****
  
  static void keyspan_pda_shutdown (struct usb_serial *serial)
  {
! 	dbg("%s", __FUNCTION__);
  	
  	kfree(serial->port[0].private);
  }
  
  #ifdef KEYSPAN
  static struct usb_serial_device_type keyspan_pda_fake_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"Keyspan PDA - (prerenumeration)",
! 	.id_table =		id_table_fake,
! 	.num_interrupt_in =	NUM_DONT_CARE,
! 	.num_bulk_in =		NUM_DONT_CARE,
! 	.num_bulk_out =		NUM_DONT_CARE,
! 	.num_ports =		1,
! 	.startup =		keyspan_pda_fake_startup,
  };
  #endif
  
  #ifdef XIRCOM
  static struct usb_serial_device_type xircom_pgs_fake_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"Xircom / Entregra PGS - (prerenumeration)",
! 	.id_table =		id_table_fake_xircom,
! 	.num_interrupt_in =	NUM_DONT_CARE,
! 	.num_bulk_in =		NUM_DONT_CARE,
! 	.num_bulk_out =		NUM_DONT_CARE,
! 	.num_ports =		1,
! 	.startup =		keyspan_pda_fake_startup,
  };
  #endif
  
  static struct usb_serial_device_type keyspan_pda_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"Keyspan PDA",
! 	.id_table =		id_table_std,
! 	.num_interrupt_in =	1,
! 	.num_bulk_in =		0,
! 	.num_bulk_out =		1,
! 	.num_ports =		1,
! 	.open =			keyspan_pda_open,
! 	.close =		keyspan_pda_close,
! 	.write =		keyspan_pda_write,
! 	.write_room =		keyspan_pda_write_room,
! 	.write_bulk_callback = 	keyspan_pda_write_bulk_callback,
! 	.read_int_callback =	keyspan_pda_rx_interrupt,
! 	.chars_in_buffer =	keyspan_pda_chars_in_buffer,
! 	.throttle =		keyspan_pda_rx_throttle,
! 	.unthrottle =		keyspan_pda_rx_unthrottle,
! 	.ioctl =		keyspan_pda_ioctl,
! 	.set_termios =		keyspan_pda_set_termios,
! 	.break_ctl =		keyspan_pda_break_ctl,
! 	.startup =		keyspan_pda_startup,
! 	.shutdown =		keyspan_pda_shutdown,
  };
  
  
--- 831,911 ----
  
  static void keyspan_pda_shutdown (struct usb_serial *serial)
  {
! 	dbg (__FUNCTION__);
  	
+ 	while (serial->port[0].open_count > 0) {
+ 		keyspan_pda_close (&serial->port[0], NULL);
+ 	}
  	kfree(serial->port[0].private);
  }
  
  #ifdef KEYSPAN
  static struct usb_serial_device_type keyspan_pda_fake_device = {
! 	name:			"Keyspan PDA - (prerenumeration)",
! 	id_table:		id_table_fake,
! 	needs_interrupt_in:	DONT_CARE,
! 	needs_bulk_in:		DONT_CARE,
! 	needs_bulk_out:		DONT_CARE,
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		NUM_DONT_CARE,
! 	num_bulk_out:		NUM_DONT_CARE,
! 	num_ports:		1,
! 	startup:		keyspan_pda_fake_startup,
  };
  #endif
  
  #ifdef XIRCOM
  static struct usb_serial_device_type xircom_pgs_fake_device = {
!         name:                   "Xircom PGS - (prerenumeration)",
!         id_table:               id_table_fake_xircom,
!         needs_interrupt_in:     DONT_CARE,
!         needs_bulk_in:          DONT_CARE,
!         needs_bulk_out:         DONT_CARE,
!         num_interrupt_in:       NUM_DONT_CARE,
!         num_bulk_in:            NUM_DONT_CARE,
!         num_bulk_out:           NUM_DONT_CARE,
!         num_ports:              1,
!         startup:                keyspan_pda_fake_startup,
! };
! 
! static struct usb_serial_device_type entregra_pgs_fake_device = {
!         name:                   "Entregra PGS - (prerenumeration)",
!         id_table:               id_table_fake_entregra,
!         needs_interrupt_in:     DONT_CARE,
!         needs_bulk_in:          DONT_CARE,
!         needs_bulk_out:         DONT_CARE,
!         num_interrupt_in:       NUM_DONT_CARE,
!         num_bulk_in:            NUM_DONT_CARE,
!         num_bulk_out:           NUM_DONT_CARE,
!         num_ports:              1,
!         startup:                keyspan_pda_fake_startup,
  };
  #endif
  
  static struct usb_serial_device_type keyspan_pda_device = {
! 	name:			"Keyspan PDA",
! 	id_table:		id_table_std,
! 	needs_interrupt_in:	MUST_HAVE,
! 	needs_bulk_in:		DONT_CARE,
! 	needs_bulk_out:		MUST_HAVE,
! 	num_interrupt_in:	1,
! 	num_bulk_in:		0,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	open:			keyspan_pda_open,
! 	close:			keyspan_pda_close,
! 	write:			keyspan_pda_write,
! 	write_room:		keyspan_pda_write_room,
! 	write_bulk_callback: 	keyspan_pda_write_bulk_callback,
! 	read_int_callback:	keyspan_pda_rx_interrupt,
! 	chars_in_buffer:	keyspan_pda_chars_in_buffer,
! 	throttle:		keyspan_pda_rx_throttle,
! 	unthrottle:		keyspan_pda_rx_unthrottle,
! 	ioctl:			keyspan_pda_ioctl,
! 	set_termios:		keyspan_pda_set_termios,
! 	break_ctl:		keyspan_pda_break_ctl,
! 	startup:		keyspan_pda_startup,
! 	shutdown:		keyspan_pda_shutdown,
  };
  
  
***************
*** 861,866 ****
--- 917,923 ----
  #endif
  #ifdef XIRCOM
  	usb_serial_register (&xircom_pgs_fake_device);
+ 	usb_serial_register (&entregra_pgs_fake_device);
  #endif
  	info(DRIVER_DESC " " DRIVER_VERSION);
  	return 0;
***************
*** 874,879 ****
--- 931,937 ----
  	usb_serial_deregister (&keyspan_pda_fake_device);
  #endif
  #ifdef XIRCOM
+ 	usb_serial_deregister (&entregra_pgs_fake_device);
  	usb_serial_deregister (&xircom_pgs_fake_device);
  #endif
  }
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa18x_fw.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa18x_fw.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa18x_fw.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa18x_fw.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,345 ****
  /* keyspan_usa18x_fw.h
  
! 	The firmware contained herein as keyspan_usa18x_fw.h is
  
! 		Copyright (C) 1999-2001
! 		Keyspan, A division of InnoSys Incorporated ("Keyspan")
! 		
! 	as an unpublished work. This notice does not imply unrestricted or
! 	public access to the source code from which this firmware image is
! 	derived.  Except as noted below this firmware image may not be 
! 	reproduced, used, sold or transferred to any third party without 
! 	Keyspan's prior written consent.  All Rights Reserved.
  
- 	Permission is hereby granted for the distribution of this firmware 
- 	image as part of a Linux or other Open Source operating system kernel 
- 	in text or binary form as required. 
- 
- 	This firmware may not be modified and may only be used with  
- 	Keyspan hardware.  Distribution and/or Modification of the 
- 	keyspan.c driver which includes this firmware, in whole or in 
- 	part, requires the inclusion of this statement."
  */
  
  static const struct ezusb_hex_record keyspan_usa18x_firmware[] = {
!  {0x0033,  3, { 0x02, 0x12, 0xf7}},
   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
!  {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
!  {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
!  {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xba}},
   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
!  {0x00a6, 16, { 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
!  {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xba, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
!  {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xd6, 0x8f}},
!  {0x00e6, 16, { 0x19, 0x12, 0x13, 0x27, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x12, 0xeb}},
!  {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
   {0x0043,  3, { 0x02, 0x13, 0x00}},
!  {0x0000,  3, { 0x02, 0x0e, 0x00}},
!  {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
!   0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
!   0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x4b, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
!   0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
!  {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
!   0x0c, 0xdf, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
!   0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xc2, 0x05, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5,
!   0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a}},
!  {0x0186, 64, { 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5,
!   0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24,
!   0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xb1, 0x43, 0x46,
!   0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90}},
!  {0x01c6, 64, { 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x35, 0x90, 0x7e, 0x02, 0xe0,
!   0xff, 0x12, 0x10, 0x5b, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03,
!   0x7d, 0x07, 0x12, 0x11, 0xb1, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
!   0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90}},
!  {0x0206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90,
!   0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
!   0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e,
!   0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42}},
!  {0x0246, 64, { 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12,
!   0x10, 0xa7, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xcd, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90,
!   0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7e, 0x0c,
!   0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd}},
!  {0x0286, 64, { 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60,
!   0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98,
!   0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3,
!   0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10}},
!  {0x02c6, 64, { 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0,
!   0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
!   0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x12, 0xdf,
!   0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12}},
!  {0x0306, 64, { 0x11, 0xb1, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e,
!   0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18,
!   0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00,
!   0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98}},
!  {0x0346, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f,
!   0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90,
!   0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0xe4,
!   0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12}},
!  {0x0386, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b,
!   0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e,
!   0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0,
!   0x74, 0x35, 0xf0, 0xd2, 0x03, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x38}},
!  {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
!   0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x12, 0xdf, 0xef, 0x54, 0x01, 0xf5,
!   0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x33, 0xef, 0x54, 0x80,
!   0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12}},
!  {0x0406, 64, { 0x13, 0x33, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2, 0x07, 0x20,
!   0x1b, 0x03, 0x02, 0x07, 0xec, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x95, 0x3d, 0x40,
!   0x03, 0x02, 0x04, 0xae, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77,
!   0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x6f, 0xef, 0xc3}},
!  {0x0446, 64, { 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5,
!   0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75,
!   0x0d, 0x41, 0x12, 0x0d, 0x04, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f,
!   0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90}},
!  {0x0486, 64, { 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60,
!   0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x04,
!   0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05,
!   0x36, 0x12, 0x12, 0x20, 0x8f, 0x19, 0x12, 0x13, 0x7b, 0x8f, 0x37, 0xe5, 0x19, 0xc3, 0x95}},
!  {0x04c6, 64, { 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x57, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c,
!   0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5, 0x37, 0x30,
!   0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e,
!   0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x84, 0xe5}},
!  {0x0506, 64, { 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75,
!   0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75,
!   0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x29, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90,
!   0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x97, 0xc2, 0x06, 0xe4}},
!  {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
!   0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
!   0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
!   0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03}},
!  {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
!   0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
!   0x11, 0x19, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x3f, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
!   0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90}},
!  {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
!   0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
!   0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
!   0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
!  {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
!   0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
!   0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x65, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0x8b,
!   0xaf, 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
!  {0x0646, 64, { 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
!   0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
!   0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
!   0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
!  {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
!   0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
!   0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
!   0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
!  {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x4b, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
!   0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
!   0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0x75, 0x32,
!   0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
!  {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
!   0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb,
!   0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
!  {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
!   0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
!   0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
!   0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
!  {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xd1, 0xf0,
!   0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94,
!   0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12,
!   0x13, 0x4b, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2}},
!  {0x07c6, 64, { 0x08, 0x12, 0x13, 0x87, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2,
!   0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x87, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05,
!   0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90,
!   0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90}},
!  {0x0806, 64, { 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f,
!   0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x20, 0xe5, 0x0a, 0x70, 0x40,
!   0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
!   0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
!  {0x0846, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb,
!   0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22,
!   0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5,
!   0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12}},
!  {0x0886, 64, { 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05,
!   0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4,
!   0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2,
!   0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
!  {0x08c6, 64, { 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
!   0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a,
!   0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
!   0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
!  {0x0906, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb,
!   0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e,
!   0xe4, 0x0a, 0x08, 0x00, 0x0a, 0x7c, 0x01, 0x0a, 0xe8, 0x03, 0x09, 0x44, 0x06, 0x09, 0xfb, 0x08,
!   0x09, 0xf5, 0x09, 0x09, 0xdd, 0x0a, 0x09, 0xec, 0x0b, 0x00, 0x00, 0x0b, 0x37, 0x90, 0x7f}},
!  {0x0946, 64, { 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xd3, 0x74,
!   0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f,
!   0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19,
!   0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19}},
!  {0x0986, 64, { 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f,
!   0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
!   0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f,
!   0x0a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0}},
!  {0x09c6, 64, { 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0,
!   0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
!   0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x3e, 0x12, 0x0b,
!   0x46, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02}},
!  {0x0a06, 64, { 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
!   0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
!   0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0xe4, 0x90, 0x7f,
!   0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f}},
!  {0x0a46, 64, { 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24,
!   0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
!   0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
!   0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02}},
!  {0x0a86, 64, { 0x60, 0x03, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x3e,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
!   0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
!   0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f}},
!  {0x0ac6, 64, { 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f,
!   0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
!   0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
!   0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
!  {0x0b06, 64, { 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
!   0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
!   0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22}},
!  {0x0b46, 64, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90,
!   0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
!   0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
!   0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa}},
!  {0x0b86, 64, { 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38,
!   0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f,
!   0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7f}},
!  {0x0bc6, 64, { 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
!   0x12, 0x11, 0xb1, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xb1, 0x90, 0x7f,
!   0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11}},
!  {0x0c06, 64, { 0xb1, 0x7f, 0x01, 0x12, 0x12, 0x6a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xb1, 0x20, 0x1b, 0x03, 0x02,
!   0x0c, 0xb7, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4,
!   0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b,
!   0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2}},
!  {0x0c46, 64, { 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
!   0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x10,
!   0xf3, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0,
!   0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74}},
!  {0x0c86, 64, { 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
!   0x11, 0xfb, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
!   0x7f, 0x12, 0x11, 0xfb, 0x7f, 0x01, 0x12, 0x12, 0x8b, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb,
!   0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82}},
!  {0x0cc6, 64, { 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
    0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08,
!   0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0,
!   0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f}},
!  {0x0d06, 64, { 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
    0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2,
!   0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c,
!   0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05}},
!  {0x0d46, 64, { 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
    0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43,
!   0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02,
!   0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0}},
!  {0x0d86, 64, { 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
    0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90,
!   0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2,
!   0x1a, 0x12, 0x12, 0x45, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12}},
!  {0x0dc6, 64, { 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
    0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2,
!   0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x21, 0x80, 0xd6, 0x30, 0x18,
!   0xd3, 0xc2, 0x18, 0x12, 0x13, 0x93, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd}},
!  {0x0e06, 64, { 0x75, 0x81, 0x47, 0x02, 0x0e, 0x47, 0x02, 0x0d, 0x6f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
    0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07,
!   0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56,
!   0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40}},
!  {0x0e46, 64, { 0x80, 0x90, 0x12, 0xac, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
    0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8,
!   0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82,
!   0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca}},
!  {0x0e86, 64, { 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
    0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01,
!   0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9,
!   0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5}},
!  {0x0ec6, 64, { 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
    0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0,
!   0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74,
!   0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3}},
!  {0x0f06, 64, { 0xa3, 0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
!   0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xa5, 0xb4, 0x03, 0x1d,
!   0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x8c, 0x7e, 0x00, 0x29, 0xff,
!   0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00}},
!  {0x0f46, 64, { 0x7a, 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
    0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac,
!   0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08,
!   0x60, 0x0a, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a}},
!  {0x0f86, 64, { 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
!   0xf0, 0x12, 0x13, 0x3f, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
!   0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x7b, 0x8f, 0x1a,
!   0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0}},
!  {0x0fc6, 64, { 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
!   0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
!   0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2,
!   0x11, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0}},
!  {0x1006, 64, { 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0,
!   0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08,
!   0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f,
!   0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10}},
!  {0x1046, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90,
!   0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13,
!   0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13}},
!  {0x1086, 64, { 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef,
!   0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
!   0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44}},
!  {0x10c6, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74,
!   0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90}},
!  {0x1106, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
!   0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
!   0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
!  {0x1146, 64, { 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
!   0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
!   0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f}},
!  {0x1186, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b,
!   0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
!   0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90}},
!  {0x11c6, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12,
!   0x13, 0x0f, 0x8f, 0x1a, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12,
!   0x13, 0x0f, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0x80,
!   0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90}},
!  {0x1206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0x12, 0x13,
!   0x63, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0xe5, 0x1a,
!   0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x63, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90}},
!  {0x1246, 64, { 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0,
!   0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xc8, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44,
!   0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xb1, 0x90,
!   0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80}},
!  {0x1286, 64, { 0xfd, 0x12, 0x11, 0xb1, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xfb,
!   0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80,
!   0xfd, 0x12, 0x11, 0xfb, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00,
!   0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1}},
!  {0x12c6, 64, { 0x1b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e,
!   0x60, 0x05, 0x12, 0x0d, 0x4e, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
    0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0f, 0xe7, 0x00, 0x02, 0x13}},
!  {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xbd, 0x00, 0x02, 0x10, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90}},
!  {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
!  {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12,
!   0x0d, 0x5f, 0x12, 0x0b, 0x46, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--- 1,341 ----
  /* keyspan_usa18x_fw.h
+   
+    Generated from Keyspan firmware image usa16code.h Sat Oct  6 12:16:35 EST 2001
+    This firmware is for the Keyspan USA-18X Serial Adaptor
  
!    "The firmware contained herein as keyspan_usa18x_fw.h is
!    Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
!    ("Keyspan"), as an unpublished work.  This notice does not imply
!    unrestricted or public access to this firmware which is a trade secret of
!    Keyspan, and which may not be reproduced, used, sold or transferred to any
!    third party without Keyspan's prior written consent.  All Rights Reserved.
  
!    This firmware may not be modified and may only be used with the Keyspan 
!    USA-18X Serial Adapter.  Distribution and/or Modification of the
!    keyspan.c driver which includes this firmware, in whole or in part,
!    requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa18x_firmware[] = {
!  {0x0033,  3, { 0x02, 0x13, 0xab}},
   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
!  {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
!  {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
!  {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xca}},
   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
!  {0x00a6, 16, { 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
!  {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xca, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
!  {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
!  {0x00e6, 16, { 0x13, 0x3f, 0xef, 0x42, 0x36, 0x12, 0x11, 0xed, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
!  {0x00f6, 16, { 0x12, 0x13, 0x1b, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
   {0x0043,  3, { 0x02, 0x13, 0x00}},
!  {0x0000,  3, { 0x02, 0x0e, 0x10}},
!  {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x3f, 0xef, 0x42, 0x36, 0xe5, 0x36,
!   0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
!   0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x5b, 0xe5,
!   0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
!  {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
!   0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0c, 0xef, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
!   0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xc2, 0x05, 0xe4, 0xf5,
!   0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
!  {0x0186, 64, { 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
!   0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68,
!   0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d,
!   0xcd, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0}},
!  {0x01c6, 64, { 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
!   0x10, 0x4c, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x72, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0,
!   0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f,
!   0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12}},
!  {0x0206, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e,
!   0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0,
!   0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
!   0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43}},
!  {0x0246, 64, { 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43,
!   0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xbe, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xe4,
!   0xaf, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42,
!   0x12, 0x10, 0x98, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46}},
!  {0x0286, 64, { 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46,
!   0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03,
!   0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
!   0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3}},
!  {0x02c6, 64, { 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
!   0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90,
!   0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x11, 0xf0, 0x12, 0x13, 0x0f, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e}},
!  {0x0306, 64, { 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e,
!   0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0x75, 0x29,
!   0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5,
!   0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11}},
!  {0x0346, 64, { 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8,
!   0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff,
!   0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60}},
!  {0x0386, 64, { 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
!   0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4,
!   0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0,
!   0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
!  {0x03c6, 64, { 0x1a, 0x52, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
!   0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x0f,
!   0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
!   0x4b, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07}},
!  {0x0406, 64, { 0x30, 0x0d, 0x11, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19,
!   0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf4, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x87, 0xef,
!   0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb2, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a,
!   0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12}},
!  {0x0446, 64, { 0x13, 0x87, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f,
!   0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41,
!   0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x14, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
!   0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x94}},
!  {0x0486, 64, { 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19,
!   0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d,
!   0xc1, 0x12, 0x0d, 0x14, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30,
!   0xe1, 0x03, 0x02, 0x05, 0x40, 0x53, 0x37, 0x80, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0x12}},
!  {0x04c6, 64, { 0x12, 0x37, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x6f, 0xef, 0x30, 0xe0, 0x08,
!   0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x37,
!   0x80, 0x57, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3,
!   0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75}},
!  {0x0506, 64, { 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x94, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb,
!   0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08,
!   0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12,
!   0x0d, 0x39, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1}},
!  {0x0546, 64, { 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x9f, 0xc2, 0x06, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
!   0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
!   0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5,
!   0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
!  {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x12, 0x43, 0x47,
!   0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
!   0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x30, 0x90, 0x7e, 0x22, 0xe0,
!   0xff, 0x12, 0x11, 0x56, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x12, 0x7f}},
!  {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x12, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
!   0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
!   0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
!   0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
!  {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
!   0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
!   0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
!   0x11, 0x7c, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xa2, 0xaf, 0x43, 0x12, 0x11, 0x0a}},
!  {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x0a, 0x90, 0x7e, 0x2c,
!   0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
!   0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
!   0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
!  {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
!   0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
!   0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
!   0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
!  {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x63,
!   0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
!   0x12, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
!   0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
!  {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
!   0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
!   0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
!   0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x34, 0x01, 0xd2, 0x08}},
!  {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0xe4,
!   0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
!   0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
!   0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
!  {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
!   0x74, 0x36, 0xf0, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15,
!   0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75,
!   0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x63, 0xef, 0x54, 0x01, 0xf5, 0x19}},
!  {0x07c6, 64, { 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x80, 0xf5, 0x19,
!   0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x9f, 0xef,
!   0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a,
!   0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5}},
!  {0x0806, 64, { 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74,
!   0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1,
!   0x03, 0x02, 0x09, 0x28, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2,
!   0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
!  {0x0846, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
!   0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38,
!   0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08,
!   0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d}},
!  {0x0886, 64, { 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82,
!   0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f,
!   0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a,
!   0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00}},
!  {0x08c6, 64, { 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18,
!   0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb,
!   0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15,
!   0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
!  {0x0906, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
!   0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5,
!   0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e, 0xf4, 0x0a, 0x10, 0x00, 0x0a, 0x84, 0x01, 0x0a,
!   0xf0, 0x03, 0x09, 0x4c, 0x06, 0x0a, 0x03, 0x08, 0x09, 0xfd, 0x09, 0x09, 0xe5, 0x0a, 0x09}},
!  {0x0946, 64, { 0xf4, 0x0b, 0x00, 0x00, 0x0b, 0x3f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61,
!   0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdb, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90,
!   0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02,
!   0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83}},
!  {0x0986, 64, { 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75,
!   0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83,
!   0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
!   0x46, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x1a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90}},
!  {0x09c6, 64, { 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01,
!   0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f,
!   0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea,
!   0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x46, 0x12, 0x0b, 0x4e, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0x00}},
!  {0x0a06, 64, { 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60,
!   0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
!   0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
!   0x02, 0xf0, 0x02, 0x0b, 0x46, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5}},
!  {0x0a46, 64, { 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f,
!   0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
!   0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
!   0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f}},
!  {0x0a86, 64, { 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0,
!   0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
!   0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
!   0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4}},
!  {0x0ac6, 64, { 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54,
!   0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
!   0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80}},
!  {0x0b06, 64, { 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90,
!   0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
!   0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
!   0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
!  {0x0b46, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74,
!   0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e,
!   0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74,
!   0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74}},
!  {0x0b86, 64, { 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4,
!   0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b,
!   0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01, 0x90, 0x7f, 0x98, 0x74,
!   0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd}},
!  {0x0bc6, 64, { 0x12, 0x11, 0xc8, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f,
!   0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
!   0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0xe4,
!   0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11}},
!  {0x0c06, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xc8, 0x7f, 0x01, 0x12, 0x12,
!   0x81, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc7, 0x75, 0x2d,
!   0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4,
!   0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5}},
!  {0x0c46, 64, { 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13,
!   0xd2, 0x04, 0xd2, 0x02, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
!   0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11,
!   0x0a, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90}},
!  {0x0c86, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80,
!   0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
!   0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
!   0x7f, 0x12, 0x12, 0x12, 0x7f, 0x01, 0x12, 0x12, 0xa2, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12}},
!  {0x0cc6, 64, { 0x12, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5,
!   0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
    0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08,
!   0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00}},
!  {0x0d06, 64, { 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98,
!   0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
    0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2,
!   0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5}},
!  {0x0d46, 64, { 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86,
!   0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
    0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43,
!   0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44}},
!  {0x0d86, 64, { 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2,
!   0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
    0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90,
!   0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf}},
!  {0x0dc6, 64, { 0xd2, 0x1a, 0x12, 0x12, 0x5c, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90,
!   0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
    0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2,
!   0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x29, 0x80, 0xd6, 0x30}},
!  {0x0e06, 64, { 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x12, 0xf6, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75,
!   0x81, 0x47, 0x02, 0x0e, 0x57, 0x02, 0x0d, 0x7f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
    0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07,
!   0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4}},
!  {0x0e46, 64, { 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
!   0x90, 0x12, 0xc3, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
    0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8,
!   0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5}},
!  {0x0e86, 64, { 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf,
!   0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
    0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01,
!   0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06}},
!  {0x0ec6, 64, { 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82,
!   0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
    0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0,
!   0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8}},
!  {0x0f06, 64, { 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3,
!   0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
!   0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb5, 0xb4, 0x03, 0x1d,
!   0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9c, 0x7e, 0x00, 0x29}},
!  {0x0f46, 64, { 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a,
!   0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
    0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac,
!   0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5}},
!  {0x0f86, 64, { 0x08, 0x60, 0x0a, 0x12, 0x13, 0x3f, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05,
!   0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
!   0xf0, 0x12, 0x13, 0x57, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
!   0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x93, 0x8f}},
!  {0x0fc6, 64, { 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
!   0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91,
!   0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0,
!   0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0}},
!  {0x1006, 64, { 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04,
!   0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
!   0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53,
!   0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0}},
!  {0x1046, 64, { 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
!   0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
!   0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13,
!   0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0}},
!  {0x1086, 64, { 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44,
!   0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0}},
!  {0x10c6, 64, { 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
!   0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
!   0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90}},
!  {0x1106, 64, { 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
!   0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
!   0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef}},
!  {0x1146, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
!   0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09,
!   0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f,
!   0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74}},
!  {0x1186, 64, { 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
!   0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
!   0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00,
!   0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00}},
!  {0x11c6, 64, { 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0,
!   0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0x12, 0x13, 0x27, 0x8f, 0x1b,
!   0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b}},
!  {0x1206, 64, { 0x60, 0x07, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
!   0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90,
!   0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22,
!   0x12, 0x13, 0x7b, 0x8f, 0x1a, 0x12, 0x13, 0x7b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60}},
!  {0x1246, 64, { 0x12, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x7b, 0x8f, 0x1b,
!   0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0,
!   0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xdf, 0x90, 0x7f,
!   0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5}},
!  {0x1286, 64, { 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee,
!   0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11, 0xc8, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5,
!   0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00,
!   0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12, 0x12, 0x12, 0x22, 0x05, 0x0e, 0x02}},
!  {0x12c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10,
!   0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x1b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19,
!   0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x5e, 0x80, 0xee, 0x22, 0x12,
!   0x00, 0x03, 0x12, 0x0d, 0x6f, 0x12, 0x0b, 0x4e, 0x22, 0x02, 0x10, 0x25, 0x00, 0x02, 0x13}},
!  {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xfb, 0x00, 0x02, 0x0f, 0xcd, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
    0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90}},
!  {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
!  {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
***************
*** 424,436 ****
   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x12, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
!   0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
    0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
    0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
--- 420,432 ----
   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x12, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
!   0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
    0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
    0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
***************
*** 443,447 ****
    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
   {0x1a06, 20, { 0x72, 0x00, 0x10, 0x03, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30,
    0x00, 0x00, 0x00}},
!  {0xffff,	0,	{0x00} }
  };
--- 439,443 ----
    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
   {0x1a06, 20, { 0x72, 0x00, 0x10, 0x03, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30,
    0x00, 0x00, 0x00}},
!  { 0xffff,	0,	{0x00} }
  };
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa19_fw.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa19_fw.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa19_fw.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa19_fw.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,33 ****
  /* keyspan_usa19_fw.h
!  
! 	The firmware contained herein as keyspan_usa19_fw.h is
  
! 		Copyright (C) 1999-2001
! 		Keyspan, A division of InnoSys Incorporated ("Keyspan")
! 		
! 	as an unpublished work. This notice does not imply unrestricted or
! 	public access to the source code from which this firmware image is
! 	derived.  Except as noted below this firmware image may not be 
! 	reproduced, used, sold or transferred to any third party without 
! 	Keyspan's prior written consent.  All Rights Reserved.
  
! 	Permission is hereby granted for the distribution of this firmware 
! 	image as part of a Linux or other Open Source operating system kernel 
! 	in text or binary form as required. 
  
- 	This firmware may not be modified and may only be used with  
- 	Keyspan hardware.  Distribution and/or Modification of the 
- 	keyspan.c driver which includes this firmware, in whole or in 
- 	part, requires the inclusion of this statement."
  */
  
- 
  static const struct ezusb_hex_record keyspan_usa19_firmware[] = {
!  {0x0026, 10, { 0x12, 0x0d, 0xbf, 0x12, 0x0f, 0x47, 0x12, 0x0d, 0x6b, 0x22}},
   {0x0033,  3, { 0x02, 0x00, 0x1a}},
   {0x001a,  4, { 0x53, 0xd8, 0xef, 0x32}},
   {0x0003, 16, { 0x8e, 0x13, 0x8f, 0x14, 0xe5, 0x14, 0x15, 0x14, 0xae, 0x13, 0x70, 0x02, 0x15, 0x13, 0x4e, 0x60}},
!  {0x0013,  7, { 0x05, 0x12, 0x0f, 0x36, 0x80, 0xee, 0x22}},
   {0x0023,  3, { 0x02, 0x00, 0x46}},
   {0x0046, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08}},
   {0x0056, 16, { 0x30, 0x99, 0x0e, 0x30, 0x08, 0x07, 0xa2, 0x0b, 0x92, 0x9b, 0x85, 0x35, 0x99, 0xc2, 0x99, 0xd2}},
--- 1,28 ----
  /* keyspan_usa19_fw.h
!   
!    Generated from Keyspan firmware image usa19code.h Sat Oct  6 12:14:44 EST 2001
!    This firmware is for the Keyspan USA-19 Serial Adaptor
  
!    "The firmware contained herein as keyspan_usa19_fw.h is
!    Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
!    ("Keyspan"), as an unpublished work.  This notice does not imply
!    unrestricted or public access to this firmware which is a trade secret of
!    Keyspan, and which may not be reproduced, used, sold or transferred to any
!    third party without Keyspan's prior written consent.  All Rights Reserved.
  
!    This firmware may not be modified and may only be used with the Keyspan 
!    USA-19 Serial Adapter.  Distribution and/or Modification of the
!    keyspan.c driver which includes this firmware, in whole or in part,
!    requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa19_firmware[] = {
!  {0x0026, 10, { 0x12, 0x0d, 0xbb, 0x12, 0x0e, 0xee, 0x12, 0x0d, 0x67, 0x22}},
   {0x0033,  3, { 0x02, 0x00, 0x1a}},
   {0x001a,  4, { 0x53, 0xd8, 0xef, 0x32}},
   {0x0003, 16, { 0x8e, 0x13, 0x8f, 0x14, 0xe5, 0x14, 0x15, 0x14, 0xae, 0x13, 0x70, 0x02, 0x15, 0x13, 0x4e, 0x60}},
!  {0x0013,  7, { 0x05, 0x12, 0x0e, 0xdd, 0x80, 0xee, 0x22}},
   {0x0023,  3, { 0x02, 0x00, 0x46}},
   {0x0046, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08}},
   {0x0056, 16, { 0x30, 0x99, 0x0e, 0x30, 0x08, 0x07, 0xa2, 0x0b, 0x92, 0x9b, 0x85, 0x35, 0x99, 0xc2, 0x99, 0xd2}},
***************
*** 42,48 ****
   {0x00e6, 16, { 0xf5, 0x50, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x20, 0x09, 0x2d, 0x20, 0x06, 0x2a, 0x90}},
   {0x00f6, 16, { 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x20, 0x0e, 0x20, 0x30, 0x0d, 0x11, 0x90, 0x7d, 0xc1, 0xe0}},
   {0x0043,  3, { 0x02, 0x0f, 0x00}},
!  {0x0000,  3, { 0x02, 0x0c, 0x61}},
   {0x0106, 64, { 0x13, 0x92, 0x0b, 0xa3, 0xe0, 0xf5, 0x35, 0x75, 0x37, 0x03, 0x02, 0x04, 0x2f, 0x75, 0x37, 0x02, 0x90,
    0x7d, 0xc1, 0xe0, 0xf5, 0x35, 0x02, 0x04, 0x2f, 0x75, 0x37, 0x01, 0xc2, 0x08, 0x02, 0x04, 0x2f,
    0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x03, 0x02, 0x01, 0xcf, 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1,
--- 37,43 ----
   {0x00e6, 16, { 0xf5, 0x50, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x20, 0x09, 0x2d, 0x20, 0x06, 0x2a, 0x90}},
   {0x00f6, 16, { 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x20, 0x0e, 0x20, 0x30, 0x0d, 0x11, 0x90, 0x7d, 0xc1, 0xe0}},
   {0x0043,  3, { 0x02, 0x0f, 0x00}},
!  {0x0000,  3, { 0x02, 0x0c, 0x5d}},
   {0x0106, 64, { 0x13, 0x92, 0x0b, 0xa3, 0xe0, 0xf5, 0x35, 0x75, 0x37, 0x03, 0x02, 0x04, 0x2f, 0x75, 0x37, 0x02, 0x90,
    0x7d, 0xc1, 0xe0, 0xf5, 0x35, 0x02, 0x04, 0x2f, 0x75, 0x37, 0x01, 0xc2, 0x08, 0x02, 0x04, 0x2f,
    0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x03, 0x02, 0x01, 0xcf, 0x90, 0x7f, 0xc6, 0xe0, 0x30, 0xe1,
***************
*** 115,123 ****
    0x15, 0x36, 0x05, 0x2b, 0x43, 0x33, 0x01, 0x80, 0x0b, 0x90, 0x7f, 0xb9, 0xe5, 0x36, 0xf0, 0x75,
    0x36, 0x00, 0xd2, 0x01, 0xd2, 0x12, 0x30, 0x12, 0x05, 0xc2, 0x12, 0x02, 0x00, 0x56, 0xd0, 0xd0,
    0xd0, 0x86, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xca, 0xe0, 0x30, 0xe1}},
!  {0x0586, 64, { 0x03, 0x02, 0x06, 0xab, 0xe4, 0xf5, 0x13, 0x74, 0x40, 0x25, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
    0x83, 0xe0, 0xff, 0xe5, 0x13, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x38, 0xf9, 0xec, 0x34, 0x00, 0xfa,
!   0xef, 0x12, 0x0d, 0x33, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x18, 0xdb, 0xe5, 0x38, 0x60, 0x0c, 0x75,
    0xc9, 0x20, 0x75, 0xc8, 0x34, 0x85, 0x39, 0xca, 0x85, 0x3a, 0xcb, 0xe5, 0x3b, 0x13, 0x92}},
   {0x05c6, 64, { 0x0d, 0x92, 0x9f, 0xe5, 0x3c, 0x13, 0x92, 0x0e, 0xe5, 0x3d, 0x13, 0x92, 0x11, 0xe5, 0x3e, 0x60, 0x09,
    0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfb, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x04, 0xf0,
--- 110,118 ----
    0x15, 0x36, 0x05, 0x2b, 0x43, 0x33, 0x01, 0x80, 0x0b, 0x90, 0x7f, 0xb9, 0xe5, 0x36, 0xf0, 0x75,
    0x36, 0x00, 0xd2, 0x01, 0xd2, 0x12, 0x30, 0x12, 0x05, 0xc2, 0x12, 0x02, 0x00, 0x56, 0xd0, 0xd0,
    0xd0, 0x86, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xca, 0xe0, 0x30, 0xe1}},
!  {0x0586, 64, { 0x03, 0x02, 0x06, 0xa7, 0xe4, 0xf5, 0x13, 0x74, 0x40, 0x25, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
    0x83, 0xe0, 0xff, 0xe5, 0x13, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x38, 0xf9, 0xec, 0x34, 0x00, 0xfa,
!   0xef, 0x12, 0x0d, 0x2f, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x18, 0xdb, 0xe5, 0x38, 0x60, 0x0c, 0x75,
    0xc9, 0x20, 0x75, 0xc8, 0x34, 0x85, 0x39, 0xca, 0x85, 0x3a, 0xcb, 0xe5, 0x3b, 0x13, 0x92}},
   {0x05c6, 64, { 0x0d, 0x92, 0x9f, 0xe5, 0x3c, 0x13, 0x92, 0x0e, 0xe5, 0x3d, 0x13, 0x92, 0x11, 0xe5, 0x3e, 0x60, 0x09,
    0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfb, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x98, 0xe0, 0x44, 0x04, 0xf0,
***************
*** 130,278 ****
   {0x0646, 64, { 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x4a, 0x60, 0x0a, 0xd2, 0x9c, 0xc2, 0x98, 0x75, 0x2c,
    0x01, 0x75, 0x31, 0x1e, 0xe5, 0x4b, 0x60, 0x07, 0xc2, 0x9c, 0xe4, 0xf5, 0x36, 0xf5, 0x2c, 0xe5,
    0x4c, 0x60, 0x03, 0xe4, 0xf5, 0x36, 0xe5, 0x4d, 0x60, 0x02, 0xd2, 0x04, 0xe5, 0x4e, 0x60, 0x0a,
!   0xe5, 0x4a, 0x70, 0x02, 0xf5, 0x31, 0xe5, 0x4e, 0x42, 0x33, 0xe5, 0x4f, 0x60, 0x1f, 0x90}},
   {0x0686, 64, { 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x12, 0xf0, 0x74, 0x32, 0xf0, 0x74, 0x13, 0xf0,
!   0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0xd2, 0x02, 0xd2, 0x01, 0xd2, 0x05, 0xe4,
!   0x90, 0x7f, 0xcb, 0xf0, 0xa2, 0x09, 0xe4, 0x33, 0xff, 0x65, 0x29, 0x60, 0x05, 0x8f, 0x29, 0x43,
!   0x33, 0x01, 0xa2, 0x06, 0xe4, 0x33, 0xff, 0x65, 0x2a, 0x60, 0x05, 0x8f, 0x2a, 0x43, 0x33}},
!  {0x06c6, 64, { 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x08, 0xb5, 0x25, 0x0a, 0xe0, 0x54, 0x08, 0x64, 0x08, 0xf5, 0x25,
!   0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x10, 0xb5, 0x26, 0x0a, 0xe0, 0x54, 0x10, 0x64,
!   0x10, 0xf5, 0x26, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5, 0x27, 0x0a, 0xe0,
!   0x54, 0x40, 0x64, 0x40, 0xf5, 0x27, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x20}},
!  {0x0706, 64, { 0xb5, 0x28, 0x0a, 0xe0, 0x54, 0x20, 0x64, 0x20, 0xf5, 0x28, 0x43, 0x33, 0x01, 0x30, 0x04, 0x35, 0xc2,
!   0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x36, 0x60, 0x09, 0x90,
!   0x7f, 0xb7, 0xf0, 0xe4, 0xf5, 0x36, 0xc2, 0x01, 0xc2, 0x04, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0,
!   0x20, 0xe1, 0x0f, 0xe5, 0x36, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x36, 0xd2}},
!  {0x0746, 64, { 0x01, 0xc2, 0x04, 0xd2, 0xaf, 0x20, 0x03, 0x37, 0x30, 0x02, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1,
!   0x2d, 0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x75, 0x37, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5,
!   0x50, 0xd2, 0x03, 0x80, 0x19, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0,
!   0x13, 0x92, 0x0a, 0x75, 0x37, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x50, 0xd2, 0x03, 0x20}},
!  {0x0786, 64, { 0x10, 0x33, 0x20, 0x00, 0x06, 0xe5, 0x37, 0x65, 0x50, 0x70, 0x2a, 0x30, 0x03, 0x1a, 0x30, 0x02, 0x09,
!   0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x02, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02,
!   0xc2, 0x03, 0xe4, 0xf5, 0x50, 0xf5, 0x37, 0x30, 0x0a, 0x0a, 0xc2, 0x0a, 0xc2, 0x00, 0x90, 0x7f,
!   0xbb, 0x74, 0x01, 0xf0, 0x30, 0x10, 0x03, 0x02, 0x08, 0xc5, 0x20, 0x03, 0x03, 0x02, 0x08}},
!  {0x07c6, 64, { 0xc5, 0x30, 0x0e, 0x0a, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x02, 0x08, 0xc5, 0x30, 0x06, 0x03,
!   0x02, 0x08, 0xc5, 0x30, 0x09, 0x03, 0x02, 0x08, 0xc5, 0x30, 0x02, 0x62, 0x30, 0x0d, 0x12, 0xaf,
!   0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92,
!   0x19, 0xaf, 0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83}},
!  {0x0806, 64, { 0xe0, 0xf5, 0x14, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37,
!   0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0b, 0xaf, 0x37,
!   0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x35, 0xd2,
!   0x08, 0x80, 0x6b, 0xc2, 0x08, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x02, 0x80, 0x60, 0x30}},
!  {0x0846, 64, { 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0,
!   0x13, 0x92, 0x19, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
!   0x83, 0xe0, 0xf5, 0x14, 0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37,
!   0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92}},
!  {0x0886, 64, { 0x0b, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5,
!   0x35, 0xd2, 0x08, 0x80, 0x09, 0xc2, 0x08, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02, 0x30, 0x0d,
!   0x04, 0xa2, 0x19, 0x92, 0x9b, 0xd2, 0x10, 0xc2, 0xaf, 0x85, 0x14, 0x99, 0x20, 0x08, 0x0d, 0x30,
!   0x0a, 0x0a, 0xc2, 0x0a, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90}},
!  {0x08c6, 64, { 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x51, 0xe5, 0x33, 0x60, 0x4d, 0xe5, 0x31, 0x70, 0x49, 0xe5, 0x33, 0x30,
!   0xe1, 0x08, 0xe4, 0xf5, 0x2f, 0x75, 0x33, 0x01, 0x80, 0x0b, 0xa2, 0x05, 0xe4, 0x33, 0xf5, 0x2f,
!   0xc2, 0x05, 0xe4, 0xf5, 0x33, 0xe4, 0xf5, 0x13, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x13,
!   0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0c, 0xed, 0xff, 0x74, 0x00, 0x25, 0x13, 0xf5, 0x82}},
!  {0x0906, 64, { 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xbd,
!   0x74, 0x0c, 0xf0, 0x75, 0x31, 0x10, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0d, 0x45, 0x0a, 0x03,
!   0x00, 0x0a, 0x77, 0x01, 0x0a, 0xe3, 0x03, 0x09, 0x41, 0x06, 0x09, 0xf4, 0x08, 0x09, 0xe8, 0x09,
!   0x09, 0xd0, 0x0a, 0x09, 0xdf, 0x0b, 0x00, 0x00, 0x0b, 0x32, 0x90, 0x7f, 0xeb, 0xe0, 0x24}},
!  {0x0946, 64, { 0xfe, 0x60, 0x16, 0x14, 0x60, 0x57, 0x24, 0x02, 0x70, 0x76, 0x74, 0x0f, 0x90, 0x7f, 0xd4, 0xf0, 0x74,
!   0x64, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02,
!   0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0xb5, 0x75, 0x83, 0x0f, 0xef, 0xf0, 0x75, 0x82, 0xae, 0x75,
!   0x83, 0x0f, 0xf0, 0x75, 0x82, 0xa7, 0x75, 0x83, 0x0f, 0xf0, 0x75, 0x82, 0xa0, 0x75, 0x83}},
!  {0x0986, 64, { 0x0f, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x0f, 0xf0, 0x74, 0x0f, 0x90,
!   0x7f, 0xd4, 0xf0, 0x74, 0x76, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0,
!   0xff, 0x12, 0x0e, 0x48, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f,
!   0xd5, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x39}},
!  {0x09c6, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0x00, 0xe5, 0x19, 0xf0, 0x90,
!   0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x19, 0x02, 0x0b,
!   0x39, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x18, 0x12, 0x0d, 0x6b, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0x00,
!   0xe5, 0x18, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xe8}},
!  {0x0a06, 64, { 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x13, 0xe4, 0x33, 0xff,
!   0x25, 0xe0, 0xff, 0xa2, 0x17, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90,
!   0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x39, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90,
!   0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80}},
!  {0x0a46, 64, { 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34,
!   0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5,
!   0x74, 0x02, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x39,
!   0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x39}},
!  {0x0a86, 64, { 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x13, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
!   0x01, 0xf0, 0x02, 0x0b, 0x39, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4,
!   0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5,
!   0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff}},
!  {0x0ac6, 64, { 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20,
!   0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0,
!   0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2,
!   0x13, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea}},
!  {0x0b06, 64, { 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54,
!   0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0,
!   0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
!   0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20, 0x15, 0x03, 0x02, 0x0b}},
!  {0x0b46, 64, { 0xd3, 0xe5, 0x31, 0x60, 0x02, 0x15, 0x31, 0xe5, 0x36, 0x60, 0x4f, 0x65, 0x34, 0x70, 0x45, 0xe5, 0x32,
!   0xf4, 0x60, 0x02, 0x05, 0x32, 0xe5, 0x32, 0xc3, 0x95, 0x41, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x01,
!   0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7, 0xe5, 0x36, 0xf0, 0xc2, 0x01,
!   0xe4, 0xf5, 0x36, 0xf5, 0x32, 0xf5, 0x34, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1}},
!  {0x0b86, 64, { 0x0f, 0x90, 0x7f, 0xb9, 0xe5, 0x36, 0xf0, 0xd2, 0x01, 0xe4, 0xf5, 0x36, 0xf5, 0x32, 0xf5, 0x34, 0xd2,
!   0xaf, 0x80, 0x06, 0x85, 0x36, 0x34, 0xe4, 0xf5, 0x32, 0xe5, 0x2c, 0x60, 0x2f, 0x20, 0x0c, 0x07,
!   0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe0, 0x0f, 0xe5, 0x2d, 0x60, 0x06, 0xe4, 0xf5, 0x2d, 0x43, 0x33,
!   0x01, 0xe4, 0xf5, 0x30, 0x80, 0x14, 0xe5, 0x30, 0xd3, 0x95, 0x42, 0x50, 0x0d, 0xe5, 0x30}},
!  {0x0bc6, 64, { 0xb5, 0x42, 0x06, 0x75, 0x2d, 0x01, 0x43, 0x33, 0x01, 0x05, 0x30, 0xc2, 0x0c, 0x22, 0x75, 0x12, 0x01,
!   0xc2, 0x14, 0xc2, 0x18, 0xc2, 0x13, 0xc2, 0x17, 0xc2, 0x15, 0xc2, 0x12, 0xd2, 0x16, 0xe4, 0xf5,
!   0x18, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x13,
!   0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74}},
!  {0x0c06, 64, { 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90,
!   0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae,
!   0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0x19, 0x12, 0x0e, 0xda, 0xc2, 0x14, 0x30,
!   0x15, 0x03, 0x12, 0x05, 0x80, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x11, 0x60, 0x08, 0xe0, 0xf5}},
!  {0x0c46, 64, { 0x11, 0x12, 0x0b, 0x41, 0x80, 0xea, 0x30, 0x14, 0x07, 0xc2, 0x14, 0x12, 0x09, 0x1e, 0x80, 0xe0, 0x30,
!   0x18, 0xdd, 0xc2, 0x18, 0x12, 0x00, 0x26, 0x80, 0xd6, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd,
!   0x75, 0x81, 0x50, 0x02, 0x0c, 0xa8, 0x02, 0x0b, 0xd4, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3,
!   0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8}},
!  {0x0c86, 64, { 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4,
!   0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40,
!   0x80, 0x90, 0x0e, 0x04, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5,
!   0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0}},
!  {0x0cc6, 64, { 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5,
!   0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca,
!   0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50,
!   0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22}},
!  {0x0d06, 64, { 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06,
!   0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5,
!   0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89,
!   0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0}},
!  {0x0d46, 64, { 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8,
!   0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3,
!   0xa3, 0xa3, 0x80, 0xdf, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90,
!   0x7f, 0x96, 0x74, 0x10, 0xf0, 0x90, 0x7f, 0x94, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0x9d, 0x04}},
!  {0x0d86, 64, { 0xf0, 0x90, 0x7f, 0x97, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x03, 0xf0, 0x90, 0x7f, 0x9e, 0x74,
!   0x84, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90,
!   0x7f, 0xcb, 0xf0, 0x75, 0x98, 0x40, 0x43, 0xa8, 0x10, 0x90, 0x7f, 0xde, 0x74, 0x1f, 0xf0, 0x90,
!   0x7f, 0xdf, 0x74, 0x0f, 0xf0, 0xd2, 0x15, 0x22, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f}},
!  {0x0dc6, 64, { 0x94, 0xf0, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xe0,
!   0x44, 0x02, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x20, 0xf0,
!   0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0xfd, 0xf0, 0xe4, 0x90, 0x7f, 0x97,
!   0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22, 0x0c, 0x24}},
!  {0x0e06, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x30, 0x00, 0x01, 0x33,
!   0x01, 0x01, 0x32, 0x00, 0x01, 0x37, 0x00, 0x01, 0x50, 0x00, 0x01, 0x36, 0x00, 0x01, 0x34, 0x00,
!   0xc1, 0x05, 0xc1, 0x0c, 0xc1, 0x03, 0xc1, 0x0f, 0xc1, 0x04, 0xc1, 0x0e, 0xc1, 0x11, 0xc1, 0x0a,
!   0xc1, 0x10, 0xc1, 0x08, 0xc1, 0x09, 0xc1, 0x06, 0xc1, 0x00, 0xc1, 0x0d, 0xc1, 0x81, 0xc1}},
!  {0x0e46, 64, { 0x82, 0x00, 0x8f, 0x13, 0xe4, 0xf5, 0x14, 0x75, 0x15, 0xff, 0x75, 0x16, 0x0f, 0x75, 0x17, 0xb9, 0xab,
!   0x15, 0xaa, 0x16, 0xa9, 0x17, 0x90, 0x00, 0x01, 0x12, 0x0d, 0x06, 0xb4, 0x03, 0x1d, 0xaf, 0x14,
!   0x05, 0x14, 0xef, 0xb5, 0x13, 0x01, 0x22, 0x12, 0x0c, 0xed, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a,
!   0xa9, 0x07, 0x75, 0x15, 0xff, 0xf5, 0x16, 0x89, 0x17, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00}},
!  {0x0e86, 64, { 0x79, 0x00, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86,
!   0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0,
    0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83,
!   0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x14, 0x53, 0x91}},
!  {0x0ec6, 64, { 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83,
!   0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x19,
!   0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0,
!   0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x00, 0x02, 0x0e, 0xb3, 0x00, 0x02, 0x0f}},
!  {0x0f06, 64, { 0x04, 0x00, 0x02, 0x0e, 0x89, 0x00, 0x02, 0x0f, 0x0f, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85,
!   0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74,
!   0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x74,
!   0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9}},
!  {0x0f46, 64, { 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10,
    0x01, 0xff, 0x00, 0x00, 0x40, 0xcd, 0x06, 0x07, 0x01, 0x01, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09,
    0x02, 0x43, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x07, 0xff, 0x00}},
   {0x0f86, 64, { 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07,
--- 125,273 ----
   {0x0646, 64, { 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x4a, 0x60, 0x0a, 0xd2, 0x9c, 0xc2, 0x98, 0x75, 0x2c,
    0x01, 0x75, 0x31, 0x1e, 0xe5, 0x4b, 0x60, 0x07, 0xc2, 0x9c, 0xe4, 0xf5, 0x36, 0xf5, 0x2c, 0xe5,
    0x4c, 0x60, 0x03, 0xe4, 0xf5, 0x36, 0xe5, 0x4d, 0x60, 0x02, 0xd2, 0x04, 0xe5, 0x4e, 0x60, 0x0a,
!   0xe5, 0x4a, 0x70, 0x02, 0xf5, 0x31, 0xe5, 0x4e, 0x42, 0x33, 0xe5, 0x4f, 0x60, 0x1b, 0x90}},
   {0x0686, 64, { 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x12, 0xf0, 0x74, 0x32, 0xf0, 0x74, 0x13, 0xf0,
!   0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0xd2, 0x05, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
!   0xa2, 0x09, 0xe4, 0x33, 0xff, 0x65, 0x29, 0x60, 0x05, 0x8f, 0x29, 0x43, 0x33, 0x01, 0xa2, 0x06,
!   0xe4, 0x33, 0xff, 0x65, 0x2a, 0x60, 0x05, 0x8f, 0x2a, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b}},
!  {0x06c6, 64, { 0xe0, 0x54, 0x08, 0xb5, 0x25, 0x0a, 0xe0, 0x54, 0x08, 0x64, 0x08, 0xf5, 0x25, 0x43, 0x33, 0x01, 0x90,
!   0x7f, 0x9b, 0xe0, 0x54, 0x10, 0xb5, 0x26, 0x0a, 0xe0, 0x54, 0x10, 0x64, 0x10, 0xf5, 0x26, 0x43,
!   0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5, 0x27, 0x0a, 0xe0, 0x54, 0x40, 0x64, 0x40,
!   0xf5, 0x27, 0x43, 0x33, 0x01, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x20, 0xb5, 0x28, 0x0a, 0xe0}},
!  {0x0706, 64, { 0x54, 0x20, 0x64, 0x20, 0xf5, 0x28, 0x43, 0x33, 0x01, 0x30, 0x04, 0x35, 0xc2, 0xaf, 0x30, 0x01, 0x18,
!   0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x36, 0x60, 0x09, 0x90, 0x7f, 0xb7, 0xf0, 0xe4,
!   0xf5, 0x36, 0xc2, 0x01, 0xc2, 0x04, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0xe5,
!   0x36, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x36, 0xd2, 0x01, 0xc2, 0x04, 0xd2}},
!  {0x0746, 64, { 0xaf, 0x20, 0x03, 0x37, 0x30, 0x02, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7e, 0x40,
!   0xe0, 0x13, 0x92, 0x0a, 0x75, 0x37, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x50, 0xd2, 0x03, 0x80,
!   0x19, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x75,
!   0x37, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x50, 0xd2, 0x03, 0x20, 0x10, 0x33, 0x20, 0x00}},
!  {0x0786, 64, { 0x06, 0xe5, 0x37, 0x65, 0x50, 0x70, 0x2a, 0x30, 0x03, 0x1a, 0x30, 0x02, 0x09, 0xe4, 0x90, 0x7f, 0xc7,
!   0xf0, 0xc2, 0x02, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02, 0xc2, 0x03, 0xe4, 0xf5,
!   0x50, 0xf5, 0x37, 0x30, 0x0a, 0x0a, 0xc2, 0x0a, 0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0,
!   0x30, 0x10, 0x03, 0x02, 0x08, 0xc1, 0x20, 0x03, 0x03, 0x02, 0x08, 0xc1, 0x30, 0x0e, 0x0a}},
!  {0x07c6, 64, { 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe3, 0x03, 0x02, 0x08, 0xc1, 0x30, 0x06, 0x03, 0x02, 0x08, 0xc1, 0x30,
!   0x09, 0x03, 0x02, 0x08, 0xc1, 0x30, 0x02, 0x62, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74,
!   0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x19, 0xaf, 0x37, 0x05,
!   0x37, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x14, 0xe5}},
!  {0x0806, 64, { 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74, 0x40, 0x2f, 0xf5,
!   0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0b, 0xaf, 0x37, 0x05, 0x37, 0x74, 0x40,
!   0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x35, 0xd2, 0x08, 0x80, 0x6b, 0xc2,
!   0x08, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x02, 0x80, 0x60, 0x30, 0x0d, 0x12, 0xaf, 0x37}},
!  {0x0846, 64, { 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x19, 0xaf,
!   0x37, 0x05, 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x14,
!   0xe5, 0x37, 0xc3, 0x95, 0x50, 0x50, 0x2a, 0x30, 0x0d, 0x12, 0xaf, 0x37, 0x05, 0x37, 0x74, 0xc0,
!   0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x0b, 0xaf, 0x37, 0x05}},
!  {0x0886, 64, { 0x37, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x35, 0xd2, 0x08, 0x80,
!   0x09, 0xc2, 0x08, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x02, 0x30, 0x0d, 0x04, 0xa2, 0x19, 0x92,
!   0x9b, 0xd2, 0x10, 0xc2, 0xaf, 0x85, 0x14, 0x99, 0x20, 0x08, 0x0d, 0x30, 0x0a, 0x0a, 0xc2, 0x0a,
!   0xc2, 0x00, 0x90, 0x7f, 0xbb, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xbc, 0xe0, 0x20}},
!  {0x08c6, 64, { 0xe1, 0x51, 0xe5, 0x33, 0x60, 0x4d, 0xe5, 0x31, 0x70, 0x49, 0xe5, 0x33, 0x30, 0xe1, 0x08, 0xe4, 0xf5,
!   0x2f, 0x75, 0x33, 0x01, 0x80, 0x0b, 0xa2, 0x05, 0xe4, 0x33, 0xf5, 0x2f, 0xc2, 0x05, 0xe4, 0xf5,
!   0x33, 0xe4, 0xf5, 0x13, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x13, 0xf9, 0xee, 0x34, 0x00,
!   0xfa, 0x12, 0x0c, 0xe9, 0xff, 0x74, 0x00, 0x25, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5}},
!  {0x0906, 64, { 0x83, 0xef, 0xf0, 0x05, 0x13, 0xe5, 0x13, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xbd, 0x74, 0x0c, 0xf0, 0x75,
!   0x31, 0x10, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0d, 0x41, 0x09, 0xff, 0x00, 0x0a, 0x73, 0x01,
!   0x0a, 0xdf, 0x03, 0x09, 0x3d, 0x06, 0x09, 0xf0, 0x08, 0x09, 0xe4, 0x09, 0x09, 0xcc, 0x0a, 0x09,
!   0xdb, 0x0b, 0x00, 0x00, 0x0b, 0x2e, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14}},
!  {0x0946, 64, { 0x60, 0x57, 0x24, 0x02, 0x70, 0x76, 0x74, 0x0f, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x64, 0x90, 0x7f, 0xd5,
!   0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03,
!   0x75, 0x82, 0xb5, 0x75, 0x83, 0x0f, 0xef, 0xf0, 0x75, 0x82, 0xae, 0x75, 0x83, 0x0f, 0xf0, 0x75,
!   0x82, 0xa7, 0x75, 0x83, 0x0f, 0xf0, 0x75, 0x82, 0xa0, 0x75, 0x83, 0x0f, 0xf0, 0x90, 0x7f}},
!  {0x0986, 64, { 0xea, 0xe0, 0x04, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x0f, 0xf0, 0x74, 0x0f, 0x90, 0x7f, 0xd4, 0xf0, 0x74,
!   0x76, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0e, 0x44,
!   0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
!   0x35, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xb4, 0xe0}},
!  {0x09c6, 64, { 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01,
!   0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x19, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea,
!   0xe0, 0xf5, 0x18, 0x12, 0x0d, 0x67, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0x00, 0xe5, 0x18, 0xf0, 0x90,
!   0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60}},
!  {0x0a06, 64, { 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x13, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2,
!   0x17, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02,
!   0xf0, 0x02, 0x0b, 0x35, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02,
!   0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f}},
!  {0x0a46, 64, { 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0,
!   0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02,
!   0x0b, 0x35, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xe8, 0xe0,
!   0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xea, 0xe0}},
!  {0x0a86, 64, { 0xb4, 0x01, 0x05, 0xc2, 0x13, 0x02, 0x0b, 0x35, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b,
!   0x35, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
!   0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
!   0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54}},
!  {0x0ac6, 64, { 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90,
!   0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18,
!   0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x13, 0x80, 0x3f, 0x90,
!   0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90}},
!  {0x0b06, 64, { 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0,
!   0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f,
!   0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f,
!   0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20, 0x15, 0x03, 0x02, 0x0b, 0xcf, 0xe5, 0x31, 0x60}},
!  {0x0b46, 64, { 0x02, 0x15, 0x31, 0xe5, 0x36, 0x60, 0x4f, 0x65, 0x34, 0x70, 0x45, 0xe5, 0x32, 0xf4, 0x60, 0x02, 0x05,
!   0x32, 0xe5, 0x32, 0xc3, 0x95, 0x41, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8,
!   0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7, 0xe5, 0x36, 0xf0, 0xc2, 0x01, 0xe4, 0xf5, 0x36, 0xf5,
!   0x32, 0xf5, 0x34, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f, 0xb9}},
!  {0x0b86, 64, { 0xe5, 0x36, 0xf0, 0xd2, 0x01, 0xe4, 0xf5, 0x36, 0xf5, 0x32, 0xf5, 0x34, 0xd2, 0xaf, 0x80, 0x06, 0x85,
!   0x36, 0x34, 0xe4, 0xf5, 0x32, 0xe5, 0x2c, 0x60, 0x2f, 0x20, 0x0c, 0x07, 0x90, 0x7f, 0x9b, 0xe0,
!   0x30, 0xe0, 0x0f, 0xe5, 0x2d, 0x60, 0x06, 0xe4, 0xf5, 0x2d, 0x43, 0x33, 0x01, 0xe4, 0xf5, 0x30,
!   0x80, 0x14, 0xe5, 0x30, 0xd3, 0x95, 0x42, 0x50, 0x0d, 0xe5, 0x30, 0xb5, 0x42, 0x06, 0x75}},
!  {0x0bc6, 64, { 0x2d, 0x01, 0x43, 0x33, 0x01, 0x05, 0x30, 0xc2, 0x0c, 0x22, 0x75, 0x12, 0x01, 0xc2, 0x14, 0xc2, 0x18,
!   0xc2, 0x13, 0xc2, 0x17, 0xc2, 0x15, 0xc2, 0x12, 0xd2, 0x16, 0xe4, 0xf5, 0x18, 0x90, 0x7f, 0x92,
!   0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x13, 0xe4, 0x33, 0xfe, 0xef,
!   0x4e, 0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f}},
!  {0x0c06, 64, { 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53,
!   0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0,
!   0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0x19, 0x12, 0x0f, 0x36, 0xc2, 0x14, 0x30, 0x15, 0x03, 0x12, 0x05,
!   0x80, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x11, 0x60, 0x08, 0xe0, 0xf5, 0x11, 0x12, 0x0b, 0x3d}},
!  {0x0c46, 64, { 0x80, 0xea, 0x30, 0x14, 0x07, 0xc2, 0x14, 0x12, 0x09, 0x1a, 0x80, 0xe0, 0x30, 0x18, 0xdd, 0xc2, 0x18,
!   0x12, 0x00, 0x26, 0x80, 0xd6, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x50, 0x02,
!   0x0c, 0xa4, 0x02, 0x0b, 0xd0, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80,
!   0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c}},
!  {0x0c86, 64, { 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46,
!   0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0e, 0x00,
!   0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe,
!   0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8}},
!  {0x0cc6, 64, { 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5,
!   0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7,
!   0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb,
!   0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5}},
!  {0x0d06, 64, { 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8,
!   0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82,
!   0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0,
!   0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8}},
!  {0x0d46, 64, { 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5,
!   0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf,
!   0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0x74, 0x10,
!   0xf0, 0x90, 0x7f, 0x94, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0x9d, 0x04, 0xf0, 0x90, 0x7f, 0x97}},
!  {0x0d86, 64, { 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x03, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x84, 0xf0, 0xe4, 0x90,
!   0x7f, 0x98, 0xf0, 0x90, 0x7f, 0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90, 0x7f, 0xcb, 0xf0, 0x75,
!   0x98, 0x40, 0x43, 0xa8, 0x10, 0x90, 0x7f, 0xde, 0x74, 0x1f, 0xf0, 0x90, 0x7f, 0xdf, 0x74, 0x0f,
!   0xf0, 0xd2, 0x15, 0x22, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f}},
!  {0x0dc6, 64, { 0x93, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x02, 0xf0, 0x90,
!   0x7f, 0x9d, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x20, 0xf0, 0xe4, 0x90, 0x7f, 0x96,
!   0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0xfd, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90, 0x7f, 0x9e,
!   0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22, 0x0c, 0x24, 0x00, 0x00, 0x00, 0x00}},
!  {0x0e06, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x30, 0x00, 0x01, 0x33, 0x01, 0x01, 0x32, 0x00,
!   0x01, 0x37, 0x00, 0x01, 0x50, 0x00, 0x01, 0x36, 0x00, 0x01, 0x34, 0x00, 0xc1, 0x05, 0xc1, 0x0c,
!   0xc1, 0x03, 0xc1, 0x0f, 0xc1, 0x04, 0xc1, 0x0e, 0xc1, 0x11, 0xc1, 0x0a, 0xc1, 0x10, 0xc1, 0x08,
!   0xc1, 0x09, 0xc1, 0x06, 0xc1, 0x00, 0xc1, 0x0d, 0xc1, 0x81, 0xc1, 0x82, 0x00, 0x8f, 0x13}},
!  {0x0e46, 64, { 0xe4, 0xf5, 0x14, 0x75, 0x15, 0xff, 0x75, 0x16, 0x0f, 0x75, 0x17, 0xb9, 0xab, 0x15, 0xaa, 0x16, 0xa9,
!   0x17, 0x90, 0x00, 0x01, 0x12, 0x0d, 0x02, 0xb4, 0x03, 0x1d, 0xaf, 0x14, 0x05, 0x14, 0xef, 0xb5,
!   0x13, 0x01, 0x22, 0x12, 0x0c, 0xe9, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x15,
!   0xff, 0xf5, 0x16, 0x89, 0x17, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0xc0}},
!  {0x0e86, 64, { 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x16, 0x04,
!   0xc2, 0x16, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0,
    0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83,
!   0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4}},
!  {0x0ec6, 64, { 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0,
!   0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3,
!   0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87,
!   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x02, 0x0f, 0x0f, 0x00, 0x02, 0x0f}},
!  {0x0f06, 64, { 0x04, 0x00, 0x02, 0x0e, 0xb3, 0x00, 0x02, 0x0e, 0x85, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85,
!   0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x14, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74,
!   0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90,
!   0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x19, 0x04, 0xe0, 0x44}},
!  {0x0f46, 64, { 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0,
!   0x44, 0x04, 0xf0, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00,
    0x01, 0xff, 0x00, 0x00, 0x40, 0xcd, 0x06, 0x07, 0x01, 0x01, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09,
    0x02, 0x43, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x07, 0xff, 0x00}},
   {0x0f86, 64, { 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07,
***************
*** 281,285 ****
    0x00, 0x01, 0x04, 0x03, 0x09, 0x04, 0x10, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73}},
   {0x0fc6, 23, { 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x0e, 0x03, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00,
    0x61, 0x00, 0x6c, 0x00, 0x00, 0x00}},
!  {0xffff,	0,	{0x00} }
  };
--- 276,280 ----
    0x00, 0x01, 0x04, 0x03, 0x09, 0x04, 0x10, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73}},
   {0x0fc6, 23, { 0x00, 0x70, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x0e, 0x03, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00,
    0x61, 0x00, 0x6c, 0x00, 0x00, 0x00}},
! { 0xffff,	0,	{0x00} }
  };
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial$B$@$1$KH/8+(B: keyspan_usa19qi_fw.h
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial$B$@$1$KH/8+(B: keyspan_usa19qw_fw.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa19w_fw.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa19w_fw.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa19w_fw.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa19w_fw.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,112 ****
  /* keyspan_usa19w_fw.h
  
! 	The firmware contained herein as keyspan_usa19w_fw.h is
  
! 		Copyright (C) 1999-2001
! 		Keyspan, A division of InnoSys Incorporated ("Keyspan")
! 		
! 	as an unpublished work. This notice does not imply unrestricted or
! 	public access to the source code from which this firmware image is
! 	derived.  Except as noted below this firmware image may not be 
! 	reproduced, used, sold or transferred to any third party without 
! 	Keyspan's prior written consent.  All Rights Reserved.
  
- 	Permission is hereby granted for the distribution of this firmware 
- 	image as part of a Linux or other Open Source operating system kernel 
- 	in text or binary form as required. 
- 
- 	This firmware may not be modified and may only be used with  
- 	Keyspan hardware.  Distribution and/or Modification of the 
- 	keyspan.c driver which includes this firmware, in whole or in 
- 	part, requires the inclusion of this statement."
  */
  
  static const struct ezusb_hex_record keyspan_usa19w_firmware[] = {
!  {0x0033,  3, { 0x02, 0x0d, 0x5c}},
   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x17, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
!  {0x0046, 16, { 0x30, 0x0f, 0x18, 0x12, 0x0d, 0x38, 0xef, 0xc3, 0x95, 0x14, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x0f, 0xc2, 0x0a, 0x80, 0x77, 0x30, 0x0c, 0x3b, 0x90, 0x7f}},
!  {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x0d, 0x38, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x0f, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x1c, 0x20, 0x0a, 0x11, 0x60}},
!  {0x0086, 16, { 0x0f, 0xf5, 0x23, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x41, 0x12, 0x08, 0x01}},
   {0x0096, 16, { 0xc2, 0x0c, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
!  {0x00a6, 16, { 0x12, 0x0d, 0x38, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0f}},
   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x1c, 0x20, 0x0a, 0x11, 0x60, 0x0f, 0xf5, 0x23, 0x7e, 0x7d}},
!  {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x27, 0x7d, 0x75, 0x28, 0xc1, 0x12, 0x08, 0x01, 0xd2, 0x0c, 0xe4, 0x90, 0x7f}},
!  {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x5e, 0x12, 0x0c, 0x41, 0x8f}},
!  {0x00e6, 16, { 0x1c, 0x12, 0x0d, 0x44, 0x8f, 0x11, 0xe5, 0x1c, 0xc3, 0x95, 0x13, 0x50, 0x0f, 0x12, 0x0d, 0x20}},
!  {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x11, 0x20, 0xe7, 0x03, 0x30, 0x12, 0x5c, 0xc2, 0x12, 0xe5, 0x1c}},
   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
   {0x0043,  3, { 0x02, 0x0e, 0x00}},
!  {0x0000,  3, { 0x02, 0x08, 0xb6}},
!  {0x0106, 64, { 0x60, 0x56, 0xb4, 0x80, 0x03, 0x43, 0x11, 0x02, 0xe5, 0x11, 0x30, 0xe7, 0x24, 0xe5, 0x1c, 0xd3, 0x94,
!   0x20, 0x40, 0x03, 0x75, 0x1c, 0x20, 0x85, 0x1c, 0x23, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x27, 0x7e,
!   0x75, 0x28, 0x80, 0x12, 0x0a, 0x86, 0xe5, 0x1c, 0x25, 0x1c, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x27,
!   0xe5, 0x1c, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x1c, 0x3f, 0x85, 0x1c, 0x23, 0x90, 0x7e}},
!  {0x0146, 64, { 0x80, 0xe5, 0x11, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x81, 0x12, 0x08, 0x26,
!   0xe5, 0x1c, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x0d,
!   0x03, 0x02, 0x03, 0xba, 0xe4, 0xf5, 0x1b, 0x74, 0x40, 0x25, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0x7c,
!   0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x1b, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24}},
!  {0x0186, 64, { 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0a, 0x0d, 0x05, 0x1b, 0xe5, 0x1b, 0xb4, 0x20, 0xd7,
!   0x90, 0x7e, 0x00, 0xe0, 0x60, 0x6e, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x0c, 0x1c,
!   0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x0b, 0x5e, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x0b, 0x84,
!   0xd2, 0x10, 0xd2, 0x11, 0x75, 0x1c, 0x04, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x05, 0xc2, 0x11}},
!  {0x01c6, 64, { 0x43, 0x1c, 0xc0, 0x90, 0x7e, 0x04, 0xe0, 0xb4, 0x01, 0x07, 0xc2, 0x11, 0x43, 0x1c, 0x0b, 0x80, 0x10,
!   0x90, 0x7e, 0x04, 0xe0, 0x60, 0x07, 0xc2, 0x10, 0x43, 0x1c, 0x09, 0x80, 0x03, 0x43, 0x1c, 0x02,
!   0x7f, 0x03, 0xad, 0x1c, 0x12, 0x0c, 0x1c, 0x43, 0x19, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
!   0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x16, 0x44}},
!  {0x0206, 64, { 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x18,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x18, 0xf0, 0x90, 0x7e, 0x07, 0xe0,
!   0x60, 0x42, 0x90, 0x7e, 0x13, 0xe0, 0x60, 0x05, 0x43, 0x15, 0x04, 0x80, 0x03, 0x53, 0x15, 0xfb,
!   0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0x90, 0x7e, 0x08, 0xe0, 0x60, 0x05, 0x43, 0x17}},
!  {0x0246, 64, { 0x80, 0x80, 0x03, 0x53, 0x17, 0x7f, 0x53, 0x17, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x17,
!   0x02, 0xa3, 0xe0, 0xff, 0x12, 0x0b, 0xd0, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x0b, 0xf6, 0xaf,
!   0x17, 0x12, 0x0b, 0xaa, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19,
!   0x01, 0x80, 0x03, 0x53, 0x19, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00}},
!  {0x0286, 64, { 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19, 0x02, 0x80,
!   0x03, 0x53, 0x19, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0,
!   0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x13, 0xa3, 0xe0, 0x13, 0x92, 0x13, 0xa3, 0xe0, 0xf5, 0x14, 0xa3,
!   0xe0, 0x60, 0x05, 0x43, 0x19, 0x10, 0x80, 0x03, 0x53, 0x19, 0xef, 0x90, 0x7f, 0x98, 0x74}},
!  {0x02c6, 64, { 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x18, 0xbf,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x11, 0xf0, 0x12, 0x0d, 0x14, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x15,
!   0xfd, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0xe4, 0xf5, 0x0e, 0xf5, 0x0d, 0xd2, 0x0e}},
!  {0x0306, 64, { 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x15, 0x02, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0x75,
!   0x0d, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0,
!   0xe5, 0x16, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x0a, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11,
!   0x43, 0x18, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0}},
!  {0x0346, 64, { 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x15, 0xfe, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c,
!   0x1c, 0x75, 0x0f, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x15, 0x01, 0xe4,
!   0xff, 0xad, 0x15, 0x12, 0x0c, 0x1c, 0xe4, 0xf5, 0x0f, 0xd2, 0x0e, 0x90, 0x7e, 0x1c, 0xe0, 0x60,
!   0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x16, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0}},
!  {0x0386, 64, { 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x12, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x10, 0x01,
!   0xe4, 0xf5, 0x12, 0xd2, 0x0e, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11,
!   0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xd2, 0x0c, 0xc2, 0x0d, 0xe4, 0x90,
    0x7f, 0xcf, 0xf0, 0x30, 0x15, 0x71, 0xe5, 0x12, 0x60, 0x02, 0x15, 0x12, 0xe5, 0x2e, 0xd3}},
!  {0x03c6, 64, { 0x94, 0x00, 0x40, 0x04, 0x15, 0x2e, 0x80, 0x60, 0x75, 0x2e, 0x0a, 0x12, 0x0d, 0x14, 0xef, 0x54, 0x01,
!   0xf5, 0x1c, 0x65, 0x0e, 0x60, 0x07, 0x85, 0x1c, 0x0e, 0xd2, 0x0e, 0x80, 0x11, 0x12, 0x0d, 0x50,
    0xef, 0x54, 0x10, 0xf5, 0x1c, 0x65, 0x09, 0x60, 0x05, 0x85, 0x1c, 0x09, 0xd2, 0x0e, 0x12, 0x0d,
!   0x50, 0xef, 0x54, 0x80, 0xf5, 0x1c, 0x65, 0x0a, 0x60, 0x05, 0x85, 0x1c, 0x0a, 0xd2, 0x0e}},
!  {0x0406, 64, { 0x12, 0x0d, 0x50, 0xef, 0x54, 0x20, 0xf5, 0x1c, 0x65, 0x0b, 0x60, 0x08, 0x85, 0x1c, 0x0b, 0x30, 0x10,
!   0x02, 0xd2, 0x0e, 0x12, 0x0d, 0x50, 0xef, 0x54, 0x40, 0xf5, 0x1c, 0x65, 0x0c, 0x60, 0x08, 0x85,
    0x1c, 0x0c, 0x30, 0x11, 0x02, 0xd2, 0x0e, 0x30, 0x15, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1,
    0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x30, 0x90, 0x7b, 0x42, 0xe0, 0xf5}},
   {0x0446, 64, { 0x31, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4,
    0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05, 0x1f, 0xe5, 0x25,
    0x70, 0x40, 0x30, 0x0e, 0x39, 0xe5, 0x12, 0x70, 0x35, 0xc2, 0x0e, 0xf5, 0x1b, 0x7e, 0x00, 0x7b,
!   0x00, 0x74, 0x08, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xc7, 0xff, 0x74}},
   {0x0486, 64, { 0x80, 0x25, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5, 0x1b, 0xb4,
    0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x12, 0x10, 0xe4, 0xf5, 0x10, 0x75, 0x25,
    0x02, 0x22, 0xe5, 0x25, 0x64, 0x02, 0x70, 0x36, 0x30, 0x05, 0x2f, 0xc2, 0x05, 0xf5, 0x1b, 0x7e,
!   0x00, 0x7b, 0x00, 0x74, 0x29, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xc7}},
   {0x04c6, 64, { 0xff, 0x74, 0x80, 0x25, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5,
    0x1b, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x25, 0x03, 0x22, 0xe5, 0x30,
    0x60, 0x33, 0x75, 0x2f, 0x03, 0x15, 0x30, 0xe4, 0xf5, 0x1b, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2f,
!   0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xc7, 0xff, 0x74, 0x80, 0x25, 0x1b}},
   {0x0506, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5, 0x1b, 0xb4, 0x03, 0xdb, 0x90,
!   0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x25, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0a, 0x1f,
    0x05, 0xf6, 0x00, 0x06, 0x6a, 0x01, 0x06, 0xd7, 0x03, 0x05, 0x43, 0x06, 0x05, 0xe9, 0x08, 0x05,
    0xe3, 0x09, 0x05, 0xcb, 0x0a, 0x05, 0xda, 0x0b, 0x00, 0x00, 0x07, 0x27, 0x90, 0x7f, 0xeb}},
   {0x0546, 64, { 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x50, 0x24, 0x02, 0x70, 0x6f, 0x74, 0x19, 0x90, 0x7f, 0xd4,
--- 1,108 ----
  /* keyspan_usa19w_fw.h
+   
+    Generated from Keyspan firmware image usa17code.h Sat Oct  6 12:13:03 EST 2001
+    This firmware is for the Keyspan USA-19W Serial Adaptor
  
!    "The firmware contained herein as keyspan_usa19w_fw.h is
!    Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
!    ("Keyspan"), as an unpublished work.  This notice does not imply
!    unrestricted or public access to this firmware which is a trade secret of
!    Keyspan, and which may not be reproduced, used, sold or transferred to any
!    third party without Keyspan's prior written consent.  All Rights Reserved.
  
!    This firmware may not be modified and may only be used with the Keyspan 
!    USA-19W Serial Adapter.  Distribution and/or Modification of the
!    keyspan.c driver which includes this firmware, in whole or in part,
!    requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa19w_firmware[] = {
!  {0x0033,  3, { 0x02, 0x0d, 0x6c}},
   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x17, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
!  {0x0046, 16, { 0x30, 0x0f, 0x18, 0x12, 0x0d, 0x48, 0xef, 0xc3, 0x95, 0x14, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x0f, 0xc2, 0x0a, 0x80, 0x77, 0x30, 0x0c, 0x3b, 0x90, 0x7f}},
!  {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x0d, 0x48, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x0f, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x1c, 0x20, 0x0a, 0x11, 0x60}},
!  {0x0086, 16, { 0x0f, 0xf5, 0x23, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x41, 0x12, 0x08, 0x05}},
   {0x0096, 16, { 0xc2, 0x0c, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
!  {0x00a6, 16, { 0x12, 0x0d, 0x48, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x0f}},
   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x1c, 0x20, 0x0a, 0x11, 0x60, 0x0f, 0xf5, 0x23, 0x7e, 0x7d}},
!  {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x27, 0x7d, 0x75, 0x28, 0xc1, 0x12, 0x08, 0x05, 0xd2, 0x0c, 0xe4, 0x90, 0x7f}},
!  {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x53, 0x11, 0x80, 0x12}},
!  {0x00e6, 16, { 0x0d, 0x54, 0xef, 0x42, 0x11, 0x12, 0x0c, 0x51, 0x8f, 0x1c, 0xef, 0xc3, 0x95, 0x13, 0x50, 0x0f}},
!  {0x00f6, 16, { 0x12, 0x0d, 0x30, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x11, 0x20, 0xe7, 0x03, 0x30, 0x12, 0x5b, 0xc2}},
   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
   {0x0043,  3, { 0x02, 0x0e, 0x00}},
!  {0x0000,  3, { 0x02, 0x08, 0xba}},
!  {0x0106, 64, { 0x12, 0xe5, 0x1c, 0x70, 0x04, 0xf5, 0x11, 0x80, 0x51, 0xe5, 0x11, 0x30, 0xe7, 0x26, 0xe5, 0x1c, 0xd3,
!   0x94, 0x20, 0x40, 0x03, 0x75, 0x1c, 0x20, 0x85, 0x1c, 0x23, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x27,
!   0x7e, 0x75, 0x28, 0x80, 0xaf, 0x11, 0x12, 0x0a, 0x8a, 0xe5, 0x1c, 0x25, 0xe0, 0x90, 0x7f, 0xb7,
!   0xf0, 0x80, 0x26, 0xe5, 0x1c, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x1c, 0x3f, 0x85, 0x1c}},
!  {0x0146, 64, { 0x23, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x27, 0x7e, 0x75, 0x28, 0x81, 0x12,
!   0x08, 0x2a, 0xe5, 0x1c, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
!   0x20, 0x0d, 0x03, 0x02, 0x03, 0xba, 0xe4, 0xf5, 0x1b, 0x74, 0x40, 0x25, 0x1b, 0xf5, 0x82, 0xe4,
!   0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x1b, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79}},
!  {0x0186, 64, { 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0a, 0x11, 0x05, 0x1b, 0xe5, 0x1b, 0xb4,
!   0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x6e, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12,
!   0x0c, 0x2c, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x0b, 0x6e, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12,
!   0x0b, 0x94, 0xd2, 0x10, 0xd2, 0x11, 0x75, 0x1c, 0x04, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x05}},
!  {0x01c6, 64, { 0xc2, 0x11, 0x43, 0x1c, 0xc0, 0x90, 0x7e, 0x04, 0xe0, 0xb4, 0x01, 0x07, 0xc2, 0x11, 0x43, 0x1c, 0x0b,
!   0x80, 0x10, 0x90, 0x7e, 0x04, 0xe0, 0x60, 0x07, 0xc2, 0x10, 0x43, 0x1c, 0x09, 0x80, 0x03, 0x43,
!   0x1c, 0x02, 0x7f, 0x03, 0xad, 0x1c, 0x12, 0x0c, 0x2c, 0x43, 0x19, 0x80, 0x90, 0x7f, 0x98, 0x74,
!   0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5}},
!  {0x0206, 64, { 0x16, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
!   0xf5, 0x18, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x18, 0xf0, 0x90, 0x7e,
!   0x07, 0xe0, 0x60, 0x42, 0x90, 0x7e, 0x13, 0xe0, 0x60, 0x05, 0x43, 0x15, 0x04, 0x80, 0x03, 0x53,
!   0x15, 0xfb, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x2c, 0x90, 0x7e, 0x08, 0xe0, 0x60, 0x05}},
!  {0x0246, 64, { 0x43, 0x17, 0x80, 0x80, 0x03, 0x53, 0x17, 0x7f, 0x53, 0x17, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11,
!   0x43, 0x17, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x0b, 0xe0, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x0c,
!   0x06, 0xaf, 0x17, 0x12, 0x0b, 0xba, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05,
!   0x43, 0x19, 0x01, 0x80, 0x03, 0x53, 0x19, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90}},
!  {0x0286, 64, { 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19,
!   0x02, 0x80, 0x03, 0x53, 0x19, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5,
!   0x19, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x13, 0xa3, 0xe0, 0x13, 0x92, 0x13, 0xa3, 0xe0, 0xf5,
!   0x14, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x19, 0x10, 0x80, 0x03, 0x53, 0x19, 0xef, 0x90, 0x7f}},
!  {0x02c6, 64, { 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x19, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53,
!   0x18, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x0d, 0x24, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0,
!   0x53, 0x15, 0xfd, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x2c, 0xe4, 0xf5, 0x0e, 0xf5, 0x0d}},
!  {0x0306, 64, { 0xd2, 0x0e, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x15, 0x02, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c,
!   0x2c, 0x75, 0x0d, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74,
!   0x12, 0xf0, 0xe5, 0x16, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x0a, 0x90, 0x7e, 0x19, 0xe0,
!   0x60, 0x11, 0x43, 0x18, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f}},
!  {0x0346, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x15, 0xfe, 0xe4, 0xff, 0xad, 0x15,
!   0x12, 0x0c, 0x2c, 0x75, 0x0f, 0x01, 0xd2, 0x0e, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x15,
!   0x01, 0xe4, 0xff, 0xad, 0x15, 0x12, 0x0c, 0x2c, 0xe4, 0xf5, 0x0f, 0xd2, 0x0e, 0x90, 0x7e, 0x1c,
!   0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x16, 0x44, 0x02, 0x90, 0xc0}},
!  {0x0386, 64, { 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x12, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75,
!   0x10, 0x01, 0xe4, 0xf5, 0x12, 0xd2, 0x0e, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7,
!   0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xc2, 0x0d, 0xe4, 0x90,
    0x7f, 0xcf, 0xf0, 0x30, 0x15, 0x71, 0xe5, 0x12, 0x60, 0x02, 0x15, 0x12, 0xe5, 0x2e, 0xd3}},
!  {0x03c6, 64, { 0x94, 0x00, 0x40, 0x04, 0x15, 0x2e, 0x80, 0x60, 0x75, 0x2e, 0x0a, 0x12, 0x0d, 0x24, 0xef, 0x54, 0x01,
!   0xf5, 0x1c, 0x65, 0x0e, 0x60, 0x07, 0x85, 0x1c, 0x0e, 0xd2, 0x0e, 0x80, 0x11, 0x12, 0x0d, 0x60,
    0xef, 0x54, 0x10, 0xf5, 0x1c, 0x65, 0x09, 0x60, 0x05, 0x85, 0x1c, 0x09, 0xd2, 0x0e, 0x12, 0x0d,
!   0x60, 0xef, 0x54, 0x80, 0xf5, 0x1c, 0x65, 0x0a, 0x60, 0x05, 0x85, 0x1c, 0x0a, 0xd2, 0x0e}},
!  {0x0406, 64, { 0x12, 0x0d, 0x60, 0xef, 0x54, 0x20, 0xf5, 0x1c, 0x65, 0x0b, 0x60, 0x08, 0x85, 0x1c, 0x0b, 0x30, 0x10,
!   0x02, 0xd2, 0x0e, 0x12, 0x0d, 0x60, 0xef, 0x54, 0x40, 0xf5, 0x1c, 0x65, 0x0c, 0x60, 0x08, 0x85,
    0x1c, 0x0c, 0x30, 0x11, 0x02, 0xd2, 0x0e, 0x30, 0x15, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1,
    0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x30, 0x90, 0x7b, 0x42, 0xe0, 0xf5}},
   {0x0446, 64, { 0x31, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4,
    0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05, 0x1f, 0xe5, 0x25,
    0x70, 0x40, 0x30, 0x0e, 0x39, 0xe5, 0x12, 0x70, 0x35, 0xc2, 0x0e, 0xf5, 0x1b, 0x7e, 0x00, 0x7b,
!   0x00, 0x74, 0x08, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xcb, 0xff, 0x74}},
   {0x0486, 64, { 0x80, 0x25, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5, 0x1b, 0xb4,
    0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x12, 0x10, 0xe4, 0xf5, 0x10, 0x75, 0x25,
    0x02, 0x22, 0xe5, 0x25, 0x64, 0x02, 0x70, 0x36, 0x30, 0x05, 0x2f, 0xc2, 0x05, 0xf5, 0x1b, 0x7e,
!   0x00, 0x7b, 0x00, 0x74, 0x29, 0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xcb}},
   {0x04c6, 64, { 0xff, 0x74, 0x80, 0x25, 0x1b, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5,
    0x1b, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x25, 0x03, 0x22, 0xe5, 0x30,
    0x60, 0x33, 0x75, 0x2f, 0x03, 0x15, 0x30, 0xe4, 0xf5, 0x1b, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2f,
!   0x25, 0x1b, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x09, 0xcb, 0xff, 0x74, 0x80, 0x25, 0x1b}},
   {0x0506, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x1b, 0xe5, 0x1b, 0xb4, 0x03, 0xdb, 0x90,
!   0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x25, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0a, 0x23,
    0x05, 0xf6, 0x00, 0x06, 0x6a, 0x01, 0x06, 0xd7, 0x03, 0x05, 0x43, 0x06, 0x05, 0xe9, 0x08, 0x05,
    0xe3, 0x09, 0x05, 0xcb, 0x0a, 0x05, 0xda, 0x0b, 0x00, 0x00, 0x07, 0x27, 0x90, 0x7f, 0xeb}},
   {0x0546, 64, { 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x50, 0x24, 0x02, 0x70, 0x6f, 0x74, 0x19, 0x90, 0x7f, 0xd4,
***************
*** 114,120 ****
    0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82,
    0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea}},
   {0x0586, 64, { 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12,
!   0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0a, 0x45, 0xea,
    0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x2e,
    0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xb4, 0xe0, 0x44}},
   {0x05c6, 64, { 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0x00, 0xe5, 0x24, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0,
--- 110,116 ----
    0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82,
    0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea}},
   {0x0586, 64, { 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12,
!   0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0a, 0x49, 0xea,
    0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x07, 0x2e,
    0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xb4, 0xe0, 0x44}},
   {0x05c6, 64, { 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0x00, 0xe5, 0x24, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0,
***************
*** 128,141 ****
   {0x0646, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0,
    0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0,
    0x02, 0x07, 0x2e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1e, 0x24, 0x02, 0x60, 0x03, 0x02,
!   0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x06, 0x12, 0x0d, 0x63, 0x02, 0x07, 0x2e}},
   {0x0686, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90,
    0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
    0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0,
    0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f}},
   {0x06c6, 64, { 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x60, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x57,
    0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x24, 0x02, 0x70, 0x4b, 0x90, 0x7f, 0xea, 0xe0,
!   0xb4, 0x01, 0x05, 0x12, 0x0d, 0x60, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
    0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff}},
   {0x0706, 64, { 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
    0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
--- 124,137 ----
   {0x0646, 64, { 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0,
    0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0,
    0x02, 0x07, 0x2e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1e, 0x24, 0x02, 0x60, 0x03, 0x02,
!   0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x06, 0x12, 0x0d, 0x73, 0x02, 0x07, 0x2e}},
   {0x0686, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x07, 0x2e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90,
    0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
    0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0,
    0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f}},
   {0x06c6, 64, { 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x60, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x57,
    0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x24, 0x02, 0x70, 0x4b, 0x90, 0x7f, 0xea, 0xe0,
!   0xb4, 0x01, 0x05, 0x12, 0x0d, 0x70, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
    0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff}},
   {0x0706, 64, { 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
    0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
***************
*** 144,245 ****
   {0x0746, 64, { 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
    0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
    0x08, 0x7f, 0x01, 0x7b, 0x00, 0x74, 0x08, 0x2f, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0a,
!   0x0d, 0x0f, 0xbf, 0x09, 0xee, 0x75, 0x13, 0x01, 0xe4, 0xf5, 0x12, 0xf5, 0x2e, 0xf5, 0x11}},
!  {0x0786, 64, { 0xc2, 0x0e, 0xc2, 0x12, 0xc2, 0x0d, 0xc2, 0x0a, 0xc2, 0x0f, 0xc2, 0x04, 0x90, 0x7f, 0x98, 0x74, 0x13,
!   0xf0, 0x75, 0x18, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x0c,
!   0x1c, 0x7f, 0x10, 0x8f, 0x17, 0x12, 0x0b, 0xaa, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01,
!   0x8f, 0x16, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x0c, 0x1c}},
!  {0x07c6, 64, { 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x15, 0x12, 0x0c, 0x1c, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0,
!   0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x0c, 0x1c, 0x7f, 0x01, 0x12, 0x0c,
!   0xac, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x0c, 0x1c, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x75, 0x19,
!   0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0xd2, 0x03, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10}},
!  {0x0806, 64, { 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0,
!   0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90,
!   0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2,
!   0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7}},
!  {0x0846, 64, { 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82,
!   0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05,
!   0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf,
!   0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0}},
!  {0x0886, 64, { 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00,
!   0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90,
!   0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x78,
!   0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x31, 0x02, 0x08, 0xfd, 0x02, 0x09, 0x42, 0xe4}},
!  {0x08c6, 64, { 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29,
!   0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20,
!   0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02,
!   0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0c, 0xcd, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc}},
!  {0x0906, 64, { 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf,
!   0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8,
!   0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82,
!   0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xd2, 0x14, 0x90, 0x7f}},
!  {0x0946, 64, { 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x0d, 0x63, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74,
!   0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0,
!   0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f,
!   0xae, 0x74, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x15, 0x12, 0x0c, 0x66, 0xc2, 0x02, 0xe4, 0xf5}},
!  {0x0986, 64, { 0x26, 0xf5, 0x2e, 0xc2, 0x08, 0xc2, 0x03, 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65,
!   0x1a, 0x60, 0x10, 0x30, 0x03, 0x05, 0xd2, 0x15, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5,
!   0x1a, 0x80, 0x08, 0x30, 0x03, 0x05, 0xc2, 0x15, 0x12, 0x00, 0x46, 0x30, 0x02, 0x07, 0xc2, 0x02,
!   0x12, 0x05, 0x20, 0x80, 0xd6, 0x30, 0x09, 0xd3, 0xc2, 0x09, 0x12, 0x0a, 0xba, 0x80, 0xcc}},
!  {0x09c6, 64, { 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02,
!   0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5,
!   0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22,
!   0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5}},
!  {0x0a06, 64, { 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50,
!   0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70,
!   0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88,
!   0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x8f}},
!  {0x0a46, 64, { 0x1b, 0xe4, 0xf5, 0x1c, 0x75, 0x1d, 0xff, 0x75, 0x1e, 0x19, 0x75, 0x1f, 0x86, 0xab, 0x1d, 0xaa, 0x1e,
!   0xa9, 0x1f, 0x90, 0x00, 0x01, 0x12, 0x09, 0xe0, 0xb4, 0x03, 0x1d, 0xaf, 0x1c, 0x05, 0x1c, 0xef,
!   0xb5, 0x1b, 0x01, 0x22, 0x12, 0x09, 0xc7, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75,
!   0x1d, 0xff, 0xf5, 0x1e, 0x89, 0x1f, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x22}},
!  {0x0a86, 64, { 0x05, 0x28, 0xe5, 0x28, 0xae, 0x27, 0x70, 0x02, 0x05, 0x27, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x11,
!   0xf0, 0x12, 0x00, 0x36, 0x05, 0x28, 0xe5, 0x28, 0xac, 0x27, 0x70, 0x02, 0x05, 0x27, 0x14, 0xf5,
!   0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x23, 0xe5, 0x23, 0x60, 0x07, 0x12, 0x0d, 0x44, 0x8f, 0x11,
!   0x80, 0xcd, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1b, 0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6}},
!  {0x0ac6, 64, { 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x08, 0xa6, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0e, 0x30, 0x01, 0x05,
!   0x12, 0x0c, 0xfe, 0x80, 0x06, 0x12, 0x0c, 0x8b, 0xef, 0x60, 0xe1, 0x12, 0x07, 0x36, 0x22, 0xc0,
!   0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f,
!   0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0}},
!  {0x0b06, 64, { 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0,
!   0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x02, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
!   0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
!   0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00}},
!  {0x0b46, 64, { 0xd2, 0x09, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85,
    0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00,
!   0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f}},
!  {0x0b86, 64, { 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90,
    0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0,
!   0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13}},
!  {0x0bc6, 64, { 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90,
    0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
!   0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74}},
!  {0x0c06, 64, { 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f,
    0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90,
!   0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x0d, 0x2c, 0x8f, 0x1d}},
!  {0x0c46, 64, { 0x12, 0x0d, 0x2c, 0x8f, 0x1e, 0xe5, 0x1d, 0x65, 0x1e, 0x60, 0x12, 0x12, 0x0d, 0x2c, 0x8f, 0x1d, 0xe5,
!   0x1d, 0x65, 0x1e, 0x60, 0x07, 0x12, 0x0d, 0x2c, 0x8f, 0x1e, 0x80, 0xe8, 0xaf, 0x1d, 0x22, 0x90,
!   0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x15, 0x04, 0xe0, 0x44, 0x02,
!   0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0c, 0xe7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0}},
!  {0x0c86, 64, { 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1c, 0x12, 0x07, 0x36, 0x12, 0x0d, 0x50,
    0xef, 0x30, 0xe6, 0x0b, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x1c, 0x60, 0xf1, 0x7f, 0x01, 0x22, 0x12,
!   0x00, 0x03, 0x7f, 0x00, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x15, 0x54, 0x7f, 0xfd, 0x12, 0x0c,
!   0x1c, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x15}},
!  {0x0cc6, 64, { 0x44, 0x80, 0xfd, 0x12, 0x0c, 0x1c, 0x22, 0x05, 0x29, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x2f, 0x03,
    0x00, 0x00, 0xc1, 0x86, 0xc1, 0x02, 0xc1, 0x09, 0xc1, 0x01, 0xc1, 0x07, 0x01, 0x25, 0x00, 0x00,
!   0x8e, 0x1c, 0x8f, 0x1d, 0xe5, 0x1d, 0x15, 0x1d, 0xae, 0x1c, 0x70, 0x02, 0x15, 0x1c, 0x4e, 0x60,
!   0x05, 0x12, 0x08, 0x95, 0x80, 0xee, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f}},
!  {0x0d06, 64, { 0x0d, 0x7e, 0x00, 0x12, 0x0c, 0xe7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x7f, 0x98,
    0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90,
!   0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
!   0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f}},
!  {0x0d46, 64, { 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
    0xc0, 0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0xd2, 0x01, 0x22, 0xc2, 0x01, 0x22, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
   {0x0d86, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--- 140,241 ----
   {0x0746, 64, { 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
    0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
    0x08, 0x7f, 0x01, 0x7b, 0x00, 0x74, 0x08, 0x2f, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0a,
!   0x11, 0x0f, 0xbf, 0x09, 0xee, 0x75, 0x13, 0x01, 0xe4, 0xf5, 0x12, 0xf5, 0x2e, 0xf5, 0x11}},
!  {0x0786, 64, { 0xc2, 0x0e, 0xc2, 0x12, 0xc2, 0x0d, 0xc2, 0x0a, 0xc2, 0x0f, 0xc2, 0x04, 0xd2, 0x0c, 0xd2, 0x0b, 0x90,
!   0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x18, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c,
!   0xe4, 0xfd, 0x12, 0x0c, 0x2c, 0x7f, 0x10, 0x8f, 0x17, 0x12, 0x0b, 0xba, 0x90, 0x7f, 0x98, 0x74,
!   0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x16, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
!  {0x07c6, 64, { 0x98, 0x74, 0x14, 0xf0, 0x75, 0x19, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
!   0x0c, 0x2c, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x15, 0x12, 0x0c, 0x2c, 0x90, 0x7f, 0x98,
!   0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x0c, 0x2c, 0x7f,
!   0x01, 0x12, 0x0c, 0xbc, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x0c, 0x2c, 0xd2, 0x03, 0x22, 0x90}},
!  {0x0806, 64, { 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf,
!   0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7,
!   0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5,
!   0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3}},
!  {0x0846, 64, { 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x23,
!   0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05,
!   0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98,
!   0x74, 0x08, 0xf0, 0xaf, 0x23, 0xe5, 0x28, 0xf5, 0x82, 0xe5, 0x27, 0xf5, 0x83, 0xc2, 0xaf}},
!  {0x0886, 64, { 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2,
!   0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83,
!   0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x31, 0x02, 0x09, 0x01}},
!  {0x08c6, 64, { 0x02, 0x09, 0x46, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08,
!   0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4,
!   0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4,
!   0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0c, 0xdd, 0xe4, 0x7e}},
!  {0x0906, 64, { 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3,
!   0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa,
!   0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0,
!   0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe}},
!  {0x0946, 64, { 0xd2, 0x14, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x12, 0x0d, 0x73, 0xd2, 0xe8, 0x43, 0xd8, 0x20,
!   0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0,
!   0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44,
!   0x01, 0xf0, 0x90, 0x7f, 0xae, 0x74, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x15, 0x12, 0x0c, 0x76}},
!  {0x0986, 64, { 0xc2, 0x02, 0xe4, 0xf5, 0x26, 0xf5, 0x2e, 0xc2, 0x08, 0xc2, 0x03, 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90,
!   0x7f, 0xd8, 0xe0, 0x65, 0x1a, 0x60, 0x10, 0x30, 0x03, 0x05, 0xd2, 0x15, 0x12, 0x00, 0x46, 0x90,
!   0x7f, 0xd8, 0xe0, 0xf5, 0x1a, 0x80, 0x08, 0x30, 0x03, 0x05, 0xc2, 0x15, 0x12, 0x00, 0x46, 0x30,
!   0x02, 0x07, 0xc2, 0x02, 0x12, 0x05, 0x20, 0x80, 0xd6, 0x30, 0x09, 0xd3, 0xc2, 0x09, 0x12}},
!  {0x09c6, 64, { 0x0a, 0xf1, 0x80, 0xcc, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7,
!   0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c,
!   0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25,
!   0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82}},
!  {0x0a06, 64, { 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a,
!   0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82,
!   0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01,
!   0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3}},
!  {0x0a46, 64, { 0xa3, 0x80, 0xdf, 0x8f, 0x1b, 0xe4, 0xf5, 0x1c, 0x75, 0x1d, 0xff, 0x75, 0x1e, 0x19, 0x75, 0x1f, 0x86,
!   0xab, 0x1d, 0xaa, 0x1e, 0xa9, 0x1f, 0x90, 0x00, 0x01, 0x12, 0x09, 0xe4, 0xb4, 0x03, 0x1d, 0xaf,
!   0x1c, 0x05, 0x1c, 0xef, 0xb5, 0x1b, 0x01, 0x22, 0x12, 0x09, 0xcb, 0x7e, 0x00, 0x29, 0xff, 0xee,
!   0x3a, 0xa9, 0x07, 0x75, 0x1d, 0xff, 0xf5, 0x1e, 0x89, 0x1f, 0x80, 0xd4, 0x7b, 0x00, 0x7a}},
!  {0x0a86, 64, { 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1d, 0x05, 0x28, 0xe5, 0x28, 0xae, 0x27, 0x70, 0x02, 0x05, 0x27, 0x14,
!   0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1d, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x28, 0xe5, 0x28, 0xac, 0x27,
!   0x70, 0x02, 0x05, 0x27, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x23, 0xe5, 0x23, 0x60,
!   0x0a, 0x12, 0x0d, 0x54, 0x8f, 0x1d, 0xef, 0x42, 0x11, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0}},
!  {0x0ac6, 64, { 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x06, 0x04, 0xc2, 0x06,
!   0x80, 0x02, 0xd2, 0x09, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0,
!   0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1b,
!   0x12, 0x00, 0x03, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x12, 0x08, 0xaa, 0x90, 0x7f}},
!  {0x0b06, 64, { 0xd6, 0xe0, 0x30, 0xe7, 0x0e, 0x30, 0x01, 0x05, 0x12, 0x0d, 0x0e, 0x80, 0x06, 0x12, 0x0c, 0x9b, 0xef,
!   0x60, 0xe1, 0x12, 0x07, 0x36, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
!   0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
!   0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0}},
!  {0x0b46, 64, { 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2,
!   0x02, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85,
    0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00,
!   0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90}},
!  {0x0b86, 64, { 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
!   0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90,
    0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0,
!   0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0}},
!  {0x0bc6, 64, { 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
!   0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90,
    0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22}},
!  {0x0c06, 64, { 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16,
!   0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f,
    0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x18, 0x54, 0x7f, 0x90,
!   0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90}},
!  {0x0c46, 64, { 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x0d, 0x3c, 0x8f, 0x1d, 0x12,
!   0x0d, 0x3c, 0x8f, 0x1e, 0xe5, 0x1d, 0x65, 0x1e, 0x60, 0x12, 0x12, 0x0d, 0x3c, 0x8f, 0x1d, 0xe5,
!   0x1d, 0x65, 0x1e, 0x60, 0x07, 0x12, 0x0d, 0x3c, 0x8f, 0x1e, 0x80, 0xe8, 0xaf, 0x1d, 0x22, 0x90,
!   0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x15, 0x04, 0xe0, 0x44}},
!  {0x0c86, 64, { 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0c, 0xf7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0,
!   0x44, 0x04, 0xf0, 0x22, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x1c, 0x12, 0x07, 0x36, 0x12, 0x0d, 0x60,
    0xef, 0x30, 0xe6, 0x0b, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x1c, 0x60, 0xf1, 0x7f, 0x01, 0x22, 0x12,
!   0x00, 0x03, 0x7f, 0x00, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x15, 0x54, 0x7f, 0xfd, 0x12}},
!  {0x0cc6, 64, { 0x0c, 0x2c, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x15, 0x44,
!   0x80, 0xfd, 0x12, 0x0c, 0x2c, 0x22, 0x05, 0x29, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x2f, 0x03,
    0x00, 0x00, 0xc1, 0x86, 0xc1, 0x02, 0xc1, 0x09, 0xc1, 0x01, 0xc1, 0x07, 0x01, 0x25, 0x00, 0x00,
!   0x8e, 0x1c, 0x8f, 0x1d, 0xe5, 0x1d, 0x15, 0x1d, 0xae, 0x1c, 0x70, 0x02, 0x15, 0x1c, 0x4e}},
!  {0x0d06, 64, { 0x60, 0x05, 0x12, 0x08, 0x99, 0x80, 0xee, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d,
!   0x7e, 0x00, 0x12, 0x0c, 0xf7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x7f, 0x98,
    0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90,
!   0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0}},
!  {0x0d46, 64, { 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
!   0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
    0xc0, 0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0xd2, 0x01, 0x22, 0xc2, 0x01, 0x22, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
   {0x0d86, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
***************
*** 248,255 ****
   {0x0dc6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0b, 0x10, 0x00, 0x02, 0x0e}},
!  {0x0e06, 64, { 0x04, 0x00, 0x02, 0x0a, 0xe6, 0x00, 0x02, 0x0b, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
--- 244,251 ----
   {0x0dc6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0b, 0x47, 0x00, 0x02, 0x0e}},
!  {0x0e06, 64, { 0x04, 0x00, 0x02, 0x0b, 0x1d, 0x00, 0x02, 0x0a, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
***************
*** 424,438 ****
   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x08, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
!   0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
!   0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
!   0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
    0x00, 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x64, 0x00, 0x69, 0x00, 0x76,
    0x00, 0x69, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66,
--- 420,434 ----
   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x08, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
!   0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
!   0x40, 0x00, 0x00, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
!   0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
    0x00, 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x64, 0x00, 0x69, 0x00, 0x76,
    0x00, 0x69, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66,
***************
*** 442,446 ****
    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
!  {0xffff,	0,	{0x00} }
  };
--- 438,442 ----
    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
! { 0xffff,	0,	{0x00} }
  };
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa26msg.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa26msg.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa26msg.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa26msg.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 44,50 ****
  	Buffer formats for RX/TX data messages are not defined by
  	a structure, but are described here:
  
! 	USB OUT (host -> USAxx, transmit) messages contain a 
  	REQUEST_ACK indicator (set to 0xff to request an ACK at the 
  	completion of transmit; 0x00 otherwise), followed by data:
  
--- 44,50 ----
  	Buffer formats for RX/TX data messages are not defined by
  	a structure, but are described here:
  
! 	USB OUT (host -> USA26, transmit) messages contain a 
  	REQUEST_ACK indicator (set to 0xff to request an ACK at the 
  	completion of transmit; 0x00 otherwise), followed by data:
  
***************
*** 52,99 ****
  
  	with a total data length of 63.
  
! 	USB IN (USAxx -> host, receive) messages begin with a status
! 	byte in which the 0x80 bit is either:
  
! 		(a)	0x80 bit clear
! 			indicates that the bytes following it are all data
! 			bytes:
  
! 				STAT DATA DATA DATA DATA DATA ...
  
! 			for a total of up to 63 DATA bytes,
  
! 	or:
! 
! 		(b)	0x80 bit set
! 			indiates that the bytes following alternate data and
! 			status bytes:
! 
! 				STAT DATA STAT DATA STAT DATA STAT DATA ...
! 
! 			for a total of up to 32 DATA bytes.
! 
! 	The valid bits in the STAT bytes are:
  
  		OVERRUN	0x02
  		PARITY	0x04
  		FRAMING	0x08
  		BREAK	0x10
  
! 	Notes:
! 
! 	(1) The OVERRUN bit can appear in either (a) or (b) format
! 		messages, but the but the PARITY/FRAMING/BREAK bits
! 		only appear in (b) format messages.
! 	(2) For the host to determine the exact point at which the
! 		overrun occurred (to identify the point in the data
! 		stream at which the data was lost), it needs to count
! 		128 characters, starting at the first character of the
! 		message in which OVERRUN was reported; the lost character(s)
! 		would have been received between the 128th and 129th
! 		characters.
! 	(3)	An RX data message in which the first byte has 0x80 clear
! 		serves as a "break off" indicator.
  
  	revision history:
  
--- 52,76 ----
  
  	with a total data length of 63.
  
! 	USB IN (USA26 -> host, receive) messages contain either a zero
! 	flag (indicating no error in any data bytes):
  
! 		00 DAT DAT DAT ...
  
! 	for a total of 63 data bytes, or a non-zero status flag (indicating 
! 	that all data bytes will be preceded by status flag):
  
! 		STAT DAT STAT DAT STAT DAT ...
  
! 	for a total of 32 data bytes.  The valid bits in the STAT bytes are:
  
  		OVERRUN	0x02
  		PARITY	0x04
  		FRAMING	0x08
  		BREAK	0x10
  
! 	Note: a "no status" RX data message (first byte zero) can serve as
! 	a "break off" indicator.
  
  	revision history:
  
***************
*** 103,109 ****
  	1999apr14	add resetDataToggle to control message
  	2000jan04	merge with usa17msg.h
  	2000jun01	add extended BSD-style copyright text
- 	2001jul05	change message format to improve OVERRUN case
  
  	Note on shared names:
  
--- 80,85 ----
***************
*** 117,123 ****
  #define	__USA26MSG__
  
  
! struct keyspan_usa26_portControlMessage
  {
  	/*
  		there are three types of "commands" sent in the control message:
--- 93,99 ----
  #define	__USA26MSG__
  
  
! typedef struct keyspan_usa26_portControlMessage
  {
  	/*
  		there are three types of "commands" sent in the control message:
***************
*** 188,194 ****
  		returnStatus,	// BOTH: return current status (even if it hasn't changed)
  		resetDataToggle;// BOTH: reset data toggle state to DATA0
  	
! };
  
  // defines for bits in lcr
  #define	USA_DATABITS_5		0x00
--- 164,170 ----
  		returnStatus,	// BOTH: return current status (even if it hasn't changed)
  		resetDataToggle;// BOTH: reset data toggle state to DATA0
  	
! } keyspan_usa26_portControlMessage;
  
  // defines for bits in lcr
  #define	USA_DATABITS_5		0x00
***************
*** 206,212 ****
  
  // all things called "StatusMessage" are sent on the status endpoint
  
! struct keyspan_usa26_portStatusMessage	// one for each port
  {
  	u8	port,			// BOTH: 0=first, 1=second, other=see below
  		hskia_cts,		// USA26: reports HSKIA pin
--- 182,188 ----
  
  // all things called "StatusMessage" are sent on the status endpoint
  
! typedef struct keyspan_usa26_portStatusMessage	// one for each port
  {
  	u8	port,			// BOTH: 0=first, 1=second, other=see below
  		hskia_cts,		// USA26: reports HSKIA pin
***************
*** 219,225 ****
  		_txXoff,		// port is in XOFF state (either host or RX XOFF)
  		rxEnabled,		// as configured by rxOn/rxOff 1=on, 0=off
  		controlResponse;// 1=a control message has been processed
! };
  
  // bits in RX data message when STAT byte is included
  #define	RXERROR_OVERRUN	0x02
--- 195,201 ----
  		_txXoff,		// port is in XOFF state (either host or RX XOFF)
  		rxEnabled,		// as configured by rxOn/rxOff 1=on, 0=off
  		controlResponse;// 1=a control message has been processed
! } keyspan_usa26_portStatusMessage;
  
  // bits in RX data message when STAT byte is included
  #define	RXERROR_OVERRUN	0x02
***************
*** 227,254 ****
  #define	RXERROR_FRAMING	0x08
  #define	RXERROR_BREAK	0x10
  
! struct keyspan_usa26_globalControlMessage
  {
  	u8	sendGlobalStatus,	// 2=request for two status responses
  		resetStatusToggle,	// 1=reset global status toggle
  		resetStatusCount;	// a cycling value
! };
  
! struct keyspan_usa26_globalStatusMessage
  {
  	u8	port,				// 3
  		sendGlobalStatus,	// from request, decremented
  		resetStatusCount;	// as in request
! };
  
! struct keyspan_usa26_globalDebugMessage
  {
  	u8	port,				// 2
  		a,
  		b,
  		c,
  		d;
! };
  
  // ie: the maximum length of an EZUSB endpoint buffer
  #define	MAX_DATA_LEN			64
--- 203,230 ----
  #define	RXERROR_FRAMING	0x08
  #define	RXERROR_BREAK	0x10
  
! typedef struct keyspan_usa26_globalControlMessage
  {
  	u8	sendGlobalStatus,	// 2=request for two status responses
  		resetStatusToggle,	// 1=reset global status toggle
  		resetStatusCount;	// a cycling value
! } keyspan_usa26_globalControlMessage;
  
! typedef struct keyspan_usa26_globalStatusMessage
  {
  	u8	port,				// 3
  		sendGlobalStatus,	// from request, decremented
  		resetStatusCount;	// as in request
! } keyspan_usa26_globalStatusMessage;
  
! typedef struct keyspan_usa26_globalDebugMessage
  {
  	u8	port,				// 2
  		a,
  		b,
  		c,
  		d;
! } keyspan_usa26_globalDebugMessage;
  
  // ie: the maximum length of an EZUSB endpoint buffer
  #define	MAX_DATA_LEN			64
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa28_fw.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa28_fw.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa28_fw.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa28_fw.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,33 ****
  /* keyspan_usa28_fw.h
  
! 	The firmware contained herein as keyspan_usa28_fw.h is
  
! 		Copyright (C) 1999-2001
! 		Keyspan, A division of InnoSys Incorporated ("Keyspan")
! 		
! 	as an unpublished work. This notice does not imply unrestricted or
! 	public access to the source code from which this firmware image is
! 	derived.  Except as noted below this firmware image may not be 
! 	reproduced, used, sold or transferred to any third party without 
! 	Keyspan's prior written consent.  All Rights Reserved.
! 
! 	Permission is hereby granted for the distribution of this firmware 
! 	image as part of a Linux or other Open Source operating system kernel 
! 	in text or binary form as required. 
! 
! 	This firmware may not be modified and may only be used with  
! 	Keyspan hardware.  Distribution and/or Modification of the 
! 	keyspan.c driver which includes this firmware, in whole or in 
! 	part, requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa28_firmware[] = {
!  {0x0026, 10, { 0x12, 0x17, 0xdb, 0x12, 0x18, 0xb5, 0x12, 0x14, 0xc3, 0x22}},
   {0x0033,  3, { 0x02, 0x00, 0x1d}},
   {0x001d,  4, { 0x53, 0xd8, 0xef, 0x32}},
   {0x0006, 16, { 0x8e, 0x12, 0x8f, 0x13, 0xe5, 0x13, 0x15, 0x13, 0xae, 0x12, 0x70, 0x02, 0x15, 0x12, 0x4e, 0x60}},
!  {0x0016,  7, { 0x05, 0x12, 0x18, 0xa4, 0x80, 0xee, 0x22}},
   {0x0003,  3, { 0x02, 0x00, 0x46}},
   {0x0046, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08}},
   {0x0056, 16, { 0x30, 0x99, 0x0e, 0x30, 0x11, 0x07, 0xa2, 0x17, 0x92, 0x9b, 0x85, 0x46, 0x99, 0xc2, 0x99, 0xd2}},
--- 1,28 ----
  /* keyspan_usa28_fw.h
+   
+    Generated from Keyspan firmware image usa28code.h Sat Oct  6 12:11:26 EST 2001
+    This firmware is for the Keyspan USA-28 Serial Adaptor
  
!    "The firmware contained herein as keyspan_usa28_fw.h is
!    Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
!    ("Keyspan"), as an unpublished work.  This notice does not imply
!    unrestricted or public access to this firmware which is a trade secret of
!    Keyspan, and which may not be reproduced, used, sold or transferred to any
!    third party without Keyspan's prior written consent.  All Rights Reserved.
  
!    This firmware may not be modified and may only be used with the Keyspan 
!    USA-28 Serial Adapter.  Distribution and/or Modification of the
!    keyspan.c driver which includes this firmware, in whole or in part,
!    requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa28_firmware[] = {
!  {0x0026, 10, { 0x12, 0x18, 0x09, 0x12, 0x18, 0xbc, 0x12, 0x14, 0xbb, 0x22}},
   {0x0033,  3, { 0x02, 0x00, 0x1d}},
   {0x001d,  4, { 0x53, 0xd8, 0xef, 0x32}},
   {0x0006, 16, { 0x8e, 0x12, 0x8f, 0x13, 0xe5, 0x13, 0x15, 0x13, 0xae, 0x12, 0x70, 0x02, 0x15, 0x12, 0x4e, 0x60}},
!  {0x0016,  7, { 0x05, 0x12, 0x18, 0xab, 0x80, 0xee, 0x22}},
   {0x0003,  3, { 0x02, 0x00, 0x46}},
   {0x0046, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08}},
   {0x0056, 16, { 0x30, 0x99, 0x0e, 0x30, 0x11, 0x07, 0xa2, 0x17, 0x92, 0x9b, 0x85, 0x46, 0x99, 0xc2, 0x99, 0xd2}},
***************
*** 197,203 ****
    0x40, 0x15, 0x15, 0x49, 0x15, 0x49, 0x05, 0x39, 0xd2, 0x0e, 0x80, 0x0b, 0x90, 0x7f, 0xbd, 0xe5,
    0x49, 0xf0, 0x75, 0x49, 0x00, 0xd2, 0x02, 0xd2, 0x25, 0x30, 0x25, 0x05, 0xc2, 0x25, 0x02, 0x00,
    0x56, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xce}},
!  {0x0a86, 64, { 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x0b, 0xa5, 0xe4, 0xf5, 0x12, 0x74, 0x40, 0x25, 0x12, 0xf5, 0x82, 0xe4,
    0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x12, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x4c, 0xf9, 0xec,
    0x34, 0x00, 0xfa, 0xef, 0x12, 0x15, 0xcd, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x18, 0xdb, 0xe5, 0x4c,
    0x60, 0x0c, 0x75, 0xc9, 0x20, 0x75, 0xc8, 0x36, 0x85, 0x4d, 0xca, 0x85, 0x4e, 0xcb, 0xe5}},
--- 192,198 ----
    0x40, 0x15, 0x15, 0x49, 0x15, 0x49, 0x05, 0x39, 0xd2, 0x0e, 0x80, 0x0b, 0x90, 0x7f, 0xbd, 0xe5,
    0x49, 0xf0, 0x75, 0x49, 0x00, 0xd2, 0x02, 0xd2, 0x25, 0x30, 0x25, 0x05, 0xc2, 0x25, 0x02, 0x00,
    0x56, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xce}},
!  {0x0a86, 64, { 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x0b, 0xa1, 0xe4, 0xf5, 0x12, 0x74, 0x40, 0x25, 0x12, 0xf5, 0x82, 0xe4,
    0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x12, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x4c, 0xf9, 0xec,
    0x34, 0x00, 0xfa, 0xef, 0x12, 0x15, 0xcd, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x18, 0xdb, 0xe5, 0x4c,
    0x60, 0x0c, 0x75, 0xc9, 0x20, 0x75, 0xc8, 0x36, 0x85, 0x4d, 0xca, 0x85, 0x4e, 0xcb, 0xe5}},
***************
*** 212,377 ****
   {0x0b46, 64, { 0x02, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x5e, 0x60, 0x0a, 0xd2, 0x9c, 0xc2, 0x98,
    0x75, 0x2e, 0x01, 0x75, 0x40, 0x28, 0xe5, 0x5f, 0x60, 0x07, 0xc2, 0x9c, 0xe4, 0xf5, 0x48, 0xf5,
    0x2e, 0xe5, 0x60, 0x60, 0x03, 0xe4, 0xf5, 0x48, 0xe5, 0x61, 0x60, 0x02, 0xd2, 0x07, 0xe5, 0x62,
!   0x60, 0x08, 0xe5, 0x5e, 0x70, 0x02, 0xf5, 0x40, 0xd2, 0x0c, 0xe5, 0x63, 0x60, 0x19, 0x90}},
   {0x0b86, 64, { 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x12, 0xf0, 0x74, 0x32, 0xf0, 0x74, 0x15, 0xf0,
!   0x74, 0x35, 0xf0, 0xd2, 0x03, 0xd2, 0x01, 0xd2, 0x09, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0xa2, 0x13,
!   0xe4, 0x33, 0xff, 0x65, 0x2b, 0x60, 0x04, 0x8f, 0x2b, 0xd2, 0x0c, 0xa2, 0x0b, 0xe4, 0x33, 0xff,
!   0x65, 0x2c, 0x60, 0x04, 0x8f, 0x2c, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x08, 0x65}},
!  {0x0bc6, 64, { 0x27, 0x60, 0x07, 0xe0, 0x54, 0x08, 0xf5, 0x27, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5,
!   0x29, 0x09, 0xe0, 0x54, 0x40, 0x64, 0x40, 0xf5, 0x29, 0xd2, 0x0c, 0x30, 0x07, 0x35, 0xc2, 0xaf,
!   0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x48, 0x60, 0x09, 0x90, 0x7f,
!   0xb7, 0xf0, 0xe4, 0xf5, 0x48, 0xc2, 0x01, 0xc2, 0x07, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0}},
!  {0x0c06, 64, { 0x20, 0xe1, 0x0f, 0xe5, 0x48, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x48, 0xd2, 0x01, 0xc2,
!   0x07, 0xd2, 0xaf, 0x20, 0x05, 0x37, 0x30, 0x03, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x2d,
!   0x90, 0x7e, 0x40, 0xe0, 0x13, 0x92, 0x15, 0x75, 0x4a, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x7c,
!   0xd2, 0x05, 0x80, 0x19, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0}},
!  {0x0c46, 64, { 0x13, 0x92, 0x15, 0x75, 0x4a, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x7c, 0xd2, 0x05, 0x20, 0x21, 0x33,
!   0x20, 0x00, 0x06, 0xe5, 0x4a, 0x65, 0x7c, 0x70, 0x2a, 0x30, 0x05, 0x1a, 0x30, 0x03, 0x09, 0xe4,
!   0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0xc2,
!   0x05, 0xe4, 0xf5, 0x7c, 0xf5, 0x4a, 0x30, 0x15, 0x0a, 0xc2, 0x15, 0xc2, 0x00, 0x90, 0x7f}},
!  {0x0c86, 64, { 0xbf, 0x74, 0x01, 0xf0, 0x30, 0x21, 0x03, 0x02, 0x0d, 0x94, 0x20, 0x05, 0x03, 0x02, 0x0d, 0x94, 0x30,
!   0x1c, 0x0a, 0x90, 0x7f, 0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x02, 0x0d, 0x94, 0x30, 0x0b, 0x03, 0x02,
!   0x0d, 0x94, 0x30, 0x13, 0x03, 0x02, 0x0d, 0x94, 0x30, 0x03, 0x62, 0x30, 0x1b, 0x12, 0xaf, 0x4a,
!   0x05, 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92}},
!  {0x0cc6, 64, { 0x2d, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5,
!   0x13, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74,
!   0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf, 0x4a, 0x05,
!   0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2}},
!  {0x0d06, 64, { 0x11, 0x80, 0x6b, 0xc2, 0x11, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x60, 0x30, 0x1b, 0x12,
!   0xaf, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13,
!   0x92, 0x2d, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83,
!   0xe0, 0xf5, 0x13, 0xe5, 0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a}},
!  {0x0d46, 64, { 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf,
!   0x4a, 0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x46,
!   0xd2, 0x11, 0x80, 0x09, 0xc2, 0x11, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0x30, 0x1b, 0x04,
!   0xa2, 0x2d, 0x92, 0x9b, 0xd2, 0x21, 0xc2, 0xaf, 0x85, 0x13, 0x99, 0x20, 0x11, 0x0d, 0x30}},
!  {0x0d86, 64, { 0x15, 0x0a, 0xc2, 0x15, 0xc2, 0x00, 0x90, 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xd0,
!   0xe0, 0x30, 0xe1, 0x03, 0x02, 0x0e, 0xb5, 0xe4, 0xf5, 0x12, 0x74, 0xc0, 0x25, 0x12, 0xf5, 0x82,
!   0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x12, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x64, 0xf9,
!   0xec, 0x34, 0x00, 0xfa, 0xef, 0x12, 0x15, 0xcd, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x18, 0xdb}},
!  {0x0dc6, 64, { 0xe5, 0x64, 0x60, 0x0b, 0x75, 0x89, 0x60, 0x75, 0x88, 0x40, 0xd2, 0xdf, 0x85, 0x65, 0x8d, 0xe5, 0x67,
!   0x13, 0x92, 0x1d, 0x92, 0xc7, 0xe5, 0x68, 0x13, 0x92, 0x1e, 0xe5, 0x69, 0x13, 0x92, 0x24, 0xe5,
!   0x6a, 0x60, 0x09, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x97, 0xe0,
!   0x44, 0x10, 0xf0, 0xe5, 0x6b, 0x60, 0x09, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0x7f, 0xf0, 0x80}},
!  {0x0e06, 64, { 0x07, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x71, 0x60, 0x0b, 0xc2, 0x14, 0xc2, 0x0d, 0x90,
!   0x7f, 0x94, 0xe0, 0x44, 0x08, 0xf0, 0xe5, 0x72, 0x60, 0x0b, 0xd2, 0x0d, 0xd2, 0x0e, 0x90, 0x7f,
!   0x94, 0xe0, 0x44, 0x08, 0xf0, 0xe5, 0x73, 0x60, 0x0d, 0xc2, 0xaf, 0xc2, 0x12, 0xd2, 0x00, 0xe4,
!   0xf5, 0x7d, 0xf5, 0x4b, 0xd2, 0xaf, 0xe5, 0x74, 0x60, 0x05, 0x30, 0x24, 0x02, 0xd2, 0x0d}},
!  {0x0e46, 64, { 0xe5, 0x75, 0x60, 0x15, 0x90, 0x7f, 0x94, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x08,
!   0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xf7, 0xf0, 0xe5, 0x76, 0x60, 0x0a, 0xd2, 0xc4, 0xc2, 0xc0,
!   0x75, 0x3a, 0x01, 0x75, 0x41, 0x28, 0xe5, 0x77, 0x60, 0x07, 0xc2, 0xc4, 0xe4, 0xf5, 0x49, 0xf5,
!   0x3a, 0xe5, 0x78, 0x60, 0x03, 0xe4, 0xf5, 0x49, 0xe5, 0x79, 0x60, 0x02, 0xd2, 0x08, 0xe5}},
!  {0x0e86, 64, { 0x7a, 0x60, 0x08, 0xe5, 0x76, 0x70, 0x02, 0xf5, 0x41, 0xd2, 0x0e, 0xe5, 0x7b, 0x60, 0x19, 0x90, 0x7f,
!   0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0x74, 0x16, 0xf0,
!   0x74, 0x36, 0xf0, 0xd2, 0x04, 0xd2, 0x02, 0xd2, 0x0a, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0xa2, 0x14,
!   0xe4, 0x33, 0xff, 0x65, 0x37, 0x60, 0x04, 0x8f, 0x37, 0xd2, 0x0e, 0xa2, 0x0d, 0xe4, 0x33}},
!  {0x0ec6, 64, { 0xff, 0x65, 0x38, 0x60, 0x04, 0x8f, 0x38, 0xd2, 0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x20, 0x65, 0x33,
!   0x60, 0x07, 0xe0, 0x54, 0x20, 0xf5, 0x33, 0xd2, 0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x40, 0xb5,
!   0x35, 0x09, 0xe0, 0x54, 0x40, 0x64, 0x40, 0xf5, 0x35, 0xd2, 0x0e, 0x30, 0x08, 0x35, 0xc2, 0xaf,
!   0x30, 0x02, 0x18, 0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x49, 0x60, 0x09, 0x90}},
!  {0x0f06, 64, { 0x7f, 0xbb, 0xf0, 0xe4, 0xf5, 0x49, 0xc2, 0x02, 0xc2, 0x08, 0x80, 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20,
!   0xe1, 0x0f, 0xe5, 0x49, 0x60, 0x09, 0x90, 0x7f, 0xbd, 0xf0, 0xe4, 0xf5, 0x49, 0xd2, 0x02, 0xc2,
!   0x08, 0xd2, 0xaf, 0x20, 0x06, 0x37, 0x30, 0x04, 0x1b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x2d,
!   0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x16, 0x75, 0x4b, 0x01, 0x90, 0x7f, 0xcb, 0xe0, 0xf5}},
!  {0x0f46, 64, { 0x7d, 0xd2, 0x06, 0x80, 0x19, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7c, 0xc0, 0xe0, 0x13,
!   0x92, 0x16, 0x75, 0x4b, 0x01, 0x90, 0x7f, 0xcd, 0xe0, 0xf5, 0x7d, 0xd2, 0x06, 0x20, 0x22, 0x33,
!   0x20, 0x00, 0x06, 0xe5, 0x4b, 0x65, 0x7d, 0x70, 0x2a, 0x30, 0x06, 0x1a, 0x30, 0x04, 0x09, 0xe4,
!   0x90, 0x7f, 0xcb, 0xf0, 0xc2, 0x04, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0xd2, 0x04}},
!  {0x0f86, 64, { 0xc2, 0x06, 0xe4, 0xf5, 0x7d, 0xf5, 0x4b, 0x30, 0x16, 0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1,
!   0x74, 0x01, 0xf0, 0x30, 0x22, 0x03, 0x02, 0x10, 0xa4, 0x20, 0x06, 0x03, 0x02, 0x10, 0xa4, 0x30,
!   0x1e, 0x0a, 0x90, 0x7f, 0x9a, 0xe0, 0x20, 0xe5, 0x03, 0x02, 0x10, 0xa4, 0x30, 0x0d, 0x03, 0x02,
!   0x10, 0xa4, 0x30, 0x14, 0x03, 0x02, 0x10, 0xa4, 0x30, 0x04, 0x62, 0x30, 0x1d, 0x12, 0xaf}},
!  {0x0fc6, 64, { 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d,
!   0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5,
!   0x13, 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x50, 0x2a, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74,
!   0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf, 0x4b}},
!  {0x1006, 64, { 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12,
!   0x80, 0x6b, 0xc2, 0x12, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0xc2, 0x04, 0x80, 0x60, 0x30, 0x1d, 0x12,
!   0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13,
!   0x92, 0x2d, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5}},
!  {0x1046, 64, { 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x50, 0x2a, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05,
!   0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf,
!   0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x47,
!   0xd2, 0x12, 0x80, 0x09, 0xc2, 0x12, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0xd2, 0x04, 0x30, 0x1d}},
!  {0x1086, 64, { 0x04, 0xa2, 0x2d, 0x92, 0xc3, 0xd2, 0x22, 0xc2, 0xaf, 0x85, 0x13, 0xc1, 0x20, 0x12, 0x0d, 0x30, 0x16,
!   0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xc2,
!   0xe0, 0x30, 0xe1, 0x03, 0x02, 0x11, 0x7a, 0xe5, 0x1a, 0x70, 0x46, 0x30, 0x0c, 0x3f, 0xe5, 0x40,
!   0x70, 0x3b, 0xa2, 0x09, 0x33, 0xf5, 0x31, 0xc2, 0x09, 0xc2, 0x0c, 0xe4, 0xf5, 0x12, 0x7e}},
!  {0x10c6, 64, { 0x00, 0x7b, 0x00, 0x74, 0x26, 0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74,
!   0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12,
!   0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x0c, 0xf0, 0x75, 0x40, 0x10, 0x22, 0x75, 0x1a, 0x01,
!   0x22, 0xe5, 0x1a, 0x64, 0x01, 0x70, 0x45, 0x30, 0x0e, 0x3e, 0xe5, 0x41, 0x70, 0x3a, 0xa2}},
!  {0x1106, 64, { 0x0a, 0x33, 0xf5, 0x3d, 0xc2, 0x0a, 0xc2, 0x0e, 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x32,
!   0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5,
!   0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x0c, 0xdb, 0x90,
!   0x7f, 0xc3, 0x74, 0x0c, 0xf0, 0x75, 0x41, 0x10, 0x75, 0x1a, 0x02, 0x22, 0xe5, 0x1c, 0x60}},
!  {0x1146, 64, { 0x30, 0x15, 0x1c, 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x1b, 0x25, 0x12, 0xf9, 0xee, 0x34,
!   0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5,
!   0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0,
!   0xe4, 0xf5, 0x1a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x16, 0x17, 0x12, 0x40, 0x00, 0x12}},
!  {0x1186, 64, { 0xb4, 0x01, 0x13, 0x20, 0x03, 0x11, 0x9e, 0x06, 0x12, 0x33, 0x08, 0x12, 0x2d, 0x09, 0x12, 0x20, 0x0a,
!   0x13, 0x76, 0x0b, 0x00, 0x00, 0x13, 0x6f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14,
!   0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f,
!   0xd5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x17, 0x4b, 0x8b, 0x12}},
!  {0x11c6, 64, { 0x8a, 0x13, 0x89, 0x14, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01,
!   0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
!   0x13, 0x76, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x17, 0x9a, 0x8b, 0x12, 0x8a, 0x13, 0x89, 0x14,
!   0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90}},
!  {0x1206, 64, { 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x76, 0x90,
!   0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90,
!   0x7f, 0xb5, 0xf0, 0x02, 0x13, 0x76, 0x12, 0x14, 0xc3, 0x02, 0x13, 0x76, 0x90, 0x7f, 0x00, 0x74,
!   0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f}},
!  {0x1246, 64, { 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x26, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
!   0xa2, 0x2b, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
!   0x02, 0xf0, 0x02, 0x13, 0x76, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
!   0x02, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54}},
!  {0x1286, 64, { 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
!   0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
!   0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xe8,
!   0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xea}},
!  {0x12c6, 64, { 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x26, 0x02, 0x13, 0x76, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
!   0x13, 0x76, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
!   0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34,
!   0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13}},
!  {0x1306, 64, { 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
!   0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x26, 0x80, 0x3f,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20}},
!  {0x1346, 64, { 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
!   0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
!   0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90,
!   0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20, 0x28, 0x03, 0x02, 0x14, 0xc2, 0xe5, 0x40}},
!  {0x1386, 64, { 0x60, 0x02, 0x15, 0x40, 0xe5, 0x48, 0x60, 0x4f, 0x65, 0x44, 0x70, 0x45, 0xe5, 0x42, 0xf4, 0x60, 0x02,
!   0x05, 0x42, 0xe5, 0x42, 0xc3, 0x95, 0x55, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f,
!   0xb8, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7, 0xe5, 0x48, 0xf0, 0xc2, 0x01, 0xe4, 0xf5, 0x48,
!   0xf5, 0x42, 0xf5, 0x44, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f}},
!  {0x13c6, 64, { 0xb9, 0xe5, 0x48, 0xf0, 0xd2, 0x01, 0xe4, 0xf5, 0x48, 0xf5, 0x42, 0xf5, 0x44, 0xd2, 0xaf, 0x80, 0x06,
!   0x85, 0x48, 0x44, 0xe4, 0xf5, 0x42, 0xe5, 0x2e, 0x60, 0x2d, 0x20, 0x19, 0x07, 0x90, 0x7f, 0x9b,
!   0xe0, 0x30, 0xe0, 0x0e, 0xe5, 0x2f, 0x60, 0x05, 0xe4, 0xf5, 0x2f, 0xd2, 0x0c, 0xe4, 0xf5, 0x3e,
!   0x80, 0x13, 0xe5, 0x3e, 0xd3, 0x95, 0x56, 0x50, 0x0c, 0xe5, 0x3e, 0xb5, 0x56, 0x05, 0x75}},
!  {0x1406, 64, { 0x2f, 0x01, 0xd2, 0x0c, 0x05, 0x3e, 0xc2, 0x19, 0xe5, 0x41, 0x60, 0x02, 0x15, 0x41, 0xe5, 0x49, 0x60,
!   0x4f, 0x65, 0x45, 0x70, 0x45, 0xe5, 0x43, 0xf4, 0x60, 0x02, 0x05, 0x43, 0xe5, 0x43, 0xc3, 0x95,
!   0x6d, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x02, 0x18, 0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x27, 0x90,
!   0x7f, 0xbb, 0xe5, 0x49, 0xf0, 0xc2, 0x02, 0xe4, 0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0x80}},
!  {0x1446, 64, { 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f, 0xbd, 0xe5, 0x49, 0xf0, 0xd2, 0x02, 0xe4,
!   0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0xd2, 0xaf, 0x80, 0x06, 0x85, 0x49, 0x45, 0xe4, 0xf5, 0x43,
!   0xe5, 0x3a, 0x60, 0x2d, 0x20, 0x1a, 0x07, 0x90, 0x7f, 0x9a, 0xe0, 0x30, 0xe2, 0x0e, 0xe5, 0x3b,
!   0x60, 0x05, 0xe4, 0xf5, 0x3b, 0xd2, 0x0e, 0xe4, 0xf5, 0x3f, 0x80, 0x13, 0xe5, 0x3f, 0xd3}},
!  {0x1486, 64, { 0x95, 0x6e, 0x50, 0x0c, 0xe5, 0x3f, 0xb5, 0x6e, 0x05, 0x75, 0x3b, 0x01, 0xd2, 0x0e, 0x05, 0x3f, 0xc2,
!   0x1a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5,
!   0x1c, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x1d, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7,
!   0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x22, 0xe4, 0x90, 0x7f}},
!  {0x14c6, 64, { 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x10, 0xf0, 0x90, 0x7f,
!   0x94, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0x9a, 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xfd,
!   0xf0, 0x90, 0x7f, 0x95, 0x74, 0x23, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x84, 0xf0, 0xe4, 0x90, 0x7f,
!   0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90, 0x7f, 0xcf, 0xf0, 0x75, 0x98, 0x40, 0x43, 0xa8}},
!  {0x1506, 64, { 0x10, 0xc2, 0x1b, 0xc2, 0x05, 0xc2, 0x21, 0xc2, 0x0b, 0xc2, 0x13, 0xf5, 0x7c, 0xf5, 0x4a, 0xc2, 0x11,
!   0xc2, 0x15, 0xf5, 0x42, 0xc2, 0x19, 0xf5, 0x44, 0xf5, 0x48, 0xc2, 0x23, 0xc2, 0x1c, 0xf5, 0x2d,
!   0xf5, 0x2f, 0xc2, 0x07, 0xc2, 0x00, 0xc2, 0x1f, 0xf5, 0x3e, 0xc2, 0x09, 0xd2, 0x0c, 0xf5, 0x26,
!   0x90, 0x7f, 0xcb, 0xf0, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xd1, 0xf0, 0x75, 0xc0, 0x40}},
!  {0x1546, 64, { 0x43, 0xa8, 0x40, 0xc2, 0x1d, 0xc2, 0x06, 0xc2, 0x22, 0xc2, 0x0d, 0xc2, 0x14, 0xf5, 0x7d, 0xf5, 0x4b,
!   0xc2, 0x12, 0xc2, 0x16, 0xf5, 0x43, 0xc2, 0x1a, 0xf5, 0x45, 0xf5, 0x49, 0xc2, 0x24, 0xc2, 0x1e,
!   0xf5, 0x39, 0xf5, 0x3b, 0xc2, 0x08, 0xc2, 0x00, 0xc2, 0x20, 0xf5, 0x3f, 0xc2, 0x0a, 0xd2, 0x0e,
    0x75, 0x32, 0x01, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xd2, 0x28}},
   {0x1586, 64, { 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02,
    0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5,
--- 207,372 ----
   {0x0b46, 64, { 0x02, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x5e, 0x60, 0x0a, 0xd2, 0x9c, 0xc2, 0x98,
    0x75, 0x2e, 0x01, 0x75, 0x40, 0x28, 0xe5, 0x5f, 0x60, 0x07, 0xc2, 0x9c, 0xe4, 0xf5, 0x48, 0xf5,
    0x2e, 0xe5, 0x60, 0x60, 0x03, 0xe4, 0xf5, 0x48, 0xe5, 0x61, 0x60, 0x02, 0xd2, 0x07, 0xe5, 0x62,
!   0x60, 0x08, 0xe5, 0x5e, 0x70, 0x02, 0xf5, 0x40, 0xd2, 0x0c, 0xe5, 0x63, 0x60, 0x15, 0x90}},
   {0x0b86, 64, { 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x12, 0xf0, 0x74, 0x32, 0xf0, 0x74, 0x15, 0xf0,
!   0x74, 0x35, 0xf0, 0xd2, 0x09, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0xa2, 0x13, 0xe4, 0x33, 0xff, 0x65,
!   0x2b, 0x60, 0x04, 0x8f, 0x2b, 0xd2, 0x0c, 0xa2, 0x0b, 0xe4, 0x33, 0xff, 0x65, 0x2c, 0x60, 0x04,
!   0x8f, 0x2c, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x08, 0x65, 0x27, 0x60, 0x07, 0xe0}},
!  {0x0bc6, 64, { 0x54, 0x08, 0xf5, 0x27, 0xd2, 0x0c, 0x90, 0x7f, 0x9b, 0xe0, 0x54, 0x40, 0xb5, 0x29, 0x09, 0xe0, 0x54,
!   0x40, 0x64, 0x40, 0xf5, 0x29, 0xd2, 0x0c, 0x30, 0x07, 0x35, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90,
!   0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0xe5, 0x48, 0x60, 0x09, 0x90, 0x7f, 0xb7, 0xf0, 0xe4, 0xf5,
!   0x48, 0xc2, 0x01, 0xc2, 0x07, 0x80, 0x16, 0x90, 0x7f, 0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0xe5}},
!  {0x0c06, 64, { 0x48, 0x60, 0x09, 0x90, 0x7f, 0xb9, 0xf0, 0xe4, 0xf5, 0x48, 0xd2, 0x01, 0xc2, 0x07, 0xd2, 0xaf, 0x20,
!   0x05, 0x37, 0x30, 0x03, 0x1b, 0x90, 0x7f, 0xc6, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7e, 0x40, 0xe0,
!   0x13, 0x92, 0x15, 0x75, 0x4a, 0x01, 0x90, 0x7f, 0xc7, 0xe0, 0xf5, 0x7c, 0xd2, 0x05, 0x80, 0x19,
!   0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x15, 0x75}},
!  {0x0c46, 64, { 0x4a, 0x01, 0x90, 0x7f, 0xc9, 0xe0, 0xf5, 0x7c, 0xd2, 0x05, 0x20, 0x21, 0x33, 0x20, 0x00, 0x06, 0xe5,
!   0x4a, 0x65, 0x7c, 0x70, 0x2a, 0x30, 0x05, 0x1a, 0x30, 0x03, 0x09, 0xe4, 0x90, 0x7f, 0xc7, 0xf0,
!   0xc2, 0x03, 0x80, 0x07, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0xc2, 0x05, 0xe4, 0xf5, 0x7c,
!   0xf5, 0x4a, 0x30, 0x15, 0x0a, 0xc2, 0x15, 0xc2, 0x00, 0x90, 0x7f, 0xbf, 0x74, 0x01, 0xf0}},
!  {0x0c86, 64, { 0x30, 0x21, 0x03, 0x02, 0x0d, 0x90, 0x20, 0x05, 0x03, 0x02, 0x0d, 0x90, 0x30, 0x1c, 0x0a, 0x90, 0x7f,
!   0x9b, 0xe0, 0x20, 0xe3, 0x03, 0x02, 0x0d, 0x90, 0x30, 0x0b, 0x03, 0x02, 0x0d, 0x90, 0x30, 0x13,
!   0x03, 0x02, 0x0d, 0x90, 0x30, 0x03, 0x62, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40,
!   0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4a, 0x05}},
!  {0x0cc6, 64, { 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4a, 0xc3,
!   0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2f, 0xf5, 0x82,
!   0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0x40, 0x2f,
!   0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2, 0x11, 0x80, 0x6b, 0xc2}},
!  {0x0d06, 64, { 0x11, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0xc2, 0x03, 0x80, 0x60, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a,
!   0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4a,
!   0x05, 0x4a, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5,
!   0x4a, 0xc3, 0x95, 0x7c, 0x50, 0x2a, 0x30, 0x1b, 0x12, 0xaf, 0x4a, 0x05, 0x4a, 0x74, 0xc0}},
!  {0x0d46, 64, { 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x17, 0xaf, 0x4a, 0x05, 0x4a, 0x74,
!   0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x46, 0xd2, 0x11, 0x80, 0x09,
!   0xc2, 0x11, 0xe4, 0x90, 0x7f, 0xc9, 0xf0, 0xd2, 0x03, 0x30, 0x1b, 0x04, 0xa2, 0x2d, 0x92, 0x9b,
!   0xd2, 0x21, 0xc2, 0xaf, 0x85, 0x13, 0x99, 0x20, 0x11, 0x0d, 0x30, 0x15, 0x0a, 0xc2, 0x15}},
!  {0x0d86, 64, { 0xc2, 0x00, 0x90, 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x03,
!   0x02, 0x0e, 0xad, 0xe4, 0xf5, 0x12, 0x74, 0xc0, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5,
!   0x83, 0xe0, 0xff, 0xe5, 0x12, 0x7c, 0x00, 0x7b, 0x00, 0x24, 0x64, 0xf9, 0xec, 0x34, 0x00, 0xfa,
!   0xef, 0x12, 0x15, 0xcd, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x18, 0xdb, 0xe5, 0x64, 0x60, 0x0b}},
!  {0x0dc6, 64, { 0x75, 0x89, 0x60, 0x75, 0x88, 0x40, 0xd2, 0xdf, 0x85, 0x65, 0x8d, 0xe5, 0x67, 0x13, 0x92, 0x1d, 0x92,
!   0xc7, 0xe5, 0x68, 0x13, 0x92, 0x1e, 0xe5, 0x69, 0x13, 0x92, 0x24, 0xe5, 0x6a, 0x60, 0x09, 0x90,
!   0x7f, 0x97, 0xe0, 0x54, 0xef, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x97, 0xe0, 0x44, 0x10, 0xf0, 0xe5,
!   0x6b, 0x60, 0x09, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0x7f, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0x97}},
!  {0x0e06, 64, { 0xe0, 0x44, 0x80, 0xf0, 0xe5, 0x71, 0x60, 0x0b, 0xc2, 0x14, 0xc2, 0x0d, 0x90, 0x7f, 0x94, 0xe0, 0x44,
!   0x08, 0xf0, 0xe5, 0x72, 0x60, 0x0b, 0xd2, 0x0d, 0xd2, 0x0e, 0x90, 0x7f, 0x94, 0xe0, 0x44, 0x08,
!   0xf0, 0xe5, 0x73, 0x60, 0x0d, 0xc2, 0xaf, 0xc2, 0x12, 0xd2, 0x00, 0xe4, 0xf5, 0x7d, 0xf5, 0x4b,
!   0xd2, 0xaf, 0xe5, 0x74, 0x60, 0x05, 0x30, 0x24, 0x02, 0xd2, 0x0d, 0xe5, 0x75, 0x60, 0x15}},
!  {0x0e46, 64, { 0x90, 0x7f, 0x94, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x9d, 0xe0, 0x44, 0x08, 0xf0, 0x90, 0x7f, 0x97,
!   0xe0, 0x54, 0xf7, 0xf0, 0xe5, 0x76, 0x60, 0x0a, 0xd2, 0xc4, 0xc2, 0xc0, 0x75, 0x3a, 0x01, 0x75,
!   0x41, 0x28, 0xe5, 0x77, 0x60, 0x07, 0xc2, 0xc4, 0xe4, 0xf5, 0x49, 0xf5, 0x3a, 0xe5, 0x78, 0x60,
!   0x03, 0xe4, 0xf5, 0x49, 0xe5, 0x79, 0x60, 0x02, 0xd2, 0x08, 0xe5, 0x7a, 0x60, 0x08, 0xe5}},
!  {0x0e86, 64, { 0x76, 0x70, 0x02, 0xf5, 0x41, 0xd2, 0x0e, 0xe5, 0x7b, 0x60, 0x15, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0,
!   0x74, 0x33, 0xf0, 0x74, 0x14, 0xf0, 0x74, 0x34, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2,
!   0x0a, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0xa2, 0x14, 0xe4, 0x33, 0xff, 0x65, 0x37, 0x60, 0x04, 0x8f,
!   0x37, 0xd2, 0x0e, 0xa2, 0x0d, 0xe4, 0x33, 0xff, 0x65, 0x38, 0x60, 0x04, 0x8f, 0x38, 0xd2}},
!  {0x0ec6, 64, { 0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x20, 0x65, 0x33, 0x60, 0x07, 0xe0, 0x54, 0x20, 0xf5, 0x33, 0xd2,
!   0x0e, 0x90, 0x7f, 0x9a, 0xe0, 0x54, 0x40, 0xb5, 0x35, 0x09, 0xe0, 0x54, 0x40, 0x64, 0x40, 0xf5,
!   0x35, 0xd2, 0x0e, 0x30, 0x08, 0x35, 0xc2, 0xaf, 0x30, 0x02, 0x18, 0x90, 0x7f, 0xbc, 0xe0, 0x20,
!   0xe1, 0x27, 0xe5, 0x49, 0x60, 0x09, 0x90, 0x7f, 0xbb, 0xf0, 0xe4, 0xf5, 0x49, 0xc2, 0x02}},
!  {0x0f06, 64, { 0xc2, 0x08, 0x80, 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x49, 0x60, 0x09, 0x90, 0x7f,
!   0xbd, 0xf0, 0xe4, 0xf5, 0x49, 0xd2, 0x02, 0xc2, 0x08, 0xd2, 0xaf, 0x20, 0x06, 0x37, 0x30, 0x04,
!   0x1b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x2d, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x16, 0x75,
!   0x4b, 0x01, 0x90, 0x7f, 0xcb, 0xe0, 0xf5, 0x7d, 0xd2, 0x06, 0x80, 0x19, 0x90, 0x7f, 0xcc}},
!  {0x0f46, 64, { 0xe0, 0x20, 0xe1, 0x12, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x16, 0x75, 0x4b, 0x01, 0x90, 0x7f, 0xcd,
!   0xe0, 0xf5, 0x7d, 0xd2, 0x06, 0x20, 0x22, 0x33, 0x20, 0x00, 0x06, 0xe5, 0x4b, 0x65, 0x7d, 0x70,
!   0x2a, 0x30, 0x06, 0x1a, 0x30, 0x04, 0x09, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0xc2, 0x04, 0x80, 0x07,
!   0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0xd2, 0x04, 0xc2, 0x06, 0xe4, 0xf5, 0x7d, 0xf5, 0x4b, 0x30}},
!  {0x0f86, 64, { 0x16, 0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0x30, 0x22, 0x03, 0x02, 0x10,
!   0x9c, 0x20, 0x06, 0x03, 0x02, 0x10, 0x9c, 0x30, 0x1e, 0x0a, 0x90, 0x7f, 0x9a, 0xe0, 0x20, 0xe5,
!   0x03, 0x02, 0x10, 0x9c, 0x30, 0x0d, 0x03, 0x02, 0x10, 0x9c, 0x30, 0x14, 0x03, 0x02, 0x10, 0x9c,
!   0x30, 0x04, 0x62, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82}},
!  {0x0fc6, 64, { 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5,
!   0x82, 0xe4, 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4b, 0xc3, 0x95, 0x7d, 0x50, 0x2a,
!   0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7d, 0xf5,
!   0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4}},
!  {0x1006, 64, { 0x34, 0x7d, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12, 0x80, 0x6b, 0xc2, 0x12, 0xe4, 0x90, 0x7f, 0xcb,
!   0xf0, 0xc2, 0x04, 0x80, 0x60, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5,
!   0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x2d, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0,
!   0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x13, 0xe5, 0x4b, 0xc3, 0x95}},
!  {0x1046, 64, { 0x7d, 0x50, 0x2a, 0x30, 0x1d, 0x12, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82, 0xe4, 0x34,
!   0x7c, 0xf5, 0x83, 0xe0, 0x13, 0x92, 0x18, 0xaf, 0x4b, 0x05, 0x4b, 0x74, 0xc0, 0x2f, 0xf5, 0x82,
!   0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xf5, 0x47, 0xd2, 0x12, 0x80, 0x09, 0xc2, 0x12, 0xe4, 0x90,
!   0x7f, 0xcd, 0xf0, 0xd2, 0x04, 0x30, 0x1d, 0x04, 0xa2, 0x2d, 0x92, 0xc3, 0xd2, 0x22, 0xc2}},
!  {0x1086, 64, { 0xaf, 0x85, 0x13, 0xc1, 0x20, 0x12, 0x0d, 0x30, 0x16, 0x0a, 0xc2, 0x16, 0xc2, 0x00, 0x90, 0x7f, 0xc1,
!   0x74, 0x01, 0xf0, 0xd2, 0xaf, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x11, 0x72, 0xe5,
!   0x1a, 0x70, 0x46, 0x30, 0x0c, 0x3f, 0xe5, 0x40, 0x70, 0x3b, 0xa2, 0x09, 0x33, 0xf5, 0x31, 0xc2,
!   0x09, 0xc2, 0x0c, 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x26, 0x25, 0x12, 0xf9}},
!  {0x10c6, 64, { 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b,
!   0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x0c,
!   0xf0, 0x75, 0x40, 0x10, 0x22, 0x75, 0x1a, 0x01, 0x22, 0xe5, 0x1a, 0x64, 0x01, 0x70, 0x45, 0x30,
!   0x0e, 0x3e, 0xe5, 0x41, 0x70, 0x3a, 0xa2, 0x0a, 0x33, 0xf5, 0x3d, 0xc2, 0x0a, 0xc2, 0x0e}},
!  {0x1106, 64, { 0xe4, 0xf5, 0x12, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x32, 0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12,
!   0x15, 0x87, 0xff, 0x74, 0x80, 0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0,
!   0x05, 0x12, 0xe5, 0x12, 0xb4, 0x0c, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x0c, 0xf0, 0x75, 0x41, 0x10,
!   0x75, 0x1a, 0x02, 0x22, 0xe5, 0x1c, 0x60, 0x30, 0x15, 0x1c, 0xe4, 0xf5, 0x12, 0x7e, 0x00}},
!  {0x1146, 64, { 0x7b, 0x00, 0x74, 0x1b, 0x25, 0x12, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x15, 0x87, 0xff, 0x74, 0x80,
!   0x25, 0x12, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x12, 0xe5, 0x12, 0xb4,
!   0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x1a, 0x22, 0x90, 0x7f, 0xe9, 0xe0,
!   0x12, 0x16, 0x17, 0x12, 0x38, 0x00, 0x12, 0xac, 0x01, 0x13, 0x18, 0x03, 0x11, 0x96, 0x06}},
!  {0x1186, 64, { 0x12, 0x2b, 0x08, 0x12, 0x25, 0x09, 0x12, 0x18, 0x0a, 0x13, 0x6e, 0x0b, 0x00, 0x00, 0x13, 0x67, 0x90,
!   0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x19,
!   0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea,
!   0xe0, 0xff, 0x12, 0x17, 0x4b, 0x8b, 0x12, 0x8a, 0x13, 0x89, 0x14, 0xea, 0x49, 0x60, 0x11}},
!  {0x11c6, 64, { 0xae, 0x02, 0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x6e,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12,
!   0x17, 0x9a, 0x8b, 0x12, 0x8a, 0x13, 0x89, 0x14, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90,
!   0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f}},
!  {0x1206, 64, { 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13,
!   0x6e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x13, 0x6e, 0x12, 0x14,
!   0xbb, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x13,
!   0x6e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70}},
!  {0x1246, 64, { 0x5b, 0xa2, 0x26, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x2b, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
!   0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x13, 0x6e, 0xe4, 0x90, 0x7f,
!   0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xec,
!   0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0}},
!  {0x1286, 64, { 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
!   0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
!   0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60,
!   0x03, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x26, 0x02, 0x13}},
!  {0x12c6, 64, { 0x6e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x13, 0x6e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
!   0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
!   0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec,
!   0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90}},
!  {0x1306, 64, { 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
!   0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
!   0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x26, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
!   0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff}},
!  {0x1346, 64, { 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
!   0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0x20,
!   0x28, 0x03, 0x02, 0x14, 0xba, 0xe5, 0x40, 0x60, 0x02, 0x15, 0x40, 0xe5, 0x48, 0x60, 0x4f}},
!  {0x1386, 64, { 0x65, 0x44, 0x70, 0x45, 0xe5, 0x42, 0xf4, 0x60, 0x02, 0x05, 0x42, 0xe5, 0x42, 0xc3, 0x95, 0x55, 0x40,
!   0x3d, 0xc2, 0xaf, 0x30, 0x01, 0x18, 0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xb7,
!   0xe5, 0x48, 0xf0, 0xc2, 0x01, 0xe4, 0xf5, 0x48, 0xf5, 0x42, 0xf5, 0x44, 0x80, 0x16, 0x90, 0x7f,
!   0xb6, 0xe0, 0x20, 0xe1, 0x0f, 0x90, 0x7f, 0xb9, 0xe5, 0x48, 0xf0, 0xd2, 0x01, 0xe4, 0xf5}},
!  {0x13c6, 64, { 0x48, 0xf5, 0x42, 0xf5, 0x44, 0xd2, 0xaf, 0x80, 0x06, 0x85, 0x48, 0x44, 0xe4, 0xf5, 0x42, 0xe5, 0x2e,
!   0x60, 0x2d, 0x20, 0x19, 0x07, 0x90, 0x7f, 0x9b, 0xe0, 0x30, 0xe0, 0x0e, 0xe5, 0x2f, 0x60, 0x05,
!   0xe4, 0xf5, 0x2f, 0xd2, 0x0c, 0xe4, 0xf5, 0x3e, 0x80, 0x13, 0xe5, 0x3e, 0xd3, 0x95, 0x56, 0x50,
!   0x0c, 0xe5, 0x3e, 0xb5, 0x56, 0x05, 0x75, 0x2f, 0x01, 0xd2, 0x0c, 0x05, 0x3e, 0xc2, 0x19}},
!  {0x1406, 64, { 0xe5, 0x41, 0x60, 0x02, 0x15, 0x41, 0xe5, 0x49, 0x60, 0x4f, 0x65, 0x45, 0x70, 0x45, 0xe5, 0x43, 0xf4,
!   0x60, 0x02, 0x05, 0x43, 0xe5, 0x43, 0xc3, 0x95, 0x6d, 0x40, 0x3d, 0xc2, 0xaf, 0x30, 0x02, 0x18,
!   0x90, 0x7f, 0xbc, 0xe0, 0x20, 0xe1, 0x27, 0x90, 0x7f, 0xbb, 0xe5, 0x49, 0xf0, 0xc2, 0x02, 0xe4,
!   0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0x80, 0x16, 0x90, 0x7f, 0xba, 0xe0, 0x20, 0xe1, 0x0f}},
!  {0x1446, 64, { 0x90, 0x7f, 0xbd, 0xe5, 0x49, 0xf0, 0xd2, 0x02, 0xe4, 0xf5, 0x49, 0xf5, 0x43, 0xf5, 0x45, 0xd2, 0xaf,
!   0x80, 0x06, 0x85, 0x49, 0x45, 0xe4, 0xf5, 0x43, 0xe5, 0x3a, 0x60, 0x2d, 0x20, 0x1a, 0x07, 0x90,
!   0x7f, 0x9a, 0xe0, 0x30, 0xe2, 0x0e, 0xe5, 0x3b, 0x60, 0x05, 0xe4, 0xf5, 0x3b, 0xd2, 0x0e, 0xe4,
!   0xf5, 0x3f, 0x80, 0x13, 0xe5, 0x3f, 0xd3, 0x95, 0x6e, 0x50, 0x0c, 0xe5, 0x3f, 0xb5, 0x6e}},
!  {0x1486, 64, { 0x05, 0x75, 0x3b, 0x01, 0xd2, 0x0e, 0x05, 0x3f, 0xc2, 0x1a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23,
!   0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x1c, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x1d, 0x90,
!   0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90,
!   0x7f, 0xd3, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0}},
!  {0x14c6, 64, { 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x10, 0xf0, 0x90, 0x7f, 0x94, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0x9d, 0x74,
!   0x9a, 0xf0, 0x90, 0x7f, 0x97, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x23, 0xf0, 0x90,
!   0x7f, 0x9e, 0x74, 0x84, 0xf0, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x90, 0x7f,
!   0xcf, 0xf0, 0x75, 0x98, 0x40, 0x43, 0xa8, 0x10, 0xc2, 0x1b, 0xc2, 0x05, 0xc2, 0x21, 0xc2}},
!  {0x1506, 64, { 0x0b, 0xc2, 0x13, 0xf5, 0x7c, 0xf5, 0x4a, 0xc2, 0x11, 0xc2, 0x15, 0xf5, 0x42, 0xc2, 0x19, 0xf5, 0x44,
!   0xf5, 0x48, 0xc2, 0x23, 0xc2, 0x1c, 0xf5, 0x2d, 0xf5, 0x2f, 0xc2, 0x07, 0xc2, 0x00, 0xc2, 0x1f,
!   0xf5, 0x3e, 0xc2, 0x09, 0xd2, 0x01, 0xd2, 0x03, 0xd2, 0x0c, 0xf5, 0x26, 0x90, 0x7f, 0xcb, 0xf0,
!   0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xd1, 0xf0, 0x75, 0xc0, 0x40, 0x43, 0xa8, 0x40, 0xc2}},
!  {0x1546, 64, { 0x1d, 0xc2, 0x06, 0xc2, 0x22, 0xc2, 0x0d, 0xc2, 0x14, 0xf5, 0x7d, 0xf5, 0x4b, 0xc2, 0x12, 0xc2, 0x16,
!   0xf5, 0x43, 0xc2, 0x1a, 0xf5, 0x45, 0xf5, 0x49, 0xc2, 0x24, 0xc2, 0x1e, 0xf5, 0x39, 0xf5, 0x3b,
!   0xc2, 0x08, 0xc2, 0x00, 0xc2, 0x20, 0xf5, 0x3f, 0xc2, 0x0a, 0xd2, 0x02, 0xd2, 0x04, 0xd2, 0x0e,
    0x75, 0x32, 0x01, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xd2, 0x28}},
   {0x1586, 64, { 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02,
    0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5,
***************
*** 389,395 ****
    0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8,
    0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46,
    0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x18}},
!  {0x1686, 64, { 0xc5, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe,
    0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4,
    0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5,
    0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde}},
--- 384,390 ----
    0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8,
    0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46,
    0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x18}},
!  {0x1686, 64, { 0xcc, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe,
    0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4,
    0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5,
    0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde}},
***************
*** 398,406 ****
    0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90,
    0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44}},
   {0x1706, 64, { 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0xbe, 0xd2, 0x2d,
!   0x12, 0x18, 0x7f, 0xc2, 0x27, 0xc2, 0x25, 0xc2, 0x28, 0x30, 0x28, 0x03, 0x12, 0x0a, 0x83, 0x90,
!   0x7f, 0xd8, 0xe0, 0x65, 0x10, 0x60, 0x08, 0xe0, 0xf5, 0x10, 0x12, 0x13, 0x7e, 0x80, 0xea, 0x30,
!   0x27, 0x07, 0xc2, 0x27, 0x12, 0x11, 0x7b, 0x80, 0xe0, 0x30, 0x2c, 0xdd, 0xc2, 0x2c, 0x12}},
   {0x1746, 64, { 0x00, 0x26, 0x80, 0xd6, 0x22, 0xe4, 0xfe, 0x75, 0x17, 0xff, 0x75, 0x18, 0x19, 0x75, 0x19, 0x12, 0xab,
    0x17, 0xaa, 0x18, 0xa9, 0x19, 0x90, 0x00, 0x01, 0x12, 0x15, 0xa0, 0x64, 0x02, 0x70, 0x2d, 0xad,
    0x06, 0x0e, 0xed, 0xb5, 0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x15, 0xdf, 0x85, 0xf0, 0x15,
--- 393,401 ----
    0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90,
    0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44}},
   {0x1706, 64, { 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0xbc, 0xd2, 0xbe, 0xd2, 0x2d,
!   0x12, 0x18, 0x86, 0xc2, 0x27, 0xc2, 0x25, 0xc2, 0x28, 0x30, 0x28, 0x03, 0x12, 0x0a, 0x83, 0x90,
!   0x7f, 0xd8, 0xe0, 0x65, 0x10, 0x60, 0x08, 0xe0, 0xf5, 0x10, 0x12, 0x13, 0x76, 0x80, 0xea, 0x30,
!   0x27, 0x07, 0xc2, 0x27, 0x12, 0x11, 0x73, 0x80, 0xe0, 0x30, 0x2c, 0xdd, 0xc2, 0x2c, 0x12}},
   {0x1746, 64, { 0x00, 0x26, 0x80, 0xd6, 0x22, 0xe4, 0xfe, 0x75, 0x17, 0xff, 0x75, 0x18, 0x19, 0x75, 0x19, 0x12, 0xab,
    0x17, 0xaa, 0x18, 0xa9, 0x19, 0x90, 0x00, 0x01, 0x12, 0x15, 0xa0, 0x64, 0x02, 0x70, 0x2d, 0xad,
    0x06, 0x0e, 0xed, 0xb5, 0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x15, 0xdf, 0x85, 0xf0, 0x15,
***************
*** 410,442 ****
    0x86, 0xab, 0x17, 0xaa, 0x18, 0xa9, 0x19, 0x90, 0x00, 0x01, 0x12, 0x15, 0xa0, 0xb4, 0x03, 0x1d,
    0xaf, 0x16, 0x05, 0x16, 0xef, 0xb5, 0x15, 0x01, 0x22, 0x12, 0x15, 0x87, 0x7e, 0x00, 0x29}},
   {0x17c6, 64, { 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x17, 0xff, 0xf5, 0x18, 0x89, 0x19, 0x80, 0xd4, 0x7b, 0x00, 0x7a,
!   0x00, 0x79, 0x00, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0xf0, 0x90, 0x7f, 0x94,
!   0xf0, 0x90, 0x7f, 0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xf0, 0xe4, 0x90, 0x7f, 0x95, 0xf0,
!   0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x9d, 0xf0}},
!  {0x1806, 64, { 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90,
!   0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0,
!   0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82,
!   0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x27, 0x53, 0x91, 0xef, 0x90}},
!  {0x1846, 64, { 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0,
!   0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00,
!   0xd2, 0x2c, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0,
!   0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0}},
!  {0x1886, 64, { 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x2d, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00,
!   0x06, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0x74, 0x00, 0xf5,
!   0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f,
!   0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xc1}},
!  {0x18c6, 64, { 0xaa, 0x01, 0x1a, 0x00, 0x03, 0x1b, 0x03, 0x00, 0x00, 0xc1, 0x27, 0xc1, 0x2c, 0xc1, 0x26, 0xc1, 0x2b,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x0f, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x01, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
!   0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
!   0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
!   0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
    0x00, 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x64, 0x00, 0x69, 0x00, 0x76,
    0x00, 0x69, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66,
--- 405,437 ----
    0x86, 0xab, 0x17, 0xaa, 0x18, 0xa9, 0x19, 0x90, 0x00, 0x01, 0x12, 0x15, 0xa0, 0xb4, 0x03, 0x1d,
    0xaf, 0x16, 0x05, 0x16, 0xef, 0xb5, 0x15, 0x01, 0x22, 0x12, 0x15, 0x87, 0x7e, 0x00, 0x29}},
   {0x17c6, 64, { 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x17, 0xff, 0xf5, 0x18, 0x89, 0x19, 0x80, 0xd4, 0x7b, 0x00, 0x7a,
!   0x00, 0x79, 0x00, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
!   0x75, 0x86, 0x00, 0x30, 0x2a, 0x04, 0xc2, 0x2a, 0x80, 0x02, 0xd2, 0x2c, 0x53, 0x91, 0xef, 0x90,
!   0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83}},
!  {0x1806, 64, { 0xd0, 0xe0, 0x32, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90,
!   0x7f, 0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0x97, 0xf0, 0xe4, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f,
!   0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x9d, 0xf0, 0x22, 0xc0, 0xe0,
!   0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f}},
!  {0x1846, 64, { 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0,
!   0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85,
!   0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x27, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74,
!   0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32}},
!  {0x1886, 64, { 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x2d, 0x04, 0xe0, 0x44, 0x02,
!   0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x00, 0x06, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0,
!   0x44, 0x04, 0xf0, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82,
!   0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01}},
!  {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xc1, 0xaa, 0x01, 0x1a, 0x00, 0x03, 0x1b, 0x03, 0x00, 0x00, 0xc1,
!   0x27, 0xc1, 0x2c, 0xc1, 0x26, 0xc1, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x0f, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x01, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
!   0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
!   0x40, 0x00, 0x00, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
!   0x00, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x00}},
   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
    0x00, 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x64, 0x00, 0x69, 0x00, 0x76,
    0x00, 0x69, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66,
***************
*** 460,466 ****
   {0x1ac6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x31, 0x00, 0x02, 0x1b}},
!  {0x1b06,  9, { 0x04, 0x00, 0x02, 0x18, 0x07, 0x00, 0x02, 0x18, 0x58}},
!  {0xffff,  0, {0x00}}
  };
--- 455,461 ----
   {0x1ac6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x18, 0x5f, 0x00, 0x02, 0x1b}},
!  {0x1b06,  9, { 0x04, 0x00, 0x02, 0x18, 0x35, 0x00, 0x02, 0x17, 0xdb}},
! { 0xffff,	0,	{0x00} }
  };
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa28msg.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa28msg.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa28msg.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa28msg.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 95,101 ****
  #define	__USA28MSG__
  
  
! struct keyspan_usa28_portControlMessage
  {
  	/*
  		there are four types of "commands" sent in the control message:
--- 95,101 ----
  #define	__USA28MSG__
  
  
! typedef struct keyspan_usa28_portControlMessage
  {
  	/*
  		there are four types of "commands" sent in the control message:
***************
*** 146,154 ****
  		returnStatus,	// return current status n times (1 or 2)
  		resetDataToggle;// reset data toggle state to DATA0
  	
! };
  
! struct keyspan_usa28_portStatusMessage
  {
  	u8	port,			// 0=first, 1=second, 2=global (see below)
  		cts,
--- 146,154 ----
  		returnStatus,	// return current status n times (1 or 2)
  		resetDataToggle;// reset data toggle state to DATA0
  	
! } keyspan_usa28_portControlMessage;
  
! typedef struct keyspan_usa28_portStatusMessage
  {
  	u8	port,			// 0=first, 1=second, 2=global (see below)
  		cts,
***************
*** 164,195 ****
  		rxBreak,		// 1=we're in break state
  		rs232invalid,	// 1=no valid signals on rs-232 inputs
  		controlResponse;// 1=a control messages has been processed
! };
  
  // bit defines in txState
  #define	TX_OFF			0x01	// requested by host txOff command
  #define	TX_XOFF			0x02	// either real, or simulated by host
  
! struct keyspan_usa28_globalControlMessage
  {
  	u8	sendGlobalStatus,	// 2=request for two status responses
  		resetStatusToggle,	// 1=reset global status toggle
  		resetStatusCount;	// a cycling value
! };
  
! struct keyspan_usa28_globalStatusMessage
  {
  	u8	port,				// 3
  		sendGlobalStatus,	// from request, decremented
  		resetStatusCount;	// as in request
! };
  
! struct keyspan_usa28_globalDebugMessage
  {
  	u8	port,				// 2
  		n,					// typically a count/status byte
  		b;					// typically a data byte
! };
  
  // ie: the maximum length of an EZUSB endpoint buffer
  #define	MAX_DATA_LEN			64
--- 164,195 ----
  		rxBreak,		// 1=we're in break state
  		rs232invalid,	// 1=no valid signals on rs-232 inputs
  		controlResponse;// 1=a control messages has been processed
! } keyspan_usa28_portStatusMessage;
  
  // bit defines in txState
  #define	TX_OFF			0x01	// requested by host txOff command
  #define	TX_XOFF			0x02	// either real, or simulated by host
  
! typedef struct keyspan_usa28_globalControlMessage
  {
  	u8	sendGlobalStatus,	// 2=request for two status responses
  		resetStatusToggle,	// 1=reset global status toggle
  		resetStatusCount;	// a cycling value
! } keyspan_usa28_globalControlMessage;
  
! typedef struct keyspan_usa28_globalStatusMessage
  {
  	u8	port,				// 3
  		sendGlobalStatus,	// from request, decremented
  		resetStatusCount;	// as in request
! } keyspan_usa28_globalStatusMessage;
  
! typedef struct keyspan_usa28_globalDebugMessage
  {
  	u8	port,				// 2
  		n,					// typically a count/status byte
  		b;					// typically a data byte
! } keyspan_usa28_globalDebugMessage;
  
  // ie: the maximum length of an EZUSB endpoint buffer
  #define	MAX_DATA_LEN			64
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa28x_fw.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa28x_fw.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa28x_fw.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa28x_fw.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,346 ****
  /* keyspan_usa28x_fw.h
  
! 	The firmware contained herein as keyspan_usa28x_fw.h is
  
! 		Copyright (C) 1999-2001
! 		Keyspan, A division of InnoSys Incorporated ("Keyspan")
! 		
! 	as an unpublished work. This notice does not imply unrestricted or
! 	public access to the source code from which this firmware image is
! 	derived.  Except as noted below this firmware image may not be 
! 	reproduced, used, sold or transferred to any third party without 
! 	Keyspan's prior written consent.  All Rights Reserved.
! 
! 	Permission is hereby granted for the distribution of this firmware 
! 	image as part of a Linux or other Open Source operating system kernel 
! 	in text or binary form as required. 
! 
! 	This firmware may not be modified and may only be used with  
! 	Keyspan hardware.  Distribution and/or Modification of the 
! 	keyspan.c driver which includes this firmware, in whole or in 
! 	part, requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa28x_firmware[] = {
!  {0x0033,  3, { 0x02, 0x12, 0xf7}},
   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
!  {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
!  {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
!  {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xba}},
   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
!  {0x00a6, 16, { 0x12, 0x13, 0x1b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
!  {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xba, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
!  {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xd6, 0x8f}},
!  {0x00e6, 16, { 0x19, 0x12, 0x13, 0x27, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x12, 0xeb}},
!  {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
   {0x0043,  3, { 0x02, 0x13, 0x00}},
!  {0x0000,  3, { 0x02, 0x0e, 0x00}},
!  {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
!   0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
!   0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x4b, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
!   0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
!  {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
!   0x0c, 0xdf, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
!   0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xc2, 0x05, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5,
!   0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a}},
!  {0x0186, 64, { 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5,
!   0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24,
!   0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xb1, 0x43, 0x46,
!   0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90}},
!  {0x01c6, 64, { 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x35, 0x90, 0x7e, 0x02, 0xe0,
!   0xff, 0x12, 0x10, 0x5b, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x03,
!   0x7d, 0x07, 0x12, 0x11, 0xb1, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
!   0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90}},
!  {0x0206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90,
!   0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
!   0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e,
!   0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42}},
!  {0x0246, 64, { 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12,
!   0x10, 0xa7, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xcd, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90,
!   0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7e, 0x0c,
!   0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd}},
!  {0x0286, 64, { 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60,
!   0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98,
!   0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3,
!   0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10}},
!  {0x02c6, 64, { 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0,
!   0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
!   0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x12, 0xdf,
!   0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12}},
!  {0x0306, 64, { 0x11, 0xb1, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e,
!   0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18,
!   0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00,
!   0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98}},
!  {0x0346, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f,
!   0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90,
!   0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xb1, 0xe4,
!   0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12}},
!  {0x0386, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b,
!   0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e,
!   0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0,
!   0x74, 0x35, 0xf0, 0xd2, 0x03, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x38}},
!  {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
!   0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x12, 0xdf, 0xef, 0x54, 0x01, 0xf5,
!   0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x33, 0xef, 0x54, 0x80,
!   0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12}},
!  {0x0406, 64, { 0x13, 0x33, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2, 0x07, 0x20,
!   0x1b, 0x03, 0x02, 0x07, 0xec, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x95, 0x3d, 0x40,
!   0x03, 0x02, 0x04, 0xae, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77,
!   0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x6f, 0xef, 0xc3}},
!  {0x0446, 64, { 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5,
!   0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75,
!   0x0d, 0x41, 0x12, 0x0d, 0x04, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f,
!   0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x6f, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90}},
!  {0x0486, 64, { 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60,
!   0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x04,
!   0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05,
!   0x36, 0x12, 0x12, 0x20, 0x8f, 0x19, 0x12, 0x13, 0x7b, 0x8f, 0x37, 0xe5, 0x19, 0xc3, 0x95}},
!  {0x04c6, 64, { 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x57, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c,
!   0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5, 0x37, 0x30,
!   0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e,
!   0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x84, 0xe5}},
!  {0x0506, 64, { 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75,
!   0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75,
!   0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x29, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90,
!   0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x97, 0xc2, 0x06, 0xe4}},
!  {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
!   0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
!   0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
!   0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03}},
!  {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
!   0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
!   0x11, 0x19, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x3f, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
!   0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb, 0x43, 0x47, 0x80, 0x90}},
!  {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
!   0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
!   0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
!   0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
!  {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
!   0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
!   0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x65, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0x8b,
!   0xaf, 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
!  {0x0646, 64, { 0x43, 0x12, 0x10, 0xf3, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
!   0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
!   0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
!   0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
!  {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
!   0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
!   0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
!   0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
!  {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x4b, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
!   0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
!   0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0x75, 0x32,
!   0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
!  {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
!   0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb,
!   0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
!  {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x11, 0xfb, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
!   0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
!   0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
!   0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
!  {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xd1, 0xf0,
!   0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94,
!   0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12,
!   0x13, 0x4b, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2}},
!  {0x07c6, 64, { 0x08, 0x12, 0x13, 0x87, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2,
!   0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x87, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05,
!   0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90,
!   0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90}},
!  {0x0806, 64, { 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f,
!   0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x20, 0xe5, 0x0a, 0x70, 0x40,
!   0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
!   0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
!  {0x0846, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb,
!   0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22,
!   0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5,
!   0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12}},
!  {0x0886, 64, { 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05,
!   0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4,
!   0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2,
!   0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
!  {0x08c6, 64, { 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
!   0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a,
!   0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
!   0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x8c, 0xff, 0x74, 0x80, 0x25}},
!  {0x0906, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb,
!   0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e,
!   0xe4, 0x0a, 0x08, 0x00, 0x0a, 0x7c, 0x01, 0x0a, 0xe8, 0x03, 0x09, 0x44, 0x06, 0x09, 0xfb, 0x08,
!   0x09, 0xf5, 0x09, 0x09, 0xdd, 0x0a, 0x09, 0xec, 0x0b, 0x00, 0x00, 0x0b, 0x37, 0x90, 0x7f}},
!  {0x0946, 64, { 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xd3, 0x74,
!   0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f,
!   0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19,
!   0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19}},
!  {0x0986, 64, { 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f,
!   0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
!   0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f,
!   0x0a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0}},
!  {0x09c6, 64, { 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0,
!   0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
!   0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x3e, 0x12, 0x0b,
!   0x46, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02}},
!  {0x0a06, 64, { 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
!   0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
!   0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0xe4, 0x90, 0x7f,
!   0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f}},
!  {0x0a46, 64, { 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24,
!   0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
!   0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
!   0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02}},
!  {0x0a86, 64, { 0x60, 0x03, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x3e,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
!   0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
!   0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f}},
!  {0x0ac6, 64, { 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f,
!   0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
!   0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
!   0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
!  {0x0b06, 64, { 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
!   0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
!   0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22}},
!  {0x0b46, 64, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90,
!   0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
!   0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
!   0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa}},
!  {0x0b86, 64, { 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38,
!   0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f,
!   0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xb1, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x81, 0x90, 0x7f}},
!  {0x0bc6, 64, { 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
!   0x12, 0x11, 0xb1, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xb1, 0x90, 0x7f,
!   0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11}},
!  {0x0c06, 64, { 0xb1, 0x7f, 0x01, 0x12, 0x12, 0x6a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xb1, 0x20, 0x1b, 0x03, 0x02,
!   0x0c, 0xb7, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4,
!   0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xd2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b,
!   0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2}},
!  {0x0c46, 64, { 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
!   0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x10,
!   0xf3, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0,
!   0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74}},
!  {0x0c86, 64, { 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xfb, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
!   0x11, 0xfb, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
!   0x7f, 0x12, 0x11, 0xfb, 0x7f, 0x01, 0x12, 0x12, 0x8b, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xfb,
!   0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82}},
!  {0x0cc6, 64, { 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
    0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08,
!   0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0,
!   0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f}},
!  {0x0d06, 64, { 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
    0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2,
!   0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c,
!   0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05}},
!  {0x0d46, 64, { 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
    0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43,
!   0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02,
!   0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0}},
!  {0x0d86, 64, { 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
    0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90,
!   0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2,
!   0x1a, 0x12, 0x12, 0x45, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12}},
!  {0x0dc6, 64, { 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
    0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2,
!   0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x21, 0x80, 0xd6, 0x30, 0x18,
!   0xd3, 0xc2, 0x18, 0x12, 0x13, 0x93, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd}},
!  {0x0e06, 64, { 0x75, 0x81, 0x47, 0x02, 0x0e, 0x47, 0x02, 0x0d, 0x6f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
    0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07,
!   0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56,
!   0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40}},
!  {0x0e46, 64, { 0x80, 0x90, 0x12, 0xac, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
    0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8,
!   0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82,
!   0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca}},
!  {0x0e86, 64, { 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
    0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01,
!   0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9,
!   0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5}},
!  {0x0ec6, 64, { 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
    0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0,
!   0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74,
!   0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3}},
!  {0x0f06, 64, { 0xa3, 0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
!   0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xa5, 0xb4, 0x03, 0x1d,
!   0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x8c, 0x7e, 0x00, 0x29, 0xff,
!   0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00}},
!  {0x0f46, 64, { 0x7a, 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
    0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac,
!   0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08,
!   0x60, 0x0a, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a}},
!  {0x0f86, 64, { 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
!   0xf0, 0x12, 0x13, 0x3f, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
!   0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x7b, 0x8f, 0x1a,
!   0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0}},
!  {0x0fc6, 64, { 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
!   0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
!   0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2,
!   0x11, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0}},
!  {0x1006, 64, { 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0,
!   0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08,
!   0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f,
!   0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10}},
!  {0x1046, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90,
!   0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13,
!   0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13}},
!  {0x1086, 64, { 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef,
!   0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
!   0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44}},
!  {0x10c6, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74,
!   0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90}},
!  {0x1106, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
!   0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
!   0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
!  {0x1146, 64, { 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
!   0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
!   0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f}},
!  {0x1186, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b,
!   0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
!   0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90}},
!  {0x11c6, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12,
!   0x13, 0x0f, 0x8f, 0x1a, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12,
!   0x13, 0x0f, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x0f, 0x8f, 0x1b, 0x80,
!   0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90}},
!  {0x1206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0x12, 0x13,
!   0x63, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x63, 0x8f, 0x1a, 0xe5, 0x1a,
!   0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x63, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90}},
!  {0x1246, 64, { 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0,
!   0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xc8, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44,
!   0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xb1, 0x90,
!   0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80}},
!  {0x1286, 64, { 0xfd, 0x12, 0x11, 0xb1, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xfb,
!   0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80,
!   0xfd, 0x12, 0x11, 0xfb, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00,
!   0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1}},
!  {0x12c6, 64, { 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e,
!   0x60, 0x05, 0x12, 0x0d, 0x4e, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
    0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0f, 0xe7, 0x00, 0x02, 0x13}},
!  {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xbd, 0x00, 0x02, 0x10, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90}},
!  {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
!  {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12,
!   0x0d, 0x5f, 0x12, 0x0b, 0x46, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
--- 1,341 ----
  /* keyspan_usa28x_fw.h
+   
+    Generated from Keyspan firmware image usa26code.h Sat Oct  6 12:08:55 EST 2001
+    This firmware is for the Keyspan USA-28X Serial Adaptor
  
!    "The firmware contained herein as keyspan_usa28x_fw.h is
!    Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
!    ("Keyspan"), as an unpublished work.  This notice does not imply
!    unrestricted or public access to this firmware which is a trade secret of
!    Keyspan, and which may not be reproduced, used, sold or transferred to any
!    third party without Keyspan's prior written consent.  All Rights Reserved.
  
!    This firmware may not be modified and may only be used with the Keyspan 
!    USA-28X Serial Adapter.  Distribution and/or Modification of the
!    keyspan.c driver which includes this firmware, in whole or in part,
!    requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa28x_firmware[] = {
!  {0x0033,  3, { 0x02, 0x13, 0xab}},
   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
!  {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
!  {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
!  {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xca}},
   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
!  {0x00a6, 16, { 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
!  {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xca, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
!  {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
!  {0x00e6, 16, { 0x13, 0x3f, 0xef, 0x42, 0x36, 0x12, 0x11, 0xed, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
!  {0x00f6, 16, { 0x12, 0x13, 0x1b, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
   {0x0043,  3, { 0x02, 0x13, 0x00}},
!  {0x0000,  3, { 0x02, 0x0e, 0x10}},
!  {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x3f, 0xef, 0x42, 0x36, 0xe5, 0x36,
!   0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
!   0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x5b, 0xe5,
!   0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
!  {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
!   0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0c, 0xef, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
!   0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xc2, 0x05, 0xe4, 0xf5,
!   0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
!  {0x0186, 64, { 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
!   0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68,
!   0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d,
!   0xcd, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0}},
!  {0x01c6, 64, { 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
!   0x10, 0x4c, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x72, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0,
!   0xfd, 0x12, 0x11, 0xc8, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x43, 0x46, 0x80, 0x90, 0x7f,
!   0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12}},
!  {0x0206, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e,
!   0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0,
!   0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
!   0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43}},
!  {0x0246, 64, { 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43,
!   0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xbe, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xe4,
!   0xaf, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42,
!   0x12, 0x10, 0x98, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46}},
!  {0x0286, 64, { 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46,
!   0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03,
!   0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
!   0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3}},
!  {0x02c6, 64, { 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
!   0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90,
!   0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x11, 0xf0, 0x12, 0x13, 0x0f, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e}},
!  {0x0306, 64, { 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e,
!   0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8, 0x75, 0x29,
!   0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5,
!   0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11}},
!  {0x0346, 64, { 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xc8,
!   0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff,
!   0xad, 0x3e, 0x12, 0x11, 0xc8, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60}},
!  {0x0386, 64, { 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
!   0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4,
!   0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0,
!   0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
!  {0x03c6, 64, { 0x1a, 0x52, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
!   0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x0f,
!   0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
!   0x4b, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07}},
!  {0x0406, 64, { 0x30, 0x0d, 0x11, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19,
!   0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf4, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x87, 0xef,
!   0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb2, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a,
!   0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12}},
!  {0x0446, 64, { 0x13, 0x87, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f,
!   0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41,
!   0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x14, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
!   0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x94}},
!  {0x0486, 64, { 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19,
!   0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d,
!   0xc1, 0x12, 0x0d, 0x14, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30,
!   0xe1, 0x03, 0x02, 0x05, 0x40, 0x53, 0x37, 0x80, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0x12}},
!  {0x04c6, 64, { 0x12, 0x37, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x6f, 0xef, 0x30, 0xe0, 0x08,
!   0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x37,
!   0x80, 0x57, 0x12, 0x13, 0x93, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3,
!   0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75}},
!  {0x0506, 64, { 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x94, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb,
!   0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08,
!   0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12,
!   0x0d, 0x39, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1}},
!  {0x0546, 64, { 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x9f, 0xc2, 0x06, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
!   0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
!   0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5,
!   0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
!  {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x12, 0x43, 0x47,
!   0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
!   0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x30, 0x90, 0x7e, 0x22, 0xe0,
!   0xff, 0x12, 0x11, 0x56, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x12, 0x7f}},
!  {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x12, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
!   0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
!   0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
!   0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
!  {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
!   0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
!   0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
!   0x11, 0x7c, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xa2, 0xaf, 0x43, 0x12, 0x11, 0x0a}},
!  {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x0a, 0x90, 0x7e, 0x2c,
!   0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
!   0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
!   0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
!  {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
!   0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
!   0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
!   0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
!  {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x63,
!   0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
!   0x12, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
!   0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
!  {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
!   0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
!   0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
!   0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0x75, 0x34, 0x01, 0xd2, 0x08}},
!  {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x12, 0xe4,
!   0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
!   0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
!   0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
!  {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
!   0x74, 0x36, 0xf0, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15,
!   0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75,
!   0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x63, 0xef, 0x54, 0x01, 0xf5, 0x19}},
!  {0x07c6, 64, { 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x80, 0xf5, 0x19,
!   0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x9f, 0xef,
!   0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a,
!   0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5}},
!  {0x0806, 64, { 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74,
!   0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1,
!   0x03, 0x02, 0x09, 0x28, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2,
!   0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
!  {0x0846, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
!   0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38,
!   0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08,
!   0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d}},
!  {0x0886, 64, { 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82,
!   0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f,
!   0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a,
!   0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00}},
!  {0x08c6, 64, { 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18,
!   0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb,
!   0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15,
!   0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
!  {0x0906, 64, { 0xfa, 0x12, 0x0e, 0x9c, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
!   0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5,
!   0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e, 0xf4, 0x0a, 0x10, 0x00, 0x0a, 0x84, 0x01, 0x0a,
!   0xf0, 0x03, 0x09, 0x4c, 0x06, 0x0a, 0x03, 0x08, 0x09, 0xfd, 0x09, 0x09, 0xe5, 0x0a, 0x09}},
!  {0x0946, 64, { 0xf4, 0x0b, 0x00, 0x00, 0x0b, 0x3f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61,
!   0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdb, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90,
!   0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02,
!   0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83}},
!  {0x0986, 64, { 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75,
!   0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83,
!   0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
!   0x46, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x1a, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90}},
!  {0x09c6, 64, { 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01,
!   0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f,
!   0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea,
!   0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x46, 0x12, 0x0b, 0x4e, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0x00}},
!  {0x0a06, 64, { 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60,
!   0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
!   0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
!   0x02, 0xf0, 0x02, 0x0b, 0x46, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5}},
!  {0x0a46, 64, { 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f,
!   0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
!   0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
!   0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f}},
!  {0x0a86, 64, { 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0,
!   0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
!   0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
!   0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4}},
!  {0x0ac6, 64, { 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54,
!   0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
!   0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80}},
!  {0x0b06, 64, { 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90,
!   0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
!   0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
!   0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
!  {0x0b46, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74,
!   0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e,
!   0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74,
!   0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74}},
!  {0x0b86, 64, { 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4,
!   0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b,
!   0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01, 0x90, 0x7f, 0x98, 0x74,
!   0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd}},
!  {0x0bc6, 64, { 0x12, 0x11, 0xc8, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x98, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f,
!   0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
!   0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xc8, 0xe4,
!   0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11}},
!  {0x0c06, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xc8, 0x7f, 0x01, 0x12, 0x12,
!   0x81, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xc8, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc7, 0x75, 0x2d,
!   0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4,
!   0x12, 0x0e, 0xe2, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5}},
!  {0x0c46, 64, { 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13,
!   0xd2, 0x04, 0xd2, 0x02, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00,
!   0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11,
!   0x0a, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90}},
!  {0x0c86, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80,
!   0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x12, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12,
!   0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d,
!   0x7f, 0x12, 0x12, 0x12, 0x7f, 0x01, 0x12, 0x12, 0xa2, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12}},
!  {0x0cc6, 64, { 0x12, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5,
!   0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86,
    0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08,
!   0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00}},
!  {0x0d06, 64, { 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98,
!   0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05,
    0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2,
!   0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5}},
!  {0x0d46, 64, { 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86,
!   0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05,
    0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43,
!   0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44}},
!  {0x0d86, 64, { 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2,
!   0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f,
    0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90,
!   0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf}},
!  {0x0dc6, 64, { 0xd2, 0x1a, 0x12, 0x12, 0x5c, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90,
!   0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2,
    0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2,
!   0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x29, 0x80, 0xd6, 0x30}},
!  {0x0e06, 64, { 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x12, 0xf6, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75,
!   0x81, 0x47, 0x02, 0x0e, 0x57, 0x02, 0x0d, 0x7f, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40,
    0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07,
!   0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4}},
!  {0x0e46, 64, { 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
!   0x90, 0x12, 0xc3, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09,
    0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8,
!   0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5}},
!  {0x0e86, 64, { 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf,
!   0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02,
    0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01,
!   0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06}},
!  {0x0ec6, 64, { 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82,
!   0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82,
    0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0,
!   0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8}},
!  {0x0f06, 64, { 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3,
!   0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c,
!   0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb5, 0xb4, 0x03, 0x1d,
!   0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9c, 0x7e, 0x00, 0x29}},
!  {0x0f46, 64, { 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a,
!   0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c,
    0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac,
!   0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5}},
!  {0x0f86, 64, { 0x08, 0x60, 0x0a, 0x12, 0x13, 0x3f, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05,
!   0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a,
!   0xf0, 0x12, 0x13, 0x57, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
!   0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x93, 0x8f}},
!  {0x0fc6, 64, { 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
!   0xc0, 0x86, 0x75, 0x86, 0x00, 0x30, 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91,
!   0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0,
!   0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0}},
!  {0x1006, 64, { 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04,
!   0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
!   0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53,
!   0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0}},
!  {0x1046, 64, { 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
!   0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
!   0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13,
!   0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0}},
!  {0x1086, 64, { 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44,
!   0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0}},
!  {0x10c6, 64, { 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
!   0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90,
!   0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90}},
!  {0x1106, 64, { 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
!   0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
!   0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef}},
!  {0x1146, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
!   0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09,
!   0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f,
!   0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74}},
!  {0x1186, 64, { 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
!   0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
!   0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00,
!   0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00}},
!  {0x11c6, 64, { 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0,
!   0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0x12, 0x13, 0x27, 0x8f, 0x1b,
!   0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x27, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b}},
!  {0x1206, 64, { 0x60, 0x07, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
!   0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90,
!   0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22,
!   0x12, 0x13, 0x7b, 0x8f, 0x1a, 0x12, 0x13, 0x7b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60}},
!  {0x1246, 64, { 0x12, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x7b, 0x8f, 0x1b,
!   0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0,
!   0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xdf, 0x90, 0x7f,
!   0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5}},
!  {0x1286, 64, { 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xc8, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee,
!   0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11, 0xc8, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5,
!   0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x12, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00,
!   0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12, 0x12, 0x12, 0x22, 0x05, 0x0e, 0x02}},
!  {0x12c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10,
!   0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19,
!   0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x5e, 0x80, 0xee, 0x22, 0x12,
!   0x00, 0x03, 0x12, 0x0d, 0x6f, 0x12, 0x0b, 0x4e, 0x22, 0x02, 0x10, 0x25, 0x00, 0x02, 0x13}},
!  {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xfb, 0x00, 0x02, 0x0f, 0xcd, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
    0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90}},
!  {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
!  {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
***************
*** 425,431 ****
   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x10, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
--- 420,426 ----
   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x10, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
***************
*** 443,447 ****
    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
!  {0xffff,  0,  {0x00}}
  };
--- 438,442 ----
    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
! { 0xffff,	0,	{0x00} }
  };
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa28xa_fw.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa28xa_fw.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa28xa_fw.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa28xa_fw.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,354 ****
  /* keyspan_usa28xa_fw.h
  
! 	The firmware contained herein as keyspan_usa28xa.h is
  
! 		Copyright (C) 1999-2001
! 		Keyspan, A division of InnoSys Incorporated ("Keyspan")
! 		
! 	as an unpublished work. This notice does not imply unrestricted or
! 	public access to the source code from which this firmware image is
! 	derived.  Except as noted below this firmware image may not be 
! 	reproduced, used, sold or transferred to any third party without 
! 	Keyspan's prior written consent.  All Rights Reserved.
! 
! 	Permission is hereby granted for the distribution of this firmware 
! 	image as part of a Linux or other Open Source operating system kernel 
! 	in text or binary form as required. 
! 
! 	This firmware may not be modified and may only be used with  
! 	Keyspan hardware.  Distribution and/or Modification of the 
! 	keyspan.c driver which includes this firmware, in whole or in 
! 	part, requires the inclusion of this statement."
  
  
  
  */
  
  static const struct ezusb_hex_record keyspan_usa28xa_firmware[] = {
!  {0x0033,  3, { 0x02, 0x12, 0xf9}},
   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
!  {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x27, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
!  {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x27, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
!  {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xc8}},
   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
!  {0x00a6, 16, { 0x12, 0x13, 0x27, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
!  {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xc8, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
!  {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xe4, 0x8f}},
!  {0x00e6, 16, { 0x19, 0x12, 0x13, 0x33, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x13, 0x0f}},
!  {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
!  {0x0043,  3, { 0x02, 0x13, 0x00}},
!  {0x0000,  3, { 0x02, 0x0e, 0x0e}},
!  {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
!   0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
!   0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x59, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
!   0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
!  {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
!   0x0c, 0xed, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
!   0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xc2, 0x05, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5,
!   0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a}},
!  {0x0186, 64, { 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe0, 0x05, 0x18, 0xe5,
!   0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24,
!   0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xbf, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xbf, 0x43, 0x46,
!   0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90}},
!  {0x01c6, 64, { 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x43, 0x90, 0x7e, 0x02, 0xe0,
!   0xff, 0x12, 0x10, 0x69, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xbf, 0x7f, 0x03,
!   0x7d, 0x07, 0x12, 0x11, 0xbf, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
!   0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90}},
!  {0x0206, 64, { 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90,
!   0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f,
!   0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e,
!   0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42}},
!  {0x0246, 64, { 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12,
!   0x10, 0xb5, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xdb, 0xaf, 0x42, 0x12, 0x10, 0x8f, 0x90,
!   0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0x8f, 0x90, 0x7e, 0x0c,
!   0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd}},
!  {0x0286, 64, { 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60,
!   0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98,
!   0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3,
!   0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10}},
!  {0x02c6, 64, { 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0,
!   0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
!   0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x12, 0xed,
!   0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12}},
!  {0x0306, 64, { 0x11, 0xbf, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e,
!   0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xbf, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18,
!   0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00,
!   0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98}},
!  {0x0346, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f,
!   0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xbf, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90,
!   0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xbf, 0xe4,
!   0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12}},
!  {0x0386, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b,
!   0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e,
!   0x1f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0,
!   0x74, 0x35, 0xf0, 0xd2, 0x03, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x38}},
!  {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
!   0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x12, 0xed, 0xef, 0x54, 0x01, 0xf5,
!   0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x3f, 0xef, 0x54, 0x80,
!   0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12}},
!  {0x0406, 64, { 0x13, 0x3f, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2, 0x07, 0x20,
!   0x1b, 0x03, 0x02, 0x07, 0xec, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x7b, 0xef, 0xc3, 0x95, 0x3d, 0x40,
!   0x03, 0x02, 0x04, 0xae, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77,
!   0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x7b, 0xef, 0xc3}},
!  {0x0446, 64, { 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5,
!   0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75,
!   0x0d, 0x41, 0x12, 0x0d, 0x12, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f,
!   0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x7b, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90}},
!  {0x0486, 64, { 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60,
!   0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x12,
!   0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05,
!   0x36, 0x12, 0x12, 0x2e, 0x8f, 0x19, 0x12, 0x13, 0x87, 0x8f, 0x37, 0xe5, 0x19, 0xc3, 0x95}},
!  {0x04c6, 64, { 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x63, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c,
!   0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5, 0x37, 0x30,
!   0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e,
!   0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0x92, 0xe5}},
!  {0x0506, 64, { 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75,
!   0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75,
!   0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x37, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90,
!   0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x97, 0xc2, 0x06, 0xe4}},
!  {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
!   0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
!   0x12, 0x0e, 0xe0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
!   0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x09, 0x7f, 0x03}},
!  {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x12, 0x09, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
!   0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
!   0x11, 0x27, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x4d, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
!   0xfd, 0x12, 0x12, 0x09, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x09, 0x43, 0x47, 0x80, 0x90}},
!  {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
!   0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
!   0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
!   0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
!  {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
!   0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
!   0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x73, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0x99,
!   0xaf, 0x43, 0x12, 0x11, 0x01, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
!  {0x0646, 64, { 0x43, 0x12, 0x11, 0x01, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
!   0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
!   0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
!   0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
!  {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
!   0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
!   0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
!   0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
!  {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x57, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
!   0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
!   0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09, 0x75, 0x32,
!   0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
!  {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
!   0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09,
!   0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
!  {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x12, 0x09, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
!   0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
!   0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
!   0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
!  {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xd1, 0xf0,
!   0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94,
!   0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12,
!   0x13, 0x57, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2}},
!  {0x07c6, 64, { 0x08, 0x12, 0x13, 0x93, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2,
!   0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x93, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05,
!   0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90,
!   0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90}},
!  {0x0806, 64, { 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f,
!   0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x20, 0xe5, 0x0a, 0x70, 0x40,
!   0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
!   0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25}},
!  {0x0846, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb,
!   0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22,
!   0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5,
!   0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12}},
!  {0x0886, 64, { 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05,
!   0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4,
!   0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2,
!   0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
!  {0x08c6, 64, { 0xfa, 0x12, 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
!   0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a,
!   0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74,
!   0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9a, 0xff, 0x74, 0x80, 0x25}},
!  {0x0906, 64, { 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb,
!   0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0e,
!   0xf2, 0x0a, 0x08, 0x00, 0x0a, 0x7c, 0x01, 0x0a, 0xe8, 0x03, 0x09, 0x44, 0x06, 0x09, 0xfb, 0x08,
!   0x09, 0xf5, 0x09, 0x09, 0xdd, 0x0a, 0x09, 0xec, 0x0b, 0x00, 0x00, 0x0b, 0x37, 0x90, 0x7f}},
!  {0x0946, 64, { 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xd3, 0x74,
!   0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f,
!   0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19,
!   0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19}},
!  {0x0986, 64, { 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f,
!   0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
!   0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f,
!   0x18, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0}},
!  {0x09c6, 64, { 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0,
!   0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
!   0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x3e, 0x12, 0x0b,
!   0x46, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02}},
!  {0x0a06, 64, { 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b,
!   0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00,
!   0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0xe4, 0x90, 0x7f,
!   0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f}},
!  {0x0a46, 64, { 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24,
!   0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4,
!   0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
!   0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02}},
!  {0x0a86, 64, { 0x60, 0x03, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x3e,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x3e, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38,
!   0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f,
!   0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f}},
!  {0x0ac6, 64, { 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f,
!   0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80,
!   0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea,
!   0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
!  {0x0b06, 64, { 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4,
!   0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f,
!   0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22}},
!  {0x0b46, 64, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90,
!   0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18,
!   0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5,
!   0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa}},
!  {0x0b86, 64, { 0xe4, 0x12, 0x0e, 0xe0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38,
!   0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f,
!   0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xbf, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0x8f, 0x90, 0x7f}},
!  {0x0bc6, 64, { 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
!   0x12, 0x11, 0xbf, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xbf, 0x90, 0x7f,
!   0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11}},
!  {0x0c06, 64, { 0xbf, 0x7f, 0x01, 0x12, 0x12, 0x78, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xbf, 0x7f, 0x13, 0x7d, 0x01,
!   0x12, 0x11, 0xbf, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc5, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b,
!   0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe0, 0x05, 0x18,
!   0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37}},
!  {0x0c46, 64, { 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x0b,
    0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x12,
!   0x09, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x01, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f, 0x01,
!   0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0}},
!  {0x0c86, 64, { 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x09, 0xe4, 0xff,
!   0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x09, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90,
!   0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x09, 0x7f, 0x01, 0x12, 0x12, 0x99,
!   0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x09, 0x7f, 0x13, 0x7d, 0x01, 0x12, 0x12, 0x09, 0xd2}},
!  {0x0cc6, 64, { 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5,
    0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05,
!   0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d,
!   0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05}},
!  {0x0d06, 64, { 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08,
    0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90,
!   0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5}},
!  {0x0d46, 64, { 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7,
    0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5,
!   0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0}},
!  {0x0d86, 64, { 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43,
    0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74,
!   0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf,
!   0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x1a}},
!  {0x0dc6, 64, { 0x12, 0x12, 0x53, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90, 0x7f, 0xa1,
    0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2, 0x1a, 0x12,
!   0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2, 0x1a, 0x12,
!   0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x21, 0x80, 0xd6, 0x30, 0x18, 0xd3}},
!  {0x0e06, 64, { 0xc2, 0x18, 0x12, 0x13, 0x9f, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x47,
!   0x02, 0x0e, 0x55, 0x02, 0x0d, 0x7d, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6,
!   0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c,
!   0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80}},
!  {0x0e46, 64, { 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x12,
!   0xba, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f,
!   0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8,
!   0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8}},
!  {0x0e86, 64, { 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde,
    0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22,
!   0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5,
!   0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25}},
!  {0x0ec6, 64, { 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5,
    0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83,
!   0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8,
!   0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01}},
!  {0x0f06, 64, { 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80,
    0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c, 0x86, 0xab,
!   0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb3, 0xb4, 0x03, 0x1d, 0xaf, 0x19,
!   0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9a, 0x7e, 0x00, 0x29, 0xff, 0xee}},
!  {0x0f46, 64, { 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79,
    0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
!   0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70,
!   0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60}},
!  {0x0f86, 64, { 0x0a, 0x12, 0x13, 0x33, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5,
    0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12,
!   0x13, 0x4b, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c,
!   0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x87, 0x8f, 0x1a, 0xef}},
!  {0x0fc6, 64, { 0x42, 0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
!   0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04,
!   0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
!   0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11}},
!  {0x1006, 64, { 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82,
!   0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0,
!   0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0,
!   0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98}},
!  {0x1046, 64, { 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0,
!   0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00,
!   0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0}},
!  {0x1086, 64, { 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
!   0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
!   0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14}},
!  {0x10c6, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90,
!   0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13,
!   0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b}},
!  {0x1106, 64, { 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef,
!   0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
!   0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45}},
!  {0x1146, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74,
!   0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90}},
!  {0x1186, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
!   0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
!   0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5}},
!  {0x11c6, 64, { 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef,
!   0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x1b,
!   0x8f, 0x1a, 0x12, 0x13, 0x1b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x1b,
!   0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x1b, 0x8f, 0x1b, 0x80, 0xe8}},
!  {0x1206, 64, { 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d,
!   0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x6f, 0x8f, 0x1a, 0x12, 0x13, 0x6f, 0x8f,
!   0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x6f, 0x8f, 0x1a, 0xe5, 0x1a, 0x65}},
!  {0x1246, 64, { 0x1b, 0x60, 0x07, 0x12, 0x13, 0x6f, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0,
!   0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4,
!   0x7e, 0x01, 0x12, 0x12, 0xd6, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0,
!   0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xbf, 0x90, 0x7f}},
!  {0x1286, 64, { 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11,
!   0xbf, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x09, 0x90, 0x7f,
!   0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12,
!   0x12, 0x09, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00}},
!  {0x12c6, 64, { 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00, 0x8e,
!   0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05,
!   0x12, 0x0d, 0x5c, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe0,
!   0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x02, 0x0f, 0xf5, 0x00, 0x02, 0x13}},
!  {0x1306, 64, { 0x04, 0x00, 0x02, 0x0f, 0xcb, 0x00, 0x02, 0x10, 0x1c, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90}},
!  {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
!  {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12, 0x0d, 0x6d, 0x12, 0x0b,
!   0x46, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
!  {0x1406, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
--- 1,351 ----
  /* keyspan_usa28xa_fw.h
  
!    Generated from Keyspan firmware image usa44code.h Sat Oct  6 12:08:02 EST 2001
!    This firmware is for the Keyspan USA-28XA Serial Adaptor
  
!    "The firmware contained herein as keyspan_usa28xa_fw.h is
!    Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
!    ("Keyspan"), as an unpublished work.  This notice does not imply
!    unrestricted or public access to this firmware which is a trade secret of
!    Keyspan, and which may not be reproduced, used, sold or transferred to any
!    third party without Keyspan's prior written consent.  All Rights Reserved.
  
+    Permission is hereby granted for the distribution of this firmware image
+    as part of a Linux or other Open Source operating system kernel in 
+    text or binary form as required.
  
+    This firmware may not be modified and may only be used with the Keyspan 
+    USA-28XA Serial Adapter.  Distribution and/or Modification of the
+    keyspan.c driver which includes this firmware, in whole or in part,
+    requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa28xa_firmware[] = {
!  {0x0033,  3, { 0x02, 0x13, 0xaa}},
   {0x0003, 16, { 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0}},
   {0x0013, 16, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90}},
   {0x0023, 15, { 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x22}},
!  {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x28, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
!  {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x28, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
!  {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xd8}},
   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
!  {0x00a6, 16, { 0x12, 0x13, 0x28, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
!  {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xd8, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
!  {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
!  {0x00e6, 16, { 0x13, 0x34, 0xef, 0x42, 0x36, 0x12, 0x11, 0xfb, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
!  {0x00f6, 16, { 0x12, 0x13, 0x10, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
!  {0x0043,  3, { 0x02, 0x14, 0x00}},
!  {0x0000,  3, { 0x02, 0x0e, 0x1e}},
!  {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x34, 0xef, 0x42, 0x36, 0xe5, 0x36,
!   0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
!   0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x69, 0xe5,
!   0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
!  {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
!   0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0c, 0xfd, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
!   0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xc2, 0x05, 0xe4, 0xf5,
!   0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5}},
!  {0x0186, 64, { 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
!   0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68,
!   0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xd6, 0x7f, 0x03, 0x7d,
!   0xcd, 0x12, 0x11, 0xd6, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0}},
!  {0x01c6, 64, { 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12,
!   0x10, 0x5a, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x80, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0,
!   0xfd, 0x12, 0x11, 0xd6, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xd6, 0x43, 0x46, 0x80, 0x90, 0x7f,
!   0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12}},
!  {0x0206, 64, { 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e,
!   0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0,
!   0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0,
!   0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43}},
!  {0x0246, 64, { 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43,
!   0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xcc, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xf2,
!   0xaf, 0x42, 0x12, 0x10, 0xa6, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42,
!   0x12, 0x10, 0xa6, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46}},
!  {0x0286, 64, { 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46,
!   0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03,
!   0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
!   0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3}},
!  {0x02c6, 64, { 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
!   0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90,
!   0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x11, 0xf0, 0x12, 0x13, 0x04, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e}},
!  {0x0306, 64, { 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd6, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e,
!   0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd6, 0x75, 0x29,
!   0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5,
!   0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11}},
!  {0x0346, 64, { 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd6,
!   0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff,
!   0xad, 0x3e, 0x12, 0x11, 0xd6, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60}},
!  {0x0386, 64, { 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
!   0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4,
!   0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0,
!   0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
!  {0x03c6, 64, { 0x1a, 0x52, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
!   0x04, 0x15, 0x13, 0x80, 0x3e, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x04,
!   0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
!   0x40, 0xef, 0x54, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07}},
!  {0x0406, 64, { 0x30, 0x0d, 0x11, 0x12, 0x13, 0x40, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19,
!   0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf4, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x7c, 0xef,
!   0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb2, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a,
!   0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12}},
!  {0x0446, 64, { 0x13, 0x7c, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f,
!   0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41,
!   0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x22, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0,
!   0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x7c, 0xef, 0xc3, 0x94}},
!  {0x0486, 64, { 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19,
!   0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d,
!   0xc1, 0x12, 0x0d, 0x22, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30,
!   0xe1, 0x03, 0x02, 0x05, 0x40, 0x53, 0x37, 0x80, 0x12, 0x13, 0x88, 0xef, 0x42, 0x37, 0x12}},
!  {0x04c6, 64, { 0x12, 0x45, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x64, 0xef, 0x30, 0xe0, 0x08,
!   0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x37,
!   0x80, 0x57, 0x12, 0x13, 0x88, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3,
!   0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75}},
!  {0x0506, 64, { 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0xa2, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb,
!   0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08,
!   0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12,
!   0x0d, 0x47, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1}},
!  {0x0546, 64, { 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x9f, 0xc2, 0x06, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
!   0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
!   0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5,
!   0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
!  {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x20, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x20, 0x43, 0x47,
!   0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
!   0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x3e, 0x90, 0x7e, 0x22, 0xe0,
!   0xff, 0x12, 0x11, 0x64, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x20, 0x7f}},
!  {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x20, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
!   0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
!   0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
!   0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
!  {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
!   0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
!   0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
!   0x11, 0x8a, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xb0, 0xaf, 0x43, 0x12, 0x11, 0x18}},
!  {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x18, 0x90, 0x7e, 0x2c,
!   0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
!   0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
!   0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
!  {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
!   0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
!   0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
!   0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
!  {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x58,
!   0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
!   0x20, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
!   0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x20, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
!  {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
!   0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
!   0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
!   0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x20, 0x75, 0x34, 0x01, 0xd2, 0x08}},
!  {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x20, 0xe4,
!   0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
!   0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
!   0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
!  {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
!   0x74, 0x36, 0xf0, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x52, 0xe5, 0x39, 0x60, 0x02, 0x15,
!   0x39, 0x30, 0x13, 0x49, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x3e, 0x75,
!   0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x58, 0xef, 0x54, 0x01, 0xf5, 0x19}},
!  {0x07c6, 64, { 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0x94, 0xef, 0x54, 0x80, 0xf5, 0x19,
!   0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x94, 0xef,
!   0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a,
!   0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5}},
!  {0x0806, 64, { 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74,
!   0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1,
!   0x03, 0x02, 0x09, 0x28, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2,
!   0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
!  {0x0846, 64, { 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
!   0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38,
!   0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08,
!   0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d}},
!  {0x0886, 64, { 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82,
!   0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f,
!   0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a,
!   0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00}},
!  {0x08c6, 64, { 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18,
!   0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb,
!   0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15,
!   0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00}},
!  {0x0906, 64, { 0xfa, 0x12, 0x0e, 0xaa, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef,
!   0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5,
!   0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0f, 0x02, 0x0a, 0x10, 0x00, 0x0a, 0x84, 0x01, 0x0a,
!   0xf0, 0x03, 0x09, 0x4c, 0x06, 0x0a, 0x03, 0x08, 0x09, 0xfd, 0x09, 0x09, 0xe5, 0x0a, 0x09}},
!  {0x0946, 64, { 0xf4, 0x0b, 0x00, 0x00, 0x0b, 0x3f, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61,
!   0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdb, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90,
!   0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02,
!   0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83}},
!  {0x0986, 64, { 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75,
!   0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83,
!   0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b,
!   0x46, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x28, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90}},
!  {0x09c6, 64, { 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01,
!   0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f,
!   0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea,
!   0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x46, 0x12, 0x0b, 0x4e, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0x00}},
!  {0x0a06, 64, { 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60,
!   0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff,
!   0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74,
!   0x02, 0xf0, 0x02, 0x0b, 0x46, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5}},
!  {0x0a46, 64, { 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f,
!   0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83,
!   0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0,
!   0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x46, 0x90, 0x7f}},
!  {0x0a86, 64, { 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0,
!   0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x46, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
!   0x0b, 0x46, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff,
!   0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4}},
!  {0x0ac6, 64, { 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54,
!   0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60,
!   0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80}},
!  {0x0b06, 64, { 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90,
!   0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25,
!   0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90,
!   0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0}},
!  {0x0b46, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74,
!   0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e,
!   0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74,
!   0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74}},
!  {0x0b86, 64, { 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4,
!   0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b,
!   0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01, 0x90, 0x7f, 0x98, 0x74,
!   0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd}},
!  {0x0bc6, 64, { 0x12, 0x11, 0xd6, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0xa6, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f,
!   0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0,
!   0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xd6, 0xe4,
!   0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xd6, 0x90, 0x7f, 0x98, 0x74, 0x11}},
!  {0x0c06, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xd6, 0x7f, 0x01, 0x12, 0x12,
!   0x8f, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xd6, 0x7f, 0x13, 0x7d, 0x01, 0x12, 0x11, 0xd6, 0x20,
!   0x1b, 0x03, 0x02, 0x0c, 0xd5, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25,
!   0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4}},
!  {0x0c46, 64, { 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2,
!   0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0xd2, 0x04, 0xd2, 0x02, 0x90, 0x7f, 0x98, 0x74, 0x0b,
    0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x12,
!   0x20, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x18, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x7f}},
!  {0x0c86, 64, { 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x75,
!   0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x12, 0x20, 0xe4, 0xff,
!   0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x20, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90,
!   0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x20, 0x7f, 0x01, 0x12, 0x12}},
!  {0x0cc6, 64, { 0xb0, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x20, 0x7f, 0x13, 0x7d, 0x01, 0x12, 0x12, 0x20, 0xd2, 0x12,
!   0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5,
    0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05,
!   0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5}},
!  {0x0d06, 64, { 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86,
!   0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08,
    0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90,
!   0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf}},
!  {0x0d46, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83,
!   0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7,
    0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5,
!   0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87}},
!  {0x0d86, 64, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x90,
!   0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43,
    0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74,
!   0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f}},
!  {0x0dc6, 64, { 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x1a, 0x12,
!   0x12, 0x6a, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2, 0x12, 0x90, 0x7f, 0xa1,
    0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12, 0x05, 0xd2, 0x1a, 0x12,
!   0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12, 0x05, 0xc2, 0x1a}},
!  {0x0e06, 64, { 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x29, 0x80, 0xd6, 0x30, 0x18, 0xd3, 0xc2,
!   0x18, 0x12, 0x13, 0xa0, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x47,
!   0x02, 0x0e, 0x65, 0x02, 0x0d, 0x8d, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6,
!   0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24}},
!  {0x0e46, 64, { 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01,
!   0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x12,
!   0xd1, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f,
!   0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40}},
!  {0x0e86, 64, { 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca,
!   0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde,
    0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22,
!   0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c}},
!  {0x0ec6, 64, { 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25, 0x82,
!   0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5,
    0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83,
!   0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82}},
!  {0x0f06, 64, { 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93,
!   0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80,
    0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19, 0x75, 0x1c, 0x86, 0xab,
!   0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xc3, 0xb4, 0x03, 0x1d, 0xaf}},
!  {0x0f46, 64, { 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0xaa, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a,
!   0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79,
    0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5,
!   0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c}},
!  {0x0f86, 64, { 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a,
!   0x12, 0x13, 0x34, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5,
    0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12,
!   0x13, 0x4c, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82}},
!  {0x0fc6, 64, { 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x88, 0x8f, 0x1a, 0xef, 0x42,
!   0x37, 0x80, 0xca, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
!   0x75, 0x86, 0x00, 0x30, 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90,
!   0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83}},
!  {0x1006, 64, { 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86,
!   0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0,
!   0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83,
!   0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53, 0x91}},
!  {0x1046, 64, { 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83,
!   0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
!   0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0}},
!  {0x1086, 64, { 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
!   0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12,
!   0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54}},
!  {0x10c6, 64, { 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
!   0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
!   0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13,
!   0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0}},
!  {0x1106, 64, { 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45,
!   0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0}},
!  {0x1146, 64, { 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98,
!   0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90,
!   0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90}},
!  {0x1186, 64, { 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
!   0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
!   0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef}},
!  {0x11c6, 64, { 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90,
!   0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0,
!   0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x1c, 0x8f, 0x1a, 0x12, 0x13, 0x1c, 0x8f, 0x1b, 0xe5}},
!  {0x1206, 64, { 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x1c, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12,
!   0x13, 0x1c, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5,
!   0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00,
!   0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12}},
!  {0x1246, 64, { 0x13, 0x70, 0x8f, 0x1a, 0x12, 0x13, 0x70, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13,
!   0x70, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x70, 0x8f, 0x1b, 0x80, 0xe8,
!   0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a,
!   0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xed, 0x90, 0x7f, 0xd6}},
!  {0x1286, 64, { 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f,
!   0xfd, 0x12, 0x11, 0xd6, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4,
!   0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12, 0x11, 0xd6, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54,
!   0x7f, 0xfd, 0x12, 0x12, 0x20, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee}},
!  {0x12c6, 64, { 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80, 0xfd, 0x12, 0x12, 0x20, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00,
!   0x00, 0x03, 0x14, 0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16,
!   0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18,
!   0x70, 0x02, 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x6c, 0x80, 0xee, 0x22, 0x90, 0x7f}},
!  {0x1306, 64, { 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90,
!   0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
!   0x22, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
!   0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0}},
!  {0x1346, 64, { 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
!   0x22, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
!   0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90,
!   0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0}},
!  {0x1386, 64, { 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98,
!   0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x00, 0x03, 0x12, 0x0d, 0x7d, 0x12,
!   0x0b, 0x4e, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x33, 0x00, 0x02, 0x14}},
!  {0x1406, 64, { 0x04, 0x00, 0x02, 0x10, 0x09, 0x00, 0x02, 0x0f, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
***************
*** 427,439 ****
   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x15, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
!   0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x83, 0x02,
    0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
    0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
--- 424,436 ----
   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x15, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
    0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x05, 0x02, 0x40, 0x00}},
   {0x1946, 64, { 0x00, 0x07, 0x05, 0x06, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05,
!   0x81, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x83, 0x02,
    0x40, 0x00, 0x01, 0x07, 0x05, 0x84, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x85, 0x02, 0x40, 0x00,
    0x01, 0x07, 0x05, 0x86, 0x02, 0x40, 0x00, 0x01, 0x07, 0x05, 0x87, 0x02, 0x40, 0x00, 0x01}},
   {0x1986, 64, { 0x04, 0x03, 0x09, 0x04, 0x48, 0x03, 0x4b, 0x00, 0x65, 0x00, 0x79, 0x00, 0x73, 0x00, 0x70, 0x00, 0x61,
***************
*** 445,449 ****
    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
!  {0xffff,  0, {0x00}}
  };
--- 442,446 ----
    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
!  { 0xffff,	0,	{0x00} }
  };
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa28xb_fw.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa28xb_fw.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa28xb_fw.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa28xb_fw.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,353 ****
  /* keyspan_usa28xb_fw.h
  
! 	The firmware contained herein as keyspan_usa29xb_fw.h is
  
! 		Copyright (C) 1999-2001
! 		Keyspan, A division of InnoSys Incorporated ("Keyspan")
! 		
! 	as an unpublished work. This notice does not imply unrestricted or
! 	public access to the source code from which this firmware image is
! 	derived.  Except as noted below this firmware image may not be 
! 	reproduced, used, sold or transferred to any third party without 
! 	Keyspan's prior written consent.  All Rights Reserved.
  
! 	Permission is hereby granted for the distribution of this firmware 
! 	image as part of a Linux or other Open Source operating system kernel 
! 	in text or binary form as required. 
  
! 	This firmware may not be modified and may only be used with  
! 	Keyspan hardware.  Distribution and/or Modification of the 
! 	keyspan.c driver which includes this firmware, in whole or in 
! 	part, requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa28xb_firmware[] = {
!  {0x0033,  3, { 0x02, 0x00, 0x2d}},
!  {0x002d,  4, { 0x53, 0xd8, 0xef, 0x32}},
!  {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
!  {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
!  {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xcc}},
   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
!  {0x00a6, 16, { 0x12, 0x13, 0x33, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
!  {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xcc, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
!  {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x60, 0x12, 0x11, 0xf5, 0x8f}},
!  {0x00e6, 16, { 0x19, 0x12, 0x13, 0x3f, 0x8f, 0x36, 0xe5, 0x19, 0xc3, 0x95, 0x3a, 0x50, 0x0f, 0x12, 0x13, 0x1b}},
!  {0x00f6, 16, { 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x5e, 0xc2, 0x0b, 0xe5, 0x19}},
   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
!  {0x0043,  3, { 0x02, 0x13, 0x00}},
!  {0x0003, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90}},
!  {0x0013, 16, { 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0}},
!  {0x0023, 10, { 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32}},
!  {0x0000,  3, { 0x02, 0x0e, 0x12}},
!  {0x0106, 64, { 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x36, 0x02, 0xe5, 0x36, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94,
!   0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e,
!   0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x5d, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0,
!   0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08}},
!  {0x0146, 64, { 0x90, 0x7e, 0x80, 0xe5, 0x36, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12,
!   0x0c, 0xf1, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90, 0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06,
!   0x20, 0x05, 0x03, 0x02, 0x03, 0xc1, 0xe4, 0xf5, 0x18, 0x74, 0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4,
!   0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79}},
!  {0x0186, 64, { 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4,
!   0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01,
!   0xe4, 0xfd, 0x12, 0x11, 0xd0, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x11, 0xd0, 0x43, 0x46, 0x80, 0x90,
!   0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13}},
!  {0x01c6, 64, { 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x54, 0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12,
!   0x10, 0x7a, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12, 0x11, 0xd0, 0x7f, 0x03, 0x7d, 0x07,
!   0x12, 0x11, 0xd0, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5,
!   0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00}},
!  {0x0206, 64, { 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13,
!   0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0,
!   0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80, 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53}},
!  {0x0246, 64, { 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x10, 0xc6,
!   0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xec, 0xaf, 0x42, 0x12, 0x10, 0xa0, 0x90, 0x7e, 0x03,
!   0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10, 0xa0, 0x90, 0x7e, 0x0c, 0xe0, 0x60,
!   0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80, 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f}},
!  {0x0286, 64, { 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3,
!   0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14,
!   0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12, 0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13,
!   0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x10, 0x80, 0x03}},
!  {0x02c6, 64, { 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e,
!   0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54,
!   0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x12, 0x13, 0x0f, 0xef, 0x54,
!   0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0}},
!  {0x0306, 64, { 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4,
!   0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0, 0x75, 0x29, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60,
!   0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2,
!   0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13}},
!  {0x0346, 64, { 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e,
!   0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0, 0x75, 0x2b, 0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b,
!   0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xd0, 0xe4, 0xf5, 0x2b,
!   0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5}},
!  {0x0386, 64, { 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0, 0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e,
!   0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38, 0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0,
!   0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31, 0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35,
!   0xf0, 0xd2, 0x03, 0xc2, 0x05, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30, 0x1a, 0x54, 0xe5, 0x38}},
!  {0x03c6, 64, { 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x4b, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
!   0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x0f, 0xef, 0x54, 0x01, 0xf5,
!   0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x80,
!   0x64, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26, 0xd2, 0x07, 0x30, 0x0d}},
!  {0x0406, 64, { 0x11, 0x12, 0x13, 0x4b, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05, 0x85, 0x19, 0x25, 0xd2,
!   0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf0, 0x30, 0x0a, 0x18, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x95,
!   0x3d, 0x40, 0x03, 0x02, 0x04, 0xb0, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0, 0xc2, 0x0a, 0xc2, 0x00,
!   0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x87}},
!  {0x0446, 64, { 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcb, 0xe0,
!   0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d, 0x7f, 0x41, 0x75, 0x0c,
!   0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x16, 0xc2, 0x04, 0xe4, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x39,
!   0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x87, 0xef, 0xc3, 0x94, 0x40, 0x50}},
!  {0x0486, 64, { 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00,
!   0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c, 0x75, 0x0d, 0xc1, 0x12,
!   0x0d, 0x16, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba, 0xe0, 0x30, 0xe1, 0x03,
!   0x02, 0x05, 0x38, 0x12, 0x12, 0x3f, 0x8f, 0x19, 0x12, 0x13, 0x93, 0x8f, 0x37, 0xe5, 0x19}},
!  {0x04c6, 64, { 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x6f, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03,
!   0x30, 0x0c, 0x5e, 0xc2, 0x0c, 0xe5, 0x19, 0x60, 0x58, 0xb4, 0x80, 0x03, 0x43, 0x37, 0x02, 0xe5,
!   0x37, 0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19,
!   0x08, 0x7e, 0x7d, 0x7f, 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f}},
!  {0x0506, 64, { 0x96, 0xe5, 0x19, 0x25, 0xe0, 0x90, 0x7f, 0xbb, 0xf0, 0x80, 0x27, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40,
!   0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0x90, 0x7d, 0x80, 0xe5, 0x37, 0xf0, 0x7e, 0x7d, 0x7f,
!   0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x3b, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb,
!   0xf0, 0x90, 0x7f, 0xd0, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0x99, 0xe4}},
!  {0x0546, 64, { 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18,
!   0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef,
!   0x12, 0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68,
!   0x90, 0x7e, 0x23, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x1a, 0x7f, 0x03}},
!  {0x0586, 64, { 0x7d, 0xcd, 0x12, 0x12, 0x1a, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00,
!   0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12,
!   0x11, 0x38, 0x90, 0x7e, 0x22, 0xe0, 0xff, 0x12, 0x11, 0x5e, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0,
!   0xfd, 0x12, 0x12, 0x1a, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x1a, 0x43, 0x47, 0x80, 0x90}},
!  {0x05c6, 64, { 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
!   0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e,
!   0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90, 0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0,
!   0x60, 0x12, 0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90}},
!  {0x0606, 64, { 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e, 0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43,
!   0x80, 0x80, 0x03, 0x53, 0x43, 0x7f, 0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43,
!   0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x11, 0x84, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xaa,
!   0xaf, 0x43, 0x12, 0x11, 0x12, 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf}},
!  {0x0646, 64, { 0x43, 0x12, 0x11, 0x12, 0x90, 0x7e, 0x2c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02,
!   0x80, 0x03, 0x53, 0x47, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47,
!   0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03,
!   0x53, 0x47, 0xfe, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0}},
!  {0x0686, 64, { 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3, 0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0,
!   0x60, 0x05, 0x43, 0x47, 0x10, 0x80, 0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0,
!   0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90,
!   0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
!  {0x06c6, 64, { 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x63, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd,
!   0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e,
!   0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a, 0x75, 0x32,
!   0x01, 0xd2, 0x08, 0x90, 0x7e, 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0}},
!  {0x0706, 64, { 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43,
!   0x45, 0x40, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f, 0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a,
!   0x75, 0x34, 0x01, 0xd2, 0x08, 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4}},
!  {0x0746, 64, { 0xff, 0xad, 0x3f, 0x12, 0x12, 0x1a, 0xe4, 0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e,
!   0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
!   0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c, 0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4,
!   0xf5, 0x39, 0xd2, 0x08, 0x90, 0x7e, 0x3f, 0xe0, 0x60, 0x11, 0x90, 0x7f, 0xd7, 0x74, 0x13}},
!  {0x0786, 64, { 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0, 0x74, 0x36, 0xf0, 0xd2, 0x04, 0xc2, 0x06, 0xe4, 0x90, 0x7f,
!   0xd1, 0xf0, 0x30, 0x1a, 0x54, 0xe5, 0x39, 0x60, 0x02, 0x15, 0x39, 0x30, 0x13, 0x4b, 0xe5, 0x13,
!   0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80, 0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2,
!   0x13, 0x12, 0x13, 0x63, 0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19}},
!  {0x07c6, 64, { 0x33, 0xd2, 0x08, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x80, 0x64, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05,
!   0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11, 0x12, 0x13, 0x9f, 0xef, 0x54, 0x10, 0xf5, 0x19,
!   0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2, 0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0,
!   0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0, 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42}},
!  {0x0806, 64, { 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37,
!   0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x24,
!   0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5, 0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e,
!   0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e}},
!  {0x0846, 64, { 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5,
!   0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c,
!   0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01, 0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70,
!   0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee}},
!  {0x0886, 64, { 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5,
!   0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0,
!   0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a, 0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36,
!   0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18}},
!  {0x08c6, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34,
!   0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
!   0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15, 0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e,
!   0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0x9e}},
!  {0x0906, 64, { 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5,
!   0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f,
!   0xe9, 0xe0, 0x12, 0x0e, 0xf6, 0x0a, 0x0c, 0x00, 0x0a, 0x80, 0x01, 0x0a, 0xec, 0x03, 0x09, 0x48,
!   0x06, 0x09, 0xff, 0x08, 0x09, 0xf9, 0x09, 0x09, 0xe1, 0x0a, 0x09, 0xf0, 0x0b, 0x00, 0x00}},
!  {0x0946, 64, { 0x0b, 0x3b, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03,
!   0x02, 0x09, 0xd7, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02,
!   0x0b, 0x42, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04, 0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82,
!   0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75, 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82}},
!  {0x0986, 64, { 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83,
!   0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75, 0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19,
!   0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xea,
!   0xe0, 0xff, 0x12, 0x0f, 0x1c, 0xea, 0x49, 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9}},
!  {0x09c6, 64, { 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42,
!   0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0,
!   0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02,
!   0x0b, 0x42, 0x12, 0x0b, 0x4a, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90}},
!  {0x0a06, 64, { 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31,
!   0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33,
!   0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b,
!   0x42, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02}},
!  {0x0a46, 64, { 0x0b, 0x42, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07,
!   0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90,
!   0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x42, 0x90,
!   0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe}},
!  {0x0a86, 64, { 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2,
!   0x10, 0x02, 0x0b, 0x42, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x42, 0x90, 0x7f,
!   0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff,
!   0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83}},
!  {0x0ac6, 64, { 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54,
!   0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0,
!   0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70,
!   0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4}},
!  {0x0b06, 64, { 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4,
!   0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5,
!   0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
!   0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0}},
!  {0x0b46, 64, { 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90,
!   0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e, 0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f,
!   0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9}},
!  {0x0b86, 64, { 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a,
!   0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36, 0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00,
!   0xc2, 0x09, 0xc2, 0x13, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00,
!   0x74, 0x03, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xd0, 0x7f, 0x10, 0x8f, 0x42, 0x12}},
!  {0x0bc6, 64, { 0x10, 0xa0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0,
!   0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80,
!   0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x11, 0xd0, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12,
!   0x11, 0xd0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05}},
!  {0x0c06, 64, { 0x7d, 0x7f, 0x12, 0x11, 0xd0, 0x7f, 0x01, 0x12, 0x12, 0x89, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xd0,
!   0x7f, 0x13, 0x7d, 0x09, 0x12, 0x11, 0xd0, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xc9, 0x75, 0x2d, 0x01,
!   0x75, 0x18, 0x01, 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12,
!   0x0e, 0xe4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39}},
!  {0x0c46, 64, { 0xf5, 0x13, 0xf5, 0x37, 0xc2, 0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0x90,
    0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c,
!   0xe4, 0xfd, 0x12, 0x12, 0x1a, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x12, 0x90, 0x7f, 0x98, 0x74,
!   0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f}},
!  {0x0c86, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
!   0x12, 0x1a, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x1a, 0x90, 0x7f, 0x98,
!   0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x1a, 0x7f,
!   0x01, 0x12, 0x12, 0xaa, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x1a, 0x7f, 0x13, 0x7d, 0x09}},
!  {0x0cc6, 64, { 0x12, 0x12, 0x1a, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5,
    0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3,
!   0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0,
!   0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90}},
!  {0x0d06, 64, { 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90,
    0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2,
!   0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf,
!   0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5}},
!  {0x0d46, 64, { 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3,
    0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5,
!   0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80,
!   0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92}},
!  {0x0d86, 64, { 0xe0, 0x44, 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e,
    0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0,
!   0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91,
!   0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0}},
!  {0x0dc6, 64, { 0xd2, 0xaf, 0xd2, 0x1a, 0x12, 0x12, 0x64, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2,
    0x12, 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12,
!   0x05, 0xd2, 0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30, 0x12,
!   0x05, 0xc2, 0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x25, 0x80}},
!  {0x0e06, 64, { 0xd6, 0x30, 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x13, 0xab, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8,
!   0xfd, 0x75, 0x81, 0x47, 0x02, 0x0e, 0x59, 0x02, 0x0d, 0x81, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93,
!   0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8,
!   0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40}},
!  {0x0e46, 64, { 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20,
!   0x40, 0x80, 0x90, 0x12, 0xcb, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30,
!   0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0,
!   0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3}},
!  {0x0e86, 64, { 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83,
    0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22,
!   0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22,
!   0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22}},
!  {0x0ec6, 64, { 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22,
    0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06,
!   0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0,
!   0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3}},
!  {0x0f06, 64, { 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef,
    0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19,
!   0x75, 0x1c, 0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xb7, 0xb4,
!   0x03, 0x1d, 0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0x9e, 0x7e}},
!  {0x0f46, 64, { 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b,
    0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02,
!   0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d, 0xe5,
!   0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15}},
!  {0x0f86, 64, { 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x3f, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f,
    0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83,
!   0xe5, 0x1a, 0xf0, 0x12, 0x13, 0x57, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c,
!   0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13}},
!  {0x0fc6, 64, { 0x93, 0x8f, 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c,
    0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74,
!   0x27, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4, 0x90,
!   0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x22}},
!  {0x1006, 64, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11,
!   0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0,
!   0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84,
!   0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08}},
!  {0x1046, 64, { 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7f, 0x98,
!   0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90,
!   0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0,
!   0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0}},
!  {0x1086, 64, { 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0,
!   0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90,
!   0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22}},
!  {0x10c6, 64, { 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x14,
!   0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f,
!   0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
!   0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98}},
!  {0x1106, 64, { 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b,
!   0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0, 0x00,
!   0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0,
!   0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f}},
!  {0x1146, 64, { 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45,
!   0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00,
!   0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f}},
!  {0x1186, 64, { 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90,
!   0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0,
!   0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b}},
!  {0x11c6, 64, { 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
!   0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0, 0x90, 0xc0, 0x00,
!   0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13,
!   0x27, 0x8f, 0x1a, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12}},
!  {0x1206, 64, { 0x13, 0x27, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x27, 0x8f, 0x1b, 0x80, 0xe8,
!   0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00,
!   0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74,
!   0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0x12, 0x13}},
!  {0x1246, 64, { 0x7b, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x7b, 0x8f, 0x1a, 0xe5, 0x1a, 0x65,
!   0x1b, 0x60, 0x07, 0x12, 0x13, 0x7b, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0xd6,
!   0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f,
!   0xf4, 0x7e, 0x01, 0x12, 0x12, 0xe7, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0xe0, 0x44}},
!  {0x1286, 64, { 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11, 0xd0, 0x90, 0x7f,
!   0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44, 0x80, 0xfd, 0x12,
!   0x11, 0xd0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd, 0x12, 0x12, 0x1a, 0x90,
!   0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f, 0x44, 0x80}},
!  {0x12c6, 64, { 0xfd, 0x12, 0x12, 0x1a, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14, 0x03, 0x00, 0x00,
!   0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00, 0xc1, 0x9b, 0x00,
!   0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e, 0x60,
!   0x05, 0x12, 0x0d, 0x60, 0x80, 0xee, 0x22, 0x00, 0x00, 0x02, 0x10, 0x06, 0x00, 0x02, 0x13}},
!  {0x1306, 64, { 0x04, 0x00, 0x02, 0x00, 0x03, 0x00, 0x02, 0x10, 0x2d, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90}},
!  {0x1346, 64, { 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff}},
!  {0x1386, 64, { 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x12, 0x0f, 0xcf, 0x12, 0x0d, 0x71, 0x12, 0x0b, 0x4a, 0x22, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
!  {0x1406, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
--- 1,352 ----
  /* keyspan_usa28xb_fw.h
  
!    Generated from Keyspan firmware image usacode36.h Sat Oct  6 12:07:38 EST 2001
!    This firmware is for the Keyspan USA-28XA Serial Adaptor
  
!    "The firmware contained herein as keyspan_usa28xb_fw.h is
!    Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
!    ("Keyspan"), as an unpublished work.  This notice does not imply
!    unrestricted or public access to the source code from which this 
!    firmware image is derived.  Except as noted below this firmware image
!    may not be reproduced, used, sold or transferred to any third party
!    without Keyspan's prior written consent.  All Rights Reserved.
  
!    Permission is hereby granted for the distribution of this firmware image
!    as part of a Linux or other Open Source operating system kernel in 
!    text or binary form as required.
  
!    This firmware may not be modified and may only be used with the Keyspan 
!    USA-28 Serial Adapter.  Distribution and/or Modification of the
!    keyspan.c driver which includes this firmware, in whole or in part,
!    requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa28xb_firmware[] = {
!  {0x0033,  3, { 0x02, 0x13, 0xb7}},
!  {0x0046, 16, { 0x30, 0x09, 0x18, 0x12, 0x13, 0x35, 0xef, 0xc3, 0x95, 0x3c, 0x40, 0x03, 0x02, 0x00, 0xd8, 0x90}},
   {0x0056, 16, { 0x7f, 0xbf, 0x74, 0x01, 0xf0, 0xc2, 0x09, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x03, 0x3b, 0x90, 0x7f}},
!  {0x0066, 16, { 0xc6, 0xe0, 0x20, 0xe1, 0x6d, 0x12, 0x13, 0x35, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7e}},
   {0x0076, 16, { 0x40, 0xe0, 0x13, 0x92, 0x09, 0x90, 0x7f, 0xc7, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60}},
!  {0x0086, 16, { 0x0f, 0xf5, 0x08, 0x7e, 0x7e, 0x7f, 0x41, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x41, 0x12, 0x0c, 0xdc}},
   {0x0096, 16, { 0xc2, 0x03, 0xe4, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xc8, 0xe0, 0x20, 0xe1, 0x32}},
!  {0x00a6, 16, { 0x12, 0x13, 0x35, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7d, 0xc0, 0xe0, 0x13, 0x92, 0x09}},
   {0x00b6, 16, { 0x90, 0x7f, 0xc9, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d}},
!  {0x00c6, 16, { 0x7f, 0xc1, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0xc1, 0x12, 0x0c, 0xdc, 0xd2, 0x03, 0xe4, 0x90, 0x7f}},
!  {0x00d6, 16, { 0xc9, 0xf0, 0x90, 0x7f, 0xb6, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x01, 0x66, 0x53, 0x36, 0x80, 0x12}},
!  {0x00e6, 16, { 0x13, 0x41, 0xef, 0x42, 0x36, 0x12, 0x12, 0x08, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3a, 0x50, 0x0f}},
!  {0x00f6, 16, { 0x12, 0x13, 0x1d, 0xef, 0x30, 0xe0, 0x08, 0xe5, 0x36, 0x20, 0xe7, 0x03, 0x30, 0x0b, 0x61, 0xc2}},
   {0x0036, 12, { 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
!  {0x0043,  3, { 0x02, 0x14, 0x00}},
!  {0x0003, 16, { 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x30}},
!  {0x0013, 16, { 0x15, 0x04, 0xc2, 0x15, 0x80, 0x02, 0xd2, 0x18, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08}},
!  {0x0023, 14, { 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32}},
!  {0x0000,  3, { 0x02, 0x0e, 0x22}},
!  {0x0106, 64, { 0x0b, 0xe5, 0x19, 0x70, 0x04, 0xf5, 0x36, 0x80, 0x57, 0x12, 0x13, 0x41, 0xef, 0x42, 0x36, 0xe5, 0x36,
!   0x30, 0xe7, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08,
!   0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x0c, 0x7e, 0x75, 0x0d, 0x80, 0xaf, 0x36, 0x12, 0x0f, 0x6d, 0xe5,
!   0x19, 0x25, 0xe0, 0x90, 0x7f, 0xb7, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40}},
!  {0x0146, 64, { 0x03, 0x75, 0x19, 0x3f, 0x85, 0x19, 0x08, 0xe4, 0x90, 0x7e, 0x80, 0xf0, 0x7e, 0x7e, 0x7f, 0x81, 0x75,
!   0x0c, 0x7e, 0x75, 0x0d, 0x81, 0x12, 0x0d, 0x01, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xb7, 0xf0, 0x90,
!   0x7f, 0xce, 0xe0, 0x30, 0xe1, 0x06, 0x20, 0x05, 0x03, 0x02, 0x03, 0xc5, 0xe4, 0xf5, 0x18, 0x74,
!   0x40, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7c, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c}},
!  {0x0186, 64, { 0x00, 0x7b, 0x01, 0x7a, 0x7e, 0x79, 0x00, 0x24, 0x00, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e,
!   0xf4, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x00, 0xe0, 0x60, 0x68, 0x90, 0x7e,
!   0x03, 0xe0, 0x60, 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x11, 0xe3, 0x7f, 0x03, 0x7d, 0xcd, 0x12,
!   0x11, 0xe3, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5}},
!  {0x01c6, 64, { 0x46, 0xf0, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x01, 0xe0, 0xff, 0x12, 0x10, 0x67,
!   0x90, 0x7e, 0x02, 0xe0, 0xff, 0x12, 0x10, 0x8d, 0x7f, 0x01, 0x90, 0x7e, 0x11, 0xe0, 0xfd, 0x12,
!   0x11, 0xe3, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xe3, 0x43, 0x46, 0x80, 0x90, 0x7f, 0x98, 0x74,
!   0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5}},
!  {0x0206, 64, { 0x40, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x03, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x13, 0xe0,
!   0x70, 0x08, 0xe4, 0x90, 0x7e, 0x13, 0xf0, 0x75, 0x25, 0xff, 0x90, 0x7e, 0x05, 0xe0, 0x60, 0x12,
!   0xa3, 0xe0, 0x54, 0x3f, 0xf5, 0x44, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe5,
!   0x44, 0xf0, 0x90, 0x7e, 0x07, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x42, 0x80}},
!  {0x0246, 64, { 0x80, 0x03, 0x53, 0x42, 0x7f, 0x53, 0x42, 0xfc, 0x90, 0x7e, 0x09, 0xe0, 0x60, 0x11, 0x43, 0x42, 0x02,
!   0xa3, 0xe0, 0xff, 0x12, 0x10, 0xd9, 0x90, 0x7e, 0x0b, 0xe0, 0xff, 0x12, 0x10, 0xff, 0xaf, 0x42,
!   0x12, 0x10, 0xb3, 0x90, 0x7e, 0x03, 0xe0, 0x60, 0x08, 0x53, 0x42, 0x7f, 0xaf, 0x42, 0x12, 0x10,
!   0xb3, 0x90, 0x7e, 0x0c, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x02, 0x80}},
!  {0x0286, 64, { 0x03, 0x53, 0x46, 0xfd, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90,
!   0x7e, 0x0e, 0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x46, 0x01, 0x80, 0x03, 0x53, 0x46,
!   0xfe, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x12,
!   0xe0, 0xf5, 0x3a, 0xa3, 0xe0, 0x13, 0x92, 0x0d, 0xa3, 0xe0, 0xf5, 0x3c, 0xa3, 0xe0, 0x60}},
!  {0x02c6, 64, { 0x05, 0x43, 0x46, 0x10, 0x80, 0x03, 0x53, 0x46, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0,
!   0x00, 0xe5, 0x46, 0xf0, 0x90, 0x7e, 0x16, 0xe0, 0x60, 0x32, 0x53, 0x44, 0xbf, 0x90, 0x7f, 0x98,
!   0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11,
!   0xf0, 0x12, 0x13, 0x11, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3e, 0xfd, 0xe4}},
!  {0x0306, 64, { 0xff, 0xad, 0x3e, 0x12, 0x11, 0xe3, 0xe4, 0xf5, 0x2a, 0xf5, 0x29, 0xd2, 0x07, 0x90, 0x7e, 0x17, 0xe0,
!   0x60, 0x0f, 0x43, 0x3e, 0x02, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xe3, 0x75, 0x29, 0x01, 0xd2,
!   0x07, 0x90, 0x7e, 0x18, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44,
!   0x04, 0x90, 0xc0, 0x00, 0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x19, 0xe0, 0x60, 0x11, 0x43, 0x44}},
!  {0x0346, 64, { 0x40, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e,
!   0x1a, 0xe0, 0x60, 0x0f, 0x53, 0x3e, 0xfe, 0xe4, 0xff, 0xad, 0x3e, 0x12, 0x11, 0xe3, 0x75, 0x2b,
!   0x01, 0xd2, 0x07, 0x90, 0x7e, 0x1b, 0xe0, 0x60, 0x0f, 0x43, 0x3e, 0x01, 0xe4, 0xff, 0xad, 0x3e,
!   0x12, 0x11, 0xe3, 0xe4, 0xf5, 0x2b, 0xd2, 0x07, 0x90, 0x7e, 0x1c, 0xe0, 0x60, 0x0e, 0x90}},
!  {0x0386, 64, { 0x7f, 0x98, 0x74, 0x12, 0xf0, 0xe5, 0x40, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x1d, 0xe0,
!   0x60, 0x02, 0xd2, 0x0b, 0x90, 0x7e, 0x1e, 0xe0, 0x60, 0x08, 0x75, 0x2c, 0x01, 0xe4, 0xf5, 0x38,
!   0xd2, 0x07, 0x90, 0x7e, 0x1f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x11, 0xf0, 0x74, 0x31,
!   0xf0, 0x74, 0x15, 0xf0, 0x74, 0x35, 0xf0, 0xc2, 0x05, 0xe4, 0x90, 0x7f, 0xcf, 0xf0, 0x30}},
!  {0x03c6, 64, { 0x1a, 0x54, 0xe5, 0x38, 0x60, 0x02, 0x15, 0x38, 0x20, 0x13, 0x4b, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40,
!   0x04, 0x15, 0x13, 0x80, 0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xd2, 0x13, 0x12, 0x13, 0x11,
!   0xef, 0x54, 0x01, 0xf5, 0x19, 0x65, 0x2a, 0x60, 0x05, 0x85, 0x19, 0x2a, 0xd2, 0x07, 0x12, 0x13,
!   0x4d, 0xef, 0x54, 0x80, 0x64, 0x80, 0xf5, 0x19, 0x65, 0x26, 0x60, 0x05, 0x85, 0x19, 0x26}},
!  {0x0406, 64, { 0xd2, 0x07, 0x30, 0x0d, 0x11, 0x12, 0x13, 0x4d, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x25, 0x60, 0x05,
!   0x85, 0x19, 0x25, 0xd2, 0x07, 0x20, 0x1b, 0x03, 0x02, 0x07, 0xf8, 0x30, 0x0a, 0x18, 0x12, 0x13,
!   0x89, 0xef, 0xc3, 0x95, 0x3d, 0x40, 0x03, 0x02, 0x04, 0xb4, 0x90, 0x7f, 0xc1, 0x74, 0x01, 0xf0,
!   0xc2, 0x0a, 0xc2, 0x00, 0x80, 0x77, 0x30, 0x04, 0x3b, 0x90, 0x7f, 0xca, 0xe0, 0x20, 0xe1}},
!  {0x0446, 64, { 0x6d, 0x12, 0x13, 0x89, 0xef, 0xc3, 0x94, 0x40, 0x50, 0x64, 0x90, 0x7d, 0x40, 0xe0, 0x13, 0x92, 0x0a,
!   0x90, 0x7f, 0xcb, 0xe0, 0x14, 0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7d,
!   0x7f, 0x41, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x41, 0x12, 0x0d, 0x26, 0xc2, 0x04, 0xe4, 0x90, 0x7f,
!   0xcb, 0xf0, 0x80, 0x39, 0x90, 0x7f, 0xcc, 0xe0, 0x20, 0xe1, 0x32, 0x12, 0x13, 0x89, 0xef}},
!  {0x0486, 64, { 0xc3, 0x94, 0x40, 0x50, 0x29, 0x90, 0x7c, 0xc0, 0xe0, 0x13, 0x92, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x14,
!   0xf5, 0x19, 0x20, 0x00, 0x11, 0x60, 0x0f, 0xf5, 0x08, 0x7e, 0x7c, 0x7f, 0xc1, 0x75, 0x0c, 0x7c,
!   0x75, 0x0d, 0xc1, 0x12, 0x0d, 0x26, 0xd2, 0x04, 0xe4, 0x90, 0x7f, 0xcd, 0xf0, 0x90, 0x7f, 0xba,
!   0xe0, 0x30, 0xe1, 0x03, 0x02, 0x05, 0x42, 0x53, 0x37, 0x80, 0x12, 0x13, 0x95, 0xef, 0x42}},
!  {0x04c6, 64, { 0x37, 0x12, 0x12, 0x52, 0x8f, 0x19, 0xef, 0xc3, 0x95, 0x3b, 0x50, 0x0f, 0x12, 0x13, 0x71, 0xef, 0x30,
!   0xe0, 0x08, 0xe5, 0x37, 0x20, 0xe7, 0x03, 0x30, 0x0c, 0x61, 0xc2, 0x0c, 0xe5, 0x19, 0x70, 0x04,
!   0xf5, 0x37, 0x80, 0x57, 0x12, 0x13, 0x95, 0xef, 0x42, 0x37, 0xe5, 0x37, 0x30, 0xe7, 0x26, 0xe5,
!   0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x08, 0x7e, 0x7d, 0x7f}},
!  {0x0506, 64, { 0x80, 0x75, 0x0c, 0x7d, 0x75, 0x0d, 0x80, 0xaf, 0x37, 0x12, 0x0f, 0xa6, 0xe5, 0x19, 0x25, 0xe0, 0x90,
!   0x7f, 0xbb, 0xf0, 0x80, 0x26, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f, 0x85,
!   0x19, 0x08, 0xe4, 0x90, 0x7d, 0x80, 0xf0, 0x7e, 0x7d, 0x7f, 0x81, 0x75, 0x0c, 0x7d, 0x75, 0x0d,
!   0x81, 0x12, 0x0d, 0x4b, 0xe5, 0x19, 0x04, 0x90, 0x7f, 0xbb, 0xf0, 0x90, 0x7f, 0xd0, 0xe0}},
!  {0x0546, 64, { 0x30, 0xe1, 0x06, 0x20, 0x06, 0x03, 0x02, 0x07, 0xa1, 0xe4, 0xf5, 0x18, 0x74, 0xc0, 0x25, 0x18, 0xf5,
!   0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x18, 0x7c, 0x00, 0x7b, 0x01, 0x7a, 0x7e,
!   0x79, 0x20, 0x24, 0x20, 0xf9, 0xec, 0x34, 0x7e, 0xfa, 0xef, 0x12, 0x0e, 0xf4, 0x05, 0x18, 0xe5,
!   0x18, 0xb4, 0x20, 0xd7, 0x90, 0x7e, 0x20, 0xe0, 0x60, 0x68, 0x90, 0x7e, 0x23, 0xe0, 0x60}},
!  {0x0586, 64, { 0x24, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x12, 0x2d, 0x7f, 0x03, 0x7d, 0xcd, 0x12, 0x12, 0x2d, 0x43, 0x47,
!   0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0xe4, 0x90, 0x7e,
!   0x33, 0xf0, 0x80, 0x30, 0x90, 0x7e, 0x21, 0xe0, 0xff, 0x12, 0x11, 0x4b, 0x90, 0x7e, 0x22, 0xe0,
!   0xff, 0x12, 0x11, 0x71, 0x7f, 0x01, 0x90, 0x7e, 0x31, 0xe0, 0xfd, 0x12, 0x12, 0x2d, 0x7f}},
!  {0x05c6, 64, { 0x03, 0x7d, 0x07, 0x12, 0x12, 0x2d, 0x43, 0x47, 0x80, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0,
!   0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x06, 0x90, 0xc0,
!   0x00, 0xf0, 0x90, 0x7e, 0x23, 0xe0, 0x70, 0x06, 0x90, 0x7e, 0x33, 0xe0, 0x70, 0x08, 0xe4, 0x90,
!   0x7e, 0x33, 0xf0, 0x75, 0x2e, 0xff, 0x90, 0x7e, 0x25, 0xe0, 0x60, 0x12, 0xa3, 0xe0, 0x54}},
!  {0x0606, 64, { 0x3f, 0xf5, 0x45, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x45, 0xf0, 0x90, 0x7e,
!   0x27, 0xe0, 0x60, 0x2b, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x43, 0x80, 0x80, 0x03, 0x53, 0x43, 0x7f,
!   0x53, 0x43, 0xfc, 0x90, 0x7e, 0x29, 0xe0, 0x60, 0x11, 0x43, 0x43, 0x02, 0xa3, 0xe0, 0xff, 0x12,
!   0x11, 0x97, 0x90, 0x7e, 0x2b, 0xe0, 0xff, 0x12, 0x11, 0xbd, 0xaf, 0x43, 0x12, 0x11, 0x25}},
!  {0x0646, 64, { 0x90, 0x7e, 0x23, 0xe0, 0x60, 0x08, 0x53, 0x43, 0x7f, 0xaf, 0x43, 0x12, 0x11, 0x25, 0x90, 0x7e, 0x2c,
!   0xe0, 0x60, 0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x02, 0x80, 0x03, 0x53, 0x47, 0xfd, 0x90,
!   0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x2e, 0xe0, 0x60,
!   0x18, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x01, 0x80, 0x03, 0x53, 0x47, 0xfe, 0x90, 0x7f}},
!  {0x0686, 64, { 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0, 0x90, 0x7e, 0x32, 0xe0, 0xf5, 0x3b, 0xa3,
!   0xe0, 0x13, 0x92, 0x0e, 0xa3, 0xe0, 0xf5, 0x3d, 0xa3, 0xe0, 0x60, 0x05, 0x43, 0x47, 0x10, 0x80,
!   0x03, 0x53, 0x47, 0xef, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe5, 0x47, 0xf0,
!   0x90, 0x7e, 0x36, 0xe0, 0x60, 0x32, 0x53, 0x45, 0xbf, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0}},
!  {0x06c6, 64, { 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x12, 0x13, 0x65,
!   0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0x53, 0x3f, 0xfd, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12,
!   0x2d, 0xe4, 0xf5, 0x33, 0xf5, 0x32, 0xd2, 0x08, 0x90, 0x7e, 0x37, 0xe0, 0x60, 0x0f, 0x43, 0x3f,
!   0x02, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x2d, 0x75, 0x32, 0x01, 0xd2, 0x08, 0x90, 0x7e}},
!  {0x0706, 64, { 0x38, 0xe0, 0x60, 0x10, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0, 0xe5, 0x41, 0x44, 0x04, 0x90, 0xc0, 0x00,
!   0xf0, 0xd2, 0x00, 0x90, 0x7e, 0x39, 0xe0, 0x60, 0x11, 0x43, 0x45, 0x40, 0x90, 0x7f, 0x98, 0x74,
!   0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3a, 0xe0, 0x60, 0x0f,
!   0x53, 0x3f, 0xfe, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x2d, 0x75, 0x34, 0x01, 0xd2, 0x08}},
!  {0x0746, 64, { 0x90, 0x7e, 0x3b, 0xe0, 0x60, 0x0f, 0x43, 0x3f, 0x01, 0xe4, 0xff, 0xad, 0x3f, 0x12, 0x12, 0x2d, 0xe4,
!   0xf5, 0x34, 0xd2, 0x08, 0x90, 0x7e, 0x3c, 0xe0, 0x60, 0x0e, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
!   0xe5, 0x41, 0x44, 0x02, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7e, 0x3d, 0xe0, 0x60, 0x02, 0xd2, 0x0c,
!   0x90, 0x7e, 0x3e, 0xe0, 0x60, 0x08, 0x75, 0x35, 0x01, 0xe4, 0xf5, 0x39, 0xd2, 0x08, 0x90}},
!  {0x0786, 64, { 0x7e, 0x3f, 0xe0, 0x60, 0x0f, 0x90, 0x7f, 0xd7, 0x74, 0x13, 0xf0, 0x74, 0x33, 0xf0, 0x74, 0x16, 0xf0,
!   0x74, 0x36, 0xf0, 0xc2, 0x06, 0xe4, 0x90, 0x7f, 0xd1, 0xf0, 0x30, 0x1a, 0x54, 0xe5, 0x39, 0x60,
!   0x02, 0x15, 0x39, 0x30, 0x13, 0x4b, 0xe5, 0x13, 0xd3, 0x94, 0x00, 0x40, 0x04, 0x15, 0x13, 0x80,
!   0x40, 0x75, 0x13, 0x0a, 0x30, 0x1b, 0x02, 0xc2, 0x13, 0x12, 0x13, 0x65, 0xef, 0x54, 0x01}},
!  {0x07c6, 64, { 0xf5, 0x19, 0x65, 0x33, 0x60, 0x05, 0x85, 0x19, 0x33, 0xd2, 0x08, 0x12, 0x13, 0xa1, 0xef, 0x54, 0x80,
!   0x64, 0x80, 0xf5, 0x19, 0x65, 0x2f, 0x60, 0x05, 0x85, 0x19, 0x2f, 0xd2, 0x08, 0x30, 0x0e, 0x11,
!   0x12, 0x13, 0xa1, 0xef, 0x54, 0x10, 0xf5, 0x19, 0x65, 0x2e, 0x60, 0x05, 0x85, 0x19, 0x2e, 0xd2,
!   0x08, 0x30, 0x1a, 0x2a, 0x90, 0x7f, 0xd2, 0xe0, 0x20, 0xe1, 0x23, 0x90, 0x7b, 0x40, 0xe0}},
!  {0x0806, 64, { 0x60, 0x09, 0xe0, 0xf5, 0x15, 0x90, 0x7b, 0x42, 0xe0, 0xf5, 0x16, 0x90, 0x7b, 0x41, 0xe0, 0x60, 0x09,
!   0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x7f,
!   0xc2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x09, 0x2c, 0xe5, 0x0a, 0x70, 0x40, 0x30, 0x07, 0x39, 0xe5,
!   0x38, 0x70, 0x35, 0xc2, 0x07, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18}},
!  {0x0846, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34,
!   0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
!   0x09, 0xf0, 0x75, 0x38, 0x10, 0xe4, 0xf5, 0x2c, 0x75, 0x0a, 0x01, 0x22, 0xe5, 0x0a, 0x64, 0x01,
!   0x70, 0x40, 0x30, 0x08, 0x39, 0xe5, 0x39, 0x70, 0x35, 0xc2, 0x08, 0xf5, 0x18, 0x7e, 0x00}},
!  {0x0886, 64, { 0x7b, 0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff, 0x74, 0x80,
!   0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4,
!   0x09, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x09, 0xf0, 0x75, 0x39, 0x10, 0xe4, 0xf5, 0x35, 0x75, 0x0a,
!   0x02, 0x22, 0xe5, 0x0a, 0x64, 0x02, 0x70, 0x36, 0x30, 0x14, 0x2f, 0xc2, 0x14, 0xf5, 0x18}},
!  {0x08c6, 64, { 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x0e, 0x25, 0x18, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff,
!   0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5,
!   0x18, 0xb4, 0x05, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x05, 0xf0, 0x75, 0x0a, 0x03, 0x22, 0xe5, 0x15,
!   0x60, 0x30, 0x15, 0x15, 0xe4, 0xf5, 0x18, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x14, 0x25, 0x18}},
!  {0x0906, 64, { 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x0e, 0xae, 0xff, 0x74, 0x80, 0x25, 0x18, 0xf5, 0x82, 0xe4, 0x34,
!   0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x18, 0xe5, 0x18, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74,
!   0x03, 0xf0, 0xe4, 0xf5, 0x0a, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x0f, 0x06, 0x0a, 0x14, 0x00,
!   0x0a, 0x88, 0x01, 0x0a, 0xf4, 0x03, 0x09, 0x50, 0x06, 0x0a, 0x07, 0x08, 0x0a, 0x01, 0x09}},
!  {0x0946, 64, { 0x09, 0xe9, 0x0a, 0x09, 0xf8, 0x0b, 0x00, 0x00, 0x0b, 0x43, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60,
!   0x19, 0x14, 0x60, 0x61, 0x24, 0x02, 0x60, 0x03, 0x02, 0x09, 0xdf, 0x74, 0x19, 0x90, 0x7f, 0xd4,
!   0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x04,
!   0x7f, 0x02, 0x80, 0x02, 0x7f, 0x03, 0x75, 0x82, 0x82, 0x75, 0x83, 0x19, 0xef, 0xf0, 0x75}},
!  {0x0986, 64, { 0x82, 0x7b, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x74, 0x75, 0x83, 0x19, 0xf0, 0x75, 0x82, 0x66, 0x75,
!   0x83, 0x19, 0xf0, 0x75, 0x82, 0x58, 0x75, 0x83, 0x19, 0xf0, 0x90, 0x7f, 0xea, 0xe0, 0x04, 0x75,
!   0x82, 0x17, 0x75, 0x83, 0x19, 0xf0, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x12, 0x90, 0x7f,
!   0xd5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0f, 0x2c, 0xea, 0x49}},
!  {0x09c6, 64, { 0x60, 0x0d, 0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f,
!   0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02,
!   0x0b, 0x4a, 0x90, 0x7f, 0x00, 0xe5, 0x09, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x0b,
!   0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x09, 0x02, 0x0b, 0x4a, 0x12, 0x0b, 0x52, 0x02, 0x0b}},
!  {0x0a06, 64, { 0x4a, 0x90, 0x7f, 0x00, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xe8,
!   0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x10, 0xe4, 0x33,
!   0xff, 0x25, 0xe0, 0xff, 0xa2, 0x16, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0,
!   0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x4a, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0xa3}},
!  {0x0a46, 64, { 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80,
!   0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4,
!   0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f,
!   0xb5, 0x74, 0x02, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02}},
!  {0x0a86, 64, { 0x0b, 0x4a, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x0b, 0x4a,
!   0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x10, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xb4, 0xe0,
!   0x44, 0x01, 0xf0, 0x02, 0x0b, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0,
!   0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24}},
!  {0x0ac6, 64, { 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff,
!   0x13, 0x13, 0x13, 0x54, 0x1f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44,
!   0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8,
!   0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01}},
!  {0x0b06, 64, { 0x04, 0xd2, 0x10, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea,
!   0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0,
!   0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01,
!   0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4}},
!  {0x0b46, 64, { 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0,
!   0x90, 0x7f, 0x9c, 0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc0,
!   0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x18, 0xf0, 0xe4, 0xf5, 0x8e,
!   0x90, 0x7f, 0xdf, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0xe4, 0xf5, 0x24, 0x75, 0x18}},
!  {0x0b86, 64, { 0x01, 0x7b, 0x00, 0x74, 0x24, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf4, 0x05,
!   0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3a, 0x01, 0xe4, 0xf5, 0x38, 0xf5, 0x13, 0xf5, 0x36,
!   0xc2, 0x07, 0xc2, 0x0b, 0xc2, 0x05, 0xc2, 0x00, 0xc2, 0x09, 0xc2, 0x13, 0xd2, 0x03, 0xd2, 0x01,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x75, 0x44, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0}},
!  {0x0bc6, 64, { 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x11, 0xe3, 0x7f, 0x10, 0x8f, 0x42, 0x12, 0x10, 0xb3, 0x90, 0x7f, 0x98,
!   0x74, 0x12, 0xf0, 0x7f, 0x01, 0x8f, 0x40, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x14, 0xf0, 0x75, 0x46, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd,
!   0x12, 0x11, 0xe3, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3e, 0x12, 0x11, 0xe3, 0x90}},
!  {0x0c06, 64, { 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x11, 0xe3,
!   0x7f, 0x01, 0x12, 0x12, 0x9c, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x11, 0xe3, 0x7f, 0x13, 0x7d, 0x09,
!   0x12, 0x11, 0xe3, 0x20, 0x1b, 0x03, 0x02, 0x0c, 0xd9, 0x75, 0x2d, 0x01, 0x75, 0x18, 0x01, 0x7b,
!   0x00, 0x74, 0x2d, 0x25, 0x18, 0xf9, 0xe4, 0x34, 0x00, 0xfa, 0xe4, 0x12, 0x0e, 0xf4, 0x05}},
!  {0x0c46, 64, { 0x18, 0xe5, 0x18, 0xb4, 0x09, 0xea, 0x75, 0x3b, 0x01, 0xe4, 0xf5, 0x39, 0xf5, 0x13, 0xf5, 0x37, 0xc2,
!   0x08, 0xc2, 0x0c, 0xc2, 0x06, 0xc2, 0x00, 0xc2, 0x0a, 0xc2, 0x13, 0xd2, 0x04, 0xd2, 0x02, 0x90,
    0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x75, 0x45, 0x03, 0x90, 0xc0, 0x00, 0x74, 0x03, 0xf0, 0x7f, 0x0c,
!   0xe4, 0xfd, 0x12, 0x12, 0x2d, 0x7f, 0x10, 0x8f, 0x43, 0x12, 0x11, 0x25, 0x90, 0x7f, 0x98}},
!  {0x0c86, 64, { 0x74, 0x0a, 0xf0, 0x7f, 0x01, 0x8f, 0x41, 0xef, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x0c, 0xf0, 0x75, 0x47, 0x80, 0x90, 0xc0, 0x00, 0x74, 0x80, 0xf0, 0x0f, 0xe4, 0xfd, 0x12,
!   0x12, 0x2d, 0xe4, 0xff, 0x7e, 0xa3, 0xad, 0x06, 0x8d, 0x3f, 0x12, 0x12, 0x2d, 0x90, 0x7f, 0x98,
!   0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x12, 0x2d}},
!  {0x0cc6, 64, { 0x7f, 0x01, 0x12, 0x12, 0xbd, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x12, 0x2d, 0x7f, 0x13, 0x7d, 0x09, 0x12,
!   0x12, 0x2d, 0xd2, 0x12, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5,
    0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3,
!   0x05, 0x86, 0xf0, 0x05, 0x86, 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x10}},
!  {0x0d06, 64, { 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0,
!   0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x90,
    0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82, 0xe5, 0x0c, 0xf5, 0x83, 0xc2,
!   0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0x05, 0x86, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0x05, 0x86}},
!  {0x0d46, 64, { 0xdf, 0xf7, 0xd2, 0xaf, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0xaf, 0x08, 0xe5, 0x0d, 0xf5, 0x82,
!   0xe5, 0x0c, 0xf5, 0x83, 0xc2, 0xaf, 0x05, 0x86, 0x90, 0xc0, 0x00, 0xe0, 0x05, 0x86, 0xf0, 0xa3,
    0x05, 0x86, 0xdf, 0xf7, 0x05, 0x86, 0xd2, 0xaf, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5,
!   0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44}},
!  {0x0d86, 64, { 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xd2, 0x19, 0x90, 0x7f, 0x92, 0xe0,
!   0x44, 0x02, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x10, 0xe4, 0x33, 0xfe, 0xef, 0x4e,
    0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0,
!   0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53}},
!  {0x0dc6, 64, { 0x91, 0xef, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x0d, 0xf0, 0xd2,
!   0xaf, 0xd2, 0x1a, 0x12, 0x12, 0x77, 0xc2, 0x11, 0xe4, 0xf5, 0x0b, 0xf5, 0x13, 0xc2, 0x17, 0xc2,
    0x12, 0x90, 0x7f, 0xa1, 0x04, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x17, 0x60, 0x10, 0x30, 0x12,
!   0x05, 0xd2, 0x1a, 0x12, 0x00, 0x46, 0x90, 0x7f, 0xd8, 0xe0, 0xf5, 0x17, 0x80, 0x08, 0x30}},
!  {0x0e06, 64, { 0x12, 0x05, 0xc2, 0x1a, 0x12, 0x00, 0x46, 0x30, 0x11, 0x07, 0xc2, 0x11, 0x12, 0x09, 0x2d, 0x80, 0xd6,
!   0x30, 0x18, 0xd3, 0xc2, 0x18, 0x12, 0x13, 0xad, 0x80, 0xcc, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8,
!   0xfd, 0x75, 0x81, 0x47, 0x02, 0x0e, 0x69, 0x02, 0x0d, 0x91, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93,
!   0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3}},
!  {0x0e46, 64, { 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04,
!   0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20,
!   0x40, 0x80, 0x90, 0x12, 0xde, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30,
!   0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25}},
!  {0x0e86, 64, { 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8,
!   0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83,
    0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22,
!   0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93}},
!  {0x0ec6, 64, { 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50,
!   0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22,
    0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06,
!   0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22}},
!  {0x0f06, 64, { 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93,
!   0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef,
    0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x8f, 0x18, 0xe4, 0xf5, 0x19, 0x75, 0x1a, 0xff, 0x75, 0x1b, 0x19,
!   0x75, 0x1c, 0x86, 0xab, 0x1a, 0xaa, 0x1b, 0xa9, 0x1c, 0x90, 0x00, 0x01, 0x12, 0x0e, 0xc7}},
!  {0x0f46, 64, { 0xb4, 0x03, 0x1d, 0xaf, 0x19, 0x05, 0x19, 0xef, 0xb5, 0x18, 0x01, 0x22, 0x12, 0x0e, 0xae, 0x7e, 0x00,
!   0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1a, 0xff, 0xf5, 0x1b, 0x89, 0x1c, 0x80, 0xd4, 0x7b,
    0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0x8f, 0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02,
!   0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x00, 0x36, 0x05, 0x0d}},
!  {0x0f86, 64, { 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08,
!   0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x41, 0x8f, 0x1a, 0xef, 0x42, 0x36, 0x80, 0xca, 0x22, 0x8f,
    0x1a, 0x05, 0x0d, 0xe5, 0x0d, 0xae, 0x0c, 0x70, 0x02, 0x05, 0x0c, 0x14, 0xf5, 0x82, 0x8e, 0x83,
!   0xe5, 0x1a, 0xf0, 0x12, 0x13, 0x59, 0x05, 0x0d, 0xe5, 0x0d, 0xac, 0x0c, 0x70, 0x02, 0x05}},
!  {0x0fc6, 64, { 0x0c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x08, 0xe5, 0x08, 0x60, 0x0a, 0x12, 0x13, 0x95,
!   0x8f, 0x1a, 0xef, 0x42, 0x37, 0x80, 0xca, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c,
    0x74, 0x30, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74,
!   0x27, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x20, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x07, 0xf0, 0xe4}},
!  {0x1006, 64, { 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x22, 0xc0,
!   0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f,
!   0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84,
!   0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82}},
!  {0x1046, 64, { 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x11, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab,
!   0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32,
!   0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
!   0x10, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44}},
!  {0x1086, 64, { 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74,
!   0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90}},
!  {0x10c6, 64, { 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00,
!   0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f,
!   0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5,
!   0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90}},
!  {0x1106, 64, { 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90,
!   0x7f, 0x98, 0x74, 0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f,
!   0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
!   0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f}},
!  {0x1146, 64, { 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0,
!   0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b,
!   0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0,
!   0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00}},
!  {0x1186, 64, { 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
!   0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74,
!   0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54,
!   0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00}},
!  {0x11c6, 64, { 0x74, 0xbf, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x7f, 0x98, 0x74,
!   0x13, 0xf0, 0xe5, 0x44, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x17, 0xf0,
!   0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x15, 0xf0, 0x90, 0xc0, 0x00, 0xed}},
!  {0x1206, 64, { 0xf0, 0x22, 0x12, 0x13, 0x29, 0x8f, 0x1a, 0x12, 0x13, 0x29, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60,
!   0x12, 0x12, 0x13, 0x29, 0x8f, 0x1a, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x29, 0x8f,
!   0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0xe5, 0x45, 0x54, 0x7f,
!   0x90, 0xc0, 0x00, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x0f, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0}},
!  {0x1246, 64, { 0x90, 0x7f, 0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x12, 0x13, 0x7d, 0x8f, 0x1a,
!   0x12, 0x13, 0x7d, 0x8f, 0x1b, 0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x12, 0x12, 0x13, 0x7d, 0x8f, 0x1a,
!   0xe5, 0x1a, 0x65, 0x1b, 0x60, 0x07, 0x12, 0x13, 0x7d, 0x8f, 0x1b, 0x80, 0xe8, 0xaf, 0x1a, 0x22,
!   0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x1a, 0x04, 0xe0}},
!  {0x1286, 64, { 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x12, 0xfa, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0,
!   0xe0, 0x44, 0x04, 0xf0, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3e, 0x54, 0x7f, 0xfd, 0x12, 0x11,
!   0xe3, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3e, 0x44,
!   0x80, 0xfd, 0x12, 0x11, 0xe3, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x3f, 0x54, 0x7f, 0xfd}},
!  {0x12c6, 64, { 0x12, 0x12, 0x2d, 0x90, 0x7f, 0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x3f,
!   0x44, 0x80, 0xfd, 0x12, 0x12, 0x2d, 0x22, 0x05, 0x0e, 0x02, 0x00, 0x00, 0x00, 0x00, 0x03, 0x14,
!   0x03, 0x00, 0x00, 0xc1, 0x11, 0xc1, 0x18, 0xc1, 0x95, 0xc1, 0x10, 0xc1, 0x16, 0x01, 0x0a, 0x00,
!   0xc1, 0x9b, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02}},
!  {0x1306, 64, { 0x15, 0x18, 0x4e, 0x60, 0x05, 0x12, 0x0d, 0x70, 0x80, 0xee, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x11, 0xf0,
!   0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x12, 0xf0, 0x90, 0xc0, 0x00, 0xe0,
!   0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x13, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f,
!   0x98, 0x74, 0x14, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x15}},
!  {0x1346, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x16, 0xf0, 0x90, 0xc0, 0x00, 0xe0,
!   0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x08, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f,
!   0x98, 0x74, 0x09, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0a, 0xf0,
!   0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0b, 0xf0, 0x90, 0xc0, 0x00}},
!  {0x1386, 64, { 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0c, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f,
!   0x98, 0x74, 0x0d, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0x98, 0x74, 0x0e, 0xf0,
!   0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x12, 0x0f, 0xdf, 0x12, 0x0d, 0x81, 0x12, 0x0b, 0x52, 0x22,
!   0x53, 0xd8, 0xef, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
   {0x13c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x40, 0x00, 0x02, 0x14}},
!  {0x1406, 64, { 0x04, 0x00, 0x02, 0x10, 0x16, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
***************
*** 426,432 ****
   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x10, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
--- 425,431 ----
   {0x18c6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x10, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
***************
*** 444,448 ****
    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
!  {0xffff,  0, {0x00}}
  };
--- 443,447 ----
    0x00, 0x42, 0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c,
    0x00, 0x20, 0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00}},
   {0x1a06,  4, { 0x72, 0x00, 0x00, 0x00}},
!  {0xffff,	0,	{0x00} }
  };
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa49msg.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa49msg.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa49msg.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa49msg.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 41,50 ****
  
  	4th revision: USA49W version
  
  	Buffer formats for RX/TX data messages are not defined by
  	a structure, but are described here:
  
! 	USB OUT (host -> USAxx, transmit) messages contain a 
  	REQUEST_ACK indicator (set to 0xff to request an ACK at the 
  	completion of transmit; 0x00 otherwise), followed by data:
  
--- 41,54 ----
  
  	4th revision: USA49W version
  
+ 	See usa26msg.h for description of message formats
+ 
+ 	Third revision: USA28X version (aka USA26)
+ 
  	Buffer formats for RX/TX data messages are not defined by
  	a structure, but are described here:
  
! 	USB OUT (host -> USA26, transmit) messages contain a 
  	REQUEST_ACK indicator (set to 0xff to request an ACK at the 
  	completion of transmit; 0x00 otherwise), followed by data:
  
***************
*** 52,79 ****
  
  	with a total data length of 63.
  
! 	USB IN (USAxx -> host, receive) messages begin with a status
! 	byte in which the 0x80 bit is either:
! 				   	
! 		(a)	0x80 bit clear
! 			indicates that the bytes following it are all data
! 			bytes:
! 
! 				STAT DATA DATA DATA DATA DATA ...
! 
! 			for a total of up to 63 DATA bytes,
! 
! 	or:
  
! 		(b)	0x80 bit set
! 			indiates that the bytes following alternate data and
! 			status bytes:
  
! 				STAT DATA STAT DATA STAT DATA STAT DATA ...
  
! 			for a total of up to 32 DATA bytes.
  
! 	The valid bits in the STAT bytes are:
  
  		OVERRUN	0x02
  		PARITY	0x04
--- 56,72 ----
  
  	with a total data length of 63.
  
! 	USB IN (USA26 -> host, receive) messages contain either a zero
! 	flag (indicating no error in any data bytes):
  
! 		00 DAT DAT DAT ...
  
! 	for a total of 63 data bytes, or a non-zero status flag (indicating 
! 	that all data bytes will be preceded by status flag):
  
! 		STAT DAT STAT DAT STAT DAT ...
  
! 	for a total of 32 data bytes.  The valid bits in the STAT bytes are:
  
  		OVERRUN	0x02
  		PARITY	0x04
***************
*** 82,100 ****
  
  	Notes:
  	
! 	(1) The OVERRUN bit can appear in either (a) or (b) format
! 		messages, but the but the PARITY/FRAMING/BREAK bits
! 		only appear in (b) format messages.
! 	(2) For the host to determine the exact point at which the
! 		overrun occurred (to identify the point in the data
! 		stream at which the data was lost), it needs to count
! 		128 characters, starting at the first character of the
! 		message in which OVERRUN was reported; the lost character(s)
! 		would have been received between the 128th and 129th
! 		characters.
! 	(3)	An RX data message in which the first byte has 0x80 clear
! 		serves as a "break off" indicator.
! 	(4)	a control message specifying disablePort will be answered
  		with a status message, but no further status will be sent
  		until a control messages with enablePort is sent
  
--- 75,83 ----
  
  	Notes:
  	
! 	1.	a "no status" RX data message (first byte zero) can serve as
! 		a "break off" indicator.
! 	2.	a control message specifying disablePort will be answered
  		with a status message, but no further status will be sent
  		until a control messages with enablePort is sent
  
***************
*** 109,115 ****
  	2000mar09	change to support 4 ports
  	2000may03	change external clocking to match USA-49W hardware
  	2000jun01	add extended BSD-style copyright text
- 	2001jul05	change message format to improve OVERRUN case
  */
  
  #ifndef	__USA49MSG__
--- 92,97 ----
***************
*** 125,131 ****
  	0x80		globalControlMessage
  */
  
! struct keyspan_usa49_portControlMessage
  {
  	/*
  		0.	0/1/2/3 	port control message follows
--- 107,113 ----
  	0x80		globalControlMessage
  */
  
! typedef struct keyspan_usa49_portControlMessage
  {
  	/*
  		0.	0/1/2/3 	port control message follows
***************
*** 191,197 ****
  		enablePort,		// start servicing port (move data, check status)
  		disablePort;	// stop servicing port (does implicit tx/rx flush/off)
  	
! };
  
  // defines for bits in lcr
  #define	USA_DATABITS_5		0x00
--- 173,179 ----
  		enablePort,		// start servicing port (move data, check status)
  		disablePort;	// stop servicing port (does implicit tx/rx flush/off)
  	
! } keyspan_usa49_portControlMessage;
  
  // defines for bits in lcr
  #define	USA_DATABITS_5		0x00
***************
*** 219,225 ****
  	sends any control message (either global or port-specific).
  */
  
! struct keyspan_usa49_globalControlMessage
  {
  	u8	portNumber,			// 0x80
  		sendGlobalStatus,	// 1/2=number of status responses requested
--- 201,207 ----
  	sends any control message (either global or port-specific).
  */
  
! typedef struct keyspan_usa49_globalControlMessage
  {
  	u8	portNumber,			// 0x80
  		sendGlobalStatus,	// 1/2=number of status responses requested
***************
*** 227,233 ****
  		resetStatusCount,	// a cycling value
  		remoteWakeupEnable,		// 0x10=P1, 0x20=P2, 0x40=P3, 0x80=P4
  		disableStatusMessages;	// 1=send no status until host talks
! };
  
  /*
  	Device->host messages send on the global status endpoint
--- 209,215 ----
  		resetStatusCount,	// a cycling value
  		remoteWakeupEnable,		// 0x10=P1, 0x20=P2, 0x40=P3, 0x80=P4
  		disableStatusMessages;	// 1=send no status until host talks
! } keyspan_usa49_globalControlMessage;
  
  /*
  	Device->host messages send on the global status endpoint
***************
*** 239,245 ****
  	0x81				globalDebugMessage
  */
  
! struct keyspan_usa49_portStatusMessage	// one for each port
  {
  	u8	portNumber,		// 0,1,2,3
  		cts,			// reports CTS pin
--- 221,227 ----
  	0x81				globalDebugMessage
  */
  
! typedef struct keyspan_usa49_portStatusMessage	// one for each port
  {
  	u8	portNumber,		// 0,1,2,3
  		cts,			// reports CTS pin
***************
*** 252,258 ****
  		controlResponse,// 1=a control message has been processed
  		txAck,			// ACK (data TX complete)
  		rs232valid;		// RS-232 signal valid
! };
  
  // bits in RX data message when STAT byte is included
  #define	RXERROR_OVERRUN	0x02
--- 234,240 ----
  		controlResponse,// 1=a control message has been processed
  		txAck,			// ACK (data TX complete)
  		rs232valid;		// RS-232 signal valid
! } keyspan_usa49_portStatusMessage;
  
  // bits in RX data message when STAT byte is included
  #define	RXERROR_OVERRUN	0x02
***************
*** 260,278 ****
  #define	RXERROR_FRAMING	0x08
  #define	RXERROR_BREAK	0x10
  
! struct keyspan_usa49_globalStatusMessage
  {
  	u8	portNumber,			// 0x80=globalStatusMessage
  		sendGlobalStatus,	// from request, decremented
  		resetStatusCount;	// as in request
! };
  
! struct keyspan_usa49_globalDebugMessage
  {
  	u8	portNumber,			// 0x81=globalDebugMessage
  		n,					// typically a count/status byte
  		b;					// typically a data byte
! };
  
  // ie: the maximum length of an EZUSB endpoint buffer
  #define	MAX_DATA_LEN			64
--- 242,260 ----
  #define	RXERROR_FRAMING	0x08
  #define	RXERROR_BREAK	0x10
  
! typedef struct keyspan_usa49_globalStatusMessage
  {
  	u8	portNumber,			// 0x80=globalStatusMessage
  		sendGlobalStatus,	// from request, decremented
  		resetStatusCount;	// as in request
! } keyspan_usa49_globalStatusMessage;
  
! typedef struct keyspan_usa49_globalDebugMessage
  {
  	u8	portNumber,			// 0x81=globalDebugMessage
  		n,					// typically a count/status byte
  		b;					// typically a data byte
! } keyspan_usa49_globalDebugMessage;
  
  // ie: the maximum length of an EZUSB endpoint buffer
  #define	MAX_DATA_LEN			64
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa49w_fw.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa49w_fw.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/keyspan_usa49w_fw.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/keyspan_usa49w_fw.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,47 ****
  /* keyspan_usa49w_fw.h
  
! 	The firmware contained herein as keyspan_usa49w_fw.h is
  
! 		Copyright (C) 1999-2001
! 		Keyspan, A division of InnoSys Incorporated ("Keyspan")
! 		
! 	as an unpublished work. This notice does not imply unrestricted or
! 	public access to the source code from which this firmware image is
! 	derived.  Except as noted below this firmware image may not be 
! 	reproduced, used, sold or transferred to any third party without 
! 	Keyspan's prior written consent.  All Rights Reserved.
! 
! 	Permission is hereby granted for the distribution of this firmware 
! 	image as part of a Linux or other Open Source operating system kernel 
! 	in text or binary form as required. 
! 
! 	This firmware may not be modified and may only be used with  
! 	Keyspan hardware.  Distribution and/or Modification of the 
! 	keyspan.c driver which includes this firmware, in whole or in 
! 	part, requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa49w_firmware[] = {
!  {0x0033,  3, { 0x02, 0x18, 0xfb}},
   {0x0036, 12, { 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
   {0x0046, 16, { 0xe4, 0xff, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xfe, 0xe5, 0x15}},
   {0x0056, 16, { 0x24, 0x04, 0xfd, 0xe4, 0x35, 0x14, 0xfa, 0xa9, 0x05, 0x7b, 0x01, 0xef, 0x7c, 0x00, 0x29, 0xf9}},
!  {0x0066, 16, { 0xec, 0x3a, 0xfa, 0xee, 0x12, 0x11, 0xf1, 0x0f, 0xbf, 0x22, 0xd7, 0xe5, 0x15, 0x24, 0x05, 0xf5}},
   {0x0076, 16, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02, 0x01, 0x34, 0xe5, 0x15, 0x24, 0x09}},
   {0x0086, 16, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x0a, 0xf5, 0x82}},
!  {0x0096, 16, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x18, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x16, 0x47, 0xe5}},
   {0x00a6, 16, { 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xcf, 0xf0, 0x80, 0x41}},
!  {0x00b6, 16, { 0xe5, 0x15, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x76}},
   {0x00c6, 16, { 0xe5, 0x15, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x00, 0x03}},
   {0x00d6, 16, { 0x7f, 0x01, 0xe5, 0x15, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfd, 0x12}},
!  {0x00e6, 16, { 0x16, 0x47, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x30}},
   {0x00f6, 16, { 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0}},
   {0x0003, 16, { 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74}},
   {0x0013, 16, { 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24}},
   {0x0023, 16, { 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22}},
   {0x0043,  3, { 0x02, 0x1b, 0x00}},
!  {0x0000,  3, { 0x02, 0x10, 0x95}},
   {0x0106, 64, { 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
    0xe0, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5,
    0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24,
--- 1,43 ----
  /* keyspan_usa49w_fw.h
+   
+    Generated from Keyspan firmware image usa49code.h Sat Oct  6 12:06:59 EST 2001
+    This firmware is for the Keyspan USA-49W Serial Adaptor
  
!    "The firmware contained herein as keyspan_usa49w_fw.h is
!    Copyright (C) 1999-2001 Keyspan, A division of InnoSys Incorporated
!    ("Keyspan"), as an unpublished work.  This notice does not imply
!    unrestricted or public access to this firmware which is a trade secret of
!    Keyspan, and which may not be reproduced, used, sold or transferred to any
!    third party without Keyspan's prior written consent.  All Rights Reserved.
  
!    This firmware may not be modified and may only be used with the Keyspan 
!    USA-49W Serial Adapter.  Distribution and/or Modification of the
!    keyspan.c driver which includes this firmware, in whole or in part,
!    requires the inclusion of this statement."
  
  */
  
  static const struct ezusb_hex_record keyspan_usa49w_firmware[] = {
!  {0x7f92,  1, { 0x01}},
!  {0x0033,  3, { 0x02, 0x18, 0xfc}},
   {0x0036, 12, { 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22}},
   {0x0046, 16, { 0xe4, 0xff, 0x74, 0x40, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xe0, 0xfe, 0xe5, 0x15}},
   {0x0056, 16, { 0x24, 0x04, 0xfd, 0xe4, 0x35, 0x14, 0xfa, 0xa9, 0x05, 0x7b, 0x01, 0xef, 0x7c, 0x00, 0x29, 0xf9}},
!  {0x0066, 16, { 0xec, 0x3a, 0xfa, 0xee, 0x12, 0x11, 0xf6, 0x0f, 0xbf, 0x22, 0xd7, 0xe5, 0x15, 0x24, 0x05, 0xf5}},
   {0x0076, 16, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02, 0x01, 0x34, 0xe5, 0x15, 0x24, 0x09}},
   {0x0086, 16, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x0a, 0xf5, 0x82}},
!  {0x0096, 16, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x18, 0x7f, 0x01, 0xe4, 0xfd, 0x12, 0x16, 0x4c, 0xe5}},
   {0x00a6, 16, { 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xcf, 0xf0, 0x80, 0x41}},
!  {0x00b6, 16, { 0xe5, 0x15, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x7b}},
   {0x00c6, 16, { 0xe5, 0x15, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x00, 0x03}},
   {0x00d6, 16, { 0x7f, 0x01, 0xe5, 0x15, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfd, 0x12}},
!  {0x00e6, 16, { 0x16, 0x4c, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x30}},
   {0x00f6, 16, { 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0}},
   {0x0003, 16, { 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74}},
   {0x0013, 16, { 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24}},
   {0x0023, 16, { 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22}},
   {0x0043,  3, { 0x02, 0x1b, 0x00}},
!  {0x0000,  3, { 0x02, 0x10, 0x9a}},
   {0x0106, 64, { 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
    0xe0, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5,
    0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24,
***************
*** 53,68 ****
   {0x0186, 64, { 0x15, 0x24, 0x17, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x32,
    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x04, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24,
    0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfb, 0xf0, 0xe4, 0xff, 0xe5, 0x15,
!   0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfd, 0x12, 0x16, 0x47, 0xe5}},
   {0x01c6, 64, { 0x15, 0x24, 0x0e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x33,
    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24,
    0x33, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xf0, 0xe5, 0x15, 0x24, 0x33,
    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x15, 0x24, 0x0f}},
   {0x0206, 64, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x2f, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4,
    0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x10, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xe7, 0xe5, 0x15, 0x24, 0x11, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x17, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4}},
!  {0x0246, 64, { 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xb7, 0xe5, 0x15, 0x24, 0x14, 0xf5, 0x82, 0xe4, 0x35,
    0x14, 0xf5, 0x83, 0xe0, 0x60, 0x44, 0xe5, 0x15, 0x24, 0x15, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
    0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
    0x44, 0x01, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
--- 49,64 ----
   {0x0186, 64, { 0x15, 0x24, 0x17, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x32,
    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x04, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24,
    0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfb, 0xf0, 0xe4, 0xff, 0xe5, 0x15,
!   0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfd, 0x12, 0x16, 0x4c, 0xe5}},
   {0x01c6, 64, { 0x15, 0x24, 0x0e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x33,
    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24,
    0x33, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xf0, 0xe5, 0x15, 0x24, 0x33,
    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xe5, 0x15, 0x24, 0x0f}},
   {0x0206, 64, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x2f, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4,
    0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x10, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xec, 0xe5, 0x15, 0x24, 0x11, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x16, 0x1c, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4}},
!  {0x0246, 64, { 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x12, 0x15, 0xbc, 0xe5, 0x15, 0x24, 0x14, 0xf5, 0x82, 0xe4, 0x35,
    0x14, 0xf5, 0x83, 0xe0, 0x60, 0x44, 0xe5, 0x15, 0x24, 0x15, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
    0x83, 0xe0, 0x60, 0x11, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
    0x44, 0x01, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
***************
*** 88,99 ****
    0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14}},
   {0x03c6, 64, { 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x12, 0x00,
    0x36, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x47, 0xe5, 0x15,
    0x24, 0x2c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x15, 0x24, 0x2b}},
   {0x0406, 64, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x1b,
    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82,
    0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x28, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x47, 0xe5}},
   {0x0446, 64, { 0x15, 0x24, 0x2b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0xe5, 0x16, 0x42, 0x13,
    0xe5, 0x15, 0x24, 0x1c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x70, 0x0e, 0xe5,
    0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x2a, 0x90, 0x78, 0x41,
--- 84,95 ----
    0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14}},
   {0x03c6, 64, { 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x12, 0x00,
    0x36, 0xef, 0x54, 0xfe, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x4c, 0xe5, 0x15,
    0x24, 0x2c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x15, 0x24, 0x2b}},
   {0x0406, 64, { 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x1b,
    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82,
    0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x28, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x4c, 0xe5}},
   {0x0446, 64, { 0x15, 0x24, 0x2b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0xe5, 0x16, 0x42, 0x13,
    0xe5, 0x15, 0x24, 0x1c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x70, 0x0e, 0xe5,
    0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x2a, 0x90, 0x78, 0x41,
***************
*** 104,115 ****
    0xe0, 0x44, 0x40, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5}},
   {0x04c6, 64, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x1e,
    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x28, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82,
!   0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfe, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x47,
    0xe5, 0x15, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0xe5}},
   {0x0506, 64, { 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x1f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e,
    0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x27, 0xe5, 0x15,
    0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xff, 0xf0, 0xfd, 0xe4,
!   0xff, 0x12, 0x16, 0x47, 0xe5, 0x15, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83}},
   {0x0546, 64, { 0xe4, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x20, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
    0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
    0x18, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14,
--- 100,111 ----
    0xe0, 0x44, 0x40, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5}},
   {0x04c6, 64, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0xe5, 0x15, 0x24, 0x1e,
    0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x28, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82,
!   0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfe, 0xff, 0xf0, 0xfd, 0xe4, 0xff, 0x12, 0x16, 0x4c,
    0xe5, 0x15, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0xe5}},
   {0x0506, 64, { 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x1f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x0e,
    0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x27, 0xe5, 0x15,
    0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xff, 0xf0, 0xfd, 0xe4,
!   0xff, 0x12, 0x16, 0x4c, 0xe5, 0x15, 0x24, 0x2d, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83}},
   {0x0546, 64, { 0xe4, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x20, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
    0xe0, 0x70, 0x0e, 0xe5, 0x15, 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
    0x18, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0xe5, 0x15, 0x24, 0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14,
***************
*** 119,130 ****
    0x83, 0xe0, 0x60, 0x1f, 0xe5, 0x15, 0x24, 0x2e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74,
    0x01, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0}},
   {0x05c6, 64, { 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x23, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
!   0x03, 0x12, 0x18, 0x85, 0xe5, 0x15, 0x24, 0x24, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
    0x60, 0x1b, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x08,
    0xf0, 0x90, 0x7f, 0x98, 0xe0, 0xff, 0xe5, 0x16, 0xf4, 0xfe, 0xef, 0x5e, 0xf0, 0xe5, 0x15}},
   {0x0606, 64, { 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x16, 0xe5, 0x15, 0x24, 0x31, 0xf5,
    0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x45, 0x16,
!   0xf0, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x12, 0x03, 0x07, 0x83, 0x00, 0x07, 0xf7, 0x01, 0x08,
    0x63, 0x03, 0x06, 0x4c, 0x06, 0x07, 0x74, 0x08, 0x07, 0x68, 0x09, 0x07, 0x50, 0x0a, 0x07}},
   {0x0646, 64, { 0x5f, 0x0b, 0x00, 0x00, 0x08, 0xb2, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x1c, 0x14, 0x70, 0x03,
    0x02, 0x06, 0xfe, 0x24, 0x02, 0x60, 0x03, 0x02, 0x07, 0x46, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
--- 115,126 ----
    0x83, 0xe0, 0x60, 0x1f, 0xe5, 0x15, 0x24, 0x2e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74,
    0x01, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0}},
   {0x05c6, 64, { 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x23, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
!   0x03, 0x12, 0x18, 0x91, 0xe5, 0x15, 0x24, 0x24, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
    0x60, 0x1b, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x08,
    0xf0, 0x90, 0x7f, 0x98, 0xe0, 0xff, 0xe5, 0x16, 0xf4, 0xfe, 0xef, 0x5e, 0xf0, 0xe5, 0x15}},
   {0x0606, 64, { 0x24, 0x25, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x16, 0xe5, 0x15, 0x24, 0x31, 0xf5,
    0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x98, 0xe0, 0x45, 0x16,
!   0xf0, 0x22, 0x90, 0x7f, 0xe9, 0xe0, 0x12, 0x12, 0x08, 0x07, 0x83, 0x00, 0x07, 0xf7, 0x01, 0x08,
    0x63, 0x03, 0x06, 0x4c, 0x06, 0x07, 0x74, 0x08, 0x07, 0x68, 0x09, 0x07, 0x50, 0x0a, 0x07}},
   {0x0646, 64, { 0x5f, 0x0b, 0x00, 0x00, 0x08, 0xb2, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x1c, 0x14, 0x70, 0x03,
    0x02, 0x06, 0xfe, 0x24, 0x02, 0x60, 0x03, 0x02, 0x07, 0x46, 0x74, 0x19, 0x90, 0x7f, 0xd4, 0xf0,
***************
*** 137,150 ****
   {0x06c6, 64, { 0xfe, 0x90, 0x7f, 0xee, 0xe0, 0x7c, 0x00, 0x24, 0x00, 0xf5, 0x19, 0xec, 0x3e, 0xf5, 0x18, 0x75, 0x33,
    0x19, 0x75, 0x34, 0x12, 0x75, 0x82, 0x14, 0x75, 0x83, 0x19, 0xe0, 0x75, 0x27, 0x00, 0xf5, 0x28,
    0xd3, 0xe5, 0x28, 0x95, 0x19, 0xe5, 0x27, 0x95, 0x18, 0x40, 0x06, 0x85, 0x18, 0x27, 0x85, 0x19,
!   0x28, 0x12, 0x13, 0x12, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x14, 0x2b}},
   {0x0706, 64, { 0xea, 0x49, 0x60, 0x32, 0x90, 0x7f, 0xee, 0xe0, 0x75, 0x18, 0x00, 0xf5, 0x19, 0xae, 0x02, 0xaf, 0x01,
    0x8e, 0x33, 0x8f, 0x34, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x27, 0xf5, 0x28,
    0xd3, 0x95, 0x19, 0xe5, 0x27, 0x95, 0x18, 0x40, 0x06, 0x85, 0x18, 0x27, 0x85, 0x19, 0x28, 0x12,
!   0x13, 0x12, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xb9}},
   {0x0746, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0x00, 0xe5, 0x25, 0xf0, 0x90,
    0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x25, 0x02, 0x08,
!   0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x22, 0x12, 0x0a, 0xb8, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0x00,
    0xe5, 0x22, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xe8}},
   {0x0786, 64, { 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x00, 0xe4, 0x33, 0xff,
    0x25, 0xe0, 0xff, 0xa2, 0x06, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90,
--- 133,146 ----
   {0x06c6, 64, { 0xfe, 0x90, 0x7f, 0xee, 0xe0, 0x7c, 0x00, 0x24, 0x00, 0xf5, 0x19, 0xec, 0x3e, 0xf5, 0x18, 0x75, 0x33,
    0x19, 0x75, 0x34, 0x12, 0x75, 0x82, 0x14, 0x75, 0x83, 0x19, 0xe0, 0x75, 0x27, 0x00, 0xf5, 0x28,
    0xd3, 0xe5, 0x28, 0x95, 0x19, 0xe5, 0x27, 0x95, 0x18, 0x40, 0x06, 0x85, 0x18, 0x27, 0x85, 0x19,
!   0x28, 0x12, 0x13, 0x17, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x14, 0x30}},
   {0x0706, 64, { 0xea, 0x49, 0x60, 0x32, 0x90, 0x7f, 0xee, 0xe0, 0x75, 0x18, 0x00, 0xf5, 0x19, 0xae, 0x02, 0xaf, 0x01,
    0x8e, 0x33, 0x8f, 0x34, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x27, 0xf5, 0x28,
    0xd3, 0x95, 0x19, 0xe5, 0x27, 0x95, 0x18, 0x40, 0x06, 0x85, 0x18, 0x27, 0x85, 0x19, 0x28, 0x12,
!   0x13, 0x17, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xb9}},
   {0x0746, 64, { 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0x00, 0xe5, 0x25, 0xf0, 0x90,
    0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x25, 0x02, 0x08,
!   0xb9, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x22, 0x12, 0x0a, 0xbd, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0x00,
    0xe5, 0x22, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x08, 0xb9, 0x90, 0x7f, 0xe8}},
   {0x0786, 64, { 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2, 0x00, 0xe4, 0x33, 0xff,
    0x25, 0xe0, 0xff, 0xa2, 0x06, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90,
***************
*** 166,431 ****
    0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0,
    0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
    0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe5, 0x11, 0x54, 0x0f, 0x70}},
!  {0x08c6, 64, { 0x03, 0x02, 0x09, 0xb2, 0x12, 0x16, 0xa5, 0xef, 0x20, 0xe1, 0x75, 0x12, 0x17, 0x03, 0xef, 0x14, 0xf5,
!   0x19, 0x12, 0x18, 0xcc, 0xef, 0x25, 0x19, 0xff, 0xe4, 0x33, 0xfe, 0xc3, 0xef, 0x94, 0x80, 0xee,
    0x64, 0x80, 0x94, 0x80, 0x50, 0x59, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xe0, 0xfe, 0xa3, 0xe0,
    0xff, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0x30, 0xe0, 0x11, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82}},
   {0x0906, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82,
    0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4,
    0x35, 0x14, 0xf5, 0x83, 0xe0, 0x20, 0xe2, 0x12, 0xe5, 0x19, 0x60, 0x0e, 0xf5, 0x23, 0xef, 0x24,
!   0x01, 0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0xad, 0xe4, 0xff, 0x12, 0x14, 0xe3}},
   {0x0946, 64, { 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe7, 0x5d, 0x12, 0x18,
!   0xcc, 0xe5, 0x15, 0x24, 0x3b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0xc3,
    0x9e, 0x50, 0x48, 0xe5, 0x15, 0x24, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01,
    0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7b}},
   {0x0986, 64, { 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x16, 0x42,
    0x13, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x10, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0xf5, 0x24, 0x80, 0x03, 0x12, 0x12, 0xa1, 0x12, 0x16, 0xd4, 0xef, 0x30,
!   0xe1, 0x03, 0x02, 0x0a, 0xb7, 0x12, 0x17, 0xd2, 0x8f, 0x19, 0x12, 0x18, 0xd8, 0xe5, 0x15}},
!  {0x09c6, 64, { 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x15, 0x24, 0x35, 0xf5, 0x82,
!   0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0xc3, 0x9f, 0x50, 0x28, 0x12, 0x18, 0xb4,
!   0xef, 0x30, 0xe0, 0x21, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
!   0x20, 0xe7, 0x12, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
!  {0x0a06, 64, { 0x20, 0xe1, 0x03, 0x02, 0x0a, 0xb7, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
!   0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x19, 0x70, 0x03, 0x02, 0x0a, 0xb7, 0xb4, 0x80, 0x0f, 0xe5, 0x15,
!   0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x15, 0x24,
!   0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe7, 0x29, 0xe5, 0x19}},
!  {0x0a46, 64, { 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x23, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
!   0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0x8c, 0x2c, 0xf5, 0x2d, 0x12, 0x13, 0xdd, 0xe5, 0x19, 0x25,
!   0xe0, 0xff, 0x12, 0x15, 0x19, 0x22, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03, 0x75, 0x19, 0x3f,
!   0x85, 0x19, 0x23, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
!  {0x0a86, 64, { 0xff, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xf5, 0x82, 0x8c, 0x83,
!   0xef, 0xf0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x24, 0x01,
!   0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0x6c, 0xe5, 0x19, 0x04, 0xff, 0x12, 0x15, 0x19,
!   0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0x90, 0x7f, 0x96}},
!  {0x0ac6, 64, { 0xf0, 0xe4, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x78, 0x4a, 0x04, 0xf0, 0xf5, 0x8e, 0x90, 0x7f, 0x95, 0x74,
!   0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98, 0x74, 0x1f, 0xf0, 0x90, 0x78,
!   0x43, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0x7f, 0xdf, 0x74, 0x9f, 0xf0, 0x90,
!   0x7f, 0xde, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0, 0x7e, 0x7b, 0x7f, 0xc0, 0x75}},
!  {0x0b06, 64, { 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12, 0x0f, 0x12,
!   0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0,
!   0x75, 0x16, 0x01, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0,
!   0x7e, 0x7e, 0x7f, 0x40, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7e, 0xf0, 0xa3, 0x74}},
!  {0x0b46, 64, { 0x40, 0xf0, 0x7e, 0x7e, 0x7f, 0x80, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7e, 0xf0,
!   0xa3, 0x74, 0x80, 0xf0, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f,
!   0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x0f, 0x12, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14,
!   0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0xe5, 0x15}},
!  {0x0b86, 64, { 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x7e, 0x7d, 0x7f, 0xc0, 0x85,
!   0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0xc0, 0xf0, 0x7e, 0x7e, 0x7f, 0x00,
!   0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7e, 0xf0, 0xa3, 0x74, 0x00, 0xf0, 0x7e,
    0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0}},
!  {0x0bc6, 64, { 0x75, 0x16, 0x04, 0x12, 0x0f, 0x12, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90,
!   0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0x74, 0x02, 0xf0, 0x7e, 0x7d, 0x7f, 0x40, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
!   0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x40, 0xf0, 0x7e, 0x7d, 0x7f, 0x80, 0x85, 0x15, 0x82, 0x85}},
!  {0x0c06, 64, { 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x80, 0xf0, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14,
!   0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x0f, 0x12,
!   0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0,
!   0x75, 0x16, 0x08, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74}},
!  {0x0c46, 64, { 0x03, 0xf0, 0x7e, 0x7c, 0x7f, 0xc0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7c, 0xf0, 0xa3, 0x74,
!   0xc0, 0xf0, 0x7e, 0x7d, 0x7f, 0x00, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7d,
!   0xf0, 0xa3, 0x74, 0x00, 0xf0, 0xc2, 0x0a, 0xc2, 0x09, 0xd2, 0x02, 0x22, 0xe5, 0x10, 0x04, 0x54,
!   0x03, 0xf5, 0x10, 0x14, 0x60, 0x1f, 0x14, 0x60, 0x31, 0x14, 0x60, 0x43, 0x24, 0x03, 0x70}},
!  {0x0c86, 64, { 0x52, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0,
!   0x75, 0x16, 0x01, 0x80, 0x3d, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90,
!   0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x80, 0x28, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14,
!   0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x80, 0x13}},
!  {0x0cc6, 64, { 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75,
!   0x16, 0x08, 0xe5, 0x32, 0x55, 0x16, 0x70, 0x03, 0x02, 0x0e, 0x11, 0xe5, 0x16, 0xf4, 0xff, 0x52,
!   0x32, 0xe5, 0x26, 0x54, 0x7f, 0xfe, 0x70, 0x0f, 0xe5, 0x2a, 0x55, 0x16, 0x60, 0x24, 0x90, 0x7f,
!   0x98, 0xe0, 0x45, 0x16, 0xf0, 0x80, 0x1b, 0xbe, 0x20, 0x18, 0xe5, 0x15, 0x24, 0x31, 0xf5}},
!  {0x0d06, 64, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe3, 0x09, 0xe4, 0xf5, 0x2a, 0x90, 0x7f, 0x98, 0xe0,
!   0x5f, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60, 0x03,
!   0xe0, 0x14, 0xf0, 0xe5, 0x15, 0x24, 0x34, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x60,
!   0x03, 0xe0, 0x14, 0xf0, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0x11, 0x74, 0x0a, 0xf0, 0x12, 0x00}},
!  {0x0d46, 64, { 0x36, 0xef, 0x54, 0x01, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x2c, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
!   0x83, 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0x12, 0x18, 0xe4, 0x8f,
!   0x19, 0xe5, 0x15, 0x24, 0x27, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19,
!   0x54, 0x10, 0xfe, 0x6f, 0x60, 0x06, 0xee, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24}},
!  {0x0d86, 64, { 0x28, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x80, 0xfe, 0x6f, 0x60,
!   0x06, 0xee, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x29, 0xf5, 0x82, 0xe4, 0x35, 0x14,
!   0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x20, 0xfe, 0x6f, 0x60, 0x15, 0xee, 0xf0, 0xe5, 0x15,
!   0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe4, 0x04, 0xe5, 0x16}},
!  {0x0dc6, 64, { 0x42, 0x13, 0xe5, 0x12, 0x55, 0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x2a, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x16, 0xe5, 0x19, 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82,
!   0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe5, 0x04, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x17, 0x55,
!   0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x30, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83}},
!  {0x0e06, 64, { 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0x22, 0x30, 0x09, 0x03, 0x02, 0x0f,
!   0x11, 0xe5, 0x24, 0x14, 0x60, 0x2a, 0x14, 0x60, 0x41, 0x14, 0x60, 0x58, 0x14, 0x60, 0x6f, 0x24,
!   0x04, 0x60, 0x03, 0x02, 0x0e, 0xcf, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0,
!   0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12, 0x12, 0xa1, 0x75, 0x24, 0x01}},
!  {0x0e46, 64, { 0x22, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0,
!   0x75, 0x16, 0x02, 0x12, 0x12, 0xa1, 0x75, 0x24, 0x02, 0x22, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14,
!   0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x12, 0xa1,
!   0x75, 0x24, 0x03, 0x22, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90}},
!  {0x0e86, 64, { 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x12, 0xa1, 0x75, 0x24, 0x04, 0x22, 0x30, 0x04,
!   0x33, 0xc2, 0x04, 0x53, 0x13, 0xdf, 0xe4, 0xf5, 0x19, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x2e, 0x25,
!   0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11, 0xab, 0xff, 0x74, 0x80, 0x25, 0x19, 0xf5, 0x82,
!   0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x19, 0xe5, 0x19, 0xb4, 0x03, 0xdb, 0x90}},
!  {0x0ec6, 64, { 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0x75, 0x24, 0x05, 0x22, 0xe5, 0x36, 0x60, 0x3b, 0xd5, 0x36, 0x0a, 0x53,
!   0x13, 0xef, 0x30, 0x0a, 0x04, 0xd2, 0x09, 0xc2, 0x0a, 0xe4, 0xf5, 0x19, 0x7e, 0x00, 0x7b, 0x00,
!   0x74, 0x35, 0x25, 0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11, 0xab, 0xff, 0x74, 0x80, 0x25,
!   0x19, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x19, 0xe5, 0x19, 0xb4}},
!  {0x0f06, 64, { 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x24, 0x22, 0xe4, 0xf5, 0x1a, 0x7e, 0x00,
!   0x7b, 0x01, 0xe5, 0x15, 0x25, 0x1a, 0xf9, 0xee, 0x35, 0x14, 0xfa, 0xe4, 0x12, 0x11, 0xf1, 0x05,
!   0x1a, 0xe5, 0x1a, 0xb4, 0x3c, 0xe8, 0xe5, 0x15, 0x24, 0x35, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
!   0x83, 0x74, 0x01, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5}},
!  {0x0f46, 64, { 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0xf0, 0x7f, 0x0c, 0xe4, 0xfd,
!   0x12, 0x16, 0x47, 0x7f, 0x10, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
!   0xef, 0xf0, 0x12, 0x15, 0xb7, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0x7f, 0x01, 0xe5, 0x15, 0x24,
!   0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0x44, 0x06, 0x90, 0xc0, 0x00}},
!  {0x0f86, 64, { 0xf0, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
!   0x83, 0x74, 0x80, 0xf0, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd, 0x12, 0x16, 0x47, 0xe4, 0xff,
!   0x7e, 0xa3, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xee, 0xf0, 0xfd,
!   0x12, 0x16, 0x47, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xe4, 0xf0, 0x7f}},
!  {0x0fc6, 64, { 0x05, 0x7d, 0x7f, 0x12, 0x16, 0x47, 0x7f, 0x01, 0x12, 0x15, 0x4f, 0x7f, 0x03, 0x7d, 0x07, 0x12, 0x16,
!   0x47, 0x22, 0x53, 0x13, 0x3f, 0x90, 0x7b, 0xf1, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7b, 0x7f, 0xc0,
!   0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12,
!   0x08, 0xc1, 0x90, 0x7c, 0x31, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14}},
!  {0x1006, 64, { 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x08, 0xc1, 0x90,
!   0x7c, 0x71, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40,
!   0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x08, 0xc1, 0x90, 0x7c, 0xb1, 0xe0,
!   0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f}},
!  {0x1046, 64, { 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x08, 0xc1, 0x05, 0x11, 0xe5, 0x11, 0x54, 0x0f, 0xf5,
!   0x18, 0x70, 0x1f, 0x90, 0x78, 0x41, 0xe0, 0x54, 0xf7, 0xf0, 0x90, 0x7f, 0x99, 0xe0, 0xf5, 0x17,
!   0x90, 0x78, 0x41, 0xe0, 0x44, 0x08, 0xf0, 0x90, 0x7f, 0x99, 0xe0, 0xf4, 0xf5, 0x12, 0x12, 0x11,
!   0x21, 0x22, 0xe5, 0x18, 0xb4, 0x01, 0x04, 0x12, 0x0c, 0x73, 0x22, 0x90, 0x7f, 0xc2, 0xe0}},
!  {0x1086, 64, { 0x20, 0xe1, 0x08, 0xe5, 0x13, 0x60, 0x04, 0x12, 0x0e, 0x12, 0x22, 0x12, 0x0c, 0x73, 0x22, 0x78, 0x7f,
!   0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x37, 0x02, 0x10, 0xdc, 0x02, 0x12, 0x29, 0xe4, 0x93, 0xa3,
!   0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4,
!   0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20}},
!  {0x10c6, 64, { 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04,
!   0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x18, 0x50, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff,
!   0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54,
!   0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3, 0xfa, 0xe4, 0x93, 0xa3, 0xf8}},
!  {0x1106, 64, { 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8,
!   0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0x90, 0x7f, 0xd2, 0xe0, 0x30, 0xe1,
!   0x03, 0x02, 0x11, 0xaa, 0xc2, 0x09, 0x90, 0x7b, 0x40, 0xe0, 0x14, 0x60, 0x26, 0x14, 0x60, 0x3b,
!   0x14, 0x60, 0x50, 0x24, 0x83, 0x60, 0x64, 0x24, 0x80, 0x70, 0x63, 0x7e, 0x7b, 0x7f, 0xc0}},
!  {0x1146, 64, { 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12, 0x00,
!   0x46, 0x80, 0x4b, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96,
!   0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x00, 0x46, 0x80, 0x33, 0x7e, 0x7c, 0x7f, 0x40, 0x75,
!   0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12}},
!  {0x1186, 64, { 0x00, 0x46, 0x80, 0x1b, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96,
!   0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x00, 0x46, 0x80, 0x03, 0x12, 0x17, 0x5c, 0xe4, 0x90,
!   0x7f, 0xd3, 0xf0, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7,
!   0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01}},
!  {0x11c6, 64, { 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50, 0x06, 0xe9, 0x25,
!   0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22, 0xe5, 0x82, 0x29,
!   0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a,
!   0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01, 0xf3, 0x22, 0xd0, 0x83, 0xd0}},
!  {0x1206, 64, { 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01,
!   0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3,
!   0x80, 0xdf, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x00, 0xe4, 0x33, 0xfe, 0xef, 0x4e, 0xf0,
!   0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xdf, 0xf0}},
!  {0x1246, 64, { 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef,
!   0x90, 0x7f, 0xaf, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0x74, 0x0d, 0xf0, 0xd2, 0xaf, 0xd2, 0x0b,
!   0x12, 0x18, 0x14, 0xc2, 0x01, 0xe4, 0xf5, 0x2b, 0xf5, 0x31, 0xc2, 0x07, 0xc2, 0x02, 0x75, 0x29,
!   0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x26, 0x60, 0x06, 0x75, 0x32, 0x0f, 0xe0, 0xf5, 0x26}},
!  {0x1286, 64, { 0x30, 0x02, 0x03, 0x12, 0x0f, 0xd9, 0x30, 0x01, 0x07, 0xc2, 0x01, 0x12, 0x06, 0x29, 0x80, 0xe2, 0x30,
!   0x08, 0xdf, 0xc2, 0x08, 0x12, 0x18, 0x35, 0x80, 0xd8, 0x22, 0xe5, 0x13, 0x55, 0x16, 0x60, 0x6a,
!   0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x70, 0x5c, 0xe5, 0x16,
!   0xf4, 0x52, 0x13, 0xe5, 0x15, 0x24, 0x26, 0xff, 0xe4, 0x35, 0x14, 0xfe, 0xe4, 0xfd, 0x0f}},
!  {0x12c6, 64, { 0xef, 0xaa, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0, 0xfc, 0x74, 0x80, 0x2d, 0xf5,
!   0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xec, 0xf0, 0x0d, 0xbd, 0x0b, 0xe2, 0x90, 0x7f, 0xc3, 0x74,
!   0x0b, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x10, 0xf0,
!   0xe5, 0x15, 0x24, 0x2e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x15}},
!  {0x1306, 64, { 0x24, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x22, 0xe5, 0x28, 0x45, 0x27, 0x60,
!   0x57, 0xae, 0x27, 0xaf, 0x28, 0xd3, 0xef, 0x94, 0x40, 0xee, 0x94, 0x00, 0x40, 0x04, 0x7e, 0x00,
!   0x7f, 0x40, 0xc3, 0xe5, 0x28, 0x9f, 0xf5, 0x28, 0xe5, 0x27, 0x9e, 0xf5, 0x27, 0xe4, 0xfd, 0xed,
!   0xc3, 0x9f, 0xe4, 0x9e, 0x50, 0x1f, 0x85, 0x34, 0x82, 0x85, 0x33, 0x83, 0xe0, 0xfc, 0x74}},
!  {0x1346, 64, { 0x00, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x0d, 0x05, 0x34, 0xe5, 0x34, 0x70,
!   0x02, 0x05, 0x33, 0x80, 0xda, 0x90, 0x7f, 0xa9, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x44,
!   0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xef, 0xf0, 0x22, 0x90, 0x7f, 0xac, 0xe0, 0x54, 0xfe, 0xf0, 0xe4,
!   0x90, 0x7f, 0xb5, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0}},
!  {0x1386, 64, { 0xf0, 0x90, 0x7f, 0x96, 0xf0, 0xe4, 0x90, 0x78, 0x4a, 0xf0, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x7f, 0x9d,
!   0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x30, 0x00, 0x07, 0xe5, 0x29, 0x54, 0xf0, 0xff,
!   0x80, 0x02, 0x7f, 0x00, 0xef, 0x44, 0x08, 0x90, 0x78, 0x41, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0,
!   0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x98, 0xf0}},
!  {0x13c6, 64, { 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0xe4, 0x90, 0x7f, 0x96, 0xf0, 0x90, 0x7f,
!   0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x8f, 0x1a, 0x05, 0x2d, 0xe5, 0x2d, 0xae, 0x2c, 0x70, 0x02,
!   0x05, 0x2c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12, 0x18, 0xf0, 0x05, 0x2d, 0xe5,
!   0x2d, 0xac, 0x2c, 0x70, 0x02, 0x05, 0x2c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x15}},
!  {0x1406, 64, { 0x23, 0xe5, 0x23, 0x60, 0x1f, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xc0,
!   0x83, 0xc0, 0x82, 0xe0, 0xfe, 0x12, 0x18, 0xd8, 0x8f, 0x1a, 0xee, 0x4f, 0xd0, 0x82, 0xd0, 0x83,
!   0xf0, 0x80, 0xb5, 0x22, 0x8f, 0x1a, 0xe4, 0xf5, 0x1b, 0x75, 0x1c, 0xff, 0x75, 0x1d, 0x19, 0x75,
!   0x1e, 0x86, 0xab, 0x1c, 0xaa, 0x1d, 0xa9, 0x1e, 0x90, 0x00, 0x01, 0x12, 0x11, 0xc4, 0xb4}},
!  {0x1446, 64, { 0x03, 0x1d, 0xaf, 0x1b, 0x05, 0x1b, 0xef, 0xb5, 0x1a, 0x01, 0x22, 0x12, 0x11, 0xab, 0x7e, 0x00, 0x29,
!   0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1c, 0xff, 0xf5, 0x1d, 0x89, 0x1e, 0x80, 0xd4, 0x7b, 0x00,
!   0x7a, 0x00, 0x79, 0x00, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0x78, 0x4f, 0x74, 0xc0, 0xf0,
!   0xe4, 0x90, 0x78, 0x50, 0xf0, 0xe5, 0x2c, 0x90, 0x78, 0x51, 0xf0, 0xae, 0x2c, 0xe5, 0x2d}},
!  {0x1486, 64, { 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90, 0x78, 0x57, 0x74, 0x04, 0xf0, 0x90,
!   0x7f, 0xe2, 0xe0, 0x44, 0x10, 0xf0, 0xe0, 0x54, 0xf7, 0xf0, 0xe4, 0x90, 0x78, 0x55, 0xf0, 0x90,
!   0x78, 0x55, 0xe0, 0x60, 0xfa, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0xe5, 0x2c, 0x90, 0x78, 0x4f,
!   0xf0, 0xae, 0x2c, 0xe5, 0x2d, 0x90, 0x78, 0x50, 0xf0, 0x90, 0x78, 0x51, 0x74, 0xc0, 0xf0}},
!  {0x14c6, 64, { 0xe4, 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90, 0x78, 0x57, 0x74, 0x04, 0xf0,
!   0xe4, 0x90, 0x78, 0x55, 0xf0, 0x90, 0x78, 0x55, 0xe0, 0x60, 0xfa, 0x22, 0xe5, 0x15, 0x24, 0x04,
!   0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0f, 0x14, 0x60, 0x13, 0x14, 0x60,
!   0x17, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xef, 0xf0, 0x80, 0x13, 0x90, 0x7f, 0xc9, 0xef, 0xf0}},
!  {0x1506, 64, { 0x80, 0x0c, 0x90, 0x7f, 0xcb, 0xef, 0xf0, 0x80, 0x05, 0x90, 0x7f, 0xcd, 0xef, 0xf0, 0xe5, 0x16, 0x42,
!   0x2a, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60,
!   0x0f, 0x14, 0x60, 0x13, 0x14, 0x60, 0x17, 0x80, 0x00, 0x90, 0x7f, 0xb7, 0xef, 0xf0, 0x80, 0x13,
!   0x90, 0x7f, 0xb9, 0xef, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xbb, 0xef, 0xf0, 0x80, 0x05, 0x90}},
!  {0x1546, 64, { 0x7f, 0xbd, 0xef, 0xf0, 0xe5, 0x16, 0x42, 0x2a, 0x22, 0xae, 0x07, 0xe4, 0xff, 0xe5, 0x15, 0x24, 0x32,
!   0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xfd, 0x12, 0x16, 0x47, 0x90, 0x78,
!   0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82,
!   0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xfd, 0x12, 0x16, 0x47, 0x22, 0xc0, 0xe0}},
!  {0x1586, 64, { 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0, 0xd0,
!   0x75, 0xd0, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x01, 0xf0, 0x12, 0x13, 0x12, 0xd0,
!   0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32,
!   0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41}},
!  {0x15c6, 64, { 0x74, 0x02, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24,
!   0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
!   0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74,
!   0x04, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15}},
!  {0x1606, 64, { 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22,
!   0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74,
!   0x06, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24,
!   0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0}},
!  {0x1646, 64, { 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
!   0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x07, 0xf0, 0x90, 0xc0,
!   0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x05, 0xf0, 0x90, 0xc0, 0x00, 0xed, 0xf0, 0x22, 0x90,
!   0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf, 0xf0, 0xe4, 0x90, 0x78, 0x41}},
!  {0x1686, 64, { 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5,
!   0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0xe5, 0x15,
!   0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e, 0x14, 0x60, 0x11,
!   0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xc6, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xc8, 0xe0}},
!  {0x16c6, 64, { 0xff, 0x22, 0x90, 0x7f, 0xca, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcc, 0xe0, 0xff, 0x22, 0xe5, 0x15, 0x24,
!   0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e, 0x14, 0x60, 0x11, 0x14,
!   0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xb6, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xb8, 0xe0, 0xff, 0x22,
!   0x90, 0x7f, 0xba, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xbc, 0xe0, 0xff, 0x22, 0xe5, 0x15, 0x24}},
!  {0x1706, 64, { 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e, 0x14, 0x60, 0x11, 0x14, 0x60,
!   0x14, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xc9, 0xe0, 0xff, 0x22, 0x90,
!   0x7f, 0xcb, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcd, 0xe0, 0xff, 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0,
!   0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4, 0xe4, 0xf0}},
!  {0x1746, 64, { 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82,
!   0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7b, 0x41, 0xe0, 0xf5, 0x36, 0x43, 0x13, 0x10, 0xa3, 0xe0,
!   0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0x90, 0x7b, 0x43, 0xe0, 0xf5,
!   0x37, 0xa3, 0xe0, 0x54, 0xf0, 0xf5, 0x29, 0xe0, 0x60, 0x02, 0xd2, 0x0a, 0x22, 0xc0, 0xe0}},
!  {0x1786, 64, { 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xd2, 0x01, 0x53, 0x91,
!   0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0,
!   0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
!   0x75, 0x86, 0x00, 0xd2, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08, 0xf0, 0xd0}},
!  {0x17c6, 64, { 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x12, 0x18, 0xc0, 0xae, 0x07,
!   0x12, 0x18, 0xc0, 0xad, 0x07, 0xee, 0x6d, 0x60, 0x10, 0x12, 0x18, 0xc0, 0xae, 0x07, 0xee, 0x6d,
!   0x60, 0x07, 0x12, 0x18, 0xc0, 0xad, 0x07, 0x80, 0xec, 0xaf, 0x06, 0x22, 0x74, 0x00, 0xf5, 0x86,
!   0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f}},
!  {0x1806, 64, { 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x90, 0x7f, 0xd6,
!   0xe0, 0x44, 0x04, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x0b, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f,
!   0xf4, 0x7e, 0x01, 0x12, 0x18, 0x6b, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0x22, 0x12, 0x13,
!   0x7c, 0x12, 0x18, 0x04, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0a, 0x7f, 0x05, 0x7e, 0x00}},
!  {0x1846, 64, { 0x12, 0x18, 0x6b, 0x12, 0x18, 0x9e, 0x12, 0x0a, 0xb8, 0x22, 0x03, 0x35, 0x80, 0x00, 0x00, 0x03, 0x2e,
!   0x81, 0x00, 0x00, 0xc1, 0x85, 0xc1, 0x81, 0xc1, 0x08, 0xc1, 0x00, 0xc1, 0x06, 0x01, 0x22, 0x00,
!   0x01, 0x24, 0x00, 0x00, 0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02,
!   0x15, 0x18, 0x4e, 0x60, 0x08, 0x12, 0x17, 0xf3, 0x12, 0x17, 0xf3, 0x80, 0xeb, 0x22, 0xe5}},
!  {0x1886, 64, { 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x04, 0xff, 0x44, 0x10, 0x90, 0x7f,
!   0xd7, 0xf0, 0xef, 0x44, 0x30, 0xf0, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d,
!   0x7e, 0x00, 0x12, 0x18, 0x6b, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x78, 0x41,
!   0x74, 0x02, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0}},
!  {0x18c6, 64, { 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
!   0x22, 0x90, 0x78, 0x41, 0x74, 0x05, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41,
!   0x74, 0x06, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0,
!   0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x00, 0x12, 0x01, 0x10, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x0a, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x04, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
--- 162,427 ----
    0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0,
    0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44,
    0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22, 0xe5, 0x11, 0x54, 0x0f, 0x70}},
!  {0x08c6, 64, { 0x03, 0x02, 0x09, 0xb2, 0x12, 0x16, 0xaa, 0xef, 0x20, 0xe1, 0x75, 0x12, 0x17, 0x08, 0xef, 0x14, 0xf5,
!   0x19, 0x12, 0x18, 0xd8, 0xef, 0x25, 0x19, 0xff, 0xe4, 0x33, 0xfe, 0xc3, 0xef, 0x94, 0x80, 0xee,
    0x64, 0x80, 0x94, 0x80, 0x50, 0x59, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xe0, 0xfe, 0xa3, 0xe0,
    0xff, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0x30, 0xe0, 0x11, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82}},
   {0x0906, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x0f, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82,
    0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4,
    0x35, 0x14, 0xf5, 0x83, 0xe0, 0x20, 0xe2, 0x12, 0xe5, 0x19, 0x60, 0x0e, 0xf5, 0x23, 0xef, 0x24,
!   0x01, 0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0xb2, 0xe4, 0xff, 0x12, 0x14, 0xe8}},
   {0x0946, 64, { 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe7, 0x5d, 0x12, 0x18,
!   0xd8, 0xe5, 0x15, 0x24, 0x3b, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0xc3,
    0x9e, 0x50, 0x48, 0xe5, 0x15, 0x24, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01,
    0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7b}},
   {0x0986, 64, { 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x16, 0x42,
    0x13, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x10, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0xf5, 0x24, 0x80, 0x03, 0x12, 0x12, 0xa6, 0x12, 0x16, 0xd9, 0xef, 0x30,
!   0xe1, 0x03, 0x02, 0x0a, 0xbc, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
!  {0x09c6, 64, { 0x83, 0xe0, 0x54, 0x80, 0xf0, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xc0,
!   0x83, 0xc0, 0x82, 0xe0, 0xfe, 0x12, 0x18, 0xe4, 0xee, 0x4f, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x12,
!   0x17, 0xde, 0x8f, 0x19, 0xe5, 0x15, 0x24, 0x35, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0,
!   0xfe, 0xef, 0xc3, 0x9e, 0x50, 0x28, 0x12, 0x18, 0xc0, 0xef, 0x30, 0xe0, 0x21, 0xe5, 0x15}},
!  {0x0a06, 64, { 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x20, 0xe7, 0x12, 0xe5, 0x15, 0x24, 0x31,
!   0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x03, 0x02, 0x0a, 0xbc, 0xe5, 0x15,
!   0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0xe5, 0x19, 0x70,
!   0x0e, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x22}},
!  {0x0a46, 64, { 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe7, 0x29, 0xe5,
!   0x19, 0xd3, 0x94, 0x20, 0x40, 0x03, 0x75, 0x19, 0x20, 0x85, 0x19, 0x23, 0x85, 0x15, 0x82, 0x85,
!   0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0x8c, 0x2c, 0xf5, 0x2d, 0x12, 0x13, 0xe2, 0xe5,
!   0x19, 0x25, 0xe0, 0xff, 0x12, 0x15, 0x1e, 0x22, 0xe5, 0x19, 0xd3, 0x94, 0x3f, 0x40, 0x03}},
!  {0x0a86, 64, { 0x75, 0x19, 0x3f, 0x85, 0x19, 0x23, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0, 0xfe, 0xa3,
!   0xe0, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0xe0,
!   0xfe, 0xa3, 0xe0, 0x24, 0x01, 0xf5, 0x2d, 0xe4, 0x3e, 0xf5, 0x2c, 0x12, 0x14, 0x71, 0xe5, 0x19,
!   0x04, 0xff, 0x12, 0x15, 0x1e, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74}},
!  {0x0ac6, 64, { 0xf0, 0xf0, 0x90, 0x7f, 0x96, 0xf0, 0xe4, 0x90, 0x7f, 0x94, 0xf0, 0x90, 0x78, 0x4a, 0x04, 0xf0, 0xf5,
!   0x8e, 0x90, 0x7f, 0x95, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0x3f, 0xf0, 0x90, 0x7f, 0x98,
!   0x74, 0x1f, 0xf0, 0x90, 0x78, 0x43, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0x7f,
!   0xdf, 0x74, 0x9f, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0x44, 0x02, 0xf0}},
!  {0x0b06, 64, { 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75,
!   0x16, 0x01, 0x12, 0x0f, 0x17, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90,
!   0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x7e, 0x7e, 0x7f, 0x40, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83}},
!  {0x0b46, 64, { 0x74, 0x7e, 0xf0, 0xa3, 0x74, 0x40, 0xf0, 0x7e, 0x7e, 0x7f, 0x80, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
!   0xa3, 0xa3, 0x74, 0x7e, 0xf0, 0xa3, 0x74, 0x80, 0xf0, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c,
!   0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x0f, 0x17, 0x7e,
!   0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0}},
!  {0x0b86, 64, { 0x75, 0x16, 0x02, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0,
!   0x7e, 0x7d, 0x7f, 0xc0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0xc0,
!   0xf0, 0x7e, 0x7e, 0x7f, 0x00, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7e, 0xf0,
!   0xa3, 0x74, 0x00, 0xf0, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90}},
!  {0x0bc6, 64, { 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x0f, 0x17, 0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14,
!   0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0xe5, 0x15, 0x24,
!   0x26, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x02, 0xf0, 0x7e, 0x7d, 0x7f, 0x40, 0x85,
!   0x15, 0x82, 0x85, 0x14, 0x83, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x40, 0xf0, 0x7e, 0x7d, 0x7f}},
!  {0x0c06, 64, { 0x80, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83, 0xa3, 0xa3, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x80, 0xf0, 0x7e,
!   0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75,
!   0x16, 0x08, 0x12, 0x0f, 0x17, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90,
!   0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0xe5, 0x15, 0x24, 0x26, 0xf5, 0x82, 0xe4}},
!  {0x0c46, 64, { 0x35, 0x14, 0xf5, 0x83, 0x74, 0x03, 0xf0, 0x7e, 0x7c, 0x7f, 0xc0, 0x85, 0x15, 0x82, 0x85, 0x14, 0x83,
!   0x74, 0x7c, 0xf0, 0xa3, 0x74, 0xc0, 0xf0, 0x7e, 0x7d, 0x7f, 0x00, 0x85, 0x15, 0x82, 0x85, 0x14,
!   0x83, 0xa3, 0xa3, 0x74, 0x7d, 0xf0, 0xa3, 0x74, 0x00, 0xf0, 0xc2, 0x0a, 0xc2, 0x09, 0xd2, 0x02,
!   0x22, 0xe5, 0x10, 0x04, 0x54, 0x03, 0xf5, 0x10, 0x14, 0x60, 0x1f, 0x14, 0x60, 0x31, 0x14}},
!  {0x0c86, 64, { 0x60, 0x43, 0x24, 0x03, 0x70, 0x52, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90,
!   0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x80, 0x3d, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14,
!   0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x80, 0x28, 0x7e,
    0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0}},
!  {0x0cc6, 64, { 0x75, 0x16, 0x04, 0x80, 0x13, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f,
!   0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0xe5, 0x32, 0x55, 0x16, 0x70, 0x03, 0x02, 0x0e, 0x16,
!   0xe5, 0x16, 0xf4, 0xff, 0x52, 0x32, 0xe5, 0x26, 0x54, 0x7f, 0xfe, 0x70, 0x0f, 0xe5, 0x2a, 0x55,
!   0x16, 0x60, 0x24, 0x90, 0x7f, 0x98, 0xe0, 0x45, 0x16, 0xf0, 0x80, 0x1b, 0xbe, 0x20, 0x18}},
!  {0x0d06, 64, { 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe3, 0x09, 0xe4, 0xf5,
!   0x2a, 0x90, 0x7f, 0x98, 0xe0, 0x5f, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14,
!   0xf5, 0x83, 0xe0, 0x60, 0x03, 0xe0, 0x14, 0xf0, 0xe5, 0x15, 0x24, 0x34, 0xf5, 0x82, 0xe4, 0x35,
!   0x14, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0xe0, 0x14, 0xf0, 0xe0, 0x60, 0x03, 0x02, 0x0e, 0x16}},
!  {0x0d46, 64, { 0x74, 0x0a, 0xf0, 0x12, 0x00, 0x36, 0xef, 0x54, 0x01, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x2c, 0xf5,
!   0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42,
!   0x13, 0x12, 0x18, 0xf0, 0x8f, 0x19, 0xe5, 0x15, 0x24, 0x27, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5,
!   0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x10, 0xfe, 0x6f, 0x60, 0x06, 0xee, 0xf0, 0xe5, 0x16}},
!  {0x0d86, 64, { 0x42, 0x13, 0xe5, 0x15, 0x24, 0x28, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19,
!   0x54, 0x80, 0xfe, 0x6f, 0x60, 0x06, 0xee, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x15, 0x24, 0x29,
!   0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x19, 0x54, 0x20, 0xfe, 0x6f, 0x60,
!   0x15, 0xee, 0xf0, 0xe5, 0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0}},
!  {0x0dc6, 64, { 0x30, 0xe4, 0x04, 0xe5, 0x16, 0x42, 0x13, 0xe5, 0x12, 0x55, 0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24,
!   0x2a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x16, 0xe5, 0x19, 0xf0, 0xe5,
!   0x15, 0x24, 0x31, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x30, 0xe5, 0x04, 0xe5, 0x16,
!   0x42, 0x13, 0xe5, 0x17, 0x55, 0x16, 0xff, 0xf5, 0x19, 0xe5, 0x15, 0x24, 0x30, 0xf5, 0x82}},
!  {0x0e06, 64, { 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x6f, 0x60, 0x07, 0xe5, 0x19, 0xf0, 0xe5, 0x16, 0x42, 0x13, 0x22,
!   0x30, 0x09, 0x03, 0x02, 0x0f, 0x16, 0xe5, 0x24, 0x14, 0x60, 0x2a, 0x14, 0x60, 0x41, 0x14, 0x60,
!   0x58, 0x14, 0x60, 0x6f, 0x24, 0x04, 0x60, 0x03, 0x02, 0x0e, 0xd4, 0x7e, 0x7b, 0x7f, 0xc0, 0x75,
!   0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0, 0x75, 0x16, 0x01, 0x12}},
!  {0x0e46, 64, { 0x12, 0xa6, 0x75, 0x24, 0x01, 0x22, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90,
!   0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x12, 0xa6, 0x75, 0x24, 0x02, 0x22, 0x7e,
!   0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75,
!   0x16, 0x04, 0x12, 0x12, 0xa6, 0x75, 0x24, 0x03, 0x22, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14}},
!  {0x0e86, 64, { 0x7c, 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x12, 0xa6, 0x75,
!   0x24, 0x04, 0x22, 0x30, 0x04, 0x33, 0xc2, 0x04, 0x53, 0x13, 0xdf, 0xe4, 0xf5, 0x19, 0x7e, 0x00,
!   0x7b, 0x00, 0x74, 0x2e, 0x25, 0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11, 0xb0, 0xff, 0x74,
!   0x80, 0x25, 0x19, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x19, 0xe5}},
!  {0x0ec6, 64, { 0x19, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0x75, 0x24, 0x05, 0x22, 0xe5, 0x36, 0x60,
!   0x3b, 0xd5, 0x36, 0x0a, 0x53, 0x13, 0xef, 0x30, 0x0a, 0x04, 0xd2, 0x09, 0xc2, 0x0a, 0xe4, 0xf5,
!   0x19, 0x7e, 0x00, 0x7b, 0x00, 0x74, 0x35, 0x25, 0x19, 0xf9, 0xee, 0x34, 0x00, 0xfa, 0x12, 0x11,
!   0xb0, 0xff, 0x74, 0x80, 0x25, 0x19, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xef, 0xf0}},
!  {0x0f06, 64, { 0x05, 0x19, 0xe5, 0x19, 0xb4, 0x03, 0xdb, 0x90, 0x7f, 0xc3, 0x74, 0x03, 0xf0, 0xe4, 0xf5, 0x24, 0x22,
!   0xe4, 0xf5, 0x1a, 0x7e, 0x00, 0x7b, 0x01, 0xe5, 0x15, 0x25, 0x1a, 0xf9, 0xee, 0x35, 0x14, 0xfa,
!   0xe4, 0x12, 0x11, 0xf6, 0x05, 0x1a, 0xe5, 0x1a, 0xb4, 0x3c, 0xe8, 0xe5, 0x15, 0x24, 0x35, 0xf5,
!   0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0}},
!  {0x0f46, 64, { 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00,
!   0xf0, 0x7f, 0x0c, 0xe4, 0xfd, 0x12, 0x16, 0x4c, 0x7f, 0x10, 0xe5, 0x15, 0x24, 0x33, 0xf5, 0x82,
!   0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0, 0x12, 0x15, 0xbc, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0,
!   0x7f, 0x01, 0xe5, 0x15, 0x24, 0x36, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xef, 0xf0}},
!  {0x0f86, 64, { 0x44, 0x06, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0xe5, 0x15, 0x24, 0x39, 0xf5,
!   0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0x74, 0x80, 0xf0, 0x90, 0xc0, 0x00, 0xf0, 0x0f, 0xe4, 0xfd,
!   0x12, 0x16, 0x4c, 0xe4, 0xff, 0x7e, 0xa3, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14,
!   0xf5, 0x83, 0xee, 0xf0, 0xfd, 0x12, 0x16, 0x4c, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90}},
!  {0x0fc6, 64, { 0xc0, 0x00, 0xe4, 0xf0, 0x7f, 0x05, 0x7d, 0x7f, 0x12, 0x16, 0x4c, 0x7f, 0x01, 0x12, 0x15, 0x54, 0x7f,
!   0x03, 0x7d, 0x07, 0x12, 0x16, 0x4c, 0x22, 0x53, 0x13, 0x3f, 0x90, 0x7b, 0xf1, 0xe0, 0x30, 0xe3,
!   0x16, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef,
!   0xf0, 0x75, 0x16, 0x01, 0x12, 0x08, 0xc1, 0x90, 0x7c, 0x31, 0xe0, 0x30, 0xe3, 0x16, 0x7e}},
!  {0x1006, 64, { 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16,
!   0x02, 0x12, 0x08, 0xc1, 0x90, 0x7c, 0x71, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x40, 0x75,
!   0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf, 0xf0, 0x75, 0x16, 0x04, 0x12, 0x08,
!   0xc1, 0x90, 0x7c, 0xb1, 0xe0, 0x30, 0xe3, 0x16, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c}},
!  {0x1046, 64, { 0x75, 0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x08, 0xc1, 0x05, 0x11,
!   0xe5, 0x11, 0x54, 0x0f, 0xf5, 0x18, 0x70, 0x1f, 0x90, 0x78, 0x41, 0xe0, 0x54, 0xf7, 0xf0, 0x90,
!   0x7f, 0x99, 0xe0, 0xf5, 0x17, 0x90, 0x78, 0x41, 0xe0, 0x44, 0x08, 0xf0, 0x90, 0x7f, 0x99, 0xe0,
!   0xf4, 0xf5, 0x12, 0x12, 0x11, 0x26, 0x22, 0xe5, 0x18, 0xb4, 0x01, 0x04, 0x12, 0x0c, 0x78}},
!  {0x1086, 64, { 0x22, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x08, 0xe5, 0x13, 0x60, 0x04, 0x12, 0x0e, 0x17, 0x22, 0x12,
!   0x0c, 0x78, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x37, 0x02, 0x10, 0xe1, 0x02,
!   0x12, 0x2e, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08,
!   0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33}},
!  {0x10c6, 64, { 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf, 0xe4,
!   0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x18, 0x5c, 0xe4, 0x7e, 0x01,
!   0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93, 0xa3,
!   0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3}},
!  {0x1106, 64, { 0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xf0,
!   0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe, 0x90,
!   0x7f, 0xd2, 0xe0, 0x30, 0xe1, 0x03, 0x02, 0x11, 0xaf, 0xc2, 0x09, 0x90, 0x7b, 0x40, 0xe0, 0x14,
!   0x60, 0x26, 0x14, 0x60, 0x3b, 0x14, 0x60, 0x50, 0x24, 0x83, 0x60, 0x64, 0x24, 0x80, 0x70}},
!  {0x1146, 64, { 0x63, 0x7e, 0x7b, 0x7f, 0xc0, 0x75, 0x14, 0x7b, 0x75, 0x15, 0xc0, 0x90, 0x7f, 0x96, 0x74, 0xef, 0xf0,
!   0x75, 0x16, 0x01, 0x12, 0x00, 0x46, 0x80, 0x4b, 0x7e, 0x7c, 0x7f, 0x00, 0x75, 0x14, 0x7c, 0x75,
!   0x15, 0x00, 0x90, 0x7f, 0x96, 0x74, 0xdf, 0xf0, 0x75, 0x16, 0x02, 0x12, 0x00, 0x46, 0x80, 0x33,
!   0x7e, 0x7c, 0x7f, 0x40, 0x75, 0x14, 0x7c, 0x75, 0x15, 0x40, 0x90, 0x7f, 0x96, 0x74, 0xbf}},
!  {0x1186, 64, { 0xf0, 0x75, 0x16, 0x04, 0x12, 0x00, 0x46, 0x80, 0x1b, 0x7e, 0x7c, 0x7f, 0x80, 0x75, 0x14, 0x7c, 0x75,
!   0x15, 0x80, 0x90, 0x7f, 0x96, 0x74, 0x7f, 0xf0, 0x75, 0x16, 0x08, 0x12, 0x00, 0x46, 0x80, 0x03,
!   0x12, 0x17, 0x8f, 0xe4, 0x90, 0x7f, 0xd3, 0xf0, 0x22, 0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83,
!   0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02, 0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83}},
!  {0x11c6, 64, { 0xe4, 0x93, 0x22, 0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0,
!   0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8,
!   0xe2, 0x22, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22, 0xbb,
!   0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xf0, 0x22, 0x50, 0x02, 0xf7, 0x22, 0xbb, 0xfe, 0x01}},
!  {0x1206, 64, { 0xf3, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12, 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3,
!   0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68,
!   0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x90, 0x7f, 0xae, 0xe0, 0xff, 0xd3, 0x92, 0x00, 0xe4,
!   0x33, 0xfe, 0xef, 0x4e, 0xf0, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xde, 0x74, 0x01}},
!  {0x1246, 64, { 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f,
!   0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaf, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0x74, 0x0d,
!   0xf0, 0xd2, 0xaf, 0xd2, 0x0b, 0x12, 0x18, 0x20, 0xc2, 0x01, 0xe4, 0xf5, 0x2b, 0xf5, 0x31, 0xc2,
!   0x07, 0xc2, 0x02, 0x75, 0x29, 0xf0, 0x90, 0x7f, 0xd8, 0xe0, 0x65, 0x26, 0x60, 0x06, 0x75}},
!  {0x1286, 64, { 0x32, 0x0f, 0xe0, 0xf5, 0x26, 0x30, 0x02, 0x03, 0x12, 0x0f, 0xde, 0x30, 0x01, 0x07, 0xc2, 0x01, 0x12,
!   0x06, 0x29, 0x80, 0xe2, 0x30, 0x08, 0xdf, 0xc2, 0x08, 0x12, 0x18, 0x41, 0x80, 0xd8, 0x22, 0xe5,
!   0x13, 0x55, 0x16, 0x60, 0x6a, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83,
!   0xe0, 0x70, 0x5c, 0xe5, 0x16, 0xf4, 0x52, 0x13, 0xe5, 0x15, 0x24, 0x26, 0xff, 0xe4, 0x35}},
!  {0x12c6, 64, { 0x14, 0xfe, 0xe4, 0xfd, 0x0f, 0xef, 0xaa, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0,
!   0xfc, 0x74, 0x80, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x7b, 0xf5, 0x83, 0xec, 0xf0, 0x0d, 0xbd, 0x0b,
!   0xe2, 0x90, 0x7f, 0xc3, 0x74, 0x0b, 0xf0, 0xe5, 0x15, 0x24, 0x3a, 0xf5, 0x82, 0xe4, 0x35, 0x14,
!   0xf5, 0x83, 0x74, 0x10, 0xf0, 0xe5, 0x15, 0x24, 0x2e, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5}},
!  {0x1306, 64, { 0x83, 0xe4, 0xf0, 0xe5, 0x15, 0x24, 0x2f, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe4, 0xf0, 0x22,
!   0xe5, 0x28, 0x45, 0x27, 0x60, 0x57, 0xae, 0x27, 0xaf, 0x28, 0xd3, 0xef, 0x94, 0x40, 0xee, 0x94,
!   0x00, 0x40, 0x04, 0x7e, 0x00, 0x7f, 0x40, 0xc3, 0xe5, 0x28, 0x9f, 0xf5, 0x28, 0xe5, 0x27, 0x9e,
!   0xf5, 0x27, 0xe4, 0xfd, 0xed, 0xc3, 0x9f, 0xe4, 0x9e, 0x50, 0x1f, 0x85, 0x34, 0x82, 0x85}},
!  {0x1346, 64, { 0x33, 0x83, 0xe0, 0xfc, 0x74, 0x00, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x0d,
!   0x05, 0x34, 0xe5, 0x34, 0x70, 0x02, 0x05, 0x33, 0x80, 0xda, 0x90, 0x7f, 0xa9, 0x74, 0x01, 0xf0,
!   0x90, 0x7f, 0xac, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb5, 0xef, 0xf0, 0x22, 0x90, 0x7f, 0xac,
!   0xe0, 0x54, 0xfe, 0xf0, 0xe4, 0x90, 0x7f, 0xb5, 0xf0, 0x22, 0xe4, 0x90, 0x7f, 0x93, 0xf0}},
!  {0x1386, 64, { 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0x90, 0x7f, 0x96, 0xf0, 0xe4, 0x90, 0x78, 0x4a, 0xf0, 0x90, 0x7f,
!   0x94, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x30, 0x00, 0x07,
!   0xe5, 0x29, 0x54, 0xf0, 0xff, 0x80, 0x02, 0x7f, 0x00, 0xef, 0x44, 0x08, 0x90, 0x78, 0x41, 0xf0,
!   0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x95, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xff, 0xf0}},
!  {0x13c6, 64, { 0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x93, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xf0, 0xf0, 0xe4, 0x90,
!   0x7f, 0x96, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0x54, 0xfd, 0xf0, 0x22, 0x8f, 0x1a, 0x05, 0x2d, 0xe5,
!   0x2d, 0xae, 0x2c, 0x70, 0x02, 0x05, 0x2c, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x1a, 0xf0, 0x12,
!   0x1a, 0x08, 0x05, 0x2d, 0xe5, 0x2d, 0xac, 0x2c, 0x70, 0x02, 0x05, 0x2c, 0x14, 0xf5, 0x82}},
!  {0x1406, 64, { 0x8c, 0x83, 0xef, 0xf0, 0x15, 0x23, 0xe5, 0x23, 0x60, 0x1f, 0xe5, 0x15, 0x24, 0x38, 0xf5, 0x82, 0xe4,
!   0x35, 0x14, 0xf5, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfe, 0x12, 0x18, 0xe4, 0x8f, 0x1a, 0xee,
!   0x4f, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x80, 0xb5, 0x22, 0x8f, 0x1a, 0xe4, 0xf5, 0x1b, 0x75, 0x1c,
!   0xff, 0x75, 0x1d, 0x19, 0x75, 0x1e, 0x86, 0xab, 0x1c, 0xaa, 0x1d, 0xa9, 0x1e, 0x90, 0x00}},
!  {0x1446, 64, { 0x01, 0x12, 0x11, 0xc9, 0xb4, 0x03, 0x1d, 0xaf, 0x1b, 0x05, 0x1b, 0xef, 0xb5, 0x1a, 0x01, 0x22, 0x12,
!   0x11, 0xb0, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75, 0x1c, 0xff, 0xf5, 0x1d, 0x89,
!   0x1e, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90,
!   0x78, 0x4f, 0x74, 0xc0, 0xf0, 0xe4, 0x90, 0x78, 0x50, 0xf0, 0xe5, 0x2c, 0x90, 0x78, 0x51}},
!  {0x1486, 64, { 0xf0, 0xae, 0x2c, 0xe5, 0x2d, 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90, 0x78,
!   0x57, 0x74, 0x04, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x10, 0xf0, 0xe0, 0x54, 0xf7, 0xf0, 0xe4,
!   0x90, 0x78, 0x55, 0xf0, 0x90, 0x78, 0x55, 0xe0, 0x60, 0xfa, 0x22, 0xe4, 0x90, 0x78, 0x41, 0xf0,
!   0xe5, 0x2c, 0x90, 0x78, 0x4f, 0xf0, 0xae, 0x2c, 0xe5, 0x2d, 0x90, 0x78, 0x50, 0xf0, 0x90}},
!  {0x14c6, 64, { 0x78, 0x51, 0x74, 0xc0, 0xf0, 0xe4, 0x90, 0x78, 0x52, 0xf0, 0x90, 0x78, 0x54, 0xe5, 0x23, 0xf0, 0x90,
!   0x78, 0x57, 0x74, 0x04, 0xf0, 0xe4, 0x90, 0x78, 0x55, 0xf0, 0x90, 0x78, 0x55, 0xe0, 0x60, 0xfa,
!   0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0f,
!   0x14, 0x60, 0x13, 0x14, 0x60, 0x17, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xef, 0xf0, 0x80, 0x13}},
!  {0x1506, 64, { 0x90, 0x7f, 0xc9, 0xef, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xcb, 0xef, 0xf0, 0x80, 0x05, 0x90, 0x7f, 0xcd,
!   0xef, 0xf0, 0xe5, 0x16, 0x42, 0x2a, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14,
!   0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0f, 0x14, 0x60, 0x13, 0x14, 0x60, 0x17, 0x80, 0x00, 0x90, 0x7f,
!   0xb7, 0xef, 0xf0, 0x80, 0x13, 0x90, 0x7f, 0xb9, 0xef, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xbb}},
!  {0x1546, 64, { 0xef, 0xf0, 0x80, 0x05, 0x90, 0x7f, 0xbd, 0xef, 0xf0, 0xe5, 0x16, 0x42, 0x2a, 0x22, 0xae, 0x07, 0xe4,
!   0xff, 0xe5, 0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0xfd,
!   0x12, 0x16, 0x4c, 0x90, 0x78, 0x41, 0x74, 0x01, 0xf0, 0x90, 0xc0, 0x00, 0xee, 0xf0, 0xe4, 0xe5,
!   0x15, 0x24, 0x32, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x44, 0x80, 0xfd, 0x12}},
!  {0x1586, 64, { 0x16, 0x4c, 0x22, 0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86,
!   0x75, 0x86, 0x00, 0xc0, 0xd0, 0x75, 0xd0, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x01,
!   0xf0, 0x12, 0x13, 0x17, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83,
!   0xd0, 0xf0, 0xd0, 0xe0, 0x32, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74}},
!  {0x15c6, 64, { 0xbf, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74,
!   0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f,
!   0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
!   0xf0, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41}},
!  {0x1606, 64, { 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f,
!   0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf,
!   0xf0, 0x90, 0x78, 0x41, 0x74, 0x06, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74,
!   0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54}},
!  {0x1646, 64, { 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0xe5, 0x15, 0x24, 0x37, 0xf5,
!   0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0, 0x00, 0xf0, 0x90, 0x78, 0x41,
!   0x74, 0x07, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x05, 0xf0, 0x90, 0xc0,
!   0x00, 0xed, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0x74, 0xbf}},
!  {0x1686, 64, { 0xf0, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0, 0x00, 0xef, 0xf0, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0,
!   0xe5, 0x15, 0x24, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x54, 0x7f, 0x90, 0xc0,
!   0x00, 0xf0, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14,
!   0x60, 0x0e, 0x14, 0x60, 0x11, 0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xc6, 0xe0, 0xff}},
!  {0x16c6, 64, { 0x22, 0x90, 0x7f, 0xc8, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xca, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcc, 0xe0,
!   0xff, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60,
!   0x0e, 0x14, 0x60, 0x11, 0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xb6, 0xe0, 0xff, 0x22, 0x90,
!   0x7f, 0xb8, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xba, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xbc, 0xe0}},
!  {0x1706, 64, { 0xff, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x14, 0x60, 0x0e,
!   0x14, 0x60, 0x11, 0x14, 0x60, 0x14, 0x80, 0x00, 0x90, 0x7f, 0xc7, 0xe0, 0xff, 0x22, 0x90, 0x7f,
!   0xc9, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcb, 0xe0, 0xff, 0x22, 0x90, 0x7f, 0xcd, 0xe0, 0xff, 0x22,
!   0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00}},
!  {0x1746, 64, { 0x30, 0x05, 0x04, 0xc2, 0x05, 0x80, 0x02, 0xd2, 0x08, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08,
!   0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xc0, 0xe0,
!   0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x90, 0x7f, 0xc4,
!   0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x04, 0xf0, 0xd0, 0x86, 0xd0, 0x84}},
!  {0x1786, 64, { 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x90, 0x7b, 0x41, 0xe0, 0xf5, 0x36, 0x43, 0x13,
!   0x10, 0xa3, 0xe0, 0x60, 0x09, 0x90, 0x7f, 0xd7, 0x74, 0x17, 0xf0, 0x74, 0x37, 0xf0, 0x90, 0x7b,
!   0x43, 0xe0, 0xf5, 0x37, 0xa3, 0xe0, 0x54, 0xf0, 0xf5, 0x29, 0xe0, 0x60, 0x02, 0xd2, 0x0a, 0x22,
!   0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00}},
!  {0x17c6, 64, { 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85,
!   0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0x12, 0x18, 0xcc, 0xae, 0x07, 0x12, 0x18, 0xcc, 0xad,
!   0x07, 0xee, 0x6d, 0x60, 0x10, 0x12, 0x18, 0xcc, 0xae, 0x07, 0xee, 0x6d, 0x60, 0x07, 0x12, 0x18,
!   0xcc, 0xad, 0x07, 0x80, 0xec, 0xaf, 0x06, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5}},
!  {0x1806, 64, { 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0,
!   0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x04, 0xf0,
!   0xe0, 0x44, 0x08, 0xf0, 0x30, 0x0b, 0x04, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12,
!   0x18, 0x77, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0, 0x22, 0x12, 0x13, 0x81, 0x12, 0x18}},
!  {0x1846, 64, { 0x10, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x0a, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x18, 0x77, 0x12, 0x18,
!   0xaa, 0x12, 0x0a, 0xbd, 0x22, 0x03, 0x35, 0x80, 0x00, 0x00, 0x03, 0x2e, 0x81, 0x00, 0x00, 0xc1,
!   0x85, 0xc1, 0x81, 0xc1, 0x08, 0xc1, 0x00, 0xc1, 0x06, 0x01, 0x22, 0x00, 0x01, 0x24, 0x00, 0x00,
!   0x8e, 0x18, 0x8f, 0x19, 0xe5, 0x19, 0x15, 0x19, 0xae, 0x18, 0x70, 0x02, 0x15, 0x18, 0x4e}},
!  {0x1886, 64, { 0x60, 0x08, 0x12, 0x17, 0xff, 0x12, 0x17, 0xff, 0x80, 0xeb, 0x22, 0xe5, 0x15, 0x24, 0x04, 0xf5, 0x82,
!   0xe4, 0x35, 0x14, 0xf5, 0x83, 0xe0, 0x04, 0xff, 0x44, 0x10, 0x90, 0x7f, 0xd7, 0xf0, 0xef, 0x44,
!   0x30, 0xf0, 0x22, 0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x0d, 0x7e, 0x00, 0x12, 0x18,
!   0x77, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22, 0x90, 0x78, 0x41, 0x74, 0x02, 0xf0}},
!  {0x18c6, 64, { 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x03, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff,
!   0x22, 0x90, 0x78, 0x41, 0x74, 0x04, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41,
!   0x74, 0x05, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x90, 0x78, 0x41, 0x74, 0x06, 0xf0, 0x90,
!   0xc0, 0x00, 0xe0, 0xff, 0x22, 0x53, 0xd8, 0xef, 0x32, 0x12, 0x01, 0x00, 0x01, 0xff, 0x00}},
   {0x1906, 64, { 0x00, 0x40, 0xcd, 0x06, 0x0a, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x04, 0x09, 0x02, 0x74, 0x00, 0x01,
    0x01, 0x00, 0xa0, 0x32, 0x09, 0x04, 0x00, 0x00, 0x0e, 0xff, 0x00, 0x00, 0x00, 0x07, 0x05, 0x01,
    0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40,
***************
*** 442,448 ****
    0x00, 0x42, 0x00, 0x20, 0x00, 0x34, 0x00, 0x2d, 0x00, 0x70, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x74,
    0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x20,
    0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00}},
!  {0x1a06, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
--- 438,444 ----
    0x00, 0x42, 0x00, 0x20, 0x00, 0x34, 0x00, 0x2d, 0x00, 0x70, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x74,
    0x00, 0x20, 0x00, 0x53, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x20,
    0x00, 0x41, 0x00, 0x64, 0x00, 0x61, 0x00, 0x70, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00}},
!  {0x1a06, 64, { 0x00, 0x00, 0xe4, 0x90, 0x78, 0x41, 0xf0, 0x90, 0xc0, 0x00, 0xe0, 0xff, 0x22, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}},
***************
*** 457,464 ****
   {0x1ac6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17, 0x84, 0x00, 0x02, 0x1b}},
!  {0x1b06, 21, { 0x04, 0x00, 0x02, 0x17, 0x32, 0x00, 0x02, 0x17, 0xab, 0x00, 0x02, 0x1b, 0x10, 0x00, 0x02, 0x1b, 0x14,
!   0x00, 0x02, 0x15, 0x84}},
!  {0xffff, 0, {0x00}}
  };
--- 453,460 ----
   {0x1ac6, 64, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
!   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x17, 0xb7, 0x00, 0x02, 0x1b}},
!  {0x1b06, 21, { 0x04, 0x00, 0x02, 0x17, 0x65, 0x00, 0x02, 0x17, 0x37, 0x00, 0x02, 0x1b, 0x10, 0x00, 0x02, 0x1b, 0x14,
!   0x00, 0x02, 0x15, 0x89}},
! { 0xffff,	0,	{0x00} }
  };
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial$B$@$1$KH/8+(B: kl5kusb105.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial$B$@$1$KH/8+(B: kl5kusb105.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/mct_u232.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/mct_u232.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/mct_u232.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/mct_u232.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 61,75 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
--- 61,78 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
***************
*** 129,135 ****
  /*
   * All of the device info needed for the MCT USB-RS232 converter.
   */
! static struct usb_device_id id_table_combined [] = {
  	{ USB_DEVICE(MCT_U232_VID, MCT_U232_PID) },
  	{ USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) },
  	{ USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) },
--- 132,138 ----
  /*
   * All of the device info needed for the MCT USB-RS232 converter.
   */
! static __devinitdata struct usb_device_id id_table_combined [] = {
  	{ USB_DEVICE(MCT_U232_VID, MCT_U232_PID) },
  	{ USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) },
  	{ USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) },
***************
*** 137,167 ****
  	{ }		/* Terminating entry */
  };
  
  MODULE_DEVICE_TABLE (usb, id_table_combined);
  
  
  static struct usb_serial_device_type mct_u232_device = {
! 	.owner =	     THIS_MODULE,
! 	.name =		     "Magic Control Technology USB-RS232",
! 	.id_table =	     id_table_combined,
! 	.num_interrupt_in =  2,
! 	.num_bulk_in =	     0,
! 	.num_bulk_out =	     1,
! 	.num_ports =	     1,
! 	.open =		     mct_u232_open,
! 	.close =	     mct_u232_close,
  #ifdef FIX_WRITE_RETURN_CODE_PROBLEM
! 	.write =	     mct_u232_write,
! 	.write_bulk_callback = mct_u232_write_bulk_callback,
  #endif
! 	.read_int_callback = mct_u232_read_int_callback,
! 	.ioctl =	     mct_u232_ioctl,
! 	.set_termios =	     mct_u232_set_termios,
! 	.break_ctl =	     mct_u232_break_ctl,
! 	.startup =	     mct_u232_startup,
! 	.shutdown =	     mct_u232_shutdown,
  };
  
  
  struct mct_u232_private {
  	unsigned long	     control_state; /* Modem Line Setting (TIOCM) */
--- 140,238 ----
  	{ }		/* Terminating entry */
  };
  
+ static __devinitdata struct usb_device_id mct_u232_table [] = {
+         { USB_DEVICE(MCT_U232_VID, MCT_U232_PID) },
+ 	{ USB_DEVICE(MCT_U232_BELKIN_F5U109_VID, MCT_U232_BELKIN_F5U109_PID) },
+         { }                        /* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id mct_u232_sitecom_table [] = {
+         { USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) },
+         { }                        /* Terminating entry */
+ };
+ 
+ static __devinitdata struct usb_device_id mct_u232_du_h3sp_table [] = {
+         { USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) },
+         { }                        /* Terminating entry */
+ };
+ 
  MODULE_DEVICE_TABLE (usb, id_table_combined);
  
  
  static struct usb_serial_device_type mct_u232_device = {
! 	name:		     "Magic Control Technology USB-RS232",
! 	id_table:	     mct_u232_table,
! 	needs_interrupt_in:  MUST_HAVE,	 /* 2 interrupt-in endpoints */
! 	needs_bulk_in:	     MUST_HAVE_NOT,   /* no bulk-in endpoint */
! 	needs_bulk_out:	     MUST_HAVE,	      /* 1 bulk-out endpoint */
! 	num_interrupt_in:    2,
! 	num_bulk_in:	     0,
! 	num_bulk_out:	     1,
! 	num_ports:	     1,
! 	open:		     mct_u232_open,
! 	close:		     mct_u232_close,
  #ifdef FIX_WRITE_RETURN_CODE_PROBLEM
! 	write:		     mct_u232_write,
! 	write_bulk_callback: mct_u232_write_bulk_callback,
  #endif
! 	read_int_callback:   mct_u232_read_int_callback,
! 	ioctl:		     mct_u232_ioctl,
! 	set_termios:	     mct_u232_set_termios,
! 	break_ctl:	     mct_u232_break_ctl,
! 	startup:	     mct_u232_startup,
! 	shutdown:	     mct_u232_shutdown,
  };
  
+ static struct usb_serial_device_type mct_u232_sitecom_device = {
+ 	name:		     "MCT/Sitecom USB-RS232",
+ 	id_table:	     mct_u232_sitecom_table,
+ 	needs_interrupt_in:  MUST_HAVE,	 /* 2 interrupt-in endpoints */
+ 	needs_bulk_in:	     MUST_HAVE_NOT,   /* no bulk-in endpoint */
+ 	needs_bulk_out:	     MUST_HAVE,	      /* 1 bulk-out endpoint */
+ 	num_interrupt_in:    2,
+ 	num_bulk_in:	     0,
+ 	num_bulk_out:	     1,
+ 	num_ports:	     1,
+ 	open:		     mct_u232_open,
+ 	close:		     mct_u232_close,
+ #ifdef FIX_WRITE_RETURN_CODE_PROBLEM
+ 	write:		     mct_u232_write,
+ 	write_bulk_callback: mct_u232_write_bulk_callback,
+ #endif
+ 	read_int_callback:   mct_u232_read_int_callback,
+ 	ioctl:		     mct_u232_ioctl,
+ 	set_termios:	     mct_u232_set_termios,
+ 	break_ctl:	     mct_u232_break_ctl,
+ 	startup:	     mct_u232_startup,
+ 	shutdown:	     mct_u232_shutdown,
+ };
+ 
+ static struct usb_serial_device_type mct_u232_du_h3sp_device = {
+         name:                "MCT/D-Link DU-H3SP USB BAY",
+         id_table:            mct_u232_du_h3sp_table,
+         needs_interrupt_in:  MUST_HAVE,  /* 2 interrupt-in endpoints */
+         needs_bulk_in:       MUST_HAVE_NOT,   /* no bulk-in endpoint */
+         needs_bulk_out:      MUST_HAVE,       /* 1 bulk-out endpoint */
+         num_interrupt_in:    2,
+         num_bulk_in:         0,
+         num_bulk_out:        1,
+         num_ports:           1,
+         open:                mct_u232_open,
+         close:               mct_u232_close,
+ #ifdef FIX_WRITE_RETURN_CODE_PROBLEM
+         write:               mct_u232_write,
+         write_bulk_callback: mct_u232_write_bulk_callback,
+ #endif
+         read_int_callback:   mct_u232_read_int_callback,
+         ioctl:               mct_u232_ioctl,
+         set_termios:         mct_u232_set_termios,
+         break_ctl:           mct_u232_break_ctl,
+         startup:             mct_u232_startup,
+         shutdown:            mct_u232_shutdown,
+ };
+ 
+ 
+ 
  
  struct mct_u232_private {
  	unsigned long	     control_state; /* Modem Line Setting (TIOCM) */
***************
*** 317,326 ****
  {
  	int i;
  	
! 	dbg("%s", __FUNCTION__);
  
  	/* stop reads and writes on all ports */
  	for (i=0; i < serial->num_ports; ++i) {
  		/* My special items, the standard routines free my urbs */
  		if (serial->port[i].private)
  			kfree(serial->port[i].private);
--- 388,400 ----
  {
  	int i;
  	
! 	dbg (__FUNCTION__);
  
  	/* stop reads and writes on all ports */
  	for (i=0; i < serial->num_ports; ++i) {
+ 		while (serial->port[i].open_count > 0) {
+ 			mct_u232_close (&serial->port[i], NULL);
+ 		}
  		/* My special items, the standard routines free my urbs */
  		if (serial->port[i].private)
  			kfree(serial->port[i].private);
***************
*** 333,404 ****
  	struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
  	int retval = 0;
  
! 	dbg("%s port %d", __FUNCTION__, port->number);
  
! 	/* Compensate for a hardware bug: although the Sitecom U232-P25
! 	 * device reports a maximum output packet size of 32 bytes,
! 	 * it seems to be able to accept only 16 bytes (and that's what
! 	 * SniffUSB says too...)
! 	 */
! 	if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID)
! 		port->bulk_out_size = 16;
! 
! 	/* Do a defined restart: the normal serial device seems to 
! 	 * always turn on DTR and RTS here, so do the same. I'm not
! 	 * sure if this is really necessary. But it should not harm
! 	 * either.
! 	 */
! 	if (port->tty->termios->c_cflag & CBAUD)
! 		priv->control_state = TIOCM_DTR | TIOCM_RTS;
! 	else
! 		priv->control_state = 0;
! 	mct_u232_set_modem_ctrl(serial, priv->control_state);
  	
! 	priv->last_lcr = (MCT_U232_DATA_BITS_8 | 
! 			  MCT_U232_PARITY_NONE |
! 			  MCT_U232_STOP_BITS_1);
! 	mct_u232_set_line_ctrl(serial, priv->last_lcr);
  
! 	/* Read modem status and update control state */
! 	mct_u232_get_modem_stat(serial, &priv->last_msr);
! 	mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
  
! 	{
! 		/* Puh, that's dirty */
! 		struct usb_serial_port *rport;	
! 		rport = &serial->port[1];
! 		rport->tty = port->tty;
! 		rport->private = port->private;
! 		port->read_urb = rport->interrupt_in_urb;
! 	}
! 
! 	port->read_urb->dev = port->serial->dev;
! 	retval = usb_submit_urb(port->read_urb);
! 	if (retval) {
! 		err("usb_submit_urb(read bulk) failed");
! 		goto exit;
! 	}
! 
! 	port->interrupt_in_urb->dev = port->serial->dev;
! 	retval = usb_submit_urb(port->interrupt_in_urb);
! 	if (retval)
! 		err(" usb_submit_urb(read int) failed");
  
  exit:
  	return 0;
  } /* mct_u232_open */
  
  
  static void mct_u232_close (struct usb_serial_port *port, struct file *filp)
  {
! 	dbg("%s port %d", __FUNCTION__, port->number);
  
! 	if (port->serial->dev) {
! 		/* shutdown our urbs */
! 		usb_unlink_urb (port->write_urb);
! 		usb_unlink_urb (port->read_urb);
! 		usb_unlink_urb (port->interrupt_in_urb);
  	}
  } /* mct_u232_close */
  
  
--- 407,500 ----
  	struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
  	int retval = 0;
  
! 	dbg(__FUNCTION__" port %d", port->number);
  
! 	down (&port->sem);
  	
! 	++port->open_count;
! 	MOD_INC_USE_COUNT;
  
! 	if (!port->active) {
! 		port->active = 1;
! 
! 		/* Compensate for a hardware bug: although the Sitecom U232-P25
! 		 * device reports a maximum output packet size of 32 bytes,
! 		 * it seems to be able to accept only 16 bytes (and that's what
! 		 * SniffUSB says too...)
! 		 */
! 		if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID)
! 			port->bulk_out_size = 16;
! 
! 		/* Do a defined restart: the normal serial device seems to 
! 		 * always turn on DTR and RTS here, so do the same. I'm not
! 		 * sure if this is really necessary. But it should not harm
! 		 * either.
! 		 */
! 		if (port->tty->termios->c_cflag & CBAUD)
! 			priv->control_state = TIOCM_DTR | TIOCM_RTS;
! 		else
! 			priv->control_state = 0;
! 		mct_u232_set_modem_ctrl(serial, priv->control_state);
! 		
! 		priv->last_lcr = (MCT_U232_DATA_BITS_8 | 
! 				  MCT_U232_PARITY_NONE |
! 				  MCT_U232_STOP_BITS_1);
! 		mct_u232_set_line_ctrl(serial, priv->last_lcr);
! 
! 		/* Read modem status and update control state */
! 		mct_u232_get_modem_stat(serial, &priv->last_msr);
! 		mct_u232_msr_to_state(&priv->control_state, priv->last_msr);
! 
! 		{
! 			/* Puh, that's dirty */
! 			struct usb_serial_port *rport;	
! 			rport = &serial->port[1];
! 			rport->tty = port->tty;
! 			rport->private = port->private;
! 			port->read_urb = rport->interrupt_in_urb;
! 		}
! 
! 		port->read_urb->dev = port->serial->dev;
! 		retval = usb_submit_urb(port->read_urb);
! 		if (retval) {
! 			err("usb_submit_urb(read bulk) failed");
! 			goto exit;
! 		}
! 
! 		port->interrupt_in_urb->dev = port->serial->dev;
! 		retval = usb_submit_urb(port->interrupt_in_urb);
! 		if (retval)
! 			err(" usb_submit_urb(read int) failed");
  
! 	}
  
  exit:
+ 	up (&port->sem);
+ 	
  	return 0;
  } /* mct_u232_open */
  
  
  static void mct_u232_close (struct usb_serial_port *port, struct file *filp)
  {
! 	dbg(__FUNCTION__" port %d", port->number);
! 
! 	down (&port->sem);
  
! 	--port->open_count;
! 
! 	if (port->open_count <= 0) {
! 		if (port->serial->dev) {
! 			/* shutdown our urbs */
! 			usb_unlink_urb (port->write_urb);
! 			usb_unlink_urb (port->read_urb);
! 			usb_unlink_urb (port->interrupt_in_urb);
! 		}
! 		port->active = 0;
  	}
+ 	
+ 	up (&port->sem);
+ 	MOD_DEC_USE_COUNT;
  } /* mct_u232_close */
  
  
***************
*** 411,420 ****
  	struct usb_serial *serial = port->serial;
  	int result, bytes_sent, size;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (count == 0) {
! 		dbg("%s - write request of 0 bytes", __FUNCTION__);
  		return (0);
  	}
  
--- 507,516 ----
  	struct usb_serial *serial = port->serial;
  	int result, bytes_sent, size;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if (count == 0) {
! 		dbg(__FUNCTION__ " - write request of 0 bytes");
  		return (0);
  	}
  
***************
*** 424,441 ****
  	
  	/* another write is still pending? */
  	if (port->write_urb->status == -EINPROGRESS) {
! 		dbg("%s - already writing", __FUNCTION__);
  		return (0);
  	}
  		
  	bytes_sent = 0;
  	while (count > 0) {
  		size = (count > port->bulk_out_size) ? port->bulk_out_size : count;
  		
  		usb_serial_debug_data (__FILE__, __FUNCTION__, size, buf);
  		
  		if (from_user) {
  			if (copy_from_user(port->write_urb->transfer_buffer, buf, size)) {
  				return -EFAULT;
  			}
  		}
--- 520,541 ----
  	
  	/* another write is still pending? */
  	if (port->write_urb->status == -EINPROGRESS) {
! 		dbg (__FUNCTION__ " - already writing");
  		return (0);
  	}
  		
  	bytes_sent = 0;
  	while (count > 0) {
+ 		
+ 		down (&port->sem);
+ 		
  		size = (count > port->bulk_out_size) ? port->bulk_out_size : count;
  		
  		usb_serial_debug_data (__FILE__, __FUNCTION__, size, buf);
  		
  		if (from_user) {
  			if (copy_from_user(port->write_urb->transfer_buffer, buf, size)) {
+ 				up (&port->sem);
  				return -EFAULT;
  			}
  		}
***************
*** 456,465 ****
  		/* send the data out the bulk port */
  		result = usb_submit_urb(port->write_urb);
  		if (result) {
! 			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
  			return result;
  		}
  
  		bytes_sent += size;
  		if (write_blocking)
  			interruptible_sleep_on(&port->write_wait);
--- 556,569 ----
  		/* send the data out the bulk port */
  		result = usb_submit_urb(port->write_urb);
  		if (result) {
! 			err(__FUNCTION__
! 			    " - failed submitting write urb, error %d", result);
! 			up (&port->sem);
  			return result;
  		}
  
+ 		up (&port->sem);
+ 
  		bytes_sent += size;
  		if (write_blocking)
  			interruptible_sleep_on(&port->write_wait);
***************
*** 479,493 ****
  	struct usb_serial *serial = port->serial;
         	struct tty_struct *tty = port->tty;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__,
  		    urb->status);
  		return;
  	}
--- 583,597 ----
  	struct usb_serial *serial = port->serial;
         	struct tty_struct *tty = port->tty;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  	
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero write bulk status received: %d",
  		    urb->status);
  		return;
  	}
***************
*** 517,532 ****
  	struct tty_struct *tty;
  	unsigned char *data = urb->transfer_buffer;
  
!         dbg("%s - port %d", __FUNCTION__, port->number);
  
  	/* The urb might have been killed. */
          if (urb->status) {
!                 dbg("%s - nonzero read bulk status received: %d", __FUNCTION__,
  		    urb->status);
                  return;
          }
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  	
--- 621,636 ----
  	struct tty_struct *tty;
  	unsigned char *data = urb->transfer_buffer;
  
!         dbg(__FUNCTION__ " - port %d", port->number);
  
  	/* The urb might have been killed. */
          if (urb->status) {
!                 dbg(__FUNCTION__ " - nonzero read bulk status received: %d",
  		    urb->status);
                  return;
          }
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  	
***************
*** 603,609 ****
  	if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
  	        /* reassert DTR and (maybe) RTS on transition from B0 */
  		if( (old_cflag & CBAUD) == B0 ) {
! 			dbg("%s: baud was B0", __FUNCTION__);
  			priv->control_state |= TIOCM_DTR;
  			/* don't set RTS if using hardware flow control */
  			if (!(old_cflag & CRTSCTS)) {
--- 707,713 ----
  	if( (cflag & CBAUD) != (old_cflag & CBAUD) ) {
  	        /* reassert DTR and (maybe) RTS on transition from B0 */
  		if( (old_cflag & CBAUD) == B0 ) {
! 			dbg(__FUNCTION__ ": baud was B0");
  			priv->control_state |= TIOCM_DTR;
  			/* don't set RTS if using hardware flow control */
  			if (!(old_cflag & CRTSCTS)) {
***************
*** 639,645 ****
  			mct_u232_set_baud_rate(serial, 9600); break;
  		}
  		if ((cflag & CBAUD) == B0 ) {
! 			dbg("%s: baud is B0", __FUNCTION__);
  			/* Drop RTS and DTR */
  			priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS);
          		mct_u232_set_modem_ctrl(serial, priv->control_state);
--- 743,749 ----
  			mct_u232_set_baud_rate(serial, 9600); break;
  		}
  		if ((cflag & CBAUD) == B0 ) {
! 			dbg(__FUNCTION__ ": baud is B0");
  			/* Drop RTS and DTR */
  			priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS);
          		mct_u232_set_modem_ctrl(serial, priv->control_state);
***************
*** 710,716 ****
  	struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
  	unsigned char lcr = priv->last_lcr;
  
! 	dbg("%sstate=%d", __FUNCTION__, break_state);
  
  	if (break_state)
  		lcr |= MCT_U232_SET_BREAK;
--- 814,820 ----
  	struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
  	unsigned char lcr = priv->last_lcr;
  
! 	dbg (__FUNCTION__ "state=%d", break_state);
  
  	if (break_state)
  		lcr |= MCT_U232_SET_BREAK;
***************
*** 726,732 ****
  	struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
  	int mask;
  	
! 	dbg("%scmd=0x%x", __FUNCTION__, cmd);
  
  	/* Based on code from acm.c and others */
  	switch (cmd) {
--- 830,836 ----
  	struct mct_u232_private *priv = (struct mct_u232_private *)port->private;
  	int mask;
  	
! 	dbg (__FUNCTION__ "cmd=0x%x", cmd);
  
  	/* Based on code from acm.c and others */
  	switch (cmd) {
***************
*** 771,777 ****
  		return 0;
  
  	default:
! 		dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd);
  		return(-ENOIOCTLCMD);
  		break;
  	}
--- 875,881 ----
  		return 0;
  
  	default:
! 		dbg(__FUNCTION__ ": arg not supported - 0x%04x",cmd);
  		return(-ENOIOCTLCMD);
  		break;
  	}
***************
*** 782,788 ****
  static int __init mct_u232_init (void)
  {
  	usb_serial_register (&mct_u232_device);
! 	info(DRIVER_DESC " " DRIVER_VERSION);
  	return 0;
  }
  
--- 886,894 ----
  static int __init mct_u232_init (void)
  {
  	usb_serial_register (&mct_u232_device);
! 	usb_serial_register (&mct_u232_sitecom_device);
! 	usb_serial_register (&mct_u232_du_h3sp_device);
! 	info(DRIVER_VERSION ":" DRIVER_DESC);
  	return 0;
  }
  
***************
*** 790,795 ****
--- 896,903 ----
  static void __exit mct_u232_exit (void)
  {
  	usb_serial_deregister (&mct_u232_device);
+ 	usb_serial_deregister (&mct_u232_sitecom_device);
+ 	usb_serial_deregister (&mct_u232_du_h3sp_device);
  }
  
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/omninet.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/omninet.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/omninet.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/omninet.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 37,51 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
--- 37,54 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
***************
*** 76,82 ****
  static int  omninet_write_room		(struct usb_serial_port *port);
  static void omninet_shutdown		(struct usb_serial *serial);
  
! static struct usb_device_id id_table [] = {
  	{ USB_DEVICE(ZYXEL_VENDOR_ID, ZYXEL_OMNINET_ID) },
  	{ }						/* Terminating entry */
  };
--- 79,85 ----
  static int  omninet_write_room		(struct usb_serial_port *port);
  static void omninet_shutdown		(struct usb_serial *serial);
  
! static __devinitdata struct usb_device_id id_table [] = {
  	{ USB_DEVICE(ZYXEL_VENDOR_ID, ZYXEL_OMNINET_ID) },
  	{ }						/* Terminating entry */
  };
***************
*** 85,104 ****
  
  
  static struct usb_serial_device_type zyxel_omninet_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"ZyXEL - omni.net lcd plus usb",
! 	.id_table =		id_table,
! 	.num_interrupt_in =	1,
! 	.num_bulk_in =		1,
! 	.num_bulk_out =		2,
! 	.num_ports =		1,
! 	.open =			omninet_open,
! 	.close =		omninet_close,
! 	.write =		omninet_write,
! 	.write_room =		omninet_write_room,
! 	.read_bulk_callback =	omninet_read_bulk_callback,
! 	.write_bulk_callback =	omninet_write_bulk_callback,
! 	.shutdown =		omninet_shutdown,
  };
  
  
--- 88,109 ----
  
  
  static struct usb_serial_device_type zyxel_omninet_device = {
! 	name:			"ZyXEL - omni.net lcd plus usb",
! 	id_table:		id_table,
! 	needs_interrupt_in:	MUST_HAVE,
! 	needs_bulk_in:		MUST_HAVE,
! 	needs_bulk_out:		MUST_HAVE,
! 	num_interrupt_in:	1,
! 	num_bulk_in:		1,
! 	num_bulk_out:		2,
! 	num_ports:		1,
! 	open:			omninet_open,
! 	close:			omninet_close,
! 	write:			omninet_write,
! 	write_room:		omninet_write_room,
! 	read_bulk_callback:	omninet_read_bulk_callback,
! 	write_bulk_callback:	omninet_write_bulk_callback,
! 	shutdown:		omninet_shutdown,
  };
  
  
***************
*** 148,177 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
  		return -ENODEV;
  
! 	od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
! 	if( !od ) {
! 		err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct omninet_data));
! 		return -ENOMEM;
! 	}
  
! 	port->private = od;
! 	wport = &serial->port[1];
! 	wport->tty = port->tty;
  
! 	/* Start reading from the device */
! 	FILL_BULK_URB(port->read_urb, serial->dev, 
! 		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
! 		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
! 		      omninet_read_bulk_callback, port);
! 	result = usb_submit_urb(port->read_urb);
! 	if (result)
! 		err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
  
  	return result;
  }
--- 153,197 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
  		return -ENODEV;
  
! 	down (&port->sem);
  
! 	MOD_INC_USE_COUNT;
! 	++port->open_count;
  
! 	if (!port->active) {
! 		port->active = 1;
! 
! 		od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL );
! 		if( !od ) {
! 			err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct omninet_data));
! 			--port->open_count;
! 			port->active = 0;
! 			up (&port->sem);
! 			MOD_DEC_USE_COUNT;
! 			return -ENOMEM;
! 		}
! 
! 		port->private = od;
! 		wport = &serial->port[1];
! 		wport->tty = port->tty;
! 
! 		/* Start reading from the device */
! 		FILL_BULK_URB(port->read_urb, serial->dev, 
! 			      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
! 			      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
! 			      omninet_read_bulk_callback, port);
! 		result = usb_submit_urb(port->read_urb);
! 		if (result)
! 			err(__FUNCTION__ " - failed submitting read urb, error %d", result);
! 	}
! 
! 	up (&port->sem);
  
  	return result;
  }
***************
*** 185,205 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
  		return;
  
! 	if (serial->dev) {
! 		wport = &serial->port[1];
! 		usb_unlink_urb (wport->write_urb);
! 		usb_unlink_urb (port->read_urb);
  	}
  
! 	od = (struct omninet_data *)port->private;
! 	if (od)
! 		kfree(od);
  }
  
  
--- 205,236 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
  		return;
  
! 	down (&port->sem);
! 
! 	--port->open_count;
! 
! 	if (port->open_count <= 0) {
! 		if (serial->dev) {
! 			wport = &serial->port[1];
! 			usb_unlink_urb (wport->write_urb);
! 			usb_unlink_urb (port->read_urb);
! 		}
! 
! 		port->active = 0;
! 		port->open_count = 0;
! 		od = (struct omninet_data *)port->private;
! 		if (od)
! 			kfree(od);
  	}
  
! 	up (&port->sem);
! 	MOD_DEC_USE_COUNT;
  }
  
  
***************
*** 221,232 ****
  //	dbg("omninet_read_bulk_callback");
  
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
--- 252,263 ----
  //	dbg("omninet_read_bulk_callback");
  
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
  		return;
  	}
  
***************
*** 254,260 ****
  		      omninet_read_bulk_callback, port);
  	result = usb_submit_urb(urb);
  	if (result)
! 		err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
  
  	return;
  }
--- 285,291 ----
  		      omninet_read_bulk_callback, port);
  	result = usb_submit_urb(urb);
  	if (result)
! 		err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
  
  	return;
  }
***************
*** 272,282 ****
  //	dbg("omninet_write port %d", port->number);
  
  	if (count == 0) {
! 		dbg("%s - write request of 0 bytes", __FUNCTION__);
  		return (0);
  	}
  	if (wport->write_urb->status == -EINPROGRESS) {
! 		dbg("%s - already writing", __FUNCTION__);
  		return (0);
  	}
  
--- 303,313 ----
  //	dbg("omninet_write port %d", port->number);
  
  	if (count == 0) {
! 		dbg(__FUNCTION__" - write request of 0 bytes");
  		return (0);
  	}
  	if (wport->write_urb->status == -EINPROGRESS) {
! 		dbg (__FUNCTION__" - already writing");
  		return (0);
  	}
  
***************
*** 305,311 ****
  	wport->write_urb->dev = serial->dev;
  	result = usb_submit_urb(wport->write_urb);
  	if (result)
! 		err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
  	else
  		result = count;
  
--- 336,342 ----
  	wport->write_urb->dev = serial->dev;
  	result = usb_submit_urb(wport->write_urb);
  	if (result)
! 		err(__FUNCTION__ " - failed submitting write urb, error %d", result);
  	else
  		result = count;
  
***************
*** 348,354 ****
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
--- 379,385 ----
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__" - nonzero write bulk status received: %d", urb->status);
  		return;
  	}
  
***************
*** 363,369 ****
  
  static void omninet_shutdown (struct usb_serial *serial)
  {
! 	dbg ("%s", __FUNCTION__);
  }
  
  
--- 394,404 ----
  
  static void omninet_shutdown (struct usb_serial *serial)
  {
! 	dbg (__FUNCTION__);
! 
! 	while (serial->port[0].open_count > 0) {
! 		omninet_close (&serial->port[0], NULL);
! 	}
  }
  
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/pl2303.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/pl2303.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/pl2303.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/pl2303.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,7 ****
  /*
   * Prolific PL2303 USB to serial adaptor driver
   *
!  * Copyright (C) 2001-2002 Greg Kroah-Hartman (greg@kroah.com)
   *
   * Original driver for 2.2.x by anonymous
   *
--- 1,7 ----
  /*
   * Prolific PL2303 USB to serial adaptor driver
   *
!  * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
   *
   * Original driver for 2.2.x by anonymous
   *
***************
*** 32,47 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
--- 32,50 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
***************
*** 61,74 ****
  
  
  
! static struct usb_device_id id_table [] = {
  	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) },
  	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) },
  	{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
  	{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
- 	{ USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) },
- 	{ USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID) },
- 	{ USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) },
  	{ }					/* Terminating entry */
  };
  
--- 64,74 ----
  
  
  
! static __devinitdata struct usb_device_id id_table [] = {
  	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID) },
  	{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) },
  	{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
  	{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
  	{ }					/* Terminating entry */
  };
  
***************
*** 116,144 ****
  
  /* All of the device info needed for the PL2303 SIO serial converter */
  static struct usb_serial_device_type pl2303_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"PL-2303",
! 	.id_table =		id_table,
! 	.num_interrupt_in =	NUM_DONT_CARE,
! 	.num_bulk_in =		1,
! 	.num_bulk_out =		1,
! 	.num_ports =		1,
! 	.open =			pl2303_open,
! 	.close =		pl2303_close,
! 	.write =		pl2303_write,
! 	.ioctl =		pl2303_ioctl,
! 	.break_ctl =		pl2303_break_ctl,
! 	.set_termios =		pl2303_set_termios,
! 	.read_bulk_callback =	pl2303_read_bulk_callback,
! 	.read_int_callback =	pl2303_read_int_callback,
! 	.write_bulk_callback =	pl2303_write_bulk_callback,
! 	.startup =		pl2303_startup,
! 	.shutdown =		pl2303_shutdown,
  };
  
  struct pl2303_private { 
  	u8 line_control;
- 	u8 termios_initialized;
  };
  
  
--- 116,145 ----
  
  /* All of the device info needed for the PL2303 SIO serial converter */
  static struct usb_serial_device_type pl2303_device = {
! 	name:			"PL-2303",
! 	id_table:		id_table,
! 	needs_interrupt_in:	DONT_CARE,		/* this device must have an interrupt in endpoint */
! 	needs_bulk_in:		MUST_HAVE,		/* this device must have a bulk in endpoint */
! 	needs_bulk_out:		MUST_HAVE,		/* this device must have a bulk out endpoint */
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	open:			pl2303_open,
! 	close:			pl2303_close,
! 	write:			pl2303_write,
! 	ioctl:			pl2303_ioctl,
! 	break_ctl:		pl2303_break_ctl,
! 	set_termios:		pl2303_set_termios,
! 	read_bulk_callback:	pl2303_read_bulk_callback,
! 	read_int_callback:	pl2303_read_int_callback,
! 	write_bulk_callback:	pl2303_write_bulk_callback,
! 	startup:		pl2303_startup,
! 	shutdown:		pl2303_shutdown,
  };
  
  struct pl2303_private { 
  	u8 line_control;
  };
  
  
***************
*** 164,170 ****
  	retval = usb_control_msg (dev, usb_sndctrlpipe (dev, 0),
  				  SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE,
  				  value, 0, NULL, 0, 100);
! 	dbg("%s - value = %d, retval = %d", __FUNCTION__, value, retval);
  	return retval;
  }
  
--- 165,171 ----
  	retval = usb_control_msg (dev, usb_sndctrlpipe (dev, 0),
  				  SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE,
  				  value, 0, NULL, 0, 100);
! 	dbg (__FUNCTION__" - value = %d, retval = %d", value, retval);
  	return retval;
  }
  
***************
*** 172,181 ****
  {
  	int result;
  
! 	dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count);
  
  	if (port->write_urb->status == -EINPROGRESS) {
! 		dbg("%s - already writing", __FUNCTION__);
  		return 0;
  	}
  
--- 173,187 ----
  {
  	int result;
  
! 	dbg (__FUNCTION__ " - port %d, %d bytes", port->number, count);
! 
! 	if (!port->tty) {
! 		err (__FUNCTION__ " - no tty???");
! 		return 0;
! 	}
  
  	if (port->write_urb->status == -EINPROGRESS) {
! 		dbg (__FUNCTION__ " - already writing");
  		return 0;
  	}
  
***************
*** 193,199 ****
  	port->write_urb->dev = port->serial->dev;
  	result = usb_submit_urb (port->write_urb);
  	if (result)
! 		err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
  	else
  		result = count;
  
--- 199,205 ----
  	port->write_urb->dev = port->serial->dev;
  	result = usb_submit_urb (port->write_urb);
  	if (result)
! 		err(__FUNCTION__ " - failed submitting write urb, error %d", result);
  	else
  		result = count;
  
***************
*** 211,242 ****
  	int baud;
  	int i;
  
! 	dbg("%s -  port %d, initialized = %d", __FUNCTION__, port->number, 
! 	     ((struct pl2303_private *) port->private)->termios_initialized);
  
  	if ((!port->tty) || (!port->tty->termios)) {
! 		dbg("%s - no tty structures", __FUNCTION__);
  		return;
  	}
  
- 	if (!(((struct pl2303_private *) port->private)->termios_initialized)) {
- 		*(port->tty->termios) = tty_std_termios;
- 		port->tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
- 		((struct pl2303_private *) port->private)->termios_initialized = 1;
- 	}
  	cflag = port->tty->termios->c_cflag;
  	/* check that they really want us to change something */
  	if (old_termios) {
  		if ((cflag == old_termios->c_cflag) &&
  		    (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
! 		    dbg("%s - nothing to change...", __FUNCTION__);
  		    return;
  		}
  	}
  
  	buf = kmalloc (7, GFP_KERNEL);
  	if (!buf) {
! 		err("%s - out of memory.", __FUNCTION__);
  		return;
  	}
  	memset (buf, 0x00, 0x07);
--- 217,242 ----
  	int baud;
  	int i;
  
! 	dbg (__FUNCTION__ " -  port %d", port->number);
  
  	if ((!port->tty) || (!port->tty->termios)) {
! 		dbg(__FUNCTION__" - no tty structures");
  		return;
  	}
  
  	cflag = port->tty->termios->c_cflag;
  	/* check that they really want us to change something */
  	if (old_termios) {
  		if ((cflag == old_termios->c_cflag) &&
  		    (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
! 		    dbg(__FUNCTION__ " - nothing to change...");
  		    return;
  		}
  	}
  
  	buf = kmalloc (7, GFP_KERNEL);
  	if (!buf) {
! 		err(__FUNCTION__ " - out of memory.");
  		return;
  	}
  	memset (buf, 0x00, 0x07);
***************
*** 262,268 ****
  			default:
  			case CS8:	buf[6] = 8;	break;
  		}
! 		dbg("%s - data bits = %d", __FUNCTION__, buf[6]);
  	}
  
  	baud = 0;
--- 262,268 ----
  			default:
  			case CS8:	buf[6] = 8;	break;
  		}
! 		dbg (__FUNCTION__ " - data bits = %d", buf[6]);
  	}
  
  	baud = 0;
***************
*** 287,293 ****
  			err ("pl2303 driver does not support the baudrate requested (fix it)");
  			break;
  	}
! 	dbg("%s - baud = %d", __FUNCTION__, baud);
  	if (baud) {
  		buf[0] = baud & 0xff;
  		buf[1] = (baud >> 8) & 0xff;
--- 287,293 ----
  			err ("pl2303 driver does not support the baudrate requested (fix it)");
  			break;
  	}
! 	dbg (__FUNCTION__ " - baud = %d", baud);
  	if (baud) {
  		buf[0] = baud & 0xff;
  		buf[1] = (baud >> 8) & 0xff;
***************
*** 300,309 ****
  	/* For reference buf[4]=2 is 2 stop bits */
  	if (cflag & CSTOPB) {
  		buf[4] = 2;
! 		dbg("%s - stop bits = 2", __FUNCTION__);
  	} else {
  		buf[4] = 0;
! 		dbg("%s - stop bits = 1", __FUNCTION__);
  	}
  
  	if (cflag & PARENB) {
--- 300,309 ----
  	/* For reference buf[4]=2 is 2 stop bits */
  	if (cflag & CSTOPB) {
  		buf[4] = 2;
! 		dbg(__FUNCTION__ " - stop bits = 2");
  	} else {
  		buf[4] = 0;
! 		dbg(__FUNCTION__ " - stop bits = 1");
  	}
  
  	if (cflag & PARENB) {
***************
*** 314,327 ****
  		/* For reference buf[5]=4 is space parity */
  		if (cflag & PARODD) {
  			buf[5] = 1;
! 			dbg("%s - parity = odd", __FUNCTION__);
  		} else {
  			buf[5] = 2;
! 			dbg("%s - parity = even", __FUNCTION__);
  		}
  	} else {
  		buf[5] = 0;
! 		dbg("%s - parity = none", __FUNCTION__);
  	}
  
  	i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
--- 314,327 ----
  		/* For reference buf[5]=4 is space parity */
  		if (cflag & PARODD) {
  			buf[5] = 1;
! 			dbg(__FUNCTION__ " - parity = odd");
  		} else {
  			buf[5] = 2;
! 			dbg(__FUNCTION__ " - parity = even");
  		}
  	} else {
  		buf[5] = 0;
! 		dbg(__FUNCTION__ " - parity = none");
  	}
  
  	i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
***************
*** 348,354 ****
  
  	if (cflag & CRTSCTS) {
  		i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
! 				     VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE,
  				     0x0, 0x41, NULL, 0, 100);
  		dbg ("0x40:0x1:0x0:0x41  %d", i);
  	}
--- 348,354 ----
  
  	if (cflag & CRTSCTS) {
  		i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
! 				     VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST_TYPE,
  				     0x0, 0x41, NULL, 0, 100);
  		dbg ("0x40:0x1:0x0:0x41  %d", i);
  	}
***************
*** 367,420 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  		
! 	dbg("%s -  port %d", __FUNCTION__, port->number);
  
! #define FISH(a,b,c,d)								\
! 	result=usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev,0),	\
! 			       b, a, c, d, buf, 1, 100);			\
! 	dbg("0x%x:0x%x:0x%x:0x%x  %d - %x",a,b,c,d,result,buf[0]);
! 
! #define SOUP(a,b,c,d)								\
! 	result=usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev,0),	\
! 			       b, a, c, d, NULL, 0, 100);			\
! 	dbg("0x%x:0x%x:0x%x:0x%x  %d",a,b,c,d,result);
! 
! 	FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
! 	SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 0);
! 	FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
! 	FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
! 	FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
! 	SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 1);
! 	FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
! 	FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
! 	SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0, 1);
! 	SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 1, 0xc0);
! 	SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 4);
  
- 	/* Setup termios */
- 	if (port->tty) {
  		pl2303_set_termios (port, &tmp_termios);
- 	}
  
! 	//FIXME: need to assert RTS and DTR if CRTSCTS off
  
! 	dbg("%s - submitting read urb", __FUNCTION__);
! 	port->read_urb->dev = serial->dev;
! 	result = usb_submit_urb (port->read_urb);
! 	if (result) {
! 		err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
! 		pl2303_close (port, NULL);
! 		return -EPROTO;
! 	}
! 
! 	dbg("%s - submitting interrupt urb", __FUNCTION__);
! 	port->interrupt_in_urb->dev = serial->dev;
! 	result = usb_submit_urb (port->interrupt_in_urb);
! 	if (result) {
! 		err("%s - failed submitting interrupt urb, error %d", __FUNCTION__, result);
! 		pl2303_close (port, NULL);
! 		return -EPROTO;
  	}
  	return 0;
  }
  
--- 367,433 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  		
! 	dbg (__FUNCTION__ " -  port %d", port->number);
! 
! 	down (&port->sem);
  
! 	++port->open_count;
! 	MOD_INC_USE_COUNT;
! 
! 	if (!port->active) {
! 		port->active = 1;
! 
! #define FISH(a,b,c,d)									\
! 		result=usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev,0),	\
! 				       b, a, c, d, buf, 1, 100);			\
! 		dbg("0x%x:0x%x:0x%x:0x%x  %d - %x",a,b,c,d,result,buf[0]);
! 
! #define SOUP(a,b,c,d)									\
! 		result=usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev,0),	\
! 				       b, a, c, d, NULL, 0, 100);			\
! 		dbg("0x%x:0x%x:0x%x:0x%x  %d",a,b,c,d,result);
! 
! 		FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
! 		SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 0);
! 		FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
! 		FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
! 		FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
! 		SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 1);
! 		FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
! 		FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
! 		SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0, 1);
! 		SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 1, 0xc0);
! 		SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 4);
! 
! 		/* Setup termios */
! 		*(port->tty->termios) = tty_std_termios;
! 		port->tty->termios->c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
  
  		pl2303_set_termios (port, &tmp_termios);
  
! 		//FIXME: need to assert RTS and DTR if CRTSCTS off
! 
! 		dbg (__FUNCTION__ " - submitting read urb");
! 		port->read_urb->dev = serial->dev;
! 		result = usb_submit_urb (port->read_urb);
! 		if (result) {
! 			err(__FUNCTION__ " - failed submitting read urb, error %d", result);
! 			up (&port->sem);
! 			pl2303_close (port, NULL);
! 			return -EPROTO;
! 		}
  
! 		dbg (__FUNCTION__ " - submitting interrupt urb");
! 		port->interrupt_in_urb->dev = serial->dev;
! 		result = usb_submit_urb (port->interrupt_in_urb);
! 		if (result) {
! 			err(__FUNCTION__ " - failed submitting interrupt urb, error %d", result);
! 			up (&port->sem);
! 			pl2303_close (port, NULL);
! 			return -EPROTO;
! 		}
  	}
+ 	up (&port->sem);
  	return 0;
  }
  
***************
*** 432,441 ****
  	if (!serial)
  		return;
  	
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	if (serial->dev) {
! 		if (port->tty) {
  			c_cflag = port->tty->termios->c_cflag;
  			if (c_cflag & HUPCL) {
  				/* drop DTR and RTS */
--- 445,457 ----
  	if (!serial)
  		return;
  	
! 	dbg (__FUNCTION__ " - port %d", port->number);
! 
! 	down (&port->sem);
  
! 	--port->open_count;
! 	if (port->open_count <= 0) {
! 		if (serial->dev) {
  			c_cflag = port->tty->termios->c_cflag;
  			if (c_cflag & HUPCL) {
  				/* drop DTR and RTS */
***************
*** 444,471 ****
  				set_control_lines (port->serial->dev,
  						   priv->line_control);
  			}
- 		}
  
! 		/* shutdown our urbs */
! 		dbg("%s - shutting down urbs", __FUNCTION__);
! 		result = usb_unlink_urb (port->write_urb);
! 		if (result)
! 			dbg("%s - usb_unlink_urb (write_urb)"
! 			    " failed with reason: %d", __FUNCTION__,
! 			     result);
  
! 		result = usb_unlink_urb (port->read_urb);
! 		if (result)
! 			dbg("%s - usb_unlink_urb (read_urb) "
! 			    "failed with reason: %d", __FUNCTION__,
! 			     result);
  
! 		result = usb_unlink_urb (port->interrupt_in_urb);
! 		if (result)
! 			dbg("%s - usb_unlink_urb (interrupt_in_urb)"
! 			    " failed with reason: %d", __FUNCTION__,
! 			     result);
  	}
  }
  
  static int set_modem_info (struct usb_serial_port *port, unsigned int cmd, unsigned int *value)
--- 460,493 ----
  				set_control_lines (port->serial->dev,
  						   priv->line_control);
  			}
  
! 			/* shutdown our urbs */
! 			dbg (__FUNCTION__ " - shutting down urbs");
! 			result = usb_unlink_urb (port->write_urb);
! 			if (result)
! 				dbg (__FUNCTION__ " - usb_unlink_urb "
! 				     "(write_urb) failed with reason: %d",
! 				     result);
  
! 			result = usb_unlink_urb (port->read_urb);
! 			if (result)
! 				dbg (__FUNCTION__ " - usb_unlink_urb "
! 				     "(read_urb) failed with reason: %d",
! 				     result);
  
! 			result = usb_unlink_urb (port->interrupt_in_urb);
! 			if (result)
! 				dbg (__FUNCTION__ " - usb_unlink_urb "
! 				     "(interrupt_in_urb) failed with reason: %d",
! 				     result);
! 		}
! 
! 		port->active = 0;
! 		port->open_count = 0;
  	}
+ 
+ 	up (&port->sem);
+ 	MOD_DEC_USE_COUNT;
  }
  
  static int set_modem_info (struct usb_serial_port *port, unsigned int cmd, unsigned int *value)
***************
*** 512,518 ****
  	result = ((mcr & CONTROL_DTR)		? TIOCM_DTR : 0)
  		  | ((mcr & CONTROL_RTS)	? TIOCM_RTS : 0);
  
! 	dbg("%s - result = %x", __FUNCTION__, result);
  
  	if (copy_to_user(value, &result, sizeof(int)))
  		return -EFAULT;
--- 534,540 ----
  	result = ((mcr & CONTROL_DTR)		? TIOCM_DTR : 0)
  		  | ((mcr & CONTROL_RTS)	? TIOCM_RTS : 0);
  
! 	dbg (__FUNCTION__ " - result = %x", result);
  
  	if (copy_to_user(value, &result, sizeof(int)))
  		return -EFAULT;
***************
*** 521,542 ****
  
  static int pl2303_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg)
  {
! 	dbg("%s (%d) cmd = 0x%04x", __FUNCTION__, port->number, cmd);
  
  	switch (cmd) {
  		
  		case TIOCMGET:
! 			dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number);
  			return get_modem_info (port, (unsigned int *)arg);
  
  		case TIOCMBIS:
  		case TIOCMBIC:
  		case TIOCMSET:
! 			dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__,  port->number);
  			return set_modem_info(port, cmd, (unsigned int *) arg);
  
  		default:
! 			dbg("%s not supported = 0x%04x", __FUNCTION__, cmd);
  			break;
  	}
  
--- 543,564 ----
  
  static int pl2303_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg)
  {
! 	dbg (__FUNCTION__" (%d) cmd = 0x%04x", port->number, cmd);
  
  	switch (cmd) {
  		
  		case TIOCMGET:
! 			dbg (__FUNCTION__" (%d) TIOCMGET", port->number);
  			return get_modem_info (port, (unsigned int *)arg);
  
  		case TIOCMBIS:
  		case TIOCMBIC:
  		case TIOCMSET:
! 			dbg(__FUNCTION__" (%d) TIOCMSET/TIOCMBIC/TIOCMSET",  port->number);
  			return set_modem_info(port, cmd, (unsigned int *) arg);
  
  		default:
! 			dbg (__FUNCTION__" not supported = 0x%04x", cmd);
  			break;
  	}
  
***************
*** 550,568 ****
  	u16 state;
  	int result;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (break_state == 0)
  		state = BREAK_OFF;
  	else
  		state = BREAK_ON;
! 	dbg("%s - turning break %s", state==BREAK_OFF ? "off" : "on", __FUNCTION__);
  
  	result = usb_control_msg (serial->dev, usb_rcvctrlpipe (serial->dev, 0),
  				  BREAK_REQUEST, BREAK_REQUEST_TYPE, state, 
  				  0, NULL, 0, 100);
  	if (result)
! 		dbg("%s - error sending break = %d", __FUNCTION__, result);
  }
  
  
--- 572,590 ----
  	u16 state;
  	int result;
  
! 	dbg (__FUNCTION__ " - port %d", port->number);
  
  	if (break_state == 0)
  		state = BREAK_OFF;
  	else
  		state = BREAK_ON;
! 	dbg (__FUNCTION__" - turning break %s", state==BREAK_OFF ? "off" : "on");
  
  	result = usb_control_msg (serial->dev, usb_rcvctrlpipe (serial->dev, 0),
  				  BREAK_REQUEST, BREAK_REQUEST_TYPE, state, 
  				  0, NULL, 0, 100);
  	if (result)
! 		dbg (__FUNCTION__" - error sending break = %d", result);
  }
  
  
***************
*** 570,579 ****
  {
  	int i;
  
! 	dbg("%s", __FUNCTION__);
  
  	for (i = 0; i < serial->num_ports; ++i)
! 		kfree (serial->port[i].private);
  }
  
  
--- 592,605 ----
  {
  	int i;
  
! 	dbg (__FUNCTION__);
  
+ 	/* stop everything on all ports */
  	for (i = 0; i < serial->num_ports; ++i)
! 		while (serial->port[i].open_count > 0) {
! 			pl2303_close (&serial->port[i], NULL);
! 			kfree (serial->port[i].private);
! 		}
  }
  
  
***************
*** 616,652 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
! 		if (!port->open_count) {
! 			dbg("%s - port is closed, exiting.", __FUNCTION__);
  			return;
  		}
  		if (urb->status == -EPROTO) {
  			/* PL2303 mysteriously fails with -EPROTO reschedule the read */
! 			dbg("%s - caught -EPROTO, resubmitting the urb", __FUNCTION__);
  			urb->status = 0;
  			urb->dev = serial->dev;
  			result = usb_submit_urb(urb);
  			if (result)
! 				err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
  			return;
  		}
! 		dbg("%s - unable to handle the error, exiting.", __FUNCTION__);
  		return;
  	}
  
  	usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
  
  	tty = port->tty;
! 	if (tty && urb->actual_length) {
  		for (i = 0; i < urb->actual_length; ++i) {
  			if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
  				tty_flip_buffer_push(tty);
--- 642,678 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg (__FUNCTION__ " - urb->status = %d", urb->status);
! 		if (!port->active) {
! 			dbg (__FUNCTION__ " - port is closed, exiting.");
  			return;
  		}
  		if (urb->status == -EPROTO) {
  			/* PL2303 mysteriously fails with -EPROTO reschedule the read */
! 			dbg (__FUNCTION__ " - caught -EPROTO, resubmitting the urb");
  			urb->status = 0;
  			urb->dev = serial->dev;
  			result = usb_submit_urb(urb);
  			if (result)
! 				err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
  			return;
  		}
! 		dbg (__FUNCTION__ " - unable to handle the error, exiting.");
  		return;
  	}
  
  	usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
  
  	tty = port->tty;
! 	if (urb->actual_length) {
  		for (i = 0; i < urb->actual_length; ++i) {
  			if (tty->flip.count >= TTY_FLIPBUF_SIZE) {
  				tty_flip_buffer_push(tty);
***************
*** 657,667 ****
  	}
  
  	/* Schedule the next read _if_ we are still open */
! 	if (port->open_count) {
  		urb->dev = serial->dev;
  		result = usb_submit_urb(urb);
  		if (result)
! 			err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
  	}
  
  	return;
--- 683,693 ----
  	}
  
  	/* Schedule the next read _if_ we are still open */
! 	if (port->active) {
  		urb->dev = serial->dev;
  		result = usb_submit_urb(urb);
  		if (result)
! 			err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
  	}
  
  	return;
***************
*** 677,696 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	
  	if (urb->status) {
  		/* error in the urb, so we have to resubmit it */
  		if (serial_paranoia_check (port->serial, __FUNCTION__)) {
  			return;
  		}
! 		dbg("%s - Overflow in write", __FUNCTION__);
! 		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
  		port->write_urb->transfer_buffer_length = 1;
  		port->write_urb->dev = port->serial->dev;
  		result = usb_submit_urb (port->write_urb);
  		if (result)
! 			err("%s - failed resubmitting write urb, error %d", __FUNCTION__, result);
  
  		return;
  	}
--- 703,722 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg(__FUNCTION__ " - port %d", port->number);
  	
  	if (urb->status) {
  		/* error in the urb, so we have to resubmit it */
  		if (serial_paranoia_check (port->serial, __FUNCTION__)) {
  			return;
  		}
! 		dbg (__FUNCTION__ " - Overflow in write");
! 		dbg (__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
  		port->write_urb->transfer_buffer_length = 1;
  		port->write_urb->dev = port->serial->dev;
  		result = usb_submit_urb (port->write_urb);
  		if (result)
! 			err(__FUNCTION__ " - failed resubmitting write urb, error %d", result);
  
  		return;
  	}
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/pl2303.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/pl2303.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/pl2303.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/pl2303.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 16,27 ****
  
  #define IODATA_VENDOR_ID	0x04bb
  #define IODATA_PRODUCT_ID	0x0a03
- 
- #define ELCOM_VENDOR_ID		0x056e
- #define ELCOM_PRODUCT_ID	0x5003
- 
- #define ITEGNO_VENDOR_ID	0x0eba
- #define ITEGNO_PRODUCT_ID	0x1080
- 
- #define MA620_VENDOR_ID		0x0df7
- #define MA620_PRODUCT_ID	0x0620
--- 16,18 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/usb-serial.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/usb-serial.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/usb-serial.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/usb-serial.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,7 ****
  /*
   * USB Serial Converter driver
   *
!  *	Copyright (C) 1999 - 2002
   *	    Greg Kroah-Hartman (greg@kroah.com)
   *
   *	This program is free software; you can redistribute it and/or modify
--- 1,7 ----
  /*
   * USB Serial Converter driver
   *
!  *	Copyright (C) 1999 - 2001
   *	    Greg Kroah-Hartman (greg@kroah.com)
   *
   *	This program is free software; you can redistribute it and/or modify
***************
*** 11,20 ****
   *
   * See Documentation/usb/usb-serial.txt for more information on using this driver
   *
-  * (12/03/2001) gkh
-  *	removed active from the port structure.
-  *	added documentation to the usb_serial_device_type structure
-  *
   * (10/10/2001) gkh
   *	added vendor and product to serial structure.  Needed to determine device
   *	owner when the device is disconnected.
--- 11,16 ----
***************
*** 63,103 ****
  /* parity check flag */
  #define RELEVANT_IFLAG(iflag)	(iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
  
! /**
!  * usb_serial_port: structure for the specific ports of a device.
!  * @magic: magic number for internal validity of this pointer.
!  * @serial: pointer back to the struct usb_serial owner of this port.
!  * @tty: pointer to the coresponding tty for this port.
!  * @number: the number of the port (the minor number).
!  * @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
!  * @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
!  * @interrupt_in_endpointAddress: endpoint address for the interrupt in pipe
!  *	for this port.
!  * @bulk_in_buffer: pointer to the bulk in buffer for this port.
!  * @read_urb: pointer to the bulk in struct urb for this port.
!  * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this
!  *	port.
!  * @bulk_out_buffer: pointer to the bulk out buffer for this port.
!  * @bulk_out_size: the size of the bulk_out_buffer, in bytes.
!  * @write_urb: pointer to the bulk out struct urb for this port.
!  * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this
!  *	port.
!  * @write_wait: a wait_queue_head_t used by the port.
!  * @tqueue: task queue for the line discipline waking up.
!  * @open_count: number of times this port has been opened.
!  * @sem: struct semaphore used to lock this structure.
!  * @private: place to put any driver specific information that is needed.  The
!  *	usb-serial driver is required to manage this data, the usb-serial core
!  *	will not touch this.
!  *
!  * This structure is used by the usb-serial core and drivers for the specific
!  * ports of a device.
!  */
  struct usb_serial_port {
  	int			magic;
! 	struct usb_serial	*serial;
! 	struct tty_struct *	tty;
  	unsigned char		number;
  
  	unsigned char *		interrupt_in_buffer;
  	struct urb *		interrupt_in_urb;
--- 59,71 ----
  /* parity check flag */
  #define RELEVANT_IFLAG(iflag)	(iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
  
! 
  struct usb_serial_port {
  	int			magic;
! 	struct usb_serial	*serial;	/* pointer back to the owner of this port */
! 	struct tty_struct *	tty;		/* the coresponding tty for this port */
  	unsigned char		number;
+ 	char			active;		/* someone has this device open */
  
  	unsigned char *		interrupt_in_buffer;
  	struct urb *		interrupt_in_urb;
***************
*** 113,204 ****
  	__u8			bulk_out_endpointAddress;
  
  	wait_queue_head_t	write_wait;
! 	struct tq_struct	tqueue;
! 	int			open_count;
! 	struct semaphore	sem;
! 	void *			private;
  };
  
- /**
-  * usb_serial - structure used by the usb-serial core for a device
-  * @magic: magic number for internal validity of this pointer.
-  * @dev: pointer to the struct usb_device for this device
-  * @type: pointer to the struct usb_serial_device_type for this device
-  * @interface: pointer to the struct usb_interface for this device
-  * @minor: the starting minor number for this device
-  * @num_ports: the number of ports this device has
-  * @num_interrupt_in: number of interrupt in endpoints we have
-  * @num_bulk_in: number of bulk in endpoints we have
-  * @num_bulk_out: number of bulk out endpoints we have
-  * @vendor: vendor id of this device
-  * @product: product id of this device
-  * @port: array of struct usb_serial_port structures for the different ports.
-  * @private: place to put any driver specific information that is needed.  The
-  *	usb-serial driver is required to manage this data, the usb-serial core
-  *	will not touch this.
-  */
  struct usb_serial {
  	int				magic;
  	struct usb_device *		dev;
! 	struct usb_serial_device_type *	type;
! 	struct usb_interface *		interface;
! 	unsigned char			minor;
! 	unsigned char			num_ports;
! 	char				num_interrupt_in;
! 	char				num_bulk_in;
! 	char				num_bulk_out;
! 	__u16				vendor;
! 	__u16				product;
  	struct usb_serial_port		port[MAX_NUM_PORTS];
! 	void *				private;
  };
  
  
  #define NUM_DONT_CARE	(-1)
  
  
! /**
!  * usb_serial_device_type - a structure that defines a usb serial device
!  * @owner: pointer to the module that owns this device.
!  * @name: pointer to a string that describes this device.  This string used
!  *	in the syslog messages when a device is inserted or removed.
!  * @id_table: pointer to a list of usb_device_id structures that define all
!  *	of the devices this structure can support.
!  * @num_interrupt_in: the number of interrupt in endpoints this device will
!  *	have.
!  * @num_bulk_in: the number of bulk in endpoints this device will have.
!  * @num_bulk_out: the number of bulk out endpoints this device will have.
!  * @num_ports: the number of different ports this device will have.
!  * @calc_num_ports: pointer to a function to determine how many ports this
!  *	device has dynamically.  It will be called after the probe()
!  *	callback is called, but before attach()
!  * @startup: pointer to the driver's startup function.
!  *	This will be called when the device is inserted into the system,
!  *	but before the device has been fully initialized by the usb_serial
!  *	subsystem.  Use this function to download any firmware to the device,
!  *	or any other early initialization that might be needed.
!  *	Return 0 to continue on with the initialization sequence.  Anything 
!  *	else will abort it.
!  * @shutdown: pointer to the driver's shutdown function.  This will be
!  *	called when the device is removed from the system.
!  *
!  * This structure is defines a USB Serial device.  It provides all of
!  * the information that the USB serial core code needs.  If the function
!  * pointers are defined, then the USB serial core code will call them when
!  * the corresponding tty port functions are called.  If they are not
!  * called, the generic serial function will be used instead.
!  */
  struct usb_serial_device_type {
- 	struct module *owner;
  	char	*name;
  	const struct usb_device_id *id_table;
  	char	num_interrupt_in;
  	char	num_bulk_in;
  	char	num_bulk_out;
! 	char	num_ports;
  
  	struct list_head	driver_list;
  	
  	int (*startup) (struct usb_serial *serial);
  	
  	void (*shutdown) (struct usb_serial *serial);
--- 81,139 ----
  	__u8			bulk_out_endpointAddress;
  
  	wait_queue_head_t	write_wait;
! 
! 	struct tq_struct	tqueue;		/* task queue for line discipline waking up */
! 	int			open_count;	/* number of times this port has been opened */
! 	struct semaphore	sem;		/* locks this structure */
! 	
! 	void *			private;	/* data private to the specific port */
  };
  
  struct usb_serial {
  	int				magic;
  	struct usb_device *		dev;
! 	struct usb_serial_device_type *	type;			/* the type of usb serial device this is */
! 	struct usb_interface *		interface;		/* the interface for this device */
! 	struct tty_driver *		tty_driver;		/* the tty_driver for this device */
! 	unsigned char			minor;			/* the starting minor number for this device */
! 	unsigned char			num_ports;		/* the number of ports this device has */
! 	char				num_interrupt_in;	/* number of interrupt in endpoints we have */
! 	char				num_bulk_in;		/* number of bulk in endpoints we have */
! 	char				num_bulk_out;		/* number of bulk out endpoints we have */
! 	__u16				vendor;			/* vendor id of this device */
! 	__u16				product;		/* product id of this device */
  	struct usb_serial_port		port[MAX_NUM_PORTS];
! 
! 	void *			private;		/* data private to the specific driver */
  };
  
  
+ #define MUST_HAVE_NOT	0x01
+ #define MUST_HAVE	0x02
+ #define DONT_CARE	0x03
+ 
+ #define	HAS		0x02
+ #define HAS_NOT		0x01
+ 
  #define NUM_DONT_CARE	(-1)
  
  
! /* This structure defines the individual serial converter. */
  struct usb_serial_device_type {
  	char	*name;
  	const struct usb_device_id *id_table;
+ 	char	needs_interrupt_in;
+ 	char	needs_bulk_in;
+ 	char	needs_bulk_out;
  	char	num_interrupt_in;
  	char	num_bulk_in;
  	char	num_bulk_out;
! 	char	num_ports;		/* number of serial ports this device has */
  
  	struct list_head	driver_list;
  	
+ 	/* function call to make before accepting driver */
+ 	/* return 0 to continue initialization, anything else to abort */
  	int (*startup) (struct usb_serial *serial);
  	
  	void (*shutdown) (struct usb_serial *serial);
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/usbserial.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/usbserial.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/usbserial.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/usbserial.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,13 ****
  /*
   * USB Serial Converter driver
   *
!  * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com)
   * Copyright (c) 2000 Peter Berger (pberger@brimson.com)
   * Copyright (c) 2000 Al Borchers (borchers@steinerpoint.com)
   *
!  *	This program is free software; you can redistribute it and/or
!  *	modify it under the terms of the GNU General Public License version
!  *	2 as published by the Free Software Foundation.
   *
   * This driver was originally based on the ACM driver by Armin Fuerst (which was 
   * based on a driver by Brad Keryan)
--- 1,14 ----
  /*
   * USB Serial Converter driver
   *
!  * Copyright (C) 1999 - 2001 Greg Kroah-Hartman (greg@kroah.com)
   * Copyright (c) 2000 Peter Berger (pberger@brimson.com)
   * Copyright (c) 2000 Al Borchers (borchers@steinerpoint.com)
   *
!  *	This program is free software; you can redistribute it and/or modify
!  *	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 driver was originally based on the ACM driver by Armin Fuerst (which was 
   * based on a driver by Brad Keryan)
***************
*** 336,350 ****
  
  /* All of the device info needed for the Generic Serial Converter */
  static struct usb_serial_device_type generic_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"Generic",
! 	.id_table =		generic_device_ids,
! 	.num_interrupt_in =	NUM_DONT_CARE,
! 	.num_bulk_in =		NUM_DONT_CARE,
! 	.num_bulk_out =		NUM_DONT_CARE,
! 	.num_ports =		1,
! 	.shutdown =		generic_shutdown,
  };
  #endif
  
  
--- 337,360 ----
  
  /* All of the device info needed for the Generic Serial Converter */
  static struct usb_serial_device_type generic_device = {
! 	name:			"Generic",
! 	id_table:		generic_device_ids,
! 	needs_interrupt_in:	DONT_CARE,		/* don't have to have an interrupt in endpoint */
! 	needs_bulk_in:		DONT_CARE,		/* don't have to have a bulk in endpoint */
! 	needs_bulk_out:		DONT_CARE,		/* don't have to have a bulk out endpoint */
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		NUM_DONT_CARE,
! 	num_bulk_out:		NUM_DONT_CARE,
! 	num_ports:		1,
! 	shutdown:		generic_shutdown,
  };
+ 
+ #define if_generic_do(x)			\
+ 	if ((serial->vendor == vendor) &&	\
+ 	    (serial->product == product))	\
+ 	                x
+ #else
+ #define if_generic_do(x)
  #endif
  
  
***************
*** 365,374 ****
  static void usb_serial_disconnect(struct usb_device *dev, void *ptr);
  
  static struct usb_driver usb_serial_driver = {
! 	.name =		"serial",
! 	.probe =	usb_serial_probe,
! 	.disconnect =	usb_serial_disconnect,
! 	.id_table =	NULL, 			/* check all devices */
  };
  
  /* There is no MODULE_DEVICE_TABLE for usbserial.c.  Instead
--- 375,384 ----
  static void usb_serial_disconnect(struct usb_device *dev, void *ptr);
  
  static struct usb_driver usb_serial_driver = {
! 	name:		"serial",
! 	probe:		usb_serial_probe,
! 	disconnect:	usb_serial_disconnect,
! 	id_table:	NULL, 			/* check all devices */
  };
  
  /* There is no MODULE_DEVICE_TABLE for usbserial.c.  Instead
***************
*** 377,383 ****
     via modprobe, and modprobe will load usbserial because the serial
     drivers depend on it.
  */
! 
  
  static int			serial_refcount;
  static struct tty_driver	serial_tty_driver;
--- 387,393 ----
     via modprobe, and modprobe will load usbserial because the serial
     drivers depend on it.
  */
!    
  
  static int			serial_refcount;
  static struct tty_driver	serial_tty_driver;
***************
*** 390,396 ****
  static LIST_HEAD(usb_serial_driver_list);
  
  
! static struct usb_serial *get_serial_by_minor (unsigned int minor)
  {
  	return serial_table[minor];
  }
--- 400,406 ----
  static LIST_HEAD(usb_serial_driver_list);
  
  
! static struct usb_serial *get_serial_by_minor (int minor)
  {
  	return serial_table[minor];
  }
***************
*** 402,408 ****
  	int i, j;
  	int good_spot;
  
! 	dbg("%s %d", __FUNCTION__, num_ports);
  
  	*minor = 0;
  	for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
--- 412,418 ----
  	int i, j;
  	int good_spot;
  
! 	dbg(__FUNCTION__ " %d", num_ports);
  
  	*minor = 0;
  	for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
***************
*** 417,430 ****
  			continue;
  			
  		if (!(serial = kmalloc(sizeof(struct usb_serial), GFP_KERNEL))) {
! 			err("%s - Out of memory", __FUNCTION__);
  			return NULL;
  		}
  		memset(serial, 0, sizeof(struct usb_serial));
  		serial->magic = USB_SERIAL_MAGIC;
  		serial_table[i] = serial;
  		*minor = i;
! 		dbg("%s - minor base = %d", __FUNCTION__, *minor);
  		for (i = *minor+1; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i)
  			serial_table[i] = serial;
  		return serial;
--- 427,440 ----
  			continue;
  			
  		if (!(serial = kmalloc(sizeof(struct usb_serial), GFP_KERNEL))) {
! 			err(__FUNCTION__ " - Out of memory");
  			return NULL;
  		}
  		memset(serial, 0, sizeof(struct usb_serial));
  		serial->magic = USB_SERIAL_MAGIC;
  		serial_table[i] = serial;
  		*minor = i;
! 		dbg(__FUNCTION__ " - minor base = %d", *minor);
  		for (i = *minor+1; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i)
  			serial_table[i] = serial;
  		return serial;
***************
*** 432,442 ****
  	return NULL;
  }
  
  static void return_serial (struct usb_serial *serial)
  {
  	int i;
  
! 	dbg("%s", __FUNCTION__);
  
  	if (serial == NULL)
  		return;
--- 442,453 ----
  	return NULL;
  }
  
+ 
  static void return_serial (struct usb_serial *serial)
  {
  	int i;
  
! 	dbg(__FUNCTION__);
  
  	if (serial == NULL)
  		return;
***************
*** 448,453 ****
--- 459,465 ----
  	return;
  }
  
+ 
  #ifdef USES_EZUSB_FUNCTIONS
  /* EZ-USB Control and Status Register.  Bit 0 controls 8051 reset */
  #define CPUCS_REG    0x7F92
***************
*** 459,492 ****
  
  	/* dbg("ezusb_writememory %x, %d", address, length); */
  	if (!serial->dev) {
! 		dbg("%s - no physical device present, failing.", __FUNCTION__);
  		return -ENODEV;
  	}
  
  	transfer_buffer =  kmalloc (length, GFP_KERNEL);
  	if (!transfer_buffer) {
! 		err("%s - kmalloc(%d) failed.", __FUNCTION__, length);
  		return -ENOMEM;
  	}
  	memcpy (transfer_buffer, data, length);
! 	result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 3*HZ);
  	kfree (transfer_buffer);
  	return result;
  }
  
  int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit)
  {
  	int	response;
! 	dbg("%s - %d", __FUNCTION__, reset_bit);
  	response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
  	if (response < 0) {
! 		err("%s- %d failed", __FUNCTION__, reset_bit);
  	}
  	return response;
  }
  
  #endif	/* USES_EZUSB_FUNCTIONS */
  
  /*****************************************************************************
   * Driver tty interface functions
   *****************************************************************************/
--- 471,506 ----
  
  	/* dbg("ezusb_writememory %x, %d", address, length); */
  	if (!serial->dev) {
! 		dbg(__FUNCTION__ " - no physical device present, failing.");
  		return -ENODEV;
  	}
  
  	transfer_buffer =  kmalloc (length, GFP_KERNEL);
  	if (!transfer_buffer) {
! 		err(__FUNCTION__ " - kmalloc(%d) failed.", length);
  		return -ENOMEM;
  	}
  	memcpy (transfer_buffer, data, length);
! 	result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 300);
  	kfree (transfer_buffer);
  	return result;
  }
  
+ 
  int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit)
  {
  	int	response;
! 	dbg(__FUNCTION__ " - %d", reset_bit);
  	response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
  	if (response < 0) {
! 		err(__FUNCTION__ "- %d failed", reset_bit);
  	}
  	return response;
  }
  
  #endif	/* USES_EZUSB_FUNCTIONS */
  
+ 
  /*****************************************************************************
   * Driver tty interface functions
   *****************************************************************************/
***************
*** 494,503 ****
  {
  	struct usb_serial *serial;
  	struct usb_serial_port *port;
! 	unsigned int portNumber;
! 	int retval = 0;
  	
! 	dbg("%s", __FUNCTION__);
  
  	/* initialize the pointer incase something fails */
  	tty->driver_data = NULL;
--- 508,516 ----
  {
  	struct usb_serial *serial;
  	struct usb_serial_port *port;
! 	int portNumber;
  	
! 	dbg(__FUNCTION__);
  
  	/* initialize the pointer incase something fails */
  	tty->driver_data = NULL;
***************
*** 505,854 ****
  	/* get the serial object associated with this tty pointer */
  	serial = get_serial_by_minor (MINOR(tty->device));
  
! 	if (serial_paranoia_check (serial, __FUNCTION__))
  		return -ENODEV;
  
  	/* set up our port structure making the tty driver remember our port object, and us it */
  	portNumber = MINOR(tty->device) - serial->minor;
  	port = &serial->port[portNumber];
  	tty->driver_data = port;
- 
- 	down (&port->sem);
  	port->tty = tty;
  	 
! 	/* lock this module before we call it */
! 	if (serial->type->owner)
! 		__MOD_INC_USE_COUNT(serial->type->owner);
! 
! 	++port->open_count;
! 	if (port->open_count == 1) {
! 		/* only call the device specific open if this 
! 		 * is the first time the port is opened */
! 		if (serial->type->open)
! 			retval = serial->type->open(port, filp);
! 		else
! 			retval = generic_open(port, filp);
! 	}
! 
! 	if (retval) {
! 		port->open_count = 0;
! 		if (serial->type->owner)
! 			__MOD_DEC_USE_COUNT(serial->type->owner);
  	}
- 
- 	up (&port->sem);
- 	return retval;
  }
  
- static void __serial_close(struct usb_serial_port *port, struct file *filp)
- {
- 	if (!port->open_count) {
- 		dbg ("%s - port not opened", __FUNCTION__);
- 		return;
- 	}
- 
- 	--port->open_count;
- 	if (port->open_count <= 0) {
- 		/* only call the device specific close if this 
- 		 * port is being closed by the last owner */
- 		if (port->serial->type->close)
- 			port->serial->type->close(port, filp);
- 		else
- 			generic_close(port, filp);
- 		port->open_count = 0;
- 	}
- 
- 	if (port->serial->type->owner)
- 		__MOD_DEC_USE_COUNT(port->serial->type->owner);
- }
  
  static void serial_close(struct tty_struct *tty, struct file * filp)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial)
  		return;
  
! 	down (&port->sem);
! 
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	/* if disconnect beat us to the punch here, there's nothing to do */
! 	if (tty->driver_data) {
! 		__serial_close(port, filp);
  	}
  
- 	up (&port->sem);
- }
  
  static int serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
! 	int retval = -EINVAL;
! 
! 	if (!serial)
  		return -ENODEV;
- 
- 	down (&port->sem);
- 
- 	dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count);
- 
- 	if (!port->open_count) {
- 		dbg("%s - port not opened", __FUNCTION__);
- 		goto exit;
  	}
  
  	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->write)
! 		retval = serial->type->write(port, from_user, buf, count);
! 	else
! 		retval = generic_write(port, from_user, buf, count);
! 
! exit:
! 	up (&port->sem);
! 	return retval;
  }
  
  static int serial_write_room (struct tty_struct *tty) 
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
- 	int retval = -EINVAL;
  
! 	if (!serial)
  		return -ENODEV;
  
! 	down (&port->sem);
! 
! 	dbg("%s - port %d", __FUNCTION__, port->number);
! 
! 	if (!port->open_count) {
! 		dbg("%s - port not open", __FUNCTION__);
! 		goto exit;
  	}
  
  	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->write_room)
! 		retval = serial->type->write_room(port);
! 	else
! 		retval = generic_write_room(port);
! 
! exit:
! 	up (&port->sem);
! 	return retval;
  }
  
  static int serial_chars_in_buffer (struct tty_struct *tty) 
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
- 	int retval = -EINVAL;
  
! 	if (!serial)
  		return -ENODEV;
  
! 	down (&port->sem);
! 
! 	dbg("%s = port %d", __FUNCTION__, port->number);
! 
! 	if (!port->open_count) {
! 		dbg("%s - port not open", __FUNCTION__);
! 		goto exit;
  	}
  
  	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->chars_in_buffer)
! 		retval = serial->type->chars_in_buffer(port);
! 	else
! 		retval = generic_chars_in_buffer(port);
! 
! exit:
! 	up (&port->sem);
! 	return retval;
  }
  
  static void serial_throttle (struct tty_struct * tty)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial)
  		return;
  
! 	down (&port->sem);
! 
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	if (!port->open_count) {
! 		dbg ("%s - port not open", __FUNCTION__);
! 		goto exit;
  	}
  
  	/* pass on to the driver specific version of this function */
! 	if (serial->type->throttle)
  		serial->type->throttle(port);
  
! exit:
! 	up (&port->sem);
  }
  
  static void serial_unthrottle (struct tty_struct * tty)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial)
  		return;
  
! 	down (&port->sem);
! 
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	if (!port->open_count) {
! 		dbg("%s - port not open", __FUNCTION__);
! 		goto exit;
  	}
  
  	/* pass on to the driver specific version of this function */
! 	if (serial->type->unthrottle)
  		serial->type->unthrottle(port);
  
! exit:
! 	up (&port->sem);
  }
  
  static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
- 	int retval = -ENODEV;
  
! 	if (!serial)
  		return -ENODEV;
  
! 	down (&port->sem);
! 
! 	dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
  
! 	if (!port->open_count) {
! 		dbg ("%s - port not open", __FUNCTION__);
! 		goto exit;
  	}
  
  	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->ioctl)
! 		retval = serial->type->ioctl(port, file, cmd, arg);
! 	else
! 		retval = -ENOIOCTLCMD;
! 
! exit:
! 	up (&port->sem);
! 	return retval;
  }
  
  static void serial_set_termios (struct tty_struct *tty, struct termios * old)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial)
  		return;
  
! 	down (&port->sem);
! 
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	if (!port->open_count) {
! 		dbg("%s - port not open", __FUNCTION__);
! 		goto exit;
  	}
  
  	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->set_termios)
  		serial->type->set_termios(port, old);
! 
! exit:
! 	up (&port->sem);
  }
  
  static void serial_break (struct tty_struct *tty, int break_state)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial)
  		return;
  
! 	down (&port->sem);
! 
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	if (!port->open_count) {
! 		dbg("%s - port not open", __FUNCTION__);
! 		goto exit;
  	}
  
! 	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->break_ctl)
  		serial->type->break_ctl(port, break_state);
! 
! exit:
! 	up (&port->sem);
  }
  
  static void serial_shutdown (struct usb_serial *serial)
  {
! 	dbg ("%s", __FUNCTION__);
! 
! 	if (serial->type->shutdown)
  		serial->type->shutdown(serial);
! 	else
  		generic_shutdown(serial);
  }
  
- static int serial_read_proc (char *page, char **start, off_t off, int count, int *eof, void *data)
- {
- 	struct usb_serial *serial;
- 	int length = 0;
- 	int i;
- 	off_t begin = 0;
- 	char tmp[40];
- 
- 	dbg("%s", __FUNCTION__);
- 	length += sprintf (page, "usbserinfo:1.0 driver:%s\n", DRIVER_VERSION);
- 	for (i = 0; i < SERIAL_TTY_MINORS && length < PAGE_SIZE; ++i) {
- 		serial = get_serial_by_minor(i);
- 		if (serial == NULL)
- 			continue;
- 
- 		length += sprintf (page+length, "%d:", i);
- 		if (serial->type->owner)
- 			length += sprintf (page+length, " module:%s", serial->type->owner->name);
- 		length += sprintf (page+length, " name:\"%s\"", serial->type->name);
- 		length += sprintf (page+length, " vendor:%04x product:%04x", serial->vendor, serial->product);
- 		length += sprintf (page+length, " num_ports:%d", serial->num_ports);
- 		length += sprintf (page+length, " port:%d", i - serial->minor + 1);
  
- 		usb_make_path(serial->dev, tmp, sizeof(tmp));
- 		length += sprintf (page+length, " path:%s", tmp);
- 			
- 		length += sprintf (page+length, "\n");
- 		if ((length + begin) > (off + count))
- 			goto done;
- 		if ((length + begin) < off) {
- 			begin += length;
- 			length = 0;
- 		}
- 	}
- 	*eof = 1;
- done:
- 	if (off >= (length + begin))
- 		return 0;
- 	*start = page + (off-begin);
- 	return ((count < begin+length-off) ? count : begin+length-off);
- }
  
  /*****************************************************************************
   * generic devices specific driver functions
--- 518,774 ----
  	/* get the serial object associated with this tty pointer */
  	serial = get_serial_by_minor (MINOR(tty->device));
  
! 	if (serial_paranoia_check (serial, __FUNCTION__)) {
  		return -ENODEV;
+ 	}
  
  	/* set up our port structure making the tty driver remember our port object, and us it */
  	portNumber = MINOR(tty->device) - serial->minor;
  	port = &serial->port[portNumber];
  	tty->driver_data = port;
  	port->tty = tty;
  	 
! 	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->open) {
! 		return (serial->type->open(port, filp));
! 	} else {
! 		return (generic_open(port, filp));
  	}
  }
  
  
  static void serial_close(struct tty_struct *tty, struct file * filp)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial) {
  		return;
+ 	}
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
! 	
! 	if (!port->active) {
! 		dbg (__FUNCTION__ " - port not opened");
! 		return;
! 	}
  
! 	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->close) {
! 		serial->type->close(port, filp);
! 	} else {
! 		generic_close(port, filp);
  	}
+ }	
  
  
  static int serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
! 	
! 	if (!serial) {
  		return -ENODEV;
  	}
+ 	
+ 	dbg(__FUNCTION__ " - port %d, %d byte(s)", port->number, count);
  
+ 	if (!port->active) {
+ 		dbg (__FUNCTION__ " - port not opened");
+ 		return -EINVAL;
+ 	}
+ 	
  	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->write) {
! 		return (serial->type->write(port, from_user, buf, count));
! 	} else {
! 		return (generic_write(port, from_user, buf, count));
! 	}
  }
  
+ 
  static int serial_write_room (struct tty_struct *tty) 
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial) {
  		return -ENODEV;
+ 	}
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
! 	
! 	if (!port->active) {
! 		dbg (__FUNCTION__ " - port not open");
! 		return -EINVAL;
  	}
  
  	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->write_room) {
! 		return (serial->type->write_room(port));
! 	} else {
! 		return (generic_write_room(port));
! 	}
  }
  
+ 
  static int serial_chars_in_buffer (struct tty_struct *tty) 
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial) {
  		return -ENODEV;
+ 	}
  
! 	if (!port->active) {
! 		dbg (__FUNCTION__ " - port not open");
! 		return -EINVAL;
  	}
  
  	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->chars_in_buffer) {
! 		return (serial->type->chars_in_buffer(port));
! 	} else {
! 		return (generic_chars_in_buffer(port));
! 	}
  }
  
+ 
  static void serial_throttle (struct tty_struct * tty)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial) {
  		return;
+ 	}
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
! 	if (!port->active) {
! 		dbg (__FUNCTION__ " - port not open");
! 		return;
  	}
  
  	/* pass on to the driver specific version of this function */
! 	if (serial->type->throttle) {
  		serial->type->throttle(port);
+ 	}
  
! 	return;
  }
  
+ 
  static void serial_unthrottle (struct tty_struct * tty)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial) {
  		return;
+ 	}
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
! 	if (!port->active) {
! 		dbg (__FUNCTION__ " - port not open");
! 		return;
  	}
  
  	/* pass on to the driver specific version of this function */
! 	if (serial->type->unthrottle) {
  		serial->type->unthrottle(port);
+ 	}
  
! 	return;
  }
  
+ 
  static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial) {
  		return -ENODEV;
+ 	}
  
! 	dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
  
! 	if (!port->active) {
! 		dbg (__FUNCTION__ " - port not open");
! 		return -ENODEV;
  	}
  
  	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->ioctl) {
! 		return (serial->type->ioctl(port, file, cmd, arg));
! 	} else {
! 		return -ENOIOCTLCMD;
! 	}
  }
  
+ 
  static void serial_set_termios (struct tty_struct *tty, struct termios * old)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial) {
  		return;
+ 	}
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
! 	if (!port->active) {
! 		dbg (__FUNCTION__ " - port not open");
! 		return;
  	}
  
  	/* pass on to the driver specific version of this function if it is available */
! 	if (serial->type->set_termios) {
  		serial->type->set_termios(port, old);
! 	}
! 	
! 	return;
  }
  
+ 
  static void serial_break (struct tty_struct *tty, int break_state)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	if (!serial) {
  		return;
+ 	}
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
! 	if (!port->active) {
! 		dbg (__FUNCTION__ " - port not open");
! 		return;
  	}
  
! 	/* pass on to the driver specific version of this function if it is
!            available */
! 	if (serial->type->break_ctl) {
  		serial->type->break_ctl(port, break_state);
! 	}
  }
  
+ 
  static void serial_shutdown (struct usb_serial *serial)
  {
! 	if (serial->type->shutdown) {
  		serial->type->shutdown(serial);
! 	} else {
  		generic_shutdown(serial);
+ 	}
  }
  
  
  
  /*****************************************************************************
   * generic devices specific driver functions
***************
*** 861,930 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	/* force low_latency on so that our tty_push actually forces the data through, 
! 	   otherwise it is scheduled, and with high data rates (like with OHCI) data
! 	   can get lost. */
! 	if (port->tty)
! 		port->tty->low_latency = 1;
  
! 	/* if we have a bulk interrupt, start reading from it */
! 	if (serial->num_bulk_in) {
! 		/* Start reading from the device */
! 		usb_fill_bulk_urb (port->read_urb, serial->dev,
! 				   usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
! 				   port->read_urb->transfer_buffer,
! 				   port->read_urb->transfer_buffer_length,
! 				   ((serial->type->read_bulk_callback) ?
! 				     serial->type->read_bulk_callback :
! 				     generic_read_bulk_callback),
! 				   port);
! 		result = usb_submit_urb(port->read_urb);
! 		if (result)
! 			err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
! 	}
  
  	return result;
  }
  
! static void generic_cleanup (struct usb_serial_port *port)
  {
  	struct usb_serial *serial = port->serial;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	if (serial->dev) {
! 		/* shutdown any bulk reads that might be going on */
! 		if (serial->num_bulk_out)
! 			usb_unlink_urb (port->write_urb);
! 		if (serial->num_bulk_in)
! 			usb_unlink_urb (port->read_urb);
  	}
- }
  
! static void generic_close (struct usb_serial_port *port, struct file * filp)
! {
! 	dbg("%s - port %d", __FUNCTION__, port->number);
! 	generic_cleanup (port);
  }
  
  static int generic_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
  {
  	struct usb_serial *serial = port->serial;
  	int result;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (count == 0) {
! 		dbg("%s - write request of 0 bytes", __FUNCTION__);
  		return (0);
  	}
  
  	/* only do something if we have a bulk out endpoint */
  	if (serial->num_bulk_out) {
  		if (port->write_urb->status == -EINPROGRESS) {
! 			dbg("%s - already writing", __FUNCTION__);
  			return (0);
  		}
  
--- 781,871 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  
! 	/* only increment our usage count, if this device is _really_ a generic device */
! 	if_generic_do(MOD_INC_USE_COUNT);
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
! 	down (&port->sem);
! 	
! 	++port->open_count;
! 	
! 	if (!port->active) {
! 		port->active = 1;
  
+ 		/* force low_latency on so that our tty_push actually forces the data through, 
+ 		   otherwise it is scheduled, and with high data rates (like with OHCI) data
+ 		   can get lost. */
+ 		port->tty->low_latency = 1;
+ 		
+ 		/* if we have a bulk interrupt, start reading from it */
+ 		if (serial->num_bulk_in) {
+ 			/* Start reading from the device */
+ 			FILL_BULK_URB(port->read_urb, serial->dev, 
+ 				      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
+ 				      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
+ 				      ((serial->type->read_bulk_callback) ?
+ 				       serial->type->read_bulk_callback :
+ 				       generic_read_bulk_callback), 
+ 				      port);
+ 			result = usb_submit_urb(port->read_urb);
+ 			if (result)
+ 				err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
+ 		}
+ 	}
+ 	
+ 	up (&port->sem);
+ 	
  	return result;
  }
  
! 
! static void generic_close (struct usb_serial_port *port, struct file * filp)
  {
  	struct usb_serial *serial = port->serial;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
! 	down (&port->sem);
! 
! 	--port->open_count;
! 
! 	if (port->open_count <= 0) {
! 		if (serial->dev) {
! 			/* shutdown any bulk reads that might be going on */
! 			if (serial->num_bulk_out)
! 				usb_unlink_urb (port->write_urb);
! 			if (serial->num_bulk_in)
! 				usb_unlink_urb (port->read_urb);
! 		}
! 		
! 		port->active = 0;
! 		port->open_count = 0;
  	}
  
! 	up (&port->sem);
! 
! 	/* only decrement our usage count, if this device is _really_ a generic device */
! 	if_generic_do(MOD_DEC_USE_COUNT);
  }
  
+ 
  static int generic_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count)
  {
  	struct usb_serial *serial = port->serial;
  	int result;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if (count == 0) {
! 		dbg(__FUNCTION__ " - write request of 0 bytes");
  		return (0);
  	}
  
  	/* only do something if we have a bulk out endpoint */
  	if (serial->num_bulk_out) {
  		if (port->write_urb->status == -EINPROGRESS) {
! 			dbg (__FUNCTION__ " - already writing");
  			return (0);
  		}
  
***************
*** 936,1000 ****
  		}
  		else {
  			memcpy (port->write_urb->transfer_buffer, buf, count);
! 		}
  
  		usb_serial_debug_data (__FILE__, __FUNCTION__, count, port->write_urb->transfer_buffer);
  
  		/* set up our urb */
! 		usb_fill_bulk_urb (port->write_urb, serial->dev,
! 				   usb_sndbulkpipe (serial->dev,
! 						    port->bulk_out_endpointAddress),
! 				   port->write_urb->transfer_buffer, count,
! 				   ((serial->type->write_bulk_callback) ? 
! 				     serial->type->write_bulk_callback :
! 				     generic_write_bulk_callback), port);
  
  		/* send the data out the bulk port */
  		result = usb_submit_urb(port->write_urb);
  		if (result)
! 			err("%s - failed submitting write urb, error %d", __FUNCTION__, result);
  		else
  			result = count;
  
  		return result;
  	}
! 
  	/* no bulk out, so return 0 bytes written */
  	return (0);
! }
  
  static int generic_write_room (struct usb_serial_port *port)
  {
  	struct usb_serial *serial = port->serial;
  	int room = 0;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	
  	if (serial->num_bulk_out) {
  		if (port->write_urb->status != -EINPROGRESS)
  			room = port->bulk_out_size;
  	}
! 
! 	dbg("%s - returns %d", __FUNCTION__, room);
  	return (room);
  }
  
  static int generic_chars_in_buffer (struct usb_serial_port *port)
  {
  	struct usb_serial *serial = port->serial;
  	int chars = 0;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
! 
  	if (serial->num_bulk_out) {
  		if (port->write_urb->status == -EINPROGRESS)
  			chars = port->write_urb->transfer_buffer_length;
  	}
  
! 	dbg("%s - returns %d", __FUNCTION__, chars);
  	return (chars);
  }
  
  static void generic_read_bulk_callback (struct urb *urb)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
--- 877,944 ----
  		}
  		else {
  			memcpy (port->write_urb->transfer_buffer, buf, count);
! 		}  
  
  		usb_serial_debug_data (__FILE__, __FUNCTION__, count, port->write_urb->transfer_buffer);
  
  		/* set up our urb */
! 		FILL_BULK_URB(port->write_urb, serial->dev, 
! 			      usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress),
! 			      port->write_urb->transfer_buffer, count,
! 			      ((serial->type->write_bulk_callback) ? 
! 			       serial->type->write_bulk_callback : 
! 			       generic_write_bulk_callback), 
! 			      port);
  
  		/* send the data out the bulk port */
  		result = usb_submit_urb(port->write_urb);
  		if (result)
! 			err(__FUNCTION__ " - failed submitting write urb, error %d", result);
  		else
  			result = count;
  
  		return result;
  	}
! 	
  	/* no bulk out, so return 0 bytes written */
  	return (0);
! } 
! 
  
  static int generic_write_room (struct usb_serial_port *port)
  {
  	struct usb_serial *serial = port->serial;
  	int room = 0;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  	
  	if (serial->num_bulk_out) {
  		if (port->write_urb->status != -EINPROGRESS)
  			room = port->bulk_out_size;
  	}
! 	
! 	dbg(__FUNCTION__ " - returns %d", room);
  	return (room);
  }
  
+ 
  static int generic_chars_in_buffer (struct usb_serial_port *port)
  {
  	struct usb_serial *serial = port->serial;
  	int chars = 0;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
! 	
  	if (serial->num_bulk_out) {
  		if (port->write_urb->status == -EINPROGRESS)
  			chars = port->write_urb->transfer_buffer_length;
  	}
  
! 	dbg (__FUNCTION__ " - returns %d", chars);
  	return (chars);
  }
  
+ 
  static void generic_read_bulk_callback (struct urb *urb)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
***************
*** 1004,1025 ****
  	int i;
  	int result;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
! 
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
  	usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
  
  	tty = port->tty;
! 	if (tty && urb->actual_length) {
  		for (i = 0; i < urb->actual_length ; ++i) {
  			/* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
  			if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
--- 948,969 ----
  	int i;
  	int result;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
! 	
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
  		return;
  	}
  
  	usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
  
  	tty = port->tty;
! 	if (urb->actual_length) {
  		for (i = 0; i < urb->actual_length ; ++i) {
  			/* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
  			if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
***************
*** 1032,1102 ****
  	}
  
  	/* Continue trying to always read  */
! 	usb_fill_bulk_urb (port->read_urb, serial->dev,
! 			   usb_rcvbulkpipe (serial->dev,
! 				   	    port->bulk_in_endpointAddress),
! 			   port->read_urb->transfer_buffer,
! 			   port->read_urb->transfer_buffer_length,
! 			   ((serial->type->read_bulk_callback) ? 
! 			     serial->type->read_bulk_callback : 
! 			     generic_read_bulk_callback), port);
  	result = usb_submit_urb(port->read_urb);
  	if (result)
! 		err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
  }
  
  static void generic_write_bulk_callback (struct urb *urb)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
! 
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
  	queue_task(&port->tqueue, &tq_immediate);
  	mark_bh(IMMEDIATE_BH);
! 
  	return;
  }
  
  static void generic_shutdown (struct usb_serial *serial)
  {
  	int i;
  
! 	dbg("%s", __FUNCTION__);
  
  	/* stop reads and writes on all ports */
  	for (i=0; i < serial->num_ports; ++i) {
! 		generic_cleanup (&serial->port[i]);
  	}
  }
  
  static void port_softint(void *private)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *)private;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  	struct tty_struct *tty;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	
! 	if (!serial)
  		return;
! 
  	tty = port->tty;
- 	if (!tty)
- 		return;
- 
  	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
! 		dbg("%s - write wakeup call.", __FUNCTION__);
  		(tty->ldisc.write_wakeup)(tty);
  	}
  
--- 976,1048 ----
  	}
  
  	/* Continue trying to always read  */
! 	FILL_BULK_URB(port->read_urb, serial->dev, 
! 		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
! 		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
! 		      ((serial->type->read_bulk_callback) ?
! 		       serial->type->read_bulk_callback :
! 		       generic_read_bulk_callback), 
! 		      port);
  	result = usb_submit_urb(port->read_urb);
  	if (result)
! 		err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
  }
  
+ 
  static void generic_write_bulk_callback (struct urb *urb)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
! 	
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
  		return;
  	}
  
  	queue_task(&port->tqueue, &tq_immediate);
  	mark_bh(IMMEDIATE_BH);
! 	
  	return;
  }
  
+ 
  static void generic_shutdown (struct usb_serial *serial)
  {
  	int i;
  
! 	dbg (__FUNCTION__);
  
  	/* stop reads and writes on all ports */
  	for (i=0; i < serial->num_ports; ++i) {
! 		while (serial->port[i].open_count > 0) {
! 			generic_close (&serial->port[i], NULL);
! 		}
  	}
  }
  
+ 
  static void port_softint(void *private)
  {
  	struct usb_serial_port *port = (struct usb_serial_port *)private;
  	struct usb_serial *serial = get_usb_serial (port, __FUNCTION__);
  	struct tty_struct *tty;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  	
! 	if (!serial) {
  		return;
! 	}
!  	
  	tty = port->tty;
  	if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) {
! 		dbg(__FUNCTION__ " - write wakeup call.");
  		(tty->ldisc.write_wakeup)(tty);
  	}
  
***************
*** 1122,1127 ****
--- 1068,1076 ----
  	int minor;
  	int buffer_size;
  	int i;
+ 	char interrupt_pipe;
+ 	char bulk_in_pipe;
+ 	char bulk_out_pipe;
  	int num_interrupt_in = 0;
  	int num_bulk_in = 0;
  	int num_bulk_out = 0;
***************
*** 1129,1134 ****
--- 1078,1084 ----
  	int max_endpoints;
  	const struct usb_device_id *id_pattern = NULL;
  
+ 	
  	/* loop through our list of known serial converters, and see if this
  	   device matches. */
  	found = 0;
***************
*** 1149,1154 ****
--- 1099,1106 ----
  	}
  	
  	/* descriptor matches, let's find the endpoints needed */
+ 	interrupt_pipe = bulk_in_pipe = bulk_out_pipe = HAS_NOT;
+ 			
  	/* check out the endpoints */
  	iface_desc = &interface->altsetting[0];
  	for (i = 0; i < iface_desc->bNumEndpoints; ++i) {
***************
*** 1158,1163 ****
--- 1110,1116 ----
  		    ((endpoint->bmAttributes & 3) == 0x02)) {
  			/* we found a bulk in endpoint */
  			dbg("found bulk in");
+ 			bulk_in_pipe = HAS;
  			bulk_in_endpoint[num_bulk_in] = endpoint;
  			++num_bulk_in;
  		}
***************
*** 1166,1171 ****
--- 1119,1125 ----
  		    ((endpoint->bmAttributes & 3) == 0x02)) {
  			/* we found a bulk out endpoint */
  			dbg("found bulk out");
+ 			bulk_out_pipe = HAS;
  			bulk_out_endpoint[num_bulk_out] = endpoint;
  			++num_bulk_out;
  		}
***************
*** 1174,1192 ****
  		    ((endpoint->bmAttributes & 3) == 0x03)) {
  			/* we found a interrupt in endpoint */
  			dbg("found interrupt in");
  			interrupt_in_endpoint[num_interrupt_in] = endpoint;
  			++num_interrupt_in;
  		}
  	}
! 
  #if defined(CONFIG_USB_SERIAL_PL2303) || defined(CONFIG_USB_SERIAL_PL2303_MODULE)
  	/* BEGIN HORRIBLE HACK FOR PL2303 */ 
  	/* this is needed due to the looney way its endpoints are set up */
! 	if (((dev->descriptor.idVendor == PL2303_VENDOR_ID) &&
! 	     (dev->descriptor.idProduct == PL2303_PRODUCT_ID)) ||
! 	    ((dev->descriptor.idVendor == ATEN_VENDOR_ID) &&
! 	     (dev->descriptor.idProduct == ATEN_PRODUCT_ID))) {
! 		if (ifnum == 1) {
  			/* check out the endpoints of the other interface*/
  			interface = &dev->actconfig->interface[ifnum ^ 1];
  			iface_desc = &interface->altsetting[0];
--- 1128,1147 ----
  		    ((endpoint->bmAttributes & 3) == 0x03)) {
  			/* we found a interrupt in endpoint */
  			dbg("found interrupt in");
+ 			interrupt_pipe = HAS;
  			interrupt_in_endpoint[num_interrupt_in] = endpoint;
  			++num_interrupt_in;
  		}
  	}
! 	
  #if defined(CONFIG_USB_SERIAL_PL2303) || defined(CONFIG_USB_SERIAL_PL2303_MODULE)
  	/* BEGIN HORRIBLE HACK FOR PL2303 */ 
  	/* this is needed due to the looney way its endpoints are set up */
! 	if (ifnum == 1) {
! 		if (((dev->descriptor.idVendor == PL2303_VENDOR_ID) &&
! 		     (dev->descriptor.idProduct == PL2303_PRODUCT_ID)) ||
! 		    ((dev->descriptor.idVendor == ATEN_VENDOR_ID) &&
! 		     (dev->descriptor.idProduct == ATEN_PRODUCT_ID))) {
  			/* check out the endpoints of the other interface*/
  			interface = &dev->actconfig->interface[ifnum ^ 1];
  			iface_desc = &interface->altsetting[0];
***************
*** 1196,1218 ****
  				    ((endpoint->bmAttributes & 3) == 0x03)) {
  					/* we found a interrupt in endpoint */
  					dbg("found interrupt in for Prolific device on separate interface");
  					interrupt_in_endpoint[num_interrupt_in] = endpoint;
  					++num_interrupt_in;
  				}
  			}
  		}
- 
- 		/* Now make sure the PL-2303 is configured correctly.
- 		 * If not, give up now and hope this hack will work
- 		 * properly during a later invocation of usb_serial_probe
- 		 */
- 		if (num_bulk_in == 0 || num_bulk_out == 0) {
- 			info("PL-2303 hack: descriptors matched but endpoints did not");
- 			return NULL;
- 		}
  	}
  	/* END HORRIBLE HACK FOR PL2303 */
  #endif
  
  	/* found all that we need */
  	info("%s converter detected", type->name);
--- 1151,1174 ----
  				    ((endpoint->bmAttributes & 3) == 0x03)) {
  					/* we found a interrupt in endpoint */
  					dbg("found interrupt in for Prolific device on separate interface");
+ 					interrupt_pipe = HAS;
  					interrupt_in_endpoint[num_interrupt_in] = endpoint;
  					++num_interrupt_in;
  				}
  			}
  		}
  	}
  	/* END HORRIBLE HACK FOR PL2303 */
  #endif
+ 	
+ 	/* verify that we found all of the endpoints that we need */
+ 	if (!((interrupt_pipe & type->needs_interrupt_in) &&
+ 	      (bulk_in_pipe & type->needs_bulk_in) &&
+ 	      (bulk_out_pipe & type->needs_bulk_out))) {
+ 		/* nope, they don't match what we expected */
+ 		info("descriptors matched, but endpoints did not");
+ 		return NULL;
+ 	}
  
  	/* found all that we need */
  	info("%s converter detected", type->name);
***************
*** 1233,1239 ****
  		err("No more free serial devices");
  		return NULL;
  	}
! 
  	serial->dev = dev;
  	serial->type = type;
  	serial->interface = interface;
--- 1189,1195 ----
  		err("No more free serial devices");
  		return NULL;
  	}
! 	
  	serial->dev = dev;
  	serial->type = type;
  	serial->interface = interface;
***************
*** 1245,1250 ****
--- 1201,1213 ----
  	serial->vendor = dev->descriptor.idVendor;
  	serial->product = dev->descriptor.idProduct;
  
+ 	/* if this device type has a startup function, call it */
+ 	if (type->startup) {
+ 		if (type->startup (serial)) {
+ 			goto probe_error;
+ 		}
+ 	}
+ 
  	/* set up the endpoint information */
  	for (i = 0; i < num_bulk_in; ++i) {
  		endpoint = bulk_in_endpoint[i];
***************
*** 1261,1274 ****
  			err("Couldn't allocate bulk_in_buffer");
  			goto probe_error;
  		}
! 		usb_fill_bulk_urb (port->read_urb, dev,
! 				   usb_rcvbulkpipe (dev,
! 					   	    endpoint->bEndpointAddress),
! 				   port->bulk_in_buffer, buffer_size,
! 				   ((serial->type->read_bulk_callback) ? 
! 				     serial->type->read_bulk_callback : 
! 				     generic_read_bulk_callback),
! 				   port);
  	}
  
  	for (i = 0; i < num_bulk_out; ++i) {
--- 1224,1236 ----
  			err("Couldn't allocate bulk_in_buffer");
  			goto probe_error;
  		}
! 		FILL_BULK_URB(port->read_urb, dev, 
! 			      usb_rcvbulkpipe(dev, endpoint->bEndpointAddress),
! 			      port->bulk_in_buffer, buffer_size, 
! 			      ((serial->type->read_bulk_callback) ?
! 			       serial->type->read_bulk_callback :
! 			       generic_read_bulk_callback), 
! 			      port);
  	}
  
  	for (i = 0; i < num_bulk_out; ++i) {
***************
*** 1287,1300 ****
  			err("Couldn't allocate bulk_out_buffer");
  			goto probe_error;
  		}
! 		usb_fill_bulk_urb (port->write_urb, dev,
! 				   usb_sndbulkpipe (dev,
! 						    endpoint->bEndpointAddress),
! 				   port->bulk_out_buffer, buffer_size, 
! 				   ((serial->type->write_bulk_callback) ? 
! 				     serial->type->write_bulk_callback : 
! 				     generic_write_bulk_callback),
! 				   port);
  	}
  
  	for (i = 0; i < num_interrupt_in; ++i) {
--- 1249,1261 ----
  			err("Couldn't allocate bulk_out_buffer");
  			goto probe_error;
  		}
! 		FILL_BULK_URB(port->write_urb, dev, 
! 			      usb_sndbulkpipe(dev, endpoint->bEndpointAddress),
! 			      port->bulk_out_buffer, buffer_size,
! 			      ((serial->type->write_bulk_callback) ? 
! 			       serial->type->write_bulk_callback : 
! 			       generic_write_bulk_callback), 
! 			      port);
  	}
  
  	for (i = 0; i < num_interrupt_in; ++i) {
***************
*** 1312,1323 ****
  			err("Couldn't allocate interrupt_in_buffer");
  			goto probe_error;
  		}
! 		usb_fill_int_urb (port->interrupt_in_urb, dev, 
! 				  usb_rcvintpipe (dev,
! 						  endpoint->bEndpointAddress),
! 				  port->interrupt_in_buffer, buffer_size, 
! 				  serial->type->read_int_callback, port, 
! 				  endpoint->bInterval);
  	}
  
  	/* initialize some parts of the port structures */
--- 1273,1284 ----
  			err("Couldn't allocate interrupt_in_buffer");
  			goto probe_error;
  		}
! 		FILL_INT_URB(port->interrupt_in_urb, dev, 
! 			     usb_rcvintpipe(dev, endpoint->bEndpointAddress),
! 			     port->interrupt_in_buffer, buffer_size, 
! 			     serial->type->read_int_callback,
! 			     port, 
! 			     endpoint->bInterval);
  	}
  
  	/* initialize some parts of the port structures */
***************
*** 1325,1331 ****
  	max_endpoints = max(num_bulk_in, num_bulk_out);
  	max_endpoints = max(max_endpoints, num_interrupt_in);
  	max_endpoints = max(max_endpoints, (int)serial->num_ports);
! 	dbg("%s - setting up %d port structures for this device", __FUNCTION__, max_endpoints);
  	for (i = 0; i < max_endpoints; ++i) {
  		port = &serial->port[i];
  		port->number = i + serial->minor;
--- 1286,1292 ----
  	max_endpoints = max(num_bulk_in, num_bulk_out);
  	max_endpoints = max(max_endpoints, num_interrupt_in);
  	max_endpoints = max(max_endpoints, (int)serial->num_ports);
! 	dbg (__FUNCTION__ " - setting up %d port structures for this device", max_endpoints);
  	for (i = 0; i < max_endpoints; ++i) {
  		port = &serial->port[i];
  		port->number = i + serial->minor;
***************
*** 1335,1357 ****
  		port->tqueue.data = port;
  		init_MUTEX (&port->sem);
  	}
! 
! 	/* if this device type has a startup function, call it */
! 	if (type->startup) {
! 		i = type->startup (serial);
! 		if (i < 0)
! 			goto probe_error;
! 		if (i > 0)
! 			return serial;
! 	}
! 
  	/* initialize the devfs nodes for this device and let the user know what ports we are bound to */
  	for (i = 0; i < serial->num_ports; ++i) {
  		tty_register_devfs (&serial_tty_driver, 0, serial->port[i].number);
  		info("%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)", 
  		     type->name, serial->port[i].number, serial->port[i].number);
  	}
! 
  	return serial; /* success */
  
  
--- 1296,1309 ----
  		port->tqueue.data = port;
  		init_MUTEX (&port->sem);
  	}
! 	
  	/* initialize the devfs nodes for this device and let the user know what ports we are bound to */
  	for (i = 0; i < serial->num_ports; ++i) {
  		tty_register_devfs (&serial_tty_driver, 0, serial->port[i].number);
  		info("%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)", 
  		     type->name, serial->port[i].number, serial->port[i].number);
  	}
! 	
  	return serial; /* success */
  
  
***************
*** 1377,1383 ****
  		if (port->interrupt_in_buffer)
  			kfree (port->interrupt_in_buffer);
  	}
! 
  	/* return the minor range that this device had */
  	return_serial (serial);
  
--- 1329,1335 ----
  		if (port->interrupt_in_buffer)
  			kfree (port->interrupt_in_buffer);
  	}
! 		
  	/* return the minor range that this device had */
  	return_serial (serial);
  
***************
*** 1386,1417 ****
  	return NULL;
  }
  
  static void usb_serial_disconnect(struct usb_device *dev, void *ptr)
  {
  	struct usb_serial *serial = (struct usb_serial *) ptr;
  	struct usb_serial_port *port;
  	int i;
  
- 	dbg ("%s", __FUNCTION__);
  	if (serial) {
  		/* fail all future close/read/write/ioctl/etc calls */
  		for (i = 0; i < serial->num_ports; ++i) {
! 			port = &serial->port[i];
! 			down (&port->sem);
! 			if (port->tty != NULL) {
! 				while (port->open_count > 0) {
! 					__serial_close(port, NULL);
! 				}
! 				port->tty->driver_data = NULL;
! 			}
! 			up (&port->sem);
  		}
  
  		serial->dev = NULL;
  		serial_shutdown (serial);
  
  		for (i = 0; i < serial->num_ports; ++i)
! 			serial->port[i].open_count = 0;
  
  		for (i = 0; i < serial->num_bulk_in; ++i) {
  			port = &serial->port[i];
--- 1338,1362 ----
  	return NULL;
  }
  
+ 
  static void usb_serial_disconnect(struct usb_device *dev, void *ptr)
  {
  	struct usb_serial *serial = (struct usb_serial *) ptr;
  	struct usb_serial_port *port;
  	int i;
  
  	if (serial) {
  		/* fail all future close/read/write/ioctl/etc calls */
  		for (i = 0; i < serial->num_ports; ++i) {
! 			if (serial->port[i].tty != NULL)
! 				serial->port[i].tty->driver_data = NULL;
  		}
  
  		serial->dev = NULL;
  		serial_shutdown (serial);
  
  		for (i = 0; i < serial->num_ports; ++i)
! 			serial->port[i].active = 0;
  
  		for (i = 0; i < serial->num_bulk_in; ++i) {
  			port = &serial->port[i];
***************
*** 1455,1495 ****
  	} else {
  		info("device disconnected");
  	}
! 
  }
  
  
  static struct tty_driver serial_tty_driver = {
! 	.magic =		TTY_DRIVER_MAGIC,
! 	.driver_name =		"usb-serial",
! #ifndef CONFIG_DEVFS_FS
! 	.name =			"ttyUSB",
! #else
! 	.name =			"usb/tts/%d",
! #endif
! 	.major =		SERIAL_TTY_MAJOR,
! 	.minor_start =		0,
! 	.num =			SERIAL_TTY_MINORS,
! 	.type =			TTY_DRIVER_TYPE_SERIAL,
! 	.subtype =		SERIAL_TYPE_NORMAL,
! 	.flags =		TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
! 
! 	.refcount =		&serial_refcount,
! 	.table =		serial_tty,
! 	.termios =		serial_termios,
! 	.termios_locked =	serial_termios_locked,
! 
! 	.open =			serial_open,
! 	.close =		serial_close,
! 	.write =		serial_write,
! 	.write_room =		serial_write_room,
! 	.ioctl =		serial_ioctl,
! 	.set_termios =		serial_set_termios,
! 	.throttle =		serial_throttle,
! 	.unthrottle =		serial_unthrottle,
! 	.break_ctl =		serial_break,
! 	.chars_in_buffer =	serial_chars_in_buffer,
! 	.read_proc =		serial_read_proc,
  };
  
  
--- 1400,1435 ----
  	} else {
  		info("device disconnected");
  	}
! 	
  }
  
  
  static struct tty_driver serial_tty_driver = {
! 	magic:			TTY_DRIVER_MAGIC,
! 	driver_name:		"usb-serial",
! 	name:			"usb/tts/%d",
! 	major:			SERIAL_TTY_MAJOR,
! 	minor_start:		0,
! 	num:			SERIAL_TTY_MINORS,
! 	type:			TTY_DRIVER_TYPE_SERIAL,
! 	subtype:		SERIAL_TYPE_NORMAL,
! 	flags:			TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
! 	
! 	refcount:		&serial_refcount,
! 	table:			serial_tty,
! 	termios:		serial_termios,
! 	termios_locked:		serial_termios_locked,
! 	
! 	open:			serial_open,
! 	close:			serial_close,
! 	write:			serial_write,
! 	write_room:		serial_write_room,
! 	ioctl:			serial_ioctl,
! 	set_termios:		serial_set_termios,
! 	throttle:		serial_throttle,
! 	unthrottle:		serial_unthrottle,
! 	break_ctl:		serial_break,
! 	chars_in_buffer:	serial_chars_in_buffer,
  };
  
  
***************
*** 1507,1513 ****
  	serial_tty_driver.init_termios          = tty_std_termios;
  	serial_tty_driver.init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
  	if (tty_register_driver (&serial_tty_driver)) {
! 		err("%s - failed to register tty driver", __FUNCTION__);
  		return -1;
  	}
  
--- 1447,1453 ----
  	serial_tty_driver.init_termios          = tty_std_termios;
  	serial_tty_driver.init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
  	if (tty_register_driver (&serial_tty_driver)) {
! 		err(__FUNCTION__ " - failed to register tty driver");
  		return -1;
  	}
  
***************
*** 1584,1590 ****
  
  
  
! /* If the usb-serial core is built into the core, the usb-serial drivers
     need these symbols to load properly as modules. */
  EXPORT_SYMBOL(usb_serial_register);
  EXPORT_SYMBOL(usb_serial_deregister);
--- 1524,1530 ----
  
  
  
! /* If the usb-serial core is build into the core, the usb-serial drivers
     need these symbols to load properly as modules. */
  EXPORT_SYMBOL(usb_serial_register);
  EXPORT_SYMBOL(usb_serial_deregister);
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/visor.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/visor.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/visor.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/visor.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 2,8 ****
   * USB HandSpring Visor, Palm m50x, and Sony Clie driver
   * (supports all of the Palm OS USB devices)
   *
!  *	Copyright (C) 1999 - 2002
   *	    Greg Kroah-Hartman (greg@kroah.com)
   *
   *	This program is free software; you can redistribute it and/or modify
--- 2,8 ----
   * USB HandSpring Visor, Palm m50x, and Sony Clie driver
   * (supports all of the Palm OS USB devices)
   *
!  *	Copyright (C) 1999 - 2001
   *	    Greg Kroah-Hartman (greg@kroah.com)
   *
   *	This program is free software; you can redistribute it and/or modify
***************
*** 11,39 ****
   *	(at your option) any later version.
   *
   * See Documentation/usb/usb-serial.txt for more information on using this driver
!  *
!  * (04/03/2002) gkh
!  *	Added support for the Sony OS 4.1 devices.  Thanks to Hiroyuki ARAKI
!  *	 for the information.
!  *
!  * (03/23/2002) gkh
!  *	Added support for the Palm i705 device, thanks to Thomas Riemer
!  *	 for the information.
!  *
!  * (03/21/2002) gkh
!  *	Added support for the Palm m130 device, thanks to Udo Eisenbarth
!  *	 for the information.
!  *
!  * (02/21/2002) SilaS
!  *	Added support for the Palm m515 devices.
!  *
!  * (02/15/2002) gkh
!  *	Added support for the Clie S-360 device.
!  *
!  * (12/18/2001) gkh
!  *	Added better Clie support for 3.5 devices.  Thanks to Geoffrey Levand
!  *	for the patch.
!  *
   * (11/11/2001) gkh
   *	Added support for the m125 devices, and added check to prevent oopses
   *	for Cli.ANi devices that lie about the number of ports they have.
--- 11,17 ----
   *	(at your option) any later version.
   *
   * See Documentation/usb/usb-serial.txt for more information on using this driver
!  * 
   * (11/11/2001) gkh
   *	Added support for the m125 devices, and added check to prevent oopses
   *	for CliNi devices that lie about the number of ports they have.
***************
*** 123,137 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
--- 101,118 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
***************
*** 146,152 ****
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.6"
  #define DRIVER_AUTHOR "Greg Kroah-Hartman "
  #define DRIVER_DESC "USB HandSpring Visor, Palm m50x, Sony CliNi driver"
  
--- 127,133 ----
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.5"
  #define DRIVER_AUTHOR "Greg Kroah-Hartman "
  #define DRIVER_DESC "USB HandSpring Visor, Palm m50x, Sony CliNi driver"
  
***************
*** 164,259 ****
  static void visor_set_termios	(struct usb_serial_port *port, struct termios *old_termios);
  static void visor_write_bulk_callback	(struct urb *urb);
  static void visor_read_bulk_callback	(struct urb *urb);
- static int  clie_3_5_startup	(struct usb_serial *serial);
  
  
! static struct usb_device_id id_table [] = {
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
- 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M515_ID) },
- 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID) },
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID) },
- 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M130_ID) },
- 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_ZIRE_ID) },
- 	{ USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
- 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
- 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) },
- 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID) },
  	{ }					/* Terminating entry */
  };
  
! static struct usb_device_id clie_id_3_5_table [] = {
  	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) },
  	{ }					/* Terminating entry */
  };
  
! static __devinitdata struct usb_device_id id_table_combined [] = {
  	{ USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
- 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M515_ID) },
- 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_I705_ID) },
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID) },
- 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M130_ID) },
- 	{ USB_DEVICE(PALM_VENDOR_ID, PALM_ZIRE_ID) },
  	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) },
  	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
- 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) },
- 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID) },
  	{ }					/* Terminating entry */
  };
  
! MODULE_DEVICE_TABLE (usb, id_table_combined);
  
  
  
! /* All of the device info needed for the Handspring Visor, and Palm 4.0 devices */
  static struct usb_serial_device_type handspring_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"Handspring Visor / Palm 4.0 / CliNi 4.x",
! 	.id_table =		id_table,
! 	.num_interrupt_in =	0,
! 	.num_bulk_in =		2,
! 	.num_bulk_out =		2,
! 	.num_ports =		2,
! 	.open =			visor_open,
! 	.close =		visor_close,
! 	.throttle =		visor_throttle,
! 	.unthrottle =		visor_unthrottle,
! 	.startup =		visor_startup,
! 	.shutdown =		visor_shutdown,
! 	.ioctl =		visor_ioctl,
! 	.set_termios =		visor_set_termios,
! 	.write =		visor_write,
! 	.write_room =		visor_write_room,
! 	.chars_in_buffer =	visor_chars_in_buffer,
! 	.write_bulk_callback =	visor_write_bulk_callback,
! 	.read_bulk_callback =	visor_read_bulk_callback,
  };
  
  /* device info for the Sony Clie OS version 3.5 */
  static struct usb_serial_device_type clie_3_5_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"Sony CliNi 3.5",
! 	.id_table =		clie_id_3_5_table,
! 	.num_interrupt_in =	0,
! 	.num_bulk_in =		1,
! 	.num_bulk_out =		1,
! 	.num_ports =		1,
! 	.open =			visor_open,
! 	.close =		visor_close,
! 	.throttle =		visor_throttle,
! 	.unthrottle =		visor_unthrottle,
! 	.startup =		clie_3_5_startup,
! 	.ioctl =		visor_ioctl,
! 	.set_termios =		visor_set_termios,
! 	.write =		visor_write,
! 	.write_room =		visor_write_room,
! 	.chars_in_buffer =	visor_chars_in_buffer,
! 	.write_bulk_callback =	visor_write_bulk_callback,
! 	.read_bulk_callback =	visor_read_bulk_callback,
  };
  
  
  #define NUM_URBS			24
  #define URB_TRANSFER_BUFFER_SIZE	768
--- 145,290 ----
  static void visor_set_termios	(struct usb_serial_port *port, struct termios *old_termios);
  static void visor_write_bulk_callback	(struct urb *urb);
  static void visor_read_bulk_callback	(struct urb *urb);
  
  
! static __devinitdata struct usb_device_id visor_id_table [] = {
! 	{ USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
! 	{ }					/* Terminating entry */
! };
! 
! static __devinitdata struct usb_device_id palm_4_0_id_table [] = {
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID) },
  	{ }					/* Terminating entry */
  };
  
! static __devinitdata struct usb_device_id clie_id_3_5_table [] = {
  	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) },
  	{ }					/* Terminating entry */
  };
  
! static __devinitdata struct usb_device_id clie_id_4_0_table [] = {
! 	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
! 	{ }					/* Terminating entry */
! };
! 
! static __devinitdata struct usb_device_id id_table [] = {
  	{ USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
  	{ USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID) },
  	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) },
  	{ USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
  	{ }					/* Terminating entry */
  };
  
! MODULE_DEVICE_TABLE (usb, id_table);
  
  
  
! /* All of the device info needed for the Handspring Visor */
  static struct usb_serial_device_type handspring_device = {
! 	name:			"Handspring Visor",
! 	id_table:		visor_id_table,
! 	needs_interrupt_in:	MUST_HAVE_NOT,		/* this device must not have an interrupt in endpoint */
! 	needs_bulk_in:		MUST_HAVE,		/* this device must have a bulk in endpoint */
! 	needs_bulk_out:		MUST_HAVE,		/* this device must have a bulk out endpoint */
! 	num_interrupt_in:	0,
! 	num_bulk_in:		2,
! 	num_bulk_out:		2,
! 	num_ports:		2,
! 	open:			visor_open,
! 	close:			visor_close,
! 	throttle:		visor_throttle,
! 	unthrottle:		visor_unthrottle,
! 	startup:		visor_startup,
! 	shutdown:		visor_shutdown,
! 	ioctl:			visor_ioctl,
! 	set_termios:		visor_set_termios,
! 	write:			visor_write,
! 	write_room:		visor_write_room,
! 	chars_in_buffer:	visor_chars_in_buffer,
! 	write_bulk_callback:	visor_write_bulk_callback,
! 	read_bulk_callback:	visor_read_bulk_callback,
  };
  
+ /* device info for the Palm 4.0 devices */
+ static struct usb_serial_device_type palm_4_0_device = {
+ 	name:			"Palm 4.0",
+ 	id_table:		palm_4_0_id_table,
+ 	needs_interrupt_in:	MUST_HAVE_NOT,		/* this device must not have an interrupt in endpoint */
+ 	needs_bulk_in:		MUST_HAVE,		/* this device must have a bulk in endpoint */
+ 	needs_bulk_out:		MUST_HAVE,		/* this device must have a bulk out endpoint */
+ 	num_interrupt_in:	0,
+ 	num_bulk_in:		2,
+ 	num_bulk_out:		2,
+ 	num_ports:		2,
+ 	open:			visor_open,
+ 	close:			visor_close,
+ 	throttle:		visor_throttle,
+ 	unthrottle:		visor_unthrottle,
+ 	startup:		visor_startup,
+ 	shutdown:		visor_shutdown,
+ 	ioctl:			visor_ioctl,
+ 	set_termios:		visor_set_termios,
+ 	write:			visor_write,
+ 	write_room:		visor_write_room,
+ 	chars_in_buffer:	visor_chars_in_buffer,
+ 	write_bulk_callback:	visor_write_bulk_callback,
+ 	read_bulk_callback:	visor_read_bulk_callback,
+ };
+ 
+ 
  /* device info for the Sony Clie OS version 3.5 */
  static struct usb_serial_device_type clie_3_5_device = {
! 	name:			"Sony CliNi 3.5",
! 	id_table:		clie_id_3_5_table,
! 	needs_interrupt_in:	MUST_HAVE_NOT,		/* this device must not have an interrupt in endpoint */
! 	needs_bulk_in:		MUST_HAVE,		/* this device must have a bulk in endpoint */
! 	needs_bulk_out:		MUST_HAVE,		/* this device must have a bulk out endpoint */
! 	num_interrupt_in:	0,
! 	num_bulk_in:		1,
! 	num_bulk_out:		1,
! 	num_ports:		1,
! 	open:			visor_open,
! 	close:			visor_close,
! 	throttle:		visor_throttle,
! 	unthrottle:		visor_unthrottle,
! 	ioctl:			visor_ioctl,
! 	set_termios:		visor_set_termios,
! 	write:			visor_write,
! 	write_room:		visor_write_room,
! 	chars_in_buffer:	visor_chars_in_buffer,
! 	write_bulk_callback:	visor_write_bulk_callback,
! 	read_bulk_callback:	visor_read_bulk_callback,
  };
  
+ /* device info for the Sony Clie OS version 4.0 */
+ static struct usb_serial_device_type clie_4_0_device = {
+ 	name:			"Sony CliNi 4.0",
+ 	id_table:		clie_id_4_0_table,
+ 	needs_interrupt_in:	MUST_HAVE_NOT,		/* this device must not have an interrupt in endpoint */
+ 	needs_bulk_in:		MUST_HAVE,		/* this device must have a bulk in endpoint */
+ 	needs_bulk_out:		MUST_HAVE,		/* this device must have a bulk out endpoint */
+ 	num_interrupt_in:	0,
+ 	num_bulk_in:		2,
+ 	num_bulk_out:		2,
+ 	num_ports:		2,
+ 	open:			visor_open,
+ 	close:			visor_close,
+ 	throttle:		visor_throttle,
+ 	unthrottle:		visor_unthrottle,
+ 	startup:		visor_startup,
+ 	shutdown:		visor_shutdown,
+ 	ioctl:			visor_ioctl,
+ 	set_termios:		visor_set_termios,
+ 	write:			visor_write,
+ 	write_room:		visor_write_room,
+ 	chars_in_buffer:	visor_chars_in_buffer,
+ 	write_bulk_callback:	visor_write_bulk_callback,
+ 	read_bulk_callback:	visor_read_bulk_callback,
+ };
  
  #define NUM_URBS			24
  #define URB_TRANSFER_BUFFER_SIZE	768
***************
*** 274,308 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  	
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (!port->read_urb) {
- 		/* this is needed for some brain dead Sony devices */
  		err ("Device lied about number of ports, please use a lower one.");
  		return -ENODEV;
  	}
  
! 	bytes_in = 0;
! 	bytes_out = 0;
! 
! 	/*
! 	 * Force low_latency on so that our tty_push actually forces the data
! 	 * through, otherwise it is scheduled, and with high data rates (like
! 	 * with OHCI) data can get lost.
! 	 */
! 	if (port->tty)
  		port->tty->low_latency = 1;
! 
! 	/* Start reading from the device */
! 	usb_fill_bulk_urb (port->read_urb, serial->dev,
! 			   usb_rcvbulkpipe (serial->dev, 
! 					    port->bulk_in_endpointAddress),
! 			   port->read_urb->transfer_buffer,
! 			   port->read_urb->transfer_buffer_length,
! 			   visor_read_bulk_callback, port);
! 	result = usb_submit_urb(port->read_urb);
! 	if (result)
! 		err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
  	
  	return result;
  }
--- 305,343 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return -ENODEV;
  	
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if (!port->read_urb) {
  		err ("Device lied about number of ports, please use a lower one.");
  		return -ENODEV;
  	}
  
! 	down (&port->sem);
! 	
! 	++port->open_count;
! 	MOD_INC_USE_COUNT;
! 	
! 	if (!port->active) {
! 		port->active = 1;
! 		bytes_in = 0;
! 		bytes_out = 0;
! 
! 		/* force low_latency on so that our tty_push actually forces the data through, 
! 		   otherwise it is scheduled, and with high data rates (like with OHCI) data
! 		   can get lost. */
  		port->tty->low_latency = 1;
! 		
! 		/* Start reading from the device */
! 		FILL_BULK_URB(port->read_urb, serial->dev, 
! 			      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
! 			      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
! 			      visor_read_bulk_callback, port);
! 		result = usb_submit_urb(port->read_urb);
! 		if (result)
! 			err(__FUNCTION__ " - failed submitting read urb, error %d", result);
! 	}
! 	
! 	up (&port->sem);
  	
  	return result;
  }
***************
*** 316,347 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  			 
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
  		return;
  	
! 	if (serial->dev) {
! 		/* only send a shutdown message if the 
! 		 * device is still here */
! 		transfer_buffer =  kmalloc (0x12, GFP_KERNEL);
! 		if (!transfer_buffer) {
! 			err("%s - kmalloc(%d) failed.", __FUNCTION__, 0x12);
! 		} else {
! 			/* send a shutdown message to the device */
! 			usb_control_msg (serial->dev,
! 					 usb_rcvctrlpipe(serial->dev, 0),
! 					 VISOR_CLOSE_NOTIFICATION, 0xc2,
! 					 0x0000, 0x0000, 
! 					 transfer_buffer, 0x12, 300);
! 			kfree (transfer_buffer);
  		}
! 		/* shutdown our bulk read */
! 		usb_unlink_urb (port->read_urb);
  	}
  	/* Uncomment the following line if you want to see some statistics in your syslog */
  	/* info ("Bytes In = %d  Bytes Out = %d", bytes_in, bytes_out); */
  }
  
  
--- 351,394 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg(__FUNCTION__ " - port %d", port->number);
  			 
  	serial = get_usb_serial (port, __FUNCTION__);
  	if (!serial)
  		return;
  	
! 	down (&port->sem);
! 
! 	--port->open_count;
! 
! 	if (port->open_count <= 0) {
! 		if (serial->dev) {
! 			/* only send a shutdown message if the 
! 			 * device is still here */
! 			transfer_buffer =  kmalloc (0x12, GFP_KERNEL);
! 			if (!transfer_buffer) {
! 				err(__FUNCTION__ " - kmalloc(%d) failed.", 0x12);
! 			} else {
! 				/* send a shutdown message to the device */
! 				usb_control_msg (serial->dev,
! 						 usb_rcvctrlpipe(serial->dev, 0),
! 						 VISOR_CLOSE_NOTIFICATION, 0xc2,
! 						 0x0000, 0x0000, 
! 						 transfer_buffer, 0x12, 300);
! 				kfree (transfer_buffer);
! 			}
! 			/* shutdown our bulk read */
! 			usb_unlink_urb (port->read_urb);
  		}
! 		port->active = 0;
! 		port->open_count = 0;
  	}
+ 	up (&port->sem);
+ 
  	/* Uncomment the following line if you want to see some statistics in your syslog */
  	/* info ("Bytes In = %d  Bytes Out = %d", bytes_in, bytes_out); */
+ 
+ 	MOD_DEC_USE_COUNT;
  }
  
  
***************
*** 356,362 ****
  	int bytes_sent = 0;
  	int transfer_size;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	while (count > 0) {
  		/* try to find a free urb in our list of them */
--- 403,409 ----
  	int bytes_sent = 0;
  	int transfer_size;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	while (count > 0) {
  		/* try to find a free urb in our list of them */
***************
*** 370,382 ****
  		}
  		spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  		if (urb == NULL) {
! 			dbg("%s - no more free urbs", __FUNCTION__);
  			goto exit;
  		}
  		if (urb->transfer_buffer == NULL) {
  			urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
  			if (urb->transfer_buffer == NULL) {
! 				err("%s no more kernel memory...", __FUNCTION__);
  				goto exit;
  			}
  		}
--- 417,429 ----
  		}
  		spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  		if (urb == NULL) {
! 			dbg (__FUNCTION__ " - no more free urbs");
  			goto exit;
  		}
  		if (urb->transfer_buffer == NULL) {
  			urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
  			if (urb->transfer_buffer == NULL) {
! 				err(__FUNCTION__" no more kernel memory...");
  				goto exit;
  			}
  		}
***************
*** 401,407 ****
  		/* send it down the pipe */
  		status = usb_submit_urb(urb);
  		if (status) {
! 			err("%s - usb_submit_urb(write bulk) failed with status = %d", __FUNCTION__, status);
  			bytes_sent = status;
  			break;
  		}
--- 448,454 ----
  		/* send it down the pipe */
  		status = usb_submit_urb(urb);
  		if (status) {
! 			err(__FUNCTION__ " - usb_submit_urb(write bulk) failed with status = %d", status);
  			bytes_sent = status;
  			break;
  		}
***************
*** 423,429 ****
  	int i;
  	int room = 0;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	
  	spin_lock_irqsave (&write_urb_pool_lock, flags);
  
--- 470,476 ----
  	int i;
  	int room = 0;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  	
  	spin_lock_irqsave (&write_urb_pool_lock, flags);
  
***************
*** 435,441 ****
  	
  	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  	
! 	dbg("%s - returns %d", __FUNCTION__, room);
  	return (room);
  }
  
--- 482,488 ----
  	
  	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  	
! 	dbg(__FUNCTION__ " - returns %d", room);
  	return (room);
  }
  
***************
*** 446,452 ****
  	int i;
  	int chars = 0;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	
  	spin_lock_irqsave (&write_urb_pool_lock, flags);
  
--- 493,499 ----
  	int i;
  	int chars = 0;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  	
  	spin_lock_irqsave (&write_urb_pool_lock, flags);
  
***************
*** 458,464 ****
  	
  	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  
! 	dbg("%s - returns %d", __FUNCTION__, chars);
  	return (chars);
  }
  
--- 505,511 ----
  	
  	spin_unlock_irqrestore (&write_urb_pool_lock, flags);
  
! 	dbg (__FUNCTION__ " - returns %d", chars);
  	return (chars);
  }
  
***************
*** 470,485 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	
  	if (urb->status) {
! 		dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
  	queue_task(&port->tqueue, &tq_immediate);
  	mark_bh(IMMEDIATE_BH);
! 
  	return;
  }
  
--- 517,532 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  	
! 	dbg(__FUNCTION__ " - port %d", port->number);
  	
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status);
  		return;
  	}
  
  	queue_task(&port->tqueue, &tq_immediate);
  	mark_bh(IMMEDIATE_BH);
! 	
  	return;
  }
  
***************
*** 496,517 ****
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  
  	if (urb->status) {
! 		dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
  	usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
  
  	tty = port->tty;
! 	if (tty && urb->actual_length) {
  		for (i = 0; i < urb->actual_length ; ++i) {
  			/* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
  			if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
--- 543,564 ----
  	if (port_paranoia_check (port, __FUNCTION__))
  		return;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  
  	if (urb->status) {
! 		dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status);
  		return;
  	}
  
  	usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data);
  
  	tty = port->tty;
! 	if (urb->actual_length) {
  		for (i = 0; i < urb->actual_length ; ++i) {
  			/* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */
  			if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
***************
*** 525,547 ****
  	}
  
  	/* Continue trying to always read  */
! 	usb_fill_bulk_urb (port->read_urb, serial->dev,
! 			   usb_rcvbulkpipe (serial->dev,
! 					    port->bulk_in_endpointAddress),
! 			   port->read_urb->transfer_buffer,
! 			   port->read_urb->transfer_buffer_length,
! 			   visor_read_bulk_callback, port);
  	result = usb_submit_urb(port->read_urb);
  	if (result)
! 		err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
  	return;
  }
  
  
  static void visor_throttle (struct usb_serial_port *port)
  {
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	usb_unlink_urb (port->read_urb);
  }
  
  
--- 572,600 ----
  	}
  
  	/* Continue trying to always read  */
! 	FILL_BULK_URB(port->read_urb, serial->dev, 
! 		      usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress),
! 		      port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length,
! 		      visor_read_bulk_callback, port);
  	result = usb_submit_urb(port->read_urb);
  	if (result)
! 		err(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
  	return;
  }
  
  
  static void visor_throttle (struct usb_serial_port *port)
  {
! 
! 	dbg(__FUNCTION__ " - port %d", port->number);
! 
! 	down (&port->sem);
! 
  	usb_unlink_urb (port->read_urb);
+ 
+ 	up (&port->sem);
+ 
+ 	return;
  }
  
  
***************
*** 549,583 ****
  {
  	int result;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	port->read_urb->dev = port->serial->dev;
  	result = usb_submit_urb(port->read_urb);
  	if (result)
! 		err("%s - failed submitting read urb, error %d", __FUNCTION__, result);
  }
  
! static int visor_startup (struct usb_serial *serial)
  {
  	int response;
  	int i;
  	unsigned char *transfer_buffer =  kmalloc (256, GFP_KERNEL);
  
  	if (!transfer_buffer) {
! 		err("%s - kmalloc(%d) failed.", __FUNCTION__, 256);
  		return -ENOMEM;
  	}
  
! 	dbg("%s", __FUNCTION__);
  
! 	dbg("%s - Set config to 1", __FUNCTION__);
  	usb_set_configuration (serial->dev, 1);
  
  	/* send a get connection info request */
  	response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_GET_CONNECTION_INFORMATION,
  					0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
  	if (response < 0) {
! 		err("%s - error getting connection information", __FUNCTION__);
  	} else {
  		struct visor_connection_info *connection_info = (struct visor_connection_info *)transfer_buffer;
  		char *string;
--- 602,643 ----
  {
  	int result;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
! 
! 	down (&port->sem);
  
  	port->read_urb->dev = port->serial->dev;
  	result = usb_submit_urb(port->read_urb);
  	if (result)
! 		err(__FUNCTION__ " - failed submitting read urb, error %d", result);
! 
! 	up (&port->sem);
! 
! 	return;
  }
  
! 
! static int  visor_startup (struct usb_serial *serial)
  {
  	int response;
  	int i;
  	unsigned char *transfer_buffer =  kmalloc (256, GFP_KERNEL);
  
  	if (!transfer_buffer) {
! 		err(__FUNCTION__ " - kmalloc(%d) failed.", 256);
  		return -ENOMEM;
  	}
  
! 	dbg(__FUNCTION__);
  
! 	dbg(__FUNCTION__ " - Set config to 1");
  	usb_set_configuration (serial->dev, 1);
  
  	/* send a get connection info request */
  	response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_GET_CONNECTION_INFORMATION,
  					0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
  	if (response < 0) {
! 		err(__FUNCTION__ " - error getting connection information");
  	} else {
  		struct visor_connection_info *connection_info = (struct visor_connection_info *)transfer_buffer;
  		char *string;
***************
*** 605,625 ****
  					string = "unknown";
  					break;	
  			}
! 			info("%s: port %d, is for %s use and is bound to ttyUSB%d", serial->type->name,
! 			     connection_info->connections[i].port, string, serial->minor + i);
  		}
  	}
  
  	if ((serial->dev->descriptor.idVendor == PALM_VENDOR_ID) ||
! 	    ((serial->dev->descriptor.idVendor == SONY_VENDOR_ID) &&
! 	     (serial->dev->descriptor.idProduct != SONY_CLIE_4_1_ID))) {
  		/* Palm OS 4.0 Hack */
  		response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), 
  					    PALM_GET_SOME_UNKNOWN_INFORMATION,
  					    0xc2, 0x0000, 0x0000, transfer_buffer, 
  					    0x14, 300);
  		if (response < 0) {
! 			err("%s - error getting first unknown palm command", __FUNCTION__);
  		} else {
  			usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
  		}
--- 665,683 ----
  					string = "unknown";
  					break;	
  			}
! 			info("%s: port %d, is for %s use and is bound to ttyUSB%d", serial->type->name, connection_info->connections[i].port, string, serial->minor + i);
  		}
  	}
  
  	if ((serial->dev->descriptor.idVendor == PALM_VENDOR_ID) ||
! 	    (serial->dev->descriptor.idVendor == SONY_VENDOR_ID)) {
  		/* Palm OS 4.0 Hack */
  		response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), 
  					    PALM_GET_SOME_UNKNOWN_INFORMATION,
  					    0xc2, 0x0000, 0x0000, transfer_buffer, 
  					    0x14, 300);
  		if (response < 0) {
! 			err(__FUNCTION__ " - error getting first unknown palm command");
  		} else {
  			usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
  		}
***************
*** 628,634 ****
  					    0xc2, 0x0000, 0x0000, transfer_buffer, 
  					    0x14, 300);
  		if (response < 0) {
! 			err("%s - error getting second unknown palm command", __FUNCTION__);
  		} else {
  			usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
  		}
--- 686,692 ----
  					    0xc2, 0x0000, 0x0000, transfer_buffer, 
  					    0x14, 300);
  		if (response < 0) {
! 			err(__FUNCTION__ " - error getting second unknown palm command");
  		} else {
  			usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
  		}
***************
*** 638,644 ****
  	response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_REQUEST_BYTES_AVAILABLE,
  					0xc2, 0x0000, 0x0005, transfer_buffer, 0x02, 300);
  	if (response < 0) {
! 		err("%s - error getting bytes available request", __FUNCTION__);
  	}
  
  	kfree (transfer_buffer);
--- 696,702 ----
  	response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_REQUEST_BYTES_AVAILABLE,
  					0xc2, 0x0000, 0x0005, transfer_buffer, 0x02, 300);
  	if (response < 0) {
! 		err(__FUNCTION__ " - error getting bytes available request");
  	}
  
  	kfree (transfer_buffer);
***************
*** 647,701 ****
  	return 0;
  }
  
! static int clie_3_5_startup (struct usb_serial *serial)
  {
! 	int result;
! 	u8 data;
  
! 	dbg("%s", __FUNCTION__);
  
! 	/*
! 	 * Note that PEG-300 series devices expect the following two calls.
! 	 */
! 
! 	/* get the config number */
! 	result = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0),
! 				  USB_REQ_GET_CONFIGURATION, USB_DIR_IN,
! 				  0, 0, &data, 1, HZ * 3);
! 	if (result < 0) {
! 		err("%s: get config number failed: %d", __FUNCTION__, result);
! 		return result;
! 	}
! 	if (result != 1) {
! 		err("%s: get config number bad return length: %d", __FUNCTION__, result);
! 		return -EIO;
! 	}
! 
! 	/* get the interface number */
! 	result = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0),
! 				  USB_REQ_GET_INTERFACE, 
! 				  USB_DIR_IN | USB_DT_DEVICE,
! 				  0, 0, &data, 1, HZ * 3);
! 	if (result < 0) {
! 		err("%s: get interface number failed: %d", __FUNCTION__, result);
! 		return result;
! 	}
! 	if (result != 1) {
! 		err("%s: get interface number bad return length: %d", __FUNCTION__, result);
! 		return -EIO;
  	}
- 
- 	return 0;
  }
  
- static void visor_shutdown (struct usb_serial *serial)
- {
- 	dbg("%s", __FUNCTION__);
- }
  
  static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
  {
! 	dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
  
  	return -ENOIOCTLCMD;
  }
--- 705,728 ----
  	return 0;
  }
  
! 
! static void visor_shutdown (struct usb_serial *serial)
  {
! 	int i;
  
! 	dbg (__FUNCTION__);
  
! 	/* stop reads and writes on all ports */
! 	for (i=0; i < serial->num_ports; ++i) {
! 		serial->port[i].active = 0;
! 		serial->port[i].open_count = 0;
  	}
  }
  
  
  static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
  {
! 	dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
  
  	return -ENOIOCTLCMD;
  }
***************
*** 706,715 ****
  {
  	unsigned int cflag;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	if ((!port->tty) || (!port->tty->termios)) {
! 		dbg("%s - no tty structures", __FUNCTION__);
  		return;
  	}
  
--- 733,742 ----
  {
  	unsigned int cflag;
  
! 	dbg(__FUNCTION__ " - port %d", port->number);
  
  	if ((!port->tty) || (!port->tty->termios)) {
! 		dbg(__FUNCTION__" - no tty structures");
  		return;
  	}
  
***************
*** 718,768 ****
  	if (old_termios) {
  		if ((cflag == old_termios->c_cflag) &&
  		    (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
! 			dbg("%s - nothing to change...", __FUNCTION__);
  			return;
  		}
  	}
  
  	/* get the byte size */
  	switch (cflag & CSIZE) {
! 		case CS5:	dbg("%s - data bits = 5", __FUNCTION__);   break;
! 		case CS6:	dbg("%s - data bits = 6", __FUNCTION__);   break;
! 		case CS7:	dbg("%s - data bits = 7", __FUNCTION__);   break;
  		default:
! 		case CS8:	dbg("%s - data bits = 8", __FUNCTION__);   break;
  	}
  	
  	/* determine the parity */
  	if (cflag & PARENB)
  		if (cflag & PARODD)
! 			dbg("%s - parity = odd", __FUNCTION__);
  		else
! 			dbg("%s - parity = even", __FUNCTION__);
  	else
! 		dbg("%s - parity = none", __FUNCTION__);
  
  	/* figure out the stop bits requested */
  	if (cflag & CSTOPB)
! 		dbg("%s - stop bits = 2", __FUNCTION__);
  	else
! 		dbg("%s - stop bits = 1", __FUNCTION__);
  
  	
  	/* figure out the flow control settings */
  	if (cflag & CRTSCTS)
! 		dbg("%s - RTS/CTS is enabled", __FUNCTION__);
  	else
! 		dbg("%s - RTS/CTS is disabled", __FUNCTION__);
  	
  	/* determine software flow control */
  	if (I_IXOFF(port->tty))
! 		dbg("%s - XON/XOFF is enabled, XON = %2x, XOFF = %2x",
! 		    __FUNCTION__, START_CHAR(port->tty), STOP_CHAR(port->tty));
  	else
! 		dbg("%s - XON/XOFF is disabled", __FUNCTION__);
  
  	/* get the baud rate wanted */
! 	dbg("%s - baud rate = %d", __FUNCTION__, tty_get_baud_rate(port->tty));
  
  	return;
  }
--- 745,794 ----
  	if (old_termios) {
  		if ((cflag == old_termios->c_cflag) &&
  		    (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
! 			dbg(__FUNCTION__ " - nothing to change...");
  			return;
  		}
  	}
  
  	/* get the byte size */
  	switch (cflag & CSIZE) {
! 		case CS5:	dbg(__FUNCTION__ " - data bits = 5");   break;
! 		case CS6:	dbg(__FUNCTION__ " - data bits = 6");   break;
! 		case CS7:	dbg(__FUNCTION__ " - data bits = 7");   break;
  		default:
! 		case CS8:	dbg(__FUNCTION__ " - data bits = 8");   break;
  	}
  	
  	/* determine the parity */
  	if (cflag & PARENB)
  		if (cflag & PARODD)
! 			dbg(__FUNCTION__ " - parity = odd");
  		else
! 			dbg(__FUNCTION__ " - parity = even");
  	else
! 		dbg(__FUNCTION__ " - parity = none");
  
  	/* figure out the stop bits requested */
  	if (cflag & CSTOPB)
! 		dbg(__FUNCTION__ " - stop bits = 2");
  	else
! 		dbg(__FUNCTION__ " - stop bits = 1");
  
  	
  	/* figure out the flow control settings */
  	if (cflag & CRTSCTS)
! 		dbg(__FUNCTION__ " - RTS/CTS is enabled");
  	else
! 		dbg(__FUNCTION__ " - RTS/CTS is disabled");
  	
  	/* determine software flow control */
  	if (I_IXOFF(port->tty))
! 		dbg(__FUNCTION__ " - XON/XOFF is enabled, XON = %2x, XOFF = %2x", START_CHAR(port->tty), STOP_CHAR(port->tty));
  	else
! 		dbg(__FUNCTION__ " - XON/XOFF is disabled");
  
  	/* get the baud rate wanted */
! 	dbg(__FUNCTION__ " - baud rate = %d", tty_get_baud_rate(port->tty));
  
  	return;
  }
***************
*** 774,780 ****
--- 800,808 ----
  	int i;
  
  	usb_serial_register (&handspring_device);
+ 	usb_serial_register (&palm_4_0_device);
  	usb_serial_register (&clie_3_5_device);
+ 	usb_serial_register (&clie_4_0_device);
  	
  	/* create our write urb pool and transfer buffers */ 
  	spin_lock_init (&write_urb_pool_lock);
***************
*** 789,795 ****
  		urb->transfer_buffer = NULL;
  		urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
  		if (!urb->transfer_buffer) {
! 			err("%s - out of memory for urb buffers.", __FUNCTION__);
  			continue;
  		}
  	}
--- 817,823 ----
  		urb->transfer_buffer = NULL;
  		urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
  		if (!urb->transfer_buffer) {
! 			err (__FUNCTION__ " - out of memory for urb buffers.");
  			continue;
  		}
  	}
***************
*** 806,812 ****
--- 834,842 ----
  	unsigned long flags;
  
  	usb_serial_deregister (&handspring_device);
+ 	usb_serial_deregister (&palm_4_0_device);
  	usb_serial_deregister (&clie_3_5_device);
+ 	usb_serial_deregister (&clie_4_0_device);
  
  	spin_lock_irqsave (&write_urb_pool_lock, flags);
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/visor.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/visor.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/visor.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/visor.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,7 ****
  /*
   * USB HandSpring Visor driver
   *
!  *	Copyright (C) 1999 - 2002
   *	    Greg Kroah-Hartman (greg@kroah.com)
   *
   *	This program is free software; you can redistribute it and/or modify
--- 1,7 ----
  /*
   * USB HandSpring Visor driver
   *
!  *	Copyright (C) 1999 - 2001
   *	    Greg Kroah-Hartman (greg@kroah.com)
   *
   *	This program is free software; you can redistribute it and/or modify
***************
*** 23,39 ****
  #define PALM_VENDOR_ID			0x0830
  #define PALM_M500_ID			0x0001
  #define PALM_M505_ID			0x0002
- #define PALM_M515_ID			0x0003
- #define PALM_I705_ID			0x0020
  #define PALM_M125_ID			0x0040
- #define PALM_M130_ID			0x0050
- #define PALM_ZIRE_ID			0x0070
  
  #define SONY_VENDOR_ID			0x054C
  #define SONY_CLIE_3_5_ID		0x0038
  #define SONY_CLIE_4_0_ID		0x0066
- #define SONY_CLIE_S360_ID		0x0095
- #define SONY_CLIE_4_1_ID		0x009A
  
  /****************************************************************************
   * Handspring Visor Vendor specific request codes (bRequest values)
--- 23,33 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/whiteheat.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/whiteheat.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/whiteheat.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/whiteheat.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 61,75 ****
  
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
- #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
--- 61,78 ----
  
  #include 
  #include 
+ #include 
+ #include 
  #include 
+ #include 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  
  #ifdef CONFIG_USB_SERIAL_DEBUG
***************
*** 85,91 ****
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.2"
  #define DRIVER_AUTHOR "Greg Kroah-Hartman "
  #define DRIVER_DESC "USB ConnectTech WhiteHEAT driver"
  
--- 88,94 ----
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.1"
  #define DRIVER_AUTHOR "Greg Kroah-Hartman "
  #define DRIVER_DESC "USB ConnectTech WhiteHEAT driver"
  
***************
*** 100,111 ****
     separate ID tables, and then a third table that combines them
     just for the purpose of exporting the autoloading information.
  */
! static struct usb_device_id id_table_std [] = {
  	{ USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) },
  	{ }						/* Terminating entry */
  };
  
! static struct usb_device_id id_table_prerenumeration [] = {
  	{ USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) },
  	{ }						/* Terminating entry */
  };
--- 103,114 ----
     separate ID tables, and then a third table that combines them
     just for the purpose of exporting the autoloading information.
  */
! static __devinitdata struct usb_device_id id_table_std [] = {
  	{ USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) },
  	{ }						/* Terminating entry */
  };
  
! static __devinitdata struct usb_device_id id_table_prerenumeration [] = {
  	{ USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) },
  	{ }						/* Terminating entry */
  };
***************
*** 125,161 ****
  static void whiteheat_set_termios	(struct usb_serial_port *port, struct termios * old);
  static void whiteheat_throttle		(struct usb_serial_port *port);
  static void whiteheat_unthrottle	(struct usb_serial_port *port);
! static int  whiteheat_fake_startup	(struct usb_serial *serial);
! static int  whiteheat_real_startup	(struct usb_serial *serial);
! static void whiteheat_real_shutdown	(struct usb_serial *serial);
  
  static struct usb_serial_device_type whiteheat_fake_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"Connect Tech - WhiteHEAT - (prerenumeration)",
! 	.id_table =		id_table_prerenumeration,
! 	.num_interrupt_in =	NUM_DONT_CARE,
! 	.num_bulk_in =		NUM_DONT_CARE,
! 	.num_bulk_out =		NUM_DONT_CARE,
! 	.num_ports =		1,
! 	.startup =		whiteheat_fake_startup,
  };
  
  static struct usb_serial_device_type whiteheat_device = {
! 	.owner =		THIS_MODULE,
! 	.name =			"Connect Tech - WhiteHEAT",
! 	.id_table =		id_table_std,
! 	.num_interrupt_in =	NUM_DONT_CARE,
! 	.num_bulk_in =		NUM_DONT_CARE,
! 	.num_bulk_out =		NUM_DONT_CARE,
! 	.num_ports =		4,
! 	.open =			whiteheat_open,
! 	.close =		whiteheat_close,
! 	.throttle =		whiteheat_throttle,
! 	.unthrottle =		whiteheat_unthrottle,
! 	.ioctl =		whiteheat_ioctl,
! 	.set_termios =		whiteheat_set_termios,
! 	.startup =		whiteheat_real_startup,
! 	.shutdown =		whiteheat_real_shutdown,
  };
  
  struct whiteheat_private {
--- 128,166 ----
  static void whiteheat_set_termios	(struct usb_serial_port *port, struct termios * old);
  static void whiteheat_throttle		(struct usb_serial_port *port);
  static void whiteheat_unthrottle	(struct usb_serial_port *port);
! static int  whiteheat_startup		(struct usb_serial *serial);
! static void whiteheat_shutdown		(struct usb_serial *serial);
  
  static struct usb_serial_device_type whiteheat_fake_device = {
! 	name:			"Connect Tech - WhiteHEAT - (prerenumeration)",
! 	id_table:		id_table_prerenumeration,
! 	needs_interrupt_in:	DONT_CARE,				/* don't have to have an interrupt in endpoint */
! 	needs_bulk_in:		DONT_CARE,				/* don't have to have a bulk in endpoint */
! 	needs_bulk_out:		DONT_CARE,				/* don't have to have a bulk out endpoint */
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		NUM_DONT_CARE,
! 	num_bulk_out:		NUM_DONT_CARE,
! 	num_ports:		1,
! 	startup:		whiteheat_startup	
  };
  
  static struct usb_serial_device_type whiteheat_device = {
! 	name:			"Connect Tech - WhiteHEAT",
! 	id_table:		id_table_std,
! 	needs_interrupt_in:	DONT_CARE,				/* don't have to have an interrupt in endpoint */
! 	needs_bulk_in:		DONT_CARE,				/* don't have to have a bulk in endpoint */
! 	needs_bulk_out:		DONT_CARE,				/* don't have to have a bulk out endpoint */
! 	num_interrupt_in:	NUM_DONT_CARE,
! 	num_bulk_in:		NUM_DONT_CARE,
! 	num_bulk_out:		NUM_DONT_CARE,
! 	num_ports:		4,
! 	open:			whiteheat_open,
! 	close:			whiteheat_close,
! 	throttle:		whiteheat_throttle,
! 	unthrottle:		whiteheat_unthrottle,
! 	ioctl:			whiteheat_ioctl,
! 	set_termios:		whiteheat_set_termios,
! 	shutdown:		whiteheat_shutdown,
  };
  
  struct whiteheat_private {
***************
*** 179,185 ****
   *****************************************************************************/
  static void command_port_write_callback (struct urb *urb)
  {
! 	dbg("%s", __FUNCTION__);
  
  	if (urb->status) {
  		dbg ("nonzero urb status: %d", urb->status);
--- 184,190 ----
   *****************************************************************************/
  static void command_port_write_callback (struct urb *urb)
  {
! 	dbg (__FUNCTION__);
  
  	if (urb->status) {
  		dbg ("nonzero urb status: %d", urb->status);
***************
*** 200,214 ****
  	unsigned char *data = urb->transfer_buffer;
  	int result;
  
! 	dbg("%s", __FUNCTION__);
  
  	if (urb->status) {
! 		dbg("%s - nonzero urb status: %d", __FUNCTION__, urb->status);
  		return;
  	}
  
  	if (!serial) {
! 		dbg("%s - bad serial pointer, exiting", __FUNCTION__);
  		return;
  	}
  	
--- 205,219 ----
  	unsigned char *data = urb->transfer_buffer;
  	int result;
  
! 	dbg (__FUNCTION__);
  
  	if (urb->status) {
! 		dbg (__FUNCTION__ " - nonzero urb status: %d", urb->status);
  		return;
  	}
  
  	if (!serial) {
! 		dbg(__FUNCTION__ " - bad serial pointer, exiting");
  		return;
  	}
  	
***************
*** 216,222 ****
  
  	info = (struct whiteheat_private *)port->private;
  	if (!info) {
! 		dbg("%s - info is NULL, exiting.", __FUNCTION__);
  		return;
  	}
  
--- 221,227 ----
  
  	info = (struct whiteheat_private *)port->private;
  	if (!info) {
! 		dbg (__FUNCTION__ " - info is NULL, exiting.");
  		return;
  	}
  
***************
*** 239,245 ****
  		      command_port_read_callback, port);
  	result = usb_submit_urb(port->read_urb);
  	if (result)
! 		dbg("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
  }
  
  
--- 244,250 ----
  		      command_port_read_callback, port);
  	result = usb_submit_urb(port->read_urb);
  	if (result)
! 		dbg(__FUNCTION__ " - failed resubmitting read urb, error %d", result);
  }
  
  
***************
*** 251,257 ****
  	__u8 *transfer_buffer;
  	int retval = 0;
  
! 	dbg("%s - command %d", __FUNCTION__, command);
  
  	port = &serial->port[COMMAND_PORT];
  	info = (struct whiteheat_private *)port->private;
--- 256,262 ----
  	__u8 *transfer_buffer;
  	int retval = 0;
  
! 	dbg(__FUNCTION__" - command %d", command);
  
  	port = &serial->port[COMMAND_PORT];
  	info = (struct whiteheat_private *)port->private;
***************
*** 264,270 ****
  	port->write_urb->dev = serial->dev;
  	retval = usb_submit_urb (port->write_urb);
  	if (retval) {
! 		dbg("%s - submit urb failed", __FUNCTION__);
  		goto exit;
  	}
  
--- 269,275 ----
  	port->write_urb->dev = serial->dev;
  	retval = usb_submit_urb (port->write_urb);
  	if (retval) {
! 		dbg (__FUNCTION__" - submit urb failed");
  		goto exit;
  	}
  
***************
*** 275,293 ****
  	}
  
  	if (info->command_finished == FALSE) {
! 		dbg("%s - command timed out.", __FUNCTION__);
  		retval = -ETIMEDOUT;
  		goto exit;
  	}
  
  	if (info->command_finished == WHITEHEAT_CMD_FAILURE) {
! 		dbg("%s - command failed.", __FUNCTION__);
  		retval = -EIO;
  		goto exit;
  	}
  
  	if (info->command_finished == WHITEHEAT_CMD_COMPLETE)
! 		dbg("%s - command completed.", __FUNCTION__);
  
  exit:
  	return retval;
--- 280,298 ----
  	}
  
  	if (info->command_finished == FALSE) {
! 		dbg (__FUNCTION__ " - command timed out.");
  		retval = -ETIMEDOUT;
  		goto exit;
  	}
  
  	if (info->command_finished == WHITEHEAT_CMD_FAILURE) {
! 		dbg (__FUNCTION__ " - command failed.");
  		retval = -EIO;
  		goto exit;
  	}
  
  	if (info->command_finished == WHITEHEAT_CMD_COMPLETE)
! 		dbg (__FUNCTION__ " - command completed.");
  
  exit:
  	return retval;
***************
*** 301,351 ****
  	struct whiteheat_private	*info;
  	int				retval = 0;
  
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
! 	/* set up some stuff for our command port */
! 	command_port = &port->serial->port[COMMAND_PORT];
! 	if (command_port->private == NULL) {
! 		info = (struct whiteheat_private *)kmalloc (sizeof(struct whiteheat_private), GFP_KERNEL);
! 		if (info == NULL) {
! 			err("%s - out of memory", __FUNCTION__);
! 			retval = -ENOMEM;
! 			goto exit;
  		}
  		
! 		init_waitqueue_head(&info->wait_command);
! 		command_port->private = info;
! 		command_port->write_urb->complete = command_port_write_callback;
! 		command_port->read_urb->complete = command_port_read_callback;
! 		command_port->read_urb->dev = port->serial->dev;
! 		command_port->tty = port->tty;		/* need this to "fake" our our sanity check macros */
! 		retval = usb_submit_urb (command_port->read_urb);
  		if (retval) {
! 			err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
! 			goto exit;
  		}
- 	}
  	
! 	/* Start reading from the device */
! 	port->read_urb->dev = port->serial->dev;
! 	retval = usb_submit_urb(port->read_urb);
! 	if (retval) {
! 		err("%s - failed submitting read urb, error %d", __FUNCTION__, retval);
! 		goto exit;
  	}
  
! 	/* send an open port command */
! 	/* firmware uses 1 based port numbering */
! 	open_command.port = port->number - port->serial->minor + 1;
! 	retval = whiteheat_send_cmd (port->serial, WHITEHEAT_OPEN, (__u8 *)&open_command, sizeof(open_command));
! 	if (retval)
! 		goto exit;
  
! 	/* Need to do device specific setup here (control lines, baud rate, etc.) */
! 	/* FIXME!!! */
  
! exit:
! 	dbg("%s - exit, retval = %d", __FUNCTION__, retval);
  	return retval;
  }
  
--- 306,375 ----
  	struct whiteheat_private	*info;
  	int				retval = 0;
  
! 	dbg(__FUNCTION__" - port %d", port->number);
  
! 	down (&port->sem);
! 
! 	++port->open_count;
! 	MOD_INC_USE_COUNT;
! 	
! 	if (!port->active) {
! 		port->active = 1;
! 
! 		/* set up some stuff for our command port */
! 		command_port = &port->serial->port[COMMAND_PORT];
! 		if (command_port->private == NULL) {
! 			info = (struct whiteheat_private *)kmalloc (sizeof(struct whiteheat_private), GFP_KERNEL);
! 			if (info == NULL) {
! 				err(__FUNCTION__ " - out of memory");
! 				retval = -ENOMEM;
! 				goto error_exit;
! 			}
! 			
! 			init_waitqueue_head(&info->wait_command);
! 			command_port->private = info;
! 			command_port->write_urb->complete = command_port_write_callback;
! 			command_port->read_urb->complete = command_port_read_callback;
! 			command_port->read_urb->dev = port->serial->dev;
! 			command_port->tty = port->tty;		/* need this to "fake" our our sanity check macros */
! 			retval = usb_submit_urb (command_port->read_urb);
! 			if (retval) {
! 				err(__FUNCTION__ " - failed submitting read urb, error %d", retval);
! 				goto error_exit;
! 			}
  		}
  		
! 		/* Start reading from the device */
! 		port->read_urb->dev = port->serial->dev;
! 		retval = usb_submit_urb(port->read_urb);
  		if (retval) {
! 			err(__FUNCTION__ " - failed submitting read urb, error %d", retval);
! 			goto error_exit;
  		}
  	
! 		/* send an open port command */
! 		/* firmware uses 1 based port numbering */
! 		open_command.port = port->number - port->serial->minor + 1;
! 		retval = whiteheat_send_cmd (port->serial, WHITEHEAT_OPEN, (__u8 *)&open_command, sizeof(open_command));
! 		if (retval)
! 			goto error_exit;
! 	
! 		/* Need to do device specific setup here (control lines, baud rate, etc.) */
! 		/* FIXME!!! */
  	}
  
! 	dbg(__FUNCTION__ " - exit");
! 	up (&port->sem);
! 	
! 	return retval;
  
! error_exit:
! 	--port->open_count;
! 	MOD_DEC_USE_COUNT;
  
! 	dbg(__FUNCTION__ " - error_exit");
! 	up (&port->sem);
! 	
  	return retval;
  }
  
***************
*** 354,378 ****
  {
  	struct whiteheat_min_set	close_command;
  	
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  	
! 	/* send a close command to the port */
! 	/* firmware uses 1 based port numbering */
! 	close_command.port = port->number - port->serial->minor + 1;
! 	whiteheat_send_cmd (port->serial, WHITEHEAT_CLOSE, (__u8 *)&close_command, sizeof(close_command));
  
! 	/* Need to change the control lines here */
! 	/* FIXME */
  	
! 	/* shutdown our bulk reads and writes */
! 	usb_unlink_urb (port->write_urb);
! 	usb_unlink_urb (port->read_urb);
  }
  
  
  static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
  {
! 	dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd);
  
  	return -ENOIOCTLCMD;
  }
--- 378,410 ----
  {
  	struct whiteheat_min_set	close_command;
  	
! 	dbg(__FUNCTION__ " - port %d", port->number);
  	
! 	down (&port->sem);
! 	--port->open_count;
  
! 	if (port->open_count <= 0) {
! 		/* send a close command to the port */
! 		/* firmware uses 1 based port numbering */
! 		close_command.port = port->number - port->serial->minor + 1;
! 		whiteheat_send_cmd (port->serial, WHITEHEAT_CLOSE, (__u8 *)&close_command, sizeof(close_command));
  	
! 		/* Need to change the control lines here */
! 		/* FIXME */
! 		
! 		/* shutdown our bulk reads and writes */
! 		usb_unlink_urb (port->write_urb);
! 		usb_unlink_urb (port->read_urb);
! 		port->active = 0;
! 	}
! 	MOD_DEC_USE_COUNT;
! 	up (&port->sem);
  }
  
  
  static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
  {
! 	dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd);
  
  	return -ENOIOCTLCMD;
  }
***************
*** 383,392 ****
  	unsigned int cflag;
  	struct whiteheat_port_settings port_settings;
  
! 	dbg("%s -port %d", __FUNCTION__, port->number);
  
  	if ((!port->tty) || (!port->tty->termios)) {
! 		dbg("%s - no tty structures", __FUNCTION__);
  		goto exit;
  	}
  	
--- 415,426 ----
  	unsigned int cflag;
  	struct whiteheat_port_settings port_settings;
  
! 	dbg(__FUNCTION__ " -port %d", port->number);
! 
! 	down (&port->sem);
  
  	if ((!port->tty) || (!port->tty->termios)) {
! 		dbg(__FUNCTION__" - no tty structures");
  		goto exit;
  	}
  	
***************
*** 395,401 ****
  	if (old_termios) {
  		if ((cflag == old_termios->c_cflag) &&
  		    (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
! 			dbg("%s - nothing to change...", __FUNCTION__);
  			goto exit;
  		}
  	}
--- 429,435 ----
  	if (old_termios) {
  		if ((cflag == old_termios->c_cflag) &&
  		    (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
! 			dbg(__FUNCTION__ " - nothing to change...");
  			goto exit;
  		}
  	}
***************
*** 412,418 ****
  		default:
  		case CS8:	port_settings.bits = 8;   break;
  	}
! 	dbg("%s - data bits = %d", __FUNCTION__, port_settings.bits);
  	
  	/* determine the parity */
  	if (cflag & PARENB)
--- 446,452 ----
  		default:
  		case CS8:	port_settings.bits = 8;   break;
  	}
! 	dbg(__FUNCTION__ " - data bits = %d", port_settings.bits);
  	
  	/* determine the parity */
  	if (cflag & PARENB)
***************
*** 422,435 ****
  			port_settings.parity = 'e';
  	else
  		port_settings.parity = 'n';
! 	dbg("%s - parity = %c", __FUNCTION__, port_settings.parity);
  
  	/* figure out the stop bits requested */
  	if (cflag & CSTOPB)
  		port_settings.stop = 2;
  	else
  		port_settings.stop = 1;
! 	dbg("%s - stop bits = %d", __FUNCTION__, port_settings.stop);
  
  	
  	/* figure out the flow control settings */
--- 456,469 ----
  			port_settings.parity = 'e';
  	else
  		port_settings.parity = 'n';
! 	dbg(__FUNCTION__ " - parity = %c", port_settings.parity);
  
  	/* figure out the stop bits requested */
  	if (cflag & CSTOPB)
  		port_settings.stop = 2;
  	else
  		port_settings.stop = 1;
! 	dbg(__FUNCTION__ " - stop bits = %d", port_settings.stop);
  
  	
  	/* figure out the flow control settings */
***************
*** 437,443 ****
  		port_settings.hflow = (WHITEHEAT_CTS_FLOW | WHITEHEAT_RTS_FLOW);
  	else
  		port_settings.hflow = 0;
! 	dbg("%s - hardware flow control = %s %s %s %s", __FUNCTION__,
  	    (port_settings.hflow & WHITEHEAT_CTS_FLOW) ? "CTS" : "",
  	    (port_settings.hflow & WHITEHEAT_RTS_FLOW) ? "RTS" : "",
  	    (port_settings.hflow & WHITEHEAT_DSR_FLOW) ? "DSR" : "",
--- 471,477 ----
  		port_settings.hflow = (WHITEHEAT_CTS_FLOW | WHITEHEAT_RTS_FLOW);
  	else
  		port_settings.hflow = 0;
! 	dbg(__FUNCTION__ " - hardware flow control = %s %s %s %s",
  	    (port_settings.hflow & WHITEHEAT_CTS_FLOW) ? "CTS" : "",
  	    (port_settings.hflow & WHITEHEAT_RTS_FLOW) ? "RTS" : "",
  	    (port_settings.hflow & WHITEHEAT_DSR_FLOW) ? "DSR" : "",
***************
*** 448,462 ****
  		port_settings.sflow = 'b';
  	else
  		port_settings.sflow = 'n';
! 	dbg("%s - software flow control = %c", __FUNCTION__, port_settings.sflow);
  	
  	port_settings.xon = START_CHAR(port->tty);
  	port_settings.xoff = STOP_CHAR(port->tty);
! 	dbg("%s - XON = %2x, XOFF = %2x", __FUNCTION__, port_settings.xon, port_settings.xoff);
  
  	/* get the baud rate wanted */
  	port_settings.baud = tty_get_baud_rate(port->tty);
! 	dbg("%s - baud rate = %d", __FUNCTION__, port_settings.baud);
  
  	/* handle any settings that aren't specified in the tty structure */
  	port_settings.lloop = 0;
--- 482,496 ----
  		port_settings.sflow = 'b';
  	else
  		port_settings.sflow = 'n';
! 	dbg(__FUNCTION__ " - software flow control = %c", port_settings.sflow);
  	
  	port_settings.xon = START_CHAR(port->tty);
  	port_settings.xoff = STOP_CHAR(port->tty);
! 	dbg(__FUNCTION__ " - XON = %2x, XOFF = %2x", port_settings.xon, port_settings.xoff);
  
  	/* get the baud rate wanted */
  	port_settings.baud = tty_get_baud_rate(port->tty);
! 	dbg(__FUNCTION__ " - baud rate = %d", port_settings.baud);
  
  	/* handle any settings that aren't specified in the tty structure */
  	port_settings.lloop = 0;
***************
*** 465,477 ****
  	whiteheat_send_cmd (port->serial, WHITEHEAT_SETUP_PORT, (__u8 *)&port_settings, sizeof(port_settings));
  	
  exit:
  	return;
  }
  
  
  static void whiteheat_throttle (struct usb_serial_port *port)
  {
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	/* Change the control signals */
  	/* FIXME!!! */
--- 499,512 ----
  	whiteheat_send_cmd (port->serial, WHITEHEAT_SETUP_PORT, (__u8 *)&port_settings, sizeof(port_settings));
  	
  exit:
+ 	up (&port->sem);
  	return;
  }
  
  
  static void whiteheat_throttle (struct usb_serial_port *port)
  {
! 	dbg(__FUNCTION__" - port %d", port->number);
  
  	/* Change the control signals */
  	/* FIXME!!! */
***************
*** 482,488 ****
  
  static void whiteheat_unthrottle (struct usb_serial_port *port)
  {
! 	dbg("%s - port %d", __FUNCTION__, port->number);
  
  	/* Change the control signals */
  	/* FIXME!!! */
--- 517,523 ----
  
  static void whiteheat_unthrottle (struct usb_serial_port *port)
  {
! 	dbg(__FUNCTION__" - port %d", port->number);
  
  	/* Change the control signals */
  	/* FIXME!!! */
***************
*** 504,515 ****
   - device renumerated itself and comes up as new device id with all
     firmware download completed.
  */
! static int whiteheat_fake_startup (struct usb_serial *serial)
  {
  	int response;
  	const struct whiteheat_hex_record *record;
  	
! 	dbg("%s", __FUNCTION__);
  	
  	response = ezusb_set_reset (serial, 1);
  
--- 539,550 ----
   - device renumerated itself and comes up as new device id with all
     firmware download completed.
  */
! static int  whiteheat_startup (struct usb_serial *serial)
  {
  	int response;
  	const struct whiteheat_hex_record *record;
  	
! 	dbg(__FUNCTION__);
  	
  	response = ezusb_set_reset (serial, 1);
  
***************
*** 518,525 ****
  		response = ezusb_writememory (serial, record->address, 
  				(unsigned char *)record->data, record->data_size, 0xa0);
  		if (response < 0) {
! 			err("%s - ezusb_writememory failed for loader (%d %04X %p %d)",
! 				__FUNCTION__, response, record->address, record->data, record->data_size);
  			break;
  		}
  		++record;
--- 553,560 ----
  		response = ezusb_writememory (serial, record->address, 
  				(unsigned char *)record->data, record->data_size, 0xa0);
  		if (response < 0) {
! 			err(__FUNCTION__ " - ezusb_writememory failed for loader (%d %04X %p %d)", 
! 				response, record->address, record->data, record->data_size);
  			break;
  		}
  		++record;
***************
*** 535,542 ****
  		response = ezusb_writememory (serial, record->address, 
  				(unsigned char *)record->data, record->data_size, 0xa3);
  		if (response < 0) {
! 			err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)", 
! 				__FUNCTION__, response, record->address, record->data, record->data_size);
  			break;
  		}
  		++record;
--- 570,577 ----
  		response = ezusb_writememory (serial, record->address, 
  				(unsigned char *)record->data, record->data_size, 0xa3);
  		if (response < 0) {
! 			err(__FUNCTION__ " - ezusb_writememory failed for first firmware step (%d %04X %p %d)", 
! 				response, record->address, record->data, record->data_size);
  			break;
  		}
  		++record;
***************
*** 549,556 ****
  		response = ezusb_writememory (serial, record->address, 
  				(unsigned char *)record->data, record->data_size, 0xa0);
  		if (response < 0) {
! 			err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)", 
! 				__FUNCTION__, response, record->address, record->data, record->data_size);
  			break;
  		}
  		++record;
--- 584,591 ----
  		response = ezusb_writememory (serial, record->address, 
  				(unsigned char *)record->data, record->data_size, 0xa0);
  		if (response < 0) {
! 			err(__FUNCTION__" - ezusb_writememory failed for second firmware step (%d %04X %p %d)", 
! 				response, record->address, record->data, record->data_size);
  			break;
  		}
  		++record;
***************
*** 563,632 ****
  }
  
  
! static int  whiteheat_real_startup (struct usb_serial *serial)
  {
! 	struct whiteheat_hw_info *hw_info;
! 	int pipe;
! 	int ret;
! 	int alen;
! 	__u8 command[2] = { WHITEHEAT_GET_HW_INFO, 0 };
! 	__u8 result[sizeof(*hw_info) + 1];
! 
! 	pipe = usb_rcvbulkpipe (serial->dev, 7);
! 	usb_bulk_msg (serial->dev, pipe, result, sizeof(result), &alen, 2 * HZ);
! 	/*
! 	 * We ignore the return code. In the case where rmmod/insmod is
! 	 * performed with a WhiteHEAT connected, the above times out
! 	 * because the endpoint is already prepped, meaning the below succeeds
! 	 * regardless. All other cases the above succeeds.
! 	 */
! 
! 	pipe = usb_sndbulkpipe (serial->dev, 7);
! 	ret = usb_bulk_msg (serial->dev, pipe, command, sizeof(command), &alen, 2 * HZ);
! 	if (ret) {
! 		err("%s: Couldn't send command [%d]", serial->type->name, ret);
! 		goto error_out;
! 	} else if (alen != sizeof(command)) {
! 		err("%s: Send command incomplete [%d]", serial->type->name, alen);
! 		goto error_out;
! 	}
! 
! 	pipe = usb_rcvbulkpipe (serial->dev, 7);
! 	ret = usb_bulk_msg (serial->dev, pipe, result, sizeof(result), &alen, 2 * HZ);
! 	if (ret) {
! 		err("%s: Couldn't get results [%d]", serial->type->name, ret);
! 		goto error_out;
! 	} else if (alen != sizeof(result)) {
! 		err("%s: Get results incomplete [%d]", serial->type->name, alen);
! 		goto error_out;
! 	} else if (result[0] != command[0]) {
! 		err("%s: Command failed [%d]", serial->type->name, result[0]);
! 		goto error_out;
! 	}
! 
! 	hw_info = (struct whiteheat_hw_info *)&result[1];
! 
! 	info("%s: Driver %s: Firmware v%d.%02d", serial->type->name,
! 	     DRIVER_VERSION, hw_info->sw_major_rev, hw_info->sw_minor_rev);
! 
! 	return 0;
! 
! error_out:
! 	err("%s: Unable to retrieve firmware version, try replugging\n", serial->type->name);
! 	/*
! 	 * Return that we've claimed the interface. A failure here may be
! 	 * due to interception by the command_callback routine or other
! 	 * causes that don't mean that the firmware isn't running. This may
! 	 * change in the future. Probably should actually.
! 	 */
! 	return 0;
! }
  
! static void whiteheat_real_shutdown (struct usb_serial *serial)
! {
! 	struct usb_serial_port *command_port;
  
! 	dbg("%s", __FUNCTION__);
  
  	/* free up our private data for our command port */
  	command_port = &serial->port[COMMAND_PORT];
--- 598,616 ----
  }
  
  
! static void whiteheat_shutdown (struct usb_serial *serial)
  {
! 	struct usb_serial_port 		*command_port;
! 	int i;
  
! 	dbg(__FUNCTION__);
  
! 	/* stop reads and writes on all ports */
! 	for (i=0; i < serial->num_ports; ++i) {
! 		while (serial->port[i].open_count > 0) {
! 			whiteheat_close (&serial->port[i], NULL);
! 		}
! 	}
  
  	/* free up our private data for our command port */
  	command_port = &serial->port[COMMAND_PORT];
***************
*** 639,644 ****
--- 623,630 ----
  }
  
  
+ 
+ 
  static void set_command (struct usb_serial_port *port, unsigned char state, unsigned char command)
  {
  	struct whiteheat_rdb_set rdb_command;
***************
*** 674,680 ****
  {
  	usb_serial_register (&whiteheat_fake_device);
  	usb_serial_register (&whiteheat_device);
! 	info(DRIVER_DESC " " DRIVER_VERSION);
  	return 0;
  }
  
--- 660,666 ----
  {
  	usb_serial_register (&whiteheat_fake_device);
  	usb_serial_register (&whiteheat_device);
! 	info(DRIVER_VERSION ":" DRIVER_DESC);
  	return 0;
  }
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/whiteheat_fw.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/whiteheat_fw.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/serial/whiteheat_fw.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/serial/whiteheat_fw.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 47,74 ****
  };
  
  static const struct whiteheat_hex_record whiteheat_firmware[] = {
! { 0x0000,	3,	{0x02, 0x95, 0xe7} },
  { 0x0003,	3,	{0x02, 0x13, 0x12} },
! { 0x000b,	3,	{0x02, 0x0b, 0xb5} },
! { 0x0033,	3,	{0x02, 0x08, 0x18} },
  { 0x0043,	3,	{0x02, 0x0a, 0x00} },
! { 0x005b,	3,	{0x02, 0x11, 0xdd} },
  { 0x0370,	16,	{0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x73, 0x14, 0x70, 0x03, 0x02, 0x04, 0xe7, 0x24} },
  { 0x0380,	16,	{0xfe, 0x70, 0x03, 0x02, 0x05, 0x4f, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x64, 0x14, 0x70, 0x03} },
  { 0x0390,	16,	{0x02, 0x04, 0x52, 0x14, 0x70, 0x03, 0x02, 0x04, 0x3a, 0x14, 0x70, 0x03, 0x02, 0x04, 0x49, 0x24} },
  { 0x03a0,	16,	{0x05, 0x60, 0x03, 0x02, 0x05, 0x9e, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60} },
  { 0x03b0,	16,	{0x36, 0x24, 0x02, 0x70, 0x7b, 0x74, 0x12, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5} },
! { 0x03c0,	16,	{0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0a, 0x99, 0xea, 0x49, 0x60, 0x0d} },
  { 0x03d0,	16,	{0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4} },
! { 0x03e0,	16,	{0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0a, 0x58, 0xea} },
! { 0x03f0,	16,	{0x49, 0x60, 0x33, 0x12, 0xa0, 0x3f, 0xf5, 0x4c, 0x90, 0x7f, 0xee, 0xe0, 0xff, 0xe5, 0x4c, 0xd3} },
! { 0x0400,	16,	{0x9f, 0x40, 0x03, 0xe0, 0xf5, 0x4c, 0xe5, 0x4c, 0xd3, 0x94, 0x40, 0x40, 0x03, 0x75, 0x4c, 0x40} },
! { 0x0410,	16,	{0xae, 0x02, 0xaf, 0x01, 0x7c, 0x7f, 0x7d, 0x00, 0xab, 0x4c, 0x12, 0x8f, 0x3b, 0x90, 0x7f, 0xb5} },
! { 0x0420,	16,	{0xe5, 0x4c, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5} },
  { 0x0430,	16,	{0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0x00, 0xe5, 0x21, 0xf0} },
  { 0x0440,	16,	{0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x21, 0x02} },
! { 0x0450,	16,	{0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x32, 0xd2, 0x02, 0x43, 0x88, 0x10, 0xd2, 0xeb, 0xd2} },
! { 0x0460,	16,	{0xa8, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0x00, 0xe5, 0x32, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0} },
  { 0x0470,	16,	{0x02, 0x05, 0xa5, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02} },
  { 0x0480,	16,	{0x70, 0x5b, 0xa2, 0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x05, 0xe4, 0x33, 0x4f, 0x90} },
  { 0x0490,	16,	{0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa5, 0xe4} },
--- 47,74 ----
  };
  
  static const struct whiteheat_hex_record whiteheat_firmware[] = {
! { 0x0000,	3,	{0x02, 0x95, 0x09} },
  { 0x0003,	3,	{0x02, 0x13, 0x12} },
! { 0x000b,	3,	{0x02, 0x0a, 0x91} },
! { 0x0033,	3,	{0x02, 0x08, 0x1b} },
  { 0x0043,	3,	{0x02, 0x0a, 0x00} },
! { 0x005b,	3,	{0x02, 0x1a, 0xd2} },
  { 0x0370,	16,	{0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x73, 0x14, 0x70, 0x03, 0x02, 0x04, 0xe7, 0x24} },
  { 0x0380,	16,	{0xfe, 0x70, 0x03, 0x02, 0x05, 0x4f, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x64, 0x14, 0x70, 0x03} },
  { 0x0390,	16,	{0x02, 0x04, 0x52, 0x14, 0x70, 0x03, 0x02, 0x04, 0x3a, 0x14, 0x70, 0x03, 0x02, 0x04, 0x49, 0x24} },
  { 0x03a0,	16,	{0x05, 0x60, 0x03, 0x02, 0x05, 0x9e, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60} },
  { 0x03b0,	16,	{0x36, 0x24, 0x02, 0x70, 0x7b, 0x74, 0x12, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5} },
! { 0x03c0,	16,	{0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x81, 0xea, 0x49, 0x60, 0x0d} },
  { 0x03d0,	16,	{0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4} },
! { 0x03e0,	16,	{0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x40, 0xea} },
! { 0x03f0,	16,	{0x49, 0x60, 0x33, 0x12, 0x9f, 0x48, 0xf5, 0x4b, 0x90, 0x7f, 0xee, 0xe0, 0xff, 0xe5, 0x4b, 0xd3} },
! { 0x0400,	16,	{0x9f, 0x40, 0x03, 0xe0, 0xf5, 0x4b, 0xe5, 0x4b, 0xd3, 0x94, 0x40, 0x40, 0x03, 0x75, 0x4b, 0x40} },
! { 0x0410,	16,	{0xae, 0x02, 0xaf, 0x01, 0x7c, 0x7f, 0x7d, 0x00, 0xab, 0x4b, 0x12, 0x8e, 0x81, 0x90, 0x7f, 0xb5} },
! { 0x0420,	16,	{0xe5, 0x4b, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5} },
  { 0x0430,	16,	{0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0x00, 0xe5, 0x21, 0xf0} },
  { 0x0440,	16,	{0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x21, 0x02} },
! { 0x0450,	16,	{0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x31, 0xd2, 0x02, 0x43, 0x88, 0x10, 0xd2, 0xeb, 0xd2} },
! { 0x0460,	16,	{0xa8, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0x00, 0xe5, 0x31, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0} },
  { 0x0470,	16,	{0x02, 0x05, 0xa5, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02} },
  { 0x0480,	16,	{0x70, 0x5b, 0xa2, 0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x05, 0xe4, 0x33, 0x4f, 0x90} },
  { 0x0490,	16,	{0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa5, 0xe4} },
***************
*** 79,86 ****
  { 0x04e0,	16,	{0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24} },
  { 0x04f0,	16,	{0x02, 0x60, 0x03, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x00, 0x02} },
  { 0x0500,	16,	{0x05, 0xa5, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0} },
! { 0x0510,	16,	{0x70, 0x34, 0x90, 0x7f, 0xec, 0xe0, 0xff, 0x54, 0x07, 0xfe, 0xf5, 0x4c, 0xef, 0x30, 0xe7, 0x03} },
! { 0x0520,	16,	{0x43, 0x4c, 0x10, 0x90, 0x7f, 0xd7, 0xe5, 0x4c, 0xf0, 0xe5, 0x4c, 0x44, 0x20, 0xf0, 0xef, 0xf4} },
  { 0x0530,	16,	{0x54, 0x80, 0xfd, 0xc4, 0x54, 0x0f, 0x2e, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f} },
  { 0x0540,	16,	{0xf5, 0x83, 0xe4, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90} },
  { 0x0550,	16,	{0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4} },
--- 79,86 ----
  { 0x04e0,	16,	{0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24} },
  { 0x04f0,	16,	{0x02, 0x60, 0x03, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x00, 0x02} },
  { 0x0500,	16,	{0x05, 0xa5, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0} },
! { 0x0510,	16,	{0x70, 0x34, 0x90, 0x7f, 0xec, 0xe0, 0xff, 0x54, 0x07, 0xfe, 0xf5, 0x4b, 0xef, 0x30, 0xe7, 0x03} },
! { 0x0520,	16,	{0x43, 0x4b, 0x10, 0x90, 0x7f, 0xd7, 0xe5, 0x4b, 0xf0, 0xe5, 0x4b, 0x44, 0x20, 0xf0, 0xef, 0xf4} },
  { 0x0530,	16,	{0x54, 0x80, 0xfd, 0xc4, 0x54, 0x0f, 0x2e, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f} },
  { 0x0540,	16,	{0xf5, 0x83, 0xe4, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90} },
  { 0x0550,	16,	{0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4} },
***************
*** 90,315 ****
  { 0x0590,	16,	{0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f} },
  { 0x05a0,	12,	{0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} },
  { 0x05ac,	1,	{0x22} },
! { 0x05ad,	16,	{0x75, 0x48, 0xff, 0x75, 0x47, 0xff, 0x75, 0x46, 0x0f, 0x75, 0x45, 0x00, 0xd2, 0x03, 0xc2, 0x06} },
  { 0x05bd,	16,	{0xc2, 0x02, 0xc2, 0x00, 0xc2, 0x05, 0xc2, 0x01, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xe4, 0x90} },
  { 0x05cd,	16,	{0x01, 0xbc, 0xf0, 0xc2, 0x04, 0x90, 0x01, 0xc0, 0xf0, 0xa3, 0xf0, 0xc2, 0xaf, 0xc2, 0xa8, 0x12} },
! { 0x05dd,	16,	{0x0c, 0x22, 0xe4, 0x90, 0x02, 0xaf, 0xf0, 0x90, 0x01, 0x00, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
  { 0x05ed,	16,	{0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0x7e} },
! { 0x05fd,	16,	{0x01, 0x7f, 0x00, 0x12, 0x19, 0xc1, 0x75, 0x4a, 0x12, 0x75, 0x4b, 0x0a, 0x90, 0x01, 0x0b, 0xe0} },
! { 0x060d,	16,	{0xff, 0x05, 0x4b, 0xe5, 0x4b, 0xac, 0x4a, 0x70, 0x02, 0x05, 0x4a, 0x14, 0xf5, 0x82, 0x8c, 0x83} },
! { 0x061d,	16,	{0xef, 0xf0, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x80, 0xff, 0x05, 0x4b, 0xe5, 0x4b, 0xac, 0x4a, 0x70} },
! { 0x062d,	16,	{0x02, 0x05, 0x4a, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0d, 0xe0, 0xff, 0x05} },
! { 0x063d,	16,	{0x4b, 0xe5, 0x4b, 0xac, 0x4a, 0x70, 0x02, 0x05, 0x4a, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
! { 0x064d,	16,	{0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4b, 0xe5, 0x4b, 0xac, 0x4a, 0x70, 0x02, 0x05, 0x4a, 0x14} },
  { 0x065d,	16,	{0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x12, 0x0a, 0xe4, 0x93, 0xff, 0x74, 0x01, 0x93, 0x90} },
  { 0x066d,	16,	{0x01, 0x1c, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0xff, 0xa3, 0xe0, 0xfe, 0xef} },
  { 0x067d,	16,	{0x6e, 0xff, 0x90, 0x01, 0x1c, 0xf0, 0xa3, 0xe0, 0x6f, 0xff, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0x6f} },
! { 0x068d,	16,	{0xf0, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xe4, 0xfc, 0xfd, 0x75, 0x50, 0x10, 0x75, 0x51, 0x02, 0x75} },
! { 0x069d,	16,	{0x52, 0x12, 0x75, 0x53, 0xac, 0x12, 0x92, 0x2a, 0x75, 0x4a, 0x12, 0x75, 0x4b, 0xb2, 0x90, 0x01} },
! { 0x06ad,	16,	{0x0d, 0xe0, 0xff, 0x05, 0x4b, 0xe5, 0x4b, 0xac, 0x4a, 0x70, 0x02, 0x05, 0x4a, 0x14, 0xf5, 0x82} },
! { 0x06bd,	16,	{0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4b, 0xe5, 0x4b, 0xac, 0x4a, 0x70} },
! { 0x06cd,	16,	{0x02, 0x05, 0x4a, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4} },
! { 0x06dd,	16,	{0x54, 0x0f, 0x24, 0x41, 0xff, 0x05, 0x4b, 0xe5, 0x4b, 0xac, 0x4a, 0x70, 0x02, 0x05, 0x4a, 0x14} },
! { 0x06ed,	16,	{0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x05, 0x4b, 0xe5, 0x4b, 0xae, 0x4a, 0x70, 0x02, 0x05, 0x4a} },
  { 0x06fd,	16,	{0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x75, 0x82, 0x10, 0x75, 0x83, 0x01, 0xe0, 0xfc, 0xa3} },
! { 0x070d,	16,	{0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x01, 0x18, 0x12, 0xa1, 0xf2, 0x7e, 0x01} },
! { 0x071d,	16,	{0x7f, 0x18, 0x12, 0x85, 0xcf, 0x90, 0x01, 0x18, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
! { 0x072d,	16,	{0xa3, 0xe0, 0xff, 0x75, 0x50, 0x0a, 0x75, 0x51, 0x06, 0x75, 0x52, 0x12, 0x75, 0x53, 0xb8, 0x12} },
! { 0x073d,	16,	{0x92, 0x2a, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x53, 0x91, 0xef} },
  { 0x074d,	16,	{0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x1f, 0xf0, 0xd2, 0xaf} },
! { 0x075d,	16,	{0x20, 0x01, 0x2e, 0x20, 0x01, 0x2b, 0xa2, 0x03, 0x92, 0x07, 0x12, 0x09, 0xc1, 0x75, 0x44, 0x50} },
! { 0x076d,	16,	{0x75, 0x43, 0x6d, 0x75, 0x42, 0x33, 0x75, 0x41, 0x00, 0x20, 0x01, 0xe4, 0x7f, 0xff, 0x7e, 0xff} },
! { 0x077d,	16,	{0x7d, 0xff, 0x7c, 0xff, 0x78, 0x41, 0x12, 0xa1, 0xdb, 0xec, 0x4d, 0x4e, 0x4f, 0x60, 0xd1, 0x80} },
! { 0x078d,	16,	{0xe8, 0x30, 0x01, 0x05, 0x12, 0x03, 0x70, 0xc2, 0x01, 0x30, 0x06, 0x0a, 0x12, 0x09, 0xf7, 0x50} },
! { 0x079d,	16,	{0x03, 0x12, 0x0a, 0xe8, 0xc2, 0x06, 0x12, 0x94, 0x62, 0x90, 0x01, 0xbd, 0xe0, 0x60, 0x0c, 0x12} },
! { 0x07ad,	16,	{0x90, 0x05, 0xe4, 0x90, 0x01, 0xbd, 0xf0, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x02, 0xaf, 0xe0, 0xb4} },
! { 0x07bd,	16,	{0x0f, 0x03, 0x12, 0x97, 0xbd, 0x12, 0x9e, 0x99, 0xe4, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80} },
! { 0x07cd,	16,	{0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x90, 0x01, 0xbc, 0xe0, 0x5e, 0x60, 0x14, 0x74, 0x27, 0x2f} },
! { 0x07dd,	16,	{0xf8, 0xe6, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00, 0x8e, 0x49, 0x80} },
! { 0x07ed,	16,	{0x03, 0x75, 0x49, 0x01, 0x74, 0x68, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe5, 0x49} },
! { 0x07fd,	16,	{0xf0, 0x0f, 0xbf, 0x04, 0xc5, 0xe5, 0x2b, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7f, 0x01, 0x80, 0x02} },
! { 0x080d,	10,	{0x7f, 0x00, 0x90, 0x20, 0x6c, 0xef, 0xf0, 0x02, 0x07, 0x8e} },
! { 0x0817,	1,	{0x22} },
! { 0x0818,	4,	{0x53, 0xd8, 0xef, 0x32} },
! { 0x081c,	16,	{0xe5, 0x30, 0xc3, 0x94, 0x01, 0x40, 0x0e, 0x90, 0x7f, 0x93, 0xe0, 0x44, 0x30, 0xf0, 0x90, 0x7f} },
! { 0x082c,	16,	{0x95, 0xe0, 0x44, 0xc0, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x09, 0xaa, 0x90, 0x7f, 0x96, 0xe0} },
! { 0x083c,	16,	{0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x08} },
! { 0x084c,	16,	{0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xfb, 0xf0, 0x7f} },
! { 0x085c,	16,	{0x05, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0xe5, 0x30, 0xc3, 0x94, 0x01, 0x50, 0x0e, 0x7f, 0x02, 0x7d} },
! { 0x086c,	16,	{0xff, 0x12, 0x82, 0xa8, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x90, 0x7f, 0x96, 0xe0, 0x44} },
! { 0x087c,	16,	{0x02, 0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x90, 0x7f, 0x96} },
! { 0x088c,	16,	{0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x90, 0x7f, 0x96, 0xe0, 0x54} },
! { 0x089c,	16,	{0xbf, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0} },
! { 0x08ac,	8,	{0x7f, 0x32, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x22} },
! { 0x08b4,	16,	{0x90, 0x7f, 0x96, 0xe0, 0x54, 0xfd, 0xf0, 0xe0, 0x44, 0x80, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12} },
! { 0x08c4,	16,	{0x09, 0xaa, 0xe5, 0x30, 0xc3, 0x94, 0x01, 0x50, 0x0e, 0x7f, 0x02, 0xe4, 0xfd, 0x12, 0x82, 0xa8} },
! { 0x08d4,	16,	{0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x05} },
! { 0x08e4,	16,	{0x7e, 0x00, 0x12, 0x09, 0xaa, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x04, 0xf0, 0x7f, 0x05, 0x7e, 0x00} },
! { 0x08f4,	16,	{0x12, 0x09, 0xaa, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xf7, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09} },
! { 0x0904,	16,	{0xaa, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0xe5} },
! { 0x0914,	16,	{0x30, 0xc3, 0x94, 0x01, 0x40, 0x0e, 0x90, 0x7f, 0x93, 0xe0, 0x54, 0xcf, 0xf0, 0x90, 0x7f, 0x95} },
! { 0x0924,	8,	{0xe0, 0x54, 0x3f, 0xf0, 0x12, 0x0b, 0x00, 0x22} },
! { 0x092c,	16,	{0x90, 0x0a, 0xf0, 0xe4, 0x93, 0x70, 0x76, 0x90, 0x7f, 0x93, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x94} },
! { 0x093c,	16,	{0x74, 0x3c, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc6, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x09, 0xaa} },
! { 0x094c,	16,	{0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x90, 0x7f, 0x96, 0x74, 0x08, 0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf} },
! { 0x095c,	16,	{0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x90, 0x20, 0x70, 0xe0, 0xff, 0xc4, 0x54, 0x0f} },
! { 0x096c,	16,	{0xf5, 0x30, 0xc3, 0x94, 0x01, 0x50, 0x07, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x80, 0xf0, 0xe4, 0x90} },
! { 0x097c,	16,	{0x7f, 0x97, 0xf0, 0x90, 0x7f, 0x9d, 0x74, 0x02, 0xf0, 0xe5, 0x30, 0xc3, 0x94, 0x01, 0x40, 0x0b} },
! { 0x098c,	16,	{0xe4, 0x90, 0x7f, 0x98, 0xf0, 0x90, 0x7f, 0x9e, 0x74, 0xc0, 0xf0, 0x90, 0x7f, 0xe2, 0x74, 0x12} },
! { 0x099c,	14,	{0xf0, 0x12, 0x08, 0x1c, 0x75, 0x82, 0xf0, 0x75, 0x83, 0x0a, 0x74, 0xff, 0xf0, 0x22} },
! { 0x09aa,	16,	{0x8e, 0x5b, 0x8f, 0x5c, 0xe5, 0x5c, 0x15, 0x5c, 0xae, 0x5b, 0x70, 0x02, 0x15, 0x5b, 0x4e, 0x60} },
! { 0x09ba,	7,	{0x05, 0x12, 0x09, 0xe6, 0x80, 0xee, 0x22} },
! { 0x09c1,	16,	{0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x07, 0x04, 0xe0, 0x44} },
! { 0x09d1,	16,	{0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x09, 0xaa, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
! { 0x09e1,	5,	{0xe0, 0x44, 0x04, 0xf0, 0x22} },
! { 0x09e6,	16,	{0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
! { 0x09f6,	1,	{0x22} },
! { 0x09f7,	5,	{0x12, 0x08, 0xb4, 0xd3, 0x22} },
! { 0x09fc,	1,	{0x32} },
! { 0x09fd,	1,	{0x32} },
! { 0x09fe,	1,	{0x32} },
  { 0x09ff,	1,	{0x32} },
! { 0x0a00,	16,	{0x02, 0x0c, 0x4e, 0x00, 0x02, 0x0c, 0x81, 0x00, 0x02, 0x0c, 0x66, 0x00, 0x02, 0x0c, 0xc0, 0x00} },
! { 0x0a10,	16,	{0x02, 0x0c, 0xaa, 0x00, 0x02, 0x09, 0xfc, 0x00, 0x02, 0x09, 0xfd, 0x00, 0x02, 0x09, 0xfe, 0x00} },
! { 0x0a20,	16,	{0x02, 0x0c, 0xdb, 0x00, 0x02, 0x0d, 0xcb, 0x00, 0x02, 0x0d, 0x17, 0x00, 0x02, 0x0e, 0x1f, 0x00} },
! { 0x0a30,	16,	{0x02, 0x0d, 0x53, 0x00, 0x02, 0x0e, 0x73, 0x00, 0x02, 0x0d, 0x8f, 0x00, 0x02, 0x0e, 0xc7, 0x00} },
! { 0x0a40,	16,	{0x02, 0x09, 0xff, 0x00, 0x02, 0x0a, 0xee, 0x00, 0x02, 0x0a, 0xed, 0x00, 0x02, 0x0a, 0xef, 0x00} },
! { 0x0a50,	8,	{0x02, 0x0f, 0x1b, 0x00, 0x02, 0x0f, 0x31, 0x00} },
! { 0x0a58,	2,	{0x8f, 0x4d} },
! { 0x0a5a,	16,	{0xe4, 0xf5, 0x4e, 0x75, 0x4f, 0xff, 0x75, 0x50, 0x12, 0x75, 0x51, 0x6a, 0xab, 0x4f, 0xaa, 0x50} },
! { 0x0a6a,	16,	{0xa9, 0x51, 0x90, 0x00, 0x01, 0x12, 0xa0, 0x58, 0xb4, 0x03, 0x1d, 0xaf, 0x4e, 0x05, 0x4e, 0xef} },
! { 0x0a7a,	16,	{0xb5, 0x4d, 0x01, 0x22, 0x12, 0xa0, 0x3f, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
! { 0x0a8a,	14,	{0x4f, 0xff, 0xf5, 0x50, 0x89, 0x51, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
! { 0x0a98,	1,	{0x22} },
! { 0x0a99,	16,	{0xe4, 0xfe, 0x75, 0x4f, 0xff, 0x75, 0x50, 0x12, 0x75, 0x51, 0x12, 0xab, 0x4f, 0xaa, 0x50, 0xa9} },
! { 0x0aa9,	16,	{0x51, 0x90, 0x00, 0x01, 0x12, 0xa0, 0x58, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
! { 0x0ab9,	16,	{0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0xa0, 0xb1, 0x85, 0xf0, 0x4d, 0xf5, 0x4e, 0x62, 0x4d} },
! { 0x0ac9,	16,	{0xe5, 0x4d, 0x62, 0x4e, 0xe5, 0x4e, 0x62, 0x4d, 0x29, 0xfd, 0xe5, 0x4d, 0x3a, 0xa9, 0x05, 0x75} },
! { 0x0ad9,	14,	{0x4f, 0xff, 0xf5, 0x50, 0x89, 0x51, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
! { 0x0ae7,	1,	{0x22} },
! { 0x0ae8,	5,	{0x12, 0x08, 0x1c, 0xd3, 0x22} },
! { 0x0aed,	1,	{0x32} },
! { 0x0aee,	1,	{0x32} },
! { 0x0aef,	1,	{0x32} },
! { 0x0af0,	3,	{0x00, 0x04, 0x00} },
  { 0x0b00,	9,	{0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
  { 0x0b7d,	16,	{0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
! { 0x0b8d,	16,	{0x53, 0x8e, 0xf7, 0xe5, 0x89, 0x54, 0xf1, 0x44, 0x01, 0xf5, 0x89, 0x75, 0x8c, 0xb1, 0xd2, 0xa9} },
! { 0x0b9d,	16,	{0x75, 0x98, 0x40, 0x75, 0xcb, 0xff, 0x75, 0xca, 0xf3, 0x75, 0xc8, 0x34, 0xe4, 0xff, 0x7f, 0x05} },
! { 0x0bad,	7,	{0x78, 0x27, 0xe4, 0xf6, 0x08, 0xdf, 0xfc} },
! { 0x0bb4,	1,	{0x22} },
! { 0x0bb5,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0, 0x06, 0xc0} },
! { 0x0bc5,	1,	{0x07} },
! { 0x0bc6,	16,	{0x30, 0x04, 0x16, 0x75, 0x8c, 0xf8, 0x75, 0x8a, 0x30, 0x7f, 0x2f, 0xae, 0x07, 0x1f, 0xee, 0x60} },
! { 0x0bd6,	16,	{0x3c, 0x90, 0x20, 0x00, 0x74, 0x55, 0xf0, 0x80, 0xf2, 0x75, 0x8c, 0xb1, 0x7f, 0x27, 0xef, 0xd3} },
! { 0x0be6,	16,	{0x94, 0x2b, 0x50, 0x09, 0xa8, 0x07, 0xe6, 0x60, 0x01, 0x16, 0x0f, 0x80, 0xf1, 0x90, 0x03, 0x00} },
! { 0x0bf6,	16,	{0xe0, 0x60, 0x02, 0x14, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x0e, 0x90} },
! { 0x0c06,	13,	{0x01, 0xc1, 0xe0, 0x24, 0xff, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x34, 0xff, 0xf0} },
! { 0x0c13,	15,	{0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0c22,	16,	{0xd2, 0x00, 0x75, 0x8e, 0x10, 0x12, 0x09, 0x2c, 0xe5, 0x30, 0xc3, 0x94, 0x01, 0x40, 0x08, 0x90} },
! { 0x0c32,	16,	{0x7f, 0x92, 0x74, 0x02, 0xf0, 0x80, 0x05, 0xe4, 0x90, 0x7f, 0x92, 0xf0, 0x12, 0x80, 0x00, 0x12} },
! { 0x0c42,	12,	{0x0f, 0x4d, 0x12, 0x92, 0xfb, 0x12, 0x1b, 0x0c, 0x12, 0x0b, 0x8d, 0x22} },
! { 0x0c4e,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
! { 0x0c5e,	8,	{0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0c66,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0c76,	11,	{0xab, 0x74, 0x04, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0c81,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0x90} },
! { 0x0c91,	16,	{0x7f, 0xd8, 0xe0, 0x70, 0x0d, 0x90, 0x7f, 0xd9, 0xe0, 0x70, 0x07, 0xe5, 0x2b, 0x70, 0x03, 0x75} },
! { 0x0ca1,	9,	{0x2b, 0x14, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0caa,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x10, 0xf0, 0xd0} },
! { 0x0cba,	6,	{0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0cc0,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x30, 0x02, 0x02, 0xd2, 0x06, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0cd0,	11,	{0xab, 0x74, 0x08, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0cdb,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0ceb,	16,	{0xa9, 0x74, 0x02, 0xf0, 0xe5, 0x31, 0x30, 0xe0, 0x13, 0xe5, 0x3c, 0x30, 0xe0, 0x07, 0x90, 0x20} },
! { 0x0cfb,	16,	{0x04, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03} },
! { 0x0d0b,	12,	{0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0d17,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0d27,	16,	{0xa9, 0x74, 0x04, 0xf0, 0xe5, 0x31, 0x30, 0xe1, 0x13, 0xe5, 0x3c, 0x30, 0xe1, 0x07, 0x90, 0x20} },
! { 0x0d37,	16,	{0x0c, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03} },
! { 0x0d47,	12,	{0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0d53,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0d63,	16,	{0xa9, 0x74, 0x08, 0xf0, 0xe5, 0x31, 0x30, 0xe2, 0x13, 0xe5, 0x3c, 0x30, 0xe2, 0x07, 0x90, 0x20} },
! { 0x0d73,	16,	{0x14, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03} },
! { 0x0d83,	12,	{0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0d8f,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0d9f,	16,	{0xa9, 0x74, 0x10, 0xf0, 0xe5, 0x31, 0x30, 0xe3, 0x13, 0xe5, 0x3c, 0x30, 0xe3, 0x07, 0x90, 0x20} },
! { 0x0daf,	16,	{0x1c, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03} },
! { 0x0dbf,	12,	{0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0dcb,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
! { 0x0ddb,	16,	{0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x02, 0xf0, 0xe5, 0x31, 0x20} },
! { 0x0deb,	16,	{0xe0, 0x06, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x16, 0xe5, 0x3c, 0x30, 0xe0, 0x0a, 0x90, 0x7f, 0xc7} },
! { 0x0dfb,	16,	{0xe0, 0x90, 0x02, 0xf8, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
! { 0x0e0b,	16,	{0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
! { 0x0e1b,	4,	{0x83, 0xd0, 0xe0, 0x32} },
! { 0x0e1f,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
! { 0x0e2f,	16,	{0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x04, 0xf0, 0xe5, 0x31, 0x20} },
! { 0x0e3f,	16,	{0xe1, 0x06, 0x90, 0x7f, 0xc9, 0xf0, 0x80, 0x16, 0xe5, 0x3c, 0x30, 0xe1, 0x0a, 0x90, 0x7f, 0xc9} },
! { 0x0e4f,	16,	{0xe0, 0x90, 0x02, 0xf9, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
! { 0x0e5f,	16,	{0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
! { 0x0e6f,	4,	{0x83, 0xd0, 0xe0, 0x32} },
! { 0x0e73,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
! { 0x0e83,	16,	{0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x08, 0xf0, 0xe5, 0x31, 0x20} },
! { 0x0e93,	16,	{0xe2, 0x06, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x16, 0xe5, 0x3c, 0x30, 0xe2, 0x0a, 0x90, 0x7f, 0xcb} },
! { 0x0ea3,	16,	{0xe0, 0x90, 0x02, 0xfa, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
! { 0x0eb3,	16,	{0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
! { 0x0ec3,	4,	{0x83, 0xd0, 0xe0, 0x32} },
! { 0x0ec7,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
! { 0x0ed7,	16,	{0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x10, 0xf0, 0xe5, 0x31, 0x20} },
! { 0x0ee7,	16,	{0xe3, 0x06, 0x90, 0x7f, 0xcd, 0xf0, 0x80, 0x16, 0xe5, 0x3c, 0x30, 0xe3, 0x0a, 0x90, 0x7f, 0xcd} },
! { 0x0ef7,	16,	{0xe0, 0x90, 0x02, 0xfb, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
! { 0x0f07,	16,	{0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
! { 0x0f17,	4,	{0x83, 0xd0, 0xe0, 0x32} },
! { 0x0f1b,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x80, 0xf0, 0xd0} },
! { 0x0f2b,	6,	{0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0f31,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x80, 0xf0, 0x90} },
! { 0x0f41,	12,	{0x01, 0xbd, 0x74, 0xff, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0f4d,	16,	{0x90, 0x01, 0x20, 0x12, 0xa1, 0xfe, 0x00, 0x00, 0x25, 0x80, 0x90, 0x01, 0x24, 0x74, 0x08, 0xf0} },
! { 0x0f5d,	16,	{0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x6e, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x13, 0xf0, 0xa3, 0x74} },
! { 0x0f6d,	16,	{0x11, 0xf0, 0xe4, 0xa3, 0xf0, 0xa3, 0xf0, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
! { 0x0f7d,	16,	{0x04, 0xa3, 0xf0, 0xef, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35, 0xf0, 0xa8} },
! { 0x0f8d,	16,	{0x01, 0xfc, 0x7d, 0x01, 0x7b, 0x01, 0x7a, 0x01, 0x79, 0x1f, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0xa0} },
! { 0x0f9d,	16,	{0x16, 0x7e, 0x01, 0x7f, 0x1f, 0x12, 0x86, 0xb7, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0xe0, 0xc3} },
! { 0x0fad,	16,	{0x94, 0x04, 0x40, 0xc7, 0xe4, 0xf5, 0x26, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
! { 0x0fbd,	16,	{0xc3, 0x94, 0x04, 0x50, 0x1a, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4} },
! { 0x0fcd,	16,	{0xf0, 0x74, 0x22, 0x2f, 0xf8, 0xe4, 0xf6, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xdc, 0xe4} },
! { 0x0fdd,	16,	{0xf5, 0x31, 0xe5, 0xc0, 0x60, 0x2f, 0x90, 0x01, 0x1e, 0x74, 0x01, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
! { 0x0fed,	16,	{0xff, 0xd3, 0x94, 0x04, 0x50, 0x1f, 0xef, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02} },
! { 0x0ffd,	16,	{0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x31, 0x7e, 0x01, 0x7f, 0x1e, 0x12, 0x84, 0x08, 0x90, 0x01, 0x1e} },
! { 0x100d,	16,	{0xe0, 0x04, 0xf0, 0x80, 0xd7, 0xe4, 0xf5, 0x3b, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
! { 0x101d,	16,	{0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x54} },
! { 0x102d,	16,	{0xf0, 0xfe, 0x74, 0xc5, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xee, 0xf0, 0x74, 0x37} },
! { 0x103d,	16,	{0x2f, 0xf8, 0xa6, 0x06, 0x74, 0x33, 0x2f, 0xf8, 0xe4, 0xf6, 0x74, 0x2c, 0x2f, 0xf8, 0xe4, 0xf6} },
! { 0x104d,	16,	{0x74, 0xfc, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
! { 0x105d,	16,	{0x04, 0xf0, 0xe0, 0xb4, 0x04, 0xb6, 0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xf5, 0x4c, 0x60, 0x5e} },
! { 0x106d,	4,	{0xe4, 0x90, 0x01, 0x1e} },
! { 0x1071,	16,	{0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94, 0x04, 0x50, 0xe7, 0x74, 0x01, 0xa8, 0x07, 0x08} },
! { 0x1081,	16,	{0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x55, 0x4c, 0x60, 0x38, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0x75} },
! { 0x1091,	16,	{0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0x75} },
! { 0x10a1,	16,	{0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xef, 0x75, 0xf0} },
! { 0x10b1,	16,	{0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe, 0x7d, 0x06, 0x12} },
! { 0x10c1,	11,	{0x83, 0x7e, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xa7, 0x22} },
! { 0x10cc,	4,	{0x8e, 0x57, 0x8f, 0x58} },
! { 0x10d0,	16,	{0x75, 0x59, 0x03, 0xe5, 0x58, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0xfe} },
! { 0x10e0,	16,	{0xa3, 0xe0, 0x4e, 0x70, 0x03, 0x02, 0x11, 0xda, 0xe5, 0x59, 0x60, 0x4e, 0x14, 0x60, 0x38, 0x14} },
! { 0x10f0,	16,	{0x60, 0x20, 0x14, 0x60, 0x03, 0x02, 0x11, 0x7e, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0x85} },
! { 0x1100,	16,	{0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6, 0xf0} },
! { 0x1110,	16,	{0x80, 0x6c, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x09, 0xa3, 0xa3} },
! { 0x1120,	16,	{0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x57, 0x15, 0x59, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3} },
! { 0x1130,	16,	{0xa3, 0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x44, 0xe5, 0x58, 0x24, 0x06, 0xf5, 0x82} },
! { 0x1140,	16,	{0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa0, 0x9b, 0x85, 0xf0, 0x82, 0xf5} },
! { 0x1150,	16,	{0x83, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe5, 0x58, 0x24} },
! { 0x1160,	16,	{0x04, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12, 0xa0, 0x85, 0x85} },
! { 0x1170,	16,	{0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xa3, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa0, 0x85, 0x90, 0x7f} },
! { 0x1180,	16,	{0xa5, 0xe0, 0xf5, 0x5a, 0x30, 0xe0, 0xf7, 0x30, 0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06} },
! { 0x1190,	16,	{0x22, 0xe5, 0x5a, 0x20, 0xe1, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22} },
! { 0x11a0,	16,	{0xe5, 0x59, 0x70, 0x31, 0x7f, 0x01, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
! { 0x11b0,	16,	{0x80, 0xf0, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90} },
! { 0x11c0,	16,	{0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x5a, 0x30, 0xe0, 0xf7, 0x30, 0xe1, 0xd5, 0x75} },
! { 0x11d0,	12,	{0x59, 0x03, 0x02, 0x10, 0xd3, 0x15, 0x59, 0x02, 0x10, 0xd3, 0x7f, 0x08} },
! { 0x11dc,	1,	{0x22} },
! { 0x11dd,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc2, 0xa9, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xd2, 0xa9} },
! { 0x11ed,	15,	{0x53, 0x91, 0x7f, 0x90, 0x01, 0xc4, 0xe4, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
  { 0x1200,	16,	{0x12, 0x01, 0x00, 0x01, 0xff, 0xff, 0xff, 0x40, 0x10, 0x07, 0x01, 0x80, 0x42, 0x00, 0x01, 0x02} },
  { 0x1210,	16,	{0x03, 0x01, 0x09, 0x02, 0x58, 0x00, 0x01, 0x01, 0x04, 0x80, 0x3c, 0x09, 0x04, 0x00, 0x00, 0x0a} },
  { 0x1220,	16,	{0xff, 0xff, 0xff, 0x05, 0x07, 0x05, 0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40} },
--- 90,318 ----
  { 0x0590,	16,	{0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f} },
  { 0x05a0,	12,	{0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} },
  { 0x05ac,	1,	{0x22} },
! { 0x05ad,	16,	{0x75, 0x47, 0xff, 0x75, 0x46, 0xff, 0x75, 0x45, 0x0f, 0x75, 0x44, 0x00, 0xd2, 0x03, 0xc2, 0x06} },
  { 0x05bd,	16,	{0xc2, 0x02, 0xc2, 0x00, 0xc2, 0x05, 0xc2, 0x01, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xe4, 0x90} },
  { 0x05cd,	16,	{0x01, 0xbc, 0xf0, 0xc2, 0x04, 0x90, 0x01, 0xc0, 0xf0, 0xa3, 0xf0, 0xc2, 0xaf, 0xc2, 0xa8, 0x12} },
! { 0x05dd,	16,	{0x0b, 0x8d, 0xe4, 0x90, 0x02, 0xaf, 0xf0, 0x90, 0x01, 0x00, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
  { 0x05ed,	16,	{0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0x7e} },
! { 0x05fd,	16,	{0x01, 0x7f, 0x00, 0x12, 0x10, 0x2c, 0x75, 0x49, 0x12, 0x75, 0x4a, 0x0a, 0x90, 0x01, 0x0b, 0xe0} },
! { 0x060d,	16,	{0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83} },
! { 0x061d,	16,	{0xef, 0xf0, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x80, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70} },
! { 0x062d,	16,	{0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0d, 0xe0, 0xff, 0x05} },
! { 0x063d,	16,	{0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
! { 0x064d,	16,	{0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14} },
  { 0x065d,	16,	{0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x12, 0x0a, 0xe4, 0x93, 0xff, 0x74, 0x01, 0x93, 0x90} },
  { 0x066d,	16,	{0x01, 0x1c, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0xff, 0xa3, 0xe0, 0xfe, 0xef} },
  { 0x067d,	16,	{0x6e, 0xff, 0x90, 0x01, 0x1c, 0xf0, 0xa3, 0xe0, 0x6f, 0xff, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0x6f} },
! { 0x068d,	16,	{0xf0, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xe4, 0xfc, 0xfd, 0x75, 0x4f, 0x10, 0x75, 0x50, 0x02, 0x75} },
! { 0x069d,	16,	{0x51, 0x12, 0x75, 0x52, 0xac, 0x12, 0x91, 0x7a, 0x75, 0x49, 0x12, 0x75, 0x4a, 0xb2, 0x90, 0x01} },
! { 0x06ad,	16,	{0x0d, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82} },
! { 0x06bd,	16,	{0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70} },
! { 0x06cd,	16,	{0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4} },
! { 0x06dd,	16,	{0x54, 0x0f, 0x24, 0x41, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14} },
! { 0x06ed,	16,	{0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x05, 0x4a, 0xe5, 0x4a, 0xae, 0x49, 0x70, 0x02, 0x05, 0x49} },
  { 0x06fd,	16,	{0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x75, 0x82, 0x10, 0x75, 0x83, 0x01, 0xe0, 0xfc, 0xa3} },
! { 0x070d,	16,	{0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x01, 0x18, 0x12, 0xa0, 0xfb, 0x7e, 0x01} },
! { 0x071d,	16,	{0x7f, 0x18, 0x12, 0x85, 0x2f, 0x90, 0x01, 0x18, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
! { 0x072d,	16,	{0xa3, 0xe0, 0xff, 0x75, 0x4f, 0x0a, 0x75, 0x50, 0x06, 0x75, 0x51, 0x12, 0x75, 0x52, 0xb8, 0x12} },
! { 0x073d,	16,	{0x91, 0x7a, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x53, 0x91, 0xef} },
  { 0x074d,	16,	{0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x1f, 0xf0, 0xd2, 0xaf} },
! { 0x075d,	16,	{0x20, 0x01, 0x2e, 0x20, 0x01, 0x2b, 0xa2, 0x03, 0x92, 0x07, 0x12, 0x09, 0xd0, 0x75, 0x43, 0x50} },
! { 0x076d,	16,	{0x75, 0x42, 0x6d, 0x75, 0x41, 0x33, 0x75, 0x40, 0x00, 0x20, 0x01, 0xe4, 0x7f, 0xff, 0x7e, 0xff} },
! { 0x077d,	16,	{0x7d, 0xff, 0x7c, 0xff, 0x78, 0x40, 0x12, 0xa0, 0xe4, 0xec, 0x4d, 0x4e, 0x4f, 0x60, 0xd1, 0x80} },
! { 0x078d,	16,	{0xe8, 0x30, 0x01, 0x05, 0x12, 0x03, 0x70, 0xc2, 0x01, 0x30, 0x06, 0x0d, 0x12, 0x09, 0xf5, 0x50} },
! { 0x079d,	16,	{0x06, 0x12, 0x0b, 0x00, 0x12, 0x09, 0xfa, 0xc2, 0x06, 0x12, 0x93, 0x98, 0x90, 0x01, 0xbd, 0xe0} },
! { 0x07ad,	16,	{0x60, 0x0c, 0x12, 0x8f, 0x55, 0xe4, 0x90, 0x01, 0xbd, 0xf0, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x02} },
! { 0x07bd,	16,	{0xaf, 0xe0, 0xb4, 0x0f, 0x03, 0x12, 0x96, 0xe2, 0x12, 0x9d, 0xa2, 0xe4, 0xff, 0x74, 0x01, 0xa8} },
! { 0x07cd,	16,	{0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x90, 0x01, 0xbc, 0xe0, 0x5e, 0x60, 0x14} },
! { 0x07dd,	16,	{0x74, 0x27, 0x2f, 0xf8, 0xe6, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00} },
! { 0x07ed,	16,	{0x8e, 0x48, 0x80, 0x03, 0x75, 0x48, 0x01, 0x74, 0x68, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5} },
! { 0x07fd,	16,	{0x83, 0xe5, 0x48, 0xf0, 0x0f, 0xbf, 0x04, 0xc5, 0xe5, 0x2b, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7f} },
! { 0x080d,	13,	{0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x20, 0x6c, 0xef, 0xf0, 0x02, 0x07, 0x8e} },
! { 0x081a,	1,	{0x22} },
! { 0x081b,	4,	{0x53, 0xd8, 0xef, 0x32} },
! { 0x081f,	16,	{0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0x74, 0x89} },
! { 0x082f,	16,	{0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x09, 0x29, 0x90, 0x7f} },
! { 0x083f,	16,	{0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x7f, 0x02, 0x7d, 0xff} },
! { 0x084f,	16,	{0x12, 0x11, 0x77, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02} },
! { 0x085f,	16,	{0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0} },
! { 0x086f,	16,	{0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf} },
! { 0x087f,	16,	{0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f} },
! { 0x088f,	7,	{0x32, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x22} },
! { 0x0896,	16,	{0x90, 0x7f, 0x96, 0xe0, 0x54, 0xfd, 0xf0, 0xe0, 0x44, 0x80, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12} },
! { 0x08a6,	16,	{0x09, 0x29, 0x7f, 0x02, 0xe4, 0xfd, 0x12, 0x11, 0x77, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29} },
! { 0x08b6,	16,	{0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f} },
! { 0x08c6,	16,	{0x96, 0xe0, 0x44, 0x04, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0} },
! { 0x08d6,	16,	{0x54, 0xf7, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x01} },
! { 0x08e6,	12,	{0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x12, 0x0b, 0x00, 0x22} },
! { 0x08f2,	16,	{0x90, 0x95, 0xbe, 0xe4, 0x93, 0x70, 0x2f, 0x90, 0x7f, 0x93, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x94} },
! { 0x0902,	16,	{0x74, 0x3c, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc6, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90, 0x7f} },
! { 0x0912,	16,	{0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0xe2, 0x74, 0x12, 0xf0, 0x12, 0x08, 0x1f, 0x75, 0x82, 0xbe} },
! { 0x0922,	7,	{0x75, 0x83, 0x95, 0x74, 0xff, 0xf0, 0x22} },
! { 0x0929,	16,	{0x8e, 0x58, 0x8f, 0x59, 0xe5, 0x59, 0x15, 0x59, 0xae, 0x58, 0x70, 0x02, 0x15, 0x58, 0x4e, 0x60} },
! { 0x0939,	7,	{0x05, 0x12, 0x0a, 0x58, 0x80, 0xee, 0x22} },
! { 0x0940,	2,	{0x8f, 0x4c} },
! { 0x0942,	16,	{0xe4, 0xf5, 0x4d, 0x75, 0x4e, 0xff, 0x75, 0x4f, 0x12, 0x75, 0x50, 0x6a, 0xab, 0x4e, 0xaa, 0x4f} },
! { 0x0952,	16,	{0xa9, 0x50, 0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0xb4, 0x03, 0x1d, 0xaf, 0x4d, 0x05, 0x4d, 0xef} },
! { 0x0962,	16,	{0xb5, 0x4c, 0x01, 0x22, 0x12, 0x9f, 0x48, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
! { 0x0972,	14,	{0x4e, 0xff, 0xf5, 0x4f, 0x89, 0x50, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
! { 0x0980,	1,	{0x22} },
! { 0x0981,	16,	{0xe4, 0xfe, 0x75, 0x4e, 0xff, 0x75, 0x4f, 0x12, 0x75, 0x50, 0x12, 0xab, 0x4e, 0xaa, 0x4f, 0xa9} },
! { 0x0991,	16,	{0x50, 0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
! { 0x09a1,	16,	{0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x9f, 0xba, 0x85, 0xf0, 0x4c, 0xf5, 0x4d, 0x62, 0x4c} },
! { 0x09b1,	16,	{0xe5, 0x4c, 0x62, 0x4d, 0xe5, 0x4d, 0x62, 0x4c, 0x29, 0xfd, 0xe5, 0x4c, 0x3a, 0xa9, 0x05, 0x75} },
! { 0x09c1,	14,	{0x4e, 0xff, 0xf5, 0x4f, 0x89, 0x50, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
! { 0x09cf,	1,	{0x22} },
! { 0x09d0,	16,	{0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x07, 0x04, 0xe0, 0x44} },
! { 0x09e0,	16,	{0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x09, 0x29, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
! { 0x09f0,	5,	{0xe0, 0x44, 0x04, 0xf0, 0x22} },
! { 0x09f5,	5,	{0x12, 0x08, 0x96, 0xd3, 0x22} },
! { 0x09fa,	5,	{0x12, 0x08, 0x1f, 0xd3, 0x22} },
  { 0x09ff,	1,	{0x32} },
! { 0x0a00,	16,	{0x02, 0x0b, 0xaa, 0x00, 0x02, 0x0b, 0xdd, 0x00, 0x02, 0x0b, 0xc2, 0x00, 0x02, 0x0c, 0x1c, 0x00} },
! { 0x0a10,	16,	{0x02, 0x0c, 0x06, 0x00, 0x02, 0x09, 0xff, 0x00, 0x02, 0x0a, 0xfe, 0x00, 0x02, 0x0a, 0xff, 0x00} },
! { 0x0a20,	16,	{0x02, 0x0c, 0x37, 0x00, 0x02, 0x0d, 0x29, 0x00, 0x02, 0x0c, 0x73, 0x00, 0x02, 0x0d, 0x7d, 0x00} },
! { 0x0a30,	16,	{0x02, 0x0c, 0xaf, 0x00, 0x02, 0x0d, 0xd1, 0x00, 0x02, 0x0c, 0xeb, 0x00, 0x02, 0x0e, 0x25, 0x00} },
! { 0x0a40,	16,	{0x02, 0x0d, 0x27, 0x00, 0x02, 0x0e, 0x79, 0x00, 0x02, 0x0d, 0x28, 0x00, 0x02, 0x0e, 0x7a, 0x00} },
! { 0x0a50,	8,	{0x02, 0x0e, 0x7b, 0x00, 0x02, 0x0e, 0x91, 0x00} },
! { 0x0a58,	16,	{0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
! { 0x0a68,	1,	{0x22} },
! { 0x0a69,	16,	{0x53, 0x8e, 0xf7, 0xe5, 0x89, 0x54, 0xf1, 0x44, 0x01, 0xf5, 0x89, 0x75, 0x8c, 0xb1, 0xd2, 0xa9} },
! { 0x0a79,	16,	{0x75, 0x98, 0x40, 0x75, 0xcb, 0xff, 0x75, 0xca, 0xf3, 0x75, 0xc8, 0x34, 0xe4, 0xff, 0x7f, 0x05} },
! { 0x0a89,	7,	{0x78, 0x27, 0xe4, 0xf6, 0x08, 0xdf, 0xfc} },
! { 0x0a90,	1,	{0x22} },
! { 0x0a91,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0, 0x06, 0xc0} },
! { 0x0aa1,	1,	{0x07} },
! { 0x0aa2,	16,	{0x30, 0x04, 0x16, 0x75, 0x8c, 0xf8, 0x75, 0x8a, 0x30, 0x7f, 0x2f, 0xae, 0x07, 0x1f, 0xee, 0x60} },
! { 0x0ab2,	16,	{0x3c, 0x90, 0x20, 0x00, 0x74, 0x55, 0xf0, 0x80, 0xf2, 0x75, 0x8c, 0xb1, 0x7f, 0x27, 0xef, 0xd3} },
! { 0x0ac2,	16,	{0x94, 0x2b, 0x50, 0x09, 0xa8, 0x07, 0xe6, 0x60, 0x01, 0x16, 0x0f, 0x80, 0xf1, 0x90, 0x03, 0x00} },
! { 0x0ad2,	16,	{0xe0, 0x60, 0x02, 0x14, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x0e, 0x90} },
! { 0x0ae2,	13,	{0x01, 0xc1, 0xe0, 0x24, 0xff, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x34, 0xff, 0xf0} },
! { 0x0aef,	15,	{0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0afe,	1,	{0x32} },
! { 0x0aff,	1,	{0x32} },
  { 0x0b00,	9,	{0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
  { 0x0b7d,	16,	{0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
! { 0x0b8d,	16,	{0xd2, 0x00, 0x75, 0x8e, 0x10, 0xe4, 0x90, 0x7f, 0x92, 0xf0, 0x12, 0x80, 0x00, 0x12, 0x08, 0xf2} },
! { 0x0b9d,	13,	{0x12, 0x0e, 0xad, 0x12, 0x11, 0xe5, 0x12, 0x11, 0xc8, 0x12, 0x0a, 0x69, 0x22} },
! { 0x0baa,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
! { 0x0bba,	8,	{0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0bc2,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0bd2,	11,	{0xab, 0x74, 0x04, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0bdd,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0x90} },
! { 0x0bed,	16,	{0x7f, 0xd8, 0xe0, 0x70, 0x0d, 0x90, 0x7f, 0xd9, 0xe0, 0x70, 0x07, 0xe5, 0x2b, 0x70, 0x03, 0x75} },
! { 0x0bfd,	9,	{0x2b, 0x14, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0c06,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x10, 0xf0, 0xd0} },
! { 0x0c16,	6,	{0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0c1c,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x30, 0x02, 0x02, 0xd2, 0x06, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0c2c,	11,	{0xab, 0x74, 0x08, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0c37,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0c47,	16,	{0xa9, 0x74, 0x02, 0xf0, 0xe5, 0x30, 0x30, 0xe0, 0x13, 0xe5, 0x3b, 0x30, 0xe0, 0x07, 0x90, 0x20} },
! { 0x0c57,	16,	{0x04, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03} },
! { 0x0c67,	12,	{0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0c73,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0c83,	16,	{0xa9, 0x74, 0x04, 0xf0, 0xe5, 0x30, 0x30, 0xe1, 0x13, 0xe5, 0x3b, 0x30, 0xe1, 0x07, 0x90, 0x20} },
! { 0x0c93,	16,	{0x0c, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03} },
! { 0x0ca3,	12,	{0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0caf,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0cbf,	16,	{0xa9, 0x74, 0x08, 0xf0, 0xe5, 0x30, 0x30, 0xe2, 0x13, 0xe5, 0x3b, 0x30, 0xe2, 0x07, 0x90, 0x20} },
! { 0x0ccf,	16,	{0x14, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03} },
! { 0x0cdf,	12,	{0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0ceb,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f} },
! { 0x0cfb,	16,	{0xa9, 0x74, 0x10, 0xf0, 0xe5, 0x30, 0x30, 0xe3, 0x13, 0xe5, 0x3b, 0x30, 0xe3, 0x07, 0x90, 0x20} },
! { 0x0d0b,	16,	{0x1c, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03} },
! { 0x0d1b,	12,	{0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0d27,	1,	{0x32} },
! { 0x0d28,	1,	{0x32} },
! { 0x0d29,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
! { 0x0d39,	16,	{0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x02, 0xf0, 0xe5, 0x30, 0x20} },
! { 0x0d49,	16,	{0xe0, 0x06, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe0, 0x0a, 0x90, 0x7f, 0xc7} },
! { 0x0d59,	16,	{0xe0, 0x90, 0x02, 0xf8, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
! { 0x0d69,	16,	{0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
! { 0x0d79,	4,	{0x83, 0xd0, 0xe0, 0x32} },
! { 0x0d7d,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
! { 0x0d8d,	16,	{0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x04, 0xf0, 0xe5, 0x30, 0x20} },
! { 0x0d9d,	16,	{0xe1, 0x06, 0x90, 0x7f, 0xc9, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe1, 0x0a, 0x90, 0x7f, 0xc9} },
! { 0x0dad,	16,	{0xe0, 0x90, 0x02, 0xf9, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
! { 0x0dbd,	16,	{0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
! { 0x0dcd,	4,	{0x83, 0xd0, 0xe0, 0x32} },
! { 0x0dd1,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
! { 0x0de1,	16,	{0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x08, 0xf0, 0xe5, 0x30, 0x20} },
! { 0x0df1,	16,	{0xe2, 0x06, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe2, 0x0a, 0x90, 0x7f, 0xcb} },
! { 0x0e01,	16,	{0xe0, 0x90, 0x02, 0xfa, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
! { 0x0e11,	16,	{0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
! { 0x0e21,	4,	{0x83, 0xd0, 0xe0, 0x32} },
! { 0x0e25,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
! { 0x0e35,	16,	{0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x10, 0xf0, 0xe5, 0x30, 0x20} },
! { 0x0e45,	16,	{0xe3, 0x06, 0x90, 0x7f, 0xcd, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe3, 0x0a, 0x90, 0x7f, 0xcd} },
! { 0x0e55,	16,	{0xe0, 0x90, 0x02, 0xfb, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} },
! { 0x0e65,	16,	{0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} },
! { 0x0e75,	4,	{0x83, 0xd0, 0xe0, 0x32} },
! { 0x0e79,	1,	{0x32} },
! { 0x0e7a,	1,	{0x32} },
! { 0x0e7b,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x80, 0xf0, 0xd0} },
! { 0x0e8b,	6,	{0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0e91,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x80, 0xf0, 0x90} },
! { 0x0ea1,	12,	{0x01, 0xbd, 0x74, 0xff, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x0ead,	16,	{0x90, 0x01, 0x20, 0x12, 0xa1, 0x07, 0x00, 0x00, 0x25, 0x80, 0x90, 0x01, 0x24, 0x74, 0x08, 0xf0} },
! { 0x0ebd,	16,	{0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x6e, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x13, 0xf0, 0xa3, 0x74} },
! { 0x0ecd,	16,	{0x11, 0xf0, 0xe4, 0xa3, 0xf0, 0xa3, 0xf0, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
! { 0x0edd,	16,	{0x04, 0xa3, 0xf0, 0xef, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35, 0xf0, 0xa8} },
! { 0x0eed,	16,	{0x01, 0xfc, 0x7d, 0x01, 0x7b, 0x01, 0x7a, 0x01, 0x79, 0x1f, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0x9f} },
! { 0x0efd,	16,	{0x1f, 0x7e, 0x01, 0x7f, 0x1f, 0x12, 0x86, 0x17, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0xe0, 0xc3} },
! { 0x0f0d,	16,	{0x94, 0x04, 0x40, 0xc7, 0xe4, 0xf5, 0x26, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
! { 0x0f1d,	16,	{0xc3, 0x94, 0x04, 0x50, 0x1a, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4} },
! { 0x0f2d,	16,	{0xf0, 0x74, 0x22, 0x2f, 0xf8, 0xe4, 0xf6, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xdc, 0xe4} },
! { 0x0f3d,	16,	{0xf5, 0x30, 0xe5, 0xc0, 0x60, 0x2f, 0x90, 0x01, 0x1e, 0x74, 0x01, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
! { 0x0f4d,	16,	{0xff, 0xd3, 0x94, 0x04, 0x50, 0x1f, 0xef, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02} },
! { 0x0f5d,	16,	{0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x30, 0x7e, 0x01, 0x7f, 0x1e, 0x12, 0x83, 0xb7, 0x90, 0x01, 0x1e} },
! { 0x0f6d,	16,	{0xe0, 0x04, 0xf0, 0x80, 0xd7, 0xe4, 0xf5, 0x3a, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
! { 0x0f7d,	16,	{0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x54} },
! { 0x0f8d,	16,	{0xf0, 0xfe, 0x74, 0xc5, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xee, 0xf0, 0x74, 0x36} },
! { 0x0f9d,	16,	{0x2f, 0xf8, 0xa6, 0x06, 0x74, 0x32, 0x2f, 0xf8, 0xe4, 0xf6, 0x74, 0x2c, 0x2f, 0xf8, 0xe4, 0xf6} },
! { 0x0fad,	16,	{0x74, 0xfc, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
! { 0x0fbd,	16,	{0x04, 0xf0, 0xe0, 0xb4, 0x04, 0xb6, 0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xf5, 0x4b, 0x60, 0x5e} },
! { 0x0fcd,	4,	{0xe4, 0x90, 0x01, 0x1e} },
! { 0x0fd1,	16,	{0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94, 0x04, 0x50, 0xe7, 0x74, 0x01, 0xa8, 0x07, 0x08} },
! { 0x0fe1,	16,	{0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x55, 0x4b, 0x60, 0x38, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0x75} },
! { 0x0ff1,	16,	{0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0x75} },
! { 0x1001,	16,	{0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xef, 0x75, 0xf0} },
! { 0x1011,	16,	{0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe, 0x7d, 0x06, 0x12} },
! { 0x1021,	11,	{0x83, 0x2d, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xa7, 0x22} },
! { 0x102c,	4,	{0xad, 0x07, 0xac, 0x06} },
! { 0x1030,	16,	{0x79, 0x06, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb} },
! { 0x1040,	16,	{0x4a, 0x70, 0x03, 0x02, 0x11, 0x74, 0xe9, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x11, 0x46, 0x90} },
! { 0x1050,	16,	{0x10, 0x56, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x11, 0x24, 0x02, 0x10, 0xdc, 0x02, 0x10, 0xc5, 0x02} },
! { 0x1060,	16,	{0x10, 0xab, 0x02, 0x10, 0x9a, 0x02, 0x10, 0x85, 0x02, 0x10, 0x6b, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
! { 0x1070,	16,	{0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6} },
! { 0x1080,	16,	{0xf0, 0x19, 0x02, 0x11, 0x46, 0x19, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x0a} },
! { 0x1090,	16,	{0xa3, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x02, 0x11, 0x46, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
! { 0x10a0,	16,	{0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x19, 0x02, 0x11, 0x46, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
! { 0x10b0,	16,	{0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa1, 0x90, 0x7f, 0xa6} },
! { 0x10c0,	16,	{0xf0, 0x19, 0x02, 0x11, 0x46, 0xeb, 0x64, 0x01, 0x4a, 0x70, 0x08, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
! { 0x10d0,	16,	{0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xf5, 0x54, 0x19, 0x80, 0x6a, 0xed, 0x24, 0x04, 0xf5} },
! { 0x10e0,	16,	{0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x64, 0x02, 0x4e, 0x70, 0x08, 0x90, 0x7f} },
! { 0x10f0,	16,	{0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xff, 0xed, 0x24, 0x06, 0xf5, 0x82} },
! { 0x1100,	16,	{0xe4, 0x3c, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
! { 0x1110,	16,	{0xef, 0xf0, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12} },
! { 0x1120,	16,	{0x9f, 0x8e, 0x80, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xff} },
! { 0x1130,	16,	{0xed, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xf5, 0x82, 0x8a} },
! { 0x1140,	16,	{0x83, 0xef, 0xf0, 0x7f, 0x08, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x54, 0x30, 0xe0, 0xf7, 0x30} },
! { 0x1150,	16,	{0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xe9, 0xd3, 0x94, 0x02, 0x50, 0x03, 0x02} },
! { 0x1160,	16,	{0x10, 0x32, 0xe5, 0x54, 0x30, 0xe1, 0x03, 0x02, 0x10, 0x32, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40} },
! { 0x1170,	6,	{0xf0, 0x7f, 0x07, 0x22, 0x7f, 0x08} },
! { 0x1176,	1,	{0x22} },
! { 0x1177,	2,	{0xae, 0x07} },
! { 0x1179,	16,	{0x7c, 0x02, 0xec, 0x14, 0x60, 0x15, 0x14, 0x70, 0x1e, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0} },
! { 0x1189,	16,	{0xee, 0x25, 0xe0, 0x44, 0x40, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xa6, 0xed, 0xf0} },
! { 0x1199,	16,	{0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xfb, 0x30, 0xe0, 0xf8, 0xbc} },
! { 0x11a9,	16,	{0x02, 0x0a, 0x20, 0xe1, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22, 0xeb, 0x30, 0xe2, 0x0a} },
! { 0x11b9,	14,	{0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xdc, 0xb6, 0x7f, 0x08} },
! { 0x11c7,	1,	{0x22} },
! { 0x11c8,	16,	{0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x7f, 0x02, 0x7d, 0xff, 0x12, 0x11, 0x77, 0x7f, 0x05} },
! { 0x11d8,	13,	{0x7e, 0x00, 0x12, 0x09, 0x29, 0x7f, 0x03, 0x7d, 0xff, 0x12, 0x11, 0x77, 0x22} },
! { 0x11e5,	16,	{0xe4, 0x90, 0x01, 0xc9, 0xf0, 0x7e, 0x01, 0x7f, 0xca, 0x90, 0x01, 0xbe, 0xee, 0xf0, 0xa3, 0xef} },
! { 0x11f5,	10,	{0xf0, 0x90, 0x01, 0xc2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
  { 0x1200,	16,	{0x12, 0x01, 0x00, 0x01, 0xff, 0xff, 0xff, 0x40, 0x10, 0x07, 0x01, 0x80, 0x42, 0x00, 0x01, 0x02} },
  { 0x1210,	16,	{0x03, 0x01, 0x09, 0x02, 0x58, 0x00, 0x01, 0x01, 0x04, 0x80, 0x3c, 0x09, 0x04, 0x00, 0x00, 0x0a} },
  { 0x1220,	16,	{0xff, 0xff, 0xff, 0x05, 0x07, 0x05, 0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40} },
***************
*** 336,349 ****
  { 0x1362,	16,	{0x75, 0x28, 0x14, 0x02, 0x15, 0x0d, 0xe5, 0x29, 0x70, 0x03, 0x75, 0x29, 0x14, 0x02, 0x16, 0x9e} },
  { 0x1372,	16,	{0xe5, 0x2a, 0x70, 0x03, 0x75, 0x2a, 0x14, 0x02, 0x18, 0x2f, 0x90, 0x20, 0x02, 0xe0, 0x54, 0x3f} },
  { 0x1382,	16,	{0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14, 0x60, 0x09, 0x02, 0x13} },
! { 0x1392,	16,	{0x43, 0x02, 0x14, 0x65, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5, 0x37, 0x02, 0x13, 0x43} },
  { 0x13a2,	16,	{0x43, 0x82, 0x04, 0xe0, 0x43, 0x2c, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x05} },
! { 0x13b2,	16,	{0xe0, 0x42, 0x33, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13, 0x43, 0x30, 0xe1, 0x02} },
! { 0x13c2,	16,	{0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3c, 0x30, 0xe0, 0x0a, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x04, 0xe0} },
  { 0x13d2,	16,	{0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74, 0x00, 0xf0, 0x90, 0x20} },
  { 0x13e2,	16,	{0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05, 0x86} },
  { 0x13f2,	16,	{0x90, 0x7e, 0x80, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90, 0x7f} },
! { 0x1402,	16,	{0xe5, 0xe5, 0x3d, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0} },
  { 0x1412,	16,	{0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x90} },
  { 0x1422,	16,	{0x7f, 0xb7, 0xed, 0xf0, 0x90, 0x20, 0x01, 0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x7f, 0x40} },
  { 0x1432,	16,	{0x90, 0x7e, 0x80, 0x05, 0x86, 0x90, 0x20, 0x00, 0xe5, 0x84, 0xfe, 0x24, 0x05, 0xfd, 0x8d, 0x84} },
--- 339,352 ----
  { 0x1362,	16,	{0x75, 0x28, 0x14, 0x02, 0x15, 0x0d, 0xe5, 0x29, 0x70, 0x03, 0x75, 0x29, 0x14, 0x02, 0x16, 0x9e} },
  { 0x1372,	16,	{0xe5, 0x2a, 0x70, 0x03, 0x75, 0x2a, 0x14, 0x02, 0x18, 0x2f, 0x90, 0x20, 0x02, 0xe0, 0x54, 0x3f} },
  { 0x1382,	16,	{0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14, 0x60, 0x09, 0x02, 0x13} },
! { 0x1392,	16,	{0x43, 0x02, 0x14, 0x65, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5, 0x36, 0x02, 0x13, 0x43} },
  { 0x13a2,	16,	{0x43, 0x82, 0x04, 0xe0, 0x43, 0x2c, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x05} },
! { 0x13b2,	16,	{0xe0, 0x42, 0x32, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13, 0x43, 0x30, 0xe1, 0x02} },
! { 0x13c2,	16,	{0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe0, 0x0a, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x04, 0xe0} },
  { 0x13d2,	16,	{0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74, 0x00, 0xf0, 0x90, 0x20} },
  { 0x13e2,	16,	{0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05, 0x86} },
  { 0x13f2,	16,	{0x90, 0x7e, 0x80, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90, 0x7f} },
! { 0x1402,	16,	{0xe5, 0xe5, 0x3c, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0} },
  { 0x1412,	16,	{0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x90} },
  { 0x1422,	16,	{0x7f, 0xb7, 0xed, 0xf0, 0x90, 0x20, 0x01, 0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x7f, 0x40} },
  { 0x1432,	16,	{0x90, 0x7e, 0x80, 0x05, 0x86, 0x90, 0x20, 0x00, 0xe5, 0x84, 0xfe, 0x24, 0x05, 0xfd, 0x8d, 0x84} },
***************
*** 361,374 ****
  { 0x14f2,	16,	{0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x90, 0x20, 0x01} },
  { 0x1502,	16,	{0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xc7, 0xf0, 0x02, 0x13, 0x43, 0x90, 0x20, 0x0a, 0xe0, 0x54} },
  { 0x1512,	16,	{0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14, 0x60, 0x09, 0x02} },
! { 0x1522,	16,	{0x13, 0x43, 0x02, 0x15, 0xf6, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5, 0x38, 0x02, 0x13} },
  { 0x1532,	16,	{0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2d, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82, 0xf8, 0x43, 0x82} },
! { 0x1542,	16,	{0x05, 0xe0, 0x42, 0x34, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13, 0x43, 0x30, 0xe1} },
! { 0x1552,	16,	{0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3c, 0x30, 0xe1, 0x0a, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x04} },
  { 0x1562,	16,	{0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74, 0x01, 0xf0, 0x90} },
  { 0x1572,	16,	{0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05} },
  { 0x1582,	16,	{0x86, 0x90, 0x7e, 0x00, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90} },
! { 0x1592,	16,	{0x7f, 0xe5, 0xe5, 0x3e, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0} },
  { 0x15a2,	16,	{0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0} },
  { 0x15b2,	16,	{0x90, 0x7f, 0xb9, 0xed, 0xf0, 0x90, 0x20, 0x09, 0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x7f} },
  { 0x15c2,	16,	{0x40, 0x90, 0x7e, 0x00, 0x05, 0x86, 0x90, 0x20, 0x08, 0xe5, 0x84, 0xfe, 0x24, 0x05, 0xfd, 0x8d} },
--- 364,377 ----
  { 0x14f2,	16,	{0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x90, 0x20, 0x01} },
  { 0x1502,	16,	{0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xc7, 0xf0, 0x02, 0x13, 0x43, 0x90, 0x20, 0x0a, 0xe0, 0x54} },
  { 0x1512,	16,	{0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14, 0x60, 0x09, 0x02} },
! { 0x1522,	16,	{0x13, 0x43, 0x02, 0x15, 0xf6, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5, 0x37, 0x02, 0x13} },
  { 0x1532,	16,	{0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2d, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82, 0xf8, 0x43, 0x82} },
! { 0x1542,	16,	{0x05, 0xe0, 0x42, 0x33, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13, 0x43, 0x30, 0xe1} },
! { 0x1552,	16,	{0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe1, 0x0a, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x04} },
  { 0x1562,	16,	{0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74, 0x01, 0xf0, 0x90} },
  { 0x1572,	16,	{0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05} },
  { 0x1582,	16,	{0x86, 0x90, 0x7e, 0x00, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90} },
! { 0x1592,	16,	{0x7f, 0xe5, 0xe5, 0x3d, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0} },
  { 0x15a2,	16,	{0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0} },
  { 0x15b2,	16,	{0x90, 0x7f, 0xb9, 0xed, 0xf0, 0x90, 0x20, 0x09, 0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x7f} },
  { 0x15c2,	16,	{0x40, 0x90, 0x7e, 0x00, 0x05, 0x86, 0x90, 0x20, 0x08, 0xe5, 0x84, 0xfe, 0x24, 0x05, 0xfd, 0x8d} },
***************
*** 387,399 ****
  { 0x1690,	16,	{0x90, 0x20, 0x09, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x02, 0x13, 0x43, 0x90, 0x20} },
  { 0x16a0,	16,	{0x12, 0xe0, 0x54, 0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14} },
  { 0x16b0,	16,	{0x60, 0x09, 0x02, 0x13, 0x43, 0x02, 0x17, 0x87, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5} },
! { 0x16c0,	16,	{0x39, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2e, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82} },
! { 0x16d0,	16,	{0xf8, 0x43, 0x82, 0x05, 0xe0, 0x42, 0x35, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13} },
! { 0x16e0,	16,	{0x43, 0x30, 0xe1, 0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3c, 0x30, 0xe2, 0x0a, 0x53, 0x82, 0xf8} },
  { 0x16f0,	16,	{0x43, 0x82, 0x04, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74} },
  { 0x1700,	16,	{0x02, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
  { 0x1710,	16,	{0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0x80, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0} },
! { 0x1720,	16,	{0x05, 0x86, 0x90, 0x7f, 0xe5, 0xe5, 0x3f, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0} },
  { 0x1730,	16,	{0xf0, 0xf0, 0xf0, 0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58} },
  { 0x1740,	16,	{0x74, 0x00, 0xf0, 0x90, 0x7f, 0xbb, 0xed, 0xf0, 0x90, 0x20, 0x11, 0xe0, 0x54, 0xfe, 0xf0, 0x02} },
  { 0x1750,	16,	{0x13, 0x43, 0x7f, 0x40, 0x90, 0x7d, 0x80, 0x05, 0x86, 0x90, 0x20, 0x10, 0xe5, 0x84, 0xfe, 0x24} },
--- 390,402 ----
  { 0x1690,	16,	{0x90, 0x20, 0x09, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x02, 0x13, 0x43, 0x90, 0x20} },
  { 0x16a0,	16,	{0x12, 0xe0, 0x54, 0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14} },
  { 0x16b0,	16,	{0x60, 0x09, 0x02, 0x13, 0x43, 0x02, 0x17, 0x87, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5} },
! { 0x16c0,	16,	{0x38, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2e, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82} },
! { 0x16d0,	16,	{0xf8, 0x43, 0x82, 0x05, 0xe0, 0x42, 0x34, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13} },
! { 0x16e0,	16,	{0x43, 0x30, 0xe1, 0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe2, 0x0a, 0x53, 0x82, 0xf8} },
  { 0x16f0,	16,	{0x43, 0x82, 0x04, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74} },
  { 0x1700,	16,	{0x02, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
  { 0x1710,	16,	{0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0x80, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0} },
! { 0x1720,	16,	{0x05, 0x86, 0x90, 0x7f, 0xe5, 0xe5, 0x3e, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0} },
  { 0x1730,	16,	{0xf0, 0xf0, 0xf0, 0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58} },
  { 0x1740,	16,	{0x74, 0x00, 0xf0, 0x90, 0x7f, 0xbb, 0xed, 0xf0, 0x90, 0x20, 0x11, 0xe0, 0x54, 0xfe, 0xf0, 0x02} },
  { 0x1750,	16,	{0x13, 0x43, 0x7f, 0x40, 0x90, 0x7d, 0x80, 0x05, 0x86, 0x90, 0x20, 0x10, 0xe5, 0x84, 0xfe, 0x24} },
***************
*** 412,424 ****
  { 0x1820,	16,	{0xf0, 0x90, 0x20, 0x11, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xcb, 0xf0, 0x02, 0x13, 0x43, 0x90} },
  { 0x1830,	16,	{0x20, 0x1a, 0xe0, 0x54, 0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5} },
  { 0x1840,	16,	{0x14, 0x60, 0x09, 0x02, 0x13, 0x43, 0x02, 0x19, 0x18, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0} },
! { 0x1850,	16,	{0xf5, 0x3a, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2f, 0x01, 0x02, 0x13, 0x43, 0x53} },
! { 0x1860,	16,	{0x82, 0xf8, 0x43, 0x82, 0x05, 0xe0, 0x42, 0x36, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02} },
! { 0x1870,	16,	{0x13, 0x43, 0x30, 0xe1, 0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3c, 0x30, 0xe3, 0x0a, 0x53, 0x82} },
  { 0x1880,	16,	{0xf8, 0x43, 0x82, 0x04, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50} },
  { 0x1890,	16,	{0x74, 0x03, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0} },
  { 0x18a0,	16,	{0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0x00, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84} },
! { 0x18b0,	16,	{0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xe5, 0x40, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0} },
  { 0x18c0,	16,	{0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20} },
  { 0x18d0,	16,	{0x58, 0x74, 0x00, 0xf0, 0x90, 0x7f, 0xbd, 0xed, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x54, 0xfe, 0xf0} },
  { 0x18e0,	16,	{0x02, 0x13, 0x43, 0x7f, 0x40, 0x90, 0x7d, 0x00, 0x05, 0x86, 0x90, 0x20, 0x18, 0xe5, 0x84, 0xfe} },
--- 415,427 ----
  { 0x1820,	16,	{0xf0, 0x90, 0x20, 0x11, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xcb, 0xf0, 0x02, 0x13, 0x43, 0x90} },
  { 0x1830,	16,	{0x20, 0x1a, 0xe0, 0x54, 0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5} },
  { 0x1840,	16,	{0x14, 0x60, 0x09, 0x02, 0x13, 0x43, 0x02, 0x19, 0x18, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0} },
! { 0x1850,	16,	{0xf5, 0x39, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2f, 0x01, 0x02, 0x13, 0x43, 0x53} },
! { 0x1860,	16,	{0x82, 0xf8, 0x43, 0x82, 0x05, 0xe0, 0x42, 0x35, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02} },
! { 0x1870,	16,	{0x13, 0x43, 0x30, 0xe1, 0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe3, 0x0a, 0x53, 0x82} },
  { 0x1880,	16,	{0xf8, 0x43, 0x82, 0x04, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50} },
  { 0x1890,	16,	{0x74, 0x03, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0} },
  { 0x18a0,	16,	{0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0x00, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84} },
! { 0x18b0,	16,	{0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xe5, 0x3f, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0} },
  { 0x18c0,	16,	{0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20} },
  { 0x18d0,	16,	{0x58, 0x74, 0x00, 0xf0, 0x90, 0x7f, 0xbd, 0xed, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x54, 0xfe, 0xf0} },
  { 0x18e0,	16,	{0x02, 0x13, 0x43, 0x7f, 0x40, 0x90, 0x7d, 0x00, 0x05, 0x86, 0x90, 0x20, 0x18, 0xe5, 0x84, 0xfe} },
***************
*** 436,496 ****
  { 0x19a0,	16,	{0x80, 0x1b, 0xe0, 0xde, 0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74} },
  { 0x19b0,	16,	{0x00, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xcd, 0xf0, 0x02, 0x13, 0x43} },
  { 0x19c0,	1,	{0x32} },
! { 0x19c1,	4,	{0xad, 0x07, 0xac, 0x06} },
! { 0x19c5,	16,	{0x79, 0x06, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb} },
! { 0x19d5,	16,	{0x4a, 0x70, 0x03, 0x02, 0x1b, 0x09, 0xe9, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x1a, 0xdb, 0x90} },
! { 0x19e5,	16,	{0x19, 0xeb, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x1a, 0xb9, 0x02, 0x1a, 0x71, 0x02, 0x1a, 0x5a, 0x02} },
! { 0x19f5,	16,	{0x1a, 0x40, 0x02, 0x1a, 0x2f, 0x02, 0x1a, 0x1a, 0x02, 0x1a, 0x00, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
! { 0x1a05,	16,	{0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6} },
! { 0x1a15,	16,	{0xf0, 0x19, 0x02, 0x1a, 0xdb, 0x19, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x0a} },
! { 0x1a25,	16,	{0xa3, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x02, 0x1a, 0xdb, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
! { 0x1a35,	16,	{0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x19, 0x02, 0x1a, 0xdb, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
! { 0x1a45,	16,	{0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa1, 0x90, 0x7f, 0xa6} },
! { 0x1a55,	16,	{0xf0, 0x19, 0x02, 0x1a, 0xdb, 0xeb, 0x64, 0x01, 0x4a, 0x70, 0x08, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
! { 0x1a65,	16,	{0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xf5, 0x57, 0x19, 0x80, 0x6a, 0xed, 0x24, 0x04, 0xf5} },
! { 0x1a75,	16,	{0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x64, 0x02, 0x4e, 0x70, 0x08, 0x90, 0x7f} },
! { 0x1a85,	16,	{0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xff, 0xed, 0x24, 0x06, 0xf5, 0x82} },
! { 0x1a95,	16,	{0xe4, 0x3c, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa0, 0x9b, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
! { 0x1aa5,	16,	{0xef, 0xf0, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12} },
! { 0x1ab5,	16,	{0xa0, 0x85, 0x80, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xff} },
! { 0x1ac5,	16,	{0xed, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xf5, 0x82, 0x8a} },
! { 0x1ad5,	16,	{0x83, 0xef, 0xf0, 0x7f, 0x08, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x57, 0x30, 0xe0, 0xf7, 0x30} },
! { 0x1ae5,	16,	{0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xe9, 0xd3, 0x94, 0x02, 0x50, 0x03, 0x02} },
! { 0x1af5,	16,	{0x19, 0xc7, 0xe5, 0x57, 0x30, 0xe1, 0x03, 0x02, 0x19, 0xc7, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40} },
! { 0x1b05,	6,	{0xf0, 0x7f, 0x07, 0x22, 0x7f, 0x08} },
! { 0x1b0b,	1,	{0x22} },
! { 0x1b0c,	16,	{0xe5, 0x30, 0xc3, 0x94, 0x01, 0x50, 0x1c, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x7f, 0x02} },
! { 0x1b1c,	16,	{0x7d, 0xff, 0x12, 0x82, 0xa8, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0xaa, 0x7f, 0x03, 0x7d, 0xff} },
! { 0x1b2c,	4,	{0x12, 0x82, 0xa8, 0x22} },
! { 0x8000,	16,	{0x7b, 0xff, 0x7a, 0x12, 0x79, 0x1b, 0x90, 0x00, 0x04, 0x12, 0xa0, 0x58, 0xfd, 0x8b, 0x4e, 0x75} },
! { 0x8010,	16,	{0x4f, 0x12, 0x75, 0x50, 0x24, 0xe4, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x7f, 0xe0, 0xf0, 0xf5, 0x4c} },
! { 0x8020,	16,	{0xf5, 0x4d, 0x90, 0x02, 0xae, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f} },
  { 0x8030,	16,	{0xa9, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0xe4, 0xfc, 0xec, 0x25, 0xe0, 0x24, 0xb4, 0xf5} },
  { 0x8040,	16,	{0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x0c, 0xbc, 0x10, 0xee, 0xe4, 0x90, 0x7f, 0xdd} },
! { 0x8050,	16,	{0xf0, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03, 0x02, 0x81, 0xc6, 0xab, 0x4e, 0xaa, 0x4f, 0xa9, 0x50} },
! { 0x8060,	16,	{0x90, 0x00, 0x01, 0x12, 0xa0, 0x58, 0x64, 0x05, 0x60, 0x03, 0x02, 0x81, 0xb5, 0x90, 0x00, 0x03} },
! { 0x8070,	16,	{0x12, 0xa0, 0x58, 0x64, 0x01, 0x60, 0x03, 0x02, 0x81, 0x3c, 0x90, 0x00, 0x02, 0x12, 0xa0, 0x58} },
  { 0x8080,	16,	{0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50, 0x03, 0x02, 0x81, 0x16, 0xec, 0xc3, 0x94, 0x10} },
! { 0x8090,	16,	{0x40, 0x03, 0x02, 0x81, 0x16, 0xef, 0x30, 0xe7, 0x42, 0xe5, 0x4d, 0xae, 0x4c, 0x78, 0x02, 0xce} },
  { 0x80a0,	16,	{0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xf0, 0x2c, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} },
  { 0x80b0,	16,	{0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe0, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01, 0xa8, 0x06} },
  { 0x80c0,	16,	{0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe0, 0xf0, 0x90, 0x02, 0xae, 0xe0} },
! { 0x80d0,	16,	{0x04, 0xf0, 0x90, 0x7f, 0xdd, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x3e, 0xe5, 0x4d, 0xae, 0x4c, 0x78} },
  { 0x80e0,	16,	{0x02, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xe8, 0x2c, 0xf5, 0x82, 0xe4, 0x34} },
  { 0x80f0,	16,	{0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe1, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01} },
  { 0x8100,	16,	{0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x02} },
! { 0x8110,	16,	{0xae, 0xe0, 0x04, 0xf0, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x90, 0x00, 0x04, 0x12, 0xa0, 0x58, 0x25} },
! { 0x8120,	16,	{0x4d, 0xf5, 0x4d, 0xe4, 0x35, 0x4c, 0xf5, 0x4c, 0x90, 0x00, 0x05, 0x12, 0xa0, 0x58, 0xfe, 0xe4} },
! { 0x8130,	16,	{0x25, 0x4d, 0xf5, 0x4d, 0xee, 0x35, 0x4c, 0xf5, 0x4c, 0x02, 0x81, 0xb8, 0xab, 0x4e, 0xaa, 0x4f} },
! { 0x8140,	16,	{0xa9, 0x50, 0x90, 0x00, 0x03, 0x12, 0xa0, 0x58, 0xff, 0x64, 0x02, 0x60, 0x05, 0xef, 0x64, 0x03} },
! { 0x8150,	16,	{0x70, 0x60, 0x90, 0x00, 0x02, 0x12, 0xa0, 0x58, 0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50} },
  { 0x8160,	16,	{0x4e, 0xef, 0x30, 0xe7, 0x1e, 0x90, 0x7f, 0xde, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80} },
  { 0x8170,	16,	{0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x4e} },
  { 0x8180,	16,	{0xf0, 0x80, 0x35, 0x90, 0x7f, 0xdf, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80, 0x02, 0xc3} },
  { 0x8190,	16,	{0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xad, 0xe0, 0x4e, 0xf0, 0xec} },
  { 0x81a0,	16,	{0x25, 0xe0, 0x24, 0xc5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x80, 0x09, 0x7f} },
! { 0x81b0,	16,	{0xff, 0x22, 0x7f, 0xff, 0x22, 0x7f, 0xff, 0x22, 0x74, 0x07, 0x25, 0x50, 0xf5, 0x50, 0xe4, 0x35} },
! { 0x81c0,	16,	{0x4f, 0xf5, 0x4f, 0x02, 0x80, 0x51, 0x20, 0x03, 0x0d, 0x90, 0x02, 0xae, 0xe0, 0x60, 0x07, 0x90} },
  { 0x81d0,	8,	{0x7f, 0xae, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x00} },
  { 0x81d8,	1,	{0x22} },
  { 0x81d9,	2,	{0xac, 0x07} },
--- 439,501 ----
  { 0x19a0,	16,	{0x80, 0x1b, 0xe0, 0xde, 0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74} },
  { 0x19b0,	16,	{0x00, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xcd, 0xf0, 0x02, 0x13, 0x43} },
  { 0x19c0,	1,	{0x32} },
! { 0x19c1,	4,	{0x8e, 0x54, 0x8f, 0x55} },
! { 0x19c5,	16,	{0x75, 0x56, 0x03, 0xe5, 0x55, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xfe} },
! { 0x19d5,	16,	{0xa3, 0xe0, 0x4e, 0x70, 0x03, 0x02, 0x1a, 0xcf, 0xe5, 0x56, 0x60, 0x4e, 0x14, 0x60, 0x38, 0x14} },
! { 0x19e5,	16,	{0x60, 0x20, 0x14, 0x60, 0x03, 0x02, 0x1a, 0x73, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0x85} },
! { 0x19f5,	16,	{0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6, 0xf0} },
! { 0x1a05,	16,	{0x80, 0x6c, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x09, 0xa3, 0xa3} },
! { 0x1a15,	16,	{0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x57, 0x15, 0x56, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3} },
! { 0x1a25,	16,	{0xa3, 0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x44, 0xe5, 0x55, 0x24, 0x06, 0xf5, 0x82} },
! { 0x1a35,	16,	{0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5} },
! { 0x1a45,	16,	{0x83, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe5, 0x55, 0x24} },
! { 0x1a55,	16,	{0x04, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12, 0x9f, 0x8e, 0x85} },
! { 0x1a65,	16,	{0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0x8e, 0x90, 0x7f} },
! { 0x1a75,	16,	{0xa5, 0xe0, 0xf5, 0x57, 0x30, 0xe0, 0xf7, 0x30, 0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06} },
! { 0x1a85,	16,	{0x22, 0xe5, 0x57, 0x20, 0xe1, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22} },
! { 0x1a95,	16,	{0xe5, 0x56, 0x70, 0x31, 0x7f, 0x01, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
! { 0x1aa5,	16,	{0x80, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90} },
! { 0x1ab5,	16,	{0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x57, 0x30, 0xe0, 0xf7, 0x30, 0xe1, 0xd5, 0x75} },
! { 0x1ac5,	12,	{0x56, 0x03, 0x02, 0x19, 0xc8, 0x15, 0x56, 0x02, 0x19, 0xc8, 0x7f, 0x08} },
! { 0x1ad1,	1,	{0x22} },
! { 0x1ad2,	16,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc2, 0xa9, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xd2, 0xa9} },
! { 0x1ae2,	15,	{0x53, 0x91, 0x7f, 0x90, 0x01, 0xc4, 0xe4, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x1af1,	4,	{0x8e, 0x54, 0x8f, 0x55} },
! { 0x1af5,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x56, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
! { 0x1b05,	16,	{0xe5, 0x56, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0} },
! { 0x1b15,	16,	{0x54, 0x03, 0x70, 0x24, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0x30, 0xe0, 0x07, 0xaf} },
! { 0x1b25,	16,	{0x56, 0x7d, 0x02, 0x12, 0x83, 0x2d, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0x30, 0xe1} },
! { 0x1b35,	10,	{0x07, 0xaf, 0x56, 0x7d, 0x04, 0x12, 0x83, 0x2d, 0x7f, 0x00} },
! { 0x1b3f,	1,	{0x22} },
! { 0x8000,	16,	{0x7b, 0xff, 0x7a, 0x12, 0x79, 0x1b, 0x90, 0x00, 0x04, 0x12, 0x9f, 0x61, 0xfd, 0x8b, 0x4d, 0x75} },
! { 0x8010,	16,	{0x4e, 0x12, 0x75, 0x4f, 0x24, 0xe4, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x7f, 0xe0, 0xf0, 0xf5, 0x4b} },
! { 0x8020,	16,	{0xf5, 0x4c, 0x90, 0x02, 0xae, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f} },
  { 0x8030,	16,	{0xa9, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0xe4, 0xfc, 0xec, 0x25, 0xe0, 0x24, 0xb4, 0xf5} },
  { 0x8040,	16,	{0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x0c, 0xbc, 0x10, 0xee, 0xe4, 0x90, 0x7f, 0xdd} },
! { 0x8050,	16,	{0xf0, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03, 0x02, 0x81, 0xc6, 0xab, 0x4d, 0xaa, 0x4e, 0xa9, 0x4f} },
! { 0x8060,	16,	{0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0x64, 0x05, 0x60, 0x03, 0x02, 0x81, 0xb5, 0x90, 0x00, 0x03} },
! { 0x8070,	16,	{0x12, 0x9f, 0x61, 0x64, 0x01, 0x60, 0x03, 0x02, 0x81, 0x3c, 0x90, 0x00, 0x02, 0x12, 0x9f, 0x61} },
  { 0x8080,	16,	{0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50, 0x03, 0x02, 0x81, 0x16, 0xec, 0xc3, 0x94, 0x10} },
! { 0x8090,	16,	{0x40, 0x03, 0x02, 0x81, 0x16, 0xef, 0x30, 0xe7, 0x42, 0xe5, 0x4c, 0xae, 0x4b, 0x78, 0x02, 0xce} },
  { 0x80a0,	16,	{0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xf0, 0x2c, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} },
  { 0x80b0,	16,	{0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe0, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01, 0xa8, 0x06} },
  { 0x80c0,	16,	{0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe0, 0xf0, 0x90, 0x02, 0xae, 0xe0} },
! { 0x80d0,	16,	{0x04, 0xf0, 0x90, 0x7f, 0xdd, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x3e, 0xe5, 0x4c, 0xae, 0x4b, 0x78} },
  { 0x80e0,	16,	{0x02, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xe8, 0x2c, 0xf5, 0x82, 0xe4, 0x34} },
  { 0x80f0,	16,	{0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe1, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01} },
  { 0x8100,	16,	{0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x02} },
! { 0x8110,	16,	{0xae, 0xe0, 0x04, 0xf0, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x90, 0x00, 0x04, 0x12, 0x9f, 0x61, 0x25} },
! { 0x8120,	16,	{0x4c, 0xf5, 0x4c, 0xe4, 0x35, 0x4b, 0xf5, 0x4b, 0x90, 0x00, 0x05, 0x12, 0x9f, 0x61, 0xfe, 0xe4} },
! { 0x8130,	16,	{0x25, 0x4c, 0xf5, 0x4c, 0xee, 0x35, 0x4b, 0xf5, 0x4b, 0x02, 0x81, 0xb8, 0xab, 0x4d, 0xaa, 0x4e} },
! { 0x8140,	16,	{0xa9, 0x4f, 0x90, 0x00, 0x03, 0x12, 0x9f, 0x61, 0xff, 0x64, 0x02, 0x60, 0x05, 0xef, 0x64, 0x03} },
! { 0x8150,	16,	{0x70, 0x60, 0x90, 0x00, 0x02, 0x12, 0x9f, 0x61, 0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50} },
  { 0x8160,	16,	{0x4e, 0xef, 0x30, 0xe7, 0x1e, 0x90, 0x7f, 0xde, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80} },
  { 0x8170,	16,	{0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x4e} },
  { 0x8180,	16,	{0xf0, 0x80, 0x35, 0x90, 0x7f, 0xdf, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80, 0x02, 0xc3} },
  { 0x8190,	16,	{0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xad, 0xe0, 0x4e, 0xf0, 0xec} },
  { 0x81a0,	16,	{0x25, 0xe0, 0x24, 0xc5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x80, 0x09, 0x7f} },
! { 0x81b0,	16,	{0xff, 0x22, 0x7f, 0xff, 0x22, 0x7f, 0xff, 0x22, 0x74, 0x07, 0x25, 0x4f, 0xf5, 0x4f, 0xe4, 0x35} },
! { 0x81c0,	16,	{0x4e, 0xf5, 0x4e, 0x02, 0x80, 0x51, 0x20, 0x03, 0x0d, 0x90, 0x02, 0xae, 0xe0, 0x60, 0x07, 0x90} },
  { 0x81d0,	8,	{0x7f, 0xae, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x00} },
  { 0x81d8,	1,	{0x22} },
  { 0x81d9,	2,	{0xac, 0x07} },
***************
*** 508,1076 ****
  { 0x828b,	16,	{0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f, 0xfa, 0x22, 0xc2, 0xaf, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
  { 0x829b,	12,	{0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0xd2, 0xaf, 0xff, 0x7e, 0x00} },
  { 0x82a7,	1,	{0x22} },
! { 0x82a8,	2,	{0xae, 0x07} },
! { 0x82aa,	16,	{0x7c, 0x02, 0xec, 0x14, 0x60, 0x15, 0x14, 0x70, 0x1e, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0} },
! { 0x82ba,	16,	{0xee, 0x25, 0xe0, 0x44, 0x40, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xa6, 0xed, 0xf0} },
! { 0x82ca,	16,	{0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xfb, 0x30, 0xe0, 0xf8, 0xbc} },
! { 0x82da,	16,	{0x02, 0x0a, 0x20, 0xe1, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22, 0xeb, 0x30, 0xe2, 0x0a} },
! { 0x82ea,	14,	{0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xdc, 0xb6, 0x7f, 0x08} },
! { 0x82f8,	1,	{0x22} },
! { 0x82f9,	16,	{0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xf5} },
! { 0x8309,	16,	{0x83, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x5f, 0x74, 0xbf} },
! { 0x8319,	16,	{0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x44, 0x10, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3} },
! { 0x8329,	16,	{0xa3, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xf0, 0xf9, 0xed, 0x60, 0x1d, 0x74, 0x01} },
! { 0x8339,	16,	{0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4} },
! { 0x8349,	16,	{0xef, 0x55, 0x3c, 0x60, 0x04, 0x79, 0x09, 0x80, 0x02, 0x79, 0x0d, 0x8b, 0x82, 0x8a, 0x83, 0xa3} },
! { 0x8359,	16,	{0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x54, 0xef, 0xf0, 0x8b} },
! { 0x8369,	16,	{0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x5f, 0xf0, 0xae, 0x02, 0xaf, 0x03, 0x8f, 0x82, 0x8e} },
! { 0x8379,	4,	{0x83, 0xa3, 0xe9, 0xf0} },
! { 0x837d,	1,	{0x22} },
! { 0x837e,	4,	{0x8f, 0x5f, 0x8d, 0x60} },
! { 0x8382,	16,	{0xe4, 0xf5, 0x61, 0x74, 0x3d, 0x2f, 0xf8, 0x76, 0x08, 0xe5, 0x5f, 0x75, 0xf0, 0x0d, 0xa4, 0x24} },
! { 0x8392,	16,	{0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
! { 0x83a2,	16,	{0xa3, 0xe0, 0xff, 0x7b, 0x80, 0x7a, 0x25, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0xa1, 0xb7, 0x50} },
! { 0x83b2,	16,	{0x3c, 0xe5, 0x5f, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83} },
! { 0x83c2,	16,	{0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x96, 0x78} },
! { 0x83d2,	16,	{0x00, 0xc3, 0x12, 0xa1, 0xb7, 0x40, 0x0c, 0x75, 0x61, 0x40, 0x74, 0x3d, 0x25, 0x5f, 0xf8, 0x76} },
! { 0x83e2,	16,	{0x10, 0x80, 0x0a, 0x75, 0x61, 0x80, 0x74, 0x3d, 0x25, 0x5f, 0xf8, 0x76, 0x38, 0xe5, 0x61, 0x45} },
! { 0x83f2,	16,	{0x60, 0x44, 0x01, 0xff, 0xe5, 0x5f, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34} },
! { 0x8402,	5,	{0x20, 0xf5, 0x83, 0xef, 0xf0} },
! { 0x8407,	1,	{0x22} },
! { 0x8408,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x55, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
! { 0x8418,	16,	{0xe5, 0x55, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5} },
! { 0x8428,	16,	{0x56, 0x8f, 0x57, 0xe5, 0x55, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
! { 0x8438,	16,	{0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x55, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} },
! { 0x8448,	16,	{0x83, 0xe4, 0xf0, 0x74, 0x22, 0x25, 0x55, 0xf8, 0xe4, 0xf6, 0xe5, 0x57, 0x24, 0x04, 0xf5, 0x82} },
! { 0x8458,	16,	{0xe4, 0x35, 0x56, 0xf5, 0x83, 0xe0, 0x44, 0x03, 0xf0, 0xaf, 0x55, 0x7d, 0x06, 0x12, 0x83, 0x7e} },
! { 0x8468,	16,	{0xaf, 0x55, 0x7d, 0x01, 0x12, 0x82, 0xf9, 0x85, 0x57, 0x82, 0x85, 0x56, 0x83, 0xa3, 0xa3, 0xe0} },
! { 0x8478,	16,	{0x20, 0xe0, 0x22, 0xe0, 0xff, 0xe5, 0x57, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x56, 0xf5, 0x83} },
! { 0x8488,	16,	{0xe0, 0xe5, 0x57, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x56, 0xf5, 0x83, 0xe0, 0xff, 0xaf, 0x55} },
! { 0x8498,	16,	{0x7d, 0x06, 0x12, 0x83, 0x7e, 0x74, 0xf8, 0x25, 0x55, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} },
! { 0x84a8,	16,	{0xe4, 0xf0, 0xe5, 0x55, 0x25, 0xe0, 0xff, 0xc3, 0x74, 0x0c, 0x9f, 0x75, 0xf0, 0x40, 0xa4, 0x24} },
! { 0x84b8,	16,	{0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xaf, 0x82, 0xfe, 0xe5, 0x55, 0x25, 0xe0, 0x24, 0xef} },
! { 0x84c8,	16,	{0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0xaf, 0x55, 0x74, 0x01} },
! { 0x84d8,	13,	{0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x31, 0x7f, 0x00} },
! { 0x84e5,	1,	{0x22} },
! { 0x84e6,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x55, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
! { 0x84f6,	16,	{0xaf, 0x55, 0xe4, 0xfd, 0x12, 0x82, 0xf9, 0x74, 0xf8, 0x25, 0x55, 0xf5, 0x82, 0xe4, 0x34, 0x02} },
! { 0x8506,	16,	{0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x55, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34} },
! { 0x8516,	16,	{0x20, 0xaf, 0x82, 0xf5, 0x57, 0x8f, 0x58, 0xf5, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4} },
! { 0x8526,	16,	{0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf, 0x55, 0x7d, 0x06, 0x12, 0x83, 0x7e, 0xe5} },
! { 0x8536,	16,	{0x58, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x57, 0xf5, 0x83, 0xe0, 0x30, 0xe0, 0x09, 0x85, 0x58} },
! { 0x8546,	16,	{0x82, 0x85, 0x57, 0x83, 0xe0, 0xf5, 0x56, 0xaf, 0x55, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02} },
! { 0x8556,	16,	{0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x31, 0xe5, 0x55, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82, 0xe4} },
! { 0x8566,	16,	{0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x55, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82} },
! { 0x8576,	9,	{0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x7f, 0x00} },
! { 0x857f,	1,	{0x22} },
! { 0x8580,	4,	{0x8e, 0x55, 0x8f, 0x56} },
! { 0x8584,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x57, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
! { 0x8594,	16,	{0xe5, 0x57, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0} },
! { 0x85a4,	16,	{0x54, 0x03, 0x70, 0x24, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0x30, 0xe0, 0x07, 0xaf} },
! { 0x85b4,	16,	{0x57, 0x7d, 0x02, 0x12, 0x83, 0x7e, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0x30, 0xe1} },
! { 0x85c4,	10,	{0x07, 0xaf, 0x57, 0x7d, 0x04, 0x12, 0x83, 0x7e, 0x7f, 0x00} },
! { 0x85ce,	1,	{0x22} },
! { 0x85cf,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0xa3, 0xa3, 0xa3, 0xe0, 0xfc, 0xed} },
! { 0x85df,	16,	{0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xc0, 0x83, 0xc0} },
! { 0x85ef,	16,	{0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0} },
! { 0x85ff,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0xe0, 0xfd, 0xec, 0x6d, 0xd0} },
! { 0x860f,	16,	{0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f} },
! { 0x861f,	16,	{0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82} },
! { 0x862f,	16,	{0x8e, 0x83, 0xa3, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0} },
! { 0x863f,	16,	{0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0} },
! { 0x864f,	16,	{0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xff, 0xed, 0x6f, 0xd0, 0x82, 0xd0} },
! { 0x865f,	3,	{0x83, 0xf0, 0x22} },
! { 0x8662,	4,	{0xad, 0x07, 0xac, 0x06} },
! { 0x8666,	16,	{0x79, 0x0d, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff} },
! { 0x8676,	16,	{0x22, 0x8c, 0x55, 0x8d, 0x56, 0xee, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34} },
! { 0x8686,	16,	{0x03, 0xaf, 0x82, 0xfe, 0xad, 0x01, 0x19, 0xed, 0x60, 0x24, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01} },
! { 0x8696,	16,	{0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05, 0x56, 0xe5, 0x56, 0xaa, 0x55, 0x70, 0x02} },
! { 0x86a6,	16,	{0x05, 0x55, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0, 0x6d, 0x60, 0xd9, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
! { 0x86b6,	1,	{0x22} },
! { 0x86b7,	4,	{0x8e, 0x55, 0x8f, 0x56} },
! { 0x86bb,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x5c, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
! { 0x86cb,	16,	{0xe5, 0x5c, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5} },
! { 0x86db,	16,	{0x5d, 0x8f, 0x5e, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} },
! { 0x86eb,	16,	{0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x08, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xd3, 0x12, 0xa1} },
! { 0x86fb,	16,	{0xb7, 0x40, 0x10, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0x12, 0xa1, 0xfe, 0x00, 0x00, 0x00} },
! { 0x870b,	16,	{0x08, 0x80, 0x2e, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} },
! { 0x871b,	16,	{0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x08, 0x79, 0x07, 0x78, 0x00, 0xc3, 0x12, 0xa1} },
! { 0x872b,	16,	{0xb7, 0x50, 0x0e, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0x12, 0xa1, 0xfe, 0x00, 0x07, 0x08} },
! { 0x873b,	16,	{0x00, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa} },
! { 0x874b,	16,	{0xa3, 0xe0, 0xfb, 0x7f, 0x00, 0x7e, 0x50, 0x7d, 0x46, 0x7c, 0x00, 0x12, 0xa1, 0x25, 0x8f, 0x5a} },
! { 0x875b,	16,	{0x8e, 0x59, 0x8d, 0x58, 0x8c, 0x57, 0x7b, 0x0a, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa1} },
! { 0x876b,	16,	{0x25, 0xaf, 0x03, 0x8f, 0x5b, 0xaf, 0x5a, 0xae, 0x59, 0xad, 0x58, 0xac, 0x57, 0x7b, 0x0a, 0x7a} },
! { 0x877b,	16,	{0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa1, 0x25, 0x8f, 0x5a, 0x8e, 0x59, 0x8d, 0x58, 0x8c, 0x57} },
! { 0x878b,	16,	{0xe5, 0x5b, 0xc3, 0x94, 0x05, 0x40, 0x15, 0xe5, 0x5a, 0x24, 0x01, 0xf5, 0x5a, 0xe4, 0x35, 0x59} },
! { 0x879b,	16,	{0xf5, 0x59, 0xe4, 0x35, 0x58, 0xf5, 0x58, 0xe4, 0x35, 0x57, 0xf5, 0x57, 0x85, 0x5e, 0x82, 0x85} },
! { 0x87ab,	16,	{0x5d, 0x83, 0xa3, 0xe4, 0xf0, 0x85, 0x5e, 0x82, 0x85, 0x5d, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44} },
! { 0x87bb,	16,	{0x80, 0xf0, 0x85, 0x5e, 0x82, 0x85, 0x5d, 0x83, 0xe5, 0x5a, 0xf0, 0xaf, 0x5a, 0xae, 0x59, 0xad} },
! { 0x87cb,	16,	{0x58, 0xac, 0x57, 0x78, 0x08, 0x12, 0xa1, 0xc8, 0x85, 0x5e, 0x82, 0x85, 0x5d, 0x83, 0xa3, 0xef} },
! { 0x87db,	16,	{0xf0, 0x85, 0x5e, 0x82, 0x85, 0x5d, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5} },
! { 0x87eb,	16,	{0x5b, 0xe5, 0x56, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0xff, 0xb4, 0x62} },
! { 0x87fb,	16,	{0x05, 0x43, 0x5b, 0x0a, 0x80, 0x1a, 0xef, 0xb4, 0x72, 0x05, 0x43, 0x5b, 0x08, 0x80, 0x11, 0xef} },
! { 0x880b,	16,	{0xb4, 0x74, 0x05, 0x43, 0x5b, 0x02, 0x80, 0x08, 0xef, 0x64, 0x6e, 0x60, 0x03, 0x7f, 0xff, 0x22} },
! { 0x881b,	16,	{0xe5, 0x56, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe3, 0x03} },
! { 0x882b,	16,	{0x43, 0x5b, 0x80, 0xef, 0x30, 0xe7, 0x12, 0x43, 0x5b, 0x40, 0xe5, 0x5e, 0x24, 0x04, 0xf5, 0x82} },
! { 0x883b,	16,	{0xe4, 0x35, 0x5d, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x56, 0x24, 0x0b, 0xf5, 0x82, 0xe4} },
! { 0x884b,	16,	{0x35, 0x55, 0xf5, 0x83, 0xe0, 0xff, 0x20, 0xe1, 0x03, 0x30, 0xe4, 0x23, 0xaf, 0x5c, 0x74, 0x01} },
! { 0x885b,	16,	{0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3c, 0xe5, 0x5e, 0x24, 0x04, 0xf5} },
! { 0x886b,	16,	{0x82, 0xe4, 0x35, 0x5d, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0xe4, 0xf5, 0x5b, 0x80, 0x10, 0xaf} },
! { 0x887b,	16,	{0x5c, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x3c, 0x85} },
! { 0x888b,	16,	{0x5e, 0x82, 0x85, 0x5d, 0x83, 0xa3, 0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x85, 0x5e, 0x82, 0x85, 0x5d} },
! { 0x889b,	16,	{0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x5b, 0xf0, 0xe5, 0x56, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35} },
! { 0x88ab,	16,	{0x55, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5e, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5d, 0xf5, 0x83} },
! { 0x88bb,	16,	{0xef, 0xf0, 0xe5, 0x56, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0xff, 0xe5} },
! { 0x88cb,	16,	{0x5e, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x5d, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x56, 0x24, 0x09} },
! { 0x88db,	16,	{0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5e, 0x24, 0x06, 0xf5, 0x82, 0xe4} },
! { 0x88eb,	16,	{0x35, 0x5d, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x56, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5} },
! { 0x88fb,	16,	{0x83, 0xe0, 0xff, 0xe5, 0x5e, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x5d, 0xf5, 0x83, 0xef, 0xf0} },
! { 0x890b,	16,	{0x85, 0x5e, 0x82, 0x85, 0x5d, 0x83, 0xa3, 0xa3, 0xa3, 0xe4, 0xf0, 0x85, 0x5e, 0x82, 0x85, 0x5d} },
! { 0x891b,	16,	{0x83, 0xa3, 0xa3, 0xf0, 0xaf, 0x5c, 0x7d, 0x06, 0x12, 0x83, 0x7e, 0x75, 0x5b, 0x08, 0xe5, 0x56} },
! { 0x892b,	16,	{0x24, 0x0c, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0x43, 0x5b, 0x10, 0xe5} },
! { 0x893b,	16,	{0x5e, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5d, 0xf5, 0x83, 0xe0, 0x54, 0x03, 0x45, 0x5b, 0xf0} },
! { 0x894b,	16,	{0xe5, 0x56, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0xfe, 0xc3, 0x94, 0x05} },
! { 0x895b,	16,	{0x40, 0x06, 0xee, 0xd3, 0x94, 0x08, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x56, 0x24, 0x06, 0xf5} },
! { 0x896b,	16,	{0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0xfd, 0xc3, 0x94, 0x01, 0x40, 0x06, 0xed, 0xd3, 0x94} },
! { 0x897b,	16,	{0x02, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xed, 0x14, 0xff, 0x25, 0xe0, 0x25, 0xe0, 0xff, 0xee, 0x24} },
! { 0x898b,	16,	{0xfb, 0x4f, 0xf5, 0x5b, 0xe5, 0x56, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0} },
! { 0x899b,	16,	{0x24, 0xd0, 0x60, 0x18, 0x14, 0x60, 0x1a, 0x24, 0xc3, 0x60, 0x1e, 0x14, 0x60, 0x09, 0x24, 0x0a} },
! { 0x89ab,	16,	{0x70, 0x14, 0x43, 0x5b, 0x18, 0x80, 0x12, 0x43, 0x5b, 0x08, 0x80, 0x0d, 0x43, 0x5b, 0x38, 0x80} },
! { 0x89bb,	16,	{0x08, 0x43, 0x5b, 0x28, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x85, 0x5e, 0x82, 0x85, 0x5d, 0x83, 0xa3} },
! { 0x89cb,	16,	{0xa3, 0xa3, 0xe5, 0x5b, 0xf0, 0xaf, 0x5c, 0x7d, 0x01, 0x12, 0x82, 0xf9, 0xaa, 0x55, 0xa9, 0x56} },
! { 0x89db,	16,	{0x7b, 0x01, 0xc0, 0x01, 0xe5, 0x5c, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35} },
! { 0x89eb,	15,	{0xf0, 0xa8, 0x01, 0xfc, 0xd0, 0x01, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0xa0, 0x16, 0x7f, 0x00} },
! { 0x89fa,	1,	{0x22} },
! { 0x89fb,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
! { 0x8a0b,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0x90, 0x01} },
! { 0x8a1b,	16,	{0x2c, 0x74, 0x08, 0xf0, 0xee, 0x04, 0xa3, 0xf0, 0xe4, 0xa3, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xe5} },
! { 0x8a2b,	16,	{0x82, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x2f, 0xf0, 0x8d} },
! { 0x8a3b,	16,	{0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54} },
! { 0x8a4b,	16,	{0x1e, 0x90, 0x01, 0x30, 0xf0, 0x74, 0x2c, 0x2e, 0xf8, 0xe6, 0xa3, 0xf0, 0xaf, 0x06, 0x74, 0x01} },
! { 0x8a5b,	16,	{0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x55, 0xe5, 0x30, 0xc3, 0x94, 0x01} },
! { 0x8a6b,	16,	{0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x56, 0x00, 0xf5, 0x57, 0x80, 0x09, 0x7f} },
! { 0x8a7b,	16,	{0x02, 0x12, 0x81, 0xd9, 0x8e, 0x56, 0x8f, 0x57, 0xc3, 0xe5, 0x56, 0x64, 0x80, 0x94, 0x80, 0x40} },
! { 0x8a8b,	16,	{0xda, 0xe5, 0x55, 0x55, 0x57, 0x90, 0x01, 0x32, 0xf0, 0x7e, 0x01, 0x7f, 0x2c, 0x7d, 0x07, 0x12} },
! { 0x8a9b,	4,	{0x8f, 0x6e, 0x7f, 0x00} },
! { 0x8a9f,	1,	{0x22} },
! { 0x8aa0,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
! { 0x8ab0,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x90, 0x01} },
! { 0x8ac0,	16,	{0x33, 0x74, 0x0a, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35} },
! { 0x8ad0,	16,	{0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x34, 0xf0, 0x7e, 0x01, 0x7f, 0x33, 0x7d, 0x02, 0x12, 0x8f} },
! { 0x8ae0,	3,	{0x6e, 0x7f, 0x00} },
! { 0x8ae3,	1,	{0x22} },
! { 0x8ae4,	4,	{0xad, 0x07, 0xac, 0x06} },
! { 0x8ae8,	16,	{0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
! { 0x8af8,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
! { 0x8b08,	16,	{0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0} },
! { 0x8b18,	16,	{0x44, 0x02, 0xf0, 0x80, 0x0d, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54} },
! { 0x8b28,	4,	{0xfd, 0xf0, 0x7f, 0x00} },
! { 0x8b2c,	1,	{0x22} },
! { 0x8b2d,	4,	{0xad, 0x07, 0xac, 0x06} },
! { 0x8b31,	16,	{0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
! { 0x8b41,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
! { 0x8b51,	16,	{0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0} },
! { 0x8b61,	16,	{0x44, 0x01, 0xf0, 0x80, 0x0d, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54} },
! { 0x8b71,	4,	{0xfe, 0xf0, 0x7f, 0x00} },
! { 0x8b75,	1,	{0x22} },
! { 0x8b76,	4,	{0xad, 0x07, 0xac, 0x06} },
! { 0x8b7a,	16,	{0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
! { 0x8b8a,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
! { 0x8b9a,	16,	{0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0d, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x40} },
! { 0x8baa,	16,	{0xf0, 0x80, 0x0b, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x00} },
! { 0x8bba,	1,	{0x22} },
! { 0x8bbb,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xaf} },
! { 0x8bcb,	16,	{0x06, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3b, 0x7f, 0x00} },
! { 0x8bdb,	1,	{0x22} },
! { 0x8bdc,	4,	{0x8e, 0x55, 0x8f, 0x56} },
! { 0x8be0,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0, 0xf5, 0x5a, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xf5, 0x57, 0xd3} },
! { 0x8bf0,	16,	{0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x57, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x1f} },
! { 0x8c00,	16,	{0x14, 0x60, 0x28, 0x24, 0x03, 0x70, 0x2e, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x58, 0x7e, 0x75, 0x59} },
! { 0x8c10,	16,	{0x80, 0x80, 0x22, 0x7e, 0x7e, 0x7f, 0x00, 0x75, 0x58, 0x7e, 0x75, 0x59, 0x00, 0x80, 0x16, 0x7e} },
! { 0x8c20,	16,	{0x7d, 0x7f, 0x80, 0x75, 0x58, 0x7d, 0x75, 0x59, 0x80, 0x80, 0x0a, 0x7e, 0x7d, 0x7f, 0x00, 0x75} },
! { 0x8c30,	16,	{0x58, 0x7d, 0x75, 0x59, 0x00, 0xe5, 0x5a, 0x70, 0x1b, 0x85, 0x59, 0x82, 0x85, 0x58, 0x83, 0x74} },
! { 0x8c40,	16,	{0xff, 0xf0, 0xe5, 0x57, 0x25, 0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74} },
! { 0x8c50,	16,	{0x01, 0xf0, 0x80, 0x48, 0xe5, 0x56, 0x24, 0x02, 0xff, 0xe4, 0x35, 0x55, 0xfe, 0xe5, 0x5a, 0x60} },
! { 0x8c60,	16,	{0x23, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05} },
! { 0x8c70,	16,	{0x59, 0xe5, 0x59, 0xaa, 0x58, 0x70, 0x02, 0x05, 0x58, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0} },
! { 0x8c80,	16,	{0x15, 0x5a, 0x80, 0xd9, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0xff, 0xe5, 0x57, 0x25} },
! { 0x8c90,	14,	{0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x7f, 0x00} },
! { 0x8c9e,	1,	{0x22} },
! { 0x8c9f,	16,	{0xef, 0x24, 0x05, 0xf5, 0x56, 0xe4, 0x3e, 0xf5, 0x55, 0x90, 0x01, 0x35, 0x74, 0x07, 0xf0, 0x90} },
! { 0x8caf,	16,	{0x01, 0x7a, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x36, 0xf0, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3} },
! { 0x8cbf,	16,	{0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x57, 0xf5, 0x58, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83} },
! { 0x8ccf,	16,	{0xe0, 0x24, 0x9e, 0x60, 0x61, 0x24, 0xf9, 0x60, 0x0e, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8d, 0x80} },
! { 0x8cdf,	16,	{0x24, 0x14, 0x60, 0x03, 0x02, 0x8d, 0xcc, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0xfe} },
! { 0x8cef,	16,	{0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f, 0xf5, 0x5a, 0x74, 0x01, 0x9e, 0xf5, 0x59, 0xd3, 0xe5, 0x5a} },
! { 0x8cff,	16,	{0x94, 0x40, 0xe5, 0x59, 0x94, 0x00, 0x40, 0x06, 0x75, 0x59, 0x00, 0x75, 0x5a, 0x40, 0xd3, 0xe5} },
! { 0x8d0f,	16,	{0x58, 0x95, 0x5a, 0xe5, 0x57, 0x95, 0x59, 0x50, 0x03, 0x02, 0x8d, 0xcf, 0xae, 0x59, 0xaf, 0x5a} },
! { 0x8d1f,	16,	{0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e} },
! { 0x8d2f,	16,	{0x57, 0xf5, 0x58, 0x02, 0x8d, 0xcf, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0xfe, 0xa3} },
! { 0x8d3f,	16,	{0xe0, 0xff, 0xc3, 0x74, 0x30, 0x9f, 0xf5, 0x5a, 0xe4, 0x9e, 0xf5, 0x59, 0xd3, 0xe5, 0x5a, 0x94} },
! { 0x8d4f,	16,	{0x10, 0xe5, 0x59, 0x94, 0x00, 0x40, 0x06, 0x75, 0x59, 0x00, 0x75, 0x5a, 0x10, 0xd3, 0xe5, 0x58} },
! { 0x8d5f,	16,	{0x95, 0x5a, 0xe5, 0x57, 0x95, 0x59, 0x40, 0x68, 0xae, 0x59, 0xaf, 0x5a, 0x85, 0x56, 0x82, 0x85} },
! { 0x8d6f,	16,	{0x55, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x57, 0xf5, 0x58, 0x80} },
! { 0x8d7f,	16,	{0x4f, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f} },
! { 0x8d8f,	16,	{0xf5, 0x5a, 0xe4, 0x9e, 0xf5, 0x59, 0x45, 0x5a, 0x60, 0x0b, 0xd3, 0xe5, 0x5a, 0x94, 0x40, 0xe5} },
! { 0x8d9f,	16,	{0x59, 0x94, 0x00, 0x40, 0x06, 0x75, 0x59, 0x00, 0x75, 0x5a, 0x40, 0xd3, 0xe5, 0x58, 0x95, 0x5a} },
! { 0x8daf,	16,	{0xe5, 0x57, 0x95, 0x59, 0x40, 0x17, 0xae, 0x59, 0xaf, 0x5a, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83} },
! { 0x8dbf,	16,	{0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x57, 0xf5, 0x58, 0x7f, 0x01, 0x22} },
! { 0x8dcf,	16,	{0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xe0, 0x24, 0x9e, 0x70, 0x03, 0x02, 0x8e, 0x8f, 0x24, 0xf9} },
! { 0x8ddf,	16,	{0x60, 0x58, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8e, 0xdf, 0x24, 0x14, 0x60, 0x03, 0x02, 0x8f, 0x23} },
! { 0x8def,	16,	{0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xd3, 0x94, 0xff, 0xee} },
! { 0x8dff,	16,	{0x94, 0x00, 0x40, 0x03, 0x02, 0x8f, 0x23, 0x90, 0x01, 0x75, 0xef, 0xf0, 0xe5, 0x58, 0x15, 0x58} },
! { 0x8e0f,	16,	{0xae, 0x57, 0x70, 0x02, 0x15, 0x57, 0x4e, 0x70, 0x03, 0x02, 0x8f, 0x23, 0x90, 0x01, 0x75, 0xe0} },
! { 0x8e1f,	16,	{0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa0} },
! { 0x8e2f,	16,	{0x9b, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83} },
! { 0x8e3f,	16,	{0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x80, 0xee, 0x94, 0x00, 0x50, 0x03, 0x02, 0x8f} },
! { 0x8e4f,	16,	{0x23, 0xd3, 0xef, 0x94, 0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x8f, 0x23, 0x90, 0x01, 0x76} },
! { 0x8e5f,	16,	{0xef, 0xf0, 0xe5, 0x58, 0x15, 0x58, 0xae, 0x57, 0x70, 0x02, 0x15, 0x57, 0x4e, 0x70, 0x03, 0x02} },
! { 0x8e6f,	16,	{0x8f, 0x23, 0x90, 0x01, 0x76, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} },
! { 0x8e7f,	16,	{0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa0, 0x9b, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2} },
! { 0x8e8f,	16,	{0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x20, 0xee} },
! { 0x8e9f,	16,	{0x94, 0x00, 0x50, 0x03, 0x02, 0x8f, 0x23, 0xd3, 0xef, 0x94, 0x2f, 0xee, 0x94, 0x00, 0x50, 0x74} },
! { 0x8eaf,	16,	{0x90, 0x01, 0x77, 0xef, 0xf0, 0xe5, 0x58, 0x15, 0x58, 0xae, 0x57, 0x70, 0x02, 0x15, 0x57, 0x4e} },
! { 0x8ebf,	16,	{0x60, 0x62, 0x90, 0x01, 0x77, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} },
! { 0x8ecf,	16,	{0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa0, 0x9b, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd5} },
! { 0x8edf,	16,	{0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0x01, 0x78, 0xcf, 0xf0} },
! { 0x8eef,	16,	{0xa3, 0xef, 0xf0, 0xe5, 0x58, 0x15, 0x58, 0xae, 0x57, 0x70, 0x02, 0x15, 0x57, 0x4e, 0x60, 0x24} },
! { 0x8eff,	16,	{0x90, 0x01, 0x78, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa0, 0x9b, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0} },
! { 0x8f0f,	16,	{0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0xa0, 0x9b, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
! { 0x8f1f,	16,	{0xef, 0xf0, 0x80, 0xcf, 0x7e, 0x01, 0x7f, 0x35, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xa3} },
! { 0x8f2f,	11,	{0xa3, 0xe0, 0xa3, 0xe0, 0x04, 0xfd, 0x12, 0x8f, 0x6e, 0x7f, 0x00} },
! { 0x8f3a,	1,	{0x22} },
! { 0x8f3b,	16,	{0x8e, 0x60, 0x8f, 0x61, 0x8c, 0x62, 0x8d, 0x63, 0xaf, 0x03, 0x1b, 0xef, 0x60, 0x24, 0x05, 0x61} },
! { 0x8f4b,	16,	{0xe5, 0x61, 0xae, 0x60, 0x70, 0x02, 0x05, 0x60, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05} },
! { 0x8f5b,	16,	{0x63, 0xe5, 0x63, 0xac, 0x62, 0x70, 0x02, 0x05, 0x62, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
! { 0x8f6b,	3,	{0x80, 0xd6, 0x22} },
! { 0x8f6e,	6,	{0x8d, 0x5b, 0xab, 0x07, 0xaa, 0x06} },
! { 0x8f74,	16,	{0x75, 0x5f, 0x40, 0x75, 0x5e, 0x0d, 0x75, 0x5d, 0x03, 0x75, 0x5c, 0x00, 0x90, 0x7f, 0xc2, 0xe0} },
! { 0x8f84,	16,	{0x20, 0xe1, 0xf9, 0xaf, 0x5f, 0xae, 0x5e, 0xad, 0x5d, 0xac, 0x5c, 0xec, 0x4d, 0x4e, 0x4f, 0x70} },
! { 0x8f94,	16,	{0x08, 0x90, 0x7f, 0xc2, 0x74, 0x02, 0xf0, 0x80, 0xd7, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x16} },
! { 0x8fa4,	16,	{0xaf, 0x03, 0xae, 0x02, 0x7c, 0x7b, 0x7d, 0x80, 0xab, 0x5b, 0x12, 0x8f, 0x3b, 0x90, 0x7f, 0xc3} },
! { 0x8fb4,	8,	{0xe5, 0x5b, 0xf0, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
! { 0x8fbc,	1,	{0x22} },
! { 0x8fbd,	16,	{0x90, 0x01, 0x84, 0x74, 0x0b, 0xf0, 0xa3, 0xe5, 0x30, 0xf0, 0x90, 0x0a, 0xf1, 0xe4, 0x93, 0x90} },
! { 0x8fcd,	16,	{0x01, 0x86, 0xf0, 0x90, 0x0a, 0xf2, 0xe4, 0x93, 0x90, 0x01, 0x87, 0xf0, 0xe4, 0x90, 0x01, 0x7c} },
! { 0x8fdd,	16,	{0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01} },
! { 0x8fed,	16,	{0xf0, 0xa3, 0x74, 0x88, 0xf0, 0x7e, 0x01, 0x7f, 0x7c, 0x12, 0x19, 0xc1, 0x7e, 0x01, 0x7f, 0x84} },
! { 0x8ffd,	7,	{0x7d, 0x14, 0x12, 0x8f, 0x6e, 0x7f, 0x00} },
! { 0x9004,	1,	{0x22} },
! { 0x9005,	16,	{0x7e, 0x7b, 0x7f, 0x40, 0x75, 0x4c, 0x7b, 0x75, 0x4d, 0x40, 0x90, 0x7f, 0xd3, 0xe0, 0xff, 0x85} },
! { 0x9015,	16,	{0x4c, 0x4f, 0x85, 0x4d, 0x50, 0xe5, 0x50, 0x24, 0x01, 0xf5, 0x54, 0xe4, 0x35, 0x4f, 0xf5, 0x53} },
! { 0x9025,	16,	{0xe4, 0xf5, 0x4e, 0x85, 0x50, 0x82, 0x85, 0x4f, 0x83, 0xe0, 0xfe, 0x14, 0xb4, 0x0c, 0x00, 0x50} },
! { 0x9035,	16,	{0x5b, 0x90, 0x90, 0x3d, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x90, 0x61, 0x02, 0x90, 0x61, 0x02, 0x90} },
! { 0x9045,	16,	{0x6b, 0x02, 0x90, 0x75, 0x02, 0x90, 0x75, 0x02, 0x90, 0x75, 0x02, 0x90, 0x89, 0x02, 0x90, 0x61} },
! { 0x9055,	16,	{0x02, 0x90, 0x7f, 0x02, 0x90, 0x61, 0x02, 0x90, 0x91, 0x02, 0x90, 0x61, 0xef, 0x64, 0x02, 0x60} },
! { 0x9065,	16,	{0x2b, 0x75, 0x4e, 0xff, 0x80, 0x26, 0xef, 0x64, 0x0e, 0x60, 0x21, 0x75, 0x4e, 0xff, 0x80, 0x1c} },
! { 0x9075,	16,	{0xef, 0x64, 0x03, 0x60, 0x17, 0x75, 0x4e, 0xff, 0x80, 0x12, 0xef, 0x64, 0x03, 0x60, 0x0d, 0x75} },
! { 0x9085,	16,	{0x4e, 0xff, 0x80, 0x08, 0xef, 0x64, 0x06, 0x60, 0x03, 0x75, 0x4e, 0xff, 0xe5, 0x4e, 0x60, 0x15} },
! { 0x9095,	16,	{0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0xa3, 0xee, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12} },
! { 0x90a5,	16,	{0x8f, 0x6e, 0xaf, 0x4e, 0x22, 0xe4, 0xf5, 0x4e, 0x85, 0x50, 0x82, 0x85, 0x4f, 0x83, 0xe0, 0x14} },
! { 0x90b5,	16,	{0xb4, 0x0f, 0x00, 0x40, 0x03, 0x02, 0x91, 0xd3, 0x90, 0x90, 0xc4, 0xf8, 0x28, 0x28, 0x73, 0x02} },
! { 0x90c5,	16,	{0x90, 0xf1, 0x02, 0x90, 0xfd, 0x02, 0x91, 0x09, 0x02, 0x91, 0x57, 0x02, 0x91, 0x62, 0x02, 0x91} },
! { 0x90d5,	16,	{0x6d, 0x02, 0x91, 0x78, 0x02, 0x91, 0x83, 0x02, 0x91, 0x8e, 0x02, 0x91, 0x99, 0x02, 0x91, 0xa4} },
! { 0x90e5,	16,	{0x02, 0x91, 0xab, 0x02, 0x91, 0xd3, 0x02, 0x91, 0xb6, 0x02, 0x91, 0xc1, 0xaf, 0x54, 0xae, 0x53} },
! { 0x90f5,	16,	{0x12, 0x84, 0x08, 0x8f, 0x4e, 0x02, 0x91, 0xd6, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x84, 0xe6, 0x8f} },
! { 0x9105,	16,	{0x4e, 0x02, 0x91, 0xd6, 0x85, 0x53, 0x51, 0x85, 0x54, 0x52, 0xe5, 0x52, 0x24, 0x01, 0xff, 0xe4} },
! { 0x9115,	16,	{0x35, 0x51, 0xfe, 0x12, 0x85, 0xcf, 0xaf, 0x52, 0xae, 0x51, 0x12, 0x86, 0x62, 0x8f, 0x4e, 0xef} },
! { 0x9125,	16,	{0x64, 0x01, 0x60, 0x03, 0x02, 0x91, 0xd6, 0xaf, 0x52, 0xae, 0x51, 0x12, 0x86, 0xb7, 0x8f, 0x4e} },
! { 0x9135,	16,	{0xe5, 0x4e, 0x70, 0x03, 0x02, 0x91, 0xd6, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xe0, 0x75, 0xf0} },
! { 0x9145,	16,	{0x0d, 0xa4, 0x24, 0xf4, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xaf, 0x82, 0xfe, 0x12, 0x86, 0xb7, 0x02} },
! { 0x9155,	16,	{0x91, 0xd6, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x8a, 0xe4, 0x8f, 0x4e, 0x80, 0x74, 0xaf, 0x54, 0xae} },
! { 0x9165,	16,	{0x53, 0x12, 0x8b, 0x2d, 0x8f, 0x4e, 0x80, 0x69, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x8b, 0x76, 0x8f} },
! { 0x9175,	16,	{0x4e, 0x80, 0x5e, 0xaf, 0x4d, 0xae, 0x4c, 0x12, 0x8c, 0x9f, 0x8f, 0x4e, 0x80, 0x53, 0xaf, 0x54} },
! { 0x9185,	16,	{0xae, 0x53, 0x12, 0x89, 0xfb, 0x8f, 0x4e, 0x80, 0x48, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x85, 0x80} },
! { 0x9195,	16,	{0x8f, 0x4e, 0x80, 0x3d, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x8a, 0xa0, 0x8f, 0x4e, 0x80, 0x32, 0x12} },
! { 0x91a5,	16,	{0x8f, 0xbd, 0x8f, 0x4e, 0x80, 0x2b, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x8b, 0xbb, 0x8f, 0x4e, 0x80} },
! { 0x91b5,	16,	{0x20, 0xaf, 0x54, 0xae, 0x53, 0x12, 0x8b, 0xdc, 0x8f, 0x4e, 0x80, 0x15, 0xaf, 0x4d, 0xae, 0x4c} },
! { 0x91c5,	16,	{0x7c, 0x02, 0x7d, 0xaf, 0x7b, 0x40, 0x12, 0x8f, 0x3b, 0xe4, 0xf5, 0x4e, 0x80, 0x03, 0x75, 0x4e} },
! { 0x91d5,	16,	{0xff, 0xe5, 0x4e, 0x60, 0x1d, 0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0x85, 0x50, 0x82, 0x85, 0x4f} },
! { 0x91e5,	16,	{0x83, 0xe0, 0x90, 0x01, 0x99, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12, 0x8f, 0x6e, 0xaf} },
! { 0x91f5,	16,	{0x4e, 0x22, 0x85, 0x50, 0x82, 0x85, 0x4f, 0x83, 0xe0, 0xff, 0x14, 0x24, 0xfa, 0x50, 0x04, 0x24} },
! { 0x9205,	16,	{0xfe, 0x70, 0x1f, 0x90, 0x01, 0x98, 0x74, 0x10, 0xf0, 0xa3, 0xef, 0xf0, 0x85, 0x54, 0x82, 0x85} },
! { 0x9215,	16,	{0x53, 0x83, 0xe0, 0x90, 0x01, 0x9a, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x03, 0x12, 0x8f, 0x6e} },
! { 0x9225,	4,	{0x8f, 0x4e, 0xaf, 0x4e} },
! { 0x9229,	1,	{0x22} },
! { 0x922a,	8,	{0x8f, 0x4f, 0x8e, 0x4e, 0x8d, 0x4d, 0x8c, 0x4c} },
! { 0x9232,	16,	{0x75, 0x56, 0x01, 0x75, 0x57, 0x9c, 0xe4, 0xf5, 0x55, 0xaf, 0x51, 0x15, 0x51, 0xef, 0x70, 0x03} },
! { 0x9242,	16,	{0x02, 0x92, 0xc8, 0xaf, 0x50, 0xe4, 0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xaf, 0x4f} },
! { 0x9252,	16,	{0xae, 0x4e, 0xad, 0x4d, 0xac, 0x4c, 0x12, 0xa1, 0x25, 0xaf, 0x03, 0x8f, 0x54, 0xaf, 0x4f, 0xae} },
! { 0x9262,	16,	{0x4e, 0xad, 0x4d, 0xac, 0x4c, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xaf, 0x50, 0xe4} },
! { 0x9272,	16,	{0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04} },
! { 0x9282,	16,	{0x12, 0xa1, 0x25, 0x8f, 0x4f, 0x8e, 0x4e, 0x8d, 0x4d, 0x8c, 0x4c, 0xe5, 0x54, 0x24, 0x30, 0xf5} },
! { 0x9292,	16,	{0x54, 0xd3, 0x94, 0x39, 0x40, 0x06, 0x74, 0x07, 0x25, 0x54, 0xf5, 0x54, 0x05, 0x57, 0xe5, 0x57} },
! { 0x92a2,	16,	{0xae, 0x56, 0x70, 0x02, 0x05, 0x56, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x05, 0x57, 0xe5} },
! { 0x92b2,	16,	{0x57, 0xae, 0x56, 0x70, 0x02, 0x05, 0x56, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x54, 0xf0, 0x05} },
! { 0x92c2,	16,	{0x55, 0x05, 0x55, 0x02, 0x92, 0x3b, 0xe5, 0x57, 0x15, 0x57, 0x70, 0x02, 0x15, 0x56, 0xaf, 0x55} },
! { 0x92d2,	16,	{0x15, 0x55, 0xef, 0x60, 0x23, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0xf5} },
! { 0x92e2,	16,	{0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14} },
! { 0x92f2,	8,	{0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x80, 0xd6} },
! { 0x92fa,	1,	{0x22} },
! { 0x92fb,	16,	{0xe4, 0x90, 0x01, 0xc9, 0xf0, 0x7e, 0x01, 0x7f, 0xca, 0x90, 0x01, 0xbe, 0xee, 0xf0, 0xa3, 0xef} },
! { 0x930b,	10,	{0xf0, 0x90, 0x01, 0xc2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
! { 0x9315,	16,	{0xaa, 0x07, 0xa9, 0x05, 0x90, 0x01, 0xc9, 0xe0, 0xc3, 0x94, 0x40, 0x50, 0x61, 0xac, 0x02, 0x74} },
! { 0x9325,	16,	{0x01, 0x7e, 0x00, 0xa8, 0x04, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff} },
! { 0x9335,	16,	{0xe4, 0xef, 0x55, 0x31, 0x60, 0x45, 0xea, 0x04, 0xff, 0x90, 0x01, 0xc2, 0xe0, 0xfc, 0xa3, 0xe0} },
! { 0x9345,	16,	{0xfd, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0xa3, 0xe9, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
! { 0x9355,	16,	{0xeb, 0xf0, 0x90, 0x01, 0xc2, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0xa0, 0x85, 0xfc, 0xd3, 0xe5, 0xf0} },
! { 0x9365,	16,	{0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xc2, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
! { 0x9375,	16,	{0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x04, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
! { 0x9385,	1,	{0x22} },
! { 0x9386,	16,	{0x90, 0x01, 0xc9, 0xe0, 0xd3, 0x94, 0x00, 0x40, 0x55, 0x90, 0x01, 0xbe, 0xe0, 0xfc, 0xa3, 0xe0} },
! { 0x9396,	16,	{0xaa, 0x04, 0xf9, 0x7b, 0x01, 0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0xaa, 0x06, 0xa9, 0x07, 0xa8} },
! { 0x93a6,	16,	{0x01, 0xac, 0x02, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x03, 0x12} },
! { 0x93b6,	16,	{0xa0, 0x16, 0x90, 0x01, 0xbe, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0xa0, 0x85, 0xfc, 0xd3, 0xe5, 0xf0} },
! { 0x93c6,	16,	{0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xbe, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
! { 0x93d6,	16,	{0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x14, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
! { 0x93e6,	1,	{0x22} },
! { 0x93e7,	16,	{0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x73, 0x7e, 0x7b, 0x7f, 0x80, 0x75, 0x51, 0x7b, 0x75, 0x52} },
! { 0x93f7,	16,	{0x80, 0xe5, 0x52, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x51, 0xa9, 0x07, 0x7b, 0x01, 0x8b, 0x53, 0xf5} },
! { 0x9407,	16,	{0x54, 0x89, 0x55, 0xfe, 0x12, 0x93, 0x86, 0xef, 0x60, 0x50, 0xab, 0x53, 0xaa, 0x54, 0xa9, 0x55} },
! { 0x9417,	16,	{0x12, 0xa0, 0x3f, 0x14, 0xff, 0x90, 0x00, 0x01, 0x12, 0xa0, 0x58, 0xb4, 0x02, 0x16, 0xc2, 0xaf} },
! { 0x9427,	16,	{0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x44} },
! { 0x9437,	16,	{0x04, 0xf0, 0xd2, 0xaf, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce} },
! { 0x9447,	16,	{0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x31, 0x60, 0x0f, 0x85, 0x52, 0x82, 0x85, 0x51} },
! { 0x9457,	10,	{0x83, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0xc3, 0x74, 0x04, 0xf0} },
! { 0x9461,	1,	{0x22} },
! { 0x9462,	16,	{0x12, 0x93, 0xe7, 0xe4, 0xf5, 0x4c, 0x74, 0x37, 0x25, 0x4c, 0xf8, 0xe6, 0x54, 0xf0, 0xf5, 0x4d} },
! { 0x9472,	16,	{0x74, 0xc5, 0x25, 0x4c, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xe0, 0x65, 0x4d, 0xff, 0xc4} },
! { 0x9482,	16,	{0x54, 0x0f, 0xf5, 0x4e, 0x60, 0x22, 0x74, 0xc5, 0x25, 0x4c, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5} },
! { 0x9492,	16,	{0x83, 0xe5, 0x4d, 0xf0, 0xaf, 0x4c, 0x7d, 0x01, 0xe5, 0x4d, 0x45, 0x4e, 0xfb, 0x12, 0x93, 0x15} },
! { 0x94a2,	16,	{0xef, 0x70, 0x05, 0x12, 0x93, 0xe7, 0x80, 0xec, 0x05, 0x4c, 0xe5, 0x4c, 0xc3, 0x94, 0x04, 0x40} },
! { 0x94b2,	16,	{0xb5, 0x12, 0x93, 0xe7, 0xe5, 0x3b, 0x60, 0x48, 0xe4, 0xf5, 0x4c, 0xaf, 0x4c, 0x74, 0x01, 0xa8} },
! { 0x94c2,	16,	{0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4d, 0x55, 0x3b, 0x60, 0x29, 0xe5, 0x4c} },
! { 0x94d2,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
! { 0x94e2,	16,	{0x16, 0xaf, 0x4c, 0x7d, 0x04, 0x7b, 0x80, 0x12, 0x93, 0x15, 0xef, 0x70, 0x05, 0x12, 0x93, 0xe7} },
! { 0x94f2,	16,	{0x80, 0xef, 0xe5, 0x4d, 0xf4, 0x52, 0x3b, 0x05, 0x4c, 0xe5, 0x4c, 0xc3, 0x94, 0x04, 0x40, 0xbb} },
! { 0x9502,	16,	{0x90, 0x03, 0x00, 0xe0, 0x60, 0x03, 0x02, 0x95, 0xe3, 0x74, 0x19, 0xf0, 0xe5, 0x30, 0xc3, 0x94} },
! { 0x9512,	16,	{0x01, 0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x4f, 0x00, 0xf5, 0x50, 0x80, 0x09} },
! { 0x9522,	16,	{0x7f, 0x02, 0x12, 0x81, 0xd9, 0x8e, 0x4f, 0x8f, 0x50, 0xc3, 0xe5, 0x4f, 0x64, 0x80, 0x94, 0x80} },
! { 0x9532,	16,	{0x40, 0xda, 0x90, 0x01, 0xbc, 0xe0, 0x65, 0x50, 0xf0, 0x60, 0x37, 0xe4, 0xf5, 0x4c, 0xaf, 0x4c} },
! { 0x9542,	16,	{0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4d, 0x90, 0x01, 0xbc} },
! { 0x9552,	16,	{0xe0, 0x55, 0x4d, 0x60, 0x14, 0xaf, 0x4c, 0x7d, 0x08, 0xe5, 0x4d, 0x55, 0x50, 0xfb, 0x12, 0x93} },
! { 0x9562,	16,	{0x15, 0xef, 0x70, 0x05, 0x12, 0x93, 0xe7, 0x80, 0xec, 0x05, 0x4c, 0xe5, 0x4c, 0xc3, 0x94, 0x04} },
! { 0x9572,	16,	{0x40, 0xcc, 0x90, 0x01, 0xbc, 0xe5, 0x50, 0xf0, 0xe4, 0xf5, 0x4c, 0xc2, 0xaf, 0x74, 0x33, 0x25} },
! { 0x9582,	16,	{0x4c, 0xf8, 0xe6, 0xf5, 0x4d, 0xe4, 0xf6, 0xd2, 0xaf, 0x53, 0x4d, 0x1e, 0xe5, 0x4d, 0x60, 0x11} },
! { 0x9592,	16,	{0xaf, 0x4c, 0x7d, 0x02, 0xab, 0x4d, 0x12, 0x93, 0x15, 0xef, 0x70, 0x05, 0x12, 0x93, 0xe7, 0x80} },
! { 0x95a2,	16,	{0xef, 0x74, 0x2c, 0x25, 0x4c, 0xf8, 0xe6, 0xf5, 0x4d, 0x74, 0xfc, 0x25, 0x4c, 0xf5, 0x82, 0xe4} },
! { 0x95b2,	16,	{0x34, 0x02, 0xf5, 0x83, 0xe0, 0x65, 0x4d, 0x60, 0x11, 0xaf, 0x4c, 0x7d, 0x04, 0xab, 0x4d, 0x12} },
! { 0x95c2,	16,	{0x93, 0x15, 0xef, 0x70, 0x05, 0x12, 0x93, 0xe7, 0x80, 0xef, 0x74, 0xfc, 0x25, 0x4c, 0xf5, 0x82} },
! { 0x95d2,	16,	{0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe5, 0x4d, 0xf0, 0x05, 0x4c, 0xe5, 0x4c, 0xc3, 0x94, 0x04, 0x40} },
! { 0x95e2,	4,	{0x9a, 0x12, 0x93, 0xe7} },
! { 0x95e6,	1,	{0x22} },
! { 0x95e7,	12,	{0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x63, 0x02, 0x96, 0x2e} },
! { 0x95f3,	16,	{0x02, 0x05, 0xad, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
! { 0x9603,	16,	{0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
! { 0x9613,	16,	{0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
! { 0x9623,	16,	{0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x96, 0x73, 0xe4, 0x7e} },
! { 0x9633,	16,	{0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
! { 0x9643,	16,	{0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
! { 0x9653,	16,	{0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
! { 0x9663,	16,	{0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
! { 0x9673,	16,	{0x60, 0x24, 0x02, 0x8a, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x81, 0x82, 0x84, 0x88} },
! { 0x9683,	16,	{0x90, 0xa0, 0xc0, 0xc1, 0xc2, 0xc4, 0xc8, 0xd0, 0xe0, 0xe1, 0xe2, 0xe4, 0xe8, 0xf0, 0xf1, 0xf2} },
! { 0x9693,	8,	{0xf4, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff} },
! { 0x969b,	1,	{0x00} },
! { 0x969c,	8,	{0x8b, 0x57, 0x8a, 0x58, 0x89, 0x59, 0x8d, 0x5a} },
! { 0x96a4,	16,	{0xe4, 0xf5, 0x5b, 0xf5, 0x5c, 0xaf, 0x5a, 0x15, 0x5a, 0xef, 0x60, 0x36, 0xab, 0x57, 0x05, 0x59} },
! { 0x96b4,	16,	{0xe5, 0x59, 0xaa, 0x58, 0x70, 0x02, 0x05, 0x58, 0x14, 0xf9, 0x12, 0xa0, 0x3f, 0xff, 0xe5, 0x5b} },
! { 0x96c4,	16,	{0xe5, 0x5c, 0x6f, 0x25, 0xe0, 0xff, 0xe4, 0x33, 0xfe, 0x74, 0x99, 0x2f, 0xf5, 0x82, 0xee, 0x34} },
! { 0x96d4,	16,	{0x9c, 0xf5, 0x83, 0xe5, 0x5b, 0xff, 0xe4, 0x93, 0xf5, 0x5b, 0x74, 0x01, 0x93, 0x6f, 0xf5, 0x5c} },
! { 0x96e4,	6,	{0x80, 0xc3, 0xae, 0x5b, 0xaf, 0x5c} },
! { 0x96ea,	1,	{0x22} },
! { 0x96eb,	11,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18} },
! { 0x96f6,	16,	{0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xfe, 0x30, 0xe0, 0x05, 0x90, 0x20, 0x02, 0xe0, 0xff, 0xee} },
! { 0x9706,	16,	{0x30, 0xe1, 0x05, 0x90, 0x20, 0x0a, 0xe0, 0xff, 0xee, 0x30, 0xe2, 0x05, 0x90, 0x20, 0x12, 0xe0} },
! { 0x9716,	16,	{0xff, 0xee, 0x30, 0xe3, 0x05, 0x90, 0x20, 0x1a, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x1e} },
! { 0x9726,	10,	{0x04, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x01, 0xc4, 0xee, 0xf0} },
! { 0x9730,	9,	{0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x9739,	2,	{0xa9, 0x03} },
! { 0x973b,	16,	{0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xe5} },
! { 0x974b,	16,	{0x5a, 0x45, 0x5b, 0xf5, 0x5c, 0xe9, 0x60, 0x14, 0x8a, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82} },
! { 0x975b,	16,	{0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x4d, 0xf0, 0xe4, 0xfe, 0x80, 0x13, 0xeb, 0x24, 0x04, 0xf5} },
! { 0x976b,	16,	{0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xff, 0xed, 0xf4, 0xfc, 0xef, 0x5c, 0xf0, 0xae, 0x5c, 0xeb} },
! { 0x977b,	16,	{0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0x55, 0x5c, 0xfc, 0xb5, 0x06, 0x03, 0xaf} },
! { 0x978b,	16,	{0x05, 0x22, 0xe5, 0x5a, 0x5c, 0xfe, 0xe5, 0x5b, 0x5c, 0xfd, 0xe9, 0x60, 0x16, 0xee, 0x70, 0x04} },
! { 0x979b,	16,	{0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xae, 0x07, 0xed, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
! { 0x97ab,	16,	{0x00, 0xad, 0x07, 0xee, 0x60, 0x03, 0xaf, 0x5a, 0x22, 0xed, 0x60, 0x03, 0xaf, 0x5b, 0x22, 0x7f} },
! { 0x97bb,	1,	{0x00} },
! { 0x97bc,	1,	{0x22} },
! { 0x97bd,	16,	{0x75, 0x53, 0x02, 0x75, 0x54, 0xb0, 0x90, 0x03, 0x35, 0x74, 0x0f, 0xf0, 0x85, 0x54, 0x82, 0x85} },
! { 0x97cd,	16,	{0x53, 0x83, 0xa3, 0xe0, 0xff, 0x90, 0x03, 0x37, 0xf0, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0xe0} },
! { 0x97dd,	16,	{0x90, 0x03, 0x36, 0xf0, 0x90, 0x03, 0x38, 0x74, 0xff, 0xf0, 0x75, 0x55, 0x03, 0x75, 0x56, 0x39} },
! { 0x97ed,	16,	{0xef, 0x14, 0xb4, 0x0b, 0x00, 0x40, 0x03, 0x02, 0x9c, 0x61, 0x90, 0x97, 0xfe, 0xf8, 0x28, 0x28} },
! { 0x97fd,	16,	{0x73, 0x02, 0x98, 0x1f, 0x02, 0x98, 0xbe, 0x02, 0x99, 0xc3, 0x02, 0x99, 0xe2, 0x02, 0x99, 0xe2} },
! { 0x980d,	16,	{0x02, 0x9a, 0x98, 0x02, 0x9a, 0xd3, 0x02, 0x9a, 0xf8, 0x02, 0x9b, 0xb6, 0x02, 0x9b, 0xe6, 0x02} },
! { 0x981d,	16,	{0x9c, 0x12, 0xe4, 0xf5, 0x4c, 0xe5, 0x4c, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4} },
! { 0x982d,	16,	{0x34, 0x20, 0xaf, 0x82, 0xf5, 0x51, 0x8f, 0x52, 0xe4, 0xff, 0xe4, 0xfe, 0xef, 0x60, 0x10, 0x74} },
! { 0x983d,	16,	{0x8a, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf4, 0xf5, 0x4d, 0x80, 0x0d, 0x74} },
! { 0x984d,	16,	{0x8a, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf5, 0x4d, 0xe5, 0x52, 0x24, 0x07} },
! { 0x985d,	16,	{0xf5, 0x82, 0xe4, 0x35, 0x51, 0xf5, 0x83, 0xe5, 0x4d, 0xf0, 0xe0, 0xf5, 0x4e, 0x65, 0x4d, 0x60} },
! { 0x986d,	16,	{0x38, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4c, 0x04, 0xfd, 0x05, 0x56, 0xe5, 0x56, 0xaa, 0x55} },
! { 0x987d,	16,	{0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0, 0x05, 0x56, 0xe5, 0x56, 0xac} },
! { 0x988d,	16,	{0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe5, 0x4d, 0xf0, 0x85, 0x56, 0x82} },
! { 0x989d,	16,	{0x85, 0x55, 0x83, 0xe5, 0x4e, 0xf0, 0x02, 0x9c, 0x67, 0x0e, 0xbe, 0x24, 0x8f, 0x0f, 0xef, 0x64} },
! { 0x98ad,	16,	{0x02, 0x70, 0x87, 0x05, 0x4c, 0xe5, 0x4c, 0x64, 0x04, 0x60, 0x03, 0x02, 0x98, 0x22, 0x02, 0x9c} },
! { 0x98bd,	16,	{0x67, 0xe4, 0xf5, 0x4c, 0xaf, 0x4c, 0xe4, 0xfd, 0x12, 0x82, 0xf9, 0x05, 0x4c, 0xe5, 0x4c, 0xd3} },
! { 0x98cd,	16,	{0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x96, 0xf0, 0xa3, 0x74, 0xeb, 0xf0, 0xe4, 0xf5} },
! { 0x98dd,	16,	{0x4e, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x51, 0x20, 0x75, 0x52, 0x00, 0xf5, 0x4c, 0xaf, 0x4c, 0x74} },
! { 0x98ed,	16,	{0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4d, 0x90, 0x01, 0xc4, 0xf0} },
! { 0x98fd,	16,	{0x90, 0x01, 0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xa3} },
! { 0x990d,	16,	{0x74, 0x02, 0xf0, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x4d, 0x34, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02} },
! { 0x991d,	16,	{0xa3, 0xe0, 0x70, 0xef, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4c, 0x04, 0xff, 0x05, 0x56, 0xe5, 0x56} },
! { 0x992d,	16,	{0xac, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x56, 0x82} },
! { 0x993d,	16,	{0x85, 0x55, 0x83, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x01, 0xc4, 0xf0, 0x75, 0x4e, 0xff, 0x90, 0x01} },
! { 0x994d,	16,	{0xc4, 0xe0, 0xff, 0x60, 0x37, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4c, 0x04, 0xfe, 0x05, 0x56} },
! { 0x995d,	16,	{0xe5, 0x56, 0xac, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xee, 0xf0, 0x05} },
! { 0x996d,	16,	{0x56, 0xe5, 0x56, 0xac, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
! { 0x997d,	16,	{0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xe5, 0x4d, 0xf0, 0x75, 0x4e, 0xff, 0xe5, 0x4e, 0x70, 0x16} },
! { 0x998d,	16,	{0x74, 0x08, 0x25, 0x52, 0xf5, 0x52, 0xe4, 0x35, 0x51, 0xf5, 0x51, 0x05, 0x4c, 0xe5, 0x4c, 0x64} },
! { 0x999d,	16,	{0x04, 0x60, 0x03, 0x02, 0x98, 0xea, 0xe4, 0xf5, 0x4c, 0xaf, 0x4c, 0x7d, 0x01, 0x12, 0x82, 0xf9} },
! { 0x99ad,	16,	{0x05, 0x4c, 0xe5, 0x4c, 0xd3, 0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x13, 0xf0, 0xa3} },
! { 0x99bd,	16,	{0x74, 0x12, 0xf0, 0x02, 0x9c, 0x67, 0x85, 0x54, 0x82, 0x85, 0x53, 0x83, 0xe0, 0x14, 0xff, 0x74} },
! { 0x99cd,	16,	{0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x90, 0x02, 0xf7, 0xf0, 0x90, 0x01} },
! { 0x99dd,	16,	{0xc4, 0xf0, 0x02, 0x9c, 0x67, 0x90, 0x01, 0xc0, 0x74, 0x03, 0xf0, 0xa3, 0x74, 0xe8, 0xf0, 0xe4} },
! { 0x99ed,	16,	{0xf5, 0x4e, 0x90, 0x02, 0xf7, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x07, 0x19, 0x90, 0x01} },
! { 0x99fd,	16,	{0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xea, 0x90, 0x03, 0x38, 0xf0, 0x85, 0x56, 0x82, 0x85} },
! { 0x9a0d,	16,	{0x55, 0x83, 0x74, 0xff, 0xf0, 0xf5, 0x4e, 0xe5, 0x4e, 0x60, 0x03, 0x02, 0x9c, 0x67, 0x90, 0x01} },
! { 0x9a1d,	16,	{0xc0, 0xf0, 0xa3, 0x74, 0x96, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6} },
! { 0x9a2d,	16,	{0xe5, 0x30, 0xc3, 0x94, 0x01, 0x40, 0x0d, 0x90, 0x20, 0x78, 0xe0, 0x54, 0x0f, 0x75, 0x4f, 0x00} },
! { 0x9a3d,	16,	{0xf5, 0x50, 0x80, 0x09, 0x7f, 0x02, 0x12, 0x81, 0xd9, 0x8e, 0x4f, 0x8f, 0x50, 0xc3, 0xe5, 0x4f} },
! { 0x9a4d,	16,	{0x64, 0x80, 0x94, 0x80, 0x40, 0xda, 0xe5, 0x50, 0x54, 0x0f, 0xf5, 0x4e, 0x90, 0x02, 0xf7, 0xe0} },
! { 0x9a5d,	16,	{0x55, 0x4e, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f, 0x4d, 0x85, 0x54, 0x82, 0x85} },
! { 0x9a6d,	16,	{0x53, 0x83, 0xa3, 0xe0, 0xb4, 0x05, 0x0c, 0xe5, 0x4d, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
! { 0x9a7d,	16,	{0x00, 0x8f, 0x4d, 0xe5, 0x4d, 0x70, 0x03, 0x02, 0x9c, 0x67, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x85} },
! { 0x9a8d,	16,	{0x56, 0x82, 0x85, 0x55, 0x83, 0xe5, 0x4e, 0xf0, 0x02, 0x9c, 0x67, 0xe4, 0xff, 0xfd, 0x12, 0x82} },
! { 0x9a9d,	16,	{0xf9, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x51, 0x20, 0x75, 0x52, 0x00, 0x85, 0x52, 0x82, 0x85, 0x51} },
! { 0x9aad,	16,	{0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0x74, 0x01} },
! { 0x9abd,	16,	{0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x52, 0x82, 0x85, 0x51, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f} },
! { 0x9acd,	16,	{0xf0, 0xd2, 0x04, 0x02, 0x9c, 0x67, 0xc2, 0x04, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x51, 0x20, 0x75} },
! { 0x9add,	16,	{0x52, 0x00, 0xe5, 0x52, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x51, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
! { 0x9aed,	16,	{0xf1, 0xe4, 0xff, 0x7d, 0x01, 0x12, 0x82, 0xf9, 0x02, 0x9c, 0x67, 0xe4, 0xf5, 0x4e, 0xf5, 0x4c} },
! { 0x9afd,	16,	{0xaf, 0x4c, 0xe4, 0xfd, 0x12, 0x82, 0xf9, 0xe5, 0x4c, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5} },
! { 0x9b0d,	16,	{0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x51, 0x8f, 0x52, 0xf5, 0x83, 0xe5, 0x82, 0x24, 0x04} },
! { 0x9b1d,	16,	{0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf, 0x4c, 0x7d, 0x01, 0x7b} },
! { 0x9b2d,	16,	{0x01, 0x75, 0x5a, 0x80, 0x75, 0x5b, 0x40, 0x12, 0x97, 0x39, 0x8f, 0x4e, 0xe5, 0x4e, 0x70, 0x11} },
! { 0x9b3d,	16,	{0xaf, 0x4c, 0x7d, 0x02, 0x7b, 0x01, 0x75, 0x5a, 0x10, 0x75, 0x5b, 0x20, 0x12, 0x97, 0x39, 0x8f} },
! { 0x9b4d,	16,	{0x4e, 0xe5, 0x4e, 0x70, 0x10, 0xaf, 0x4c, 0x7d, 0x01, 0xfb, 0x75, 0x5a, 0x80, 0x75, 0x5b, 0x40} },
! { 0x9b5d,	16,	{0x12, 0x97, 0x39, 0x8f, 0x4e, 0xe5, 0x4e, 0x70, 0x10, 0xaf, 0x4c, 0x7d, 0x02, 0xfb, 0x75, 0x5a} },
! { 0x9b6d,	16,	{0x10, 0x75, 0x5b, 0x20, 0x12, 0x97, 0x39, 0x8f, 0x4e, 0xaf, 0x4c, 0x7d, 0x01, 0x12, 0x82, 0xf9} },
! { 0x9b7d,	16,	{0xe5, 0x4e, 0x60, 0x26, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4c, 0x04, 0xff, 0x05, 0x56, 0xe5} },
! { 0x9b8d,	16,	{0x56, 0xac, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x56} },
! { 0x9b9d,	16,	{0x82, 0x85, 0x55, 0x83, 0xe5, 0x4e, 0xf0, 0x02, 0x9c, 0x67, 0x05, 0x4c, 0xe5, 0x4c, 0xd3, 0x94} },
! { 0x9bad,	16,	{0x03, 0x50, 0x03, 0x02, 0x9a, 0xfd, 0x02, 0x9c, 0x67, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0} },
! { 0x9bbd,	16,	{0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x9c, 0xf0, 0xa3, 0x74} },
! { 0x9bcd,	16,	{0x89, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x10, 0xcc, 0xef, 0x64, 0x08, 0x70, 0x03, 0x02, 0x9c} },
! { 0x9bdd,	16,	{0x67, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x02, 0x9c, 0x67, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0} },
! { 0x9bed,	16,	{0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0xe5, 0x55, 0xf0, 0xa3, 0xe5} },
! { 0x9bfd,	16,	{0x56, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08, 0x60, 0x5c, 0xe4, 0x90} },
! { 0x9c0d,	16,	{0x03, 0x38, 0xf0, 0x80, 0x55, 0xe5, 0x54, 0x24, 0x02, 0xff, 0xe4, 0x35, 0x53, 0xfa, 0xa9, 0x07} },
! { 0x9c1d,	16,	{0x7b, 0x01, 0x7d, 0x10, 0x12, 0x96, 0x9c, 0xef, 0x4e, 0x70, 0x32, 0x90, 0x03, 0x59, 0xf0, 0xa3} },
! { 0x9c2d,	16,	{0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe5, 0x54, 0x24, 0x02, 0x90} },
! { 0x9c3d,	16,	{0x03, 0x60, 0xf0, 0xe4, 0x35, 0x53, 0x90, 0x03, 0x5f, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x10} },
! { 0x9c4d,	16,	{0xcc, 0xef, 0x64, 0x08, 0x60, 0x14, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x0d, 0xe4, 0x90, 0x03} },
! { 0x9c5d,	16,	{0x38, 0xf0, 0x80, 0x06, 0x90, 0x03, 0x38, 0x74, 0x01, 0xf0, 0x90, 0x01, 0xc0, 0xe4, 0xf0, 0xa3} },
! { 0x9c6d,	16,	{0x74, 0x0a, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6, 0x7e, 0x03, 0x7f} },
! { 0x9c7d,	11,	{0x35, 0x7d, 0x24, 0x12, 0x8f, 0x6e, 0xe4, 0x90, 0x02, 0xaf, 0xf0} },
! { 0x9c88,	1,	{0x22} },
! { 0x9c89,	16,	{0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f} },
! { 0x9c99,	16,	{0x00, 0x00, 0xc0, 0xc1, 0xc1, 0x81, 0x01, 0x40, 0xc3, 0x01, 0x03, 0xc0, 0x02, 0x80, 0xc2, 0x41} },
! { 0x9ca9,	16,	{0xc6, 0x01, 0x06, 0xc0, 0x07, 0x80, 0xc7, 0x41, 0x05, 0x00, 0xc5, 0xc1, 0xc4, 0x81, 0x04, 0x40} },
! { 0x9cb9,	16,	{0xcc, 0x01, 0x0c, 0xc0, 0x0d, 0x80, 0xcd, 0x41, 0x0f, 0x00, 0xcf, 0xc1, 0xce, 0x81, 0x0e, 0x40} },
! { 0x9cc9,	16,	{0x0a, 0x00, 0xca, 0xc1, 0xcb, 0x81, 0x0b, 0x40, 0xc9, 0x01, 0x09, 0xc0, 0x08, 0x80, 0xc8, 0x41} },
! { 0x9cd9,	16,	{0xd8, 0x01, 0x18, 0xc0, 0x19, 0x80, 0xd9, 0x41, 0x1b, 0x00, 0xdb, 0xc1, 0xda, 0x81, 0x1a, 0x40} },
! { 0x9ce9,	16,	{0x1e, 0x00, 0xde, 0xc1, 0xdf, 0x81, 0x1f, 0x40, 0xdd, 0x01, 0x1d, 0xc0, 0x1c, 0x80, 0xdc, 0x41} },
! { 0x9cf9,	16,	{0x14, 0x00, 0xd4, 0xc1, 0xd5, 0x81, 0x15, 0x40, 0xd7, 0x01, 0x17, 0xc0, 0x16, 0x80, 0xd6, 0x41} },
! { 0x9d09,	16,	{0xd2, 0x01, 0x12, 0xc0, 0x13, 0x80, 0xd3, 0x41, 0x11, 0x00, 0xd1, 0xc1, 0xd0, 0x81, 0x10, 0x40} },
! { 0x9d19,	16,	{0xf0, 0x01, 0x30, 0xc0, 0x31, 0x80, 0xf1, 0x41, 0x33, 0x00, 0xf3, 0xc1, 0xf2, 0x81, 0x32, 0x40} },
! { 0x9d29,	16,	{0x36, 0x00, 0xf6, 0xc1, 0xf7, 0x81, 0x37, 0x40, 0xf5, 0x01, 0x35, 0xc0, 0x34, 0x80, 0xf4, 0x41} },
! { 0x9d39,	16,	{0x3c, 0x00, 0xfc, 0xc1, 0xfd, 0x81, 0x3d, 0x40, 0xff, 0x01, 0x3f, 0xc0, 0x3e, 0x80, 0xfe, 0x41} },
! { 0x9d49,	16,	{0xfa, 0x01, 0x3a, 0xc0, 0x3b, 0x80, 0xfb, 0x41, 0x39, 0x00, 0xf9, 0xc1, 0xf8, 0x81, 0x38, 0x40} },
! { 0x9d59,	16,	{0x28, 0x00, 0xe8, 0xc1, 0xe9, 0x81, 0x29, 0x40, 0xeb, 0x01, 0x2b, 0xc0, 0x2a, 0x80, 0xea, 0x41} },
! { 0x9d69,	16,	{0xee, 0x01, 0x2e, 0xc0, 0x2f, 0x80, 0xef, 0x41, 0x2d, 0x00, 0xed, 0xc1, 0xec, 0x81, 0x2c, 0x40} },
! { 0x9d79,	16,	{0xe4, 0x01, 0x24, 0xc0, 0x25, 0x80, 0xe5, 0x41, 0x27, 0x00, 0xe7, 0xc1, 0xe6, 0x81, 0x26, 0x40} },
! { 0x9d89,	16,	{0x22, 0x00, 0xe2, 0xc1, 0xe3, 0x81, 0x23, 0x40, 0xe1, 0x01, 0x21, 0xc0, 0x20, 0x80, 0xe0, 0x41} },
! { 0x9d99,	16,	{0xa0, 0x01, 0x60, 0xc0, 0x61, 0x80, 0xa1, 0x41, 0x63, 0x00, 0xa3, 0xc1, 0xa2, 0x81, 0x62, 0x40} },
! { 0x9da9,	16,	{0x66, 0x00, 0xa6, 0xc1, 0xa7, 0x81, 0x67, 0x40, 0xa5, 0x01, 0x65, 0xc0, 0x64, 0x80, 0xa4, 0x41} },
! { 0x9db9,	16,	{0x6c, 0x00, 0xac, 0xc1, 0xad, 0x81, 0x6d, 0x40, 0xaf, 0x01, 0x6f, 0xc0, 0x6e, 0x80, 0xae, 0x41} },
! { 0x9dc9,	16,	{0xaa, 0x01, 0x6a, 0xc0, 0x6b, 0x80, 0xab, 0x41, 0x69, 0x00, 0xa9, 0xc1, 0xa8, 0x81, 0x68, 0x40} },
! { 0x9dd9,	16,	{0x78, 0x00, 0xb8, 0xc1, 0xb9, 0x81, 0x79, 0x40, 0xbb, 0x01, 0x7b, 0xc0, 0x7a, 0x80, 0xba, 0x41} },
! { 0x9de9,	16,	{0xbe, 0x01, 0x7e, 0xc0, 0x7f, 0x80, 0xbf, 0x41, 0x7d, 0x00, 0xbd, 0xc1, 0xbc, 0x81, 0x7c, 0x40} },
! { 0x9df9,	16,	{0xb4, 0x01, 0x74, 0xc0, 0x75, 0x80, 0xb5, 0x41, 0x77, 0x00, 0xb7, 0xc1, 0xb6, 0x81, 0x76, 0x40} },
! { 0x9e09,	16,	{0x72, 0x00, 0xb2, 0xc1, 0xb3, 0x81, 0x73, 0x40, 0xb1, 0x01, 0x71, 0xc0, 0x70, 0x80, 0xb0, 0x41} },
! { 0x9e19,	16,	{0x50, 0x00, 0x90, 0xc1, 0x91, 0x81, 0x51, 0x40, 0x93, 0x01, 0x53, 0xc0, 0x52, 0x80, 0x92, 0x41} },
! { 0x9e29,	16,	{0x96, 0x01, 0x56, 0xc0, 0x57, 0x80, 0x97, 0x41, 0x55, 0x00, 0x95, 0xc1, 0x94, 0x81, 0x54, 0x40} },
! { 0x9e39,	16,	{0x9c, 0x01, 0x5c, 0xc0, 0x5d, 0x80, 0x9d, 0x41, 0x5f, 0x00, 0x9f, 0xc1, 0x9e, 0x81, 0x5e, 0x40} },
! { 0x9e49,	16,	{0x5a, 0x00, 0x9a, 0xc1, 0x9b, 0x81, 0x5b, 0x40, 0x99, 0x01, 0x59, 0xc0, 0x58, 0x80, 0x98, 0x41} },
! { 0x9e59,	16,	{0x88, 0x01, 0x48, 0xc0, 0x49, 0x80, 0x89, 0x41, 0x4b, 0x00, 0x8b, 0xc1, 0x8a, 0x81, 0x4a, 0x40} },
! { 0x9e69,	16,	{0x4e, 0x00, 0x8e, 0xc1, 0x8f, 0x81, 0x4f, 0x40, 0x8d, 0x01, 0x4d, 0xc0, 0x4c, 0x80, 0x8c, 0x41} },
! { 0x9e79,	16,	{0x44, 0x00, 0x84, 0xc1, 0x85, 0x81, 0x45, 0x40, 0x87, 0x01, 0x47, 0xc0, 0x46, 0x80, 0x86, 0x41} },
! { 0x9e89,	16,	{0x82, 0x01, 0x42, 0xc0, 0x43, 0x80, 0x83, 0x41, 0x41, 0x00, 0x81, 0xc1, 0x80, 0x81, 0x40, 0x40} },
! { 0x9e99,	16,	{0xe4, 0xff, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02} },
! { 0x9ea9,	16,	{0x9f, 0x3c, 0x74, 0x37, 0x2f, 0xf8, 0xe6, 0x20, 0xe5, 0x03, 0x02, 0x9f, 0x3c, 0xef, 0x75, 0xf0} },
! { 0x9eb9,	16,	{0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0xf5, 0x83, 0xe5, 0x82} },
! { 0x9ec9,	16,	{0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x60, 0x64, 0x60, 0x70, 0x63} },
! { 0x9ed9,	16,	{0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01} },
! { 0x9ee9,	16,	{0x12, 0xa0, 0x9b, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0, 0x8d, 0x82, 0x8c, 0x83, 0xf0, 0x74, 0xf8} },
! { 0x9ef9,	16,	{0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x14, 0xf0, 0x70, 0x36, 0xef, 0x25, 0xe0} },
! { 0x9f09,	16,	{0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0xef, 0x25, 0xe0, 0xfe, 0xc3} },
! { 0x9f19,	16,	{0x74, 0x0c, 0x9e, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xad} },
! { 0x9f29,	16,	{0x82, 0xfc, 0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xec, 0xf0} },
! { 0x9f39,	12,	{0xa3, 0xed, 0xf0, 0x0f, 0xef, 0x64, 0x04, 0x60, 0x03, 0x02, 0x9e, 0x9b} },
! { 0x9f45,	1,	{0x22} },
! { 0x9f46,	16,	{0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e} },
! { 0x9f56,	16,	{0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08} },
! { 0x9f66,	16,	{0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83} },
! { 0x9f76,	16,	{0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08} },
! { 0x9f86,	16,	{0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c} },
! { 0x9f96,	16,	{0x80, 0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10} },
! { 0x9fa6,	16,	{0x80, 0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33} },
! { 0x9fb6,	16,	{0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83} },
! { 0x9fc6,	16,	{0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80} },
! { 0x9fd6,	16,	{0x0d, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0} },
! { 0x9fe6,	16,	{0xed, 0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc} },
! { 0x9ff6,	16,	{0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde} },
! { 0xa006,	16,	{0xe8, 0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc} },
! { 0xa016,	16,	{0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xc2, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4} },
! { 0xa026,	16,	{0x04, 0x00, 0x50, 0xb8, 0x23, 0x23, 0x45, 0x82, 0xf5, 0x82, 0xef, 0x4e, 0x60, 0xae, 0xef, 0x60} },
! { 0xa036,	9,	{0x01, 0x0e, 0xe5, 0x82, 0x23, 0x90, 0x9f, 0x96, 0x73} },
! { 0xa03f,	16,	{0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
! { 0xa04f,	9,	{0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
! { 0xa058,	16,	{0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
! { 0xa068,	16,	{0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
! { 0xa078,	13,	{0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
! { 0xa085,	16,	{0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02} },
! { 0xa095,	6,	{0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22} },
! { 0xa09b,	16,	{0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83} },
! { 0xa0ab,	6,	{0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22} },
! { 0xa0b1,	16,	{0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
! { 0xa0c1,	16,	{0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
! { 0xa0d1,	16,	{0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
! { 0xa0e1,	8,	{0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
! { 0xa0e9,	16,	{0x75, 0xf0, 0x08, 0x75, 0x82, 0x00, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xcd, 0x33, 0xcd, 0xcc} },
! { 0xa0f9,	16,	{0x33, 0xcc, 0xc5, 0x82, 0x33, 0xc5, 0x82, 0x9b, 0xed, 0x9a, 0xec, 0x99, 0xe5, 0x82, 0x98, 0x40} },
! { 0xa109,	16,	{0x0c, 0xf5, 0x82, 0xee, 0x9b, 0xfe, 0xed, 0x9a, 0xfd, 0xec, 0x99, 0xfc, 0x0f, 0xd5, 0xf0, 0xd6} },
! { 0xa119,	16,	{0xe4, 0xce, 0xfb, 0xe4, 0xcd, 0xfa, 0xe4, 0xcc, 0xf9, 0xa8, 0x82, 0x22, 0xb8, 0x00, 0xc1, 0xb9} },
! { 0xa129,	16,	{0x00, 0x59, 0xba, 0x00, 0x2d, 0xec, 0x8b, 0xf0, 0x84, 0xcf, 0xce, 0xcd, 0xfc, 0xe5, 0xf0, 0xcb} },
! { 0xa139,	16,	{0xf9, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc, 0xeb} },
! { 0xa149,	16,	{0x33, 0xfb, 0x10, 0xd7, 0x03, 0x99, 0x40, 0x04, 0xeb, 0x99, 0xfb, 0x0f, 0xd8, 0xe5, 0xe4, 0xf9} },
! { 0xa159,	16,	{0xfa, 0x22, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc} },
! { 0xa169,	16,	{0xc9, 0x33, 0xc9, 0x10, 0xd7, 0x05, 0x9b, 0xe9, 0x9a, 0x40, 0x07, 0xec, 0x9b, 0xfc, 0xe9, 0x9a} },
! { 0xa179,	16,	{0xf9, 0x0f, 0xd8, 0xe0, 0xe4, 0xc9, 0xfa, 0xe4, 0xcc, 0xfb, 0x22, 0x75, 0xf0, 0x10, 0xef, 0x2f} },
! { 0xa189,	16,	{0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xcc, 0x33, 0xcc, 0xc8, 0x33, 0xc8, 0x10, 0xd7, 0x07} },
! { 0xa199,	16,	{0x9b, 0xec, 0x9a, 0xe8, 0x99, 0x40, 0x0a, 0xed, 0x9b, 0xfd, 0xec, 0x9a, 0xfc, 0xe8, 0x99, 0xf8} },
! { 0xa1a9,	14,	{0x0f, 0xd5, 0xf0, 0xda, 0xe4, 0xcd, 0xfb, 0xe4, 0xcc, 0xfa, 0xe4, 0xc8, 0xf9, 0x22} },
! { 0xa1b7,	16,	{0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
! { 0xa1c7,	1,	{0x22} },
! { 0xa1c8,	16,	{0xe8, 0x60, 0x0f, 0xec, 0xc3, 0x13, 0xfc, 0xed, 0x13, 0xfd, 0xee, 0x13, 0xfe, 0xef, 0x13, 0xff} },
! { 0xa1d8,	3,	{0xd8, 0xf1, 0x22} },
! { 0xa1db,	16,	{0x08, 0x08, 0x08, 0xe6, 0xcf, 0x2f, 0xf6, 0x18, 0xe6, 0xce, 0x3e, 0xf6, 0x18, 0xe6, 0xcd, 0x3d} },
! { 0xa1eb,	7,	{0xf6, 0x18, 0xe6, 0xcc, 0x3c, 0xf6, 0x22} },
! { 0xa1f2,	12,	{0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
! { 0xa1fe,	16,	{0xa8, 0x82, 0x85, 0x83, 0xf0, 0xd0, 0x83, 0xd0, 0x82, 0x12, 0xa2, 0x15, 0x12, 0xa2, 0x15, 0x12} },
! { 0xa20e,	16,	{0xa2, 0x15, 0x12, 0xa2, 0x15, 0xe4, 0x73, 0xe4, 0x93, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83} },
! { 0xa21e,	16,	{0xc8, 0xc5, 0x82, 0xc8, 0xf0, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83, 0xc8, 0xc5, 0x82, 0xc8} },
! { 0xa22e,	1,	{0x22} },
  { 0xffff,	0,	{0x00} }
  };
  
--- 513,1061 ----
  { 0x828b,	16,	{0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f, 0xfa, 0x22, 0xc2, 0xaf, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
  { 0x829b,	12,	{0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0xd2, 0xaf, 0xff, 0x7e, 0x00} },
  { 0x82a7,	1,	{0x22} },
! { 0x82a8,	16,	{0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xf5} },
! { 0x82b8,	16,	{0x83, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x5e, 0x74, 0xbf} },
! { 0x82c8,	16,	{0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x44, 0x10, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3} },
! { 0x82d8,	16,	{0xa3, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xf0, 0xf9, 0xed, 0x60, 0x1d, 0x74, 0x01} },
! { 0x82e8,	16,	{0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4} },
! { 0x82f8,	16,	{0xef, 0x55, 0x3b, 0x60, 0x04, 0x79, 0x09, 0x80, 0x02, 0x79, 0x0d, 0x8b, 0x82, 0x8a, 0x83, 0xa3} },
! { 0x8308,	16,	{0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x54, 0xef, 0xf0, 0x8b} },
! { 0x8318,	16,	{0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x5e, 0xf0, 0xae, 0x02, 0xaf, 0x03, 0x8f, 0x82, 0x8e} },
! { 0x8328,	4,	{0x83, 0xa3, 0xe9, 0xf0} },
! { 0x832c,	1,	{0x22} },
! { 0x832d,	4,	{0x8f, 0x5e, 0x8d, 0x5f} },
! { 0x8331,	16,	{0xe4, 0xf5, 0x60, 0x74, 0x3c, 0x2f, 0xf8, 0x76, 0x08, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24} },
! { 0x8341,	16,	{0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
! { 0x8351,	16,	{0xa3, 0xe0, 0xff, 0x7b, 0x80, 0x7a, 0x25, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0xa0, 0xc0, 0x50} },
! { 0x8361,	16,	{0x3c, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83} },
! { 0x8371,	16,	{0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x96, 0x78} },
! { 0x8381,	16,	{0x00, 0xc3, 0x12, 0xa0, 0xc0, 0x40, 0x0c, 0x75, 0x60, 0x40, 0x74, 0x3c, 0x25, 0x5e, 0xf8, 0x76} },
! { 0x8391,	16,	{0x10, 0x80, 0x0a, 0x75, 0x60, 0x80, 0x74, 0x3c, 0x25, 0x5e, 0xf8, 0x76, 0x38, 0xe5, 0x60, 0x45} },
! { 0x83a1,	16,	{0x5f, 0x44, 0x01, 0xff, 0xe5, 0x5e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34} },
! { 0x83b1,	5,	{0x20, 0xf5, 0x83, 0xef, 0xf0} },
! { 0x83b6,	1,	{0x22} },
! { 0x83b7,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x54, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
! { 0x83c7,	16,	{0xe5, 0x54, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5} },
! { 0x83d7,	16,	{0x55, 0x8f, 0x56, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
! { 0x83e7,	16,	{0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} },
! { 0x83f7,	16,	{0x83, 0xe4, 0xf0, 0x74, 0x22, 0x25, 0x54, 0xf8, 0xe4, 0xf6, 0xe5, 0x56, 0x24, 0x04, 0xf5, 0x82} },
! { 0x8407,	16,	{0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0x44, 0x03, 0xf0, 0xaf, 0x54, 0x7d, 0x06, 0x12, 0x83, 0x2d} },
! { 0x8417,	16,	{0xaf, 0x54, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xa3, 0xe0} },
! { 0x8427,	16,	{0x20, 0xe0, 0x22, 0xe0, 0xff, 0xe5, 0x56, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83} },
! { 0x8437,	16,	{0xe0, 0xe5, 0x56, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0xff, 0xaf, 0x54} },
! { 0x8447,	16,	{0x7d, 0x06, 0x12, 0x83, 0x2d, 0x74, 0xf8, 0x25, 0x54, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} },
! { 0x8457,	16,	{0xe4, 0xf0, 0xe5, 0x54, 0x25, 0xe0, 0xff, 0xc3, 0x74, 0x0c, 0x9f, 0x75, 0xf0, 0x40, 0xa4, 0x24} },
! { 0x8467,	16,	{0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xaf, 0x82, 0xfe, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xef} },
! { 0x8477,	16,	{0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0xaf, 0x54, 0x74, 0x01} },
! { 0x8487,	13,	{0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x30, 0x7f, 0x00} },
! { 0x8494,	1,	{0x22} },
! { 0x8495,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x54, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
! { 0x84a5,	16,	{0xaf, 0x54, 0xe4, 0xfd, 0x12, 0x82, 0xa8, 0x74, 0xf8, 0x25, 0x54, 0xf5, 0x82, 0xe4, 0x34, 0x02} },
! { 0x84b5,	16,	{0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x54, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34} },
! { 0x84c5,	16,	{0x20, 0xaf, 0x82, 0xf5, 0x56, 0x8f, 0x57, 0xf5, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4} },
! { 0x84d5,	16,	{0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf, 0x54, 0x7d, 0x06, 0x12, 0x83, 0x2d, 0xe5} },
! { 0x84e5,	16,	{0x57, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x56, 0xf5, 0x83, 0xe0, 0x30, 0xe0, 0x09, 0x85, 0x57} },
! { 0x84f5,	16,	{0x82, 0x85, 0x56, 0x83, 0xe0, 0xf5, 0x55, 0xaf, 0x54, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02} },
! { 0x8505,	16,	{0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x30, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82, 0xe4} },
! { 0x8515,	16,	{0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82} },
! { 0x8525,	9,	{0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x7f, 0x00} },
! { 0x852e,	1,	{0x22} },
! { 0x852f,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0xa3, 0xa3, 0xa3, 0xe0, 0xfc, 0xed} },
! { 0x853f,	16,	{0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xc0, 0x83, 0xc0} },
! { 0x854f,	16,	{0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0} },
! { 0x855f,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0xe0, 0xfd, 0xec, 0x6d, 0xd0} },
! { 0x856f,	16,	{0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f} },
! { 0x857f,	16,	{0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82} },
! { 0x858f,	16,	{0x8e, 0x83, 0xa3, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0} },
! { 0x859f,	16,	{0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0} },
! { 0x85af,	16,	{0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xff, 0xed, 0x6f, 0xd0, 0x82, 0xd0} },
! { 0x85bf,	3,	{0x83, 0xf0, 0x22} },
! { 0x85c2,	4,	{0xad, 0x07, 0xac, 0x06} },
! { 0x85c6,	16,	{0x79, 0x0d, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff} },
! { 0x85d6,	16,	{0x22, 0x8c, 0x54, 0x8d, 0x55, 0xee, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34} },
! { 0x85e6,	16,	{0x03, 0xaf, 0x82, 0xfe, 0xad, 0x01, 0x19, 0xed, 0x60, 0x24, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01} },
! { 0x85f6,	16,	{0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05, 0x55, 0xe5, 0x55, 0xaa, 0x54, 0x70, 0x02} },
! { 0x8606,	16,	{0x05, 0x54, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0, 0x6d, 0x60, 0xd9, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
! { 0x8616,	1,	{0x22} },
! { 0x8617,	4,	{0x8e, 0x54, 0x8f, 0x55} },
! { 0x861b,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x5b, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} },
! { 0x862b,	16,	{0xe5, 0x5b, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5} },
! { 0x863b,	16,	{0x5c, 0x8f, 0x5d, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} },
! { 0x864b,	16,	{0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x08, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xd3, 0x12, 0xa0} },
! { 0x865b,	16,	{0xc0, 0x40, 0x10, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0x12, 0xa1, 0x07, 0x00, 0x00, 0x00} },
! { 0x866b,	16,	{0x08, 0x80, 0x2e, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} },
! { 0x867b,	16,	{0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x08, 0x79, 0x07, 0x78, 0x00, 0xc3, 0x12, 0xa0} },
! { 0x868b,	16,	{0xc0, 0x50, 0x0e, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0x12, 0xa1, 0x07, 0x00, 0x07, 0x08} },
! { 0x869b,	16,	{0x00, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa} },
! { 0x86ab,	16,	{0xa3, 0xe0, 0xfb, 0x7f, 0x00, 0x7e, 0x50, 0x7d, 0x46, 0x7c, 0x00, 0x12, 0xa0, 0x2e, 0x8f, 0x59} },
! { 0x86bb,	16,	{0x8e, 0x58, 0x8d, 0x57, 0x8c, 0x56, 0x7b, 0x0a, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa0} },
! { 0x86cb,	16,	{0x2e, 0xaf, 0x03, 0x8f, 0x5a, 0xaf, 0x59, 0xae, 0x58, 0xad, 0x57, 0xac, 0x56, 0x7b, 0x0a, 0x7a} },
! { 0x86db,	16,	{0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa0, 0x2e, 0x8f, 0x59, 0x8e, 0x58, 0x8d, 0x57, 0x8c, 0x56} },
! { 0x86eb,	16,	{0xe5, 0x5a, 0xc3, 0x94, 0x05, 0x40, 0x15, 0xe5, 0x59, 0x24, 0x01, 0xf5, 0x59, 0xe4, 0x35, 0x58} },
! { 0x86fb,	16,	{0xf5, 0x58, 0xe4, 0x35, 0x57, 0xf5, 0x57, 0xe4, 0x35, 0x56, 0xf5, 0x56, 0x85, 0x5d, 0x82, 0x85} },
! { 0x870b,	16,	{0x5c, 0x83, 0xa3, 0xe4, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44} },
! { 0x871b,	16,	{0x80, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xe5, 0x59, 0xf0, 0xaf, 0x59, 0xae, 0x58, 0xad} },
! { 0x872b,	16,	{0x57, 0xac, 0x56, 0x78, 0x08, 0x12, 0xa0, 0xd1, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xef} },
! { 0x873b,	16,	{0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5} },
! { 0x874b,	16,	{0x5a, 0xe5, 0x55, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xb4, 0x62} },
! { 0x875b,	16,	{0x05, 0x43, 0x5a, 0x0a, 0x80, 0x1a, 0xef, 0xb4, 0x72, 0x05, 0x43, 0x5a, 0x08, 0x80, 0x11, 0xef} },
! { 0x876b,	16,	{0xb4, 0x74, 0x05, 0x43, 0x5a, 0x02, 0x80, 0x08, 0xef, 0x64, 0x6e, 0x60, 0x03, 0x7f, 0xff, 0x22} },
! { 0x877b,	16,	{0xe5, 0x55, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe3, 0x03} },
! { 0x878b,	16,	{0x43, 0x5a, 0x80, 0xef, 0x30, 0xe7, 0x12, 0x43, 0x5a, 0x40, 0xe5, 0x5d, 0x24, 0x04, 0xf5, 0x82} },
! { 0x879b,	16,	{0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x55, 0x24, 0x0b, 0xf5, 0x82, 0xe4} },
! { 0x87ab,	16,	{0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0x20, 0xe1, 0x03, 0x30, 0xe4, 0x23, 0xaf, 0x5b, 0x74, 0x01} },
! { 0x87bb,	16,	{0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3b, 0xe5, 0x5d, 0x24, 0x04, 0xf5} },
! { 0x87cb,	16,	{0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0xe4, 0xf5, 0x5a, 0x80, 0x10, 0xaf} },
! { 0x87db,	16,	{0x5b, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x3b, 0x85} },
! { 0x87eb,	16,	{0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c} },
! { 0x87fb,	16,	{0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x5a, 0xf0, 0xe5, 0x55, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35} },
! { 0x880b,	16,	{0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83} },
! { 0x881b,	16,	{0xef, 0xf0, 0xe5, 0x55, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5} },
! { 0x882b,	16,	{0x5d, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x55, 0x24, 0x09} },
! { 0x883b,	16,	{0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x06, 0xf5, 0x82, 0xe4} },
! { 0x884b,	16,	{0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x55, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5} },
! { 0x885b,	16,	{0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0} },
! { 0x886b,	16,	{0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe4, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c} },
! { 0x887b,	16,	{0x83, 0xa3, 0xa3, 0xf0, 0xaf, 0x5b, 0x7d, 0x06, 0x12, 0x83, 0x2d, 0x75, 0x5a, 0x08, 0xe5, 0x55} },
! { 0x888b,	16,	{0x24, 0x0c, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0x43, 0x5a, 0x10, 0xe5} },
! { 0x889b,	16,	{0x5d, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x54, 0x03, 0x45, 0x5a, 0xf0} },
! { 0x88ab,	16,	{0xe5, 0x55, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xfe, 0xc3, 0x94, 0x05} },
! { 0x88bb,	16,	{0x40, 0x06, 0xee, 0xd3, 0x94, 0x08, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x55, 0x24, 0x06, 0xf5} },
! { 0x88cb,	16,	{0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xfd, 0xc3, 0x94, 0x01, 0x40, 0x06, 0xed, 0xd3, 0x94} },
! { 0x88db,	16,	{0x02, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xed, 0x14, 0xff, 0x25, 0xe0, 0x25, 0xe0, 0xff, 0xee, 0x24} },
! { 0x88eb,	16,	{0xfb, 0x4f, 0xf5, 0x5a, 0xe5, 0x55, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0} },
! { 0x88fb,	16,	{0x24, 0xd0, 0x60, 0x18, 0x14, 0x60, 0x1a, 0x24, 0xc3, 0x60, 0x1e, 0x14, 0x60, 0x09, 0x24, 0x0a} },
! { 0x890b,	16,	{0x70, 0x14, 0x43, 0x5a, 0x18, 0x80, 0x12, 0x43, 0x5a, 0x08, 0x80, 0x0d, 0x43, 0x5a, 0x38, 0x80} },
! { 0x891b,	16,	{0x08, 0x43, 0x5a, 0x28, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3} },
! { 0x892b,	16,	{0xa3, 0xa3, 0xe5, 0x5a, 0xf0, 0xaf, 0x5b, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0xaa, 0x54, 0xa9, 0x55} },
! { 0x893b,	16,	{0x7b, 0x01, 0xc0, 0x01, 0xe5, 0x5b, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35} },
! { 0x894b,	15,	{0xf0, 0xa8, 0x01, 0xfc, 0xd0, 0x01, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0x9f, 0x1f, 0x7f, 0x00} },
! { 0x895a,	1,	{0x22} },
! { 0x895b,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
! { 0x896b,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0x90, 0x01} },
! { 0x897b,	16,	{0x2c, 0x74, 0x08, 0xf0, 0xee, 0x04, 0xa3, 0xf0, 0xe4, 0xa3, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xe5} },
! { 0x898b,	16,	{0x82, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x2f, 0xf0, 0x8d} },
! { 0x899b,	16,	{0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54} },
! { 0x89ab,	16,	{0x1e, 0x90, 0x01, 0x30, 0xf0, 0x74, 0x2c, 0x2e, 0xf8, 0xe6, 0xa3, 0xf0, 0xaf, 0x06, 0x74, 0x01} },
! { 0x89bb,	16,	{0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x54, 0x7f, 0x02, 0x12, 0x81, 0xd9} },
! { 0x89cb,	16,	{0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xe5, 0x54, 0x5f, 0x90, 0x01, 0x32, 0xf0, 0x7e} },
! { 0x89db,	10,	{0x01, 0x7f, 0x2c, 0x7d, 0x07, 0x12, 0x8e, 0xb4, 0x7f, 0x00} },
! { 0x89e5,	1,	{0x22} },
! { 0x89e6,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
! { 0x89f6,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x90, 0x01} },
! { 0x8a06,	16,	{0x33, 0x74, 0x0a, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35} },
! { 0x8a16,	16,	{0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x34, 0xf0, 0x7e, 0x01, 0x7f, 0x33, 0x7d, 0x02, 0x12, 0x8e} },
! { 0x8a26,	3,	{0xb4, 0x7f, 0x00} },
! { 0x8a29,	1,	{0x22} },
! { 0x8a2a,	4,	{0xad, 0x07, 0xac, 0x06} },
! { 0x8a2e,	16,	{0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
! { 0x8a3e,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
! { 0x8a4e,	16,	{0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0} },
! { 0x8a5e,	16,	{0x44, 0x02, 0xf0, 0x80, 0x0d, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54} },
! { 0x8a6e,	4,	{0xfd, 0xf0, 0x7f, 0x00} },
! { 0x8a72,	1,	{0x22} },
! { 0x8a73,	4,	{0xad, 0x07, 0xac, 0x06} },
! { 0x8a77,	16,	{0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
! { 0x8a87,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
! { 0x8a97,	16,	{0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0} },
! { 0x8aa7,	16,	{0x44, 0x01, 0xf0, 0x80, 0x0d, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54} },
! { 0x8ab7,	4,	{0xfe, 0xf0, 0x7f, 0x00} },
! { 0x8abb,	1,	{0x22} },
! { 0x8abc,	4,	{0xad, 0x07, 0xac, 0x06} },
! { 0x8ac0,	16,	{0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} },
! { 0x8ad0,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} },
! { 0x8ae0,	16,	{0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0d, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x40} },
! { 0x8af0,	16,	{0xf0, 0x80, 0x0b, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x00} },
! { 0x8b00,	1,	{0x22} },
! { 0x8b01,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xaf} },
! { 0x8b11,	16,	{0x06, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3a, 0x7f, 0x00} },
! { 0x8b21,	1,	{0x22} },
! { 0x8b22,	4,	{0x8e, 0x54, 0x8f, 0x55} },
! { 0x8b26,	16,	{0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0, 0xf5, 0x59, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xf5, 0x56, 0xc3} },
! { 0x8b36,	16,	{0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x56, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x1f} },
! { 0x8b46,	16,	{0x14, 0x60, 0x28, 0x24, 0x03, 0x70, 0x2e, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x57, 0x7e, 0x75, 0x58} },
! { 0x8b56,	16,	{0x80, 0x80, 0x22, 0x7e, 0x7e, 0x7f, 0x00, 0x75, 0x57, 0x7e, 0x75, 0x58, 0x00, 0x80, 0x16, 0x7e} },
! { 0x8b66,	16,	{0x7d, 0x7f, 0x80, 0x75, 0x57, 0x7d, 0x75, 0x58, 0x80, 0x80, 0x0a, 0x7e, 0x7d, 0x7f, 0x00, 0x75} },
! { 0x8b76,	16,	{0x57, 0x7d, 0x75, 0x58, 0x00, 0xe5, 0x59, 0x70, 0x1b, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0x74} },
! { 0x8b86,	16,	{0xff, 0xf0, 0xe5, 0x56, 0x25, 0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74} },
! { 0x8b96,	16,	{0x01, 0xf0, 0x80, 0x48, 0xe5, 0x55, 0x24, 0x02, 0xff, 0xe4, 0x35, 0x54, 0xfe, 0xe5, 0x59, 0x60} },
! { 0x8ba6,	16,	{0x23, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05} },
! { 0x8bb6,	16,	{0x58, 0xe5, 0x58, 0xaa, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0} },
! { 0x8bc6,	16,	{0x15, 0x59, 0x80, 0xd9, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0xe5, 0x56, 0x25} },
! { 0x8bd6,	14,	{0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x7f, 0x00} },
! { 0x8be4,	1,	{0x22} },
! { 0x8be5,	16,	{0xef, 0x24, 0x05, 0xf5, 0x55, 0xe4, 0x3e, 0xf5, 0x54, 0x90, 0x01, 0x35, 0x74, 0x07, 0xf0, 0x90} },
! { 0x8bf5,	16,	{0x01, 0x7a, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x36, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3} },
! { 0x8c05,	16,	{0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x56, 0xf5, 0x57, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} },
! { 0x8c15,	16,	{0xe0, 0x24, 0x9e, 0x60, 0x61, 0x24, 0xf9, 0x60, 0x0e, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8c, 0xc6} },
! { 0x8c25,	16,	{0x24, 0x14, 0x60, 0x03, 0x02, 0x8d, 0x12, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe} },
! { 0x8c35,	16,	{0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f, 0xf5, 0x59, 0x74, 0x01, 0x9e, 0xf5, 0x58, 0xd3, 0xe5, 0x59} },
! { 0x8c45,	16,	{0x94, 0x40, 0xe5, 0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x40, 0xd3, 0xe5} },
! { 0x8c55,	16,	{0x57, 0x95, 0x59, 0xe5, 0x56, 0x95, 0x58, 0x50, 0x03, 0x02, 0x8d, 0x15, 0xae, 0x58, 0xaf, 0x59} },
! { 0x8c65,	16,	{0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e} },
! { 0x8c75,	16,	{0x56, 0xf5, 0x57, 0x02, 0x8d, 0x15, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3} },
! { 0x8c85,	16,	{0xe0, 0xff, 0xc3, 0x74, 0x30, 0x9f, 0xf5, 0x59, 0xe4, 0x9e, 0xf5, 0x58, 0xd3, 0xe5, 0x59, 0x94} },
! { 0x8c95,	16,	{0x10, 0xe5, 0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x10, 0xd3, 0xe5, 0x57} },
! { 0x8ca5,	16,	{0x95, 0x59, 0xe5, 0x56, 0x95, 0x58, 0x40, 0x68, 0xae, 0x58, 0xaf, 0x59, 0x85, 0x55, 0x82, 0x85} },
! { 0x8cb5,	16,	{0x54, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x56, 0xf5, 0x57, 0x80} },
! { 0x8cc5,	16,	{0x4f, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f} },
! { 0x8cd5,	16,	{0xf5, 0x59, 0xe4, 0x9e, 0xf5, 0x58, 0x45, 0x59, 0x60, 0x0b, 0xd3, 0xe5, 0x59, 0x94, 0x40, 0xe5} },
! { 0x8ce5,	16,	{0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x40, 0xd3, 0xe5, 0x57, 0x95, 0x59} },
! { 0x8cf5,	16,	{0xe5, 0x56, 0x95, 0x58, 0x40, 0x17, 0xae, 0x58, 0xaf, 0x59, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} },
! { 0x8d05,	16,	{0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x56, 0xf5, 0x57, 0x7f, 0x01, 0x22} },
! { 0x8d15,	16,	{0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0x24, 0x9e, 0x70, 0x03, 0x02, 0x8d, 0xd5, 0x24, 0xf9} },
! { 0x8d25,	16,	{0x60, 0x58, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8e, 0x25, 0x24, 0x14, 0x60, 0x03, 0x02, 0x8e, 0x69} },
! { 0x8d35,	16,	{0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xd3, 0x94, 0xff, 0xee} },
! { 0x8d45,	16,	{0x94, 0x00, 0x40, 0x03, 0x02, 0x8e, 0x69, 0x90, 0x01, 0x75, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57} },
! { 0x8d55,	16,	{0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x70, 0x03, 0x02, 0x8e, 0x69, 0x90, 0x01, 0x75, 0xe0} },
! { 0x8d65,	16,	{0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f} },
! { 0x8d75,	16,	{0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} },
! { 0x8d85,	16,	{0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x80, 0xee, 0x94, 0x00, 0x50, 0x03, 0x02, 0x8e} },
! { 0x8d95,	16,	{0x69, 0xd3, 0xef, 0x94, 0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x8e, 0x69, 0x90, 0x01, 0x76} },
! { 0x8da5,	16,	{0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x70, 0x03, 0x02} },
! { 0x8db5,	16,	{0x8e, 0x69, 0x90, 0x01, 0x76, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} },
! { 0x8dc5,	16,	{0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2} },
! { 0x8dd5,	16,	{0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x20, 0xee} },
! { 0x8de5,	16,	{0x94, 0x00, 0x50, 0x03, 0x02, 0x8e, 0x69, 0xd3, 0xef, 0x94, 0x2f, 0xee, 0x94, 0x00, 0x50, 0x74} },
! { 0x8df5,	16,	{0x90, 0x01, 0x77, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e} },
! { 0x8e05,	16,	{0x60, 0x62, 0x90, 0x01, 0x77, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} },
! { 0x8e15,	16,	{0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd5} },
! { 0x8e25,	16,	{0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0x01, 0x78, 0xcf, 0xf0} },
! { 0x8e35,	16,	{0xa3, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x60, 0x24} },
! { 0x8e45,	16,	{0x90, 0x01, 0x78, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0} },
! { 0x8e55,	16,	{0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
! { 0x8e65,	16,	{0xef, 0xf0, 0x80, 0xcf, 0x7e, 0x01, 0x7f, 0x35, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3} },
! { 0x8e75,	11,	{0xa3, 0xe0, 0xa3, 0xe0, 0x04, 0xfd, 0x12, 0x8e, 0xb4, 0x7f, 0x00} },
! { 0x8e80,	1,	{0x22} },
! { 0x8e81,	16,	{0x8e, 0x5f, 0x8f, 0x60, 0x8c, 0x61, 0x8d, 0x62, 0xaf, 0x03, 0x1b, 0xef, 0x60, 0x24, 0x05, 0x60} },
! { 0x8e91,	16,	{0xe5, 0x60, 0xae, 0x5f, 0x70, 0x02, 0x05, 0x5f, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05} },
! { 0x8ea1,	16,	{0x62, 0xe5, 0x62, 0xac, 0x61, 0x70, 0x02, 0x05, 0x61, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
! { 0x8eb1,	3,	{0x80, 0xd6, 0x22} },
! { 0x8eb4,	6,	{0x8d, 0x5a, 0xab, 0x07, 0xaa, 0x06} },
! { 0x8eba,	16,	{0x75, 0x5e, 0x40, 0x75, 0x5d, 0x0d, 0x75, 0x5c, 0x03, 0x75, 0x5b, 0x00, 0x90, 0x7f, 0xc2, 0xe0} },
! { 0x8eca,	16,	{0x20, 0xe1, 0xf9, 0xaf, 0x5e, 0xae, 0x5d, 0xad, 0x5c, 0xac, 0x5b, 0xec, 0x4d, 0x4e, 0x4f, 0x70} },
! { 0x8eda,	16,	{0x08, 0x90, 0x7f, 0xc2, 0x74, 0x02, 0xf0, 0x80, 0xd7, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x16} },
! { 0x8eea,	16,	{0xaf, 0x03, 0xae, 0x02, 0x7c, 0x7b, 0x7d, 0x80, 0xab, 0x5a, 0x12, 0x8e, 0x81, 0x90, 0x7f, 0xc3} },
! { 0x8efa,	8,	{0xe5, 0x5a, 0xf0, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
! { 0x8f02,	1,	{0x22} },
! { 0x8f03,	16,	{0x90, 0x01, 0x84, 0x74, 0x0b, 0xf0, 0x90, 0x20, 0x70, 0xe0, 0x54, 0xf0, 0xff, 0xc4, 0x54, 0x0f} },
! { 0x8f13,	16,	{0x90, 0x01, 0x85, 0xf0, 0x90, 0x95, 0xbf, 0xe4, 0x93, 0x90, 0x01, 0x86, 0xf0, 0x90, 0x95, 0xc0} },
! { 0x8f23,	16,	{0xe4, 0x93, 0x90, 0x01, 0x87, 0xf0, 0xe4, 0x90, 0x01, 0x7c, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
! { 0x8f33,	16,	{0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x88, 0xf0, 0x7e} },
! { 0x8f43,	16,	{0x01, 0x7f, 0x7c, 0x12, 0x10, 0x2c, 0x7e, 0x01, 0x7f, 0x84, 0x7d, 0x14, 0x12, 0x8e, 0xb4, 0x7f} },
! { 0x8f53,	1,	{0x00} },
! { 0x8f54,	1,	{0x22} },
! { 0x8f55,	16,	{0x7e, 0x7b, 0x7f, 0x40, 0x75, 0x4b, 0x7b, 0x75, 0x4c, 0x40, 0x90, 0x7f, 0xd3, 0xe0, 0xff, 0x85} },
! { 0x8f65,	16,	{0x4b, 0x4e, 0x85, 0x4c, 0x4f, 0xe5, 0x4f, 0x24, 0x01, 0xf5, 0x53, 0xe4, 0x35, 0x4e, 0xf5, 0x52} },
! { 0x8f75,	16,	{0xe4, 0xf5, 0x4d, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0xfe, 0x14, 0xb4, 0x0c, 0x00, 0x50} },
! { 0x8f85,	16,	{0x5b, 0x90, 0x8f, 0x8d, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x8f, 0xb1, 0x02, 0x8f, 0xb1, 0x02, 0x8f} },
! { 0x8f95,	16,	{0xbb, 0x02, 0x8f, 0xc5, 0x02, 0x8f, 0xc5, 0x02, 0x8f, 0xc5, 0x02, 0x8f, 0xd9, 0x02, 0x8f, 0xb1} },
! { 0x8fa5,	16,	{0x02, 0x8f, 0xcf, 0x02, 0x8f, 0xb1, 0x02, 0x8f, 0xe1, 0x02, 0x8f, 0xb1, 0xef, 0x64, 0x02, 0x60} },
! { 0x8fb5,	16,	{0x2b, 0x75, 0x4d, 0xff, 0x80, 0x26, 0xef, 0x64, 0x0e, 0x60, 0x21, 0x75, 0x4d, 0xff, 0x80, 0x1c} },
! { 0x8fc5,	16,	{0xef, 0x64, 0x03, 0x60, 0x17, 0x75, 0x4d, 0xff, 0x80, 0x12, 0xef, 0x64, 0x03, 0x60, 0x0d, 0x75} },
! { 0x8fd5,	16,	{0x4d, 0xff, 0x80, 0x08, 0xef, 0x64, 0x06, 0x60, 0x03, 0x75, 0x4d, 0xff, 0xe5, 0x4d, 0x60, 0x15} },
! { 0x8fe5,	16,	{0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0xa3, 0xee, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12} },
! { 0x8ff5,	16,	{0x8e, 0xb4, 0xaf, 0x4d, 0x22, 0xe4, 0xf5, 0x4d, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0x14} },
! { 0x9005,	16,	{0xb4, 0x0f, 0x00, 0x40, 0x03, 0x02, 0x91, 0x23, 0x90, 0x90, 0x14, 0xf8, 0x28, 0x28, 0x73, 0x02} },
! { 0x9015,	16,	{0x90, 0x41, 0x02, 0x90, 0x4d, 0x02, 0x90, 0x59, 0x02, 0x90, 0xa7, 0x02, 0x90, 0xb2, 0x02, 0x90} },
! { 0x9025,	16,	{0xbd, 0x02, 0x90, 0xc8, 0x02, 0x90, 0xd3, 0x02, 0x90, 0xde, 0x02, 0x90, 0xe9, 0x02, 0x90, 0xf4} },
! { 0x9035,	16,	{0x02, 0x90, 0xfb, 0x02, 0x91, 0x23, 0x02, 0x91, 0x06, 0x02, 0x91, 0x11, 0xaf, 0x53, 0xae, 0x52} },
! { 0x9045,	16,	{0x12, 0x83, 0xb7, 0x8f, 0x4d, 0x02, 0x91, 0x26, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x84, 0x95, 0x8f} },
! { 0x9055,	16,	{0x4d, 0x02, 0x91, 0x26, 0x85, 0x52, 0x50, 0x85, 0x53, 0x51, 0xe5, 0x51, 0x24, 0x01, 0xff, 0xe4} },
! { 0x9065,	16,	{0x35, 0x50, 0xfe, 0x12, 0x85, 0x2f, 0xaf, 0x51, 0xae, 0x50, 0x12, 0x85, 0xc2, 0x8f, 0x4d, 0xef} },
! { 0x9075,	16,	{0x64, 0x01, 0x60, 0x03, 0x02, 0x91, 0x26, 0xaf, 0x51, 0xae, 0x50, 0x12, 0x86, 0x17, 0x8f, 0x4d} },
! { 0x9085,	16,	{0xe5, 0x4d, 0x70, 0x03, 0x02, 0x91, 0x26, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xe0, 0x75, 0xf0} },
! { 0x9095,	16,	{0x0d, 0xa4, 0x24, 0xf4, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xaf, 0x82, 0xfe, 0x12, 0x86, 0x17, 0x02} },
! { 0x90a5,	16,	{0x91, 0x26, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8a, 0x2a, 0x8f, 0x4d, 0x80, 0x74, 0xaf, 0x53, 0xae} },
! { 0x90b5,	16,	{0x52, 0x12, 0x8a, 0x73, 0x8f, 0x4d, 0x80, 0x69, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8a, 0xbc, 0x8f} },
! { 0x90c5,	16,	{0x4d, 0x80, 0x5e, 0xaf, 0x4c, 0xae, 0x4b, 0x12, 0x8b, 0xe5, 0x8f, 0x4d, 0x80, 0x53, 0xaf, 0x53} },
! { 0x90d5,	16,	{0xae, 0x52, 0x12, 0x89, 0x5b, 0x8f, 0x4d, 0x80, 0x48, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x1a, 0xf1} },
! { 0x90e5,	16,	{0x8f, 0x4d, 0x80, 0x3d, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x89, 0xe6, 0x8f, 0x4d, 0x80, 0x32, 0x12} },
! { 0x90f5,	16,	{0x8f, 0x03, 0x8f, 0x4d, 0x80, 0x2b, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8b, 0x01, 0x8f, 0x4d, 0x80} },
! { 0x9105,	16,	{0x20, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8b, 0x22, 0x8f, 0x4d, 0x80, 0x15, 0xaf, 0x4c, 0xae, 0x4b} },
! { 0x9115,	16,	{0x7c, 0x02, 0x7d, 0xaf, 0x7b, 0x40, 0x12, 0x8e, 0x81, 0xe4, 0xf5, 0x4d, 0x80, 0x03, 0x75, 0x4d} },
! { 0x9125,	16,	{0xff, 0xe5, 0x4d, 0x60, 0x1d, 0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e} },
! { 0x9135,	16,	{0x83, 0xe0, 0x90, 0x01, 0x99, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12, 0x8e, 0xb4, 0xaf} },
! { 0x9145,	16,	{0x4d, 0x22, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0xff, 0x14, 0x24, 0xfa, 0x50, 0x04, 0x24} },
! { 0x9155,	16,	{0xfe, 0x70, 0x1f, 0x90, 0x01, 0x98, 0x74, 0x10, 0xf0, 0xa3, 0xef, 0xf0, 0x85, 0x53, 0x82, 0x85} },
! { 0x9165,	16,	{0x52, 0x83, 0xe0, 0x90, 0x01, 0x9a, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x03, 0x12, 0x8e, 0xb4} },
! { 0x9175,	4,	{0x8f, 0x4d, 0xaf, 0x4d} },
! { 0x9179,	1,	{0x22} },
! { 0x917a,	8,	{0x8f, 0x4e, 0x8e, 0x4d, 0x8d, 0x4c, 0x8c, 0x4b} },
! { 0x9182,	16,	{0x75, 0x55, 0x01, 0x75, 0x56, 0x9c, 0xe4, 0xf5, 0x54, 0xaf, 0x50, 0x15, 0x50, 0xef, 0x70, 0x03} },
! { 0x9192,	16,	{0x02, 0x92, 0x18, 0xaf, 0x4f, 0xe4, 0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xaf, 0x4e} },
! { 0x91a2,	16,	{0xae, 0x4d, 0xad, 0x4c, 0xac, 0x4b, 0x12, 0xa0, 0x2e, 0xaf, 0x03, 0x8f, 0x53, 0xaf, 0x4e, 0xae} },
! { 0x91b2,	16,	{0x4d, 0xad, 0x4c, 0xac, 0x4b, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xaf, 0x4f, 0xe4} },
! { 0x91c2,	16,	{0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04} },
! { 0x91d2,	16,	{0x12, 0xa0, 0x2e, 0x8f, 0x4e, 0x8e, 0x4d, 0x8d, 0x4c, 0x8c, 0x4b, 0xe5, 0x53, 0x24, 0x30, 0xf5} },
! { 0x91e2,	16,	{0x53, 0xd3, 0x94, 0x39, 0x40, 0x06, 0x74, 0x07, 0x25, 0x53, 0xf5, 0x53, 0x05, 0x56, 0xe5, 0x56} },
! { 0x91f2,	16,	{0xae, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x05, 0x56, 0xe5} },
! { 0x9202,	16,	{0x56, 0xae, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x53, 0xf0, 0x05} },
! { 0x9212,	16,	{0x54, 0x05, 0x54, 0x02, 0x91, 0x8b, 0xe5, 0x56, 0x15, 0x56, 0x70, 0x02, 0x15, 0x55, 0xaf, 0x54} },
! { 0x9222,	16,	{0x15, 0x54, 0xef, 0x60, 0x23, 0xe5, 0x56, 0x15, 0x56, 0xae, 0x55, 0x70, 0x02, 0x15, 0x55, 0xf5} },
! { 0x9232,	16,	{0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05, 0x52, 0xe5, 0x52, 0xac, 0x51, 0x70, 0x02, 0x05, 0x51, 0x14} },
! { 0x9242,	8,	{0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x80, 0xd6} },
! { 0x924a,	1,	{0x22} },
! { 0x924b,	16,	{0xaa, 0x07, 0xa9, 0x05, 0x90, 0x01, 0xc9, 0xe0, 0xc3, 0x94, 0x40, 0x50, 0x61, 0xac, 0x02, 0x74} },
! { 0x925b,	16,	{0x01, 0x7e, 0x00, 0xa8, 0x04, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff} },
! { 0x926b,	16,	{0xe4, 0xef, 0x55, 0x30, 0x60, 0x45, 0xea, 0x04, 0xff, 0x90, 0x01, 0xc2, 0xe0, 0xfc, 0xa3, 0xe0} },
! { 0x927b,	16,	{0xfd, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0xa3, 0xe9, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
! { 0x928b,	16,	{0xeb, 0xf0, 0x90, 0x01, 0xc2, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9f, 0x8e, 0xfc, 0xd3, 0xe5, 0xf0} },
! { 0x929b,	16,	{0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xc2, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
! { 0x92ab,	16,	{0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x04, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
! { 0x92bb,	1,	{0x22} },
! { 0x92bc,	16,	{0x90, 0x01, 0xc9, 0xe0, 0xd3, 0x94, 0x00, 0x40, 0x55, 0x90, 0x01, 0xbe, 0xe0, 0xfc, 0xa3, 0xe0} },
! { 0x92cc,	16,	{0xaa, 0x04, 0xf9, 0x7b, 0x01, 0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0xaa, 0x06, 0xa9, 0x07, 0xa8} },
! { 0x92dc,	16,	{0x01, 0xac, 0x02, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x03, 0x12} },
! { 0x92ec,	16,	{0x9f, 0x1f, 0x90, 0x01, 0xbe, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9f, 0x8e, 0xfc, 0xd3, 0xe5, 0xf0} },
! { 0x92fc,	16,	{0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xbe, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} },
! { 0x930c,	16,	{0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x14, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
! { 0x931c,	1,	{0x22} },
! { 0x931d,	16,	{0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x73, 0x7e, 0x7b, 0x7f, 0x80, 0x75, 0x50, 0x7b, 0x75, 0x51} },
! { 0x932d,	16,	{0x80, 0xe5, 0x51, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x50, 0xa9, 0x07, 0x7b, 0x01, 0x8b, 0x52, 0xf5} },
! { 0x933d,	16,	{0x53, 0x89, 0x54, 0xfe, 0x12, 0x92, 0xbc, 0xef, 0x60, 0x50, 0xab, 0x52, 0xaa, 0x53, 0xa9, 0x54} },
! { 0x934d,	16,	{0x12, 0x9f, 0x48, 0x14, 0xff, 0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0xb4, 0x02, 0x16, 0xc2, 0xaf} },
! { 0x935d,	16,	{0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x44} },
! { 0x936d,	16,	{0x04, 0xf0, 0xd2, 0xaf, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce} },
! { 0x937d,	16,	{0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x30, 0x60, 0x0f, 0x85, 0x51, 0x82, 0x85, 0x50} },
! { 0x938d,	10,	{0x83, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0xc3, 0x74, 0x04, 0xf0} },
! { 0x9397,	1,	{0x22} },
! { 0x9398,	16,	{0x12, 0x93, 0x1d, 0xe4, 0xf5, 0x4b, 0x74, 0x36, 0x25, 0x4b, 0xf8, 0xe6, 0x54, 0xf0, 0xf5, 0x4c} },
! { 0x93a8,	16,	{0x74, 0xc5, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xe0, 0x65, 0x4c, 0xff, 0xc4} },
! { 0x93b8,	16,	{0x54, 0x0f, 0xf5, 0x4d, 0x60, 0x22, 0x74, 0xc5, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5} },
! { 0x93c8,	16,	{0x83, 0xe5, 0x4c, 0xf0, 0xaf, 0x4b, 0x7d, 0x01, 0xe5, 0x4c, 0x45, 0x4d, 0xfb, 0x12, 0x92, 0x4b} },
! { 0x93d8,	16,	{0xef, 0x70, 0x05, 0x12, 0x93, 0x1d, 0x80, 0xec, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40} },
! { 0x93e8,	16,	{0xb5, 0x12, 0x93, 0x1d, 0xe5, 0x3a, 0x60, 0x48, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8} },
! { 0x93f8,	16,	{0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x55, 0x3a, 0x60, 0x29, 0xe5, 0x4b} },
! { 0x9408,	16,	{0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
! { 0x9418,	16,	{0x16, 0xaf, 0x4b, 0x7d, 0x04, 0x7b, 0x80, 0x12, 0x92, 0x4b, 0xef, 0x70, 0x05, 0x12, 0x93, 0x1d} },
! { 0x9428,	16,	{0x80, 0xef, 0xe5, 0x4c, 0xf4, 0x52, 0x3a, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0xbb} },
! { 0x9438,	16,	{0x90, 0x03, 0x00, 0xe0, 0x60, 0x03, 0x02, 0x95, 0x05, 0x74, 0x19, 0xf0, 0x7f, 0x02, 0x12, 0x81} },
! { 0x9448,	16,	{0xd9, 0x8e, 0x4e, 0x8f, 0x4f, 0xc3, 0xe5, 0x4e, 0x64, 0x80, 0x94, 0x80, 0x40, 0xee, 0x90, 0x01} },
! { 0x9458,	16,	{0xbc, 0xe0, 0x65, 0x4f, 0xf0, 0x60, 0x37, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8, 0x07} },
! { 0x9468,	16,	{0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x90, 0x01, 0xbc, 0xe0, 0x55, 0x4c, 0x60} },
! { 0x9478,	16,	{0x14, 0xaf, 0x4b, 0x7d, 0x08, 0xe5, 0x4c, 0x55, 0x4f, 0xfb, 0x12, 0x92, 0x4b, 0xef, 0x70, 0x05} },
! { 0x9488,	16,	{0x12, 0x93, 0x1d, 0x80, 0xec, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0xcc, 0x90, 0x01} },
! { 0x9498,	16,	{0xbc, 0xe5, 0x4f, 0xf0, 0xe4, 0xf5, 0x4b, 0xc2, 0xaf, 0x74, 0x32, 0x25, 0x4b, 0xf8, 0xe6, 0xf5} },
! { 0x94a8,	16,	{0x4c, 0xe4, 0xf6, 0xd2, 0xaf, 0x53, 0x4c, 0x1e, 0xe5, 0x4c, 0x60, 0x11, 0xaf, 0x4b, 0x7d, 0x02} },
! { 0x94b8,	16,	{0xab, 0x4c, 0x12, 0x92, 0x4b, 0xef, 0x70, 0x05, 0x12, 0x93, 0x1d, 0x80, 0xef, 0x74, 0x2c, 0x25} },
! { 0x94c8,	16,	{0x4b, 0xf8, 0xe6, 0xf5, 0x4c, 0x74, 0xfc, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} },
! { 0x94d8,	16,	{0xe0, 0x65, 0x4c, 0x60, 0x11, 0xaf, 0x4b, 0x7d, 0x04, 0xab, 0x4c, 0x12, 0x92, 0x4b, 0xef, 0x70} },
! { 0x94e8,	16,	{0x05, 0x12, 0x93, 0x1d, 0x80, 0xef, 0x74, 0xfc, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5} },
! { 0x94f8,	16,	{0x83, 0xe5, 0x4c, 0xf0, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0x9a, 0x12, 0x93, 0x1d} },
! { 0x9508,	1,	{0x22} },
! { 0x9509,	12,	{0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x62, 0x02, 0x95, 0x50} },
! { 0x9515,	16,	{0x02, 0x05, 0xad, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
! { 0x9525,	16,	{0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
! { 0x9535,	16,	{0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
! { 0x9545,	16,	{0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x95, 0x95, 0xe4, 0x7e} },
! { 0x9555,	16,	{0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
! { 0x9565,	16,	{0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
! { 0x9575,	16,	{0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
! { 0x9585,	16,	{0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
! { 0x9595,	16,	{0x60, 0x24, 0x02, 0x8a, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x81, 0x82, 0x84, 0x88} },
! { 0x95a5,	16,	{0x90, 0xa0, 0xc0, 0xc1, 0xc2, 0xc4, 0xc8, 0xd0, 0xe0, 0xe1, 0xe2, 0xe4, 0xe8, 0xf0, 0xf1, 0xf2} },
! { 0x95b5,	8,	{0xf4, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff} },
! { 0x95bd,	1,	{0x00} },
! { 0x95be,	3,	{0x00, 0x03, 0x1d} },
! { 0x95c1,	8,	{0x8b, 0x54, 0x8a, 0x55, 0x89, 0x56, 0x8d, 0x57} },
! { 0x95c9,	16,	{0xe4, 0xf5, 0x58, 0xf5, 0x59, 0xaf, 0x57, 0x15, 0x57, 0xef, 0x60, 0x36, 0xab, 0x54, 0x05, 0x56} },
! { 0x95d9,	16,	{0xe5, 0x56, 0xaa, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf9, 0x12, 0x9f, 0x48, 0xff, 0xe5, 0x58} },
! { 0x95e9,	16,	{0xe5, 0x59, 0x6f, 0x25, 0xe0, 0xff, 0xe4, 0x33, 0xfe, 0x74, 0xa2, 0x2f, 0xf5, 0x82, 0xee, 0x34} },
! { 0x95f9,	16,	{0x9b, 0xf5, 0x83, 0xe5, 0x58, 0xff, 0xe4, 0x93, 0xf5, 0x58, 0x74, 0x01, 0x93, 0x6f, 0xf5, 0x59} },
! { 0x9609,	6,	{0x80, 0xc3, 0xae, 0x58, 0xaf, 0x59} },
! { 0x960f,	1,	{0x22} },
! { 0x9610,	11,	{0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18} },
! { 0x961b,	16,	{0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xfe, 0x30, 0xe0, 0x05, 0x90, 0x20, 0x02, 0xe0, 0xff, 0xee} },
! { 0x962b,	16,	{0x30, 0xe1, 0x05, 0x90, 0x20, 0x0a, 0xe0, 0xff, 0xee, 0x30, 0xe2, 0x05, 0x90, 0x20, 0x12, 0xe0} },
! { 0x963b,	16,	{0xff, 0xee, 0x30, 0xe3, 0x05, 0x90, 0x20, 0x1a, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x1e} },
! { 0x964b,	10,	{0x04, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x01, 0xc4, 0xee, 0xf0} },
! { 0x9655,	9,	{0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
! { 0x965e,	2,	{0xa9, 0x03} },
! { 0x9660,	16,	{0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xe5} },
! { 0x9670,	16,	{0x57, 0x45, 0x58, 0xf5, 0x59, 0xe9, 0x60, 0x14, 0x8a, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82} },
! { 0x9680,	16,	{0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x4d, 0xf0, 0xe4, 0xfe, 0x80, 0x13, 0xeb, 0x24, 0x04, 0xf5} },
! { 0x9690,	16,	{0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xff, 0xed, 0xf4, 0xfc, 0xef, 0x5c, 0xf0, 0xae, 0x59, 0xeb} },
! { 0x96a0,	16,	{0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0x55, 0x59, 0xfc, 0xb5, 0x06, 0x03, 0xaf} },
! { 0x96b0,	16,	{0x05, 0x22, 0xe5, 0x57, 0x5c, 0xfe, 0xe5, 0x58, 0x5c, 0xfd, 0xe9, 0x60, 0x16, 0xee, 0x70, 0x04} },
! { 0x96c0,	16,	{0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xae, 0x07, 0xed, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
! { 0x96d0,	16,	{0x00, 0xad, 0x07, 0xee, 0x60, 0x03, 0xaf, 0x57, 0x22, 0xed, 0x60, 0x03, 0xaf, 0x58, 0x22, 0x7f} },
! { 0x96e0,	1,	{0x00} },
! { 0x96e1,	1,	{0x22} },
! { 0x96e2,	16,	{0x75, 0x50, 0x02, 0x75, 0x51, 0xb0, 0x90, 0x03, 0x35, 0x74, 0x0f, 0xf0, 0x85, 0x51, 0x82, 0x85} },
! { 0x96f2,	16,	{0x50, 0x83, 0xe0, 0xff, 0x90, 0x03, 0x36, 0xf0, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xa3, 0xe0} },
! { 0x9702,	16,	{0x90, 0x03, 0x37, 0xf0, 0xa3, 0x74, 0xff, 0xf0, 0x75, 0x52, 0x03, 0x75, 0x53, 0x39, 0xef, 0x14} },
! { 0x9712,	16,	{0xb4, 0x0b, 0x00, 0x40, 0x03, 0x02, 0x9b, 0x6a, 0x90, 0x97, 0x21, 0xf8, 0x28, 0x28, 0x73, 0x02} },
! { 0x9722,	16,	{0x97, 0x42, 0x02, 0x97, 0xe1, 0x02, 0x98, 0xe6, 0x02, 0x99, 0x06, 0x02, 0x99, 0x06, 0x02, 0x99} },
! { 0x9732,	16,	{0xa1, 0x02, 0x99, 0xdc, 0x02, 0x9a, 0x01, 0x02, 0x9a, 0xbf, 0x02, 0x9a, 0xef, 0x02, 0x9b, 0x1b} },
! { 0x9742,	16,	{0xe4, 0xf5, 0x4b, 0xe5, 0x4b, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20} },
! { 0x9752,	16,	{0xaf, 0x82, 0xf5, 0x4e, 0x8f, 0x4f, 0xe4, 0xff, 0xe4, 0xfe, 0xef, 0x60, 0x10, 0x74, 0x8a, 0x2e} },
! { 0x9762,	16,	{0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf4, 0xf5, 0x4c, 0x80, 0x0d, 0x74, 0x8a, 0x2e} },
! { 0x9772,	16,	{0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf5, 0x4c, 0xe5, 0x4f, 0x24, 0x07, 0xf5, 0x82} },
! { 0x9782,	16,	{0xe4, 0x35, 0x4e, 0xf5, 0x83, 0xe5, 0x4c, 0xf0, 0xe0, 0xf5, 0x4d, 0x65, 0x4c, 0x60, 0x38, 0xe4} },
! { 0x9792,	16,	{0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xfd, 0x05, 0x53, 0xe5, 0x53, 0xaa, 0x52, 0x70, 0x02} },
! { 0x97a2,	16,	{0x05, 0x52, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52, 0x70} },
! { 0x97b2,	16,	{0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe5, 0x4c, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} },
! { 0x97c2,	16,	{0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x9b, 0x70, 0x0e, 0xbe, 0x24, 0x8f, 0x0f, 0xef, 0x64, 0x02, 0x70} },
! { 0x97d2,	16,	{0x87, 0x05, 0x4b, 0xe5, 0x4b, 0x64, 0x04, 0x60, 0x03, 0x02, 0x97, 0x45, 0x02, 0x9b, 0x70, 0xe4} },
! { 0x97e2,	16,	{0xf5, 0x4b, 0xaf, 0x4b, 0xe4, 0xfd, 0x12, 0x82, 0xa8, 0x05, 0x4b, 0xe5, 0x4b, 0xd3, 0x94, 0x03} },
! { 0x97f2,	16,	{0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x96, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe4, 0xf5, 0x4d, 0x7e} },
! { 0x9802,	16,	{0x20, 0x7f, 0x00, 0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8} },
! { 0x9812,	16,	{0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x90, 0x01, 0xc4, 0xf0, 0x90, 0x01} },
! { 0x9822,	16,	{0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0x74, 0x02} },
! { 0x9832,	16,	{0xf0, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x4c, 0x34, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0} },
! { 0x9842,	16,	{0x70, 0xef, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xff, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52} },
! { 0x9852,	16,	{0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} },
! { 0x9862,	16,	{0x83, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x01, 0xc4, 0xf0, 0x75, 0x4d, 0xff, 0x90, 0x01, 0xc4, 0xe0} },
! { 0x9872,	16,	{0xff, 0x60, 0x37, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xfe, 0x05, 0x53, 0xe5, 0x53} },
! { 0x9882,	16,	{0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xee, 0xf0, 0x05, 0x53, 0xe5} },
! { 0x9892,	16,	{0x53, 0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x53} },
! { 0x98a2,	16,	{0x82, 0x85, 0x52, 0x83, 0xe5, 0x4c, 0xf0, 0x75, 0x4d, 0xff, 0xe5, 0x4d, 0x70, 0x16, 0x74, 0x08} },
! { 0x98b2,	16,	{0x25, 0x4f, 0xf5, 0x4f, 0xe4, 0x35, 0x4e, 0xf5, 0x4e, 0x05, 0x4b, 0xe5, 0x4b, 0x64, 0x04, 0x60} },
! { 0x98c2,	16,	{0x03, 0x02, 0x98, 0x0d, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0x05, 0x4b} },
! { 0x98d2,	16,	{0xe5, 0x4b, 0xd3, 0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x13, 0xf0, 0xa3, 0x74, 0x12} },
! { 0x98e2,	16,	{0xf0, 0x02, 0x9b, 0x70, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xa3, 0xe0, 0x14, 0xff, 0x74, 0x01} },
! { 0x98f2,	16,	{0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x90, 0x02, 0xf7, 0xf0, 0x90, 0x01, 0xc4} },
! { 0x9902,	16,	{0xf0, 0x02, 0x9b, 0x70, 0x90, 0x01, 0xc0, 0x74, 0x03, 0xf0, 0xa3, 0x74, 0xe8, 0xf0, 0xe4, 0xf5} },
! { 0x9912,	16,	{0x4d, 0x90, 0x02, 0xf7, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x07, 0x19, 0x90, 0x01, 0xc0} },
! { 0x9922,	16,	{0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xea, 0x90, 0x03, 0x38, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} },
! { 0x9932,	16,	{0x83, 0x74, 0xff, 0xf0, 0xf5, 0x4d, 0xe5, 0x4d, 0x60, 0x03, 0x02, 0x9b, 0x70, 0x90, 0x01, 0xc0} },
! { 0x9942,	16,	{0xf0, 0xa3, 0x74, 0x96, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6, 0x7f} },
! { 0x9952,	16,	{0x02, 0x12, 0x81, 0xd9, 0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xef, 0x54, 0x0f, 0xf5} },
! { 0x9962,	16,	{0x4d, 0x90, 0x02, 0xf7, 0xe0, 0x55, 0x4d, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f} },
! { 0x9972,	16,	{0x4c, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xe0, 0xb4, 0x05, 0x0c, 0xe5, 0x4c, 0x70, 0x04, 0x7f} },
! { 0x9982,	16,	{0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f, 0x4c, 0xe5, 0x4c, 0x70, 0x03, 0x02, 0x9b, 0x70, 0xe4, 0x90} },
! { 0x9992,	16,	{0x03, 0x38, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52, 0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x9b, 0x70, 0xe4} },
! { 0x99a2,	16,	{0xff, 0xfd, 0x12, 0x82, 0xa8, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0x85} },
! { 0x99b2,	16,	{0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85, 0x4f, 0x82, 0x85} },
! { 0x99c2,	16,	{0x4e, 0x83, 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0xa3} },
! { 0x99d2,	16,	{0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xd2, 0x04, 0x02, 0x9b, 0x70, 0xc2, 0x04, 0x7e, 0x20, 0x7f, 0x00} },
! { 0x99e2,	16,	{0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0xe5, 0x4f, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x4e, 0xf5} },
! { 0x99f2,	16,	{0x83, 0xe0, 0x30, 0xe6, 0xf1, 0xe4, 0xff, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0x02, 0x9b, 0x70, 0xe4} },
! { 0x9a02,	16,	{0xf5, 0x4d, 0xf5, 0x4b, 0xaf, 0x4b, 0xe4, 0xfd, 0x12, 0x82, 0xa8, 0xe5, 0x4b, 0x75, 0xf0, 0x08} },
! { 0x9a12,	16,	{0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x4e, 0x8f, 0x4f, 0xf5, 0x83} },
! { 0x9a22,	16,	{0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf} },
! { 0x9a32,	16,	{0x4b, 0x7d, 0x01, 0x7b, 0x01, 0x75, 0x57, 0x80, 0x75, 0x58, 0x40, 0x12, 0x96, 0x5e, 0x8f, 0x4d} },
! { 0x9a42,	16,	{0xe5, 0x4d, 0x70, 0x11, 0xaf, 0x4b, 0x7d, 0x02, 0x7b, 0x01, 0x75, 0x57, 0x10, 0x75, 0x58, 0x20} },
! { 0x9a52,	16,	{0x12, 0x96, 0x5e, 0x8f, 0x4d, 0xe5, 0x4d, 0x70, 0x10, 0xaf, 0x4b, 0x7d, 0x01, 0xfb, 0x75, 0x57} },
! { 0x9a62,	16,	{0x80, 0x75, 0x58, 0x40, 0x12, 0x96, 0x5e, 0x8f, 0x4d, 0xe5, 0x4d, 0x70, 0x10, 0xaf, 0x4b, 0x7d} },
! { 0x9a72,	16,	{0x02, 0xfb, 0x75, 0x57, 0x10, 0x75, 0x58, 0x20, 0x12, 0x96, 0x5e, 0x8f, 0x4d, 0xaf, 0x4b, 0x7d} },
! { 0x9a82,	16,	{0x01, 0x12, 0x82, 0xa8, 0xe5, 0x4d, 0x60, 0x26, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04} },
! { 0x9a92,	16,	{0xff, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83} },
! { 0x9aa2,	16,	{0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52, 0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x9b, 0x70, 0x05, 0x4b} },
! { 0x9ab2,	16,	{0xe5, 0x4b, 0xd3, 0x94, 0x03, 0x50, 0x03, 0x02, 0x9a, 0x06, 0x02, 0x9b, 0x70, 0xe4, 0x90, 0x03} },
! { 0x9ac2,	16,	{0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74} },
! { 0x9ad2,	16,	{0x9b, 0xf0, 0xa3, 0x74, 0x92, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08} },
! { 0x9ae2,	16,	{0x70, 0x03, 0x02, 0x9b, 0x70, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x02, 0x9b, 0x70, 0xe4, 0x90, 0x03} },
! { 0x9af2,	16,	{0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0xe5} },
! { 0x9b02,	16,	{0x52, 0xf0, 0xa3, 0xe5, 0x53, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x10, 0x2c, 0xef, 0x64, 0x08} },
! { 0x9b12,	16,	{0x60, 0x5c, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x55, 0xe5, 0x51, 0x24, 0x02, 0xff, 0xe4, 0x35} },
! { 0x9b22,	16,	{0x50, 0xfa, 0xa9, 0x07, 0x7b, 0x01, 0x7d, 0x10, 0x12, 0x95, 0xc1, 0xef, 0x4e, 0x70, 0x32, 0x90} },
! { 0x9b32,	16,	{0x03, 0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe5} },
! { 0x9b42,	16,	{0x51, 0x24, 0x02, 0x90, 0x03, 0x60, 0xf0, 0xe4, 0x35, 0x50, 0x90, 0x03, 0x5f, 0xf0, 0x7e, 0x03} },
! { 0x9b52,	16,	{0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08, 0x60, 0x14, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80} },
! { 0x9b62,	16,	{0x0d, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x06, 0x90, 0x03, 0x38, 0x74, 0x01, 0xf0, 0x90, 0x01} },
! { 0x9b72,	16,	{0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70} },
! { 0x9b82,	15,	{0xf6, 0x7e, 0x03, 0x7f, 0x35, 0x7d, 0x24, 0x12, 0x8e, 0xb4, 0xe4, 0x90, 0x02, 0xaf, 0xf0} },
! { 0x9b91,	1,	{0x22} },
! { 0x9b92,	16,	{0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f} },
! { 0x9ba2,	16,	{0x00, 0x00, 0xc0, 0xc1, 0xc1, 0x81, 0x01, 0x40, 0xc3, 0x01, 0x03, 0xc0, 0x02, 0x80, 0xc2, 0x41} },
! { 0x9bb2,	16,	{0xc6, 0x01, 0x06, 0xc0, 0x07, 0x80, 0xc7, 0x41, 0x05, 0x00, 0xc5, 0xc1, 0xc4, 0x81, 0x04, 0x40} },
! { 0x9bc2,	16,	{0xcc, 0x01, 0x0c, 0xc0, 0x0d, 0x80, 0xcd, 0x41, 0x0f, 0x00, 0xcf, 0xc1, 0xce, 0x81, 0x0e, 0x40} },
! { 0x9bd2,	16,	{0x0a, 0x00, 0xca, 0xc1, 0xcb, 0x81, 0x0b, 0x40, 0xc9, 0x01, 0x09, 0xc0, 0x08, 0x80, 0xc8, 0x41} },
! { 0x9be2,	16,	{0xd8, 0x01, 0x18, 0xc0, 0x19, 0x80, 0xd9, 0x41, 0x1b, 0x00, 0xdb, 0xc1, 0xda, 0x81, 0x1a, 0x40} },
! { 0x9bf2,	16,	{0x1e, 0x00, 0xde, 0xc1, 0xdf, 0x81, 0x1f, 0x40, 0xdd, 0x01, 0x1d, 0xc0, 0x1c, 0x80, 0xdc, 0x41} },
! { 0x9c02,	16,	{0x14, 0x00, 0xd4, 0xc1, 0xd5, 0x81, 0x15, 0x40, 0xd7, 0x01, 0x17, 0xc0, 0x16, 0x80, 0xd6, 0x41} },
! { 0x9c12,	16,	{0xd2, 0x01, 0x12, 0xc0, 0x13, 0x80, 0xd3, 0x41, 0x11, 0x00, 0xd1, 0xc1, 0xd0, 0x81, 0x10, 0x40} },
! { 0x9c22,	16,	{0xf0, 0x01, 0x30, 0xc0, 0x31, 0x80, 0xf1, 0x41, 0x33, 0x00, 0xf3, 0xc1, 0xf2, 0x81, 0x32, 0x40} },
! { 0x9c32,	16,	{0x36, 0x00, 0xf6, 0xc1, 0xf7, 0x81, 0x37, 0x40, 0xf5, 0x01, 0x35, 0xc0, 0x34, 0x80, 0xf4, 0x41} },
! { 0x9c42,	16,	{0x3c, 0x00, 0xfc, 0xc1, 0xfd, 0x81, 0x3d, 0x40, 0xff, 0x01, 0x3f, 0xc0, 0x3e, 0x80, 0xfe, 0x41} },
! { 0x9c52,	16,	{0xfa, 0x01, 0x3a, 0xc0, 0x3b, 0x80, 0xfb, 0x41, 0x39, 0x00, 0xf9, 0xc1, 0xf8, 0x81, 0x38, 0x40} },
! { 0x9c62,	16,	{0x28, 0x00, 0xe8, 0xc1, 0xe9, 0x81, 0x29, 0x40, 0xeb, 0x01, 0x2b, 0xc0, 0x2a, 0x80, 0xea, 0x41} },
! { 0x9c72,	16,	{0xee, 0x01, 0x2e, 0xc0, 0x2f, 0x80, 0xef, 0x41, 0x2d, 0x00, 0xed, 0xc1, 0xec, 0x81, 0x2c, 0x40} },
! { 0x9c82,	16,	{0xe4, 0x01, 0x24, 0xc0, 0x25, 0x80, 0xe5, 0x41, 0x27, 0x00, 0xe7, 0xc1, 0xe6, 0x81, 0x26, 0x40} },
! { 0x9c92,	16,	{0x22, 0x00, 0xe2, 0xc1, 0xe3, 0x81, 0x23, 0x40, 0xe1, 0x01, 0x21, 0xc0, 0x20, 0x80, 0xe0, 0x41} },
! { 0x9ca2,	16,	{0xa0, 0x01, 0x60, 0xc0, 0x61, 0x80, 0xa1, 0x41, 0x63, 0x00, 0xa3, 0xc1, 0xa2, 0x81, 0x62, 0x40} },
! { 0x9cb2,	16,	{0x66, 0x00, 0xa6, 0xc1, 0xa7, 0x81, 0x67, 0x40, 0xa5, 0x01, 0x65, 0xc0, 0x64, 0x80, 0xa4, 0x41} },
! { 0x9cc2,	16,	{0x6c, 0x00, 0xac, 0xc1, 0xad, 0x81, 0x6d, 0x40, 0xaf, 0x01, 0x6f, 0xc0, 0x6e, 0x80, 0xae, 0x41} },
! { 0x9cd2,	16,	{0xaa, 0x01, 0x6a, 0xc0, 0x6b, 0x80, 0xab, 0x41, 0x69, 0x00, 0xa9, 0xc1, 0xa8, 0x81, 0x68, 0x40} },
! { 0x9ce2,	16,	{0x78, 0x00, 0xb8, 0xc1, 0xb9, 0x81, 0x79, 0x40, 0xbb, 0x01, 0x7b, 0xc0, 0x7a, 0x80, 0xba, 0x41} },
! { 0x9cf2,	16,	{0xbe, 0x01, 0x7e, 0xc0, 0x7f, 0x80, 0xbf, 0x41, 0x7d, 0x00, 0xbd, 0xc1, 0xbc, 0x81, 0x7c, 0x40} },
! { 0x9d02,	16,	{0xb4, 0x01, 0x74, 0xc0, 0x75, 0x80, 0xb5, 0x41, 0x77, 0x00, 0xb7, 0xc1, 0xb6, 0x81, 0x76, 0x40} },
! { 0x9d12,	16,	{0x72, 0x00, 0xb2, 0xc1, 0xb3, 0x81, 0x73, 0x40, 0xb1, 0x01, 0x71, 0xc0, 0x70, 0x80, 0xb0, 0x41} },
! { 0x9d22,	16,	{0x50, 0x00, 0x90, 0xc1, 0x91, 0x81, 0x51, 0x40, 0x93, 0x01, 0x53, 0xc0, 0x52, 0x80, 0x92, 0x41} },
! { 0x9d32,	16,	{0x96, 0x01, 0x56, 0xc0, 0x57, 0x80, 0x97, 0x41, 0x55, 0x00, 0x95, 0xc1, 0x94, 0x81, 0x54, 0x40} },
! { 0x9d42,	16,	{0x9c, 0x01, 0x5c, 0xc0, 0x5d, 0x80, 0x9d, 0x41, 0x5f, 0x00, 0x9f, 0xc1, 0x9e, 0x81, 0x5e, 0x40} },
! { 0x9d52,	16,	{0x5a, 0x00, 0x9a, 0xc1, 0x9b, 0x81, 0x5b, 0x40, 0x99, 0x01, 0x59, 0xc0, 0x58, 0x80, 0x98, 0x41} },
! { 0x9d62,	16,	{0x88, 0x01, 0x48, 0xc0, 0x49, 0x80, 0x89, 0x41, 0x4b, 0x00, 0x8b, 0xc1, 0x8a, 0x81, 0x4a, 0x40} },
! { 0x9d72,	16,	{0x4e, 0x00, 0x8e, 0xc1, 0x8f, 0x81, 0x4f, 0x40, 0x8d, 0x01, 0x4d, 0xc0, 0x4c, 0x80, 0x8c, 0x41} },
! { 0x9d82,	16,	{0x44, 0x00, 0x84, 0xc1, 0x85, 0x81, 0x45, 0x40, 0x87, 0x01, 0x47, 0xc0, 0x46, 0x80, 0x86, 0x41} },
! { 0x9d92,	16,	{0x82, 0x01, 0x42, 0xc0, 0x43, 0x80, 0x83, 0x41, 0x41, 0x00, 0x81, 0xc1, 0x80, 0x81, 0x40, 0x40} },
! { 0x9da2,	16,	{0xe4, 0xff, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02} },
! { 0x9db2,	16,	{0x9e, 0x45, 0x74, 0x36, 0x2f, 0xf8, 0xe6, 0x20, 0xe5, 0x03, 0x02, 0x9e, 0x45, 0xef, 0x75, 0xf0} },
! { 0x9dc2,	16,	{0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0xf5, 0x83, 0xe5, 0x82} },
! { 0x9dd2,	16,	{0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x60, 0x64, 0x60, 0x70, 0x63} },
! { 0x9de2,	16,	{0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01} },
! { 0x9df2,	16,	{0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0, 0x8d, 0x82, 0x8c, 0x83, 0xf0, 0x74, 0xf8} },
! { 0x9e02,	16,	{0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x14, 0xf0, 0x70, 0x36, 0xef, 0x25, 0xe0} },
! { 0x9e12,	16,	{0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0xef, 0x25, 0xe0, 0xfe, 0xc3} },
! { 0x9e22,	16,	{0x74, 0x0c, 0x9e, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xad} },
! { 0x9e32,	16,	{0x82, 0xfc, 0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xec, 0xf0} },
! { 0x9e42,	12,	{0xa3, 0xed, 0xf0, 0x0f, 0xef, 0x64, 0x04, 0x60, 0x03, 0x02, 0x9d, 0xa4} },
! { 0x9e4e,	1,	{0x22} },
! { 0x9e4f,	16,	{0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e} },
! { 0x9e5f,	16,	{0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08} },
! { 0x9e6f,	16,	{0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83} },
! { 0x9e7f,	16,	{0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08} },
! { 0x9e8f,	16,	{0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c} },
! { 0x9e9f,	16,	{0x80, 0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10} },
! { 0x9eaf,	16,	{0x80, 0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33} },
! { 0x9ebf,	16,	{0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83} },
! { 0x9ecf,	16,	{0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80} },
! { 0x9edf,	16,	{0x0d, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0} },
! { 0x9eef,	16,	{0xed, 0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc} },
! { 0x9eff,	16,	{0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde} },
! { 0x9f0f,	16,	{0xe8, 0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc} },
! { 0x9f1f,	16,	{0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xc2, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4} },
! { 0x9f2f,	16,	{0x04, 0x00, 0x50, 0xb8, 0x23, 0x23, 0x45, 0x82, 0xf5, 0x82, 0xef, 0x4e, 0x60, 0xae, 0xef, 0x60} },
! { 0x9f3f,	9,	{0x01, 0x0e, 0xe5, 0x82, 0x23, 0x90, 0x9e, 0x9f, 0x73} },
! { 0x9f48,	16,	{0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
! { 0x9f58,	9,	{0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
! { 0x9f61,	16,	{0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
! { 0x9f71,	16,	{0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
! { 0x9f81,	13,	{0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
! { 0x9f8e,	16,	{0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02} },
! { 0x9f9e,	6,	{0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22} },
! { 0x9fa4,	16,	{0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83} },
! { 0x9fb4,	6,	{0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22} },
! { 0x9fba,	16,	{0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
! { 0x9fca,	16,	{0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
! { 0x9fda,	16,	{0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
! { 0x9fea,	8,	{0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
! { 0x9ff2,	16,	{0x75, 0xf0, 0x08, 0x75, 0x82, 0x00, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xcd, 0x33, 0xcd, 0xcc} },
! { 0xa002,	16,	{0x33, 0xcc, 0xc5, 0x82, 0x33, 0xc5, 0x82, 0x9b, 0xed, 0x9a, 0xec, 0x99, 0xe5, 0x82, 0x98, 0x40} },
! { 0xa012,	16,	{0x0c, 0xf5, 0x82, 0xee, 0x9b, 0xfe, 0xed, 0x9a, 0xfd, 0xec, 0x99, 0xfc, 0x0f, 0xd5, 0xf0, 0xd6} },
! { 0xa022,	16,	{0xe4, 0xce, 0xfb, 0xe4, 0xcd, 0xfa, 0xe4, 0xcc, 0xf9, 0xa8, 0x82, 0x22, 0xb8, 0x00, 0xc1, 0xb9} },
! { 0xa032,	16,	{0x00, 0x59, 0xba, 0x00, 0x2d, 0xec, 0x8b, 0xf0, 0x84, 0xcf, 0xce, 0xcd, 0xfc, 0xe5, 0xf0, 0xcb} },
! { 0xa042,	16,	{0xf9, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc, 0xeb} },
! { 0xa052,	16,	{0x33, 0xfb, 0x10, 0xd7, 0x03, 0x99, 0x40, 0x04, 0xeb, 0x99, 0xfb, 0x0f, 0xd8, 0xe5, 0xe4, 0xf9} },
! { 0xa062,	16,	{0xfa, 0x22, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc} },
! { 0xa072,	16,	{0xc9, 0x33, 0xc9, 0x10, 0xd7, 0x05, 0x9b, 0xe9, 0x9a, 0x40, 0x07, 0xec, 0x9b, 0xfc, 0xe9, 0x9a} },
! { 0xa082,	16,	{0xf9, 0x0f, 0xd8, 0xe0, 0xe4, 0xc9, 0xfa, 0xe4, 0xcc, 0xfb, 0x22, 0x75, 0xf0, 0x10, 0xef, 0x2f} },
! { 0xa092,	16,	{0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xcc, 0x33, 0xcc, 0xc8, 0x33, 0xc8, 0x10, 0xd7, 0x07} },
! { 0xa0a2,	16,	{0x9b, 0xec, 0x9a, 0xe8, 0x99, 0x40, 0x0a, 0xed, 0x9b, 0xfd, 0xec, 0x9a, 0xfc, 0xe8, 0x99, 0xf8} },
! { 0xa0b2,	14,	{0x0f, 0xd5, 0xf0, 0xda, 0xe4, 0xcd, 0xfb, 0xe4, 0xcc, 0xfa, 0xe4, 0xc8, 0xf9, 0x22} },
! { 0xa0c0,	16,	{0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
! { 0xa0d0,	1,	{0x22} },
! { 0xa0d1,	16,	{0xe8, 0x60, 0x0f, 0xec, 0xc3, 0x13, 0xfc, 0xed, 0x13, 0xfd, 0xee, 0x13, 0xfe, 0xef, 0x13, 0xff} },
! { 0xa0e1,	3,	{0xd8, 0xf1, 0x22} },
! { 0xa0e4,	16,	{0x08, 0x08, 0x08, 0xe6, 0xcf, 0x2f, 0xf6, 0x18, 0xe6, 0xce, 0x3e, 0xf6, 0x18, 0xe6, 0xcd, 0x3d} },
! { 0xa0f4,	7,	{0xf6, 0x18, 0xe6, 0xcc, 0x3c, 0xf6, 0x22} },
! { 0xa0fb,	12,	{0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
! { 0xa107,	16,	{0xa8, 0x82, 0x85, 0x83, 0xf0, 0xd0, 0x83, 0xd0, 0x82, 0x12, 0xa1, 0x1e, 0x12, 0xa1, 0x1e, 0x12} },
! { 0xa117,	16,	{0xa1, 0x1e, 0x12, 0xa1, 0x1e, 0xe4, 0x73, 0xe4, 0x93, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83} },
! { 0xa127,	16,	{0xc8, 0xc5, 0x82, 0xc8, 0xf0, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83, 0xc8, 0xc5, 0x82, 0xc8} },
! { 0xa137,	1,	{0x22} },
  { 0xffff,	0,	{0x00} }
  };
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/Makefile LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/Makefile
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/Makefile	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/Makefile	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,7 ****
  #
  # Makefile for the USB Mass Storage device drivers.
  #
! # 15 Aug 2000, Christoph Hellwig 
  # Rewritten to use lists instead of if-statements.
  #
  
--- 1,7 ----
  #
  # Makefile for the USB Mass Storage device drivers.
  #
! # 15 Aug 2000, Christoph Hellwig 
  # Rewritten to use lists instead of if-statements.
  #
  
***************
*** 15,22 ****
  usb-storage-obj-$(CONFIG_USB_STORAGE_DEBUG)	+= debug.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_HP8200e)	+= shuttle_usbat.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_SDDR09)	+= sddr09.o
- usb-storage-obj-$(CONFIG_USB_STORAGE_SDDR55)	+= sddr55.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_FREECOM)	+= freecom.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_DPCM)	+= dpcm.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_ISD200)	+= isd200.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_DATAFAB)   += datafab.o
--- 15,23 ----
  usb-storage-obj-$(CONFIG_USB_STORAGE_DEBUG)	+= debug.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_HP8200e)	+= shuttle_usbat.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_SDDR09)	+= sddr09.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_FREECOM)	+= freecom.o
+ usb-storage-obj-$(CONFIG_USB_STORAGE_SHUTTLE_SMARTMEDIA)   += shuttle_sm.o
+ usb-storage-obj-$(CONFIG_USB_STORAGE_SHUTTLE_COMPACTFLASH) += shuttle_cf.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_DPCM)	+= dpcm.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_ISD200)	+= isd200.o
  usb-storage-obj-$(CONFIG_USB_STORAGE_DATAFAB)   += datafab.o
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/datafab.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/datafab.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/datafab.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/datafab.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,25 ****
  /* Driver for Datafab USB Compact Flash reader
   *
-  * $Id: datafab.c,v 1.7 2002/02/25 00:40:13 mdharm Exp $
-  *
   * datafab driver v0.1:
   *
   * First release
   *
   * Current development and maintenance by:
   *   (c) 2000 Jimmie Mayfield (mayfield+datafab@sackheads.org)
!  *
!  *   Many thanks to Robert Baruch for the SanDisk SmartMedia reader driver
   *   which I used as a template for this driver.
-  *
   *   Some bugfixes and scatter-gather code by Gregory P. Smith 
   *   (greg-usb@electricrain.com)
   *
-  *   Fix for media change by Joerg Schneider (js@joergschneider.com)
-  *
-  * Other contributors:
-  *   (c) 2002 Alan Stern 
-  *
   * This program is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License as published by the
   * Free Software Foundation; either version 2, or (at your option) any
--- 1,16 ----
  /* Driver for Datafab USB Compact Flash reader
   *
   * datafab driver v0.1:
   *
   * First release
   *
   * Current development and maintenance by:
   *   (c) 2000 Jimmie Mayfield (mayfield+datafab@sackheads.org)
!  *   many thanks to Robert Baruch for the SanDisk SmartMedia reader driver
   *   which I used as a template for this driver.
   *   Some bugfixes and scatter-gather code by Gregory P. Smith 
   *   (greg-usb@electricrain.com)
   *
   * This program is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License as published by the
   * Free Software Foundation; either version 2, or (at your option) any
***************
*** 111,117 ****
  	if (result == -EPIPE) {
  		US_DEBUGP("datafab_raw_bulk: EPIPE. clearing endpoint halt for"
  			  " pipe 0x%x, stalled at %d bytes\n", pipe, act_len);
! 		usb_stor_clear_halt(us, pipe);
  	}
  
  	if (result) {
--- 102,108 ----
  	if (result == -EPIPE) {
  		US_DEBUGP("datafab_raw_bulk: EPIPE. clearing endpoint halt for"
  			  " pipe 0x%x, stalled at %d bytes\n", pipe, act_len);
! 		usb_clear_halt(us->pusb_dev, pipe);
  	}
  
  	if (result) {
***************
*** 217,223 ****
  
  		if (use_sg) {
  			sg = (struct scatterlist *) dest;
! 			buffer = kmalloc(len, GFP_NOIO);
  			if (buffer == NULL)
  				return USB_STOR_TRANSPORT_ERROR;
  			ptr = buffer;
--- 208,214 ----
  
  		if (use_sg) {
  			sg = (struct scatterlist *) dest;
! 			buffer = kmalloc(len, GFP_KERNEL);
  			if (buffer == NULL)
  				return USB_STOR_TRANSPORT_ERROR;
  			ptr = buffer;
***************
*** 342,348 ****
  
  		if (use_sg) {
  			sg = (struct scatterlist *) src;
! 			buffer = kmalloc(len, GFP_NOIO);
  			if (buffer == NULL)
  				return USB_STOR_TRANSPORT_ERROR;
  			ptr = buffer;
--- 333,339 ----
  
  		if (use_sg) {
  			sg = (struct scatterlist *) src;
! 			buffer = kmalloc(len, GFP_KERNEL);
  			if (buffer == NULL)
  				return USB_STOR_TRANSPORT_ERROR;
  			ptr = buffer;
***************
*** 674,680 ****
  	};
  
  	if (!us->extra) {
! 		us->extra = kmalloc(sizeof(struct datafab_info), GFP_NOIO);
  		if (!us->extra) {
  			US_DEBUGP("datafab_transport:  Gah! Can't allocate storage for Datafab info struct!\n");
  			return USB_STOR_TRANSPORT_ERROR;
--- 665,671 ----
  	};
  
  	if (!us->extra) {
! 		us->extra = kmalloc(sizeof(struct datafab_info), GFP_KERNEL);
  		if (!us->extra) {
  			US_DEBUGP("datafab_transport:  Gah! Can't allocate storage for Datafab info struct!\n");
  			return USB_STOR_TRANSPORT_ERROR;
***************
*** 810,832 ****
  		return USB_STOR_TRANSPORT_GOOD;
  	}
  
- 	if (srb->cmnd[0] == START_STOP) {
- 		/* this is used by sd.c'check_scsidisk_media_change to detect
- 		   media change */
- 		US_DEBUGP("datafab_transport:  START_STOP.\n");
- 		/* the first datafab_id_device after a media change returns
- 		   an error (determined experimentally) */
- 		rc = datafab_id_device(us, info);
- 		if (rc == USB_STOR_TRANSPORT_GOOD) {
- 			info->sense_key = NO_SENSE;
- 			srb->result = SUCCESS;
- 		} else {
- 			info->sense_key = UNIT_ATTENTION;
- 			srb->result = CHECK_CONDITION;
- 		}
- 		return rc;
-         }
- 
  	US_DEBUGP("datafab_transport:  Gah! Unknown command: %d (0x%x)\n", srb->cmnd[0], srb->cmnd[0]);
  	return USB_STOR_TRANSPORT_ERROR;
  }
--- 801,806 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/debug.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/debug.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/debug.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/debug.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,13 ****
  /* Driver for USB Mass Storage compliant devices
   * Debugging Functions Source Code File
   *
!  * $Id: debug.c,v 1.8 2002/02/25 00:40:13 mdharm Exp $
   *
   * Current development and maintenance by:
!  *   (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
!  *
!  * Developed with the assistance of:
!  *   (c) 2002 Alan Stern 
   *
   * Initial work by:
   *   (c) 1999 Michael Gee (michael@linuxspecific.com)
--- 1,10 ----
  /* Driver for USB Mass Storage compliant devices
   * Debugging Functions Source Code File
   *
!  * $Id: debug.c,v 1.5 2001/06/27 23:20:45 mdharm Exp $
   *
   * Current development and maintenance by:
!  *   (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
   *
   * Initial work by:
   *   (c) 1999 Michael Gee (michael@linuxspecific.com)
***************
*** 303,313 ****
  	case 0x1902: what="defect list error in primary list"; break;
  	case 0x1903: what="defect list error in grown list"; break;
  	case 0x1C00: what="defect list not found"; break;
- 	case 0x2000: what="invalid command operation code"; break;
  	case 0x2400: what="invalid field in CDB"; break;
  	case 0x2703: what="associated write protect"; break;
  	case 0x2800: what="not ready to ready transition"; break;
- 	case 0x2900: what="device reset occurred"; break;
  	case 0x2903: what="bus device reset function occurred"; break;
  	case 0x2904: what="device internal reset"; break;
  	case 0x2B00: what="copy can't execute / host can't disconnect"; break;
--- 300,308 ----
***************
*** 330,336 ****
  	case 0x3502: what="enclosure services unavailable"; break;
  	case 0x3503: what="enclosure services transfer failure"; break;
  	case 0x3504: what="enclosure services transfer refused"; break;
- 	case 0x3A00: what="media not present"; break;
  	case 0x3B0F: what="end of medium reached"; break;
  	case 0x3F02: what="changed operating definition"; break;
  	case 0x4100: what="data path failure (should use 40 NN)"; break;
--- 325,330 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/freecom.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/freecom.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/freecom.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/freecom.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,6 ****
  /* Driver for Freecom USB/IDE adaptor
   *
!  * $Id: freecom.c,v 1.21 2001/12/29 03:47:33 mdharm Exp $
   *
   * Freecom v0.1:
   *
--- 1,6 ----
  /* Driver for Freecom USB/IDE adaptor
   *
!  * $Id: freecom.c,v 1.19 2001/11/11 05:42:34 mdharm Exp $
   *
   * Freecom v0.1:
   *
***************
*** 34,40 ****
  #include "usb.h"
  #include "debug.h"
  #include "freecom.h"
! #include 
  
  #ifdef CONFIG_USB_STORAGE_DEBUG
  static void pdump (void *, int);
--- 34,40 ----
  #include "usb.h"
  #include "debug.h"
  #include "freecom.h"
! #include "linux/hdreg.h"
  
  #ifdef CONFIG_USB_STORAGE_DEBUG
  static void pdump (void *, int);
***************
*** 206,212 ****
--- 206,214 ----
  
          return USB_STOR_TRANSPORT_GOOD;
  }
+ #endif
  
+ #if 0 /* Unused at this time */
  /* Read a value from an ide register. */
  static int
  freecom_ide_read (struct us_data *us, int reg, int *value)
***************
*** 433,439 ****
  		/* Get the status again */
  		fcb->Type = FCM_PACKET_STATUS;
  		fcb->Timeout = 0;
! 		memset (fcb->Atapi, 0, sizeof(fcb->Atapi));
  		memset (fcb->Filler, 0, sizeof (fcb->Filler));
  
          	/* Send it out. */
--- 435,441 ----
  		/* Get the status again */
  		fcb->Type = FCM_PACKET_STATUS;
  		fcb->Timeout = 0;
! 		memset (fcb->Atapi, 0, sizeof(fcb->Filler));
  		memset (fcb->Filler, 0, sizeof (fcb->Filler));
  
          	/* Send it out. */
***************
*** 485,503 ****
           * and such will hang. */
          US_DEBUGP("Device indicates that it has %d bytes available\n",
                          le16_to_cpu (fst->Count));
-         US_DEBUGP("SCSI requested %d\n", usb_stor_transfer_length(srb));
  
          /* Find the length we desire to read. */
! 	switch (srb->cmnd[0]) {
! 		case INQUIRY:
! 		case REQUEST_SENSE:		/* 16 or 18 bytes? spec says 18, lots of devices only have 16 */
! 		case MODE_SENSE:
! 		case MODE_SENSE_10:
! 			length = fst->Count;
! 			break;
! 		default:
!  			length = usb_stor_transfer_length (srb);
! 	}
  
  	/* verify that this amount is legal */
  	if (length > srb->request_bufflen) {
--- 487,496 ----
           * and such will hang. */
          US_DEBUGP("Device indicates that it has %d bytes available\n",
                          le16_to_cpu (fst->Count));
  
          /* Find the length we desire to read. */
!         length = usb_stor_transfer_length (srb);
!         US_DEBUGP("SCSI requested %d\n", length);
  
  	/* verify that this amount is legal */
  	if (length > srb->request_bufflen) {
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/isd200.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/isd200.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/isd200.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/isd200.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,15 ****
  /* Transport & Protocol Driver for In-System Design, Inc. ISD200 ASIC
   *
!  * $Id: isd200.c,v 1.14 2002/02/25 00:40:13 mdharm Exp $
   *
!  * Current development and maintenance:
!  *   (C) 2001-2002 BjNvrn Stenberg (bjorn@haxx.se)
!  *
!  * Developed with the assistance of:
!  *   (C) 2002 Alan Stern 
!  *
!  * Initial work:
!  *   (C) 2000 In-System Design, Inc. (support@in-system.com)
   *
   * The ISD200 ASIC does not natively support ATA devices.  The chip
   * does implement an interface, the ATA Command Block (ATACB) which provides
--- 1,9 ----
  /* Transport & Protocol Driver for In-System Design, Inc. ISD200 ASIC
   *
!  * First release
   *
!  * Current development and maintenance by:
!  *   (c) 2000 In-System Design, Inc. (support@in-system.com)
   *
   * The ISD200 ASIC does not natively support ATA devices.  The chip
   * does implement an interface, the ATA Command Block (ATACB) which provides
***************
*** 33,42 ****
   *
   *  2001-02-24: Removed lots of duplicate code and simplified the structure.
   *              (bjorn@haxx.se)
-  *  2002-01-16: Fixed endianness bug so it works on the ppc arch.
-  *              (Luc Saillard )
-  *  2002-01-17: All bitfields removed.
-  *              (bjorn@haxx.se)
   */
  
  
--- 27,32 ----
***************
*** 55,60 ****
--- 45,59 ----
  #include 
  #include 
  
+ /*
+  * Inquiry defines. Used to interpret data returned from target as result
+  * of inquiry command.
+  *
+  * DeviceType field
+  */
+ 
+ #define DIRECT_ACCESS_DEVICE            0x00    /* disks */
+ 
  /* Timeout defines (in Seconds) */
  
  #define ISD200_ENUM_BSY_TIMEOUT         35
***************
*** 89,107 ****
  #define ACTION_SELECT_6             0x40
  #define ACTION_SELECT_7             0x80
  
- /* Register Select bits */
- #define REG_ALTERNATE_STATUS 0x01
- #define REG_DEVICE_CONTROL   0x01
- #define REG_ERROR            0x02
- #define REG_FEATURES         0x02
- #define REG_SECTOR_COUNT     0x04
- #define REG_SECTOR_NUMBER    0x08
- #define REG_CYLINDER_LOW     0x10
- #define REG_CYLINDER_HIGH    0x20
- #define REG_DEVICE_HEAD      0x40
- #define REG_STATUS           0x80
- #define REG_COMMAND          0x80
- 
  /* ATA error definitions not in  */
  #define ATA_ERROR_MEDIA_CHANGE       0x20
  
--- 88,93 ----
***************
*** 166,173 ****
  	struct {
  		unsigned char SignatureByte0;
  		unsigned char SignatureByte1;
! 		unsigned char ActionSelect;
! 		unsigned char RegisterSelect;
  		unsigned char TransferBlockSize;
  		unsigned char AlternateStatusByte;
  		unsigned char ErrorByte;
--- 152,171 ----
  	struct {
  		unsigned char SignatureByte0;
  		unsigned char SignatureByte1;
! 		unsigned char ReadRegisterAccessBit : 1;
! 		unsigned char NoDeviceSelectionBit : 1;
! 		unsigned char NoBSYPollBit : 1;
! 		unsigned char IgnorePhaseErrorBit : 1;
! 		unsigned char IgnoreDeviceErrorBit : 1;
! 		unsigned char Reserved0Bit : 3;
! 		unsigned char SelectAlternateStatus : 1;
! 		unsigned char SelectError : 1;
! 		unsigned char SelectSectorCount : 1;
! 		unsigned char SelectSectorNumber : 1;
! 		unsigned char SelectCylinderLow : 1;
! 		unsigned char SelectCylinderHigh : 1;
! 		unsigned char SelectDeviceHead : 1;
! 		unsigned char SelectStatus : 1;
  		unsigned char TransferBlockSize;
  		unsigned char AlternateStatusByte;
  		unsigned char ErrorByte;
***************
*** 183,190 ****
          struct {
  		unsigned char SignatureByte0;
  		unsigned char SignatureByte1;
! 		unsigned char ActionSelect;
! 		unsigned char RegisterSelect;
  		unsigned char TransferBlockSize;
  		unsigned char DeviceControlByte;
  		unsigned char FeaturesByte;
--- 181,200 ----
          struct {
  		unsigned char SignatureByte0;
  		unsigned char SignatureByte1;
! 		unsigned char ReadRegisterAccessBit : 1;
! 		unsigned char NoDeviceSelectionBit : 1;
! 		unsigned char NoBSYPollBit : 1;
! 		unsigned char IgnorePhaseErrorBit : 1;
! 		unsigned char IgnoreDeviceErrorBit : 1;
! 		unsigned char Reserved0Bit : 3;
! 		unsigned char SelectDeviceControl : 1;
! 		unsigned char SelectFeatures : 1;
! 		unsigned char SelectSectorCount : 1;
! 		unsigned char SelectSectorNumber : 1;
! 		unsigned char SelectCylinderLow : 1;
! 		unsigned char SelectCylinderHigh : 1;
! 		unsigned char SelectDeviceHead : 1;
! 		unsigned char SelectCommand : 1;
  		unsigned char TransferBlockSize;
  		unsigned char DeviceControlByte;
  		unsigned char FeaturesByte;
***************
*** 208,227 ****
   * includes fields through ProductRevisionLevel.
   */
  
- /*
-  * DeviceType field
-  */
- #define DIRECT_ACCESS_DEVICE            0x00    /* disks */
- #define DEVICE_REMOVABLE                0x80
- 
  struct inquiry_data {
!    	unsigned char DeviceType;
! 	unsigned char DeviceTypeModifier;
  	unsigned char Versions;
! 	unsigned char Format; 
  	unsigned char AdditionalLength;
  	unsigned char Reserved[2];
! 	unsigned char Capability;
  	unsigned char VendorId[8];
  	unsigned char ProductId[16];
  	unsigned char ProductRevisionLevel[4];
--- 218,244 ----
   * includes fields through ProductRevisionLevel.
   */
  
  struct inquiry_data {
! 	unsigned char DeviceType : 5;
! 	unsigned char DeviceTypeQualifier : 3;
! 	unsigned char DeviceTypeModifier : 7;
! 	unsigned char RemovableMedia : 1;
  	unsigned char Versions;
! 	unsigned char ResponseDataFormat : 4;
! 	unsigned char HiSupport : 1;
! 	unsigned char NormACA : 1;
! 	unsigned char ReservedBit : 1;
! 	unsigned char AERC : 1;
  	unsigned char AdditionalLength;
  	unsigned char Reserved[2];
! 	unsigned char SoftReset : 1;
! 	unsigned char CommandQueue : 1;
! 	unsigned char Reserved2 : 1;
! 	unsigned char LinkedCommands : 1;
! 	unsigned char Synchronous : 1;
! 	unsigned char Wide16Bit : 1;
! 	unsigned char Wide32Bit : 1;
! 	unsigned char RelativeAddressing : 1;
  	unsigned char VendorId[8];
  	unsigned char ProductId[16];
  	unsigned char ProductRevisionLevel[4];
***************
*** 240,269 ****
   * ISD200 CONFIG data struct
   */
  
- #define ATACFG_TIMING          0x0f
- #define ATACFG_ATAPI_RESET     0x10
- #define ATACFG_MASTER          0x20
- #define ATACFG_BLOCKSIZE       0xa0
- 
- #define ATACFGE_LAST_LUN       0x07
- #define ATACFGE_DESC_OVERRIDE  0x08
- #define ATACFGE_STATE_SUSPEND  0x10
- #define ATACFGE_SKIP_BOOT      0x20
- #define ATACFGE_CONF_DESC2     0x40
- #define ATACFGE_INIT_STATUS    0x80
- 
- #define CFG_CAPABILITY_SRST    0x01
- 
  struct isd200_config {
          unsigned char EventNotification;
          unsigned char ExternalClock;
          unsigned char ATAInitTimeout;
! 	unsigned char ATAConfig;
          unsigned char ATAMajorCommand;
          unsigned char ATAMinorCommand;
! 	unsigned char ATAExtraConfig;
! 	unsigned char Capability;
! }__attribute__ ((packed));
  
  
  /*
--- 257,281 ----
   * ISD200 CONFIG data struct
   */
  
  struct isd200_config {
          unsigned char EventNotification;
          unsigned char ExternalClock;
          unsigned char ATAInitTimeout;
!         unsigned char ATATiming : 4;
!         unsigned char ATAPIReset : 1;
!         unsigned char MasterSlaveSelection : 1;
!         unsigned char ATAPICommandBlockSize : 2;
          unsigned char ATAMajorCommand;
          unsigned char ATAMinorCommand;
!         unsigned char LastLUNIdentifier : 3;
!         unsigned char DescriptOverride : 1;
!         unsigned char ATA3StateSuspend : 1;
!         unsigned char SkipDeviceBoot : 1;
!         unsigned char ConfigDescriptor2 : 1;
!         unsigned char InitStatus : 1;
!         unsigned char SRSTEnable : 1;
!         unsigned char Reserved0 : 7;
! };
  
  
  /*
***************
*** 309,324 ****
   * Sense Data Format
   */
  
- #define SENSE_ERRCODE           0x7f
- #define SENSE_ERRCODE_VALID     0x80
- #define SENSE_FLAG_SENSE_KEY    0x0f
- #define SENSE_FLAG_BAD_LENGTH   0x20
- #define SENSE_FLAG_END_OF_MEDIA 0x40
- #define SENSE_FLAG_FILE_MARK    0x80
  struct sense_data {
! 	unsigned char ErrorCode;
! 	unsigned char SegmentNumber;
! 	unsigned char Flags;
          unsigned char Information[4];
          unsigned char AdditionalSenseLength;
          unsigned char CommandSpecificInformation[4];
--- 321,335 ----
   * Sense Data Format
   */
  
  struct sense_data {
!         unsigned char ErrorCode:7;
!         unsigned char Valid:1;
!         unsigned char SegmentNumber;
!         unsigned char SenseKey:4;
!         unsigned char Reserved:1;
!         unsigned char IncorrectLength:1;
!         unsigned char EndOfMedia:1;
!         unsigned char FileMark:1;
          unsigned char Information[4];
          unsigned char AdditionalSenseLength;
          unsigned char CommandSpecificInformation[4];
***************
*** 338,343 ****
--- 349,355 ----
   * Helper routines
   ***********************************************************************/
  
+ 
  /**************************************************************************
   * isd200_build_sense
   *                                                                         
***************
*** 354,386 ****
          unsigned char error = info->ATARegs[IDE_ERROR_OFFSET];
  
  	if(error & ATA_ERROR_MEDIA_CHANGE) {
! 		buf->ErrorCode = 0x70 | SENSE_ERRCODE_VALID;
  		buf->AdditionalSenseLength = 0xb;
! 		buf->Flags = UNIT_ATTENTION;
  		buf->AdditionalSenseCode = 0;
  		buf->AdditionalSenseCodeQualifier = 0;
          } else if(error & MCR_ERR) {
! 		buf->ErrorCode = 0x70 | SENSE_ERRCODE_VALID;
  		buf->AdditionalSenseLength = 0xb;
! 		buf->Flags =  UNIT_ATTENTION;
  		buf->AdditionalSenseCode = 0;
  		buf->AdditionalSenseCodeQualifier = 0;
          } else if(error & TRK0_ERR) {
! 		buf->ErrorCode = 0x70 | SENSE_ERRCODE_VALID;
  		buf->AdditionalSenseLength = 0xb;
! 		buf->Flags =  NOT_READY;
  		buf->AdditionalSenseCode = 0;
  		buf->AdditionalSenseCodeQualifier = 0;
          } else if(error & ECC_ERR) {
! 		buf->ErrorCode = 0x70 | SENSE_ERRCODE_VALID;
  		buf->AdditionalSenseLength = 0xb;
! 		buf->Flags =  DATA_PROTECT;
  		buf->AdditionalSenseCode = 0;
  		buf->AdditionalSenseCodeQualifier = 0;
          } else {
  		buf->ErrorCode = 0;
  		buf->AdditionalSenseLength = 0;
! 		buf->Flags =  0;
  		buf->AdditionalSenseCode = 0;
  		buf->AdditionalSenseCodeQualifier = 0;
          }
--- 366,403 ----
          unsigned char error = info->ATARegs[IDE_ERROR_OFFSET];
  
  	if(error & ATA_ERROR_MEDIA_CHANGE) {
! 		buf->ErrorCode = 0x70;
! 		buf->Valid     = 1;
  		buf->AdditionalSenseLength = 0xb;
! 		buf->SenseKey =  UNIT_ATTENTION;
  		buf->AdditionalSenseCode = 0;
  		buf->AdditionalSenseCodeQualifier = 0;
          } else if(error & MCR_ERR) {
! 		buf->ErrorCode = 0x70;
! 		buf->Valid     = 1;
  		buf->AdditionalSenseLength = 0xb;
! 		buf->SenseKey =  UNIT_ATTENTION;
  		buf->AdditionalSenseCode = 0;
  		buf->AdditionalSenseCodeQualifier = 0;
          } else if(error & TRK0_ERR) {
! 		buf->ErrorCode = 0x70;
! 		buf->Valid     = 1;
  		buf->AdditionalSenseLength = 0xb;
! 		buf->SenseKey =  NOT_READY;
  		buf->AdditionalSenseCode = 0;
  		buf->AdditionalSenseCodeQualifier = 0;
          } else if(error & ECC_ERR) {
! 		buf->ErrorCode = 0x70;
! 		buf->Valid     = 1;
  		buf->AdditionalSenseLength = 0xb;
! 		buf->SenseKey =  DATA_PROTECT;
  		buf->AdditionalSenseCode = 0;
  		buf->AdditionalSenseCodeQualifier = 0;
          } else {
  		buf->ErrorCode = 0;
+ 		buf->Valid     = 0;
  		buf->AdditionalSenseLength = 0;
! 		buf->SenseKey =  0;
  		buf->AdditionalSenseCode = 0;
  		buf->AdditionalSenseCodeQualifier = 0;
          }
***************
*** 425,431 ****
          /* if we stall, we need to clear it before we go on */
          if (result == -EPIPE) {
                  US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
!                 usb_stor_clear_halt(us, pipe);
          }
      
          /* did we send all the data? */
--- 442,448 ----
          /* if we stall, we need to clear it before we go on */
          if (result == -EPIPE) {
                  US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
!                 usb_stor_clear_halt(us->pusb_dev, pipe);
          }
      
          /* did we send all the data? */
***************
*** 576,582 ****
          US_DEBUGP("Bulk command S 0x%x T 0x%x Trg %d LUN %d L %d F %d CL %d\n",
                    le32_to_cpu(bcb.Signature), bcb.Tag,
                    (bcb.Lun >> 4), (bcb.Lun & 0xFF), 
!                   le32_to_cpu(bcb.DataTransferLength), bcb.Flags, bcb.Length);
          result = usb_stor_bulk_msg(us, &bcb, pipe, US_BULK_CB_WRAP_LEN, 
  				   &partial);
          US_DEBUGP("Bulk command transfer result=%d\n", result);
--- 593,599 ----
          US_DEBUGP("Bulk command S 0x%x T 0x%x Trg %d LUN %d L %d F %d CL %d\n",
                    le32_to_cpu(bcb.Signature), bcb.Tag,
                    (bcb.Lun >> 4), (bcb.Lun & 0xFF), 
!                   bcb.DataTransferLength, bcb.Flags, bcb.Length);
          result = usb_stor_bulk_msg(us, &bcb, pipe, US_BULK_CB_WRAP_LEN, 
  				   &partial);
          US_DEBUGP("Bulk command transfer result=%d\n", result);
***************
*** 586,592 ****
  	else if (result == -EPIPE) {
  		/* if we stall, we need to clear it before we go on */
                  US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
!                 usb_stor_clear_halt(us, pipe);
  	} else if (result)  
                  return ISD200_TRANSPORT_ERROR;
      
--- 603,609 ----
  	else if (result == -EPIPE) {
  		/* if we stall, we need to clear it before we go on */
                  US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
!                 usb_stor_clear_halt(us->pusb_dev, pipe);
  	} else if (result)  
                  return ISD200_TRANSPORT_ERROR;
      
***************
*** 616,622 ****
          /* did the attempt to read the CSW fail? */
          if (result == -EPIPE) {
                  US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
!                 usb_stor_clear_halt(us, pipe);
             
                  /* get the status again */
                  US_DEBUGP("Attempting to get CSW (2nd try)...\n");
--- 633,639 ----
          /* did the attempt to read the CSW fail? */
          if (result == -EPIPE) {
                  US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
!                 usb_stor_clear_halt(us->pusb_dev, pipe);
             
                  /* get the status again */
                  US_DEBUGP("Attempting to get CSW (2nd try)...\n");
***************
*** 630,636 ****
                  /* if it fails again, we need a reset and return an error*/
                  if (result == -EPIPE) {
                          US_DEBUGP("clearing halt for pipe 0x%x\n", pipe);
!                         usb_stor_clear_halt(us, pipe);
                          return ISD200_TRANSPORT_ERROR;
                  }
          }
--- 647,653 ----
                  /* if it fails again, we need a reset and return an error*/
                  if (result == -EPIPE) {
                          US_DEBUGP("clearing halt for pipe 0x%x\n", pipe);
!                         usb_stor_clear_halt(us->pusb_dev, pipe);
                          return ISD200_TRANSPORT_ERROR;
                  }
          }
***************
*** 699,707 ****
  	case ACTION_READ_STATUS:
  		US_DEBUGP("   isd200_action(READ_STATUS)\n");
  		ata.generic.ActionSelect = ACTION_SELECT_0|ACTION_SELECT_2;
! 		ata.generic.RegisterSelect =
! 		  REG_CYLINDER_LOW | REG_CYLINDER_HIGH |
! 		  REG_STATUS | REG_ERROR;
  		srb.sc_data_direction = SCSI_DATA_READ;
  		srb.request_buffer = pointer;
  		srb.request_bufflen = value;
--- 716,725 ----
  	case ACTION_READ_STATUS:
  		US_DEBUGP("   isd200_action(READ_STATUS)\n");
  		ata.generic.ActionSelect = ACTION_SELECT_0|ACTION_SELECT_2;
! 		ata.read.SelectStatus = 1;
! 		ata.read.SelectError = 1;
! 		ata.read.SelectCylinderHigh = 1;
! 		ata.read.SelectCylinderLow = 1;
  		srb.sc_data_direction = SCSI_DATA_READ;
  		srb.request_buffer = pointer;
  		srb.request_bufflen = value;
***************
*** 712,718 ****
  		ata.generic.ActionSelect = ACTION_SELECT_1|ACTION_SELECT_2|
  			                   ACTION_SELECT_3|ACTION_SELECT_4|
  		                           ACTION_SELECT_5;
! 		ata.generic.RegisterSelect = REG_DEVICE_HEAD;
  		ata.write.DeviceHeadByte = value;
  		srb.sc_data_direction = SCSI_DATA_NONE;
  		break;
--- 730,736 ----
  		ata.generic.ActionSelect = ACTION_SELECT_1|ACTION_SELECT_2|
  			                   ACTION_SELECT_3|ACTION_SELECT_4|
  		                           ACTION_SELECT_5;
! 		ata.write.SelectDeviceHead = 1;
  		ata.write.DeviceHeadByte = value;
  		srb.sc_data_direction = SCSI_DATA_NONE;
  		break;
***************
*** 721,727 ****
  		US_DEBUGP("   isd200_action(RESET)\n");
  		ata.generic.ActionSelect = ACTION_SELECT_1|ACTION_SELECT_2|
  			                   ACTION_SELECT_3|ACTION_SELECT_4;
! 		ata.generic.RegisterSelect = REG_DEVICE_CONTROL;
  		ata.write.DeviceControlByte = ATA_DC_RESET_CONTROLLER;
  		srb.sc_data_direction = SCSI_DATA_NONE;
  		break;
--- 739,745 ----
  		US_DEBUGP("   isd200_action(RESET)\n");
  		ata.generic.ActionSelect = ACTION_SELECT_1|ACTION_SELECT_2|
  			                   ACTION_SELECT_3|ACTION_SELECT_4;
! 		ata.write.SelectDeviceControl = 1;
  		ata.write.DeviceControlByte = ATA_DC_RESET_CONTROLLER;
  		srb.sc_data_direction = SCSI_DATA_NONE;
  		break;
***************
*** 730,736 ****
  		US_DEBUGP("   isd200_action(REENABLE)\n");
  		ata.generic.ActionSelect = ACTION_SELECT_1|ACTION_SELECT_2|
  			                   ACTION_SELECT_3|ACTION_SELECT_4;
! 		ata.generic.RegisterSelect = REG_DEVICE_CONTROL;
  		ata.write.DeviceControlByte = ATA_DC_REENABLE_CONTROLLER;
  		srb.sc_data_direction = SCSI_DATA_NONE;
  		break;
--- 748,754 ----
  		US_DEBUGP("   isd200_action(REENABLE)\n");
  		ata.generic.ActionSelect = ACTION_SELECT_1|ACTION_SELECT_2|
  			                   ACTION_SELECT_3|ACTION_SELECT_4;
! 		ata.write.SelectDeviceControl = 1;
  		ata.write.DeviceControlByte = ATA_DC_REENABLE_CONTROLLER;
  		srb.sc_data_direction = SCSI_DATA_NONE;
  		break;
***************
*** 738,752 ****
  	case ACTION_SOFT_RESET:
  		US_DEBUGP("   isd200_action(SOFT_RESET)\n");
  		ata.generic.ActionSelect = ACTION_SELECT_1|ACTION_SELECT_5;
! 		ata.generic.RegisterSelect = REG_DEVICE_HEAD | REG_COMMAND;
  		ata.write.DeviceHeadByte = info->DeviceHead;
  		ata.write.CommandByte = WIN_SRST;
  		srb.sc_data_direction = SCSI_DATA_NONE;
  		break;
  
  	case ACTION_IDENTIFY:
  		US_DEBUGP("   isd200_action(IDENTIFY)\n");
! 		ata.generic.RegisterSelect = REG_COMMAND;
  		ata.write.CommandByte = WIN_IDENTIFY;
  		srb.sc_data_direction = SCSI_DATA_READ;
  		srb.request_buffer = (void *)&info->drive;
--- 756,771 ----
  	case ACTION_SOFT_RESET:
  		US_DEBUGP("   isd200_action(SOFT_RESET)\n");
  		ata.generic.ActionSelect = ACTION_SELECT_1|ACTION_SELECT_5;
! 		ata.write.SelectDeviceHead = 1;
  		ata.write.DeviceHeadByte = info->DeviceHead;
+ 		ata.write.SelectCommand = 1;
  		ata.write.CommandByte = WIN_SRST;
  		srb.sc_data_direction = SCSI_DATA_NONE;
  		break;
  
  	case ACTION_IDENTIFY:
  		US_DEBUGP("   isd200_action(IDENTIFY)\n");
! 		ata.write.SelectCommand = 1;
  		ata.write.CommandByte = WIN_IDENTIFY;
  		srb.sc_data_direction = SCSI_DATA_READ;
  		srb.request_buffer = (void *)&info->drive;
***************
*** 802,808 ****
   * Invoke the transport and basic error-handling/recovery methods
   *
   * This is used by the protocol layers to actually send the message to
!  * the device and receive the response.
   */
  void isd200_invoke_transport( struct us_data *us, 
  			      Scsi_Cmnd *srb, 
--- 821,827 ----
   * Invoke the transport and basic error-handling/recovery methods
   *
   * This is used by the protocol layers to actually send the message to
!  * the device and recieve the response.
   */
  void isd200_invoke_transport( struct us_data *us, 
  			      Scsi_Cmnd *srb, 
***************
*** 867,909 ****
  		srb->result = CHECK_CONDITION;
  }
  
- #ifdef CONFIG_USB_STORAGE_DEBUG
- static void isd200_log_config( struct isd200_info* info )
- {
- 	US_DEBUGP("      Event Notification: 0x%x\n", 
- 		  info->ConfigData.EventNotification);
- 	US_DEBUGP("      External Clock: 0x%x\n", 
- 		  info->ConfigData.ExternalClock);
- 	US_DEBUGP("      ATA Init Timeout: 0x%x\n", 
- 		  info->ConfigData.ATAInitTimeout);
- 	US_DEBUGP("      ATAPI Command Block Size: 0x%x\n", 
- 		  (info->ConfigData.ATAConfig & ATACFG_BLOCKSIZE) >> 6);
- 	US_DEBUGP("      Master/Slave Selection: 0x%x\n", 
- 		  info->ConfigData.ATAConfig & ATACFG_MASTER);
- 	US_DEBUGP("      ATAPI Reset: 0x%x\n",
- 		  info->ConfigData.ATAConfig & ATACFG_ATAPI_RESET);
- 	US_DEBUGP("      ATA Timing: 0x%x\n",
- 		  info->ConfigData.ATAConfig & ATACFG_TIMING);
- 	US_DEBUGP("      ATA Major Command: 0x%x\n", 
- 		  info->ConfigData.ATAMajorCommand);
- 	US_DEBUGP("      ATA Minor Command: 0x%x\n", 
- 		  info->ConfigData.ATAMinorCommand);
- 	US_DEBUGP("      Init Status: 0x%x\n", 
- 		  info->ConfigData.ATAExtraConfig & ATACFGE_INIT_STATUS);
- 	US_DEBUGP("      Config Descriptor 2: 0x%x\n", 
- 		  info->ConfigData.ATAExtraConfig & ATACFGE_CONF_DESC2);
- 	US_DEBUGP("      Skip Device Boot: 0x%x\n",
- 		  info->ConfigData.ATAExtraConfig & ATACFGE_SKIP_BOOT);
- 	US_DEBUGP("      ATA 3 State Supsend: 0x%x\n",
- 		  info->ConfigData.ATAExtraConfig & ATACFGE_STATE_SUSPEND);
- 	US_DEBUGP("      Descriptor Override: 0x%x\n", 
- 		  info->ConfigData.ATAExtraConfig & ATACFGE_DESC_OVERRIDE);
- 	US_DEBUGP("      Last LUN Identifier: 0x%x\n",
- 		  info->ConfigData.ATAExtraConfig & ATACFGE_LAST_LUN);
- 	US_DEBUGP("      SRST Enable: 0x%x\n", 
- 		  info->ConfigData.ATAExtraConfig & CFG_CAPABILITY_SRST);
- }
- #endif
  
  /**************************************************************************
   * isd200_write_config
--- 886,891 ----
***************
*** 919,929 ****
  	int retStatus = ISD200_GOOD;
  	int result;
  
! #ifdef CONFIG_USB_STORAGE_DEBUG
  	US_DEBUGP("Entering isd200_write_config\n");
  	US_DEBUGP("   Writing the following ISD200 Config Data:\n");
! 	isd200_log_config(info);
! #endif
  
  	/* let's send the command via the control pipe */
  	result = usb_stor_control_msg(
--- 901,926 ----
  	int retStatus = ISD200_GOOD;
  	int result;
  
! 
  	US_DEBUGP("Entering isd200_write_config\n");
+ 
  	US_DEBUGP("   Writing the following ISD200 Config Data:\n");
! 	US_DEBUGP("      Event Notification: 0x%x\n", info->ConfigData.EventNotification);
! 	US_DEBUGP("      External Clock: 0x%x\n", info->ConfigData.ExternalClock);
! 	US_DEBUGP("      ATA Init Timeout: 0x%x\n", info->ConfigData.ATAInitTimeout);
! 	US_DEBUGP("      ATAPI Command Block Size: 0x%x\n", info->ConfigData.ATAPICommandBlockSize);
! 	US_DEBUGP("      Master/Slave Selection: 0x%x\n", info->ConfigData.MasterSlaveSelection);
! 	US_DEBUGP("      ATAPI Reset: 0x%x\n", info->ConfigData.ATAPIReset);
! 	US_DEBUGP("      ATA Timing: 0x%x\n", info->ConfigData.ATATiming);
! 	US_DEBUGP("      ATA Major Command: 0x%x\n", info->ConfigData.ATAMajorCommand);
! 	US_DEBUGP("      ATA Minor Command: 0x%x\n", info->ConfigData.ATAMinorCommand);
! 	US_DEBUGP("      Init Status: 0x%x\n", info->ConfigData.InitStatus);
! 	US_DEBUGP("      Config Descriptor 2: 0x%x\n", info->ConfigData.ConfigDescriptor2);
! 	US_DEBUGP("      Skip Device Boot: 0x%x\n", info->ConfigData.SkipDeviceBoot);
! 	US_DEBUGP("      ATA 3 State Supsend: 0x%x\n", info->ConfigData.ATA3StateSuspend);
! 	US_DEBUGP("      Descriptor Override: 0x%x\n", info->ConfigData.DescriptOverride);
! 	US_DEBUGP("      Last LUN Identifier: 0x%x\n", info->ConfigData.LastLUNIdentifier);
! 	US_DEBUGP("      SRST Enable: 0x%x\n", info->ConfigData.SRSTEnable);
  
  	/* let's send the command via the control pipe */
  	result = usb_stor_control_msg(
***************
*** 944,951 ****
  		/* STALL must be cleared when they are detected */
  		if (result == -EPIPE) {
  			US_DEBUGP("-- Stall on control pipe. Clearing\n");
! 			result = usb_stor_clear_halt(us,
! 					usb_sndctrlpipe(us->pusb_dev, 0));
  			US_DEBUGP("-- usb_stor_clear_halt() returns %d\n", result);
  
  		}
--- 941,948 ----
  		/* STALL must be cleared when they are detected */
  		if (result == -EPIPE) {
  			US_DEBUGP("-- Stall on control pipe. Clearing\n");
! 			result = usb_stor_clear_halt(us->pusb_dev,
! 						     usb_sndctrlpipe(us->pusb_dev, 0));
  			US_DEBUGP("-- usb_stor_clear_halt() returns %d\n", result);
  
  		}
***************
*** 989,1005 ****
  
  	if (result >= 0) {
  		US_DEBUGP("   Retrieved the following ISD200 Config Data:\n");
! #ifdef CONFIG_USB_STORAGE_DEBUG
! 		isd200_log_config(info);
! #endif
          } else {
  		US_DEBUGP("   Request to get ISD200 Config Data failed!\n");
  
  		/* STALL must be cleared when they are detected */
  		if (result == -EPIPE) {
  			US_DEBUGP("-- Stall on control pipe. Clearing\n");
! 			result = usb_stor_clear_halt(us,   
! 					usb_sndctrlpipe(us->pusb_dev, 0));
  			US_DEBUGP("-- usb_stor_clear_halt() returns %d\n", result);
  
  		}
--- 986,1015 ----
  
  	if (result >= 0) {
  		US_DEBUGP("   Retrieved the following ISD200 Config Data:\n");
! 		US_DEBUGP("      Event Notification: 0x%x\n", info->ConfigData.EventNotification);
! 		US_DEBUGP("      External Clock: 0x%x\n", info->ConfigData.ExternalClock);
! 		US_DEBUGP("      ATA Init Timeout: 0x%x\n", info->ConfigData.ATAInitTimeout);
! 		US_DEBUGP("      ATAPI Command Block Size: 0x%x\n", info->ConfigData.ATAPICommandBlockSize);
! 		US_DEBUGP("      Master/Slave Selection: 0x%x\n", info->ConfigData.MasterSlaveSelection);
! 		US_DEBUGP("      ATAPI Reset: 0x%x\n", info->ConfigData.ATAPIReset);
! 		US_DEBUGP("      ATA Timing: 0x%x\n", info->ConfigData.ATATiming);
! 		US_DEBUGP("      ATA Major Command: 0x%x\n", info->ConfigData.ATAMajorCommand);
! 		US_DEBUGP("      ATA Minor Command: 0x%x\n", info->ConfigData.ATAMinorCommand);
! 		US_DEBUGP("      Init Status: 0x%x\n", info->ConfigData.InitStatus);
! 		US_DEBUGP("      Config Descriptor 2: 0x%x\n", info->ConfigData.ConfigDescriptor2);
! 		US_DEBUGP("      Skip Device Boot: 0x%x\n", info->ConfigData.SkipDeviceBoot);
! 		US_DEBUGP("      ATA 3 State Supsend: 0x%x\n", info->ConfigData.ATA3StateSuspend);
! 		US_DEBUGP("      Descriptor Override: 0x%x\n", info->ConfigData.DescriptOverride);
! 		US_DEBUGP("      Last LUN Identifier: 0x%x\n", info->ConfigData.LastLUNIdentifier);
! 		US_DEBUGP("      SRST Enable: 0x%x\n", info->ConfigData.SRSTEnable);
          } else {
  		US_DEBUGP("   Request to get ISD200 Config Data failed!\n");
  
  		/* STALL must be cleared when they are detected */
  		if (result == -EPIPE) {
  			US_DEBUGP("-- Stall on control pipe. Clearing\n");
! 			result = usb_stor_clear_halt(us->pusb_dev,   
! 						     usb_sndctrlpipe(us->pusb_dev, 0));
  			US_DEBUGP("-- usb_stor_clear_halt() returns %d\n", result);
  
  		}
***************
*** 1165,1176 ****
  				break;
  			}
  		} else {
!  			US_DEBUGP("   Not ATA, not ATAPI. Weird.\n");
! 			break;
  		}
  
  		/* check for timeout on this request */
! 		if (time_after_eq(jiffies, endTime)) {
  			if (!detect)
  				US_DEBUGP("   BSY check timeout, just continue with next operation...\n");
  			else
--- 1175,1185 ----
  				break;
  			}
  		} else {
! 			US_DEBUGP("   Not ATA, not ATAPI. Weird.\n");
  		}
  
  		/* check for timeout on this request */
! 		if (jiffies >= endTime) {
  			if (!detect)
  				US_DEBUGP("   BSY check timeout, just continue with next operation...\n");
  			else
***************
*** 1214,1223 ****
  		}
  
  		isslave = (info->DeviceHead & ATA_ADDRESS_DEVHEAD_SLAVE) ? 1 : 0;
! 		if (!(info->ConfigData.ATAConfig & ATACFG_MASTER)) {
  			US_DEBUGP("   Setting Master/Slave selection to %d\n", isslave);
! 			info->ConfigData.ATAConfig &= 0x3f;
! 			info->ConfigData.ATAConfig |= (isslave<<6);
  			retStatus = isd200_write_config(us);
  		}
  	}
--- 1223,1231 ----
  		}
  
  		isslave = (info->DeviceHead & ATA_ADDRESS_DEVHEAD_SLAVE) ? 1 : 0;
! 		if (info->ConfigData.MasterSlaveSelection != isslave) {
  			US_DEBUGP("   Setting Master/Slave selection to %d\n", isslave);
! 			info->ConfigData.MasterSlaveSelection = isslave;
  			retStatus = isd200_write_config(us);
  		}
  	}
***************
*** 1264,1271 ****
  			} else {
  				/* ATA Command Identify successful */
  				int i;
- 				__u16 *src, *dest;
- 				ide_fix_driveid(&info->drive);
  
  				US_DEBUGP("   Identify Data Structure:\n");
  				US_DEBUGP("      config = 0x%x\n", info->drive.config);
--- 1272,1277 ----
***************
*** 1311,1335 ****
  
  				if (info->drive.command_set_1 & COMMANDSET_MEDIA_STATUS) {
  					/* set the removable bit */
! 					info->InquiryData.DeviceTypeModifier = DEVICE_REMOVABLE;
  					info->DeviceFlags |= DF_REMOVABLE_MEDIA;
  				}
  
  				/* Fill in vendor identification fields */
! 				src = (__u16*)info->drive.model;
! 				dest = (__u16*)info->InquiryData.VendorId;
! 				for (i=0;i<4;i++)
! 					dest[i] = be16_to_cpu(src[i]);
! 
! 				src = (__u16*)(info->drive.model+8);
! 				dest = (__u16*)info->InquiryData.ProductId;
! 				for (i=0;i<8;i++)
! 					dest[i] = be16_to_cpu(src[i]);
! 
! 				src = (__u16*)info->drive.fw_rev;
! 				dest = (__u16*)info->InquiryData.ProductRevisionLevel;
! 				for (i=0;i<2;i++)
! 					dest[i] = be16_to_cpu(src[i]);
  
  				/* determine if it supports Media Status Notification */
  				if (info->drive.command_set_2 & COMMANDSET_MEDIA_STATUS) {
--- 1317,1347 ----
  
  				if (info->drive.command_set_1 & COMMANDSET_MEDIA_STATUS) {
  					/* set the removable bit */
! 					info->InquiryData.RemovableMedia = 1;
  					info->DeviceFlags |= DF_REMOVABLE_MEDIA;
  				}
  
  				/* Fill in vendor identification fields */
! 				for (i = 0; i < 20; i += 2) {
! 					info->InquiryData.VendorId[i] = 
! 						info->drive.model[i + 1];
! 					info->InquiryData.VendorId[i+1] = 
! 						info->drive.model[i];
! 				}
! 
! 				/* Initialize unused portion of product id */
! 				for (i = 0; i < 4; i++) {
! 					info->InquiryData.ProductId[12+i] = ' ';
! 				}
! 
! 				/* Move firmware revision from IDENTIFY data to */
! 				/* product revision in INQUIRY data             */
! 				for (i = 0; i < 4; i += 2) {
! 					info->InquiryData.ProductRevisionLevel[i] =
! 						info->drive.fw_rev[i+1];
! 					info->InquiryData.ProductRevisionLevel[i+1] =
! 						info->drive.fw_rev[i];
! 				}
  
  				/* determine if it supports Media Status Notification */
  				if (info->drive.command_set_2 & COMMANDSET_MEDIA_STATUS) {
***************
*** 1471,1477 ****
  			ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  			ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  			ataCdb->generic.TransferBlockSize = 1;
! 			ataCdb->generic.RegisterSelect = REG_COMMAND;
  			ataCdb->write.CommandByte = ATA_COMMAND_GET_MEDIA_STATUS;
  			srb->request_bufflen = 0;
  		} else {
--- 1483,1489 ----
  			ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  			ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  			ataCdb->generic.TransferBlockSize = 1;
! 			ataCdb->write.SelectCommand = 1;
  			ataCdb->write.CommandByte = ATA_COMMAND_GET_MEDIA_STATUS;
  			srb->request_bufflen = 0;
  		} else {
***************
*** 1492,1498 ****
  			ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  			ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  			ataCdb->generic.TransferBlockSize = 1;
! 			ataCdb->generic.RegisterSelect = REG_COMMAND;
  			ataCdb->write.CommandByte = ATA_COMMAND_GET_MEDIA_STATUS;
  			srb->request_bufflen = 0;
  		} else {
--- 1504,1510 ----
  			ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  			ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  			ataCdb->generic.TransferBlockSize = 1;
! 			ataCdb->write.SelectCommand = 1;
  			ataCdb->write.CommandByte = ATA_COMMAND_GET_MEDIA_STATUS;
  			srb->request_bufflen = 0;
  		} else {
***************
*** 1549,1563 ****
  		ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  		ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  		ataCdb->generic.TransferBlockSize = 1;
! 		ataCdb->generic.RegisterSelect =
! 		  REG_SECTOR_COUNT | REG_SECTOR_NUMBER |
! 		  REG_CYLINDER_LOW | REG_CYLINDER_HIGH |
! 		  REG_DEVICE_HEAD  | REG_COMMAND;
  		ataCdb->write.SectorCountByte = (unsigned char)blockCount;
  		ataCdb->write.SectorNumberByte = sectnum;
  		ataCdb->write.CylinderHighByte = (unsigned char)(cylinder>>8);
  		ataCdb->write.CylinderLowByte = (unsigned char)cylinder;
  		ataCdb->write.DeviceHeadByte = (head | ATA_ADDRESS_DEVHEAD_STD);
  		ataCdb->write.CommandByte = WIN_READ;
  		break;
  
--- 1561,1577 ----
  		ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  		ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  		ataCdb->generic.TransferBlockSize = 1;
! 		ataCdb->write.SelectSectorCount = 1;
  		ataCdb->write.SectorCountByte = (unsigned char)blockCount;
+ 		ataCdb->write.SelectSectorNumber = 1;
  		ataCdb->write.SectorNumberByte = sectnum;
+ 		ataCdb->write.SelectCylinderHigh = 1;
  		ataCdb->write.CylinderHighByte = (unsigned char)(cylinder>>8);
+ 		ataCdb->write.SelectCylinderLow = 1;
  		ataCdb->write.CylinderLowByte = (unsigned char)cylinder;
+ 		ataCdb->write.SelectDeviceHead = 1;
  		ataCdb->write.DeviceHeadByte = (head | ATA_ADDRESS_DEVHEAD_STD);
+ 		ataCdb->write.SelectCommand = 1;
  		ataCdb->write.CommandByte = WIN_READ;
  		break;
  
***************
*** 1580,1594 ****
  		ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  		ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  		ataCdb->generic.TransferBlockSize = 1;
! 		ataCdb->generic.RegisterSelect =
! 		  REG_SECTOR_COUNT | REG_SECTOR_NUMBER |
! 		  REG_CYLINDER_LOW | REG_CYLINDER_HIGH |
! 		  REG_DEVICE_HEAD  | REG_COMMAND;
  		ataCdb->write.SectorCountByte = (unsigned char)blockCount;
  		ataCdb->write.SectorNumberByte = sectnum;
  		ataCdb->write.CylinderHighByte = (unsigned char)(cylinder>>8);
  		ataCdb->write.CylinderLowByte = (unsigned char)cylinder;
  		ataCdb->write.DeviceHeadByte = (head | ATA_ADDRESS_DEVHEAD_STD);
  		ataCdb->write.CommandByte = WIN_WRITE;
  		break;
  
--- 1594,1610 ----
  		ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  		ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  		ataCdb->generic.TransferBlockSize = 1;
! 		ataCdb->write.SelectSectorCount = 1;
  		ataCdb->write.SectorCountByte = (unsigned char)blockCount;
+ 		ataCdb->write.SelectSectorNumber = 1;
  		ataCdb->write.SectorNumberByte = sectnum;
+ 		ataCdb->write.SelectCylinderHigh = 1;
  		ataCdb->write.CylinderHighByte = (unsigned char)(cylinder>>8);
+ 		ataCdb->write.SelectCylinderLow = 1;
  		ataCdb->write.CylinderLowByte = (unsigned char)cylinder;
+ 		ataCdb->write.SelectDeviceHead = 1;
  		ataCdb->write.DeviceHeadByte = (head | ATA_ADDRESS_DEVHEAD_STD);
+ 		ataCdb->write.SelectCommand = 1;
  		ataCdb->write.CommandByte = WIN_WRITE;
  		break;
  
***************
*** 1601,1607 ****
  			ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  			ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  			ataCdb->generic.TransferBlockSize = 1;
! 			ataCdb->generic.RegisterSelect = REG_COMMAND;
  			ataCdb->write.CommandByte = (srb->cmnd[4] & 0x1) ?
  				WIN_DOORLOCK : WIN_DOORUNLOCK;
  			srb->request_bufflen = 0;
--- 1617,1623 ----
  			ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  			ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  			ataCdb->generic.TransferBlockSize = 1;
! 			ataCdb->write.SelectCommand = 1;
  			ataCdb->write.CommandByte = (srb->cmnd[4] & 0x1) ?
  				WIN_DOORLOCK : WIN_DOORUNLOCK;
  			srb->request_bufflen = 0;
***************
*** 1624,1637 ****
  			ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  			ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  			ataCdb->generic.TransferBlockSize = 0;
! 			ataCdb->generic.RegisterSelect = REG_COMMAND;
  			ataCdb->write.CommandByte = ATA_COMMAND_MEDIA_EJECT;
  		} else if ((srb->cmnd[4] & 0x3) == 0x1) {
  			US_DEBUGP("   Get Media Status\n");
  			ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  			ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  			ataCdb->generic.TransferBlockSize = 1;
! 			ataCdb->generic.RegisterSelect = REG_COMMAND;
  			ataCdb->write.CommandByte = ATA_COMMAND_GET_MEDIA_STATUS;
  			srb->request_bufflen = 0;
  		} else {
--- 1640,1653 ----
  			ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  			ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  			ataCdb->generic.TransferBlockSize = 0;
! 			ataCdb->write.SelectCommand = 1;
  			ataCdb->write.CommandByte = ATA_COMMAND_MEDIA_EJECT;
  		} else if ((srb->cmnd[4] & 0x3) == 0x1) {
  			US_DEBUGP("   Get Media Status\n");
  			ataCdb->generic.SignatureByte0 = info->ConfigData.ATAMajorCommand;
  			ataCdb->generic.SignatureByte1 = info->ConfigData.ATAMinorCommand;
  			ataCdb->generic.TransferBlockSize = 1;
! 			ataCdb->write.SelectCommand = 1;
  			ataCdb->write.CommandByte = ATA_COMMAND_GET_MEDIA_STATUS;
  			srb->request_bufflen = 0;
  		} else {
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/jumpshot.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/jumpshot.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/jumpshot.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/jumpshot.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,26 ****
  /* Driver for Lexar "Jumpshot" Compact Flash reader
   *
-  * $Id: jumpshot.c,v 1.7 2002/02/25 00:40:13 mdharm Exp $
-  *
   * jumpshot driver v0.1:
   *
   * First release
   *
   * Current development and maintenance by:
   *   (c) 2000 Jimmie Mayfield (mayfield+usb@sackheads.org)
!  *
!  *   Many thanks to Robert Baruch for the SanDisk SmartMedia reader driver
   *   which I used as a template for this driver.
-  *
   *   Some bugfixes and scatter-gather code by Gregory P. Smith 
   *   (greg-usb@electricrain.com)
   *
-  *   Fix for media change by Joerg Schneider (js@joergschneider.com)
-  *
-  * Developed with the assistance of:
-  *
-  *   (C) 2002 Alan Stern 
-  *
   * This program is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License as published by the
   * Free Software Foundation; either version 2, or (at your option) any
--- 1,16 ----
  /* Driver for Lexar "Jumpshot" Compact Flash reader
   *
   * jumpshot driver v0.1:
   *
   * First release
   *
   * Current development and maintenance by:
   *   (c) 2000 Jimmie Mayfield (mayfield+usb@sackheads.org)
!  *   many thanks to Robert Baruch for the SanDisk SmartMedia reader driver
   *   which I used as a template for this driver.
   *   Some bugfixes and scatter-gather code by Gregory P. Smith 
   *   (greg-usb@electricrain.com)
   *
   * This program is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License as published by the
   * Free Software Foundation; either version 2, or (at your option) any
***************
*** 138,145 ****
  		/* a stall is a fatal condition from the device */
  		if (result == -EPIPE) {
  			US_DEBUGP("jumpshot_send_control:  -- Stall on control pipe. Clearing\n");
! 			result = usb_stor_clear_halt(us, pipe);
! 			US_DEBUGP("jumpshot_send_control:  -- usb_stor_clear_halt() returns %d\n", result);
  			return USB_STOR_TRANSPORT_FAILED;
  		}
  
--- 128,135 ----
  		/* a stall is a fatal condition from the device */
  		if (result == -EPIPE) {
  			US_DEBUGP("jumpshot_send_control:  -- Stall on control pipe. Clearing\n");
! 			result = usb_clear_halt(us->pusb_dev, pipe);
! 			US_DEBUGP("jumpshot_send_control:  -- usb_clear_halt() returns %d\n", result);
  			return USB_STOR_TRANSPORT_FAILED;
  		}
  
***************
*** 171,177 ****
  	if (result == -EPIPE) {
  		US_DEBUGP("jumpshot_raw_bulk:  EPIPE. clearing endpoint halt for"
  			  " pipe 0x%x, stalled at %d bytes\n", pipe, act_len);
! 		usb_stor_clear_halt(us, pipe);
  	}
  
  	if (result) {
--- 161,167 ----
  	if (result == -EPIPE) {
  		US_DEBUGP("jumpshot_raw_bulk:  EPIPE. clearing endpoint halt for"
  			  " pipe 0x%x, stalled at %d bytes\n", pipe, act_len);
! 		usb_clear_halt(us->pusb_dev, pipe);
  	}
  
  	if (result) {
***************
*** 294,300 ****
  
                  if (use_sg) {
                          sg = (struct scatterlist *) dest;
!                         buffer = kmalloc(len, GFP_NOIO);
                          if (buffer == NULL)
                                  return USB_STOR_TRANSPORT_ERROR;
                          ptr = buffer;
--- 284,290 ----
  
                  if (use_sg) {
                          sg = (struct scatterlist *) dest;
!                         buffer = kmalloc(len, GFP_KERNEL);
                          if (buffer == NULL)
                                  return USB_STOR_TRANSPORT_ERROR;
                          ptr = buffer;
***************
*** 409,415 ****
  
                  if (use_sg) {
                          sg = (struct scatterlist *) src;
!                         buffer = kmalloc(len, GFP_NOIO);
                          if (buffer == NULL)
                                  return USB_STOR_TRANSPORT_ERROR;
                          ptr = buffer;
--- 399,405 ----
  
                  if (use_sg) {
                          sg = (struct scatterlist *) src;
!                         buffer = kmalloc(len, GFP_KERNEL);
                          if (buffer == NULL)
                                  return USB_STOR_TRANSPORT_ERROR;
                          ptr = buffer;
***************
*** 675,681 ****
  
  
  	if (!us->extra) {
! 		us->extra = kmalloc(sizeof(struct jumpshot_info), GFP_NOIO);
  		if (!us->extra) {
  			US_DEBUGP("jumpshot_transport:  Gah! Can't allocate storage for jumpshot info struct!\n");
  			return USB_STOR_TRANSPORT_ERROR;
--- 665,671 ----
  
  
  	if (!us->extra) {
! 		us->extra = kmalloc(sizeof(struct jumpshot_info), GFP_KERNEL);
  		if (!us->extra) {
  			US_DEBUGP("jumpshot_transport:  Gah! Can't allocate storage for jumpshot info struct!\n");
  			return USB_STOR_TRANSPORT_ERROR;
***************
*** 808,830 ****
  		//
  		return USB_STOR_TRANSPORT_GOOD;
  	}
- 	
- 	if (srb->cmnd[0] == START_STOP) {
- 		/* this is used by sd.c'check_scsidisk_media_change to detect
- 		   media change */
- 		US_DEBUGP("jumpshot_transport:  START_STOP.\n");
- 		/* the first jumpshot_id_device after a media change returns
- 		   an error (determined experimentally) */
- 		rc = jumpshot_id_device(us, info);
- 		if (rc == USB_STOR_TRANSPORT_GOOD) {
- 			info->sense_key = NO_SENSE;
- 			srb->result = SUCCESS;
- 		} else {
- 			info->sense_key = UNIT_ATTENTION;
- 			srb->result = CHECK_CONDITION;
- 		}
- 		return rc;
-         }
  
  	US_DEBUGP("jumpshot_transport:  Gah! Unknown command: %d (0x%x)\n", srb->cmnd[0], srb->cmnd[0]);
  	return USB_STOR_TRANSPORT_ERROR;
--- 798,803 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/protocol.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/protocol.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/protocol.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/protocol.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,13 ****
  /* Driver for USB Mass Storage compliant devices
   *
!  * $Id: protocol.c,v 1.13 2002/02/25 00:34:56 mdharm Exp $
   *
   * Current development and maintenance by:
!  *   (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
   *
   * Developed with the assistance of:
   *   (c) 2000 David L. Brown, Jr. (usb-storage@davidb.org)
-  *   (c) 2002 Alan Stern (stern@rowland.org)
   *
   * Initial work by:
   *   (c) 1999 Michael Gee (michael@linuxspecific.com)
--- 1,12 ----
  /* Driver for USB Mass Storage compliant devices
   *
!  * $Id: protocol.c,v 1.10 2001/07/30 00:27:59 mdharm Exp $
   *
   * Current development and maintenance by:
!  *   (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
   *
   * Developed with the assistance of:
   *   (c) 2000 David L. Brown, Jr. (usb-storage@davidb.org)
   *
   * Initial work by:
   *   (c) 1999 Michael Gee (michael@linuxspecific.com)
***************
*** 77,83 ****
  		data_ptr = (unsigned char *)srb->request_buffer;
  
  	/* Change the SCSI revision number */
! 	data_ptr[2] = (data_ptr[2] & ~7) | 2;
  }
  
  /***********************************************************************
--- 76,82 ----
  		data_ptr = (unsigned char *)srb->request_buffer;
  
  	/* Change the SCSI revision number */
! 	data_ptr[2] |= 0x2;
  }
  
  /***********************************************************************
***************
*** 98,108 ****
  
  	/* send the command to the transport layer */
  	usb_stor_invoke_transport(srb, us);
- 	if (srb->result == GOOD << 1) {
  
! 		/* fix the INQUIRY data if necessary */
! 		fix_inquiry_data(srb);
! 	}
  }
  
  void usb_stor_ATAPI_command(Scsi_Cmnd *srb, struct us_data *us)
--- 97,105 ----
  
  	/* send the command to the transport layer */
  	usb_stor_invoke_transport(srb, us);
  
! 	/* fix the INQUIRY data if necessary */
! 	fix_inquiry_data(srb);
  }
  
  void usb_stor_ATAPI_command(Scsi_Cmnd *srb, struct us_data *us)
***************
*** 171,185 ****
  
  	/* send the command to the transport layer */
  	usb_stor_invoke_transport(srb, us);
- 	if (srb->result == GOOD << 1) {
  
! 		/* Fix the MODE_SENSE data if we translated the command */
! 		if (old_cmnd == MODE_SENSE)
! 			usb_stor_scsiSense10to6(srb);
! 
! 		/* fix the INQUIRY data if necessary */
! 		fix_inquiry_data(srb);
! 	}
  }
  
  
--- 168,180 ----
  
  	/* send the command to the transport layer */
  	usb_stor_invoke_transport(srb, us);
  
! 	/* Fix the MODE_SENSE data if we translated the command */
! 	if ((old_cmnd == MODE_SENSE) && (status_byte(srb->result) == GOOD))
! 		usb_stor_scsiSense10to6(srb);
! 
! 	/* fix the INQUIRY data if necessary */
! 	fix_inquiry_data(srb);
  }
  
  
***************
*** 268,282 ****
  
  	/* send the command to the transport layer */
  	usb_stor_invoke_transport(srb, us);
- 	if (srb->result == GOOD << 1) {
  
! 		/* Fix the MODE_SENSE data if we translated the command */
! 		if (old_cmnd == MODE_SENSE)
! 			usb_stor_scsiSense10to6(srb);
! 
! 		/* Fix the data for an INQUIRY, if necessary */
! 		fix_inquiry_data(srb);
! 	}
  }
  
  void usb_stor_transparent_scsi_command(Scsi_Cmnd *srb, struct us_data *us)
--- 263,275 ----
  
  	/* send the command to the transport layer */
  	usb_stor_invoke_transport(srb, us);
  
! 	/* Fix the MODE_SENSE data if we translated the command */
! 	if ((old_cmnd == MODE_SENSE) && (status_byte(srb->result) == GOOD))
! 		usb_stor_scsiSense10to6(srb);
! 
! 	/* Fix the data for an INQUIRY, if necessary */
! 	fix_inquiry_data(srb);
  }
  
  void usb_stor_transparent_scsi_command(Scsi_Cmnd *srb, struct us_data *us)
***************
*** 337,350 ****
  
  	/* send the command to the transport layer */
  	usb_stor_invoke_transport(srb, us);
- 	if (srb->result == GOOD << 1) {
  
! 		/* Fix the MODE_SENSE data if we translated the command */
! 		if ((us->flags & US_FL_MODE_XLATE) && (old_cmnd == MODE_SENSE))
! 			usb_stor_scsiSense10to6(srb);
! 
! 		/* fix the INQUIRY data if necessary */
! 		fix_inquiry_data(srb);
! 	}
  }
  
--- 330,342 ----
  
  	/* send the command to the transport layer */
  	usb_stor_invoke_transport(srb, us);
  
! 	/* Fix the MODE_SENSE data if we translated the command */
! 	if ((us->flags & US_FL_MODE_XLATE) && (old_cmnd == MODE_SENSE)
! 			&& (status_byte(srb->result) == GOOD))
! 		usb_stor_scsiSense10to6(srb);
! 
! 	/* fix the INQUIRY data if necessary */
! 	fix_inquiry_data(srb);
  }
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/scsiglue.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/scsiglue.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/scsiglue.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/scsiglue.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 190,196 ****
  	}
  
  	/* if we have an urb pending, let's wake the control thread up */
! 	if (!us->current_done.done) {
  		/* cancel the URB -- this will automatically wake the thread */
  		usb_unlink_urb(us->current_urb);
  
--- 190,196 ----
  	}
  
  	/* if we have an urb pending, let's wake the control thread up */
! 	if (us->current_urb->status == -EINPROGRESS) {
  		/* cancel the URB -- this will automatically wake the thread */
  		usb_unlink_urb(us->current_urb);
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/sddr09.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/sddr09.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/sddr09.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/sddr09.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,6 ****
  /* Driver for SanDisk SDDR-09 SmartMedia reader
   *
!  * $Id: sddr09.c,v 1.23 2002/02/25 00:40:13 mdharm Exp $
   *
   * SDDR09 driver v0.1:
   *
--- 1,6 ----
  /* Driver for SanDisk SDDR-09 SmartMedia reader
   *
!  * $Id: sddr09.c,v 1.21 2001/11/06 03:18:36 mdharm Exp $
   *
   * SDDR09 driver v0.1:
   *
***************
*** 9,17 ****
   * Current development and maintenance by:
   *   (c) 2000, 2001 Robert Baruch (autophile@starband.net)
   *
-  * Developed with the assistance of:
-  *   (c) 2002 Alan Stern 
-  *
   * The SanDisk SDDR-09 SmartMedia reader uses the Shuttle EUSB-01 chip.
   * This chip is a programmable USB controller. In the SDDR-09, it has
   * been programmed to obey a certain limited set of SCSI commands. This
--- 9,14 ----
***************
*** 82,88 ****
  	// copy the data into the buffer.
  /*
  	if (xfer_len > 0) {
! 		buffer = kmalloc(xfer_len, GFP_NOIO);
  		if (!(command[0] & USB_DIR_IN))
  			memcpy(buffer, xfer_data, xfer_len);
  	}
--- 79,85 ----
  	// copy the data into the buffer.
  /*
  	if (xfer_len > 0) {
! 		buffer = kmalloc(xfer_len, GFP_KERNEL);
  		if (!(command[0] & USB_DIR_IN))
  			memcpy(buffer, xfer_data, xfer_len);
  	}
***************
*** 116,123 ****
  		/* a stall is a fatal condition from the device */
  		if (result == -EPIPE) {
  			US_DEBUGP("-- Stall on control pipe. Clearing\n");
! 			result = usb_stor_clear_halt(us, pipe);
! 			US_DEBUGP("-- usb_stor_clear_halt() returns %d\n", result);
  			return USB_STOR_TRANSPORT_FAILED;
  		}
  
--- 113,120 ----
  		/* a stall is a fatal condition from the device */
  		if (result == -EPIPE) {
  			US_DEBUGP("-- Stall on control pipe. Clearing\n");
! 			result = usb_clear_halt(us->pusb_dev, pipe);
! 			US_DEBUGP("-- usb_clear_halt() returns %d\n", result);
  			return USB_STOR_TRANSPORT_FAILED;
  		}
  
***************
*** 149,155 ****
         	        US_DEBUGP("EPIPE: clearing endpoint halt for"
  			" pipe 0x%x, stalled at %d bytes\n",
  			pipe, act_len);
!                	usb_stor_clear_halt(us, pipe);
          }
  
  	if (result) {
--- 146,152 ----
         	        US_DEBUGP("EPIPE: clearing endpoint halt for"
  			" pipe 0x%x, stalled at %d bytes\n",
  			pipe, act_len);
!                	usb_clear_halt(us->pusb_dev, pipe);
          }
  
  	if (result) {
***************
*** 306,312 ****
  
  	if (use_sg) {
  		sg = (struct scatterlist *)content;
! 		buffer = kmalloc(len, GFP_NOIO);
  		if (buffer == NULL)
  			return USB_STOR_TRANSPORT_ERROR;
  		ptr = buffer;
--- 303,309 ----
  
  	if (use_sg) {
  		sg = (struct scatterlist *)content;
! 		buffer = kmalloc(len, GFP_KERNEL);
  		if (buffer == NULL)
  			return USB_STOR_TRANSPORT_ERROR;
  		ptr = buffer;
***************
*** 633,649 ****
  
  	alloc_blocks = (alloc_len + (1<<17) - 1) >> 17;
  	sg = kmalloc(alloc_blocks*sizeof(struct scatterlist),
! 		GFP_NOIO);
  	if (sg == NULL)
  		return 0;
  
  	for (i=0; i> 17;
  	sg = kmalloc(alloc_blocks*sizeof(struct scatterlist),
! 		GFP_KERNEL);
  	if (sg == NULL)
  		return 0;
  
  	for (i=0; ilba_to_pba);
  	if (info->pba_to_lba)
  		kfree(info->pba_to_lba);
! 	info->lba_to_pba = kmalloc(numblocks*sizeof(int), GFP_NOIO);
! 	info->pba_to_lba = kmalloc(numblocks*sizeof(int), GFP_NOIO);
  
  	if (info->lba_to_pba == NULL || info->pba_to_lba == NULL) {
  		if (info->lba_to_pba != NULL)
--- 672,679 ----
  		kfree(info->lba_to_pba);
  	if (info->pba_to_lba)
  		kfree(info->pba_to_lba);
! 	info->lba_to_pba = kmalloc(numblocks*sizeof(int), GFP_KERNEL);
! 	info->pba_to_lba = kmalloc(numblocks*sizeof(int), GFP_KERNEL);
  
  	if (info->lba_to_pba == NULL || info->pba_to_lba == NULL) {
  		if (info->lba_to_pba != NULL)
***************
*** 845,851 ****
  
  	if (!us->extra) {
  		us->extra = kmalloc(
! 			sizeof(struct sddr09_card_info), GFP_NOIO);
  		if (!us->extra)
  			return USB_STOR_TRANSPORT_ERROR;
  		memset(us->extra, 0, sizeof(struct sddr09_card_info));
--- 842,848 ----
  
  	if (!us->extra) {
  		us->extra = kmalloc(
! 			sizeof(struct sddr09_card_info), GFP_KERNEL);
  		if (!us->extra)
  			return USB_STOR_TRANSPORT_ERROR;
  		memset(us->extra, 0, sizeof(struct sddr09_card_info));
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage$B$@$1$KH/8+(B: sddr55.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage$B$@$1$KH/8+(B: sddr55.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/shuttle_usbat.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/shuttle_usbat.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/shuttle_usbat.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/shuttle_usbat.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,13 ****
  /* Driver for SCM Microsystems USB-ATAPI cable
   *
!  * $Id: shuttle_usbat.c,v 1.16 2002/02/25 00:40:13 mdharm Exp $
   *
   * Current development and maintenance by:
   *   (c) 2000, 2001 Robert Baruch (autophile@starband.net)
   *
-  * Developed with the assistance of:
-  *   (c) 2002 Alan Stern 
-  *
   * Many originally ATAPI devices were slightly modified to meet the USB
   * market by using some kind of translation from ATAPI to USB on the host,
   * and the peripheral would translate from USB back to ATAPI.
--- 1,10 ----
  /* Driver for SCM Microsystems USB-ATAPI cable
   *
!  * $Id: shuttle_usbat.c,v 1.14 2001/03/28 01:02:06 groovyjava Exp $
   *
   * Current development and maintenance by:
   *   (c) 2000, 2001 Robert Baruch (autophile@starband.net)
   *
   * Many originally ATAPI devices were slightly modified to meet the USB
   * market by using some kind of translation from ATAPI to USB on the host,
   * and the peripheral would translate from USB back to ATAPI.
***************
*** 110,117 ****
  		/* a stall is a fatal condition from the device */
  		if (result == -EPIPE) {
  			US_DEBUGP("-- Stall on control pipe. Clearing\n");
! 			result = usb_stor_clear_halt(us, pipe);
! 			US_DEBUGP("-- usb_stor_clear_halt() returns %d\n", result);
  			return USB_STOR_TRANSPORT_FAILED;
  		}
  
--- 107,114 ----
  		/* a stall is a fatal condition from the device */
  		if (result == -EPIPE) {
  			US_DEBUGP("-- Stall on control pipe. Clearing\n");
! 			result = usb_clear_halt(us->pusb_dev, pipe);
! 			US_DEBUGP("-- usb_clear_halt() returns %d\n", result);
  			return USB_STOR_TRANSPORT_FAILED;
  		}
  
***************
*** 143,149 ****
         	        US_DEBUGP("EPIPE: clearing endpoint halt for"
  			" pipe 0x%x, stalled at %d bytes\n",
  			pipe, act_len);
!                	usb_stor_clear_halt(us, pipe);
          }
  
  	if (result) {
--- 140,146 ----
         	        US_DEBUGP("EPIPE: clearing endpoint halt for"
  			" pipe 0x%x, stalled at %d bytes\n",
  			pipe, act_len);
!                	usb_clear_halt(us->pusb_dev, pipe);
          }
  
  	if (result) {
***************
*** 518,524 ****
  			 */
  
  			if (direction==SCSI_DATA_READ && i==0)
! 				usb_stor_clear_halt(us,
  					usb_sndbulkpipe(us->pusb_dev,
  					  us->ep_out));
  			/*
--- 515,521 ----
  			 */
  
  			if (direction==SCSI_DATA_READ && i==0)
! 				usb_clear_halt(us->pusb_dev,
  					usb_sndbulkpipe(us->pusb_dev,
  					  us->ep_out));
  			/*
***************
*** 678,696 ****
  		len = short_pack(data[7+9], data[7+8]);
  		len <<= 16;
  		len |= data[7+7];
- 		US_DEBUGP("handle_read10: GPCMD_READ_CD: len %d\n", len);
  		srb->transfersize = srb->request_bufflen/len;
  	}
  
- 	if (!srb->transfersize)  {
- 		srb->transfersize = 2048; /* A guess */
- 		US_DEBUGP("handle_read10: transfersize 0, forcing %d\n",
- 			srb->transfersize);
- 	}
  
  	len = (65535/srb->transfersize) * srb->transfersize;
  	US_DEBUGP("Max read is %d bytes\n", len);
! 	buffer = kmalloc(len, GFP_NOIO);
  	if (buffer == NULL) // bloody hell!
  		return USB_STOR_TRANSPORT_FAILED;
  	sector = short_pack(data[7+3], data[7+2]);
--- 675,687 ----
  		len = short_pack(data[7+9], data[7+8]);
  		len <<= 16;
  		len |= data[7+7];
  		srb->transfersize = srb->request_bufflen/len;
  	}
  
  
  	len = (65535/srb->transfersize) * srb->transfersize;
  	US_DEBUGP("Max read is %d bytes\n", len);
! 	buffer = kmalloc(len, GFP_KERNEL);
  	if (buffer == NULL) // bloody hell!
  		return USB_STOR_TRANSPORT_FAILED;
  	sector = short_pack(data[7+3], data[7+2]);
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/transport.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/transport.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/transport.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/transport.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,14 ****
  /* Driver for USB Mass Storage compliant devices
   *
!  * $Id: transport.c,v 1.44 2002/02/25 00:43:41 mdharm Exp $
   *
   * Current development and maintenance by:
!  *   (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
   *
   * Developed with the assistance of:
   *   (c) 2000 David L. Brown, Jr. (usb-storage@davidb.org)
   *   (c) 2000 Stephen J. Gowdy (SGowdy@lbl.gov)
-  *   (c) 2002 Alan Stern 
   *
   * Initial work by:
   *   (c) 1999 Michael Gee (michael@linuxspecific.com)
--- 1,13 ----
  /* Driver for USB Mass Storage compliant devices
   *
!  * $Id: transport.c,v 1.41 2001/10/15 07:02:32 mdharm Exp $
   *
   * Current development and maintenance by:
!  *   (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
   *
   * Developed with the assistance of:
   *   (c) 2000 David L. Brown, Jr. (usb-storage@davidb.org)
   *   (c) 2000 Stephen J. Gowdy (SGowdy@lbl.gov)
   *
   * Initial work by:
   *   (c) 1999 Michael Gee (michael@linuxspecific.com)
***************
*** 336,342 ****
  			   len = srb->request_bufflen;
  	   }
  
! 	return len;
  }
  
  /***********************************************************************
--- 335,365 ----
  			   len = srb->request_bufflen;
  	   }
  
! return len;
! }
! 
! /* This is a version of usb_clear_halt() that doesn't read the status from
!  * the device -- this is because some devices crash their internal firmware
!  * when the status is requested after a halt
!  */
! int usb_stor_clear_halt(struct usb_device *dev, int pipe)
! {
! 	int result;
! 	int endp = usb_pipeendpoint(pipe) | (usb_pipein(pipe) << 7);
! 
! 	result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
! 				 USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT, 0,
! 				 endp, NULL, 0, HZ * 3);
! 
! 	/* this is a failure case */
! 	if (result < 0)
! 		return result;
! 
! 	/* reset the toggles and endpoint flags */
! 	usb_endpoint_running(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe));
! 	usb_settoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe), 0);
! 
! 	return 0;
  }
  
  /***********************************************************************
***************
*** 346,352 ****
  /* This is the completion handler which will wake us up when an URB
   * completes.
   */
! static void usb_stor_blocking_completion(struct urb *urb)
  {
  	struct completion *urb_done_ptr = (struct completion *)urb->context;
  
--- 369,375 ----
  /* This is the completion handler which will wake us up when an URB
   * completes.
   */
! static void usb_stor_blocking_completion(urb_t *urb)
  {
  	struct completion *urb_done_ptr = (struct completion *)urb->context;
  
***************
*** 360,382 ****
  			 u8 request, u8 requesttype, u16 value, u16 index, 
  			 void *data, u16 size)
  {
  	int status;
! 	struct usb_ctrlrequest *dr;
  
  	/* allocate the device request structure */
! 	dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO);
  	if (!dr)
  		return -ENOMEM;
  
  	/* fill in the structure */
! 	dr->bRequestType = requesttype;
! 	dr->bRequest = request;
! 	dr->wValue = cpu_to_le16(value);
! 	dr->wIndex = cpu_to_le16(index);
! 	dr->wLength = cpu_to_le16(size);
  
  	/* set up data structures for the wakeup system */
! 	init_completion(&us->current_done);
  
  	/* lock the URB */
  	down(&(us->current_urb_sem));
--- 383,406 ----
  			 u8 request, u8 requesttype, u16 value, u16 index, 
  			 void *data, u16 size)
  {
+ 	struct completion urb_done;
  	int status;
! 	devrequest *dr;
  
  	/* allocate the device request structure */
! 	dr = kmalloc(sizeof(devrequest), GFP_KERNEL);
  	if (!dr)
  		return -ENOMEM;
  
  	/* fill in the structure */
! 	dr->requesttype = requesttype;
! 	dr->request = request;
! 	dr->value = cpu_to_le16(value);
! 	dr->index = cpu_to_le16(index);
! 	dr->length = cpu_to_le16(size);
  
  	/* set up data structures for the wakeup system */
! 	init_completion(&urb_done);
  
  	/* lock the URB */
  	down(&(us->current_urb_sem));
***************
*** 384,390 ****
  	/* fill the URB */
  	FILL_CONTROL_URB(us->current_urb, us->pusb_dev, pipe, 
  			 (unsigned char*) dr, data, size, 
! 			 usb_stor_blocking_completion, &us->current_done);
  	us->current_urb->actual_length = 0;
  	us->current_urb->error_count = 0;
  	us->current_urb->transfer_flags = USB_ASYNC_UNLINK;
--- 408,414 ----
  	/* fill the URB */
  	FILL_CONTROL_URB(us->current_urb, us->pusb_dev, pipe, 
  			 (unsigned char*) dr, data, size, 
! 			 usb_stor_blocking_completion, &urb_done);
  	us->current_urb->actual_length = 0;
  	us->current_urb->error_count = 0;
  	us->current_urb->transfer_flags = USB_ASYNC_UNLINK;
***************
*** 400,406 ****
  
  	/* wait for the completion of the URB */
  	up(&(us->current_urb_sem));
! 	wait_for_completion(&us->current_done);
  	down(&(us->current_urb_sem));
  
  	/* return the actual length of the data transferred if no error*/
--- 424,430 ----
  
  	/* wait for the completion of the URB */
  	up(&(us->current_urb_sem));
! 	wait_for_completion(&urb_done);
  	down(&(us->current_urb_sem));
  
  	/* return the actual length of the data transferred if no error*/
***************
*** 420,436 ****
  int usb_stor_bulk_msg(struct us_data *us, void *data, int pipe,
  		      unsigned int len, unsigned int *act_len)
  {
  	int status;
  
  	/* set up data structures for the wakeup system */
! 	init_completion(&us->current_done);
  
  	/* lock the URB */
  	down(&(us->current_urb_sem));
  
  	/* fill the URB */
  	FILL_BULK_URB(us->current_urb, us->pusb_dev, pipe, data, len,
! 		      usb_stor_blocking_completion, &us->current_done);
  	us->current_urb->actual_length = 0;
  	us->current_urb->error_count = 0;
  	us->current_urb->transfer_flags = USB_ASYNC_UNLINK;
--- 444,461 ----
  int usb_stor_bulk_msg(struct us_data *us, void *data, int pipe,
  		      unsigned int len, unsigned int *act_len)
  {
+ 	struct completion urb_done;
  	int status;
  
  	/* set up data structures for the wakeup system */
! 	init_completion(&urb_done);
  
  	/* lock the URB */
  	down(&(us->current_urb_sem));
  
  	/* fill the URB */
  	FILL_BULK_URB(us->current_urb, us->pusb_dev, pipe, data, len,
! 		      usb_stor_blocking_completion, &urb_done);
  	us->current_urb->actual_length = 0;
  	us->current_urb->error_count = 0;
  	us->current_urb->transfer_flags = USB_ASYNC_UNLINK;
***************
*** 445,451 ****
  
  	/* wait for the completion of the URB */
  	up(&(us->current_urb_sem));
! 	wait_for_completion(&us->current_done);
  	down(&(us->current_urb_sem));
  
  	/* return the actual length of the data transferred */
--- 470,476 ----
  
  	/* wait for the completion of the URB */
  	up(&(us->current_urb_sem));
! 	wait_for_completion(&urb_done);
  	down(&(us->current_urb_sem));
  
  	/* return the actual length of the data transferred */
***************
*** 456,489 ****
  	return us->current_urb->status;
  }
  
- /* This is a version of usb_clear_halt() that doesn't read the status from
-  * the device -- this is because some devices crash their internal firmware
-  * when the status is requested after a halt
-  */
- int usb_stor_clear_halt(struct us_data *us, int pipe)
- {
- 	int result;
- 	int endp = usb_pipeendpoint(pipe) | (usb_pipein(pipe) << 7);
- 
- 	result = usb_stor_control_msg(us,
- 		usb_sndctrlpipe(us->pusb_dev, 0),
- 		USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT, 0,
- 		endp, NULL, 0);		/* note: no 3*HZ timeout */
- 	US_DEBUGP("usb_stor_clear_halt: result=%d\n", result);
- 
- 	/* this is a failure case */
- 	if (result < 0)
- 		return result;
- 
- 	/* reset the toggles and endpoint flags */
- 	usb_endpoint_running(us->pusb_dev, usb_pipeendpoint(pipe),
- 		usb_pipeout(pipe));
- 	usb_settoggle(us->pusb_dev, usb_pipeendpoint(pipe),
- 		usb_pipeout(pipe), 0);
- 
- 	return 0;
- }
- 
  /*
   * Transfer one SCSI scatter-gather buffer via bulk transfer
   *
--- 481,486 ----
***************
*** 516,545 ****
  	/* if we stall, we need to clear it before we go on */
  	if (result == -EPIPE) {
  		US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
! 		usb_stor_clear_halt(us, pipe);
! 	}
! 
! 	/* did we abort this command? */
! 	if (result == -ENOENT) {
! 		US_DEBUGP("usb_stor_transfer_partial(): transfer aborted\n");
! 		return US_BULK_TRANSFER_ABORTED;
  	}
  
  	/* did we send all the data? */
  	if (partial == length) {
  		US_DEBUGP("usb_stor_transfer_partial(): transfer complete\n");
- 		printk(KERN_DEBUG USB_STORAGE "task-switchin\n");
  		return US_BULK_TRANSFER_GOOD;
  	}
  
! 	/* NAK - that means we've retried a few times already */
! 	if (result == -ETIMEDOUT) {
! 		US_DEBUGP("usb_stor_transfer_partial(): device NAKed\n");
! 		return US_BULK_TRANSFER_FAILED;
! 	}
! 
! 	/* the catch-all error case */
  	if (result) {
  		US_DEBUGP("usb_stor_transfer_partial(): unknown error\n");
  		return US_BULK_TRANSFER_FAILED;
  	}
--- 513,542 ----
  	/* if we stall, we need to clear it before we go on */
  	if (result == -EPIPE) {
  		US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
! 		usb_stor_clear_halt(us->pusb_dev, pipe);
  	}
  
  	/* did we send all the data? */
  	if (partial == length) {
  		US_DEBUGP("usb_stor_transfer_partial(): transfer complete\n");
  		return US_BULK_TRANSFER_GOOD;
  	}
  
! 	/* uh oh... we have an error code, so something went wrong. */
  	if (result) {
+ 		/* NAK - that means we've retried a few times already */
+ 		if (result == -ETIMEDOUT) {
+ 			US_DEBUGP("usb_stor_transfer_partial(): device NAKed\n");
+ 			return US_BULK_TRANSFER_FAILED;
+ 		}
+ 
+ 		/* -ENOENT -- we canceled this transfer */
+ 		if (result == -ENOENT) {
+ 			US_DEBUGP("usb_stor_transfer_partial(): transfer aborted\n");
+ 			return US_BULK_TRANSFER_ABORTED;
+ 		}
+ 
+ 		/* the catch-all case */
  		US_DEBUGP("usb_stor_transfer_partial(): unknown error\n");
  		return US_BULK_TRANSFER_FAILED;
  	}
***************
*** 553,559 ****
   * Transfer an entire SCSI command's worth of data payload over the bulk
   * pipe.
   *
!  * Note that this uses usb_stor_transfer_partial to achieve its goals -- this
   * function simply determines if we're going to use scatter-gather or not,
   * and acts appropriately.  For now, it also re-interprets the error codes.
   */
--- 550,556 ----
   * Transfer an entire SCSI command's worth of data payload over the bulk
   * pipe.
   *
!  * Note that this uses usb_stor_transfer_partial to achieve it's goals -- this
   * function simply determines if we're going to use scatter-gather or not,
   * and acts appropriately.  For now, it also re-interprets the error codes.
   */
***************
*** 615,621 ****
  /* Invoke the transport and basic error-handling/recovery methods
   *
   * This is used by the protocol layers to actually send the message to
!  * the device and receive the response.
   */
  void usb_stor_invoke_transport(Scsi_Cmnd *srb, struct us_data *us)
  {
--- 612,618 ----
  /* Invoke the transport and basic error-handling/recovery methods
   *
   * This is used by the protocol layers to actually send the message to
!  * the device and recieve the response.
   */
  void usb_stor_invoke_transport(Scsi_Cmnd *srb, struct us_data *us)
  {
***************
*** 634,647 ****
  		return;
  	}
  
- 	/* if there is a transport error, reset and don't auto-sense */
- 	if (result == USB_STOR_TRANSPORT_ERROR) {
- 		US_DEBUGP("-- transport indicates error, resetting\n");
- 		us->transport_reset(us);
- 		srb->result = DID_ERROR << 16;
- 		return;
- 	}
- 
  	/* Determine if we need to auto-sense
  	 *
  	 * I normally don't use a flag like this, but it's almost impossible
--- 631,636 ----
***************
*** 671,677 ****
  	}
  
  	/*
! 	 * If we have a failure, we're going to do a REQUEST_SENSE 
  	 * automatically.  Note that we differentiate between a command
  	 * "failure" and an "error" in the transport mechanism.
  	 */
--- 660,666 ----
  	}
  
  	/*
! 	 * If we have an error, we're going to do a REQUEST_SENSE 
  	 * automatically.  Note that we differentiate between a command
  	 * "failure" and an "error" in the transport mechanism.
  	 */
***************
*** 679,684 ****
--- 668,680 ----
  		US_DEBUGP("-- transport indicates command failure\n");
  		need_auto_sense = 1;
  	}
+ 	if (result == USB_STOR_TRANSPORT_ERROR) {
+ 		us->transport_reset(us);
+ 		US_DEBUGP("-- transport indicates transport failure\n");
+ 		need_auto_sense = 0;
+ 		srb->result = DID_ERROR << 16;
+ 		return;
+ 	}
  
  	/*
  	 * Also, if we have a short transfer on a command that can't have
***************
*** 734,752 ****
  
  		/* issue the auto-sense command */
  		temp_result = us->transport(us->srb, us);
- 
- 		/* let's clean up right away */
- 		srb->request_buffer = old_request_buffer;
- 		srb->request_bufflen = old_request_bufflen;
- 		srb->use_sg = old_sg;
- 		srb->sc_data_direction = old_sc_data_direction;
- 		memcpy(srb->cmnd, old_cmnd, MAX_COMMAND_SIZE);
- 
- 		if (temp_result == USB_STOR_TRANSPORT_ABORTED) {
- 			US_DEBUGP("-- auto-sense aborted\n");
- 			srb->result = DID_ABORT << 16;
- 			return;
- 		}
  		if (temp_result != USB_STOR_TRANSPORT_GOOD) {
  			US_DEBUGP("-- auto-sense failure\n");
  
--- 730,735 ----
***************
*** 777,782 ****
--- 760,772 ----
  		/* set the result so the higher layers expect this data */
  		srb->result = CHECK_CONDITION << 1;
  
+ 		/* we're done here, let's clean up */
+ 		srb->request_buffer = old_request_buffer;
+ 		srb->request_bufflen = old_request_bufflen;
+ 		srb->use_sg = old_sg;
+ 		srb->sc_data_direction = old_sc_data_direction;
+ 		memcpy(srb->cmnd, old_cmnd, MAX_COMMAND_SIZE);
+ 
  		/* If things are really okay, then let's show that */
  		if ((srb->sense_buffer[2] & 0xf) == 0x0)
  			srb->result = GOOD << 1;
***************
*** 808,814 ****
  {
  	struct us_data *us = (struct us_data *)urb->context;
  
! 	US_DEBUGP("USB IRQ received for device on host %d\n", us->host_no);
  	US_DEBUGP("-- IRQ data length is %d\n", urb->actual_length);
  	US_DEBUGP("-- IRQ state is %d\n", urb->status);
  	US_DEBUGP("-- Interrupt Status (0x%x, 0x%x)\n",
--- 798,804 ----
  {
  	struct us_data *us = (struct us_data *)urb->context;
  
! 	US_DEBUGP("USB IRQ recieved for device on host %d\n", us->host_no);
  	US_DEBUGP("-- IRQ data length is %d\n", urb->actual_length);
  	US_DEBUGP("-- IRQ state is %d\n", urb->status);
  	US_DEBUGP("-- Interrupt Status (0x%x, 0x%x)\n",
***************
*** 874,898 ****
  	if (result < 0) {
  		/* Reset flag for status notification */
  		atomic_set(us->ip_wanted, 0);
- 	}
- 
- 	/* if the command was aborted, indicate that */
- 	if (result == -ENOENT)
- 		return USB_STOR_TRANSPORT_ABORTED;
- 
- 	/* STALL must be cleared when it is detected */
- 	if (result == -EPIPE) {
- 		US_DEBUGP("-- Stall on control pipe. Clearing\n");
- 		result = usb_stor_clear_halt(us,	
- 			usb_sndctrlpipe(us->pusb_dev, 0));
  
  		/* if the command was aborted, indicate that */
  		if (result == -ENOENT)
  			return USB_STOR_TRANSPORT_ABORTED;
- 		return USB_STOR_TRANSPORT_FAILED;
- 	}
  
! 	if (result < 0) {
  		/* Uh oh... serious problem here */
  		return USB_STOR_TRANSPORT_ERROR;
  	}
--- 864,884 ----
  	if (result < 0) {
  		/* Reset flag for status notification */
  		atomic_set(us->ip_wanted, 0);
  
  		/* if the command was aborted, indicate that */
  		if (result == -ENOENT)
  			return USB_STOR_TRANSPORT_ABORTED;
  
! 		/* STALL must be cleared when they are detected */
! 		if (result == -EPIPE) {
! 			US_DEBUGP("-- Stall on control pipe. Clearing\n");
! 			result = usb_stor_clear_halt(us->pusb_dev,	
! 					    usb_sndctrlpipe(us->pusb_dev,
! 							    0));
! 			US_DEBUGP("-- usb_stor_clear_halt() returns %d\n", result);
! 			return USB_STOR_TRANSPORT_FAILED;
! 		}
! 
  		/* Uh oh... serious problem here */
  		return USB_STOR_TRANSPORT_ERROR;
  	}
***************
*** 901,918 ****
  	/* transfer the data payload for this command, if one exists*/
  	if (usb_stor_transfer_length(srb)) {
  		usb_stor_transfer(srb, us);
! 		result = srb->result;
! 		US_DEBUGP("CBI data stage result is 0x%x\n", result);
  
! 		/* report any errors */
! 		if (result == US_BULK_TRANSFER_ABORTED) {
! 			atomic_set(us->ip_wanted, 0);
  			return USB_STOR_TRANSPORT_ABORTED;
  		}
- 		if (result == US_BULK_TRANSFER_FAILED) {
- 			atomic_set(us->ip_wanted, 0);
- 			return USB_STOR_TRANSPORT_FAILED;
- 		}
  	}
  
  	/* STATUS STAGE */
--- 887,898 ----
  	/* transfer the data payload for this command, if one exists*/
  	if (usb_stor_transfer_length(srb)) {
  		usb_stor_transfer(srb, us);
! 		US_DEBUGP("CBI data stage result is 0x%x\n", srb->result);
  
! 		/* if it was aborted, we need to indicate that */
! 		if (srb->result == USB_STOR_TRANSPORT_ABORTED) {
  			return USB_STOR_TRANSPORT_ABORTED;
  		}
  	}
  
  	/* STATUS STAGE */
***************
*** 996,1007 ****
  		/* a stall is a fatal condition from the device */
  		if (result == -EPIPE) {
  			US_DEBUGP("-- Stall on control pipe. Clearing\n");
! 			result = usb_stor_clear_halt(us,
! 				usb_sndctrlpipe(us->pusb_dev, 0));
! 
! 			/* if the command was aborted, indicate that */
! 			if (result == -ENOENT)
! 				return USB_STOR_TRANSPORT_ABORTED;
  			return USB_STOR_TRANSPORT_FAILED;
  		}
  
--- 976,985 ----
  		/* a stall is a fatal condition from the device */
  		if (result == -EPIPE) {
  			US_DEBUGP("-- Stall on control pipe. Clearing\n");
! 			result = usb_stor_clear_halt(us->pusb_dev, 
! 					    usb_sndctrlpipe(us->pusb_dev,
! 							    0));
! 			US_DEBUGP("-- usb_stor_clear_halt() returns %d\n", result);
  			return USB_STOR_TRANSPORT_FAILED;
  		}
  
***************
*** 1013,1028 ****
  	/* transfer the data payload for this command, if one exists*/
  	if (usb_stor_transfer_length(srb)) {
  		usb_stor_transfer(srb, us);
! 		result = srb->result;
! 		US_DEBUGP("CB data stage result is 0x%x\n", result);
  
! 		/* report any errors */
! 		if (result == US_BULK_TRANSFER_ABORTED) {
  			return USB_STOR_TRANSPORT_ABORTED;
- 		}
- 		if (result == US_BULK_TRANSFER_FAILED) {
- 			return USB_STOR_TRANSPORT_FAILED;
- 		}
  	}
  
  	/* STATUS STAGE */
--- 991,1001 ----
  	/* transfer the data payload for this command, if one exists*/
  	if (usb_stor_transfer_length(srb)) {
  		usb_stor_transfer(srb, us);
! 		US_DEBUGP("CB data stage result is 0x%x\n", srb->result);
  
! 		/* if it was aborted, we need to indicate that */
! 		if (srb->result == USB_STOR_TRANSPORT_ABORTED)
  			return USB_STOR_TRANSPORT_ABORTED;
  	}
  
  	/* STATUS STAGE */
***************
*** 1039,1081 ****
  /* Determine what the maximum LUN supported is */
  int usb_stor_Bulk_max_lun(struct us_data *us)
  {
! 	unsigned char *data;
  	int result;
  	int pipe;
  
! 	data = kmalloc(sizeof *data, GFP_KERNEL);
! 	if (!data) {
! 		return 0;
! 	}
! 
! 	/* issue the command -- use usb_control_msg() because
! 	 *  the state machine is not yet alive */
  	pipe = usb_rcvctrlpipe(us->pusb_dev, 0);
  	result = usb_control_msg(us->pusb_dev, pipe,
  				 US_BULK_GET_MAX_LUN, 
  				 USB_DIR_IN | USB_TYPE_CLASS | 
  				 USB_RECIP_INTERFACE,
! 				 0, us->ifnum, data, sizeof(data), HZ);
  
  	US_DEBUGP("GetMaxLUN command result is %d, data is %d\n", 
! 		  result, *data);
  
  	/* if we have a successful request, return the result */
! 	if (result == 1) {
! 		result = *data;
! 		kfree(data);
! 		return result;
! 	} else {
! 		kfree(data);
! 	}
  
  	/* if we get a STALL, clear the stall */
  	if (result == -EPIPE) {
  		US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
! 
! 		/* Use usb_clear_halt() because the state machine
! 		 *  is not yet alive */
! 		usb_clear_halt(us->pusb_dev, pipe);
  	}
  
  	/* return the default -- no LUNs */
--- 1012,1040 ----
  /* Determine what the maximum LUN supported is */
  int usb_stor_Bulk_max_lun(struct us_data *us)
  {
! 	unsigned char data;
  	int result;
  	int pipe;
  
! 	/* issue the command */
  	pipe = usb_rcvctrlpipe(us->pusb_dev, 0);
  	result = usb_control_msg(us->pusb_dev, pipe,
  				 US_BULK_GET_MAX_LUN, 
  				 USB_DIR_IN | USB_TYPE_CLASS | 
  				 USB_RECIP_INTERFACE,
! 				 0, us->ifnum, &data, sizeof(data), HZ);
  
  	US_DEBUGP("GetMaxLUN command result is %d, data is %d\n", 
! 		  result, data);
  
  	/* if we have a successful request, return the result */
! 	if (result == 1)
! 		return data;
  
  	/* if we get a STALL, clear the stall */
  	if (result == -EPIPE) {
  		US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
! 		usb_stor_clear_halt(us->pusb_dev, pipe);
  	}
  
  	/* return the default -- no LUNs */
***************
*** 1086,1170 ****
  
  int usb_stor_Bulk_transport(Scsi_Cmnd *srb, struct us_data *us)
  {
! 	struct bulk_cb_wrap *bcb;
! 	struct bulk_cs_wrap *bcs;
  	int result;
  	int pipe;
  	int partial;
- 	int ret = USB_STOR_TRANSPORT_ERROR;
  
! 	bcb = kmalloc(sizeof *bcb, in_interrupt() ? GFP_ATOMIC : GFP_NOIO);
! 	if (!bcb) {
! 		return USB_STOR_TRANSPORT_ERROR;
! 	}
! 	bcs = kmalloc(sizeof *bcs, in_interrupt() ? GFP_ATOMIC : GFP_NOIO);
! 	if (!bcs) {
! 		kfree(bcb);
! 		return USB_STOR_TRANSPORT_ERROR;
! 	}
  
  	/* set up the command wrapper */
! 	bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);
! 	bcb->DataTransferLength = cpu_to_le32(usb_stor_transfer_length(srb));
! 	bcb->Flags = srb->sc_data_direction == SCSI_DATA_READ ? 1 << 7 : 0;
! 	bcb->Tag = srb->serial_number;
! 	bcb->Lun = srb->cmnd[1] >> 5;
  	if (us->flags & US_FL_SCM_MULT_TARG)
! 		bcb->Lun |= srb->target << 4;
! 	bcb->Length = srb->cmd_len;
  
  	/* construct the pipe handle */
  	pipe = usb_sndbulkpipe(us->pusb_dev, us->ep_out);
  
  	/* copy the command payload */
! 	memset(bcb->CDB, 0, sizeof(bcb->CDB));
! 	memcpy(bcb->CDB, srb->cmnd, bcb->Length);
  
  	/* send it to out endpoint */
  	US_DEBUGP("Bulk command S 0x%x T 0x%x Trg %d LUN %d L %d F %d CL %d\n",
! 		  le32_to_cpu(bcb->Signature), bcb->Tag,
! 		  (bcb->Lun >> 4), (bcb->Lun & 0x0F), 
! 		  bcb->DataTransferLength, bcb->Flags, bcb->Length);
! 	result = usb_stor_bulk_msg(us, bcb, pipe, US_BULK_CB_WRAP_LEN, 
  				   &partial);
  	US_DEBUGP("Bulk command transfer result=%d\n", result);
  
  	/* if the command was aborted, indicate that */
! 	if (result == -ENOENT) {
! 		ret = USB_STOR_TRANSPORT_ABORTED;
! 		goto out;
! 	}
  
  	/* if we stall, we need to clear it before we go on */
  	if (result == -EPIPE) {
  		US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
! 		result = usb_stor_clear_halt(us, pipe);
! 
! 		/* if the command was aborted, indicate that */
! 		if (result == -ENOENT) {
! 			ret = USB_STOR_TRANSPORT_ABORTED;
! 			goto out;
! 		}
! 		result = -EPIPE;
  	} else if (result) {
  		/* unknown error -- we've got a problem */
! 		ret = USB_STOR_TRANSPORT_ERROR;
! 		goto out;
  	}
  
  	/* if the command transfered well, then we go to the data stage */
  	if (result == 0) {
  		/* send/receive data payload, if there is any */
! 		if (bcb->DataTransferLength) {
  			usb_stor_transfer(srb, us);
! 			result = srb->result;
! 			US_DEBUGP("Bulk data transfer result 0x%x\n", result);
  
  			/* if it was aborted, we need to indicate that */
! 			if (result == US_BULK_TRANSFER_ABORTED) {
! 				ret = USB_STOR_TRANSPORT_ABORTED;
! 				goto out;
! 			}
  		}
  	}
  
--- 1045,1110 ----
  
  int usb_stor_Bulk_transport(Scsi_Cmnd *srb, struct us_data *us)
  {
! 	struct bulk_cb_wrap bcb;
! 	struct bulk_cs_wrap bcs;
  	int result;
  	int pipe;
  	int partial;
  
! 	/* if the device was removed, then we're already reset */
! 	if (!us->pusb_dev)
! 		return SUCCESS;
  
  	/* set up the command wrapper */
! 	bcb.Signature = cpu_to_le32(US_BULK_CB_SIGN);
! 	bcb.DataTransferLength = cpu_to_le32(usb_stor_transfer_length(srb));
! 	bcb.Flags = srb->sc_data_direction == SCSI_DATA_READ ? 1 << 7 : 0;
! 	bcb.Tag = srb->serial_number;
! 	bcb.Lun = srb->cmnd[1] >> 5;
  	if (us->flags & US_FL_SCM_MULT_TARG)
! 		bcb.Lun |= srb->target << 4;
! 	bcb.Length = srb->cmd_len;
  
  	/* construct the pipe handle */
  	pipe = usb_sndbulkpipe(us->pusb_dev, us->ep_out);
  
  	/* copy the command payload */
! 	memset(bcb.CDB, 0, sizeof(bcb.CDB));
! 	memcpy(bcb.CDB, srb->cmnd, bcb.Length);
  
  	/* send it to out endpoint */
  	US_DEBUGP("Bulk command S 0x%x T 0x%x Trg %d LUN %d L %d F %d CL %d\n",
! 		  le32_to_cpu(bcb.Signature), bcb.Tag,
! 		  (bcb.Lun >> 4), (bcb.Lun & 0x0F), 
! 		  bcb.DataTransferLength, bcb.Flags, bcb.Length);
! 	result = usb_stor_bulk_msg(us, &bcb, pipe, US_BULK_CB_WRAP_LEN, 
  				   &partial);
  	US_DEBUGP("Bulk command transfer result=%d\n", result);
  
  	/* if the command was aborted, indicate that */
! 	if (result == -ENOENT)
! 		return USB_STOR_TRANSPORT_ABORTED;
  
  	/* if we stall, we need to clear it before we go on */
  	if (result == -EPIPE) {
  		US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
! 		usb_stor_clear_halt(us->pusb_dev, pipe);
  	} else if (result) {
  		/* unknown error -- we've got a problem */
! 		return USB_STOR_TRANSPORT_ERROR;
  	}
  
  	/* if the command transfered well, then we go to the data stage */
  	if (result == 0) {
  		/* send/receive data payload, if there is any */
! 		if (bcb.DataTransferLength) {
  			usb_stor_transfer(srb, us);
! 			US_DEBUGP("Bulk data transfer result 0x%x\n", 
! 				  srb->result);
  
  			/* if it was aborted, we need to indicate that */
! 			if (srb->result == USB_STOR_TRANSPORT_ABORTED)
! 				return USB_STOR_TRANSPORT_ABORTED;
  		}
  	}
  
***************
*** 1177,1273 ****
  
  	/* get CSW for device status */
  	US_DEBUGP("Attempting to get CSW...\n");
! 	result = usb_stor_bulk_msg(us, bcs, pipe, US_BULK_CS_WRAP_LEN, 
  				   &partial);
  
  	/* if the command was aborted, indicate that */
! 	if (result == -ENOENT) {
! 		ret = USB_STOR_TRANSPORT_ABORTED;
! 		goto out;
! 	}
  
  	/* did the attempt to read the CSW fail? */
  	if (result == -EPIPE) {
  		US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
! 		result = usb_stor_clear_halt(us, pipe);
! 
! 		/* if the command was aborted, indicate that */
! 		if (result == -ENOENT) {
! 			ret = USB_STOR_TRANSPORT_ABORTED;
! 			goto out;
! 		}
! 
  		/* get the status again */
  		US_DEBUGP("Attempting to get CSW (2nd try)...\n");
! 		result = usb_stor_bulk_msg(us, bcs, pipe,
  					   US_BULK_CS_WRAP_LEN, &partial);
  
  		/* if the command was aborted, indicate that */
! 		if (result == -ENOENT) {
! 			ret = USB_STOR_TRANSPORT_ABORTED;
! 			goto out;
! 		}
  
  		/* if it fails again, we need a reset and return an error*/
  		if (result == -EPIPE) {
  			US_DEBUGP("clearing halt for pipe 0x%x\n", pipe);
! 			result = usb_stor_clear_halt(us, pipe);
! 
! 			/* if the command was aborted, indicate that */
! 			if (result == -ENOENT) {
! 				ret = USB_STOR_TRANSPORT_ABORTED;
! 			} else {
! 				ret = USB_STOR_TRANSPORT_ERROR;
! 			}
! 			goto out;
  		}
  	}
  
  	/* if we still have a failure at this point, we're in trouble */
  	US_DEBUGP("Bulk status result = %d\n", result);
  	if (result) {
! 		ret = USB_STOR_TRANSPORT_ERROR;
! 		goto out;
  	}
  
  	/* check bulk status */
  	US_DEBUGP("Bulk status Sig 0x%x T 0x%x R %d Stat 0x%x\n",
! 		  le32_to_cpu(bcs->Signature), bcs->Tag, 
! 		  bcs->Residue, bcs->Status);
! 	if (bcs->Signature != cpu_to_le32(US_BULK_CS_SIGN) || 
! 	    bcs->Tag != bcb->Tag || 
! 	    bcs->Status > US_BULK_STAT_PHASE || partial != 13) {
  		US_DEBUGP("Bulk logical error\n");
! 		ret = USB_STOR_TRANSPORT_ERROR;
! 		goto out;
  	}
  
  	/* based on the status code, we report good or bad */
! 	switch (bcs->Status) {
  		case US_BULK_STAT_OK:
  			/* command good -- note that data could be short */
! 			ret = USB_STOR_TRANSPORT_GOOD;
! 			goto out;
  
  		case US_BULK_STAT_FAIL:
  			/* command failed */
! 			ret = USB_STOR_TRANSPORT_FAILED;
! 			goto out;
  
  		case US_BULK_STAT_PHASE:
  			/* phase error -- note that a transport reset will be
  			 * invoked by the invoke_transport() function
  			 */
! 			ret = USB_STOR_TRANSPORT_ERROR;
! 			goto out;
  	}
  
  	/* we should never get here, but if we do, we're in trouble */
! 
!  out:
! 	kfree(bcb);
! 	kfree(bcs);
! 	return ret;
  }
  
  /***********************************************************************
--- 1117,1187 ----
  
  	/* get CSW for device status */
  	US_DEBUGP("Attempting to get CSW...\n");
! 	result = usb_stor_bulk_msg(us, &bcs, pipe, US_BULK_CS_WRAP_LEN, 
  				   &partial);
  
  	/* if the command was aborted, indicate that */
! 	if (result == -ENOENT)
! 		return USB_STOR_TRANSPORT_ABORTED;
  
  	/* did the attempt to read the CSW fail? */
  	if (result == -EPIPE) {
  		US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);
! 		usb_stor_clear_halt(us->pusb_dev, pipe);
! 	       
  		/* get the status again */
  		US_DEBUGP("Attempting to get CSW (2nd try)...\n");
! 		result = usb_stor_bulk_msg(us, &bcs, pipe,
  					   US_BULK_CS_WRAP_LEN, &partial);
  
  		/* if the command was aborted, indicate that */
! 		if (result == -ENOENT)
! 			return USB_STOR_TRANSPORT_ABORTED;
  
  		/* if it fails again, we need a reset and return an error*/
  		if (result == -EPIPE) {
  			US_DEBUGP("clearing halt for pipe 0x%x\n", pipe);
! 			usb_stor_clear_halt(us->pusb_dev, pipe);
! 			return USB_STOR_TRANSPORT_ERROR;
  		}
  	}
  
  	/* if we still have a failure at this point, we're in trouble */
  	US_DEBUGP("Bulk status result = %d\n", result);
  	if (result) {
! 		return USB_STOR_TRANSPORT_ERROR;
  	}
  
  	/* check bulk status */
  	US_DEBUGP("Bulk status Sig 0x%x T 0x%x R %d Stat 0x%x\n",
! 		  le32_to_cpu(bcs.Signature), bcs.Tag, 
! 		  bcs.Residue, bcs.Status);
! 	if (bcs.Signature != cpu_to_le32(US_BULK_CS_SIGN) || 
! 	    bcs.Tag != bcb.Tag || 
! 	    bcs.Status > US_BULK_STAT_PHASE || partial != 13) {
  		US_DEBUGP("Bulk logical error\n");
! 		return USB_STOR_TRANSPORT_ERROR;
  	}
  
  	/* based on the status code, we report good or bad */
! 	switch (bcs.Status) {
  		case US_BULK_STAT_OK:
  			/* command good -- note that data could be short */
! 			return USB_STOR_TRANSPORT_GOOD;
  
  		case US_BULK_STAT_FAIL:
  			/* command failed */
! 			return USB_STOR_TRANSPORT_FAILED;
  
  		case US_BULK_STAT_PHASE:
  			/* phase error -- note that a transport reset will be
  			 * invoked by the invoke_transport() function
  			 */
! 			return USB_STOR_TRANSPORT_ERROR;
  	}
  
  	/* we should never get here, but if we do, we're in trouble */
! 	return USB_STOR_TRANSPORT_ERROR;
  }
  
  /***********************************************************************
***************
*** 1306,1315 ****
  	set_current_state(TASK_RUNNING);
  
  	US_DEBUGP("CB_reset: clearing endpoint halt\n");
! 	usb_stor_clear_halt(us,
! 			usb_rcvbulkpipe(us->pusb_dev, us->ep_in));
! 	usb_stor_clear_halt(us,
! 			usb_sndbulkpipe(us->pusb_dev, us->ep_out));
  
  	US_DEBUGP("CB_reset done\n");
  	/* return a result code based on the result of the control message */
--- 1220,1229 ----
  	set_current_state(TASK_RUNNING);
  
  	US_DEBUGP("CB_reset: clearing endpoint halt\n");
! 	usb_stor_clear_halt(us->pusb_dev, 
! 			    usb_rcvbulkpipe(us->pusb_dev, us->ep_in));
! 	usb_stor_clear_halt(us->pusb_dev, 
! 			    usb_rcvbulkpipe(us->pusb_dev, us->ep_out));
  
  	US_DEBUGP("CB_reset done\n");
  	/* return a result code based on the result of the control message */
***************
*** 1345,1355 ****
  	schedule_timeout(HZ*6);
  	set_current_state(TASK_RUNNING);
  
! 	usb_stor_clear_halt(us,
! 			usb_rcvbulkpipe(us->pusb_dev, us->ep_in));
! 	usb_stor_clear_halt(us,
! 			usb_sndbulkpipe(us->pusb_dev, us->ep_out));
  	US_DEBUGP("Bulk soft reset completed\n");
  	return SUCCESS;
  }
- 
--- 1259,1268 ----
  	schedule_timeout(HZ*6);
  	set_current_state(TASK_RUNNING);
  
! 	usb_stor_clear_halt(us->pusb_dev, 
! 			    usb_rcvbulkpipe(us->pusb_dev, us->ep_in));
! 	usb_stor_clear_halt(us->pusb_dev, 
! 			    usb_sndbulkpipe(us->pusb_dev, us->ep_out));
  	US_DEBUGP("Bulk soft reset completed\n");
  	return SUCCESS;
  }
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/transport.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/transport.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/transport.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/transport.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,7 ****
  /* Driver for USB Mass Storage compliant devices
   * Transport Functions Header File
   *
!  * $Id: transport.h,v 1.17 2002/02/25 00:43:41 mdharm Exp $
   *
   * Current development and maintenance by:
   *   (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
--- 1,7 ----
  /* Driver for USB Mass Storage compliant devices
   * Transport Functions Header File
   *
!  * $Id: transport.h,v 1.15 2001/03/17 20:06:23 jrmayfield Exp $
   *
   * Current development and maintenance by:
   *   (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
***************
*** 58,66 ****
  #define US_PR_EUSB_SDDR09	0x81	/* SCM-SCSI bridge for
  						SDDR-09 */
  #endif
- #ifdef CONFIG_USB_STORAGE_SDDR55
- #define US_PR_SDDR55	0x82		/* SDDR-55 (made up) */
- #endif
  #define US_PR_DPCM_USB  0xf0		/* Combination CB/SDDR09 */
  
  #ifdef CONFIG_USB_STORAGE_FREECOM
--- 58,63 ----
***************
*** 115,121 ****
  #define US_BULK_GET_MAX_LUN	0xfe
  
  /*
!  * usb_stor_transfer() return codes
   */
  #define US_BULK_TRANSFER_GOOD		0  /* good transfer                 */
  #define US_BULK_TRANSFER_SHORT		1  /* transfered less than expected */
--- 112,118 ----
  #define US_BULK_GET_MAX_LUN	0xfe
  
  /*
!  * us_bulk_transfer() return codes
   */
  #define US_BULK_TRANSFER_GOOD		0  /* good transfer                 */
  #define US_BULK_TRANSFER_SHORT		1  /* transfered less than expected */
***************
*** 154,159 ****
  		unsigned int*);
  extern int usb_stor_control_msg(struct us_data*, unsigned int, u8, u8,
  		u16, u16, void*, u16);
- extern int usb_stor_clear_halt(struct us_data*, int );
  extern void usb_stor_transfer(Scsi_Cmnd*, struct us_data*);
  #endif
--- 151,156 ----
  		unsigned int*);
  extern int usb_stor_control_msg(struct us_data*, unsigned int, u8, u8,
  		u16, u16, void*, u16);
  extern void usb_stor_transfer(Scsi_Cmnd*, struct us_data*);
+ extern int usb_stor_clear_halt(struct usb_device*, int );
  #endif
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/unusual_devs.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/unusual_devs.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/unusual_devs.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/unusual_devs.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,10 ****
  /* Driver for USB Mass Storage compliant devices
   * Ununsual Devices File
   *
!  * $Id: unusual_devs.h,v 1.32 2002/02/25 02:41:24 mdharm Exp $
   *
   * Current development and maintenance by:
!  *   (c) 2000-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
   *
   * Initial work by:
   *   (c) 2000 Adam J. Richter (adam@yggdrasil.com), Yggdrasil Computing, Inc.
--- 1,10 ----
  /* Driver for USB Mass Storage compliant devices
   * Ununsual Devices File
   *
!  * $Id: unusual_devs.h,v 1.20 2001/09/02 05:12:57 mdharm Exp $
   *
   * Current development and maintenance by:
!  *   (c) 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
   *
   * Initial work by:
   *   (c) 2000 Adam J. Richter (adam@yggdrasil.com), Yggdrasil Computing, Inc.
***************
*** 58,81 ****
  		"HP",
  		"CD-Writer+ 8200e",
  		US_SC_8070, US_PR_SCM_ATAPI, init_8200e, 0), 
- 
- UNUSUAL_DEV(  0x03f0, 0x0307, 0x0001, 0x0001, 
- 		"HP",
- 		"CD-Writer+ CD-4e",
- 		US_SC_8070, US_PR_SCM_ATAPI, init_8200e, 0), 
  #endif
  
- /* Deduced by Jonathan Woithe 
-  * Entry needed for flags: US_FL_FIX_INQUIRY because initial inquiry message
-  * always fails and confuses drive; without US_FL_START_STOP, drive accesses
-  * (read or write) all fail.
-  */
- UNUSUAL_DEV(  0x0411, 0x001c, 0x0113, 0x0113,
- 		"Buffalo",
- 		"DUB-P40G HDD",
- 		US_SC_SCSI, US_PR_BULK, NULL,
- 		US_FL_FIX_INQUIRY | US_FL_START_STOP),
- 
  #ifdef CONFIG_USB_STORAGE_DPCM
  UNUSUAL_DEV(  0x0436, 0x0005, 0x0100, 0x0100,
  		"Microtech",
--- 58,65 ----
***************
*** 102,126 ****
  		"FinePix 1400Zoom",
  		US_SC_8070, US_PR_CBI, NULL, US_FL_FIX_INQUIRY),
  
- /* Reported by Peter WNdchtler 
-  * The device needs the flags only.
-  */
- UNUSUAL_DEV(  0x04ce, 0x0002, 0x0074, 0x0074,
- 		"ScanLogic",
- 		"SL11R-IDE",
- 		US_SC_SCSI, US_PR_BULK, NULL,
- 		US_FL_FIX_INQUIRY),
- 
- /* Reported by Kriston Fincher 
-  * Patch submitted by Sean Millichamp 
-  * This is to support the Panasonic PalmCam PV-SD4090
-  * This entry is needed because the device reports Sub=ff 
-  */
- UNUSUAL_DEV(  0x04da, 0x0901, 0x0100, 0x0200,
-                "Panasonic",
-                "LS-120 Camera",
-                US_SC_UFI, US_PR_CBI, NULL, 0),
- 
  /* Most of the following entries were developed with the help of
   * Shuttle/SCM directly.
   */
--- 86,91 ----
***************
*** 196,219 ****
  		US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init,
  		US_FL_SCM_MULT_TARG ),
  
- /* Iomega Clik! Drive 
-  * Reported by David Chatenay 
-  * The reason this is needed is not fully known.
-  */
- UNUSUAL_DEV(  0x0525, 0xa140, 0x0100, 0x0100,
- 		"Iomega",
- 		"USB Clik! 40",
- 		US_SC_8070, US_PR_BULK, NULL,
- 		US_FL_FIX_INQUIRY | US_FL_START_STOP ),
- 
  /* This entry is needed because the device reports Sub=ff */
! UNUSUAL_DEV(  0x054c, 0x0010, 0x0106, 0x0422, 
  		"Sony",
! 		"DSC-S30/S70/S75/505V/F505/F707", 
  		US_SC_SCSI, US_PR_CB, NULL,
  		US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE ),
  
! /* Reported by wim@geeks.nl */
  UNUSUAL_DEV(  0x054c, 0x0025, 0x0100, 0x0100, 
  		"Sony",
  		"Memorystick NW-MS7",
--- 161,174 ----
  		US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init,
  		US_FL_SCM_MULT_TARG ),
  
  /* This entry is needed because the device reports Sub=ff */
! UNUSUAL_DEV(  0x054c, 0x0010, 0x0106, 0x0322, 
  		"Sony",
! 		"DSC-S30/S70/S75/505V/F505", 
  		US_SC_SCSI, US_PR_CB, NULL,
  		US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE ),
  
! /* Reported by win@geeks.nl */
  UNUSUAL_DEV(  0x054c, 0x0025, 0x0100, 0x0100, 
  		"Sony",
  		"Memorystick NW-MS7",
***************
*** 239,251 ****
  		US_SC_UFI, US_PR_CB, NULL,
  		US_FL_SINGLE_LUN | US_FL_START_STOP ),
  		
- /* Submitted by Nathan Babb  */
- UNUSUAL_DEV(  0x054c, 0x006d, 0x0000, 0x9999,
-                 "Sony",
- 		"PEG Mass Storage",
- 		US_SC_8070, US_PR_CBI, NULL,
- 		US_FL_FIX_INQUIRY ),
- 		
  UNUSUAL_DEV(  0x057b, 0x0000, 0x0000, 0x0299, 
  		"Y-E Data",
  		"Flashbuster-U",
--- 194,199 ----
***************
*** 300,338 ****
  		"Lexar",
  		"Jumpshot USB CF Reader",
  		US_SC_SCSI, US_PR_JUMPSHOT, NULL,
! 		US_FL_MODE_XLATE ),
  #endif
  
- /* Reported by Blake Matheny  */
- UNUSUAL_DEV(  0x05dc, 0xb002, 0x0000, 0x0113,
- 		"Lexar",
- 		"USB CF Reader",
- 		US_SC_SCSI, US_PR_BULK, NULL,
- 		US_FL_FIX_INQUIRY ),
- 
- /* Reported by Carlos Villegas 
-  * This device needs an INQUIRY of exactly 36-bytes to function.
-  * That is the only reason this entry is needed.
-  */
- UNUSUAL_DEV(  0x05e3, 0x0700, 0x0000, 0xffff,
- 		"SIIG",
- 		"CompactFlash Card Reader",
- 		US_SC_SCSI, US_PR_BULK, NULL,
- 		US_FL_FIX_INQUIRY ),
- 
- /* Reported by Peter Marks 
-  * Like the SIIG unit above, this unit needs an INQUIRY to ask for exactly
-  * 36 bytes of data.  No more, no less. That is the only reason this entry
-  * is needed.
-  *
-  * ST818 slim drives (rev 0.02) don't need special care.
- */
- UNUSUAL_DEV(  0x05e3, 0x0702, 0x0000, 0x0001,
- 		"EagleTec",
- 		"External Hard Disk",
- 		US_SC_SCSI, US_PR_BULK, NULL,
- 		US_FL_FIX_INQUIRY ),
- 
  UNUSUAL_DEV(  0x0644, 0x0000, 0x0100, 0x0100, 
  		"TEAC",
  		"Floppy Drive",
--- 248,256 ----
  		"Lexar",
  		"Jumpshot USB CF Reader",
  		US_SC_SCSI, US_PR_JUMPSHOT, NULL,
! 		US_FL_MODE_XLATE | US_FL_START_STOP ),
  #endif
  
  UNUSUAL_DEV(  0x0644, 0x0000, 0x0100, 0x0100, 
  		"TEAC",
  		"Floppy Drive",
***************
*** 346,373 ****
  		US_FL_SINGLE_LUN | US_FL_START_STOP ),
  #endif
  
- /* Submitted by kedar@centillium
-  * Needed for START_STOP flag, but that is unconfirmed */
- UNUSUAL_DEV( 0x0686, 0x4006, 0x0001, 0x0001,
-                 "Minolta",
-                 "Dimage S304",
-                 US_SC_SCSI, US_PR_BULK, NULL,
-                 US_FL_START_STOP ),
- 
- /* Submitted by f.brugmans@hccnet.nl
-  * Needed for START_STOP flag */
- UNUSUAL_DEV( 0x0686, 0x4007, 0x0001, 0x0001,
-                 "Minolta",
-                 "Dimage S304",
-                 US_SC_SCSI, US_PR_BULK, NULL,
-                 US_FL_START_STOP ),
- 
- UNUSUAL_DEV( 0x0686, 0x400b, 0x0001, 0x0001, 
- 		"Minolta", 
- 		"Dimage 7i", 
- 		US_SC_SCSI, US_PR_BULK, NULL, 
- 		US_FL_START_STOP ),
- 
  UNUSUAL_DEV(  0x0693, 0x0002, 0x0100, 0x0100, 
  		"Hagiwara",
  		"FlashGate SmartMedia",
--- 264,269 ----
***************
*** 411,417 ****
                  US_SC_QIC, US_PR_FREECOM, freecom_init, 0),
  #endif
  
! UNUSUAL_DEV(  0x07af, 0x0004, 0x0100, 0x0133, 
  		"Microtech",
  		"USB-SCSI-DB25",
  		US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init,
--- 307,313 ----
                  US_SC_QIC, US_PR_FREECOM, freecom_init, 0),
  #endif
  
! UNUSUAL_DEV(  0x07af, 0x0004, 0x0100, 0x0100, 
  		"Microtech",
  		"USB-SCSI-DB25",
  		US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init,
***************
*** 436,442 ****
  		"Datafab",
  		"MDCFE-B USB CF Reader",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE ),
  
  	/*
  	 * The following Datafab-based devices may or may not work
--- 332,338 ----
  		"Datafab",
  		"MDCFE-B USB CF Reader",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE | US_FL_START_STOP ),
  
  	/*
  	 * The following Datafab-based devices may or may not work
***************
*** 453,500 ****
  		"SIIG/Datafab",
  		"SIIG/Datafab Memory Stick+CF Reader/Writer",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE ),
  
  UNUSUAL_DEV( 0x07c4, 0xa003, 0x0000, 0xffff,
  		"Datafab/Unknown",
  		"Datafab-based Reader",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE ),
  
  UNUSUAL_DEV( 0x07c4, 0xa004, 0x0000, 0xffff,
  		"Datafab/Unknown",
  		"Datafab-based Reader",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE ),
  
  UNUSUAL_DEV( 0x07c4, 0xa005, 0x0000, 0xffff,
  		"PNY/Datafab",
  		"PNY/Datafab CF+SM Reader",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE ),
  
  UNUSUAL_DEV( 0x07c4, 0xa006, 0x0000, 0xffff,
  		"Simple Tech/Datafab",
  		"Simple Tech/Datafab CF+SM Reader",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE ),
! 
! /* Submitted by Olaf Hering  */
! UNUSUAL_DEV(  0x07c4, 0xa109, 0x0000, 0xffff,
! 		"Datafab Systems, Inc.",
! 		"USB to CF + SM Combo (LC1)",
! 		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE ),
  #endif
  
! /* Casio QV 2x00/3x00/4000/8000 digital still cameras are not conformant
   * to the USB storage specification in two ways:
   * - They tell us they are using transport protocol CBI. In reality they
   *   are using transport protocol CB.
   * - They don't like the INQUIRY command. So we must handle this command
   *   of the SCSI layer ourselves.
   */
! UNUSUAL_DEV( 0x07cf, 0x1001, 0x1000, 0x9009,
                  "Casio",
                  "QV DigitalCamera",
                  US_SC_8070, US_PR_CB, NULL,
--- 349,389 ----
  		"SIIG/Datafab",
  		"SIIG/Datafab Memory Stick+CF Reader/Writer",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE | US_FL_START_STOP ),
  
  UNUSUAL_DEV( 0x07c4, 0xa003, 0x0000, 0xffff,
  		"Datafab/Unknown",
  		"Datafab-based Reader",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE | US_FL_START_STOP ),
  
  UNUSUAL_DEV( 0x07c4, 0xa004, 0x0000, 0xffff,
  		"Datafab/Unknown",
  		"Datafab-based Reader",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE | US_FL_START_STOP ),
  
  UNUSUAL_DEV( 0x07c4, 0xa005, 0x0000, 0xffff,
  		"PNY/Datafab",
  		"PNY/Datafab CF+SM Reader",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE | US_FL_START_STOP ),
  
  UNUSUAL_DEV( 0x07c4, 0xa006, 0x0000, 0xffff,
  		"Simple Tech/Datafab",
  		"Simple Tech/Datafab CF+SM Reader",
  		US_SC_SCSI, US_PR_DATAFAB, NULL,
! 		US_FL_MODE_XLATE | US_FL_START_STOP ),
  #endif
  
! /* Casio QV 2x00/3x00/8000 digital still cameras are not conformant
   * to the USB storage specification in two ways:
   * - They tell us they are using transport protocol CBI. In reality they
   *   are using transport protocol CB.
   * - They don't like the INQUIRY command. So we must handle this command
   *   of the SCSI layer ourselves.
   */
! UNUSUAL_DEV( 0x07cf, 0x1001, 0x9009, 0x9009,
                  "Casio",
                  "QV DigitalCamera",
                  US_SC_8070, US_PR_CB, NULL,
***************
*** 513,547 ****
                  US_SC_ISD200, US_PR_BULK, isd200_Initialization,
                  0 ),
  #endif
- 
- /* Submitted by Brian Hall 
-  * Needed for START_STOP flag */
- UNUSUAL_DEV(  0x0c76, 0x0003, 0x0100, 0x0100,
- 		"JMTek",
- 		"USBDrive",
- 		US_SC_SCSI, US_PR_BULK, NULL,
- 		US_FL_START_STOP ),
- UNUSUAL_DEV(  0x0c76, 0x0005, 0x0100, 0x0100,
- 		"JMTek",
- 		"USBDrive",
- 		US_SC_SCSI, US_PR_BULK, NULL,
- 		US_FL_START_STOP ),
- 
- /* Reported by Dan Pilone 
-  * The device needs the flags only.
-  * Also reported by Brian Hall , again for flags.
-  * I also suspect this device may have a broken serial number.
-  */
- UNUSUAL_DEV(  0x1065, 0x2136, 0x0000, 0x9999,
- 		"CCYU TECHNOLOGY",
- 		"EasyDisk Portable Device",
- 		US_SC_SCSI, US_PR_BULK, NULL,
- 		US_FL_MODE_XLATE | US_FL_START_STOP),
- 
- #ifdef CONFIG_USB_STORAGE_SDDR55
- UNUSUAL_DEV(  0x55aa, 0xa103, 0x0000, 0x9999, 
- 		"Sandisk",
- 		"ImageMate SDDR55",
- 		US_SC_SCSI, US_PR_SDDR55, NULL,
- 		US_FL_SINGLE_LUN),
- #endif
--- 402,404 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/usb.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/usb.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/usb.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/usb.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,9 ****
  /* Driver for USB Mass Storage compliant devices
   *
!  * $Id: usb.c,v 1.73 2002/01/27 09:02:15 mdharm Exp $
   *
   * Current development and maintenance by:
!  *   (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
   *
   * Developed with the assistance of:
   *   (c) 2000 David L. Brown, Jr. (usb-storage@davidb.org)
--- 1,9 ----
  /* Driver for USB Mass Storage compliant devices
   *
!  * $Id: usb.c,v 1.69 2001/11/11 03:33:03 mdharm Exp $
   *
   * Current development and maintenance by:
!  *   (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net)
   *
   * Developed with the assistance of:
   *   (c) 2000 David L. Brown, Jr. (usb-storage@davidb.org)
***************
*** 60,68 ****
  #ifdef CONFIG_USB_STORAGE_SDDR09
  #include "sddr09.h"
  #endif
- #ifdef CONFIG_USB_STORAGE_SDDR55
- #include "sddr55.h"
- #endif
  #ifdef CONFIG_USB_STORAGE_DPCM
  #include "dpcm.h"
  #endif
--- 60,65 ----
***************
*** 321,334 ****
  	current->files = init_task.files;
  	atomic_inc(¤t->files->count);
  	daemonize();
- 	reparent_to_init();
- 
- 	/* avoid getting signals */
- 	spin_lock_irq(¤t->sigmask_lock);
- 	flush_signals(current);
- 	sigfillset(¤t->blocked);
- 	recalc_sigpending(current);
- 	spin_unlock_irq(¤t->sigmask_lock);
  
  	/* set our name for identification purposes */
  	sprintf(current->comm, "usb-storage-%d", us->host_number);
--- 318,323 ----
***************
*** 867,881 ****
  			break;
  #endif
  
- #ifdef CONFIG_USB_STORAGE_SDDR55
- 		case US_PR_SDDR55:
- 			ss->transport_name = "SDDR55";
- 			ss->transport = sddr55_transport;
- 			ss->transport_reset = sddr55_reset;
- 			ss->max_lun = 0;
- 			break;
- #endif
- 
  #ifdef CONFIG_USB_STORAGE_DPCM
  		case US_PR_DPCM_USB:
  			ss->transport_name = "Control/Bulk-EUSB/SDDR09";
--- 856,861 ----
***************
*** 971,977 ****
  			ss->protocol_name = "Unknown";
  			kfree(ss->current_urb);
  			kfree(ss);
- 			usb_dec_dev_use(dev);
  			return NULL;
  			break;
  		}
--- 951,956 ----
***************
*** 979,986 ****
  
  		/* allocate an IRQ callback if one is needed */
  		if ((ss->protocol == US_PR_CBI) && usb_stor_allocate_irq(ss)) {
- 			kfree(ss->current_urb);
- 			kfree(ss);
  			usb_dec_dev_use(dev);
  			return NULL;
  		}
--- 958,963 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/usb.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/usb.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/storage/usb.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/storage/usb.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 166,172 ****
  	/* control and bulk communications data */
  	struct semaphore	current_urb_sem; /* to protect irq_urb	 */
  	struct urb		*current_urb;	 /* non-int USB requests */
- 	struct completion	current_done;	 /* the done flag        */
  
  	/* the semaphore for sleeping the control thread */
  	struct semaphore	sema;		 /* to sleep thread on   */
--- 166,171 ----
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: stv680.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: stv680.h
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: tiglusb.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: tiglusb.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/uhci.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/uhci.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/uhci.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/uhci.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 4,10 ****
   * Maintainer: Johannes Erdfelt 
   *
   * (C) Copyright 1999 Linus Torvalds
!  * (C) Copyright 1999-2002 Johannes Erdfelt, johannes@erdfelt.com
   * (C) Copyright 1999 Randy Dunlap
   * (C) Copyright 1999 Georg Acher, acher@in.tum.de
   * (C) Copyright 1999 Deti Fliegl, deti@fliegl.de
--- 4,10 ----
   * Maintainer: Johannes Erdfelt 
   *
   * (C) Copyright 1999 Linus Torvalds
!  * (C) Copyright 1999-2001 Johannes Erdfelt, johannes@erdfelt.com
   * (C) Copyright 1999 Randy Dunlap
   * (C) Copyright 1999 Georg Acher, acher@in.tum.de
   * (C) Copyright 1999 Deti Fliegl, deti@fliegl.de
***************
*** 57,63 ****
  
  #include 
  
- #include "hcd.h"
  
  /*
   * Version Information
--- 57,62 ----
***************
*** 66,71 ****
--- 65,71 ----
  #define DRIVER_AUTHOR "Linus 'Frodo Rabbit' Torvalds, Johannes Erdfelt, Randy Dunlap, Georg Acher, Deti Fliegl, Thomas Sailer, Roman Weissgaerber"
  #define DRIVER_DESC "USB Universal Host Controller Interface driver"
  
+ 
  /*
   * debug = 0, no debugging messages
   * debug = 1, dump failed URB's except for stalls
***************
*** 100,111 ****
  
  /* If a transfer is still active after this much time, turn off FSBR */
  #define IDLE_TIMEOUT	(HZ / 20)	/* 50 ms */
- #define FSBR_DELAY	(HZ / 20)	/* 50 ms */
- 
- /* When we timeout an idle transfer for FSBR, we'll switch it over to */
- /* depth first traversal. We'll do it in groups of this number of TD's */
- /* to make sure it doesn't hog all of the bandwidth */
- #define DEPTH_INTERVAL	5
  
  #define MAX_URB_LOOP	2048		/* Maximum number of linked URB's */
  
--- 100,105 ----
***************
*** 122,141 ****
  	return 0;
  }
  
- /*
-  * Technically, updating td->status here is a race, but it's not really a
-  * problem. The worst that can happen is that we set the IOC bit again
-  * generating a spurios interrupt. We could fix this by creating another
-  * QH and leaving the IOC bit always set, but then we would have to play
-  * games with the FSBR code to make sure we get the correct order in all
-  * the cases. I don't think it's worth the effort
-  */
  static inline void uhci_set_next_interrupt(struct uhci *uhci)
  {
  	unsigned long flags;
  
  	spin_lock_irqsave(&uhci->frame_list_lock, flags);
! 	uhci->skel_term_td->status |= TD_CTRL_IOC;
  	spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
  }
  
--- 116,127 ----
  	return 0;
  }
  
  static inline void uhci_set_next_interrupt(struct uhci *uhci)
  {
  	unsigned long flags;
  
  	spin_lock_irqsave(&uhci->frame_list_lock, flags);
! 	set_bit(TD_CTRL_IOC_BIT, &uhci->skel_term_td->status);
  	spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
  }
  
***************
*** 144,150 ****
  	unsigned long flags;
  
  	spin_lock_irqsave(&uhci->frame_list_lock, flags);
! 	uhci->skel_term_td->status &= ~TD_CTRL_IOC;
  	spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
  }
  
--- 130,136 ----
  	unsigned long flags;
  
  	spin_lock_irqsave(&uhci->frame_list_lock, flags);
! 	clear_bit(TD_CTRL_IOC_BIT, &uhci->skel_term_td->status);
  	spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
  }
  
***************
*** 254,263 ****
  	unsigned long flags;
  
  	/* If it's not inserted, don't remove it */
- 	spin_lock_irqsave(&uhci->frame_list_lock, flags);
  	if (td->frame == -1 && list_empty(&td->fl_list))
! 		goto out;
  
  	if (td->frame != -1 && uhci->fl->frame_cpu[td->frame] == td) {
  		if (list_empty(&td->fl_list)) {
  			uhci->fl->frame[td->frame] = td->link;
--- 240,249 ----
  	unsigned long flags;
  
  	/* If it's not inserted, don't remove it */
  	if (td->frame == -1 && list_empty(&td->fl_list))
! 		return;
  
+ 	spin_lock_irqsave(&uhci->frame_list_lock, flags);
  	if (td->frame != -1 && uhci->fl->frame_cpu[td->frame] == td) {
  		if (list_empty(&td->fl_list)) {
  			uhci->fl->frame[td->frame] = td->link;
***************
*** 282,288 ****
  	list_del_init(&td->fl_list);
  	td->frame = -1;
  
- out:
  	spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
  }
  
--- 268,273 ----
***************
*** 351,357 ****
  	qh->link = UHCI_PTR_TERM;
  
  	qh->dev = dev;
- 	qh->urbp = NULL;
  
  	INIT_LIST_HEAD(&qh->list);
  	INIT_LIST_HEAD(&qh->remove_list);
--- 336,341 ----
***************
*** 374,382 ****
  	pci_pool_free(uhci->qh_pool, qh, qh->dma_handle);
  }
  
- /*
-  * MUST be called with uhci->frame_list_lock acquired
-  */
  static void _uhci_insert_qh(struct uhci *uhci, struct uhci_qh *skelqh, struct urb *urb)
  {
  	struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
--- 358,363 ----
***************
*** 426,444 ****
  	spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
  }
  
! static void uhci_remove_qh(struct uhci *uhci, struct uhci_qh *qh)
  {
  	unsigned long flags;
! 	struct uhci_qh *pqh;
  
  	if (!qh)
  		return;
  
- 	qh->urbp = NULL;
- 
  	/* Only go through the hoops if it's actually linked in */
- 	spin_lock_irqsave(&uhci->frame_list_lock, flags);
  	if (!list_empty(&qh->list)) {
  		pqh = list_entry(qh->list.prev, struct uhci_qh, list);
  
  		if (pqh->urbp) {
--- 407,427 ----
  	spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
  }
  
! static void uhci_remove_qh(struct uhci *uhci, struct urb *urb)
  {
+ 	struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
  	unsigned long flags;
! 	struct uhci_qh *qh = urbp->qh, *pqh;
  
  	if (!qh)
  		return;
  
  	/* Only go through the hoops if it's actually linked in */
  	if (!list_empty(&qh->list)) {
+ 		qh->urbp = NULL;
+ 
+ 		spin_lock_irqsave(&uhci->frame_list_lock, flags);
+ 
  		pqh = list_entry(qh->list.prev, struct uhci_qh, list);
  
  		if (pqh->urbp) {
***************
*** 461,468 ****
  		qh->element = qh->link = UHCI_PTR_TERM;
  
  		list_del_init(&qh->list);
  	}
- 	spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
  
  	spin_lock_irqsave(&uhci->qh_remove_list_lock, flags);
  
--- 444,452 ----
  		qh->element = qh->link = UHCI_PTR_TERM;
  
  		list_del_init(&qh->list);
+ 
+ 		spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
  	}
  
  	spin_lock_irqsave(&uhci->qh_remove_list_lock, flags);
  
***************
*** 489,497 ****
  		tmp = tmp->next;
  
  		if (toggle)
! 			td->info |= TD_TOKEN_TOGGLE;
  		else
! 			td->info &= ~TD_TOKEN_TOGGLE;
  
  		toggle ^= 1;
  	}
--- 473,481 ----
  		tmp = tmp->next;
  
  		if (toggle)
! 			set_bit(TD_TOKEN_TOGGLE, &td->info);
  		else
! 			clear_bit(TD_TOKEN_TOGGLE, &td->info);
  
  		toggle ^= 1;
  	}
***************
*** 536,543 ****
  
  	lltd = list_entry(lurbp->td_list.prev, struct uhci_td, list);
  
! 	usb_settoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe),
! 		uhci_fixup_toggle(urb, uhci_toggle(lltd->info) ^ 1));
  
  	/* All qh's in the queue need to link to the next queue */
  	urbp->qh->link = eurbp->qh->link;
--- 520,526 ----
  
  	lltd = list_entry(lurbp->td_list.prev, struct uhci_td, list);
  
! 	uhci_fixup_toggle(urb, uhci_toggle(lltd->info) ^ 1);
  
  	/* All qh's in the queue need to link to the next queue */
  	urbp->qh->link = eurbp->qh->link;
***************
*** 573,579 ****
  
  	/* Fix up the toggle for the next URB's */
  	if (!urbp->queued)
- 		/* We set the toggle when we unlink */
  		toggle = usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe));
  	else {
  		/* If we're in the middle of the queue, grab the toggle */
--- 556,561 ----
***************
*** 633,639 ****
  {
  	struct urb_priv *urbp;
  
! 	urbp = kmem_cache_alloc(uhci_up_cachep, SLAB_ATOMIC);
  	if (!urbp) {
  		err("uhci_alloc_urb_priv: couldn't allocate memory for urb_priv\n");
  		return NULL;
--- 615,621 ----
  {
  	struct urb_priv *urbp;
  
! 	urbp = kmem_cache_alloc(uhci_up_cachep, in_interrupt() ? SLAB_ATOMIC : SLAB_KERNEL);
  	if (!urbp) {
  		err("uhci_alloc_urb_priv: couldn't allocate memory for urb_priv\n");
  		return NULL;
***************
*** 664,670 ****
  
  		if (usb_pipetype(urb->pipe) == PIPE_CONTROL && urb->setup_packet) {
  			urbp->setup_packet_dma_handle = pci_map_single(uhci->dev,
! 				urb->setup_packet, sizeof(struct usb_ctrlrequest),
  				PCI_DMA_TODEVICE);
  			if (!urbp->setup_packet_dma_handle)
  				return NULL;
--- 646,652 ----
  
  		if (usb_pipetype(urb->pipe) == PIPE_CONTROL && urb->setup_packet) {
  			urbp->setup_packet_dma_handle = pci_map_single(uhci->dev,
! 				urb->setup_packet, sizeof(devrequest),
  				PCI_DMA_TODEVICE);
  			if (!urbp->setup_packet_dma_handle)
  				return NULL;
***************
*** 674,682 ****
  	return urbp;
  }
  
- /*
-  * MUST be called with urb->lock acquired
-  */
  static void uhci_add_td_to_urb(struct urb *urb, struct uhci_td *td)
  {
  	struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
--- 656,661 ----
***************
*** 686,694 ****
  	list_add_tail(&td->list, &urbp->td_list);
  }
  
- /*
-  * MUST be called with urb->lock acquired
-  */
  static void uhci_remove_td_from_urb(struct uhci_td *td)
  {
  	if (list_empty(&td->list))
--- 665,670 ----
***************
*** 699,720 ****
  	td->urb = NULL;
  }
  
- /*
-  * MUST be called with urb->lock acquired
-  */
  static void uhci_destroy_urb_priv(struct urb *urb)
  {
  	struct list_head *head, *tmp;
  	struct urb_priv *urbp;
  	struct uhci *uhci;
  
  	urbp = (struct urb_priv *)urb->hcpriv;
  	if (!urbp)
! 		return;
  
  	if (!urbp->dev || !urbp->dev->bus || !urbp->dev->bus->hcpriv) {
  		warn("uhci_destroy_urb_priv: urb %p belongs to disconnected device or bus?", urb);
! 		return;
  	}
  
  	if (!list_empty(&urb->urb_list))
--- 675,696 ----
  	td->urb = NULL;
  }
  
  static void uhci_destroy_urb_priv(struct urb *urb)
  {
  	struct list_head *head, *tmp;
  	struct urb_priv *urbp;
  	struct uhci *uhci;
+ 	unsigned long flags;
+ 
+ 	spin_lock_irqsave(&urb->lock, flags);
  
  	urbp = (struct urb_priv *)urb->hcpriv;
  	if (!urbp)
! 		goto out;
  
  	if (!urbp->dev || !urbp->dev->bus || !urbp->dev->bus->hcpriv) {
  		warn("uhci_destroy_urb_priv: urb %p belongs to disconnected device or bus?", urb);
! 		goto out;
  	}
  
  	if (!list_empty(&urb->urb_list))
***************
*** 737,757 ****
  		uhci_free_td(uhci, td);
  	}
  
! 	if (urbp->setup_packet_dma_handle) {
  		pci_unmap_single(uhci->dev, urbp->setup_packet_dma_handle,
! 			sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
! 		urbp->setup_packet_dma_handle = 0;
! 	}
  
! 	if (urbp->transfer_buffer_dma_handle) {
  		pci_unmap_single(uhci->dev, urbp->transfer_buffer_dma_handle,
  			urb->transfer_buffer_length, usb_pipein(urb->pipe) ?
  			PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE);
- 		urbp->transfer_buffer_dma_handle = 0;
- 	}
  
  	urb->hcpriv = NULL;
  	kmem_cache_free(uhci_up_cachep, urbp);
  }
  
  static void uhci_inc_fsbr(struct uhci *uhci, struct urb *urb)
--- 713,732 ----
  		uhci_free_td(uhci, td);
  	}
  
! 	if (urbp->setup_packet_dma_handle)
  		pci_unmap_single(uhci->dev, urbp->setup_packet_dma_handle,
! 			sizeof(devrequest), PCI_DMA_TODEVICE);
  
! 	if (urbp->transfer_buffer_dma_handle)
  		pci_unmap_single(uhci->dev, urbp->transfer_buffer_dma_handle,
  			urb->transfer_buffer_length, usb_pipein(urb->pipe) ?
  			PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE);
  
  	urb->hcpriv = NULL;
  	kmem_cache_free(uhci_up_cachep, urbp);
+ 
+ out:
+ 	spin_unlock_irqrestore(&urb->lock, flags);
  }
  
  static void uhci_inc_fsbr(struct uhci *uhci, struct urb *urb)
***************
*** 763,769 ****
  
  	if ((!(urb->transfer_flags & USB_NO_FSBR)) && !urbp->fsbr) {
  		urbp->fsbr = 1;
! 		if (!uhci->fsbr++ && !uhci->fsbrtimeout)
  			uhci->skel_term_qh->link = uhci->skel_hs_control_qh->dma_handle | UHCI_PTR_QH;
  	}
  
--- 738,744 ----
  
  	if ((!(urb->transfer_flags & USB_NO_FSBR)) && !urbp->fsbr) {
  		urbp->fsbr = 1;
! 		if (!uhci->fsbr++)
  			uhci->skel_term_qh->link = uhci->skel_hs_control_qh->dma_handle | UHCI_PTR_QH;
  	}
  
***************
*** 780,786 ****
  	if ((!(urb->transfer_flags & USB_NO_FSBR)) && urbp->fsbr) {
  		urbp->fsbr = 0;
  		if (!--uhci->fsbr)
! 			uhci->fsbrtimeout = jiffies + FSBR_DELAY;
  	}
  
  	spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
--- 755,761 ----
  	if ((!(urb->transfer_flags & USB_NO_FSBR)) && urbp->fsbr) {
  		urbp->fsbr = 0;
  		if (!--uhci->fsbr)
! 			uhci->skel_term_qh->link = UHCI_PTR_TERM;
  	}
  
  	spin_unlock_irqrestore(&uhci->frame_list_lock, flags);
***************
*** 872,878 ****
  			return -ENOMEM;
  
  		/* Alternate Data0/1 (start with Data1) */
! 		destination ^= TD_TOKEN_TOGGLE;
  	
  		uhci_add_td_to_urb(urb, td);
  		uhci_fill_td(td, status, destination | ((pktsze - 1) << 21),
--- 847,853 ----
  			return -ENOMEM;
  
  		/* Alternate Data0/1 (start with Data1) */
! 		destination ^= 1 << TD_TOKEN_TOGGLE;
  	
  		uhci_add_td_to_urb(urb, td);
  		uhci_fill_td(td, status, destination | ((pktsze - 1) << 21),
***************
*** 893,905 ****
  	 * It's IN if the pipe is an output pipe or we're not expecting
  	 * data back.
  	 */
! 	destination &= ~TD_TOKEN_PID_MASK;
  	if (usb_pipeout(urb->pipe) || !urb->transfer_buffer_length)
  		destination |= USB_PID_IN;
  	else
  		destination |= USB_PID_OUT;
  
! 	destination |= TD_TOKEN_TOGGLE;		/* End in Data1 */
  
  	status &= ~TD_CTRL_SPD;
  
--- 868,880 ----
  	 * It's IN if the pipe is an output pipe or we're not expecting
  	 * data back.
  	 */
! 	destination &= ~TD_PID;
  	if (usb_pipeout(urb->pipe) || !urb->transfer_buffer_length)
  		destination |= USB_PID_IN;
  	else
  		destination |= USB_PID_OUT;
  
! 	destination |= 1 << TD_TOKEN_TOGGLE;		/* End in Data1 */
  
  	status &= ~TD_CTRL_SPD;
  
***************
*** 968,973 ****
--- 943,956 ----
  
  		tmp = tmp->next;
  
+ 		if (urbp->fsbr_timeout && (td->status & TD_CTRL_IOC) &&
+ 		    !(td->status & TD_CTRL_ACTIVE)) {
+ 			uhci_inc_fsbr(urb->dev->bus->hcpriv, urb);
+ 			urbp->fsbr_timeout = 0;
+ 			urbp->fsbrtime = jiffies;
+ 			clear_bit(TD_CTRL_IOC_BIT, &td->status);
+ 		}
+ 
  		status = uhci_status_bits(td->status);
  		if (status & TD_CTRL_ACTIVE)
  			return -EINPROGRESS;
***************
*** 1047,1053 ****
  	urbp->short_control_packet = 1;
  
  	/* Create a new QH to avoid pointer overwriting problems */
! 	uhci_remove_qh(uhci, urbp->qh);
  
  	/* Delete all of the TD's except for the status TD at the end */
  	head = &urbp->td_list;
--- 1030,1036 ----
  	urbp->short_control_packet = 1;
  
  	/* Create a new QH to avoid pointer overwriting problems */
! 	uhci_remove_qh(uhci, urb);
  
  	/* Delete all of the TD's except for the status TD at the end */
  	head = &urbp->td_list;
***************
*** 1104,1110 ****
  	if (!td)
  		return -ENOMEM;
  
! 	destination |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT);
  	destination |= ((urb->transfer_buffer_length - 1) << 21);
  
  	usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe));
--- 1087,1093 ----
  	if (!td)
  		return -ENOMEM;
  
! 	destination |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE);
  	destination |= ((urb->transfer_buffer_length - 1) << 21);
  
  	usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe));
***************
*** 1134,1139 ****
--- 1117,1130 ----
  
  		tmp = tmp->next;
  
+ 		if (urbp->fsbr_timeout && (td->status & TD_CTRL_IOC) &&
+ 		    !(td->status & TD_CTRL_ACTIVE)) {
+ 			uhci_inc_fsbr(urb->dev->bus->hcpriv, urb);
+ 			urbp->fsbr_timeout = 0;
+ 			urbp->fsbrtime = jiffies;
+ 			clear_bit(TD_CTRL_IOC_BIT, &td->status);
+ 		}
+ 
  		status = uhci_status_bits(td->status);
  		if (status & TD_CTRL_ACTIVE)
  			return -EINPROGRESS;
***************
*** 1197,1204 ****
  	td = list_entry(urbp->td_list.next, struct uhci_td, list);
  
  	td->status = (td->status & 0x2F000000) | TD_CTRL_ACTIVE | TD_CTRL_IOC;
! 	td->info &= ~TD_TOKEN_TOGGLE;
! 	td->info |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT);
  	usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe));
  
  out:
--- 1188,1195 ----
  	td = list_entry(urbp->td_list.next, struct uhci_td, list);
  
  	td->status = (td->status & 0x2F000000) | TD_CTRL_ACTIVE | TD_CTRL_IOC;
! 	td->info &= ~(1 << TD_TOKEN_TOGGLE);
! 	td->info |= (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE);
  	usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe), usb_pipeout(urb->pipe));
  
  out:
***************
*** 1254,1288 ****
  		uhci_fill_td(td, status, destination |
  			(((pktsze - 1) & UHCI_NULL_DATA_SIZE) << 21) |
  			(usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe),
! 			 usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT),
  			data);
  
  		data += pktsze;
! 		len -= maxsze;
  
  		usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe),
  			usb_pipeout(urb->pipe));
  	} while (len > 0);
  
- 	/*
- 	 * USB_ZERO_PACKET means adding a 0-length packet, if
- 	 * direction is OUT and the transfer_length was an
- 	 * exact multiple of maxsze, hence
- 	 * (len = transfer_length - N * maxsze) == 0
- 	 * however, if transfer_length == 0, the zero packet
- 	 * was already prepared above.
- 	 */
  	if (usb_pipeout(urb->pipe) && (urb->transfer_flags & USB_ZERO_PACKET) &&
! 	   !len && urb->transfer_buffer_length) {
  		td = uhci_alloc_td(uhci, urb->dev);
  		if (!td)
  			return -ENOMEM;
  
  		uhci_add_td_to_urb(urb, td);
! 		uhci_fill_td(td, status, destination |
! 			(UHCI_NULL_DATA_SIZE << 21) |
  			(usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe),
! 			 usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT),
  			data);
  
  		usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe),
--- 1245,1270 ----
  		uhci_fill_td(td, status, destination |
  			(((pktsze - 1) & UHCI_NULL_DATA_SIZE) << 21) |
  			(usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe),
! 			 usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE),
  			data);
  
  		data += pktsze;
! 		len -= pktsze;
  
  		usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe),
  			usb_pipeout(urb->pipe));
  	} while (len > 0);
  
  	if (usb_pipeout(urb->pipe) && (urb->transfer_flags & USB_ZERO_PACKET) &&
! 	   urb->transfer_buffer_length) {
  		td = uhci_alloc_td(uhci, urb->dev);
  		if (!td)
  			return -ENOMEM;
  
  		uhci_add_td_to_urb(urb, td);
! 		uhci_fill_td(td, status, destination | UHCI_NULL_DATA_SIZE |
  			(usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe),
! 			 usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE),
  			data);
  
  		usb_dotoggle(urb->dev, usb_pipeendpoint(urb->pipe),
***************
*** 1324,1330 ****
--- 1306,1314 ----
  	struct uhci *uhci = (struct uhci *)urb->dev->bus->hcpriv;
  	struct list_head *tmp, *head;
  	int ret = 0;
+ 	unsigned long flags;
  
+ 	spin_lock_irqsave(&uhci->urb_list_lock, flags);
  	head = &uhci->urb_list;
  	tmp = head->next;
  	while (tmp != head) {
***************
*** 1347,1352 ****
--- 1331,1338 ----
  	} else
  		ret = -1;	/* no previous urb found */
  
+ 	spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
+ 
  	return ret;
  }
  
***************
*** 1454,1483 ****
  	return ret;
  }
  
- /*
-  * MUST be called with uhci->urb_list_lock acquired
-  */
  static struct urb *uhci_find_urb_ep(struct uhci *uhci, struct urb *urb)
  {
  	struct list_head *tmp, *head;
  
  	/* We don't match Isoc transfers since they are special */
  	if (usb_pipeisoc(urb->pipe))
  		return NULL;
  
  	head = &uhci->urb_list;
  	tmp = head->next;
  	while (tmp != head) {
! 		struct urb *u = list_entry(tmp, struct urb, urb_list);
  
  		tmp = tmp->next;
  
  		if (u->dev == urb->dev && u->pipe == urb->pipe &&
  		    u->status == -EINPROGRESS)
! 			return u;
  	}
  
! 	return NULL;
  }
  
  static int uhci_submit_urb(struct urb *urb)
--- 1440,1473 ----
  	return ret;
  }
  
  static struct urb *uhci_find_urb_ep(struct uhci *uhci, struct urb *urb)
  {
  	struct list_head *tmp, *head;
+ 	unsigned long flags;
+ 	struct urb *u = NULL;
  
  	/* We don't match Isoc transfers since they are special */
  	if (usb_pipeisoc(urb->pipe))
  		return NULL;
  
+ 	spin_lock_irqsave(&uhci->urb_list_lock, flags);
  	head = &uhci->urb_list;
  	tmp = head->next;
  	while (tmp != head) {
! 		u = list_entry(tmp, struct urb, urb_list);
  
  		tmp = tmp->next;
  
  		if (u->dev == urb->dev && u->pipe == urb->pipe &&
  		    u->status == -EINPROGRESS)
! 			goto out;
  	}
+ 	u = NULL;
+ 
+ out:
+ 	spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
  
! 	return u;
  }
  
  static int uhci_submit_urb(struct urb *urb)
***************
*** 1501,1515 ****
  	INIT_LIST_HEAD(&urb->urb_list);
  	usb_inc_dev_use(urb->dev);
  
! 	spin_lock_irqsave(&uhci->urb_list_lock, flags);
! 	spin_lock(&urb->lock);
  
  	if (urb->status == -EINPROGRESS || urb->status == -ECONNRESET ||
  	    urb->status == -ECONNABORTED) {
  		dbg("uhci_submit_urb: urb not available to submit (status = %d)", urb->status);
  		/* Since we can have problems on the out path */
! 		spin_unlock(&urb->lock);
! 		spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
  		usb_dec_dev_use(urb->dev);
  
  		return ret;
--- 1491,1503 ----
  	INIT_LIST_HEAD(&urb->urb_list);
  	usb_inc_dev_use(urb->dev);
  
! 	spin_lock_irqsave(&urb->lock, flags);
  
  	if (urb->status == -EINPROGRESS || urb->status == -ECONNRESET ||
  	    urb->status == -ECONNABORTED) {
  		dbg("uhci_submit_urb: urb not available to submit (status = %d)", urb->status);
  		/* Since we can have problems on the out path */
! 		spin_unlock_irqrestore(&urb->lock, flags);
  		usb_dec_dev_use(urb->dev);
  
  		return ret;
***************
*** 1578,1601 ****
  out:
  	urb->status = ret;
  
  	if (ret == -EINPROGRESS) {
  		/* We use _tail to make find_urb_ep more efficient */
  		list_add_tail(&urb->urb_list, &uhci->urb_list);
- 
- 		spin_unlock(&urb->lock);
  		spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
  
  		return 0;
  	}
  
  	uhci_unlink_generic(uhci, urb);
! 
! 	spin_unlock(&urb->lock);
! 	spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
! 
! 	/* Only call completion if it was successful */
! 	if (!ret)
! 		uhci_call_completion(urb);
  
  	return ret;
  }
--- 1566,1584 ----
  out:
  	urb->status = ret;
  
+ 	spin_unlock_irqrestore(&urb->lock, flags);
+ 
  	if (ret == -EINPROGRESS) {
+ 		spin_lock_irqsave(&uhci->urb_list_lock, flags);
  		/* We use _tail to make find_urb_ep more efficient */
  		list_add_tail(&urb->urb_list, &uhci->urb_list);
  		spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
  
  		return 0;
  	}
  
  	uhci_unlink_generic(uhci, urb);
! 	uhci_call_completion(urb);
  
  	return ret;
  }
***************
*** 1603,1609 ****
  /*
   * Return the result of a transfer
   *
!  * MUST be called with urb_list_lock acquired
   */
  static void uhci_transfer_result(struct uhci *uhci, struct urb *urb)
  {
--- 1586,1592 ----
  /*
   * Return the result of a transfer
   *
!  * Must be called with urb_list_lock acquired
   */
  static void uhci_transfer_result(struct uhci *uhci, struct urb *urb)
  {
***************
*** 1621,1627 ****
  
  	if (urb->status != -EINPROGRESS) {
  		info("uhci_transfer_result: called for URB %p not in flight?", urb);
! 		goto out;
  	}
  
  	switch (usb_pipetype(urb->pipe)) {
--- 1604,1611 ----
  
  	if (urb->status != -EINPROGRESS) {
  		info("uhci_transfer_result: called for URB %p not in flight?", urb);
! 		spin_unlock_irqrestore(&urb->lock, flags);
! 		return;
  	}
  
  	switch (usb_pipetype(urb->pipe)) {
***************
*** 1641,1648 ****
  
  	urbp->status = ret;
  
  	if (ret == -EINPROGRESS)
! 		goto out;
  
  	switch (usb_pipetype(urb->pipe)) {
  	case PIPE_CONTROL:
--- 1625,1634 ----
  
  	urbp->status = ret;
  
+ 	spin_unlock_irqrestore(&urb->lock, flags);
+ 
  	if (ret == -EINPROGRESS)
! 		return;
  
  	switch (usb_pipetype(urb->pipe)) {
  	case PIPE_CONTROL:
***************
*** 1656,1663 ****
  		break;
  	case PIPE_INTERRUPT:
  		/* Interrupts are an exception */
! 		if (urb->interval)
! 			goto out_complete;
  
  		/* Release bandwidth for Interrupt or Isoc. transfers */
  		/* Spinlock needed ? */
--- 1642,1651 ----
  		break;
  	case PIPE_INTERRUPT:
  		/* Interrupts are an exception */
! 		if (urb->interval) {
! 			uhci_add_complete(urb);
! 			return;		/* <-- note return */
! 		}
  
  		/* Release bandwidth for Interrupt or Isoc. transfers */
  		/* Spinlock needed ? */
***************
*** 1670,1693 ****
  			usb_pipetype(urb->pipe), urb);
  	}
  
- 	/* Remove it from uhci->urb_list */
  	list_del_init(&urb->urb_list);
  
- out_complete:
  	uhci_add_complete(urb);
- 
- out:
- 	spin_unlock_irqrestore(&urb->lock, flags);
  }
  
- /*
-  * MUST be called with urb->lock acquired
-  */
  static void uhci_unlink_generic(struct uhci *uhci, struct urb *urb)
  {
  	struct list_head *head, *tmp;
  	struct urb_priv *urbp = urb->hcpriv;
- 	int prevactive = 1;
  
  	/* We can get called when urbp allocation fails, so check */
  	if (!urbp)
--- 1658,1672 ----
***************
*** 1695,1713 ****
  
  	uhci_dec_fsbr(uhci, urb);	/* Safe since it checks */
  
- 	/*
- 	 * Now we need to find out what the last successful toggle was
- 	 * so we can update the local data toggle for the next transfer
- 	 *
- 	 * There's 3 way's the last successful completed TD is found:
- 	 *
- 	 * 1) The TD is NOT active and the actual length < expected length
- 	 * 2) The TD is NOT active and it's the last TD in the chain
- 	 * 3) The TD is active and the previous TD is NOT active
- 	 *
- 	 * Control and Isochronous ignore the toggle, so this is safe
- 	 * for all types
- 	 */
  	head = &urbp->td_list;
  	tmp = head->next;
  	while (tmp != head) {
--- 1674,1679 ----
***************
*** 1715,1739 ****
  
  		tmp = tmp->next;
  
  		if (!(td->status & TD_CTRL_ACTIVE) &&
  		    (uhci_actual_length(td->status) < uhci_expected_length(td->info) ||
! 		    tmp == head))
  			usb_settoggle(urb->dev, uhci_endpoint(td->info),
  				uhci_packetout(td->info),
  				uhci_toggle(td->info) ^ 1);
! 		else if ((td->status & TD_CTRL_ACTIVE) && !prevactive)
! 			usb_settoggle(urb->dev, uhci_endpoint(td->info),
! 				uhci_packetout(td->info),
! 				uhci_toggle(td->info));
! 
! 		prevactive = td->status & TD_CTRL_ACTIVE;
  	}
  
  	uhci_delete_queued_urb(uhci, urb);
  
  	/* The interrupt loop will reclaim the QH's */
! 	uhci_remove_qh(uhci, urbp->qh);
! 	urbp->qh = NULL;
  }
  
  static int uhci_unlink_urb(struct urb *urb)
--- 1681,1701 ----
  
  		tmp = tmp->next;
  
+ 		/* Control and Isochronous ignore the toggle, so this */
+ 		/* is safe for all types */
  		if (!(td->status & TD_CTRL_ACTIVE) &&
  		    (uhci_actual_length(td->status) < uhci_expected_length(td->info) ||
! 		    tmp == head)) {
  			usb_settoggle(urb->dev, uhci_endpoint(td->info),
  				uhci_packetout(td->info),
  				uhci_toggle(td->info) ^ 1);
! 		}
  	}
  
  	uhci_delete_queued_urb(uhci, urb);
  
  	/* The interrupt loop will reclaim the QH's */
! 	uhci_remove_qh(uhci, urb);
  }
  
  static int uhci_unlink_urb(struct urb *urb)
***************
*** 1750,1758 ****
  
  	uhci = (struct uhci *)urb->dev->bus->hcpriv;
  
- 	spin_lock_irqsave(&uhci->urb_list_lock, flags);
- 	spin_lock(&urb->lock);
- 
  	/* Release bandwidth for Interrupt or Isoc. transfers */
  	/* Spinlock needed ? */
  	if (urb->bandwidth) {
--- 1712,1717 ----
***************
*** 1768,1814 ****
  		}
  	}
  
! 	if (urb->status != -EINPROGRESS) {
! 		spin_unlock(&urb->lock);
! 		spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
  		return 0;
- 	}
  
  	list_del_init(&urb->urb_list);
  
  	uhci_unlink_generic(uhci, urb);
  
  	/* Short circuit the virtual root hub */
  	if (urb->dev == uhci->rh.dev) {
  		rh_unlink_urb(urb);
- 
- 		spin_unlock(&urb->lock);
- 		spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
- 
  		uhci_call_completion(urb);
  	} else {
  		if (urb->transfer_flags & USB_ASYNC_UNLINK) {
  			urbp->status = urb->status = -ECONNABORTED;
  
! 			spin_lock(&uhci->urb_remove_list_lock);
  
! 			/* If we're the first, set the next interrupt bit */
  			if (list_empty(&uhci->urb_remove_list))
  				uhci_set_next_interrupt(uhci);
  			
  			list_add(&urb->urb_list, &uhci->urb_remove_list);
  
! 			spin_unlock(&uhci->urb_remove_list_lock);
! 
! 			spin_unlock(&urb->lock);
! 			spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
! 
  		} else {
  			urb->status = -ENOENT;
  
- 			spin_unlock(&urb->lock);
- 			spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
- 
  			if (in_interrupt()) {	/* wait at least 1 frame */
  				static int errorcount = 10;
  
--- 1727,1764 ----
  		}
  	}
  
! 	if (urb->status != -EINPROGRESS)
  		return 0;
  
+ 	spin_lock_irqsave(&uhci->urb_list_lock, flags);
  	list_del_init(&urb->urb_list);
+ 	spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
  
  	uhci_unlink_generic(uhci, urb);
  
  	/* Short circuit the virtual root hub */
  	if (urb->dev == uhci->rh.dev) {
  		rh_unlink_urb(urb);
  		uhci_call_completion(urb);
  	} else {
  		if (urb->transfer_flags & USB_ASYNC_UNLINK) {
+ 			/* urb_list is available now since we called */
+ 			/*  uhci_unlink_generic already */
+ 
  			urbp->status = urb->status = -ECONNABORTED;
  
! 			spin_lock_irqsave(&uhci->urb_remove_list_lock, flags);
  
! 			/* Check to see if the remove list is empty */
  			if (list_empty(&uhci->urb_remove_list))
  				uhci_set_next_interrupt(uhci);
  			
  			list_add(&urb->urb_list, &uhci->urb_remove_list);
  
! 			spin_unlock_irqrestore(&uhci->urb_remove_list_lock, flags);
  		} else {
  			urb->status = -ENOENT;
  
  			if (in_interrupt()) {	/* wait at least 1 frame */
  				static int errorcount = 10;
  
***************
*** 1829,1846 ****
  {
  	struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
  	struct list_head *head, *tmp;
- 	int count = 0;
  
  	uhci_dec_fsbr(uhci, urb);
  
  	urbp->fsbr_timeout = 1;
  
- 	/*
- 	 * Ideally we would want to fix qh->element as well, but it's
- 	 * read/write by the HC, so that can introduce a race. It's not
- 	 * really worth the hassle
- 	 */
- 
  	head = &urbp->td_list;
  	tmp = head->next;
  	while (tmp != head) {
--- 1779,1793 ----
  {
  	struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
  	struct list_head *head, *tmp;
  
  	uhci_dec_fsbr(uhci, urb);
  
+ 	/* There is a race with updating IOC in here, but it's not worth */
+ 	/*  trying to fix since this is merely an optimization. The only */
+ 	/*  time we'd lose is if the status of the packet got updated */
+ 	/*  and we'd be turning on FSBR next frame anyway, so it's a wash */
  	urbp->fsbr_timeout = 1;
  
  	head = &urbp->td_list;
  	tmp = head->next;
  	while (tmp != head) {
***************
*** 1848,1862 ****
  
  		tmp = tmp->next;
  
! 		/*
! 		 * Make sure we don't do the last one (since it'll have the
! 		 * TERM bit set) as well as we skip every so many TD's to
! 		 * make sure it doesn't hog the bandwidth
! 		 */
! 		if (tmp != head && (count % DEPTH_INTERVAL) == (DEPTH_INTERVAL - 1))
! 			td->link |= UHCI_PTR_DEPTH;
! 
! 		count++;
  	}
  
  	return 0;
--- 1795,1804 ----
  
  		tmp = tmp->next;
  
! 		if (td->status & TD_CTRL_ACTIVE) {
! 			set_bit(TD_CTRL_IOC_BIT, &td->status);
! 			break;
! 		}
  	}
  
  	return 0;
***************
*** 1959,1972 ****
  /* prepare Interrupt pipe transaction data; HUB INTERRUPT ENDPOINT */
  static int rh_send_irq(struct urb *urb)
  {
  	struct uhci *uhci = (struct uhci *)urb->dev->bus->hcpriv;
- 	struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
  	unsigned int io_addr = uhci->io_addr;
- 	unsigned long flags;
- 	int i, len = 1;
  	__u16 data = 0;
  
- 	spin_lock_irqsave(&urb->lock, flags);
  	for (i = 0; i < uhci->rh.numports; i++) {
  		data |= ((inw(io_addr + USBPORTSC1 + i * 2) & 0xa) > 0 ? (1 << (i + 1)) : 0);
  		len = (i + 1) / 8 + 1;
--- 1901,1912 ----
  /* prepare Interrupt pipe transaction data; HUB INTERRUPT ENDPOINT */
  static int rh_send_irq(struct urb *urb)
  {
+ 	int i, len = 1;
  	struct uhci *uhci = (struct uhci *)urb->dev->bus->hcpriv;
  	unsigned int io_addr = uhci->io_addr;
  	__u16 data = 0;
+ 	struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
  
  	for (i = 0; i < uhci->rh.numports; i++) {
  		data |= ((inw(io_addr + USBPORTSC1 + i * 2) & 0xa) > 0 ? (1 << (i + 1)) : 0);
  		len = (i + 1) / 8 + 1;
***************
*** 1976,1983 ****
  	urb->actual_length = len;
  	urbp->status = 0;
  
- 	spin_unlock_irqrestore(&urb->lock, flags);
- 
  	if ((data > 0) && (uhci->rh.send != 0)) {
  		dbg("root-hub INT complete: port1: %x port2: %x data: %x",
  			inw(io_addr + USBPORTSC1), inw(io_addr + USBPORTSC2), data);
--- 1916,1921 ----
***************
*** 2004,2029 ****
  
  	spin_lock_irqsave(&uhci->urb_list_lock, flags);
  	head = &uhci->urb_list;
  	tmp = head->next;
  	while (tmp != head) {
  		struct urb *u = list_entry(tmp, struct urb, urb_list);
! 		struct urb_priv *up = (struct urb_priv *)u->hcpriv;
  
  		tmp = tmp->next;
  
- 		spin_lock(&u->lock);
- 
  		/* Check if the FSBR timed out */
! 		if (up->fsbr && !up->fsbr_timeout && time_after_eq(jiffies, up->fsbrtime + IDLE_TIMEOUT))
  			uhci_fsbr_timeout(uhci, u);
  
  		/* Check if the URB timed out */
! 		if (u->timeout && time_after_eq(jiffies, up->inserttime + u->timeout)) {
  			list_del(&u->urb_list);
  			list_add_tail(&u->urb_list, &list);
  		}
- 
- 		spin_unlock(&u->lock);
  	}
  	spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
  
--- 1942,1964 ----
  
  	spin_lock_irqsave(&uhci->urb_list_lock, flags);
  	head = &uhci->urb_list;
+ 
  	tmp = head->next;
  	while (tmp != head) {
  		struct urb *u = list_entry(tmp, struct urb, urb_list);
! 		struct urb_priv *urbp = (struct urb_priv *)u->hcpriv;
  
  		tmp = tmp->next;
  
  		/* Check if the FSBR timed out */
! 		if (urbp->fsbr && !urbp->fsbr_timeout && time_after_eq(jiffies, urbp->fsbrtime + IDLE_TIMEOUT))
  			uhci_fsbr_timeout(uhci, u);
  
  		/* Check if the URB timed out */
! 		if (u->timeout && time_after_eq(jiffies, urbp->inserttime + u->timeout)) {
  			list_del(&u->urb_list);
  			list_add_tail(&u->urb_list, &list);
  		}
  	}
  	spin_unlock_irqrestore(&uhci->urb_list_lock, flags);
  
***************
*** 2038,2049 ****
  		uhci_unlink_urb(u);
  	}
  
- 	/* Really disable FSBR */
- 	if (!uhci->fsbr && uhci->fsbrtimeout && time_after_eq(jiffies, uhci->fsbrtimeout)) {
- 		uhci->fsbrtimeout = 0;
- 		uhci->skel_term_qh->link = UHCI_PTR_TERM;
- 	}
- 
  	/* enter global suspend if nothing connected */
  	if (!uhci->is_suspended && !ports_active(uhci))
  		suspend_hc(uhci);
--- 1973,1978 ----
***************
*** 2084,2090 ****
  {
  	struct uhci *uhci = (struct uhci *)urb->dev->bus->hcpriv;
  	unsigned int pipe = urb->pipe;
! 	struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *)urb->setup_packet;
  	void *data = urb->transfer_buffer;
  	int leni = urb->transfer_buffer_length;
  	int len = 0;
--- 2013,2019 ----
  {
  	struct uhci *uhci = (struct uhci *)urb->dev->bus->hcpriv;
  	unsigned int pipe = urb->pipe;
! 	devrequest *cmd = (devrequest *)urb->setup_packet;
  	void *data = urb->transfer_buffer;
  	int leni = urb->transfer_buffer_length;
  	int len = 0;
***************
*** 2107,2116 ****
  		return -EINPROGRESS;
  	}
  
! 	bmRType_bReq = cmd->bRequestType | cmd->bRequest << 8;
! 	wValue = le16_to_cpu(cmd->wValue);
! 	wIndex = le16_to_cpu(cmd->wIndex);
! 	wLength = le16_to_cpu(cmd->wLength);
  
  	for (i = 0; i < 8; i++)
  		uhci->rh.c_p_r[i] = 0;
--- 2036,2045 ----
  		return -EINPROGRESS;
  	}
  
! 	bmRType_bReq = cmd->requesttype | cmd->request << 8;
! 	wValue = le16_to_cpu(cmd->value);
! 	wIndex = le16_to_cpu(cmd->index);
! 	wLength = le16_to_cpu(cmd->length);
  
  	for (i = 0; i < 8; i++)
  		uhci->rh.c_p_r[i] = 0;
***************
*** 2196,2207 ****
  			OK(0);
  		case RH_PORT_RESET:
  			SET_RH_PORTSTAT(USBPORTSC_PR);
! 			mdelay(50);	/* USB v1.1 7.1.7.3 */
  			uhci->rh.c_p_r[wIndex - 1] = 1;
  			CLR_RH_PORTSTAT(USBPORTSC_PR);
  			udelay(10);
  			SET_RH_PORTSTAT(USBPORTSC_PE);
! 			mdelay(10);
  			SET_RH_PORTSTAT(0xa);
  			OK(0);
  		case RH_PORT_POWER:
--- 2125,2136 ----
  			OK(0);
  		case RH_PORT_RESET:
  			SET_RH_PORTSTAT(USBPORTSC_PR);
! 			wait_ms(50);	/* USB v1.1 7.1.7.3 */
  			uhci->rh.c_p_r[wIndex - 1] = 1;
  			CLR_RH_PORTSTAT(USBPORTSC_PR);
  			udelay(10);
  			SET_RH_PORTSTAT(USBPORTSC_PE);
! 			wait_ms(10);
  			SET_RH_PORTSTAT(0xa);
  			OK(0);
  		case RH_PORT_POWER:
***************
*** 2263,2271 ****
  	return stat;
  }
  
- /*
-  * MUST be called with urb->lock acquired
-  */
  static int rh_unlink_urb(struct urb *urb)
  {
  	struct uhci *uhci = (struct uhci *)urb->dev->bus->hcpriv;
--- 2192,2197 ----
***************
*** 2301,2325 ****
  
  static void uhci_call_completion(struct urb *urb)
  {
! 	struct urb_priv *urbp;
  	struct usb_device *dev = urb->dev;
  	struct uhci *uhci = (struct uhci *)dev->bus->hcpriv;
  	int is_ring = 0, killed, resubmit_interrupt, status;
  	struct urb *nurb;
- 	unsigned long flags;
- 
- 	spin_lock_irqsave(&urb->lock, flags);
- 
- 	urbp = (struct urb_priv *)urb->hcpriv;
- 	if (!urbp || !urb->dev) {
- 		spin_unlock_irqrestore(&urb->lock, flags);
- 		return;
- 	}
  
  	killed = (urb->status == -ENOENT || urb->status == -ECONNABORTED ||
  			urb->status == -ECONNRESET);
  	resubmit_interrupt = (usb_pipetype(urb->pipe) == PIPE_INTERRUPT &&
! 			urb->interval);
  
  	nurb = urb->next;
  	if (nurb && !killed) {
--- 2227,2242 ----
  
  static void uhci_call_completion(struct urb *urb)
  {
! 	struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
  	struct usb_device *dev = urb->dev;
  	struct uhci *uhci = (struct uhci *)dev->bus->hcpriv;
  	int is_ring = 0, killed, resubmit_interrupt, status;
  	struct urb *nurb;
  
  	killed = (urb->status == -ENOENT || urb->status == -ECONNABORTED ||
  			urb->status == -ECONNRESET);
  	resubmit_interrupt = (usb_pipetype(urb->pipe) == PIPE_INTERRUPT &&
! 			urb->interval && !killed);
  
  	nurb = urb->next;
  	if (nurb && !killed) {
***************
*** 2344,2349 ****
--- 2261,2274 ----
  		is_ring = (nurb == urb);
  	}
  
+ 	status = urbp->status;
+ 	if (!resubmit_interrupt)
+ 		/* We don't need urb_priv anymore */
+ 		uhci_destroy_urb_priv(urb);
+ 
+ 	if (!killed)
+ 		urb->status = status;
+ 
  	if (urbp->transfer_buffer_dma_handle)
  		pci_dma_sync_single(uhci->dev, urbp->transfer_buffer_dma_handle,
  			urb->transfer_buffer_length, usb_pipein(urb->pipe) ?
***************
*** 2351,2380 ****
  
  	if (urbp->setup_packet_dma_handle)
  		pci_dma_sync_single(uhci->dev, urbp->setup_packet_dma_handle,
! 			sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
! 
! 	status = urbp->status;
! 	if (!resubmit_interrupt || killed)
! 		/* We don't need urb_priv anymore */
! 		uhci_destroy_urb_priv(urb);
! 
! 	if (!killed)
! 		urb->status = status;
  
  	urb->dev = NULL;
- 	spin_unlock_irqrestore(&urb->lock, flags);
- 
  	if (urb->complete)
  		urb->complete(urb);
  
! 	if (resubmit_interrupt)
! 		/* Recheck the status. The completion handler may have */
! 		/*  unlinked the resubmitting interrupt URB */
! 		killed = (urb->status == -ENOENT ||
! 			  urb->status == -ECONNABORTED ||
! 			  urb->status == -ECONNRESET);
! 
! 	if (resubmit_interrupt && !killed) {
  		urb->dev = dev;
  		uhci_reset_interrupt(urb);
  	} else {
--- 2276,2288 ----
  
  	if (urbp->setup_packet_dma_handle)
  		pci_dma_sync_single(uhci->dev, urbp->setup_packet_dma_handle,
! 			sizeof(devrequest), PCI_DMA_TODEVICE);
  
  	urb->dev = NULL;
  	if (urb->complete)
  		urb->complete(urb);
  
! 	if (resubmit_interrupt) {
  		urb->dev = dev;
  		uhci_reset_interrupt(urb);
  	} else {
***************
*** 2401,2414 ****
  		struct urb_priv *urbp = list_entry(tmp, struct urb_priv, complete_list);
  		struct urb *urb = urbp->urb;
  
  		list_del_init(&urbp->complete_list);
- 		spin_unlock_irqrestore(&uhci->complete_list_lock, flags);
  
  		uhci_call_completion(urb);
- 
- 		spin_lock_irqsave(&uhci->complete_list_lock, flags);
- 		head = &uhci->complete_list;
- 		tmp = head->next;
  	}
  	spin_unlock_irqrestore(&uhci->complete_list_lock, flags);
  }
--- 2309,2319 ----
  		struct urb_priv *urbp = list_entry(tmp, struct urb_priv, complete_list);
  		struct urb *urb = urbp->urb;
  
+ 		tmp = tmp->next;
+ 
  		list_del_init(&urbp->complete_list);
  
  		uhci_call_completion(urb);
  	}
  	spin_unlock_irqrestore(&uhci->complete_list_lock, flags);
  }
***************
*** 2430,2437 ****
  		list_del_init(&urb->urb_list);
  
  		urbp->status = urb->status = -ECONNRESET;
! 
! 		uhci_add_complete(urb);
  	}
  	spin_unlock_irqrestore(&uhci->urb_remove_list_lock, flags);
  }
--- 2335,2341 ----
  		list_del_init(&urb->urb_list);
  
  		urbp->status = urb->status = -ECONNRESET;
! 		uhci_call_completion(urb);
  	}
  	spin_unlock_irqrestore(&uhci->urb_remove_list_lock, flags);
  }
***************
*** 2717,2723 ****
  	}
  
  	uhci->dev = dev;
- 	uhci->irq = dev->irq;
  	uhci->io_addr = io_addr;
  	uhci->io_size = io_size;
  	pci_set_drvdata(dev, uhci);
--- 2621,2626 ----
***************
*** 2744,2754 ****
  	/*  or broken setup */
  	reset_hc(uhci);
  
- 	uhci->fsbr = 0;
- 	uhci->fsbrtimeout = 0;
- 
- 	uhci->is_suspended = 0;
- 
  	spin_lock_init(&uhci->qh_remove_list_lock);
  	INIT_LIST_HEAD(&uhci->qh_remove_list);
  
--- 2647,2652 ----
***************
*** 2799,2805 ****
  	}
  
  	uhci->bus = bus;
- 	bus->bus_name = dev->slot_name;
  	bus->hcpriv = uhci;
  
  	usb_register_bus(uhci->bus);
--- 2697,2702 ----
***************
*** 2932,2937 ****
--- 2829,2836 ----
  	if (request_irq(dev->irq, uhci_interrupt, SA_SHIRQ, "usb-uhci", uhci))
  		goto err_request_irq;
  
+ 	uhci->irq = dev->irq;
+ 
  	/* disable legacy emulation */
  	pci_write_config_word(uhci->dev, USBLEGSUP, USBLEGSUP_DEFAULT);
  
***************
*** 3030,3036 ****
  	return -ENODEV;
  }
  
! static void __devexit uhci_pci_remove(struct pci_dev *dev)
  {
  	struct uhci *uhci = pci_get_drvdata(dev);
  
--- 2929,2935 ----
  	return -ENODEV;
  }
  
! static void uhci_pci_remove(struct pci_dev *dev)
  {
  	struct uhci *uhci = pci_get_drvdata(dev);
  
***************
*** 3091,3097 ****
  	id_table:	uhci_pci_ids,
  
  	probe:		uhci_pci_probe,
! 	remove:		__devexit_p(uhci_pci_remove),
  
  #ifdef	CONFIG_PM
  	suspend:	uhci_pci_suspend,
--- 2990,2996 ----
  	id_table:	uhci_pci_ids,
  
  	probe:		uhci_pci_probe,
! 	remove:		uhci_pci_remove,
  
  #ifdef	CONFIG_PM
  	suspend:	uhci_pci_suspend,
***************
*** 3169,3172 ****
  MODULE_AUTHOR(DRIVER_AUTHOR);
  MODULE_DESCRIPTION(DRIVER_DESC);
  MODULE_LICENSE("GPL");
- 
--- 3068,3070 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/uhci.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/uhci.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/uhci.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/uhci.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 100,105 ****
--- 100,106 ----
  #define TD_CTRL_C_ERR_SHIFT	27
  #define TD_CTRL_LS		(1 << 26)	/* Low Speed Device */
  #define TD_CTRL_IOS		(1 << 25)	/* Isochronous Select */
+ #define TD_CTRL_IOC_BIT		24
  #define TD_CTRL_IOC		(1 << 24)	/* Interrupt on Complete */
  #define TD_CTRL_ACTIVE		(1 << 23)	/* TD Active */
  #define TD_CTRL_STALLED		(1 << 22)	/* TD Stalled */
***************
*** 119,136 ****
  /*
   * for TD : (a.k.a. Token)
   */
! #define TD_TOKEN_TOGGLE_SHIFT	19
! #define TD_TOKEN_TOGGLE		(1 << 19)
! #define TD_TOKEN_PID_MASK	0xFF
! #define TD_TOKEN_EXPLEN_MASK	0x7FF		/* expected length, encoded as n - 1 */
  
  #define uhci_maxlen(token)	((token) >> 21)
! #define uhci_expected_length(info) (((info >> 21) + 1) & TD_TOKEN_EXPLEN_MASK) /* 1-based */
! #define uhci_toggle(token)	(((token) >> TD_TOKEN_TOGGLE_SHIFT) & 1)
  #define uhci_endpoint(token)	(((token) >> 15) & 0xf)
  #define uhci_devaddr(token)	(((token) >> 8) & 0x7f)
  #define uhci_devep(token)	(((token) >> 8) & 0x7ff)
! #define uhci_packetid(token)	((token) & TD_TOKEN_PID_MASK)
  #define uhci_packetout(token)	(uhci_packetid(token) != USB_PID_IN)
  #define uhci_packetin(token)	(uhci_packetid(token) == USB_PID_IN)
  
--- 120,135 ----
  /*
   * for TD : (a.k.a. Token)
   */
! #define TD_TOKEN_TOGGLE		19
! #define TD_PID			0xFF
  
  #define uhci_maxlen(token)	((token) >> 21)
! #define uhci_expected_length(info) (((info >> 21) + 1) & TD_CTRL_ACTLEN_MASK) /* 1-based */
! #define uhci_toggle(token)	(((token) >> TD_TOKEN_TOGGLE) & 1)
  #define uhci_endpoint(token)	(((token) >> 15) & 0xf)
  #define uhci_devaddr(token)	(((token) >> 8) & 0x7f)
  #define uhci_devep(token)	(((token) >> 8) & 0x7ff)
! #define uhci_packetid(token)	((token) & 0xff)
  #define uhci_packetout(token)	(uhci_packetid(token) != USB_PID_IN)
  #define uhci_packetin(token)	(uhci_packetid(token) == USB_PID_IN)
  
***************
*** 164,170 ****
  	struct list_head list;		/* P: urb->lock */
  
  	int frame;
! 	struct list_head fl_list;	/* P: uhci->frame_list_lock */
  } __attribute__((aligned(16)));
  
  /*
--- 163,169 ----
  	struct list_head list;		/* P: urb->lock */
  
  	int frame;
! 	struct list_head fl_list;	/* P: frame_list_lock */
  } __attribute__((aligned(16)));
  
  /*
***************
*** 287,303 ****
  struct uhci {
  	struct pci_dev *dev;
  
- #ifdef CONFIG_PROC_FS
  	/* procfs */
  	int num;
  	struct proc_dir_entry *proc_entry;
- #endif
  
  	/* Grabbed from PCI */
  	int irq;
  	unsigned int io_addr;
  	unsigned int io_size;
  
  	struct pci_pool *qh_pool;
  	struct pci_pool *td_pool;
  
--- 286,302 ----
  struct uhci {
  	struct pci_dev *dev;
  
  	/* procfs */
  	int num;
  	struct proc_dir_entry *proc_entry;
  
  	/* Grabbed from PCI */
  	int irq;
  	unsigned int io_addr;
  	unsigned int io_size;
  
+ 	struct list_head uhci_list;
+ 
  	struct pci_pool *qh_pool;
  	struct pci_pool *td_pool;
  
***************
*** 307,332 ****
  	struct uhci_qh *skelqh[UHCI_NUM_SKELQH];	/* Skeleton QH's */
  
  	spinlock_t frame_list_lock;
! 	struct uhci_frame_list *fl;		/* P: uhci->frame_list_lock */
  	int fsbr;				/* Full speed bandwidth reclamation */
- 	unsigned long fsbrtimeout;		/* FSBR delay */
  	int is_suspended;
  
- 	/* Main list of URB's currently controlled by this HC */
- 	spinlock_t urb_list_lock;
- 	struct list_head urb_list;		/* P: uhci->urb_list_lock */
- 
- 	/* List of QH's that are done, but waiting to be unlinked (race) */
  	spinlock_t qh_remove_list_lock;
! 	struct list_head qh_remove_list;	/* P: uhci->qh_remove_list_lock */
  
- 	/* List of asynchronously unlinked URB's */
  	spinlock_t urb_remove_list_lock;
! 	struct list_head urb_remove_list;	/* P: uhci->urb_remove_list_lock */
  
- 	/* List of URB's awaiting completion callback */
  	spinlock_t complete_list_lock;
! 	struct list_head complete_list;		/* P: uhci->complete_list_lock */
  
  	struct virt_root_hub rh;	/* private data of the virtual root hub */
  };
--- 306,326 ----
  	struct uhci_qh *skelqh[UHCI_NUM_SKELQH];	/* Skeleton QH's */
  
  	spinlock_t frame_list_lock;
! 	struct uhci_frame_list *fl;		/* Frame list */
  	int fsbr;				/* Full speed bandwidth reclamation */
  	int is_suspended;
  
  	spinlock_t qh_remove_list_lock;
! 	struct list_head qh_remove_list;
  
  	spinlock_t urb_remove_list_lock;
! 	struct list_head urb_remove_list;
! 
! 	spinlock_t urb_list_lock;
! 	struct list_head urb_list;
  
  	spinlock_t complete_list_lock;
! 	struct list_head complete_list;
  
  	struct virt_root_hub rh;	/* private data of the virtual root hub */
  };
***************
*** 339,345 ****
  	dma_addr_t transfer_buffer_dma_handle;
  
  	struct uhci_qh *qh;		/* QH for this URB */
! 	struct list_head td_list;	/* P: urb->lock */
  
  	int fsbr : 1;			/* URB turned on FSBR */
  	int fsbr_timeout : 1;		/* URB timed out on FSBR */
--- 333,339 ----
  	dma_addr_t transfer_buffer_dma_handle;
  
  	struct uhci_qh *qh;		/* QH for this URB */
! 	struct list_head td_list;
  
  	int fsbr : 1;			/* URB turned on FSBR */
  	int fsbr_timeout : 1;		/* URB timed out on FSBR */
***************
*** 351,387 ****
  	int status;			/* Final status */
  
  	unsigned long inserttime;	/* In jiffies */
! 	unsigned long fsbrtime;		/* In jiffies */
  
! 	struct list_head queue_list;	/* P: uhci->frame_list_lock */
! 	struct list_head complete_list;	/* P: uhci->complete_list_lock */
  };
  
- /*
-  * Locking in uhci.c
-  *
-  * spinlocks are used extensively to protect the many lists and data
-  * structures we have. It's not that pretty, but it's necessary. We
-  * need to be done with all of the locks (except complete_list_lock) when
-  * we call urb->complete. I've tried to make it simple enough so I don't
-  * have to spend hours racking my brain trying to figure out if the
-  * locking is safe.
-  *
-  * Here's the safe locking order to prevent deadlocks:
-  *
-  * #1 uhci->urb_list_lock
-  * #2 urb->lock
-  * #3 uhci->urb_remove_list_lock, uhci->frame_list_lock, 
-  *   uhci->qh_remove_list_lock
-  * #4 uhci->complete_list_lock
-  *
-  * If you're going to grab 2 or more locks at once, ALWAYS grab the lock
-  * at the lowest level FIRST and NEVER grab locks at the same level at the
-  * same time.
-  * 
-  * So, if you need uhci->urb_list_lock, grab it before you grab urb->lock
-  */
- 
  /* -------------------------------------------------------------------------
     Virtual Root HUB
     ------------------------------------------------------------------------- */
--- 345,356 ----
  	int status;			/* Final status */
  
  	unsigned long inserttime;	/* In jiffies */
! 	unsigned long fsbrtime;	/* In jiffies */
  
! 	struct list_head queue_list;
! 	struct list_head complete_list;
  };
  
  /* -------------------------------------------------------------------------
     Virtual Root HUB
     ------------------------------------------------------------------------- */
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-debug.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-debug.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-debug.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-debug.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 181,203 ****
  	kfree(buf);
  }
  
! void usb_dump_urb (struct urb *urb)
  {
! 	printk ("urb                   :%p\n", urb);
! 	printk ("next                  :%p\n", urb->next);
! 	printk ("dev                   :%p\n", urb->dev);
! 	printk ("pipe                  :%08X\n", urb->pipe);
! 	printk ("status                :%d\n", urb->status);
! 	printk ("transfer_flags        :%08X\n", urb->transfer_flags);
! 	printk ("transfer_buffer       :%p\n", urb->transfer_buffer);
! 	printk ("transfer_buffer_length:%d\n", urb->transfer_buffer_length);
! 	printk ("actual_length         :%d\n", urb->actual_length);
! 	printk ("setup_packet          :%p\n", urb->setup_packet);
! 	printk ("start_frame           :%d\n", urb->start_frame);
! 	printk ("number_of_packets     :%d\n", urb->number_of_packets);
! 	printk ("interval              :%d\n", urb->interval);
! 	printk ("error_count           :%d\n", urb->error_count);
! 	printk ("context               :%p\n", urb->context);
! 	printk ("complete              :%p\n", urb->complete);
  }
  
--- 181,203 ----
  	kfree(buf);
  }
  
! void usb_dump_urb (purb_t purb)
  {
! 	printk ("urb                   :%p\n", purb);
! 	printk ("next                  :%p\n", purb->next);
! 	printk ("dev                   :%p\n", purb->dev);
! 	printk ("pipe                  :%08X\n", purb->pipe);
! 	printk ("status                :%d\n", purb->status);
! 	printk ("transfer_flags        :%08X\n", purb->transfer_flags);
! 	printk ("transfer_buffer       :%p\n", purb->transfer_buffer);
! 	printk ("transfer_buffer_length:%d\n", purb->transfer_buffer_length);
! 	printk ("actual_length         :%d\n", purb->actual_length);
! 	printk ("setup_packet          :%p\n", purb->setup_packet);
! 	printk ("start_frame           :%d\n", purb->start_frame);
! 	printk ("number_of_packets     :%d\n", purb->number_of_packets);
! 	printk ("interval              :%d\n", purb->interval);
! 	printk ("error_count           :%d\n", purb->error_count);
! 	printk ("context               :%p\n", purb->context);
! 	printk ("complete              :%p\n", purb->complete);
  }
  
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: usb-midi.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: usb-midi.h
LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb$B$@$1$KH/8+(B: usb-ohci-nonpci.c
LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb$B$@$1$KH/8+(B: usb-ohci-pci.c
LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb$B$@$1$KH/8+(B: usb-ohci-sa1111.c
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-ohci.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-ohci.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-ohci.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-ohci.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 11,21 ****
   * 
   * 
   * History:
!  *
!  * 2002/03/08 interrupt unlink fix (Matt Hughes), better cleanup on
!  *	load failure (Matthew Frederickson)
!  * 2002/01/20 async unlink fixes:  return -EINPROGRESS (per spec) and
!  *	make interrupt unlink-in-completion work (db)
   * 2001/09/19 USB_ZERO_PACKET support (Jean Tourrilhes)
   * 2001/07/17 power management and pmac cleanup (Benjamin Herrenschmidt)
   * 2001/03/24 td/ed hashing to remove bus_to_virt (Steve Longerbeam);
--- 11,17 ----
   * 
   * 
   * History:
!  * 
   * 2001/09/19 USB_ZERO_PACKET support (Jean Tourrilhes)
   * 2001/07/17 power management and pmac cleanup (Benjamin Herrenschmidt)
   * 2001/03/24 td/ed hashing to remove bus_to_virt (Steve Longerbeam);
***************
*** 78,94 ****
  
  #include "usb-ohci.h"
  
- #include "hcd.h"
- 
- #ifdef CONFIG_PMAC_PBOOK
- #include 
- #include 
- #include 
- #ifndef CONFIG_PM
- #define CONFIG_PM
- #endif
- #endif
- 
  
  /*
   * Version Information
--- 74,79 ----
***************
*** 179,185 ****
  	kfree (urb_priv);
  }
   
! static void urb_rm_priv_locked (struct urb * urb) 
  {
  	urb_priv_t * urb_priv = urb->hcpriv;
  	
--- 164,170 ----
  	kfree (urb_priv);
  }
   
! static void urb_rm_priv_locked (urb_t * urb) 
  {
  	urb_priv_t * urb_priv = urb->hcpriv;
  	
***************
*** 213,219 ****
  	}
  }
  
! static void urb_rm_priv (struct urb * urb)
  {
  	unsigned long flags;
  
--- 198,204 ----
  	}
  }
  
! static void urb_rm_priv (urb_t * urb)
  {
  	unsigned long flags;
  
***************
*** 230,236 ****
  /* debug| print the main components of an URB     
   * small: 0) header + data packets 1) just header */
   
! static void urb_print (struct urb * urb, char * str, int small)
  {
  	unsigned int pipe= urb->pipe;
  	
--- 215,221 ----
  /* debug| print the main components of an URB     
   * small: 0) header + data packets 1) just header */
   
! static void urb_print (urb_t * urb, char * str, int small)
  {
  	unsigned int pipe= urb->pipe;
  	
***************
*** 385,392 ****
  	__u32			temp, ndp, i;
  
  	temp = roothub_a (controller);
- 	if (temp == ~(u32)0)
- 		return;
  	ndp = (temp & RH_A_NDP);
  
  	if (verbose) {
--- 370,375 ----
***************
*** 442,448 ****
  
  static void ohci_dump (ohci_t *controller, int verbose)
  {
! 	dbg ("OHCI controller usb-%s state", controller->ohci_dev->slot_name);
  
  	// dumps some of the state we know about
  	ohci_dump_status (controller);
--- 425,431 ----
  
  static void ohci_dump (ohci_t *controller, int verbose)
  {
! 	dbg ("OHCI controller usb-%s state", controller->slot_name);
  
  	// dumps some of the state we know about
  	ohci_dump_status (controller);
***************
*** 461,470 ****
  
  /* return a request to the completion handler */
   
! static int sohci_return_urb (struct ohci *hc, struct urb * urb)
  {
  	urb_priv_t * urb_priv = urb->hcpriv;
! 	struct urb * urbt;
  	unsigned long flags;
  	int i;
  	
--- 444,453 ----
  
  /* return a request to the completion handler */
   
! static int sohci_return_urb (struct ohci *hc, urb_t * urb)
  {
  	urb_priv_t * urb_priv = urb->hcpriv;
! 	urb_t * urbt;
  	unsigned long flags;
  	int i;
  	
***************
*** 493,500 ****
  
  			/* implicitly requeued */
    			urb->actual_length = 0;
! 			urb->status = -EINPROGRESS;
! 			td_submit_urb (urb);
    			break;
    			
  		case PIPE_ISOCHRONOUS:
--- 476,484 ----
  
  			/* implicitly requeued */
    			urb->actual_length = 0;
!   			urb->status = USB_ST_URB_PENDING;
!   			if (urb_priv->state != URB_DEL)
!   				td_submit_urb (urb);
    			break;
    			
  		case PIPE_ISOCHRONOUS:
***************
*** 539,545 ****
  
  /* get a transfer request */
   
! static int sohci_submit_urb (struct urb * urb)
  {
  	ohci_t * ohci;
  	ed_t * ed;
--- 523,529 ----
  
  /* get a transfer request */
   
! static int sohci_submit_urb (urb_t * urb)
  {
  	ohci_t * ohci;
  	ed_t * ed;
***************
*** 723,729 ****
  /* deactivate all TDs and remove the private part of the URB */
  /* interrupt callers must use async unlink mode */
  
! static int sohci_unlink_urb (struct urb * urb)
  {
  	unsigned long flags;
  	ohci_t * ohci;
--- 707,713 ----
  /* deactivate all TDs and remove the private part of the URB */
  /* interrupt callers must use async unlink mode */
  
! static int sohci_unlink_urb (urb_t * urb)
  {
  	unsigned long flags;
  	ohci_t * ohci;
***************
*** 796,802 ****
  				/* usb_dec_dev_use done in dl_del_list() */
  				urb->status = -EINPROGRESS;
  				spin_unlock_irqrestore (&usb_ed_lock, flags);
- 				return -EINPROGRESS;
  			}
  		} else {
  			urb_rm_priv (urb);
--- 780,785 ----
***************
*** 856,862 ****
    				if (ed->state == ED_OPER) {
  					/* driver on that interface didn't unlink an urb */
  					dbg ("driver usb-%s dev %d ed 0x%x unfreed URB",
! 						ohci->ohci_dev->slot_name, usb_dev->devnum, i);
  					ep_unlink (ohci, ed);
  				}
    				ep_rm_ed (usb_dev, ed);
--- 839,845 ----
    				if (ed->state == ED_OPER) {
  					/* driver on that interface didn't unlink an urb */
  					dbg ("driver usb-%s dev %d ed 0x%x unfreed URB",
! 						ohci->slot_name, usb_dev->devnum, i);
  					ep_unlink (ohci, ed);
  				}
    				ep_rm_ed (usb_dev, ed);
***************
*** 901,907 ****
  			} else {
  				/* likely some interface's driver has a refcount bug */
  				err ("bus %s devnum %d deletion in interrupt",
! 					ohci->ohci_dev->slot_name, usb_dev->devnum);
  				BUG ();
  			}
  		}
--- 884,890 ----
  			} else {
  				/* likely some interface's driver has a refcount bug */
  				err ("bus %s devnum %d deletion in interrupt",
! 					ohci->slot_name, usb_dev->devnum);
  				BUG ();
  			}
  		}
***************
*** 1080,1107 ****
  
  /*-------------------------------------------------------------------------*/
  
- /* scan the periodic table to find and unlink this ED */
- static void periodic_unlink (
- 	struct ohci	*ohci,
- 	struct ed	*ed,
- 	unsigned	index,
- 	unsigned	period
- ) {
- 	for (; index < NUM_INTS; index += period) {
- 		__u32	*ed_p = &ohci->hcca->int_table [index];
- 
- 		/* ED might have been unlinked through another path */
- 		while (*ed_p != 0) {
- 			if ((dma_to_ed (ohci, le32_to_cpup (ed_p))) == ed) {
- 				*ed_p = ed->hwNextED;		
- 				break;
- 			}
- 			ed_p = & ((dma_to_ed (ohci,
- 				le32_to_cpup (ed_p)))->hwNextED);
- 		}
- 	}	
- }
- 
  /* unlink an ed from one of the HC chains. 
   * just the link to the ed is unlinked.
   * the link from the ed still points to another operational ed or 0
--- 1063,1068 ----
***************
*** 1109,1115 ****
--- 1070,1080 ----
  
  static int ep_unlink (ohci_t * ohci, ed_t * ed) 
  {
+ 	int int_branch;
  	int i;
+ 	int inter;
+ 	int interval;
+ 	__u32 * ed_p;
  
  	ed->hwINFO |= cpu_to_le32 (OHCI_ED_SKIP);
  
***************
*** 1149,1156 ****
  		break;
        
  	case PIPE_INTERRUPT:
! 		periodic_unlink (ohci, ed, 0, 1);
! 		for (i = ed->int_branch; i < 32; i += ed->int_interval)
  		    ohci->ohci_int_load[i] -= ed->int_load;
  #ifdef DEBUG
  		ep_print_int_eds (ohci, "UNLINK_INT");
--- 1114,1134 ----
  		break;
        
  	case PIPE_INTERRUPT:
! 		int_branch = ed->int_branch;
! 		interval = ed->int_interval;
! 
! 		for (i = 0; i < ep_rev (6, interval); i += inter) {
! 			for (ed_p = &(ohci->hcca->int_table[ep_rev (5, i) + int_branch]), inter = 1; 
! 				(*ed_p != 0) && (*ed_p != ed->hwNextED); 
! 				ed_p = &((dma_to_ed (ohci, le32_to_cpup (ed_p)))->hwNextED), 
! 				inter = ep_rev (6, (dma_to_ed (ohci, le32_to_cpup (ed_p)))->int_interval)) {				
! 					if((dma_to_ed (ohci, le32_to_cpup (ed_p))) == ed) {
! 			  			*ed_p = ed->hwNextED;		
! 			  			break;
! 			  		}
! 			  }
! 		}
! 		for (i = int_branch; i < 32; i += interval)
  		    ohci->ohci_int_load[i] -= ed->int_load;
  #ifdef DEBUG
  		ep_print_int_eds (ohci, "UNLINK_INT");
***************
*** 1161,1173 ****
  		if (ohci->ed_isotail == ed)
  			ohci->ed_isotail = ed->ed_prev;
  		if (ed->hwNextED != 0) 
! 		    (dma_to_ed (ohci, le32_to_cpup (&ed->hwNextED)))
! 		    	->ed_prev = ed->ed_prev;
  				    
! 		if (ed->ed_prev != NULL)
  			ed->ed_prev->hwNextED = ed->hwNextED;
! 		else
! 			periodic_unlink (ohci, ed, 0, 1);
  #ifdef DEBUG
  		ep_print_int_eds (ohci, "UNLINK_ISO");
  #endif
--- 1139,1161 ----
  		if (ohci->ed_isotail == ed)
  			ohci->ed_isotail = ed->ed_prev;
  		if (ed->hwNextED != 0) 
! 		    (dma_to_ed (ohci, le32_to_cpup (&ed->hwNextED)))->ed_prev = ed->ed_prev;
  				    
! 		if (ed->ed_prev != NULL) {
  			ed->ed_prev->hwNextED = ed->hwNextED;
! 		} else {
! 			for (i = 0; i < 32; i++) {
! 				for (ed_p = &(ohci->hcca->int_table[ep_rev (5, i)]); 
! 						*ed_p != 0; 
! 						ed_p = &((dma_to_ed (ohci, le32_to_cpup (ed_p)))->hwNextED)) {
! 					// inter = ep_rev (6, (dma_to_ed (ohci, le32_to_cpup (ed_p)))->int_interval);
! 					if((dma_to_ed (ohci, le32_to_cpup (ed_p))) == ed) {
! 						*ed_p = ed->hwNextED;		
! 						break;
! 					}
! 				}
! 			}	
! 		}	
  #ifdef DEBUG
  		ep_print_int_eds (ohci, "UNLINK_ISO");
  #endif
***************
*** 1298,1304 ****
  static void
  td_fill (ohci_t * ohci, unsigned int info,
  	dma_addr_t data, int len,
! 	struct urb * urb, int index)
  {
  	volatile td_t  * td, * td_pt;
  	urb_priv_t * urb_priv = urb->hcpriv;
--- 1286,1292 ----
  static void
  td_fill (ohci_t * ohci, unsigned int info,
  	dma_addr_t data, int len,
! 	urb_t * urb, int index)
  {
  	volatile td_t  * td, * td_pt;
  	urb_priv_t * urb_priv = urb->hcpriv;
***************
*** 1307,1313 ****
  		err("internal OHCI error: TD index > length");
  		return;
  	}
! 	
  	/* use this td as the next dummy */
  	td_pt = urb_priv->td [index];
  	td_pt->hwNextTD = 0;
--- 1295,1301 ----
  		err("internal OHCI error: TD index > length");
  		return;
  	}
! 
  	/* use this td as the next dummy */
  	td_pt = urb_priv->td [index];
  	td_pt->hwNextTD = 0;
***************
*** 1339,1345 ****
  	td->hwPSW [0] = cpu_to_le16 ((data & 0x0FFF) | 0xE000);
  
  	/* append to queue */
- 	wmb();
  	td->ed->hwTailP = td->hwNextTD;
  }
  
--- 1327,1332 ----
***************
*** 1347,1353 ****
   
  /* prepare all TDs of a transfer */
  
! static void td_submit_urb (struct urb * urb)
  { 
  	urb_priv_t * urb_priv = urb->hcpriv;
  	ohci_t * ohci = (ohci_t *) urb->dev->bus->hcpriv;
--- 1334,1340 ----
   
  /* prepare all TDs of a transfer */
  
! static void td_submit_urb (urb_t * urb)
  { 
  	urb_priv_t * urb_priv = urb->hcpriv;
  	ohci_t * ohci = (ohci_t *) urb->dev->bus->hcpriv;
***************
*** 1403,1412 ****
  				cnt++;
  			}
  
! 			if (!ohci->sleeping) {
! 				wmb();
  				writel (OHCI_BLF, &ohci->regs->cmdstatus); /* start bulk list */
- 			}
  			break;
  
  		case PIPE_INTERRUPT:
--- 1390,1397 ----
  				cnt++;
  			}
  
! 			if (!ohci->sleeping)
  				writel (OHCI_BLF, &ohci->regs->cmdstatus); /* start bulk list */
  			break;
  
  		case PIPE_INTERRUPT:
***************
*** 1431,1440 ****
  			info = usb_pipeout (urb->pipe)? 
   				TD_CC | TD_DP_IN | TD_T_DATA1: TD_CC | TD_DP_OUT | TD_T_DATA1;
  			td_fill (ohci, info, data, 0, urb, cnt++);
! 			if (!ohci->sleeping) {
! 				wmb();
  				writel (OHCI_CLF, &ohci->regs->cmdstatus); /* start Control list */
- 			}
  			break;
  
  		case PIPE_ISOCHRONOUS:
--- 1416,1423 ----
  			info = usb_pipeout (urb->pipe)? 
   				TD_CC | TD_DP_IN | TD_T_DATA1: TD_CC | TD_DP_OUT | TD_T_DATA1;
  			td_fill (ohci, info, data, 0, urb, cnt++);
! 			if (!ohci->sleeping)
  				writel (OHCI_CLF, &ohci->regs->cmdstatus); /* start Control list */
  			break;
  
  		case PIPE_ISOCHRONOUS:
***************
*** 1460,1466 ****
  {
  	__u32 tdINFO, tdBE, tdCBP;
   	__u16 tdPSW;
!  	struct urb * urb = td->urb;
   	urb_priv_t * urb_priv = urb->hcpriv;
  	int dlen = 0;
  	int cc = 0;
--- 1443,1449 ----
  {
  	__u32 tdINFO, tdBE, tdCBP;
   	__u16 tdPSW;
!  	urb_t * urb = td->urb;
   	urb_priv_t * urb_priv = urb->hcpriv;
  	int dlen = 0;
  	int cc = 0;
***************
*** 1501,1507 ****
  
  /* handle an urb that is being unlinked */
  
! static void dl_del_urb (struct urb * urb)
  {
  	wait_queue_head_t * wait_head = ((urb_priv_t *)(urb->hcpriv))->wait;
  
--- 1484,1490 ----
  
  /* handle an urb that is being unlinked */
  
! static void dl_del_urb (urb_t * urb)
  {
  	wait_queue_head_t * wait_head = ((urb_priv_t *)(urb->hcpriv))->wait;
  
***************
*** 1513,1520 ****
  			urb->complete (urb);
  	} else {
  		urb->status = -ENOENT;
- 		if (urb->complete)
- 			urb->complete (urb);
  
  		/* unblock sohci_unlink_urb */
  		if (wait_head)
--- 1496,1501 ----
***************
*** 1592,1598 ****
  		td_p = &ed->hwHeadP;
  
  		for (td = tdHeadP; td != tdTailP; td = td_next) { 
! 			struct urb * urb = td->urb;
  			urb_priv_t * urb_priv = td->urb->hcpriv;
  			
  			td_next = dma_to_td (ohci, le32_to_cpup (&td->hwNextTD) & 0xfffffff0);
--- 1573,1579 ----
  		td_p = &ed->hwHeadP;
  
  		for (td = tdHeadP; td != tdTailP; td = td_next) { 
! 			urb_t * urb = td->urb;
  			urb_priv_t * urb_priv = td->urb->hcpriv;
  			
  			td_next = dma_to_td (ohci, le32_to_cpup (&td->hwNextTD) & 0xfffffff0);
***************
*** 1631,1636 ****
--- 1612,1622 ----
  			if (tdHeadP == tdTailP) {
  				if (ed->state == ED_OPER)
  					ep_unlink(ohci, ed);
+ 				td_free (ohci, tdTailP);
+ 				ed->hwINFO = cpu_to_le32 (OHCI_ED_SKIP);
+ 				ed->state = ED_NEW;
+ 				hash_free_ed(ohci, ed);
+ 				--(usb_to_ohci (ohci->dev[edINFO & 0x7F]))->ed_cnt;
  			} else
     	 			ed->hwINFO &= ~cpu_to_le32 (OHCI_ED_SKIP);
     	 	}
***************
*** 1675,1681 ****
    	td_t * td_list_next = NULL;
  	ed_t * ed;
  	int cc = 0;
! 	struct urb * urb;
  	urb_priv_t * urb_priv;
   	__u32 tdINFO, edHeadP, edTailP;
   	
--- 1661,1667 ----
    	td_t * td_list_next = NULL;
  	ed_t * ed;
  	int cc = 0;
! 	urb_t * urb;
  	urb_priv_t * urb_priv;
   	__u32 tdINFO, edHeadP, edTailP;
   	
***************
*** 1815,1821 ****
  	num_ports = roothub_a (ohci) & RH_A_NDP; 
  	if (num_ports > MAX_ROOT_PORTS) {
  		err ("bogus NDP=%d for OHCI usb-%s", num_ports,
! 			ohci->ohci_dev->slot_name);
  		err ("rereads as NDP=%d",
  			readl (&ohci->regs->roothub.a) & RH_A_NDP);
  		/* retry later; "should not happen" */
--- 1801,1807 ----
  	num_ports = roothub_a (ohci) & RH_A_NDP; 
  	if (num_ports > MAX_ROOT_PORTS) {
  		err ("bogus NDP=%d for OHCI usb-%s", num_ports,
! 			ohci->slot_name);
  		err ("rereads as NDP=%d",
  			readl (&ohci->regs->roothub.a) & RH_A_NDP);
  		/* retry later; "should not happen" */
***************
*** 1851,1857 ****
  {
  	int len; 
  
! 	struct urb * urb = (struct urb *) ptr;
  	ohci_t * ohci = urb->dev->bus->hcpriv;
  
  	if (ohci->disabled)
--- 1837,1843 ----
  {
  	int len; 
  
! 	urb_t * urb = (urb_t *) ptr;
  	ohci_t * ohci = urb->dev->bus->hcpriv;
  
  	if (ohci->disabled)
***************
*** 1880,1886 ****
  
  /* Root Hub INTs are polled by this timer */
  
! static int rh_init_int_timer (struct urb * urb) 
  {
  	ohci_t * ohci = urb->dev->bus->hcpriv;
  
--- 1866,1872 ----
  
  /* Root Hub INTs are polled by this timer */
  
! static int rh_init_int_timer (urb_t * urb) 
  {
  	ohci_t * ohci = urb->dev->bus->hcpriv;
  
***************
*** 1905,1916 ****
  
  /* request to virtual root hub */
  
! static int rh_submit_urb (struct urb * urb)
  {
  	struct usb_device * usb_dev = urb->dev;
  	ohci_t * ohci = usb_dev->bus->hcpriv;
  	unsigned int pipe = urb->pipe;
! 	struct usb_ctrlrequest * cmd = (struct usb_ctrlrequest *) urb->setup_packet;
  	void * data = urb->transfer_buffer;
  	int leni = urb->transfer_buffer_length;
  	int len = 0;
--- 1891,1902 ----
  
  /* request to virtual root hub */
  
! static int rh_submit_urb (urb_t * urb)
  {
  	struct usb_device * usb_dev = urb->dev;
  	ohci_t * ohci = usb_dev->bus->hcpriv;
  	unsigned int pipe = urb->pipe;
! 	devrequest * cmd = (devrequest *) urb->setup_packet;
  	void * data = urb->transfer_buffer;
  	int leni = urb->transfer_buffer_length;
  	int len = 0;
***************
*** 1934,1943 ****
  		return 0;
  	}
  
! 	bmRType_bReq  = cmd->bRequestType | (cmd->bRequest << 8);
! 	wValue        = le16_to_cpu (cmd->wValue);
! 	wIndex        = le16_to_cpu (cmd->wIndex);
! 	wLength       = le16_to_cpu (cmd->wLength);
  
  	switch (bmRType_bReq) {
  	/* Request Destination:
--- 1920,1929 ----
  		return 0;
  	}
  
! 	bmRType_bReq  = cmd->requesttype | (cmd->request << 8);
! 	wValue        = le16_to_cpu (cmd->value);
! 	wIndex        = le16_to_cpu (cmd->index);
! 	wLength       = le16_to_cpu (cmd->length);
  
  	switch (bmRType_bReq) {
  	/* Request Destination:
***************
*** 2111,2117 ****
  
  /*-------------------------------------------------------------------------*/
  
! static int rh_unlink_urb (struct urb * urb)
  {
  	ohci_t * ohci = urb->dev->bus->hcpriv;
   
--- 2097,2103 ----
  
  /*-------------------------------------------------------------------------*/
  
! static int rh_unlink_urb (urb_t * urb)
  {
  	ohci_t * ohci = urb->dev->bus->hcpriv;
   
***************
*** 2144,2151 ****
  	int timeout = 30;
  	int smm_timeout = 50; /* 0,5 sec */
  	 	
- #ifndef __hppa__
- 	/* PA-RISC doesn't have SMM, but PDC might leave IR set */
  	if (readl (&ohci->regs->control) & OHCI_CTRL_IR) { /* SMM owns the HC */
  		writel (OHCI_OCR, &ohci->regs->cmdstatus); /* request ownership */
  		dbg("USB HC TakeOver from SMM");
--- 2130,2135 ----
***************
*** 2156,2169 ****
  				return -1;
  			}
  		}
! 	}
! #endif	
  		
  	/* Disable HC interrupts */
  	writel (OHCI_INTR_MIE, &ohci->regs->intrdisable);
  
  	dbg("USB HC reset_hc usb-%s: ctrl = 0x%x ;",
! 		ohci->ohci_dev->slot_name,
  		readl (&ohci->regs->control));
  
    	/* Reset USB (needed by some controllers) */
--- 2140,2152 ----
  				return -1;
  			}
  		}
! 	}	
  		
  	/* Disable HC interrupts */
  	writel (OHCI_INTR_MIE, &ohci->regs->intrdisable);
  
  	dbg("USB HC reset_hc usb-%s: ctrl = 0x%x ;",
! 		ohci->slot_name,
  		readl (&ohci->regs->control));
  
    	/* Reset USB (needed by some controllers) */
***************
*** 2221,2239 ****
  	writel (mask, &ohci->regs->intrstatus);
  
  #ifdef	OHCI_USE_NPS
! 	if(ohci->flags & OHCI_QUIRK_SUCKYIO)
! 	{
! 		/* NSC 87560 at least requires different setup .. */
! 		writel ((roothub_a (ohci) | RH_A_NOCP) &
! 			~(RH_A_OCPM | RH_A_POTPGT | RH_A_PSM | RH_A_NPS),
! 			&ohci->regs->roothub.a);
! 	}
! 	else
! 	{
! 		/* required for AMD-756 and some Mac platforms */
! 		writel ((roothub_a (ohci) | RH_A_NPS) & ~RH_A_PSM,
! 			&ohci->regs->roothub.a);
! 	}
  	writel (RH_HS_LPSC, &ohci->regs->roothub.status);
  #endif	/* OHCI_USE_NPS */
  
--- 2204,2212 ----
  	writel (mask, &ohci->regs->intrstatus);
  
  #ifdef	OHCI_USE_NPS
! 	/* required for AMD-756 and some Mac platforms */
! 	writel ((roothub_a (ohci) | RH_A_NPS) & ~RH_A_PSM,
! 		&ohci->regs->roothub.a);
  	writel (RH_HS_LPSC, &ohci->regs->roothub.status);
  #endif	/* OHCI_USE_NPS */
  
***************
*** 2301,2328 ****
  	struct ohci_regs * regs = ohci->regs;
   	int ints; 
  
! 	/* avoid (slow) readl if only WDH happened */
! 	if ((ohci->hcca->done_head != 0)
! 			&& !(le32_to_cpup (&ohci->hcca->done_head) & 0x01)) {
  		ints =  OHCI_INTR_WDH;
! 
! 	/* cardbus/... hardware gone before remove() */
! 	} else if ((ints = readl (®s->intrstatus)) == ~(u32)0) {
! 		ohci->disabled++;
! 		err ("%s device removed!", ohci->ohci_dev->slot_name);
  		return;
! 
! 	/* interrupt for some other device? */
! 	} else if ((ints &= readl (®s->intrenable)) == 0) {
! 		return;
! 	} 
  
  	// dbg("Interrupt: %x frame: %x", ints, le16_to_cpu (ohci->hcca->frame_no));
  
  	if (ints & OHCI_INTR_UE) {
  		ohci->disabled++;
  		err ("OHCI Unrecoverable Error, controller usb-%s disabled",
! 			ohci->ohci_dev->slot_name);
  		// e.g. due to PCI Master/Target Abort
  
  #ifdef	DEBUG
--- 2274,2291 ----
  	struct ohci_regs * regs = ohci->regs;
   	int ints; 
  
! 	if ((ohci->hcca->done_head != 0) && !(le32_to_cpup (&ohci->hcca->done_head) & 0x01)) {
  		ints =  OHCI_INTR_WDH;
! 	} else if ((ints = (readl (®s->intrstatus) & readl (®s->intrenable))) == 0) {
  		return;
! 	}
  
  	// dbg("Interrupt: %x frame: %x", ints, le16_to_cpu (ohci->hcca->frame_no));
  
  	if (ints & OHCI_INTR_UE) {
  		ohci->disabled++;
  		err ("OHCI Unrecoverable Error, controller usb-%s disabled",
! 			ohci->slot_name);
  		// e.g. due to PCI Master/Target Abort
  
  #ifdef	DEBUG
***************
*** 2378,2383 ****
--- 2341,2347 ----
  static ohci_t * __devinit hc_alloc_ohci (struct pci_dev *dev, void * mem_base)
  {
  	ohci_t * ohci;
+ 	struct usb_bus * bus;
  
  	ohci = (ohci_t *) kmalloc (sizeof *ohci, GFP_KERNEL);
  	if (!ohci)
***************
*** 2399,2421 ****
  	ohci->regs = mem_base;   
  
  	ohci->ohci_dev = dev;
  	pci_set_drvdata(dev, ohci);
   
  	INIT_LIST_HEAD (&ohci->ohci_hcd_list);
  	list_add (&ohci->ohci_hcd_list, &ohci_hcd_list);
  
  	INIT_LIST_HEAD (&ohci->timeout_list);
  
! 	ohci->bus = usb_alloc_bus (&sohci_device_operations);
! 	if (!ohci->bus) {
! 		pci_set_drvdata (dev, NULL);
! 		pci_free_consistent (ohci->ohci_dev, sizeof *ohci->hcca,
! 				ohci->hcca, ohci->hcca_dma);
  		kfree (ohci);
  		return NULL;
  	}
! 	ohci->bus->bus_name = dev->slot_name;
! 	ohci->bus->hcpriv = (void *) ohci;
  
  	return ohci;
  } 
--- 2363,2385 ----
  	ohci->regs = mem_base;   
  
  	ohci->ohci_dev = dev;
+ #ifdef CONFIG_PCI
  	pci_set_drvdata(dev, ohci);
+ #endif
   
  	INIT_LIST_HEAD (&ohci->ohci_hcd_list);
  	list_add (&ohci->ohci_hcd_list, &ohci_hcd_list);
  
  	INIT_LIST_HEAD (&ohci->timeout_list);
  
! 	bus = usb_alloc_bus (&sohci_device_operations);
! 	if (!bus) {
  		kfree (ohci);
  		return NULL;
  	}
! 
! 	ohci->bus = bus;
! 	bus->hcpriv = (void *) ohci;
  
  	return ohci;
  } 
***************
*** 2427,2433 ****
  
  static void hc_release_ohci (ohci_t * ohci)
  {	
! 	dbg ("USB HC release ohci usb-%s", ohci->ohci_dev->slot_name);
  
  	/* disconnect all devices */    
  	if (ohci->bus->root_hub)
--- 2391,2397 ----
  
  static void hc_release_ohci (ohci_t * ohci)
  {	
! 	dbg ("USB HC release ohci usb-%s", ohci->slot_name);
  
  	/* disconnect all devices */    
  	if (ohci->bus->root_hub)
***************
*** 2440,2452 ****
  		free_irq (ohci->irq, ohci);
  		ohci->irq = -1;
  	}
! 	pci_set_drvdata(ohci->ohci_dev, NULL);
! 	if (ohci->bus) {
! 		if (ohci->bus->busnum != -1)
! 			usb_deregister_bus (ohci->bus);
  
! 		usb_free_bus (ohci->bus);
! 	}
  
  	list_del (&ohci->ohci_hcd_list);
  	INIT_LIST_HEAD (&ohci->ohci_hcd_list);
--- 2404,2415 ----
  		free_irq (ohci->irq, ohci);
  		ohci->irq = -1;
  	}
! #ifdef CONFIG_PCI
! 	pci_set_drvdata(ohci->ohci_dev, 0);
! #endif
  
! 	usb_deregister_bus (ohci->bus);
! 	usb_free_bus (ohci->bus);
  
  	list_del (&ohci->ohci_hcd_list);
  	INIT_LIST_HEAD (&ohci->ohci_hcd_list);
***************
*** 2463,2479 ****
  
  /*-------------------------------------------------------------------------*/
  
! /* Increment the module usage count, start the control thread and
!  * return success. */
! 
! static struct pci_driver ohci_pci_driver;
!  
! static int __devinit
! hc_found_ohci (struct pci_dev *dev, int irq,
! 	void *mem_base, const struct pci_device_id *id)
  {
- 	ohci_t * ohci;
  	char buf[8], *bufp = buf;
  	int ret;
  
  #ifndef __sparc__
--- 2426,2440 ----
  
  /*-------------------------------------------------------------------------*/
  
! /*
!  * Host bus independent add one OHCI host controller.
!  */
! int __devinit
! hc_add_ohci(struct pci_dev *dev, int irq, void *mem_base, unsigned long flags,
! 	    ohci_t **ohci, const char *name, const char *slot_name)
  {
  	char buf[8], *bufp = buf;
+ 	ohci_t * ohci;
  	int ret;
  
  #ifndef __sparc__
***************
*** 2483,2514 ****
  #endif
  	printk(KERN_INFO __FILE__ ": USB OHCI at membase 0x%lx, IRQ %s\n",
  		(unsigned long)	mem_base, bufp);
! 	printk(KERN_INFO __FILE__ ": usb-%s, %s\n", dev->slot_name, dev->name);
!     
  	ohci = hc_alloc_ohci (dev, mem_base);
  	if (!ohci) {
  		return -ENOMEM;
  	}
  	if ((ret = ohci_mem_init (ohci)) < 0) {
  		hc_release_ohci (ohci);
  		return ret;
  	}
! 	ohci->flags = id->driver_data;
! 	
! 	/* Check for NSC87560. We have to look at the bridge (fn1) to identify
! 	   the USB (fn2). This quirk might apply to more or even all NSC stuff
! 	   I don't know.. */
! 	   
! 	if(dev->vendor == PCI_VENDOR_ID_NS)
! 	{
! 		struct pci_dev *fn1  = pci_find_slot(dev->bus->number, PCI_DEVFN(PCI_SLOT(dev->devfn), 1));
! 		if(fn1 && fn1->vendor == PCI_VENDOR_ID_NS && fn1->device == PCI_DEVICE_ID_NS_87560_LIO)
! 			ohci->flags |= OHCI_QUIRK_SUCKYIO;
! 		
! 	}
! 	
! 	if (ohci->flags & OHCI_QUIRK_SUCKYIO)
! 		printk (KERN_INFO __FILE__ ": Using NSC SuperIO setup\n");
  	if (ohci->flags & OHCI_QUIRK_AMD756)
  		printk (KERN_INFO __FILE__ ": AMD756 erratum 4 workaround\n");
  
--- 2444,2460 ----
  #endif
  	printk(KERN_INFO __FILE__ ": USB OHCI at membase 0x%lx, IRQ %s\n",
  		(unsigned long)	mem_base, bufp);
! 
  	ohci = hc_alloc_ohci (dev, mem_base);
  	if (!ohci) {
  		return -ENOMEM;
  	}
+ 	ohci->slot_name = slot_name;
  	if ((ret = ohci_mem_init (ohci)) < 0) {
  		hc_release_ohci (ohci);
  		return ret;
  	}
! 	ohci->flags = flags;
  	if (ohci->flags & OHCI_QUIRK_AMD756)
  		printk (KERN_INFO __FILE__ ": AMD756 erratum 4 workaround\n");
  
***************
*** 2523,2530 ****
  
  	usb_register_bus (ohci->bus);
  	
! 	if (request_irq (irq, hc_interrupt, SA_SHIRQ,
! 			ohci_pci_driver.name, ohci) != 0) {
  		err ("request interrupt %s failed", bufp);
  		hc_release_ohci (ohci);
  		return -EBUSY;
--- 2469,2475 ----
  
  	usb_register_bus (ohci->bus);
  	
! 	if (request_irq (irq, hc_interrupt, SA_SHIRQ, name, ohci) != 0) {
  		err ("request interrupt %s failed", bufp);
  		hc_release_ohci (ohci);
  		return -EBUSY;
***************
*** 2532,2538 ****
  	ohci->irq = irq;     
  
  	if (hc_start (ohci) < 0) {
! 		err ("can't start usb-%s", dev->slot_name);
  		hc_release_ohci (ohci);
  		return -EBUSY;
  	}
--- 2477,2483 ----
  	ohci->irq = irq;     
  
  	if (hc_start (ohci) < 0) {
! 		err ("can't start usb-%s", ohci->slot_name);
  		hc_release_ohci (ohci);
  		return -EBUSY;
  	}
***************
*** 2543,2656 ****
  	return 0;
  }
  
! /*-------------------------------------------------------------------------*/
! 
! #ifdef	CONFIG_PM
! 
! /* controller died; cleanup debris, then restart */
! /* must not be called from interrupt context */
! 
! static void hc_restart (ohci_t *ohci)
! {
! 	int temp;
! 	int i;
! 
! 	if (ohci->pci_latency)
! 		pci_write_config_byte (ohci->ohci_dev, PCI_LATENCY_TIMER, ohci->pci_latency);
! 
! 	ohci->disabled = 1;
! 	ohci->sleeping = 0;
! 	if (ohci->bus->root_hub)
! 		usb_disconnect (&ohci->bus->root_hub);
! 	
! 	/* empty the interrupt branches */
! 	for (i = 0; i < NUM_INTS; i++) ohci->ohci_int_load[i] = 0;
! 	for (i = 0; i < NUM_INTS; i++) ohci->hcca->int_table[i] = 0;
! 	
! 	/* no EDs to remove */
! 	ohci->ed_rm_list [0] = NULL;
! 	ohci->ed_rm_list [1] = NULL;
! 
! 	/* empty control and bulk lists */	 
! 	ohci->ed_isotail     = NULL;
! 	ohci->ed_controltail = NULL;
! 	ohci->ed_bulktail    = NULL;
! 
! 	if ((temp = hc_reset (ohci)) < 0 || (temp = hc_start (ohci)) < 0) {
! 		err ("can't restart usb-%s, %d", ohci->ohci_dev->slot_name, temp);
! 	} else
! 		dbg ("restart usb-%s completed", ohci->ohci_dev->slot_name);
! }
! 
! #endif	/* CONFIG_PM */
! 
! /*-------------------------------------------------------------------------*/
! 
! /* configured so that an OHCI device is always provided */
! /* always called with process context; sleeping is OK */
! 
! static int __devinit
! ohci_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
  {
- 	unsigned long mem_resource, mem_len;
- 	void *mem_base;
- 	int status;
- 
- 	if (pci_enable_device(dev) < 0)
- 		return -ENODEV;
- 
-         if (!dev->irq) {
-         	err("found OHCI device with no IRQ assigned. check BIOS settings!");
- 		pci_disable_device (dev);
-    	        return -ENODEV;
-         }
- 	
- 	/* we read its hardware registers as memory */
- 	mem_resource = pci_resource_start(dev, 0);
- 	mem_len = pci_resource_len(dev, 0);
- 	if (!request_mem_region (mem_resource, mem_len, ohci_pci_driver.name)) {
- 		dbg ("controller already in use");
- 		pci_disable_device (dev);
- 		return -EBUSY;
- 	}
- 
- 	mem_base = ioremap_nocache (mem_resource, mem_len);
- 	if (!mem_base) {
- 		err("Error mapping OHCI memory");
- 		release_mem_region (mem_resource, mem_len);
- 		pci_disable_device (dev);
- 		return -EFAULT;
- 	}
- 
- 	/* controller writes into our memory */
- 	pci_set_master (dev);
- 
- 	status = hc_found_ohci (dev, dev->irq, mem_base, id);
- 	if (status < 0) {
- 		iounmap (mem_base);
- 		release_mem_region (mem_resource, mem_len);
- 		pci_disable_device (dev);
- 	}
- 	return status;
- } 
- 
- /*-------------------------------------------------------------------------*/
- 
- /* may be called from interrupt context [interface spec] */
- /* may be called without controller present */
- /* may be called with controller, bus, and devices active */
- 
- static void __devexit
- ohci_pci_remove (struct pci_dev *dev)
- {
- 	ohci_t		*ohci = pci_get_drvdata(dev);
- 
- 	dbg ("remove %s controller usb-%s%s%s",
- 		hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS),
- 		dev->slot_name,
- 		ohci->disabled ? " (disabled)" : "",
- 		in_interrupt () ? " in interrupt" : ""
- 		);
  #ifdef	DEBUG
  	ohci_dump (ohci, 1);
  #endif
--- 2488,2498 ----
  	return 0;
  }
  
! /*
!  * Host bus independent remove one OHCI host controller.
!  */
! void __devexit hc_remove_ohci(ohci_t *ohci)
  {
  #ifdef	DEBUG
  	ohci_dump (ohci, 1);
  #endif
***************
*** 2667,2936 ****
  			&ohci->regs->control);
  
  	hc_release_ohci (ohci);
- 
- 	release_mem_region (pci_resource_start (dev, 0), pci_resource_len (dev, 0));
- 	pci_disable_device (dev);
- }
- 
- 
- #ifdef	CONFIG_PM
- 
- /*-------------------------------------------------------------------------*/
- 
- static int
- ohci_pci_suspend (struct pci_dev *dev, u32 state)
- {
- 	ohci_t			*ohci = pci_get_drvdata(dev);
- 	unsigned long		flags;
- 	u16 cmd;
- 
- 	if ((ohci->hc_control & OHCI_CTRL_HCFS) != OHCI_USB_OPER) {
- 		dbg ("can't suspend usb-%s (state is %s)", dev->slot_name,
- 			hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS));
- 		return -EIO;
- 	}
- 
- 	/* act as if usb suspend can always be used */
- 	info ("USB suspend: usb-%s", dev->slot_name);
- 	ohci->sleeping = 1;
- 
- 	/* First stop processing */
-   	spin_lock_irqsave (&usb_ed_lock, flags);
- 	ohci->hc_control &= ~(OHCI_CTRL_PLE|OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_IE);
- 	writel (ohci->hc_control, &ohci->regs->control);
- 	writel (OHCI_INTR_SF, &ohci->regs->intrstatus);
- 	(void) readl (&ohci->regs->intrstatus);
-   	spin_unlock_irqrestore (&usb_ed_lock, flags);
- 
- 	/* Wait a frame or two */
- 	mdelay(1);
- 	if (!readl (&ohci->regs->intrstatus) & OHCI_INTR_SF)
- 		mdelay (1);
- 		
- #ifdef CONFIG_PMAC_PBOOK
- 	if (_machine == _MACH_Pmac)
- 		disable_irq (ohci->irq);
- 	/* else, 2.4 assumes shared irqs -- don't disable */
- #endif
- 	/* Enable remote wakeup */
- 	writel (readl(&ohci->regs->intrenable) | OHCI_INTR_RD, &ohci->regs->intrenable);
- 
- 	/* Suspend chip and let things settle down a bit */
- 	ohci->hc_control = OHCI_USB_SUSPEND;
- 	writel (ohci->hc_control, &ohci->regs->control);
- 	(void) readl (&ohci->regs->control);
- 	mdelay (500); /* No schedule here ! */
- 	switch (readl (&ohci->regs->control) & OHCI_CTRL_HCFS) {
- 		case OHCI_USB_RESET:
- 			dbg("Bus in reset phase ???");
- 			break;
- 		case OHCI_USB_RESUME:
- 			dbg("Bus in resume phase ???");
- 			break;
- 		case OHCI_USB_OPER:
- 			dbg("Bus in operational phase ???");
- 			break;
- 		case OHCI_USB_SUSPEND:
- 			dbg("Bus suspended");
- 			break;
- 	}
- 	/* In some rare situations, Apple's OHCI have happily trashed
- 	 * memory during sleep. We disable it's bus master bit during
- 	 * suspend
- 	 */
- 	pci_read_config_word (dev, PCI_COMMAND, &cmd);
- 	cmd &= ~PCI_COMMAND_MASTER;
- 	pci_write_config_word (dev, PCI_COMMAND, cmd);
- #ifdef CONFIG_PMAC_PBOOK
- 	{
- 	   	struct device_node	*of_node;
- 
- 		/* Disable USB PAD & cell clock */
- 		of_node = pci_device_to_OF_node (ohci->ohci_dev);
- 		if (of_node)
- 			pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0);
- 	}
- #endif
- 	return 0;
- }
- 
- /*-------------------------------------------------------------------------*/
- 
- static int
- ohci_pci_resume (struct pci_dev *dev)
- {
- 	ohci_t		*ohci = pci_get_drvdata(dev);
- 	int		temp;
- 	unsigned long	flags;
- 
- 	/* guard against multiple resumes */
- 	atomic_inc (&ohci->resume_count);
- 	if (atomic_read (&ohci->resume_count) != 1) {
- 		err ("concurrent PCI resumes for usb-%s", dev->slot_name);
- 		atomic_dec (&ohci->resume_count);
- 		return 0;
- 	}
- 
- #ifdef CONFIG_PMAC_PBOOK
- 	{
- 		struct device_node *of_node;
- 
- 		/* Re-enable USB PAD & cell clock */
- 		of_node = pci_device_to_OF_node (ohci->ohci_dev);
- 		if (of_node)
- 			pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 1);
- 	}
- #endif
- 
- 	/* did we suspend, or were we powered off? */
- 	ohci->hc_control = readl (&ohci->regs->control);
- 	temp = ohci->hc_control & OHCI_CTRL_HCFS;
- 
- #ifdef DEBUG
- 	/* the registers may look crazy here */
- 	ohci_dump_status (ohci);
- #endif
- 
- 	/* Re-enable bus mastering */
- 	pci_set_master(ohci->ohci_dev);
- 	
- 	switch (temp) {
- 
- 	case OHCI_USB_RESET:	// lost power
- 		info ("USB restart: usb-%s", dev->slot_name);
- 		hc_restart (ohci);
- 		break;
- 
- 	case OHCI_USB_SUSPEND:	// host wakeup
- 	case OHCI_USB_RESUME:	// remote wakeup
- 		info ("USB continue: usb-%s from %s wakeup", dev->slot_name,
- 			(temp == OHCI_USB_SUSPEND)
- 				? "host" : "remote");
- 		ohci->hc_control = OHCI_USB_RESUME;
- 		writel (ohci->hc_control, &ohci->regs->control);
- 		(void) readl (&ohci->regs->control);
- 		mdelay (20); /* no schedule here ! */
- 		/* Some controllers (lucent) need a longer delay here */
- 		mdelay (15);
- 		temp = readl (&ohci->regs->control);
- 		temp = ohci->hc_control & OHCI_CTRL_HCFS;
- 		if (temp != OHCI_USB_RESUME) {
- 			err ("controller usb-%s won't resume", dev->slot_name);
- 			ohci->disabled = 1;
- 			return -EIO;
- 		}
- 
- 		/* Some chips likes being resumed first */
- 		writel (OHCI_USB_OPER, &ohci->regs->control);
- 		(void) readl (&ohci->regs->control);
- 		mdelay (3);
- 
- 		/* Then re-enable operations */
- 		spin_lock_irqsave (&usb_ed_lock, flags);
- 		ohci->disabled = 0;
- 		ohci->sleeping = 0;
- 		ohci->hc_control = OHCI_CONTROL_INIT | OHCI_USB_OPER;
- 		if (!ohci->ed_rm_list[0] && !ohci->ed_rm_list[1]) {
- 			if (ohci->ed_controltail)
- 				ohci->hc_control |= OHCI_CTRL_CLE;
- 			if (ohci->ed_bulktail)
- 				ohci->hc_control |= OHCI_CTRL_BLE;
- 		}
- 		writel (ohci->hc_control, &ohci->regs->control);
- 		writel (OHCI_INTR_SF, &ohci->regs->intrstatus);
- 		writel (OHCI_INTR_SF, &ohci->regs->intrenable);
- 		/* Check for a pending done list */
- 		writel (OHCI_INTR_WDH, &ohci->regs->intrdisable);	
- 		(void) readl (&ohci->regs->intrdisable);
- 		spin_unlock_irqrestore (&usb_ed_lock, flags);
- #ifdef CONFIG_PMAC_PBOOK
- 		if (_machine == _MACH_Pmac)
- 			enable_irq (ohci->irq);
- #endif
- 		if (ohci->hcca->done_head)
- 			dl_done_list (ohci, dl_reverse_done_list (ohci));
- 		writel (OHCI_INTR_WDH, &ohci->regs->intrenable); 
- 		writel (OHCI_BLF, &ohci->regs->cmdstatus); /* start bulk list */
- 		writel (OHCI_CLF, &ohci->regs->cmdstatus); /* start Control list */
- 		break;
- 
- 	default:
- 		warn ("odd PCI resume for usb-%s", dev->slot_name);
- 	}
- 
- 	/* controller is operational, extra resumes are harmless */
- 	atomic_dec (&ohci->resume_count);
- 
- 	return 0;
  }
  
- #endif	/* CONFIG_PM */
- 
- 
- /*-------------------------------------------------------------------------*/
- 
- static const struct pci_device_id __devinitdata ohci_pci_ids [] = { {
- 
- 	/*
- 	 * AMD-756 [Viper] USB has a serious erratum when used with
- 	 * lowspeed devices like mice.
- 	 */
- 	vendor:		0x1022,
- 	device:		0x740c,
- 	subvendor:	PCI_ANY_ID,
- 	subdevice:	PCI_ANY_ID,
- 
- 	driver_data:	OHCI_QUIRK_AMD756,
- 
- } , {
- 
- 	/* handle any USB OHCI controller */
- 	class: 		((PCI_CLASS_SERIAL_USB << 8) | 0x10),
- 	class_mask: 	~0,
- 
- 	/* no matter who makes it */
- 	vendor:		PCI_ANY_ID,
- 	device:		PCI_ANY_ID,
- 	subvendor:	PCI_ANY_ID,
- 	subdevice:	PCI_ANY_ID,
- 
- 	}, { /* end: all zeroes */ }
- };
- 
- MODULE_DEVICE_TABLE (pci, ohci_pci_ids);
- 
- static struct pci_driver ohci_pci_driver = {
- 	name:		"usb-ohci",
- 	id_table:	&ohci_pci_ids [0],
- 
- 	probe:		ohci_pci_probe,
- 	remove:		__devexit_p(ohci_pci_remove),
- 
- #ifdef	CONFIG_PM
- 	suspend:	ohci_pci_suspend,
- 	resume:		ohci_pci_resume,
- #endif	/* PM */
- };
- 
-  
- /*-------------------------------------------------------------------------*/
- 
- static int __init ohci_hcd_init (void) 
- {
- 	return pci_module_init (&ohci_pci_driver);
- }
- 
- /*-------------------------------------------------------------------------*/
- 
- static void __exit ohci_hcd_cleanup (void) 
- {	
- 	pci_unregister_driver (&ohci_pci_driver);
- }
- 
- module_init (ohci_hcd_init);
- module_exit (ohci_hcd_cleanup);
- 
- 
  MODULE_AUTHOR( DRIVER_AUTHOR );
  MODULE_DESCRIPTION( DRIVER_DESC );
  MODULE_LICENSE("GPL");
--- 2509,2521 ----
  			&ohci->regs->control);
  
  	hc_release_ohci (ohci);
  }
  
  MODULE_AUTHOR( DRIVER_AUTHOR );
  MODULE_DESCRIPTION( DRIVER_DESC );
  MODULE_LICENSE("GPL");
+ 
+ /* Hack until usb-ohci-pci is made completely independent */
+ #if !defined(CONFIG_USB_OHCI_SA1111) && !defined(CONFIG_USB_NON_PCI_OHCI)
+ #include "usb-ohci-pci.c"
+ #endif
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-ohci.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-ohci.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-ohci.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-ohci.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,3 ****
--- 1,6 ----
+ #ifndef _USB_OHCI_H
+ #define _USB_OHCI_H
+ 
  /*
   * URB OHCI HCD (Host Controller Driver) for USB.
   * 
***************
*** 111,117 ****
    	__u8 index;
    	struct ed * ed;
    	struct td * next_dl_td;
!   	struct urb * urb;
  
  	dma_addr_t td_dma;
  	dma_addr_t data_dma;
--- 114,120 ----
    	__u8 index;
    	struct ed * ed;
    	struct td * next_dl_td;
!   	urb_t * urb;
  
  	dma_addr_t td_dma;
  	dma_addr_t data_dma;
***************
*** 381,387 ****
  	atomic_t resume_count;		/* defending against multiple resumes */
  	unsigned long flags;		/* for HC bugs */
  #define	OHCI_QUIRK_AMD756	0x01		/* erratum #4 */
- #define OHCI_QUIRK_SUCKYIO	0x02		/* NSC superio */
  
  	struct ohci_regs * regs;	/* OHCI controller's memory */
  	struct list_head ohci_hcd_list;	/* list of all ohci_hcd */
--- 384,389 ----
***************
*** 404,409 ****
--- 406,412 ----
  
  	/* PCI device handle, settings, ... */
  	struct pci_dev	*ohci_dev;
+ 	const char	*slot_name;
  	u8		pci_latency;
  	struct pci_pool	*td_cache;
  	struct pci_pool	*dev_cache;
***************
*** 431,446 ****
  static ed_t * ep_add_ed(struct usb_device * usb_dev, unsigned int pipe, int interval, int load, int mem_flags);
  static void ep_rm_ed(struct usb_device * usb_dev, ed_t * ed);
  /* td */
! static void td_fill(ohci_t * ohci, unsigned int info, dma_addr_t data, int len, struct urb * urb, int index);
! static void td_submit_urb(struct urb * urb);
  /* root hub */
! static int rh_submit_urb(struct urb * urb);
! static int rh_unlink_urb(struct urb * urb);
! static int rh_init_int_timer(struct urb * urb);
  
  /*-------------------------------------------------------------------------*/
  
! #define ALLOC_FLAGS (in_interrupt () || current->state != TASK_RUNNING ? GFP_ATOMIC : GFP_KERNEL)
  
  #ifdef DEBUG
  #	define OHCI_MEM_FLAGS	SLAB_POISON
--- 434,449 ----
  static ed_t * ep_add_ed(struct usb_device * usb_dev, unsigned int pipe, int interval, int load, int mem_flags);
  static void ep_rm_ed(struct usb_device * usb_dev, ed_t * ed);
  /* td */
! static void td_fill(ohci_t * ohci, unsigned int info, dma_addr_t data, int len, urb_t * urb, int index);
! static void td_submit_urb(urb_t * urb);
  /* root hub */
! static int rh_submit_urb(urb_t * urb);
! static int rh_unlink_urb(urb_t * urb);
! static int rh_init_int_timer(urb_t * urb);
  
  /*-------------------------------------------------------------------------*/
  
! #define ALLOC_FLAGS (in_interrupt () ? GFP_ATOMIC : GFP_KERNEL)
  
  #ifdef DEBUG
  #	define OHCI_MEM_FLAGS	SLAB_POISON
***************
*** 449,455 ****
  #endif
   
  #ifndef CONFIG_PCI
! #	error "usb-ohci currently requires PCI-based controllers"
  	/* to support non-PCI OHCIs, you need custom bus/mem/... glue */
  #endif
  
--- 452,458 ----
  #endif
   
  #ifndef CONFIG_PCI
! //#	error "usb-ohci currently requires PCI-based controllers"
  	/* to support non-PCI OHCIs, you need custom bus/mem/... glue */
  #endif
  
***************
*** 642,644 ****
--- 645,648 ----
  	pci_pool_free (hc->dev_cache, dev, dev->dma);
  }
  
+ #endif
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-skeleton.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-skeleton.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-skeleton.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-skeleton.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,5 ****
  /*
!  * USB Skeleton driver - 0.7
   *
   * Copyright (c) 2001 Greg Kroah-Hartman (greg@kroah.com)
   *
--- 1,5 ----
  /*
!  * USB Skeleton driver - 0.6
   *
   * Copyright (c) 2001 Greg Kroah-Hartman (greg@kroah.com)
   *
***************
*** 22,30 ****
   *
   * History:
   *
-  * 2002_02_12 - 0.7 - zero out dev in probe function for devices that do
-  *			not have both a bulk in and bulk out endpoint.
-  *			Thanks to Holger Waechtler for the fix.
   * 2001_11_05 - 0.6 - fix minor locking problem in skel_disconnect.
   *			Thanks to Pete Zaitcev for the fix.
   * 2001_09_04 - 0.5 - fix devfs bug in skel_disconnect. Thanks to wim delvaux
--- 22,27 ----
***************
*** 141,177 ****
  /* lock to protect the minor_table structure */
  static DECLARE_MUTEX (minor_table_mutex);
  
! /*
!  * File operations needed when we register this driver.
!  * This assumes that this driver NEEDS file operations,
!  * of course, which means that the driver is expected
!  * to have a node in the /dev directory. If the USB
!  * device were for a network interface then the driver
!  * would use "struct net_driver" instead, and a serial
!  * device would use "struct tty_driver". 
!  */
  static struct file_operations skel_fops = {
- 	/*
- 	 * The owner field is part of the module-locking
- 	 * mechanism. The idea is that the kernel knows
- 	 * which module to increment the use-counter of
- 	 * BEFORE it calls the device's open() function.
- 	 * This also means that the kernel can decrement
- 	 * the use-counter again before calling release()
- 	 * or should the open() function fail.
- 	 *
- 	 * Not all device structures have an "owner" field
- 	 * yet. "struct file_operations" and "struct net_device"
- 	 * do, while "struct tty_driver" does not. If the struct
- 	 * has an "owner" field, then initialize it to the value
- 	 * THIS_MODULE and the kernel will handle all module
- 	 * locking for you automatically. Otherwise, you must
- 	 * increment the use-counter in the open() function
- 	 * and decrement it again in the release() function
- 	 * yourself.
- 	 */
  	owner:		THIS_MODULE,
- 
  	read:		skel_read,
  	write:		skel_write,
  	ioctl:		skel_ioctl,
--- 138,146 ----
  /* lock to protect the minor_table structure */
  static DECLARE_MUTEX (minor_table_mutex);
  
! /* file operations needed when we register this driver */
  static struct file_operations skel_fops = {
  	owner:		THIS_MODULE,
  	read:		skel_read,
  	write:		skel_write,
  	ioctl:		skel_ioctl,
***************
*** 246,256 ****
  		return -ENODEV;
  	}
  
! 	/* Increment our usage count for the module.
! 	 * This is redundant here, because "struct file_operations"
! 	 * has an "owner" field. This line is included here soley as
! 	 * a reference for drivers using lesser structures... ;-)
! 	 */
  	MOD_INC_USE_COUNT;
  
  	/* lock our minor table and get our local data for this minor */
--- 215,221 ----
  		return -ENODEV;
  	}
  
! 	/* increment our usage count for the module */
  	MOD_INC_USE_COUNT;
  
  	/* lock our minor table and get our local data for this minor */
***************
*** 313,320 ****
  		/* the device was unplugged before the file was released */
  		up (&dev->sem);
  		skel_delete (dev);
- 		up (&minor_table_mutex);
  		MOD_DEC_USE_COUNT;
  		return 0;
  	}
  
--- 278,285 ----
  		/* the device was unplugged before the file was released */
  		up (&dev->sem);
  		skel_delete (dev);
  		MOD_DEC_USE_COUNT;
+ 		up (&minor_table_mutex);
  		return 0;
  	}
  
***************
*** 543,549 ****
  		err ("Out of memory");
  		goto exit;
  	}
- 	memset (dev, 0x00, sizeof (*dev));
  	minor_table[minor] = dev;
  
  	interface = &udev->actconfig->interface[ifnum];
--- 508,513 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-uhci.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-uhci.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-uhci.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-uhci.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 16,22 ****
   * (C) Copyright 1999 Randy Dunlap
   * (C) Copyright 1999 Gregory P. Smith
   *
!  * $Id: usb-uhci.c,v 1.275 2002/01/19 20:57:33 acher Exp $
   */
  
  #include 
--- 16,22 ----
   * (C) Copyright 1999 Randy Dunlap
   * (C) Copyright 1999 Gregory P. Smith
   *
!  * $Id: usb-uhci.c,v 1.268 2001/08/29 14:08:43 acher Exp $
   */
  
  #include 
***************
*** 34,40 ****
  #include 
  #include 
  #include 
- #include 
  
  #include 
  #include 
--- 34,39 ----
***************
*** 53,70 ****
  /* This enables an extra UHCI slab for memory debugging */
  #define DEBUG_SLAB
  
! #define VERSTR "$Revision: 1.275 $ time " __TIME__ " " __DATE__
  
  #include 
  #include "usb-uhci.h"
  #include "usb-uhci-debug.h"
  
- #include "hcd.h"
- 
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.275"
  #define DRIVER_AUTHOR "Georg Acher, Deti Fliegl, Thomas Sailer, Roman Weissgaerber"
  #define DRIVER_DESC "USB Universal Host Controller Interface driver"
  
--- 52,67 ----
  /* This enables an extra UHCI slab for memory debugging */
  #define DEBUG_SLAB
  
! #define VERSTR "$Revision: 1.268 $ time " __TIME__ " " __DATE__
  
  #include 
  #include "usb-uhci.h"
  #include "usb-uhci-debug.h"
  
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.268"
  #define DRIVER_AUTHOR "Georg Acher, Deti Fliegl, Thomas Sailer, Roman Weissgaerber"
  #define DRIVER_DESC "USB Universal Host Controller Interface driver"
  
***************
*** 74,82 ****
  #define DEBUG_SYMBOLS
  #ifdef DEBUG_SYMBOLS
  	#define _static
- 	#ifndef EXPORT_SYMTAB
- 		#define EXPORT_SYMTAB
- 	#endif
  #else
  	#define _static static
  #endif
--- 71,76 ----
***************
*** 88,95 ****
  	static kmem_cache_t *urb_priv_kmem;
  #endif
  
! #define SLAB_FLAG     (in_interrupt () || current->state != TASK_RUNNING ? SLAB_ATOMIC : SLAB_KERNEL)
! #define KMALLOC_FLAG  (in_interrupt () || current->state != TASK_RUNNING ? GFP_ATOMIC : GFP_KERNEL)
  
  /* CONFIG_USB_UHCI_HIGH_BANDWITH turns on Full Speed Bandwidth
   * Reclamation: feature that puts loop on descriptor loop when
--- 82,89 ----
  	static kmem_cache_t *urb_priv_kmem;
  #endif
  
! #define SLAB_FLAG     (in_interrupt ()? SLAB_ATOMIC : SLAB_KERNEL)
! #define KMALLOC_FLAG  (in_interrupt ()? GFP_ATOMIC : GFP_KERNEL)
  
  /* CONFIG_USB_UHCI_HIGH_BANDWITH turns on Full Speed Bandwidth
   * Reclamation: feature that puts loop on descriptor loop when
***************
*** 97,103 ****
   * is optimal, but PCI can be slowed down up-to 5 times, slowing down
   * system performance (eg. framebuffer devices).
   */
! #define CONFIG_USB_UHCI_HIGH_BANDWIDTH
  
  /* *_DEPTH_FIRST puts descriptor in depth-first mode. This has
   * somehow similar effect to FSBR (higher speed), but does not
--- 91,97 ----
   * is optimal, but PCI can be slowed down up-to 5 times, slowing down
   * system performance (eg. framebuffer devices).
   */
! #define CONFIG_USB_UHCI_HIGH_BANDWIDTH 
  
  /* *_DEPTH_FIRST puts descriptor in depth-first mode. This has
   * somehow similar effect to FSBR (higher speed), but does not
***************
*** 119,130 ****
  // Suppress HC interrupt error messages for 5s
  #define ERROR_SUPPRESSION_TIME (HZ*5)
  
! _static int rh_submit_urb (struct urb *urb);
! _static int rh_unlink_urb (struct urb *urb);
  _static int delete_qh (uhci_t *s, uhci_desc_t *qh);
! _static int process_transfer (uhci_t *s, struct urb *urb, int mode);
! _static int process_interrupt (uhci_t *s, struct urb *urb);
! _static int process_iso (uhci_t *s, struct urb *urb, int force);
  
  // How much URBs with ->next are walked
  #define MAX_NEXT_COUNT 2048
--- 113,124 ----
  // Suppress HC interrupt error messages for 5s
  #define ERROR_SUPPRESSION_TIME (HZ*5)
  
! _static int rh_submit_urb (urb_t *urb);
! _static int rh_unlink_urb (urb_t *urb);
  _static int delete_qh (uhci_t *s, uhci_desc_t *qh);
! _static int process_transfer (uhci_t *s, urb_t *urb, int mode);
! _static int process_interrupt (uhci_t *s, urb_t *urb);
! _static int process_iso (uhci_t *s, urb_t *urb, int force);
  
  // How much URBs with ->next are walked
  #define MAX_NEXT_COUNT 2048
***************
*** 145,151 ****
  	q=s->free_desc.prev;
  
  	while (q != &s->free_desc && (force || n<100)) {
! 		qh = list_entry (q, uhci_desc_t, horizontal);
  		q=qh->horizontal.prev;
  
  		if ((qh->last_used!=now) || force)
--- 139,145 ----
  	q=s->free_desc.prev;
  
  	while (q != &s->free_desc && (force || n<100)) {
! 		qh = list_entry (q, uhci_desc_t, horizontal);		
  		q=qh->horizontal.prev;
  
  		if ((qh->last_used!=now) || force)
***************
*** 170,178 ****
  }
  /*-------------------------------------------------------------------*/
  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
! _static void enable_desc_loop(uhci_t *s, struct urb *urb)
  {
! 	unsigned long flags;
  
  	if (urb->transfer_flags & USB_NO_FSBR)
  		return;
--- 164,172 ----
  }
  /*-------------------------------------------------------------------*/
  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
! _static void enable_desc_loop(uhci_t *s, urb_t *urb)
  {
! 	int flags;
  
  	if (urb->transfer_flags & USB_NO_FSBR)
  		return;
***************
*** 185,193 ****
  	spin_unlock_irqrestore (&s->qh_lock, flags);
  }
  /*-------------------------------------------------------------------*/
! _static void disable_desc_loop(uhci_t *s, struct urb *urb)
  {
! 	unsigned long flags;
  
  	if (urb->transfer_flags & USB_NO_FSBR)
  		return;
--- 179,187 ----
  	spin_unlock_irqrestore (&s->qh_lock, flags);
  }
  /*-------------------------------------------------------------------*/
! _static void disable_desc_loop(uhci_t *s, urb_t *urb)
  {
! 	int flags;
  
  	if (urb->transfer_flags & USB_NO_FSBR)
  		return;
***************
*** 206,212 ****
  }
  #endif
  /*-------------------------------------------------------------------*/
! _static void queue_urb_unlocked (uhci_t *s, struct urb *urb)
  {
  	struct list_head *p=&urb->urb_list;
  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
--- 200,206 ----
  }
  #endif
  /*-------------------------------------------------------------------*/
! _static void queue_urb_unlocked (uhci_t *s, urb_t *urb)
  {
  	struct list_head *p=&urb->urb_list;
  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
***************
*** 226,232 ****
  	uhci_switch_timer_int(s);
  }
  /*-------------------------------------------------------------------*/
! _static void queue_urb (uhci_t *s, struct urb *urb)
  {
  	unsigned long flags=0;
  
--- 220,226 ----
  	uhci_switch_timer_int(s);
  }
  /*-------------------------------------------------------------------*/
! _static void queue_urb (uhci_t *s, urb_t *urb)
  {
  	unsigned long flags=0;
  
***************
*** 235,241 ****
  	spin_unlock_irqrestore (&s->urb_list_lock, flags);
  }
  /*-------------------------------------------------------------------*/
! _static void dequeue_urb (uhci_t *s, struct urb *urb)
  {
  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
  	int type;
--- 229,235 ----
  	spin_unlock_irqrestore (&s->urb_list_lock, flags);
  }
  /*-------------------------------------------------------------------*/
! _static void dequeue_urb (uhci_t *s, urb_t *urb)
  {
  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
  	int type;
***************
*** 700,706 ****
  //                         LOW LEVEL STUFF
  //          assembles QHs und TDs for control, bulk and iso
  /*-------------------------------------------------------------------*/
! _static int uhci_submit_control_urb (struct urb *urb)
  {
  	uhci_desc_t *qh, *td;
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
--- 694,700 ----
  //                         LOW LEVEL STUFF
  //          assembles QHs und TDs for control, bulk and iso
  /*-------------------------------------------------------------------*/
! _static int uhci_submit_control_urb (urb_t *urb)
  {
  	uhci_desc_t *qh, *td;
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
***************
*** 817,823 ****
  // For queued bulk transfers, two additional QH helpers are allocated (nqh, bqh)
  // Due to the linking with other bulk urbs, it has to be locked with urb_list_lock!
  
! _static int uhci_submit_bulk_urb (struct urb *urb, struct urb *bulk_urb)
  {
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
  	urb_priv_t *urb_priv = urb->hcpriv, *upriv, *bpriv=NULL;
--- 811,817 ----
  // For queued bulk transfers, two additional QH helpers are allocated (nqh, bqh)
  // Due to the linking with other bulk urbs, it has to be locked with urb_list_lock!
  
! _static int uhci_submit_bulk_urb (urb_t *urb, urb_t *bulk_urb)
  {
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
  	urb_priv_t *urb_priv = urb->hcpriv, *upriv, *bpriv=NULL;
***************
*** 979,985 ****
   looks a bit complicated because of all the bulk queueing goodies
  */
  
! _static void uhci_clean_transfer (uhci_t *s, struct urb *urb, uhci_desc_t *qh, int mode)
  {
  	uhci_desc_t *bqh, *nqh, *prevqh, *prevtd;
  	int now;
--- 973,979 ----
   looks a bit complicated because of all the bulk queueing goodies
  */
  
! _static void uhci_clean_transfer (uhci_t *s, urb_t *urb, uhci_desc_t *qh, int mode)
  {
  	uhci_desc_t *bqh, *nqh, *prevqh, *prevtd;
  	int now;
***************
*** 1033,1039 ****
  		       urb, priv->prev_queued_urb,  priv->next_queued_urb, qh, bqh, priv->next_qh);	
         	
  		if (mode != CLEAN_TRANSFER_DELETION_MARK) {	// no work for cleanup at unlink-completion
! 			struct urb *nurb;
  			unsigned long flags;
  
  			nurb = priv->next_queued_urb;
--- 1027,1033 ----
  		       urb, priv->prev_queued_urb,  priv->next_queued_urb, qh, bqh, priv->next_qh);	
         	
  		if (mode != CLEAN_TRANSFER_DELETION_MARK) {	// no work for cleanup at unlink-completion
! 			urb_t *nurb;
  			unsigned long flags;
  
  			nurb = priv->next_queued_urb;
***************
*** 1071,1077 ****
  }
  /*-------------------------------------------------------------------*/
  // Release bandwidth for Interrupt or Isoc. transfers 
! _static void uhci_release_bandwidth(struct urb *urb)
  {       
  	if (urb->bandwidth) {
  		switch (usb_pipetype(urb->pipe)) {
--- 1065,1071 ----
  }
  /*-------------------------------------------------------------------*/
  // Release bandwidth for Interrupt or Isoc. transfers 
! _static void uhci_release_bandwidth(urb_t *urb)
  {       
  	if (urb->bandwidth) {
  		switch (usb_pipetype(urb->pipe)) {
***************
*** 1087,1097 ****
  	}	
  }
  
! _static void uhci_urb_dma_sync(uhci_t *s, struct urb *urb, urb_priv_t *urb_priv)
  {
  	if (urb_priv->setup_packet_dma)
  		pci_dma_sync_single(s->uhci_pci, urb_priv->setup_packet_dma,
! 				    sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
  
  	if (urb_priv->transfer_buffer_dma)
  		pci_dma_sync_single(s->uhci_pci, urb_priv->transfer_buffer_dma,
--- 1081,1091 ----
  	}	
  }
  
! _static void uhci_urb_dma_sync(uhci_t *s, urb_t *urb, urb_priv_t *urb_priv)
  {
  	if (urb_priv->setup_packet_dma)
  		pci_dma_sync_single(s->uhci_pci, urb_priv->setup_packet_dma,
! 				    sizeof(devrequest), PCI_DMA_TODEVICE);
  
  	if (urb_priv->transfer_buffer_dma)
  		pci_dma_sync_single(s->uhci_pci, urb_priv->transfer_buffer_dma,
***************
*** 1101,1111 ****
  				    PCI_DMA_TODEVICE);
  }
  
! _static void uhci_urb_dma_unmap(uhci_t *s, struct urb *urb, urb_priv_t *urb_priv)
  {
  	if (urb_priv->setup_packet_dma) {
  		pci_unmap_single(s->uhci_pci, urb_priv->setup_packet_dma,
! 				 sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
  		urb_priv->setup_packet_dma = 0;
  	}
  	if (urb_priv->transfer_buffer_dma) {
--- 1095,1105 ----
  				    PCI_DMA_TODEVICE);
  }
  
! _static void uhci_urb_dma_unmap(uhci_t *s, urb_t *urb, urb_priv_t *urb_priv)
  {
  	if (urb_priv->setup_packet_dma) {
  		pci_unmap_single(s->uhci_pci, urb_priv->setup_packet_dma,
! 				 sizeof(devrequest), PCI_DMA_TODEVICE);
  		urb_priv->setup_packet_dma = 0;
  	}
  	if (urb_priv->transfer_buffer_dma) {
***************
*** 1122,1128 ****
     mode: UNLINK_ASYNC_STORE_URB: unlink and move URB into unlinked list
           UNLINK_ASYNC_DONT_STORE: unlink, don't move URB into unlinked list
  */
! _static int uhci_unlink_urb_async (uhci_t *s,struct urb *urb, int mode)
  {
  	uhci_desc_t *qh;
  	urb_priv_t *urb_priv;
--- 1116,1122 ----
     mode: UNLINK_ASYNC_STORE_URB: unlink and move URB into unlinked list
           UNLINK_ASYNC_DONT_STORE: unlink, don't move URB into unlinked list
  */
! _static int uhci_unlink_urb_async (uhci_t *s,urb_t *urb, int mode)
  {
  	uhci_desc_t *qh;
  	urb_priv_t *urb_priv;
***************
*** 1167,1173 ****
  }
  /*-------------------------------------------------------------------*/
  // kills an urb by unlinking descriptors and waiting for at least one frame
! _static int uhci_unlink_urb_sync (uhci_t *s, struct urb *urb)
  {
  	uhci_desc_t *qh;
  	urb_priv_t *urb_priv;
--- 1161,1167 ----
  }
  /*-------------------------------------------------------------------*/
  // kills an urb by unlinking descriptors and waiting for at least one frame
! _static int uhci_unlink_urb_sync (uhci_t *s, urb_t *urb)
  {
  	uhci_desc_t *qh;
  	urb_priv_t *urb_priv;
***************
*** 1178,1184 ****
  
  	if (urb->status == -EINPROGRESS) {
  
! 		// move descriptors out of the running chains, dequeue urb
  		uhci_unlink_urb_async(s, urb, UNLINK_ASYNC_DONT_STORE);
  
  		urb_priv = urb->hcpriv;
--- 1172,1178 ----
  
  	if (urb->status == -EINPROGRESS) {
  
! 		// move descriptors out the the running chains, dequeue urb
  		uhci_unlink_urb_async(s, urb, UNLINK_ASYNC_DONT_STORE);
  
  		urb_priv = urb->hcpriv;
***************
*** 1188,1194 ****
  		// cleanup the rest
  		switch (usb_pipetype (urb->pipe)) {
  
- 		case PIPE_INTERRUPT:
  		case PIPE_ISOCHRONOUS:
  			uhci_wait_ms(1);
  			uhci_clean_iso_step2(s, urb_priv);
--- 1182,1187 ----
***************
*** 1231,1237 ****
  _static void uhci_cleanup_unlink(uhci_t *s, int force)
  {
  	struct list_head *q;
! 	struct urb *urb;
  	struct usb_device *dev;
  	int now, type;
  	urb_priv_t *urb_priv;
--- 1224,1230 ----
  _static void uhci_cleanup_unlink(uhci_t *s, int force)
  {
  	struct list_head *q;
! 	urb_t *urb;
  	struct usb_device *dev;
  	int now, type;
  	urb_priv_t *urb_priv;
***************
*** 1241,1247 ****
  
  	while (q != &s->urb_unlinked) {
  
! 		urb = list_entry (q, struct urb, urb_list);
  
  		urb_priv = (urb_priv_t*)urb->hcpriv;
  		q = urb->urb_list.next;
--- 1234,1240 ----
  
  	while (q != &s->urb_unlinked) {
  
! 		urb = list_entry (q, urb_t, urb_list);
  
  		urb_priv = (urb_priv_t*)urb->hcpriv;
  		q = urb->urb_list.next;
***************
*** 1310,1316 ****
  }
   
  /*-------------------------------------------------------------------*/
! _static int uhci_unlink_urb (struct urb *urb)
  {
  	uhci_t *s;
  	unsigned long flags=0;
--- 1303,1309 ----
  }
   
  /*-------------------------------------------------------------------*/
! _static int uhci_unlink_urb (urb_t *urb)
  {
  	uhci_t *s;
  	unsigned long flags=0;
***************
*** 1343,1351 ****
  // In case of ASAP iso transfer, search the URB-list for already queued URBs
  // for this EP and calculate the earliest start frame for the new
  // URB (easy seamless URB continuation!)
! _static int find_iso_limits (struct urb *urb, unsigned int *start, unsigned int *end)
  {
! 	struct urb *u, *last_urb = NULL;
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
  	struct list_head *p;
  	int ret=-1;
--- 1336,1344 ----
  // In case of ASAP iso transfer, search the URB-list for already queued URBs
  // for this EP and calculate the earliest start frame for the new
  // URB (easy seamless URB continuation!)
! _static int find_iso_limits (urb_t *urb, unsigned int *start, unsigned int *end)
  {
! 	urb_t *u, *last_urb = NULL;
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
  	struct list_head *p;
  	int ret=-1;
***************
*** 1355,1361 ****
  	p=s->urb_list.prev;
  
  	for (; p != &s->urb_list; p = p->prev) {
! 		u = list_entry (p, struct urb, urb_list);
  		// look for pending URBs with identical pipe handle
  		// works only because iso doesn't toggle the data bit!
  		if ((urb->pipe == u->pipe) && (urb->dev == u->dev) && (u->status == -EINPROGRESS)) {
--- 1348,1354 ----
  	p=s->urb_list.prev;
  
  	for (; p != &s->urb_list; p = p->prev) {
! 		u = list_entry (p, urb_t, urb_list);
  		// look for pending URBs with identical pipe handle
  		// works only because iso doesn't toggle the data bit!
  		if ((urb->pipe == u->pipe) && (urb->dev == u->dev) && (u->status == -EINPROGRESS)) {
***************
*** 1377,1383 ****
  /*-------------------------------------------------------------------*/
  // adjust start_frame according to scheduling constraints (ASAP etc)
  
! _static int iso_find_start (struct urb *urb)
  {
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
  	unsigned int now;
--- 1370,1376 ----
  /*-------------------------------------------------------------------*/
  // adjust start_frame according to scheduling constraints (ASAP etc)
  
! _static int iso_find_start (urb_t *urb)
  {
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
  	unsigned int now;
***************
*** 1435,1441 ****
  // ASAP-flag set implicitely
  // if period==0, the transfer is only done once
  
! _static int uhci_submit_int_urb (struct urb *urb)
  {
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
  	urb_priv_t *urb_priv = urb->hcpriv;
--- 1428,1434 ----
  // ASAP-flag set implicitely
  // if period==0, the transfer is only done once
  
! _static int uhci_submit_int_urb (urb_t *urb)
  {
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
  	urb_priv_t *urb_priv = urb->hcpriv;
***************
*** 1495,1501 ****
  	return 0;
  }
  /*-------------------------------------------------------------------*/
! _static int uhci_submit_iso_urb (struct urb *urb)
  {
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
  	urb_priv_t *urb_priv = urb->hcpriv;
--- 1488,1494 ----
  	return 0;
  }
  /*-------------------------------------------------------------------*/
! _static int uhci_submit_iso_urb (urb_t *urb)
  {
  	uhci_t *s = (uhci_t*) urb->dev->bus->hcpriv;
  	urb_priv_t *urb_priv = urb->hcpriv;
***************
*** 1588,1597 ****
  /*-------------------------------------------------------------------*/
  // returns: 0 (no transfer queued), urb* (this urb already queued)
   
! _static struct urb* search_dev_ep (uhci_t *s, struct urb *urb)
  {
  	struct list_head *p;
! 	struct urb *tmp;
  	unsigned int mask = usb_pipecontrol(urb->pipe) ? (~USB_DIR_IN) : (~0);
  
  	dbg("search_dev_ep:");
--- 1581,1590 ----
  /*-------------------------------------------------------------------*/
  // returns: 0 (no transfer queued), urb* (this urb already queued)
   
! _static urb_t* search_dev_ep (uhci_t *s, urb_t *urb)
  {
  	struct list_head *p;
! 	urb_t *tmp;
  	unsigned int mask = usb_pipecontrol(urb->pipe) ? (~USB_DIR_IN) : (~0);
  
  	dbg("search_dev_ep:");
***************
*** 1599,1605 ****
  	p=s->urb_list.next;
  
  	for (; p != &s->urb_list; p = p->next) {
! 		tmp = list_entry (p, struct urb, urb_list);
  		dbg("urb: %p", tmp);
  		// we can accept this urb if it is not queued at this time 
  		// or if non-iso transfer requests should be scheduled for the same device and pipe
--- 1592,1598 ----
  	p=s->urb_list.next;
  
  	for (; p != &s->urb_list; p = p->next) {
! 		tmp = list_entry (p, urb_t, urb_list);
  		dbg("urb: %p", tmp);
  		// we can accept this urb if it is not queued at this time 
  		// or if non-iso transfer requests should be scheduled for the same device and pipe
***************
*** 1612,1624 ****
  	return 0;
  }
  /*-------------------------------------------------------------------*/
! _static int uhci_submit_urb (struct urb *urb)
  {
  	uhci_t *s;
  	urb_priv_t *urb_priv;
  	int ret = 0, type;
  	unsigned long flags;
! 	struct urb *queued_urb=NULL;
  	int bustime;
  		
  	if (!urb->dev || !urb->dev->bus)
--- 1605,1617 ----
  	return 0;
  }
  /*-------------------------------------------------------------------*/
! _static int uhci_submit_urb (urb_t *urb)
  {
  	uhci_t *s;
  	urb_priv_t *urb_priv;
  	int ret = 0, type;
  	unsigned long flags;
! 	urb_t *queued_urb=NULL;
  	int bustime;
  		
  	if (!urb->dev || !urb->dev->bus)
***************
*** 1685,1691 ****
  	
  	if (type == PIPE_CONTROL)
  		urb_priv->setup_packet_dma = pci_map_single(s->uhci_pci, urb->setup_packet,
! 							    sizeof(struct usb_ctrlrequest), PCI_DMA_TODEVICE);
  
  	if (urb->transfer_buffer_length)
  		urb_priv->transfer_buffer_dma = pci_map_single(s->uhci_pci,
--- 1678,1684 ----
  	
  	if (type == PIPE_CONTROL)
  		urb_priv->setup_packet_dma = pci_map_single(s->uhci_pci, urb->setup_packet,
! 							    sizeof(devrequest), PCI_DMA_TODEVICE);
  
  	if (urb->transfer_buffer_length)
  		urb_priv->transfer_buffer_dma = pci_map_single(s->uhci_pci,
***************
*** 1772,1778 ****
  _static void uhci_check_timeouts(uhci_t *s)
  {
  	struct list_head *p,*p2;
! 	struct urb *urb;
  	int type;	
  
  	p = s->urb_list.prev;	
--- 1765,1771 ----
  _static void uhci_check_timeouts(uhci_t *s)
  {
  	struct list_head *p,*p2;
! 	urb_t *urb;
  	int type;	
  
  	p = s->urb_list.prev;	
***************
*** 1782,1800 ****
  
  		p2 = p;
  		p = p->prev;
! 		urb = list_entry (p2, struct urb, urb_list);
  		type = usb_pipetype (urb->pipe);
  
  		hcpriv = (urb_priv_t*)urb->hcpriv;
! 		
! 		if ( urb->timeout && time_after(jiffies, hcpriv->started + urb->timeout)) {
  			urb->transfer_flags |= USB_TIMEOUT_KILLED | USB_ASYNC_UNLINK;
  			async_dbg("uhci_check_timeout: timeout for %p",urb);
  			uhci_unlink_urb_async(s, urb, UNLINK_ASYNC_STORE_URB);
  		}
  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
  		else if (((type == PIPE_BULK) || (type == PIPE_CONTROL)) &&  
! 			 (hcpriv->use_loop) && time_after(jiffies, hcpriv->started + IDLE_TIMEOUT))
  			disable_desc_loop(s, urb);
  #endif
  
--- 1775,1795 ----
  
  		p2 = p;
  		p = p->prev;
! 		urb = list_entry (p2, urb_t, urb_list);
  		type = usb_pipetype (urb->pipe);
  
  		hcpriv = (urb_priv_t*)urb->hcpriv;
! 				
! 		if ( urb->timeout && 
! 			((hcpriv->started + urb->timeout) < jiffies)) {
  			urb->transfer_flags |= USB_TIMEOUT_KILLED | USB_ASYNC_UNLINK;
  			async_dbg("uhci_check_timeout: timeout for %p",urb);
  			uhci_unlink_urb_async(s, urb, UNLINK_ASYNC_STORE_URB);
  		}
  #ifdef CONFIG_USB_UHCI_HIGH_BANDWIDTH
  		else if (((type == PIPE_BULK) || (type == PIPE_CONTROL)) &&  
! 		     (hcpriv->use_loop) &&
! 		     ((hcpriv->started + IDLE_TIMEOUT) < jiffies))
  			disable_desc_loop(s, urb);
  #endif
  
***************
*** 1880,1886 ****
  
  /*-------------------------------------------------------------------------*/
  /* prepare Interrupt pipe transaction data; HUB INTERRUPT ENDPOINT */
! _static int rh_send_irq (struct urb *urb)
  {
  	int len = 1;
  	int i;
--- 1875,1881 ----
  
  /*-------------------------------------------------------------------------*/
  /* prepare Interrupt pipe transaction data; HUB INTERRUPT ENDPOINT */
! _static int rh_send_irq (urb_t *urb)
  {
  	int len = 1;
  	int i;
***************
*** 1907,1918 ****
  
  /*-------------------------------------------------------------------------*/
  /* Virtual Root Hub INTs are polled by this timer every "intervall" ms */
! _static int rh_init_int_timer (struct urb *urb);
  
  _static void rh_int_timer_do (unsigned long ptr)
  {
  	int len;
! 	struct urb *urb = (struct urb*) ptr;
  	uhci_t *uhci = urb->dev->bus->hcpriv;
  
  	if (uhci->rh.send) {
--- 1902,1913 ----
  
  /*-------------------------------------------------------------------------*/
  /* Virtual Root Hub INTs are polled by this timer every "intervall" ms */
! _static int rh_init_int_timer (urb_t *urb);
  
  _static void rh_int_timer_do (unsigned long ptr)
  {
  	int len;
! 	urb_t *urb = (urb_t*) ptr;
  	uhci_t *uhci = urb->dev->bus->hcpriv;
  
  	if (uhci->rh.send) {
***************
*** 1929,1935 ****
  /*-------------------------------------------------------------------------*/
  /* Root Hub INTs are polled by this timer, polling interval 20ms */
  
! _static int rh_init_int_timer (struct urb *urb)
  {
  	uhci_t *uhci = urb->dev->bus->hcpriv;
  
--- 1924,1930 ----
  /*-------------------------------------------------------------------------*/
  /* Root Hub INTs are polled by this timer, polling interval 20ms */
  
! _static int rh_init_int_timer (urb_t *urb)
  {
  	uhci_t *uhci = urb->dev->bus->hcpriv;
  
***************
*** 1963,1974 ****
   *************************/
  
  
! _static int rh_submit_urb (struct urb *urb)
  {
  	struct usb_device *usb_dev = urb->dev;
  	uhci_t *uhci = usb_dev->bus->hcpriv;
  	unsigned int pipe = urb->pipe;
! 	struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *) urb->setup_packet;
  	void *data = urb->transfer_buffer;
  	int leni = urb->transfer_buffer_length;
  	int len = 0;
--- 1958,1969 ----
   *************************/
  
  
! _static int rh_submit_urb (urb_t *urb)
  {
  	struct usb_device *usb_dev = urb->dev;
  	uhci_t *uhci = usb_dev->bus->hcpriv;
  	unsigned int pipe = urb->pipe;
! 	devrequest *cmd = (devrequest *) urb->setup_packet;
  	void *data = urb->transfer_buffer;
  	int leni = urb->transfer_buffer_length;
  	int len = 0;
***************
*** 1994,2003 ****
  	}
  
  
! 	bmRType_bReq = cmd->bRequestType | cmd->bRequest << 8;
! 	wValue = le16_to_cpu (cmd->wValue);
! 	wIndex = le16_to_cpu (cmd->wIndex);
! 	wLength = le16_to_cpu (cmd->wLength);
  
  	for (i = 0; i < 8; i++)
  		uhci->rh.c_p_r[i] = 0;
--- 1989,1998 ----
  	}
  
  
! 	bmRType_bReq = cmd->requesttype | cmd->request << 8;
! 	wValue = le16_to_cpu (cmd->value);
! 	wIndex = le16_to_cpu (cmd->index);
! 	wLength = le16_to_cpu (cmd->length);
  
  	for (i = 0; i < 8; i++)
  		uhci->rh.c_p_r[i] = 0;
***************
*** 2164,2170 ****
  }
  /*-------------------------------------------------------------------------*/
  
! _static int rh_unlink_urb (struct urb *urb)
  {
  	uhci_t *uhci = urb->dev->bus->hcpriv;
  
--- 2159,2165 ----
  }
  /*-------------------------------------------------------------------------*/
  
! _static int rh_unlink_urb (urb_t *urb)
  {
  	uhci_t *uhci = urb->dev->bus->hcpriv;
  
***************
*** 2222,2235 ****
  	unsigned long flags;
  	struct list_head *p;
  	struct list_head *p2;
! 	struct urb *urb;
  
  	spin_lock_irqsave (&s->urb_list_lock, flags);
  	p = s->urb_list.prev;	
  	while (p != &s->urb_list) {
  		p2 = p;
  		p = p->prev ;
! 		urb = list_entry (p2, struct urb, urb_list);
  		dbg("urb: %p, dev %p, %p", urb, usb_dev,urb->dev);
  		
  		//urb->transfer_flags |=USB_ASYNC_UNLINK; 
--- 2217,2230 ----
  	unsigned long flags;
  	struct list_head *p;
  	struct list_head *p2;
! 	urb_t *urb;
  
  	spin_lock_irqsave (&s->urb_list_lock, flags);
  	p = s->urb_list.prev;	
  	while (p != &s->urb_list) {
  		p2 = p;
  		p = p->prev ;
! 		urb = list_entry (p2, urb_t, urb_list);
  		dbg("urb: %p, dev %p, %p", urb, usb_dev,urb->dev);
  		
  		//urb->transfer_flags |=USB_ASYNC_UNLINK; 
***************
*** 2279,2285 ****
  	uhci_unlink_urb
  };
  
! _static void correct_data_toggles(struct urb *urb)
  {
  	usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe), 
  		       !usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe)));
--- 2274,2280 ----
  	uhci_unlink_urb
  };
  
! _static void correct_data_toggles(urb_t *urb)
  {
  	usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe), 
  		       !usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe)));
***************
*** 2309,2315 ****
   *       PROCESS_TRANSFER_DONT_UNLINK: QHs already unlinked (for async unlink_urb)
   */
  
! _static int process_transfer (uhci_t *s, struct urb *urb, int mode)
  {
  	int ret = 0;
  	urb_priv_t *urb_priv = urb->hcpriv;
--- 2304,2310 ----
   *       PROCESS_TRANSFER_DONT_UNLINK: QHs already unlinked (for async unlink_urb)
   */
  
! _static int process_transfer (uhci_t *s, urb_t *urb, int mode)
  {
  	int ret = 0;
  	urb_priv_t *urb_priv = urb->hcpriv;
***************
*** 2397,2403 ****
  	if (usb_pipetype (urb->pipe) == PIPE_BULK ) {  /* toggle correction for short bulk transfers (nonqueued/queued) */
  
  		urb_priv_t *priv=(urb_priv_t*)urb->hcpriv;
! 		struct urb *next_queued_urb=priv->next_queued_urb;
  
  		if (next_queued_urb) {
  			urb_priv_t *next_priv=(urb_priv_t*)next_queued_urb->hcpriv;
--- 2392,2398 ----
  	if (usb_pipetype (urb->pipe) == PIPE_BULK ) {  /* toggle correction for short bulk transfers (nonqueued/queued) */
  
  		urb_priv_t *priv=(urb_priv_t*)urb->hcpriv;
! 		urb_t *next_queued_urb=priv->next_queued_urb;
  
  		if (next_queued_urb) {
  			urb_priv_t *next_priv=(urb_priv_t*)next_queued_urb->hcpriv;
***************
*** 2428,2434 ****
  	return ret;
  }
  
! _static int process_interrupt (uhci_t *s, struct urb *urb)
  {
  	int i, ret = -EINPROGRESS;
  	urb_priv_t *urb_priv = urb->hcpriv;
--- 2423,2429 ----
  	return ret;
  }
  
! _static int process_interrupt (uhci_t *s, urb_t *urb)
  {
  	int i, ret = -EINPROGRESS;
  	urb_priv_t *urb_priv = urb->hcpriv;
***************
*** 2450,2456 ****
  			break;
  		}
  
! 		if (!(desc->hw.td.status & cpu_to_le32(TD_CTRL_IOC))) {
  			// do not process one-shot TDs, no recycling
  			break;
  		}
--- 2445,2451 ----
  			break;
  		}
  
! 		if (!desc->hw.td.status & cpu_to_le32(TD_CTRL_IOC)) {
  			// do not process one-shot TDs, no recycling
  			break;
  		}
***************
*** 2514,2521 ****
  			}
  			else {
  				uhci_unlink_urb_async(s, urb, UNLINK_ASYNC_STORE_URB);
- 				// correct toggle after unlink
- 				usb_dotoggle (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe));
  				clr_td_ioc(desc); // inactivate TD
  			}
  		}
--- 2509,2514 ----
***************
*** 2527,2533 ****
  // mode: PROCESS_ISO_REGULAR: processing only for done TDs, unlink TDs
  // mode: PROCESS_ISO_FORCE: force processing, don't unlink TDs (already unlinked)
  
! _static int process_iso (uhci_t *s, struct urb *urb, int mode)
  {
  	int i;
  	int ret = 0;
--- 2520,2526 ----
  // mode: PROCESS_ISO_REGULAR: processing only for done TDs, unlink TDs
  // mode: PROCESS_ISO_FORCE: force processing, don't unlink TDs (already unlinked)
  
! _static int process_iso (uhci_t *s, urb_t *urb, int mode)
  {
  	int i;
  	int ret = 0;
***************
*** 2596,2604 ****
  _static int process_urb (uhci_t *s, struct list_head *p)
  {
  	int ret = 0;
! 	struct urb *urb;
  
! 	urb=list_entry (p, struct urb, urb_list);
  	//dbg("process_urb: found queued urb: %p", urb);
  
  	switch (usb_pipetype (urb->pipe)) {
--- 2589,2597 ----
  _static int process_urb (uhci_t *s, struct list_head *p)
  {
  	int ret = 0;
! 	urb_t *urb;
  
! 	urb=list_entry (p, urb_t, urb_list);
  	//dbg("process_urb: found queued urb: %p", urb);
  
  	switch (usb_pipetype (urb->pipe)) {
***************
*** 2647,2653 ****
  #endif
  
  		if ((usb_pipetype (urb->pipe) != PIPE_INTERRUPT)) {  // process_interrupt does completion on its own		
! 			struct urb *next_urb = urb->next;
  			int is_ring = 0;
  			int contains_killed = 0;
  			int loop_count=0;
--- 2640,2646 ----
  #endif
  
  		if ((usb_pipetype (urb->pipe) != PIPE_INTERRUPT)) {  // process_interrupt does completion on its own		
! 			urb_t *next_urb = urb->next;
  			int is_ring = 0;
  			int contains_killed = 0;
  			int loop_count=0;
***************
*** 2745,2751 ****
  
  	if (status != 1) {
  		// Avoid too much error messages at a time
! 		if (time_after(jiffies, s->last_error_time + ERROR_SUPPRESSION_TIME)) {
  			warn("interrupt, status %x, frame# %i", status, 
  			     UHCI_GET_CURRENT_FRAME(s));
  			s->last_error_time = jiffies;
--- 2738,2744 ----
  
  	if (status != 1) {
  		// Avoid too much error messages at a time
! 		if ((jiffies - s->last_error_time > ERROR_SUPPRESSION_TIME)) {
  			warn("interrupt, status %x, frame# %i", status, 
  			     UHCI_GET_CURRENT_FRAME(s));
  			s->last_error_time = jiffies;
***************
*** 2793,2799 ****
  				break;
  		}
  	}
! 	if (time_after(jiffies, s->timeout_check + (HZ/30)))
  		uhci_check_timeouts(s);
  
  	clean_descs(s, CLEAN_NOT_FORCED);
--- 2786,2792 ----
  				break;
  		}
  	}
! 	if ((jiffies - s->timeout_check) > (HZ/30)) 
  		uhci_check_timeouts(s);
  
  	clean_descs(s, CLEAN_NOT_FORCED);
***************
*** 2822,2828 ****
  _static void start_hc (uhci_t *s)
  {
  	unsigned int io_addr = s->io_addr;
! 	int timeout = 10;
  
  	/*
  	 * Reset the HC - this will force us to get a
--- 2815,2821 ----
  _static void start_hc (uhci_t *s)
  {
  	unsigned int io_addr = s->io_addr;
! 	int timeout = 1000;
  
  	/*
  	 * Reset the HC - this will force us to get a
***************
*** 2837,2843 ****
  			err("USBCMD_HCRESET timed out!");
  			break;
  		}
- 		udelay(1);
  	}
  
  	/* Turn on all interrupts */
--- 2830,2835 ----
***************
*** 2853,2860 ****
  	s->running = 1;
  }
  
! /* No  __devexit, since it maybe called from alloc_uhci() */
! _static void
  uhci_pci_remove (struct pci_dev *dev)
  {
  	uhci_t *s = pci_get_drvdata(dev);
--- 2845,2851 ----
  	s->running = 1;
  }
  
! _static void __devexit
  uhci_pci_remove (struct pci_dev *dev)
  {
  	uhci_t *s = pci_get_drvdata(dev);
***************
*** 2954,2960 ****
  	}
  
  	s->bus = bus;
- 	bus->bus_name = dev->slot_name;
  	bus->hcpriv = s;
  
  	/* UHCI specs says devices must have 2 ports, but goes on to say */
--- 2945,2950 ----
***************
*** 3080,3086 ****
  	id_table:	&uhci_pci_ids [0],
  
  	probe:		uhci_pci_probe,
! 	remove:		uhci_pci_remove,
  
  #ifdef	CONFIG_PM
  	suspend:	uhci_pci_suspend,
--- 3070,3076 ----
  	id_table:	&uhci_pci_ids [0],
  
  	probe:		uhci_pci_probe,
! 	remove:		__devexit_p(uhci_pci_remove),
  
  #ifdef	CONFIG_PM
  	suspend:	uhci_pci_suspend,
***************
*** 3140,3142 ****
--- 3130,3133 ----
  MODULE_AUTHOR( DRIVER_AUTHOR );
  MODULE_DESCRIPTION( DRIVER_DESC );
  MODULE_LICENSE("GPL");
+ 
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-uhci.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-uhci.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb-uhci.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb-uhci.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 11,17 ****
  {
  	if(!in_interrupt())
  	{
! 		set_current_state(TASK_UNINTERRUPTIBLE);
  		schedule_timeout(1 + ms * HZ / 1000);
  	}
  	else
--- 11,17 ----
  {
  	if(!in_interrupt())
  	{
! 		current->state = TASK_UNINTERRUPTIBLE;
  		schedule_timeout(1 + ms * HZ / 1000);
  	}
  	else
***************
*** 158,165 ****
  	dma_addr_t setup_packet_dma;
  	dma_addr_t transfer_buffer_dma;
  	unsigned long started;
! 	struct urb *next_queued_urb;	// next queued urb for this EP
! 	struct urb *prev_queued_urb;
  	uhci_desc_t *bottom_qh;
  	uhci_desc_t *next_qh;       	// next helper QH
  	char use_loop;
--- 158,165 ----
  	dma_addr_t setup_packet_dma;
  	dma_addr_t transfer_buffer_dma;
  	unsigned long started;
! 	urb_t *next_queued_urb;         // next queued urb for this EP
! 	urb_t *prev_queued_urb;
  	uhci_desc_t *bottom_qh;
  	uhci_desc_t *next_qh;       	// next helper QH
  	char use_loop;
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usb.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usb.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 38,45 ****
  #endif
  #include 
  
- #include "hcd.h"
- 
  static const int usb_bandwidth_option =
  #ifdef CONFIG_USB_BANDWIDTH
  				1;
--- 38,43 ----
***************
*** 220,269 ****
  }
  
  /*
!  * usb_calc_bus_time - approximate periodic transaction time in nanoseconds
!  * @speed: from dev->speed; USB_SPEED_{LOW,FULL,HIGH}
!  * @is_input: true iff the transaction sends data to the host
!  * @isoc: true for isochronous transactions, false for interrupt ones
!  * @bytecount: how many bytes in the transaction.
!  *
!  * Returns approximate bus time in nanoseconds for a periodic transaction.
!  * See USB 2.0 spec section 5.11.3; only periodic transfers need to be
!  * scheduled in software, this function is only used for such scheduling.
   */
! long usb_calc_bus_time (int speed, int is_input, int isoc, int bytecount)
  {
  	unsigned long	tmp;
  
! 	switch (speed) {
! 	case USB_SPEED_LOW: 	/* INTR only */
! 		if (is_input) {
  			tmp = (67667L * (31L + 10L * BitTime (bytecount))) / 1000L;
  			return (64060L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp);
! 		} else {
  			tmp = (66700L * (31L + 10L * BitTime (bytecount))) / 1000L;
  			return (64107L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp);
  		}
- 	case USB_SPEED_FULL:	/* ISOC or INTR */
- 		if (isoc) {
- 			tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
- 			return (((is_input) ? 7268L : 6265L) + BW_HOST_DELAY + tmp);
- 		} else {
- 			tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
- 			return (9107L + BW_HOST_DELAY + tmp);
- 		}
- 	case USB_SPEED_HIGH:	/* ISOC or INTR */
- 		// FIXME adjust for input vs output
- 		if (isoc)
- 			tmp = HS_USECS (bytecount);
- 		else
- 			tmp = HS_USECS_ISO (bytecount);
- 		return tmp;
- 	default:
- 		dbg ("bogus device speed!");
- 		return -1;
  	}
- }
  
  
  /*
   * usb_check_bandwidth():
--- 218,258 ----
  }
  
  /*
!  * usb_calc_bus_time:
!  *
!  * returns (approximate) USB bus time in nanoseconds for a USB transaction.
   */
! static long usb_calc_bus_time (int low_speed, int input_dir, int isoc, int bytecount)
  {
  	unsigned long	tmp;
  
! 	if (low_speed)		/* no isoc. here */
! 	{
! 		if (input_dir)
! 		{
  			tmp = (67667L * (31L + 10L * BitTime (bytecount))) / 1000L;
  			return (64060L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp);
! 		}
! 		else
! 		{
  			tmp = (66700L * (31L + 10L * BitTime (bytecount))) / 1000L;
  			return (64107L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp);
  		}
  	}
  
+ 	/* for full-speed: */
+ 
+ 	if (!isoc)		/* Input or Output */
+ 	{
+ 		tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
+ 		return (9107L + BW_HOST_DELAY + tmp);
+ 	} /* end not Isoc */
+ 
+ 	/* for isoc: */
+ 
+ 	tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L;
+ 	return (((input_dir) ? 7268L : 6265L) + BW_HOST_DELAY + tmp);
+ }
  
  /*
   * usb_check_bandwidth():
***************
*** 296,302 ****
  	unsigned int	pipe = urb->pipe;
  	long		bustime;
  
! 	bustime = usb_calc_bus_time (dev->speed, usb_pipein(pipe),
  			usb_pipeisoc(pipe), usb_maxpacket(dev, pipe, usb_pipeout(pipe)));
  	if (usb_pipeisoc(pipe))
  		bustime = NS_TO_US(bustime) / urb->number_of_packets;
--- 285,291 ----
  	unsigned int	pipe = urb->pipe;
  	long		bustime;
  
! 	bustime = usb_calc_bus_time (usb_pipeslow(pipe), usb_pipein(pipe),
  			usb_pipeisoc(pipe), usb_maxpacket(dev, pipe, usb_pipeout(pipe)));
  	if (usb_pipeisoc(pipe))
  		bustime = NS_TO_US(bustime) / urb->number_of_packets;
***************
*** 468,478 ****
  	 */
  	down (&usb_bus_list_lock);
  	list_del(&bus->bus_list);
- 	clear_bit(bus->busnum, busmap.busmap);
  	up (&usb_bus_list_lock);
  
  	usbdevfs_remove_bus(bus);
  
  	usb_bus_put(bus);
  }
  
--- 457,468 ----
  	 */
  	down (&usb_bus_list_lock);
  	list_del(&bus->bus_list);
  	up (&usb_bus_list_lock);
  
  	usbdevfs_remove_bus(bus);
  
+ 	clear_bit(bus->busnum, busmap.busmap);
+ 
  	usb_bus_put(bus);
  }
  
***************
*** 949,957 ****
  
  	usb_bus_get(bus);
  
- 	if (!parent)
- 		dev->devpath [0] = '0';
- 
  	dev->bus = bus;
  	dev->parent = parent;
  	atomic_set(&dev->refcnt, 1);
--- 939,944 ----
***************
*** 998,1008 ****
   *
   *	The driver should call usb_free_urb() when it is finished with the urb.
   */
! struct urb *usb_alloc_urb(int iso_packets)
  {
! 	struct urb *urb;
  
! 	urb = (struct urb *)kmalloc(sizeof(struct urb) + iso_packets * sizeof(struct iso_packet_descriptor),
  	      in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
  	if (!urb) {
  		err("alloc_urb: kmalloc failed");
--- 985,995 ----
   *
   *	The driver should call usb_free_urb() when it is finished with the urb.
   */
! urb_t *usb_alloc_urb(int iso_packets)
  {
! 	urb_t *urb;
  
! 	urb = (urb_t *)kmalloc(sizeof(urb_t) + iso_packets * sizeof(iso_packet_descriptor_t),
  	      in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
  	if (!urb) {
  		err("alloc_urb: kmalloc failed");
***************
*** 1024,1036 ****
   *	cleaned up with a call to usb_free_urb() when the driver is finished
   *	with it.
   */
! void usb_free_urb(struct urb* urb)
  {
  	if (urb)
  		kfree(urb);
  }
  /*-------------------------------------------------------------------*/
! int usb_submit_urb(struct urb *urb)
  {
  	if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op)
  		return urb->dev->bus->op->submit_urb(urb);
--- 1011,1023 ----
   *	cleaned up with a call to usb_free_urb() when the driver is finished
   *	with it.
   */
! void usb_free_urb(urb_t* urb)
  {
  	if (urb)
  		kfree(urb);
  }
  /*-------------------------------------------------------------------*/
! int usb_submit_urb(urb_t *urb)
  {
  	if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op)
  		return urb->dev->bus->op->submit_urb(urb);
***************
*** 1039,1045 ****
  }
  
  /*-------------------------------------------------------------------*/
! int usb_unlink_urb(struct urb *urb)
  {
  	if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op)
  		return urb->dev->bus->op->unlink_urb(urb);
--- 1026,1032 ----
  }
  
  /*-------------------------------------------------------------------*/
! int usb_unlink_urb(urb_t *urb)
  {
  	if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op)
  		return urb->dev->bus->op->unlink_urb(urb);
***************
*** 1053,1059 ****
  /*-------------------------------------------------------------------*
   * completion handler for compatibility wrappers (sync control/bulk) *
   *-------------------------------------------------------------------*/
! static void usb_api_blocking_completion(struct urb *urb)
  {
  	struct usb_api_data *awd = (struct usb_api_data *)urb->context;
  
--- 1040,1046 ----
  /*-------------------------------------------------------------------*
   * completion handler for compatibility wrappers (sync control/bulk) *
   *-------------------------------------------------------------------*/
! static void usb_api_blocking_completion(urb_t *urb)
  {
  	struct usb_api_data *awd = (struct usb_api_data *)urb->context;
  
***************
*** 1067,1073 ****
   *-------------------------------------------------------------------*/
  
  // Starts urb and waits for completion or timeout
! static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
  { 
  	DECLARE_WAITQUEUE(wait, current);
  	struct usb_api_data awd;
--- 1054,1060 ----
   *-------------------------------------------------------------------*/
  
  // Starts urb and waits for completion or timeout
! static int usb_start_wait_urb(urb_t *urb, int timeout, int* actual_length)
  { 
  	DECLARE_WAITQUEUE(wait, current);
  	struct usb_api_data awd;
***************
*** 1123,1131 ****
  /*-------------------------------------------------------------------*/
  // returns status (negative) or length (positive)
  int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, 
! 			    struct usb_ctrlrequest *cmd,  void *data, int len, int timeout)
  {
! 	struct urb *urb;
  	int retv;
  	int length;
  
--- 1110,1118 ----
  /*-------------------------------------------------------------------*/
  // returns status (negative) or length (positive)
  int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, 
! 			    devrequest *cmd,  void *data, int len, int timeout)
  {
! 	urb_t *urb;
  	int retv;
  	int length;
  
***************
*** 1158,1165 ****
   *	This function sends a simple control message to a specified endpoint
   *	and waits for the message to complete, or timeout.
   *	
!  *	If successful, it returns the number of bytes transferred; 
!  *	otherwise, it returns a negative error number.
   *
   *	Don't use this function from within an interrupt context, like a
   *	bottom half handler.  If you need a asyncronous message, or need to send
--- 1145,1151 ----
   *	This function sends a simple control message to a specified endpoint
   *	and waits for the message to complete, or timeout.
   *	
!  *	If successful, it returns 0, othwise a negative error number.
   *
   *	Don't use this function from within an interrupt context, like a
   *	bottom half handler.  If you need a asyncronous message, or need to send
***************
*** 1168,1184 ****
  int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype,
  			 __u16 value, __u16 index, void *data, __u16 size, int timeout)
  {
! 	struct usb_ctrlrequest *dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL);
  	int ret;
  	
  	if (!dr)
  		return -ENOMEM;
  
! 	dr->bRequestType = requesttype;
! 	dr->bRequest = request;
! 	dr->wValue = cpu_to_le16p(&value);
! 	dr->wIndex = cpu_to_le16p(&index);
! 	dr->wLength = cpu_to_le16p(&size);
  
  	//dbg("usb_control_msg");	
  
--- 1154,1170 ----
  int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype,
  			 __u16 value, __u16 index, void *data, __u16 size, int timeout)
  {
! 	devrequest *dr = kmalloc(sizeof(devrequest), GFP_KERNEL);
  	int ret;
  	
  	if (!dr)
  		return -ENOMEM;
  
! 	dr->requesttype = requesttype;
! 	dr->request = request;
! 	dr->value = cpu_to_le16p(&value);
! 	dr->index = cpu_to_le16p(&index);
! 	dr->length = cpu_to_le16p(&size);
  
  	//dbg("usb_control_msg");	
  
***************
*** 1202,1210 ****
   *	This function sends a simple bulk message to a specified endpoint
   *	and waits for the message to complete, or timeout.
   *	
!  *	If successful, it returns 0, otherwise a negative error number.
!  *	The number of actual bytes transferred will be stored in the 
!  *	actual_length paramater.
   *
   *	Don't use this function from within an interrupt context, like a
   *	bottom half handler.  If you need a asyncronous message, or need to
--- 1188,1196 ----
   *	This function sends a simple bulk message to a specified endpoint
   *	and waits for the message to complete, or timeout.
   *	
!  *	If successful, it returns 0, othwise a negative error number.
!  *	The number of actual bytes transferred will be plaed in the 
!  *	actual_timeout paramater.
   *
   *	Don't use this function from within an interrupt context, like a
   *	bottom half handler.  If you need a asyncronous message, or need to
***************
*** 1213,1219 ****
  int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, 
  			void *data, int len, int *actual_length, int timeout)
  {
! 	struct urb *urb;
  
  	if (len < 0)
  		return -EINVAL;
--- 1199,1205 ----
  int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, 
  			void *data, int len, int *actual_length, int timeout)
  {
! 	urb_t *urb;
  
  	if (len < 0)
  		return -EINVAL;
***************
*** 1712,1719 ****
  
  	*pdev = NULL;
  
! 	info("USB disconnect on device %s-%s address %d",
! 			dev->bus->bus_name, dev->devpath, dev->devnum);
  
  	if (dev->actconfig) {
  		for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
--- 1698,1704 ----
  
  	*pdev = NULL;
  
! 	info("USB disconnect on device %d", dev->devnum);
  
  	if (dev->actconfig) {
  		for (i = 0; i < dev->actconfig->bNumInterfaces; i++) {
***************
*** 1967,1980 ****
  		return -EINVAL;
  	}
  
- 	/* 9.4.10 says devices don't need this, if the interface
- 	   only has one alternate setting */
- 	if (iface->num_altsetting == 1) {
- 		dbg("ignoring set_interface for dev %d, iface %d, alt %d",
- 			dev->devnum, interface, alternate);
- 		return 0;
- 	}
- 
  	if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
  	    USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE, alternate,
  	    interface, NULL, 0, HZ * 5)) < 0)
--- 1952,1957 ----
***************
*** 2407,2413 ****
  EXPORT_SYMBOL(usb_connect);
  EXPORT_SYMBOL(usb_disconnect);
  
- EXPORT_SYMBOL(usb_calc_bus_time);
  EXPORT_SYMBOL(usb_check_bandwidth);
  EXPORT_SYMBOL(usb_claim_bandwidth);
  EXPORT_SYMBOL(usb_release_bandwidth);
--- 2384,2389 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usbkbd.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usbkbd.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usbkbd.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usbkbd.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 71,77 ****
  	unsigned char new[8];
  	unsigned char old[8];
  	struct urb irq, led;
! 	struct usb_ctrlrequest dr;
  	unsigned char leds, newleds;
  	char name[128];
  	int open;
--- 71,77 ----
  	unsigned char new[8];
  	unsigned char old[8];
  	struct urb irq, led;
! 	devrequest dr;
  	unsigned char leds, newleds;
  	char name[128];
  	int open;
***************
*** 215,225 ****
  	FILL_INT_URB(&kbd->irq, dev, pipe, kbd->new, maxp > 8 ? 8 : maxp,
  		usb_kbd_irq, kbd, endpoint->bInterval);
  
! 	kbd->dr.bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
! 	kbd->dr.bRequest = USB_REQ_SET_REPORT;
! 	kbd->dr.wValue = 0x200;
! 	kbd->dr.wIndex = interface->bInterfaceNumber;
! 	kbd->dr.wLength = 1;
  
  	kbd->dev.name = kbd->name;
  	kbd->dev.idbus = BUS_USB;
--- 215,225 ----
  	FILL_INT_URB(&kbd->irq, dev, pipe, kbd->new, maxp > 8 ? 8 : maxp,
  		usb_kbd_irq, kbd, endpoint->bInterval);
  
! 	kbd->dr.requesttype = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
! 	kbd->dr.request = USB_REQ_SET_REPORT;
! 	kbd->dr.value = 0x200;
! 	kbd->dr.index = interface->bInterfaceNumber;
! 	kbd->dr.length = 1;
  
  	kbd->dev.name = kbd->name;
  	kbd->dev.idbus = BUS_USB;
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: usblcd.c
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usbmouse.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usbmouse.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usbmouse.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usbmouse.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 114,122 ****
  	endpoint = interface->endpoint + 0;
  	if (!(endpoint->bEndpointAddress & 0x80)) return NULL;
  	if ((endpoint->bmAttributes & 3) != 3) return NULL;
! 	/* wacom tablets match... */
!  	if (dev->descriptor.idVendor == 0x056a) return NULL;
! 	
  	pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
  	maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
  
--- 114,120 ----
  	endpoint = interface->endpoint + 0;
  	if (!(endpoint->bEndpointAddress & 0x80)) return NULL;
  	if ((endpoint->bmAttributes & 3) != 3) return NULL;
! 
  	pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
  	maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usbnet.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usbnet.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usbnet.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usbnet.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,6 ****
  /*
   * USB Host-to-Host Links
!  * Copyright (C) 2000-2002 by David Brownell 
   */
  
  /*
--- 1,6 ----
  /*
   * USB Host-to-Host Links
!  * Copyright (C) 2000-2001 by David Brownell 
   */
  
  /*
***************
*** 16,22 ****
   *
   *	- AnchorChip 2720
   *	- Belkin, eTEK (interops with Win32 drivers)
-  *	- EPSON USB clients
   *	- GeneSys GL620USB-A
   *	- "Linux Devices" (like iPaq and similar SA-1100 based PDAs)
   *	- NetChip 1080 (interoperates with NetChip Win32 drivers)
--- 16,21 ----
***************
*** 24,64 ****
   *
   * USB devices can implement their side of this protocol at the cost
   * of two bulk endpoints; it's not restricted to "cable" applications.
!  * See the LINUXDEV or EPSON device/client support.
   *
   * 
!  * Status:
   *
!  * - AN2720 ... not widely available, but reportedly works well
   *
!  * - Belkin/eTEK ... no known issues
!  *
!  * - Both GeneSys and PL-230x use interrupt transfers for driver-to-driver
!  *   handshaking; it'd be worth implementing those as "carrier detect".
!  *   Prefer generic hooks, not minidriver-specific hacks.
!  *
!  * - Linux devices ... the www.handhelds.org SA-1100 support works nicely,
!  *   but the Sharp Zaurus uses an incompatible protocol (extra checksums).
!  *   No reason not to merge the Zaurus protocol here too (got patch? :)
!  *
!  * - For Netchip, should use keventd to poll via control requests to detect
!  *   hardware level "carrier detect". 
!  *
!  * - PL-230x ... the initialization protocol doesn't seem to match chip data
!  *   sheets, sometimes it's not needed and sometimes it hangs.  Prolific has
!  *   not responded to repeated support/information requests.
!  *
!  * Interop with more Win32 drivers may be a good thing.
!  *
!  * Seems like reporting "peer connected" (carrier present) events may end
!  * up going through the netlink event system, not hotplug ... that may be
!  * awkward in terms of automatic configuration though.
!  *
!  * There are reports that bridging gives lower-than-usual throughput.
!  *
!  * Need smarter hotplug policy scripts ... ones that know how to arrange
   * bridging with "brctl", and can handle static and dynamic ("pump") setups.
!  * Use those eventual "peer connected" events, and zeroconf.
   *
   *
   * CHANGELOG:
--- 23,55 ----
   *
   * USB devices can implement their side of this protocol at the cost
   * of two bulk endpoints; it's not restricted to "cable" applications.
!  * See the LINUXDEV support.
   *
   * 
!  * TODO:
   *
!  * This needs to be retested for bulk queuing problems ... earlier versions
!  * seemed to find different types of problems in each HCD.  Once they're fixed,
!  * re-enable queues to get higher bandwidth utilization (without needing
!  * to tweak MTU for larger packets).
!  *
!  * Add support for more "network cable" chips; interop with their Win32
!  * drivers may be a good thing.  Test the AnchorChip 2720 support..
!  * Figure out the initialization protocol used by the Prolific chips,
!  * for better robustness ... there's some powerup/reset handshake that's
!  * needed when only one end reboots.
!  *
!  * Use interrupt on PL230x to detect peer connect/disconnect, and call
!  * netif_carrier_{on,off} (?) appropriately.  For Net1080, detect peer
!  * connect/disconnect with async control messages.
!  *
!  * Find some way to report "peer connected" network hotplug events; it'll
!  * likely mean updating the networking layer.  (This has been discussed
!  * on the netdev list...)
   *
!  * Craft smarter hotplug policy scripts ... ones that know how to arrange
   * bridging with "brctl", and can handle static and dynamic ("pump") setups.
!  * Use those "peer connected" events.
   *
   *
   * CHANGELOG:
***************
*** 71,77 ****
   * 18-dec-2000	(db) tx watchdog, "net1080" renaming to "usbnet", device_info
   *		and prolific support, isolate net1080-specific bits, cleanup.
   *		fix unlink_urbs oops in D3 PM resume code path.
-  *
   * 02-feb-2001	(db) fix tx skb sharing, packet length, match_flags, ...
   * 08-feb-2001	stubbed in "linuxdev", maybe the SA-1100 folk can use it;
   *		AnchorChips 2720 support (from spec) for testing;
--- 62,67 ----
***************
*** 93,106 ****
   *		tie mostly to (sub)driver info.  Workaround some PL-2302
   *		chips that seem to reject SET_INTERFACE requests.
   *
-  * 06-apr-2002	Added ethtool support, based on a patch from Brad Hards.
-  *		Level of diagnostics is more configurable; they use device
-  *		location (usb_device->devpath) instead of address (2.5).
-  *		For tx_fixup, memflags can't be NOIO.
-  * 07-may-2002	Generalize/cleanup keventd support, handling rx stalls (mostly
-  *		for USB 2.0 TTs) and memory shortages (potential) too. (db)
-  *		Use "locally assigned" IEEE802 address space. (Brad Hards)
-  *
   *-------------------------------------------------------------------------*/
  
  #include 
--- 83,88 ----
***************
*** 111,119 ****
  #include 
  #include 
  #include 
- #include 
- #include 
- #include 
  #include 
  
  // #define	DEBUG			// error path messages, extra info
--- 93,98 ----
***************
*** 125,151 ****
  #endif
  #include 
  
- /* in 2.5 these standard usb ops take mem_flags */
- #define ALLOC_URB(n,flags)	usb_alloc_urb(n)
- #define SUBMIT_URB(u,flags)	usb_submit_urb(u)
- 
- /* and these got renamed (may move to usb.h) */
- #define usb_get_dev		usb_inc_dev_use
- #define usb_put_dev		usb_dec_dev_use
- 
  
- /* minidrivers _could_ be individually configured */
  #define	CONFIG_USB_AN2720
  #define	CONFIG_USB_BELKIN
- #define	CONFIG_USB_EPSON2888
  #define	CONFIG_USB_GENESYS
  #define	CONFIG_USB_LINUXDEV
  #define	CONFIG_USB_NET1080
  #define	CONFIG_USB_PL2301
  
  
- #define DRIVER_VERSION		"17-Jul-2002"
- 
  /*-------------------------------------------------------------------------*/
  
  /*
--- 104,118 ----
***************
*** 197,203 ****
  	// protocol/interface state
  	struct net_device	net;
  	struct net_device_stats	stats;
- 	int			msg_level;
  
  #ifdef CONFIG_USB_NET1080
  	u16			packet_id;
--- 164,169 ----
***************
*** 208,219 ****
  	struct sk_buff_head	txq;
  	struct sk_buff_head	done;
  	struct tasklet_struct	bh;
! 
! 	struct tq_struct	kevent;
! 	unsigned long		flags;
! #		define EVENT_TX_HALT	0
! #		define EVENT_RX_HALT	1
! #		define EVENT_RX_MEMORY	2
  };
  
  // device-specific info used by the driver
--- 174,180 ----
  	struct sk_buff_head	txq;
  	struct sk_buff_head	done;
  	struct tasklet_struct	bh;
! 	struct tq_struct	ctrl_task;
  };
  
  // device-specific info used by the driver
***************
*** 263,275 ****
  	size_t			length;
  };
  
- static const char driver_name [] = "usbnet";
- 
- /* use ethtool to change the level for any given device */
- static int msg_level = 1;
- MODULE_PARM (msg_level, "i");
- MODULE_PARM_DESC (msg_level, "Initial message level (default = 1)");
- 
  
  #define	mutex_lock(x)	down(x)
  #define	mutex_unlock(x)	up(x)
--- 224,229 ----
***************
*** 287,295 ****
  #endif
  
  #define devinfo(usbnet, fmt, arg...) \
! 	do { if ((usbnet)->msg_level >= 1) \
! 	printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net.name, ## arg); \
! 	} while (0)
  
  
  #ifdef	CONFIG_USB_AN2720
--- 241,247 ----
  #endif
  
  #define devinfo(usbnet, fmt, arg...) \
! 	printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net.name, ## arg)
  
  
  #ifdef	CONFIG_USB_AN2720
***************
*** 306,317 ****
   *-------------------------------------------------------------------------*/
  
  static const struct driver_info	an2720_info = {
! 	.description =	"AnchorChips/Cypress 2720",
  	// no reset available!
  	// no check_connect available!
  
! 	.in = 2, .out = 2,		// direction distinguishes these
! 	.epsize =64,
  };
  
  #endif	/* CONFIG_USB_AN2720 */
--- 258,269 ----
   *-------------------------------------------------------------------------*/
  
  static const struct driver_info	an2720_info = {
! 	description:	"AnchorChips/Cypress 2720",
  	// no reset available!
  	// no check_connect available!
  
! 	in: 2, out: 2,		// direction distinguishes these
! 	epsize:	64,
  };
  
  #endif	/* CONFIG_USB_AN2720 */
***************
*** 329,367 ****
   *-------------------------------------------------------------------------*/
  
  static const struct driver_info	belkin_info = {
! 	.description =	"Belkin, eTEK, or compatible",
  
! 	.in = 1, .out = 1,		// direction distinguishes these
! 	.epsize =64,
  };
  
  #endif	/* CONFIG_USB_BELKIN */
  
  
  
- #ifdef	CONFIG_USB_EPSON2888
- 
- /*-------------------------------------------------------------------------
-  *
-  * EPSON USB clients
-  *
-  * This is the same idea as "linuxdev" (below) except the firmware in the
-  * device might not be Tux-powered.  Epson provides reference firmware that
-  * implements this interface.  Product developers can reuse or modify that
-  * code, such as by using their own product and vendor codes.
-  *
-  *-------------------------------------------------------------------------*/
- 
- static const struct driver_info	epson2888_info = {
- 	.description =	"Epson USB Device",
- 
- 	.in = 4, .out = 3,
- 	.epsize = 64,
- };
- 
- #endif	/* CONFIG_USB_EPSON2888 */
- 
- 
  #ifdef CONFIG_USB_GENESYS
  
  /*-------------------------------------------------------------------------
--- 281,296 ----
   *-------------------------------------------------------------------------*/
  
  static const struct driver_info	belkin_info = {
! 	description:	"Belkin, eTEK, or compatible",
  
! 	in: 1, out: 1,		// direction distinguishes these
! 	epsize:	64,
  };
  
  #endif	/* CONFIG_USB_BELKIN */
  
  
  
  #ifdef CONFIG_USB_GENESYS
  
  /*-------------------------------------------------------------------------
***************
*** 371,385 ****
   * ... should partially interop with the Win32 driver for this hardware
   * The GeneSys docs imply there's some NDIS issue motivating this framing.
   *
-  * Some info from GeneSys:
-  *  - GL620USB-A is full duplex; GL620USB is only half duplex for bulk.
-  *    (Some cables, like the BAFO-100c, use the half duplex version.)
-  *  - For the full duplex model, the low bit of the version code says
-  *    which side is which ("left/right").
-  *  - For the half duplex type, a control/interrupt handshake settles
-  *    the transfer direction.  (That's disabled here, partially coded.)
-  *    A control URB would block until other side writes an interrupt.
-  *
   *-------------------------------------------------------------------------*/
  
  // control msg write command
--- 300,305 ----
***************
*** 453,459 ****
  	// issue usb interrupt read
  	if (priv && priv->irq_urb) {
  		// submit urb
! 		if ((retval = SUBMIT_URB (priv->irq_urb, GFP_KERNEL)) != 0)
  			dbg ("gl_interrupt_read: submit fail - %X...", retval);
  		else
  			dbg ("gl_interrupt_read: submit success...");
--- 373,379 ----
  	// issue usb interrupt read
  	if (priv && priv->irq_urb) {
  		// submit urb
! 		if ((retval = usb_submit_urb (priv->irq_urb)) != 0)
  			dbg ("gl_interrupt_read: submit fail - %X...", retval);
  		else
  			dbg ("gl_interrupt_read: submit success...");
***************
*** 500,506 ****
  	}
  
  	// allocate irq urb
! 	if ((priv->irq_urb = ALLOC_URB (0, GFP_KERNEL)) == 0) {
  		dbg ("%s: cannot allocate private irq urb per device",
  			dev->net.name);
  		kfree (priv);
--- 420,426 ----
  	}
  
  	// allocate irq urb
! 	if ((priv->irq_urb = usb_alloc_urb (0)) == 0) {
  		dbg ("%s: cannot allocate private irq urb per device",
  			dev->net.name);
  		kfree (priv);
***************
*** 544,551 ****
--- 464,486 ----
  	return 0;
  }
  
+ #else
+ 
+ static int genelink_check_connect (struct usbnet *dev)
+ {
+ 	dbg ("%s: assuming peer is connected", dev->net.name);
+ 	return 0;
+ }
+ 
  #endif
  
+ // reset the device status
+ static int genelink_reset (struct usbnet *dev)
+ {
+ 	// we don't need to reset, just return 0
+ 	return 0;
+ }
+ 
  static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb)
  {
  	struct gl_header	*header;
***************
*** 583,607 ****
  
  		// allocate the skb for the individual packet
  		gl_skb = alloc_skb (size, GFP_ATOMIC);
! 		if (gl_skb) {
  
! 			// copy the packet data to the new skb
! 			memcpy (gl_skb->data, packet->packet_data, size);
  
! 			// set skb data size
! 			gl_skb->len = size;
! 			gl_skb->dev = &dev->net;
  
! 			// determine the packet's protocol ID
! 			gl_skb->protocol = eth_type_trans (gl_skb, &dev->net);
  
! 			// update the status
! 			dev->stats.rx_packets++;
! 			dev->stats.rx_bytes += size;
  
! 			// notify os of the received packet
! 			status = netif_rx (gl_skb);
! 		}
  
  		// advance to the next packet
  		packet = (struct gl_packet *)
--- 518,542 ----
  
  		// allocate the skb for the individual packet
  		gl_skb = alloc_skb (size, GFP_ATOMIC);
! 		if (gl_skb == 0)
! 			return 0;
  
! 		// copy the packet data to the new skb
! 		memcpy (gl_skb->data, packet->packet_data, size);
  
! 		// set skb data size
! 		gl_skb->len = size;
! 		gl_skb->dev = &dev->net;
  
! 		// determine the packet's protocol ID
! 		gl_skb->protocol = eth_type_trans (gl_skb, &dev->net);
  
! 		// update the status
! 		dev->stats.rx_packets++;
! 		dev->stats.rx_bytes += size;
  
! 		// notify os of the received packet
! 		status = netif_rx (gl_skb);
  
  		// advance to the next packet
  		packet = (struct gl_packet *)
***************
*** 665,681 ****
  }
  
  static const struct driver_info	genelink_info = {
! 	.description =	"Genesys GeneLink",
! 	.flags =	FLAG_FRAMING_GL | FLAG_NO_SETINT,
! 	.rx_fixup =	genelink_rx_fixup,
! 	.tx_fixup =	genelink_tx_fixup,
  
! 	.in = 1, .out = 2,
! 	.epsize =64,
! 
! #ifdef	GENELINK_ACK
! 	.check_connect =genelink_check_connect,
! #endif
  };
  
  #endif /* CONFIG_USB_GENESYS */
--- 600,614 ----
  }
  
  static const struct driver_info	genelink_info = {
! 	description:	"Genesys GeneLink",
! 	flags:		FLAG_FRAMING_GL | FLAG_NO_SETINT,
! 	reset:		genelink_reset,
! 	check_connect:	genelink_check_connect,
! 	rx_fixup:	genelink_rx_fixup,
! 	tx_fixup:	genelink_tx_fixup,
  
! 	in: 1, out: 2,
! 	epsize:	64,
  };
  
  #endif /* CONFIG_USB_GENESYS */
***************
*** 696,714 ****
   *
   * One example is Intel's SA-1100 chip, which integrates basic USB
   * support (arch/arm/sa1100/usb-eth.c); it's used in the iPaq PDA.
-  * And others too, like the Yopy.
   *
   *-------------------------------------------------------------------------*/
  
- static const struct driver_info	linuxdev_info = {
- 	.description =	"Linux Device",
  
! 	.in = 2, .out = 1,
! 	.epsize = 64,
  };
  
  #endif	/* CONFIG_USB_LINUXDEV */
  
  
  #ifdef	CONFIG_USB_NET1080
  
--- 629,649 ----
   *
   * One example is Intel's SA-1100 chip, which integrates basic USB
   * support (arch/arm/sa1100/usb-eth.c); it's used in the iPaq PDA.
   *
   *-------------------------------------------------------------------------*/
  
  
! static const struct driver_info	linuxdev_info = {
! 	description:	"Linux Device",
! 	// no reset defined (yet?)
! 	// no check_connect needed!
! 	in: 2, out: 1,
! 	epsize:	64,
  };
  
  #endif	/* CONFIG_USB_LINUXDEV */
  
+ 
  
  #ifdef	CONFIG_USB_NET1080
  
***************
*** 879,888 ****
  static inline void nc_dump_usbctl (struct usbnet *dev, u16 usbctl)
  {
  #ifdef DEBUG
! 	devdbg (dev, "net1080 %s-%s usbctl 0x%x:%s%s%s%s%s;"
  			" this%s%s;"
  			" other%s%s; r/o 0x%x",
! 		dev->udev->bus->bus_name, dev->udev->devpath,
  		usbctl,
  		(usbctl & USBCTL_ENABLE_LANG) ? " lang" : "",
  		(usbctl & USBCTL_ENABLE_MFGR) ? " mfgr" : "",
--- 814,823 ----
  static inline void nc_dump_usbctl (struct usbnet *dev, u16 usbctl)
  {
  #ifdef DEBUG
! 	devdbg (dev, "net1080 %03d/%03d usbctl 0x%x:%s%s%s%s%s;"
  			" this%s%s;"
  			" other%s%s; r/o 0x%x",
! 		dev->udev->bus->busnum, dev->udev->devnum,
  		usbctl,
  		(usbctl & USBCTL_ENABLE_LANG) ? " lang" : "",
  		(usbctl & USBCTL_ENABLE_MFGR) ? " mfgr" : "",
***************
*** 924,933 ****
  static inline void nc_dump_status (struct usbnet *dev, u16 status)
  {
  #ifdef DEBUG
! 	devdbg (dev, "net1080 %s-%s status 0x%x:"
  			" this (%c) PKT=%d%s%s%s;"
  			" other PKT=%d%s%s%s; unspec 0x%x",
! 		dev->udev->bus->bus_name, dev->udev->devpath,
  		status,
  
  		// XXX the packet counts don't seem right
--- 859,868 ----
  static inline void nc_dump_status (struct usbnet *dev, u16 status)
  {
  #ifdef DEBUG
! 	devdbg (dev, "net1080 %03d/%03d status 0x%x:"
  			" this (%c) PKT=%d%s%s%s;"
  			" other PKT=%d%s%s%s; unspec 0x%x",
! 		dev->udev->bus->busnum, dev->udev->devnum,
  		status,
  
  		// XXX the packet counts don't seem right
***************
*** 962,969 ****
  static inline void nc_dump_ttl (struct usbnet *dev, u16 ttl)
  {
  #ifdef DEBUG
! 	devdbg (dev, "net1080 %s-%s ttl 0x%x this = %d, other = %d",
! 		dev->udev->bus->bus_name, dev->udev->devpath,
  		ttl,
  
  		TTL_THIS (ttl),
--- 897,904 ----
  static inline void nc_dump_ttl (struct usbnet *dev, u16 ttl)
  {
  #ifdef DEBUG
! 	devdbg (dev, "net1080 %03d/%03d ttl 0x%x this = %d, other = %d",
! 		dev->udev->bus->busnum, dev->udev->devnum,
  		ttl,
  
  		TTL_THIS (ttl),
***************
*** 986,993 ****
  	// nc_dump_registers (dev);
  
  	if ((retval = nc_register_read (dev, REG_STATUS, vp)) < 0) {
! 		dbg ("can't read %s-%s status: %d",
! 			dev->udev->bus->bus_name, dev->udev->devpath, retval);
  		goto done;
  	}
  	status = *vp;
--- 921,927 ----
  	// nc_dump_registers (dev);
  
  	if ((retval = nc_register_read (dev, REG_STATUS, vp)) < 0) {
! 		dbg ("can't read dev %d status: %d", dev->udev->devnum, retval);
  		goto done;
  	}
  	status = *vp;
***************
*** 1014,1024 ****
  			MK_TTL (NC_READ_TTL_MS, TTL_OTHER (ttl)) );
  	dbg ("%s: assigned TTL, %d ms", dev->net.name, NC_READ_TTL_MS);
  
! 	if (dev->msg_level >= 2)
! 		devinfo (dev, "port %c, peer %sconnected",
! 			(status & STATUS_PORT_A) ? 'A' : 'B',
! 			(status & STATUS_CONN_OTHER) ? "" : "dis"
! 			);
  	retval = 0;
  
  done:
--- 948,957 ----
  			MK_TTL (NC_READ_TTL_MS, TTL_OTHER (ttl)) );
  	dbg ("%s: assigned TTL, %d ms", dev->net.name, NC_READ_TTL_MS);
  
! 	devdbg (dev, "port %c, peer %sconnected",
! 		(status & STATUS_PORT_A) ? 'A' : 'B',
! 		(status & STATUS_CONN_OTHER) ? "" : "dis"
! 		);
  	retval = 0;
  
  done:
***************
*** 1056,1063 ****
  			|| skb->len > FRAMED_SIZE (dev->net.mtu)) {
  		dev->stats.rx_frame_errors++;
  		dbg ("rx framesize %d range %d..%d mtu %d", skb->len,
! 			(int)MIN_FRAMED, (int)FRAMED_SIZE (dev->net.mtu),
! 			dev->net.mtu);
  		return 0;
  	}
  
--- 989,997 ----
  			|| skb->len > FRAMED_SIZE (dev->net.mtu)) {
  		dev->stats.rx_frame_errors++;
  		dbg ("rx framesize %d range %d..%d mtu %d", skb->len,
! 			MIN_FRAMED, FRAMED_SIZE (dev->net.mtu),
! 			dev->net.mtu
! 			);
  		return 0;
  	}
  
***************
*** 1146,1160 ****
  }
  
  static const struct driver_info	net1080_info = {
! 	.description =	"NetChip TurboCONNECT",
! 	.flags =	FLAG_FRAMING_NC,
! 	.reset =	net1080_reset,
! 	.check_connect =net1080_check_connect,
! 	.rx_fixup =	net1080_rx_fixup,
! 	.tx_fixup =	net1080_tx_fixup,
  
! 	.in = 1, .out = 1,		// direction distinguishes these
! 	.epsize =64,
  };
  
  #endif /* CONFIG_USB_NET1080 */
--- 1080,1094 ----
  }
  
  static const struct driver_info	net1080_info = {
! 	description:	"NetChip TurboCONNECT",
! 	flags:		FLAG_FRAMING_NC,
! 	reset:		net1080_reset,
! 	check_connect:	net1080_check_connect,
! 	rx_fixup:	net1080_rx_fixup,
! 	tx_fixup:	net1080_tx_fixup,
  
! 	in: 1, out: 1,		// direction distinguishes these
! 	epsize:	64,
  };
  
  #endif /* CONFIG_USB_NET1080 */
***************
*** 1214,1227 ****
  		PL_S_EN|PL_RESET_OUT|PL_RESET_IN|PL_PEER_E);
  }
  
  static const struct driver_info	prolific_info = {
! 	.description =	"Prolific PL-2301/PL-2302",
! 	.flags =	FLAG_NO_SETINT,
  		/* some PL-2302 versions seem to fail usb_set_interface() */
! 	.reset =	pl_reset,
  
! 	.in = 3, .out = 2,
! 	.epsize =64,
  };
  
  #endif /* CONFIG_USB_PL2301 */
--- 1148,1171 ----
  		PL_S_EN|PL_RESET_OUT|PL_RESET_IN|PL_PEER_E);
  }
  
+ static int pl_check_connect (struct usbnet *dev)
+ {
+ 	// FIXME test interrupt data PL_PEER_E bit
+ 	// plus, there's some handshake done by
+ 	// the prolific win32 driver... 
+ 	dbg ("%s: assuming peer is connected", dev->net.name);
+ 	return 0;
+ }
+ 
  static const struct driver_info	prolific_info = {
! 	description:	"Prolific PL-2301/PL-2302",
! 	flags:		FLAG_NO_SETINT,
  		/* some PL-2302 versions seem to fail usb_set_interface() */
! 	reset:		pl_reset,
! 	check_connect:	pl_check_connect,
  
! 	in: 3, out: 2,
! 	epsize:	64,
  };
  
  #endif /* CONFIG_USB_PL2301 */
***************
*** 1284,1304 ****
  	spin_unlock_irqrestore (&dev->done.lock, flags);
  }
  
- /* some work can't be done in tasklets, so we use keventd
-  *
-  * NOTE:  annoying asymmetry:  if it's active, schedule_task() fails,
-  * but tasklet_schedule() doesn't.  hope the failure is rare.
-  */
- static void defer_kevent (struct usbnet *dev, int work)
- {
- 	set_bit (work, &dev->flags);
- 	if (!schedule_task (&dev->kevent))
- 		err ("%s: kevent %d may have been dropped",
- 			dev->net.name, work);
- 	else
- 		dbg ("%s: kevent %d scheduled", dev->net.name, work);
- }
- 
  /*-------------------------------------------------------------------------*/
  
  static void rx_complete (struct urb *urb);
--- 1228,1233 ----
***************
*** 1325,1331 ****
  
  	if ((skb = alloc_skb (size, flags)) == 0) {
  		dbg ("no rx skb");
! 		defer_kevent (dev, EVENT_RX_MEMORY);
  		usb_free_urb (urb);
  		return;
  	}
--- 1254,1260 ----
  
  	if ((skb = alloc_skb (size, flags)) == 0) {
  		dbg ("no rx skb");
! 		tasklet_schedule (&dev->bh);
  		usb_free_urb (urb);
  		return;
  	}
***************
*** 1340,1345 ****
--- 1269,1277 ----
  		usb_rcvbulkpipe (dev->udev, dev->driver_info->in),
  		skb->data, size, rx_complete, skb);
  	urb->transfer_flags |= USB_ASYNC_UNLINK;
+ #ifdef	REALLY_QUEUE
+ 	urb->transfer_flags |= USB_QUEUE_BULK;
+ #endif
  #if 0
  	// Idle-but-posted reads with UHCI really chew up
  	// PCI bandwidth unless FSBR is disabled
***************
*** 1348,1367 ****
  
  	spin_lock_irqsave (&dev->rxq.lock, lockflags);
  
! 	if (netif_running (&dev->net)
! 			&& !test_bit (EVENT_RX_HALT, &dev->flags)) {
! 		switch (retval = SUBMIT_URB (urb, GFP_ATOMIC)){ 
! 		case -EPIPE:
! 			defer_kevent (dev, EVENT_RX_HALT);
! 			break;
! 		case -ENOMEM:
! 			defer_kevent (dev, EVENT_RX_MEMORY);
! 			break;
! 		default:
  			dbg ("%s rx submit, %d", dev->net.name, retval);
  			tasklet_schedule (&dev->bh);
! 			break;
! 		case 0:
  			__skb_queue_tail (&dev->rxq, skb);
  		}
  	} else {
--- 1280,1290 ----
  
  	spin_lock_irqsave (&dev->rxq.lock, lockflags);
  
! 	if (netif_running (&dev->net)) {
! 		if ((retval = usb_submit_urb (urb)) != 0) {
  			dbg ("%s rx submit, %d", dev->net.name, retval);
  			tasklet_schedule (&dev->bh);
! 		} else {
  			__skb_queue_tail (&dev->rxq, skb);
  		}
  	} else {
***************
*** 1435,1454 ****
  		}
  		break;
  
- 	    // stalls need manual reset. this is rare ... except that
- 	    // when going through USB 2.0 TTs, unplug appears this way.
- 	    // we avoid the highspeed version of the ETIMEOUT/EILSEQ
- 	    // storm, recovering as needed.
- 	    case -EPIPE:
- 		defer_kevent (dev, EVENT_RX_HALT);
- 		// FALLTHROUGH
- 
  	    // software-driven interface shutdown
! 	    case -ECONNRESET:		// according to API spec
! 	    case -ECONNABORTED:		// some (now fixed?) UHCI bugs
! 		dbg ("%s rx shutdown, code %d", dev->net.name, urb_status);
  		entry->state = rx_cleanup;
! 		// do urb frees only in the tasklet (UHCI has oopsed ...)
  		entry->urb = urb;
  		urb = 0;
  		break;
--- 1358,1369 ----
  		}
  		break;
  
  	    // software-driven interface shutdown
! 	    case -ECONNRESET:		// usb-ohci, usb-uhci
! 	    case -ECONNABORTED:		// uhci ... for usb-uhci, INTR
! 		dbg ("%s shutdown, code %d", dev->net.name, urb_status);
  		entry->state = rx_cleanup;
! 		// do urb frees only in the tasklet
  		entry->urb = urb;
  		urb = 0;
  		break;
***************
*** 1459,1467 ****
  		// FALLTHROUGH
  	    
  	    default:
! 		// on unplug we get ETIMEDOUT (ohci) or EILSEQ (uhci)
! 		// until khubd sees its interrupt and disconnects us.
! 		// that can easily be hundreds of passes through here.
  		entry->state = rx_cleanup;
  		dev->stats.rx_errors++;
  		dbg ("%s rx: status %d", dev->net.name, urb_status);
--- 1374,1381 ----
  		// FALLTHROUGH
  	    
  	    default:
! 		// on unplug we'll get a burst of ETIMEDOUT/EILSEQ
! 		// till the khubd gets and handles its interrupt.
  		entry->state = rx_cleanup;
  		dev->stats.rx_errors++;
  		dbg ("%s rx: status %d", dev->net.name, urb_status);
***************
*** 1471,1482 ****
  	defer_bh (dev, skb);
  
  	if (urb) {
! 		if (netif_running (&dev->net)
! 				&& !test_bit (EVENT_RX_HALT, &dev->flags)) {
  			rx_submit (dev, urb, GFP_ATOMIC);
  			return;
  		}
- 		usb_free_urb (urb);
  	}
  #ifdef	VERBOSE
  	dbg ("no read resubmitted");
--- 1385,1394 ----
  	defer_bh (dev, skb);
  
  	if (urb) {
! 		if (netif_running (&dev->net)) {
  			rx_submit (dev, urb, GFP_ATOMIC);
  			return;
  		}
  	}
  #ifdef	VERBOSE
  	dbg ("no read resubmitted");
***************
*** 1506,1512 ****
  		// during some PM-driven resume scenarios,
  		// these (async) unlinks complete immediately
  		retval = usb_unlink_urb (urb);
! 		if (retval != -EINPROGRESS && retval != 0)
  			dbg ("unlink urb err, %d", retval);
  		else
  			count++;
--- 1418,1424 ----
  		// during some PM-driven resume scenarios,
  		// these (async) unlinks complete immediately
  		retval = usb_unlink_urb (urb);
! 		if (retval < 0)
  			dbg ("unlink urb err, %d", retval);
  		else
  			count++;
***************
*** 1530,1540 ****
  	mutex_lock (&dev->mutex);
  	netif_stop_queue (net);
  
! 	if (dev->msg_level >= 2)
! 		devinfo (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld",
! 			dev->stats.rx_packets, dev->stats.tx_packets, 
! 			dev->stats.rx_errors, dev->stats.tx_errors
! 			);
  
  	// ensure there are no more active urbs
  	add_wait_queue (&unlink_wakeup, &wait);
--- 1442,1451 ----
  	mutex_lock (&dev->mutex);
  	netif_stop_queue (net);
  
! 	devdbg (dev, "stop stats: rx/tx %ld/%ld, errs %ld/%ld",
! 		dev->stats.rx_packets, dev->stats.tx_packets, 
! 		dev->stats.rx_errors, dev->stats.tx_errors
! 		);
  
  	// ensure there are no more active urbs
  	add_wait_queue (&unlink_wakeup, &wait);
***************
*** 1572,1580 ****
  
  	// put into "known safe" state
  	if (info->reset && (retval = info->reset (dev)) < 0) {
! 		devinfo (dev, "open reset fail (%d) usbnet usb-%s-%s, %s",
  			retval,
! 			dev->udev->bus->bus_name, dev->udev->devpath,
  			info->description);
  		goto done;
  	}
--- 1483,1491 ----
  
  	// put into "known safe" state
  	if (info->reset && (retval = info->reset (dev)) < 0) {
! 		devinfo (dev, "open reset fail (%d) usbnet %03d/%03d, %s",
  			retval,
! 			dev->udev->bus->busnum, dev->udev->devnum,
  			info->description);
  		goto done;
  	}
***************
*** 1586,1601 ****
  	}
  
  	netif_start_queue (net);
! 	if (dev->msg_level >= 2)
! 		devinfo (dev, "open: enable queueing "
! 				"(rx %d, tx %d) mtu %d %s framing",
! 			RX_QLEN, TX_QLEN, dev->net.mtu,
! 			(info->flags & (FLAG_FRAMING_NC | FLAG_FRAMING_GL))
! 			    ? ((info->flags & FLAG_FRAMING_NC)
! 				? "NetChip"
! 				: "GeneSys")
! 			    : "raw"
! 			);
  
  	// delay posting reads until we're fully open
  	tasklet_schedule (&dev->bh);
--- 1497,1510 ----
  	}
  
  	netif_start_queue (net);
! 	devdbg (dev, "open: enable queueing (rx %d, tx %d) mtu %d %s framing",
! 		RX_QLEN, TX_QLEN, dev->net.mtu,
! 		(info->flags & (FLAG_FRAMING_NC | FLAG_FRAMING_GL))
! 		    ? ((info->flags & FLAG_FRAMING_NC)
! 			? "NetChip"
! 			: "GeneSys")
! 		    : "raw"
! 		);
  
  	// delay posting reads until we're fully open
  	tasklet_schedule (&dev->bh);
***************
*** 1606,1739 ****
  
  /*-------------------------------------------------------------------------*/
  
! static int usbnet_ethtool_ioctl (struct net_device *net, void *useraddr)
! {
! 	struct usbnet	*dev = (struct usbnet *) net->priv;
! 	u32		cmd;
! 
! 	if (get_user (cmd, (u32 *)useraddr))
! 		return -EFAULT;
! 	switch (cmd) {
! 
! 	case ETHTOOL_GDRVINFO: {	/* get driver info */
! 		struct ethtool_drvinfo		info;
! 
! 		memset (&info, 0, sizeof info);
! 		info.cmd = ETHTOOL_GDRVINFO;
! 		strncpy (info.driver, driver_name, sizeof info.driver);
! 		strncpy (info.version, DRIVER_VERSION, sizeof info.version);
! 		strncpy (info.fw_version, dev->driver_info->description,
! 			sizeof info.fw_version);
! 		usb_make_path (dev->udev, info.bus_info, sizeof info.bus_info);
! 		if (copy_to_user (useraddr, &info, sizeof (info)))
! 			return -EFAULT;
! 		return 0;
! 		}
! 
! 	case ETHTOOL_GLINK: 		/* get link status */
! 		if (dev->driver_info->check_connect) {
! 			struct ethtool_value	edata = { ETHTOOL_GLINK };
! 
! 			edata.data = dev->driver_info->check_connect (dev) == 0;
! 			if (copy_to_user (useraddr, &edata, sizeof (edata)))
! 				return -EFAULT;
! 			return 0;
! 		}
! 		break;
  
- 	case ETHTOOL_GMSGLVL: {		/* get message-level */
- 		struct ethtool_value	edata = {ETHTOOL_GMSGLVL};
- 
- 		edata.data = dev->msg_level;
- 		if (copy_to_user (useraddr, &edata, sizeof (edata)))
- 			return -EFAULT;
- 		return 0;
- 		}
- 
- 	case ETHTOOL_SMSGLVL: {		/* set message-level */
- 		struct ethtool_value	edata;
- 
- 		if (copy_from_user (&edata, useraddr, sizeof (edata)))
- 			return -EFAULT;
- 		dev->msg_level = edata.data;
- 		return 0;
- 		}
- 	
- 	/* could also map RINGPARAM to RX/TX QLEN */
- 
- 	}
-         /* Note that the ethtool user space code requires EOPNOTSUPP */
- 	return -EOPNOTSUPP;
- }
- 
- static int usbnet_ioctl (struct net_device *net, struct ifreq *rq, int cmd)
- {
- 	switch (cmd) {
- 	case SIOCETHTOOL:
- 		return usbnet_ethtool_ioctl (net, (void *)rq->ifr_data);
- 	default:
- 		return -EOPNOTSUPP;
- 	}
- }
- 
- /*-------------------------------------------------------------------------*/
- 
- /* work that cannot be done in interrupt context uses keventd.
-  *
-  * NOTE:  "uhci" and "usb-uhci" may have trouble with this since they don't
-  * queue control transfers to individual devices, and other threads could
-  * trigger control requests concurrently.  hope that's rare.
-  */
  static void
! kevent (void *data)
  {
  	struct usbnet		*dev = data;
- 	int			status;
  
! 	/* usb_clear_halt() needs a thread context */
! 	if (test_bit (EVENT_TX_HALT, &dev->flags)) {
! 		unlink_urbs (&dev->txq);
! 		status = usb_clear_halt (dev->udev,
! 			usb_sndbulkpipe (dev->udev, dev->driver_info->out));
! 		if (status < 0)
! 			err ("%s: can't clear tx halt, status %d",
! 				dev->net.name, status);
! 		else {
! 			clear_bit (EVENT_TX_HALT, &dev->flags);
! 			netif_wake_queue (&dev->net);
! 		}
! 	}
! 	if (test_bit (EVENT_RX_HALT, &dev->flags)) {
! 		unlink_urbs (&dev->rxq);
! 		status = usb_clear_halt (dev->udev,
! 			usb_rcvbulkpipe (dev->udev, dev->driver_info->in));
! 		if (status < 0)
! 			err ("%s: can't clear rx halt, status %d",
! 				dev->net.name, status);
! 		else {
! 			clear_bit (EVENT_RX_HALT, &dev->flags);
! 			tasklet_schedule (&dev->bh);
! 		}
! 	}
! 
! 	/* tasklet could resubmit itself forever if memory is tight */
! 	if (test_bit (EVENT_RX_MEMORY, &dev->flags)) {
! 		struct urb	*urb = 0;
! 
! 		if (netif_running (&dev->net))
! 			urb = ALLOC_URB (0, GFP_KERNEL);
! 		else
! 			clear_bit (EVENT_RX_MEMORY, &dev->flags);
! 		if (urb != 0) {
! 			clear_bit (EVENT_RX_MEMORY, &dev->flags);
! 			rx_submit (dev, urb, GFP_KERNEL);
! 			tasklet_schedule (&dev->bh);
! 		}
! 	}
! 
! 	if (dev->flags)
! 		dbg ("%s: kevent done, flags = 0x%lx",
! 			dev->net.name, dev->flags);
  }
  
  /*-------------------------------------------------------------------------*/
--- 1515,1530 ----
  
  /*-------------------------------------------------------------------------*/
  
! /* usb_clear_halt cannot be called in interrupt context */
  
  static void
! tx_clear_halt (void *data)
  {
  	struct usbnet		*dev = data;
  
! 	usb_clear_halt (dev->udev,
! 		usb_sndbulkpipe (dev->udev, dev->driver_info->out));
! 	netif_wake_queue (&dev->net);
  }
  
  /*-------------------------------------------------------------------------*/
***************
*** 1744,1751 ****
  	struct skb_data		*entry = (struct skb_data *) skb->cb;
  	struct usbnet		*dev = entry->dev;
  
! 	if (urb->status == -EPIPE)
! 		defer_kevent (dev, EVENT_TX_HALT);
  	urb->dev = 0;
  	entry->state = tx_done;
  	defer_bh (dev, skb);
--- 1535,1549 ----
  	struct skb_data		*entry = (struct skb_data *) skb->cb;
  	struct usbnet		*dev = entry->dev;
  
! 	if (urb->status == USB_ST_STALL) {
! 		if (dev->ctrl_task.sync == 0) {
! 			dev->ctrl_task.routine = tx_clear_halt;
! 			dev->ctrl_task.data = dev;
! 			schedule_task (&dev->ctrl_task);
! 		} else {
! 			dbg ("Cannot clear TX stall");
! 		}
! 	}
  	urb->dev = 0;
  	entry->state = tx_done;
  	defer_bh (dev, skb);
***************
*** 1773,1795 ****
  	struct urb		*urb = 0;
  	struct skb_data		*entry;
  	struct driver_info	*info = dev->driver_info;
! 	unsigned long		flags;
  #ifdef	CONFIG_USB_NET1080
  	struct nc_header	*header = 0;
  	struct nc_trailer	*trailer = 0;
  #endif	/* CONFIG_USB_NET1080 */
  
  	// some devices want funky USB-level framing, for
  	// win32 driver (usually) and/or hardware quirks
  	if (info->tx_fixup) {
! 		skb = info->tx_fixup (dev, skb, GFP_ATOMIC);
  		if (!skb) {
  			dbg ("can't tx_fixup skb");
  			goto drop;
  		}
  	}
  
! 	if (!(urb = ALLOC_URB (0, GFP_ATOMIC))) {
  		dbg ("no urb");
  		goto drop;
  	}
--- 1571,1595 ----
  	struct urb		*urb = 0;
  	struct skb_data		*entry;
  	struct driver_info	*info = dev->driver_info;
! 	int			flags;
  #ifdef	CONFIG_USB_NET1080
  	struct nc_header	*header = 0;
  	struct nc_trailer	*trailer = 0;
  #endif	/* CONFIG_USB_NET1080 */
  
+ 	flags = in_interrupt () ? GFP_ATOMIC : GFP_KERNEL;
+ 
  	// some devices want funky USB-level framing, for
  	// win32 driver (usually) and/or hardware quirks
  	if (info->tx_fixup) {
! 		skb = info->tx_fixup (dev, skb, flags);
  		if (!skb) {
  			dbg ("can't tx_fixup skb");
  			goto drop;
  		}
  	}
  
! 	if (!(urb = usb_alloc_urb (0))) {
  		dbg ("no urb");
  		goto drop;
  	}
***************
*** 1822,1827 ****
--- 1622,1630 ----
  			usb_sndbulkpipe (dev->udev, info->out),
  			skb->data, skb->len, tx_complete, skb);
  	urb->transfer_flags |= USB_ASYNC_UNLINK;
+ #ifdef	REALLY_QUEUE
+ 	urb->transfer_flags |= USB_QUEUE_BULK;
+ #endif
  	// FIXME urb->timeout = ... jiffies ... ;
  
  	spin_lock_irqsave (&dev->txq.lock, flags);
***************
*** 1838,1856 ****
  	}
  #endif	/* CONFIG_USB_NET1080 */
  
! 	switch ((retval = SUBMIT_URB (urb, GFP_ATOMIC))) {
! 	case -EPIPE:
! 		netif_stop_queue (net);
! 		defer_kevent (dev, EVENT_TX_HALT);
! 		break;
! 	default:
  		dbg ("%s tx: submit urb err %d", net->name, retval);
! 		break;
! 	case 0:
  		net->trans_start = jiffies;
  		__skb_queue_tail (&dev->txq, skb);
! 		if (dev->txq.qlen >= TX_QLEN)
! 			netif_stop_queue (net);
  	}
  	spin_unlock_irqrestore (&dev->txq.lock, flags);
  
--- 1641,1655 ----
  	}
  #endif	/* CONFIG_USB_NET1080 */
  
! 	netif_stop_queue (net);
! 	if ((retval = usb_submit_urb (urb)) != 0) {
! 		netif_start_queue (net);
  		dbg ("%s tx: submit urb err %d", net->name, retval);
! 	} else {
  		net->trans_start = jiffies;
  		__skb_queue_tail (&dev->txq, skb);
! 		if (dev->txq.qlen < TX_QLEN)
! 			netif_start_queue (net);
  	}
  	spin_unlock_irqrestore (&dev->txq.lock, flags);
  
***************
*** 1917,1931 ****
  		}
  
  	// or are we maybe short a few urbs?
! 	} else if (netif_running (&dev->net)
! 			&& !test_bit (EVENT_RX_HALT, &dev->flags)) {
  		int	temp = dev->rxq.qlen;
  
  		if (temp < RX_QLEN) {
  			struct urb	*urb;
  			int		i;
  			for (i = 0; i < 3 && dev->rxq.qlen < RX_QLEN; i++) {
! 				if ((urb = ALLOC_URB (0, GFP_ATOMIC)) != 0)
  					rx_submit (dev, urb, GFP_ATOMIC);
  			}
  			if (temp != dev->rxq.qlen)
--- 1716,1729 ----
  		}
  
  	// or are we maybe short a few urbs?
! 	} else if (netif_running (&dev->net)) {
  		int	temp = dev->rxq.qlen;
  
  		if (temp < RX_QLEN) {
  			struct urb	*urb;
  			int		i;
  			for (i = 0; i < 3 && dev->rxq.qlen < RX_QLEN; i++) {
! 				if ((urb = usb_alloc_urb (0)) != 0)
  					rx_submit (dev, urb, GFP_ATOMIC);
  			}
  			if (temp != dev->rxq.qlen)
***************
*** 1953,1960 ****
  {
  	struct usbnet	*dev = (struct usbnet *) ptr;
  
! 	devinfo (dev, "unregister usbnet usb-%s-%s, %s",
! 		udev->bus->bus_name, udev->devpath,
  		dev->driver_info->description);
  	
  	unregister_netdev (&dev->net);
--- 1751,1758 ----
  {
  	struct usbnet	*dev = (struct usbnet *) ptr;
  
! 	devinfo (dev, "unregister usbnet %03d/%03d, %s",
! 		udev->bus->busnum, udev->devnum,
  		dev->driver_info->description);
  	
  	unregister_netdev (&dev->net);
***************
*** 1964,1974 ****
  	list_del (&dev->dev_list);
  	mutex_unlock (&usbnet_mutex);
  
- 	// assuming we used keventd, it must quiesce too
- 	flush_scheduled_tasks ();
- 
  	kfree (dev);
! 	usb_put_dev (udev);
  }
  
  
--- 1762,1769 ----
  	list_del (&dev->dev_list);
  	mutex_unlock (&usbnet_mutex);
  
  	kfree (dev);
! 	usb_dec_dev_use (udev);
  }
  
  
***************
*** 2014,2030 ****
  	memset (dev, 0, sizeof *dev);
  
  	init_MUTEX_LOCKED (&dev->mutex);
! 	usb_get_dev (udev);
  	dev->udev = udev;
  	dev->driver_info = info;
- 	dev->msg_level = msg_level;
  	INIT_LIST_HEAD (&dev->dev_list);
  	skb_queue_head_init (&dev->rxq);
  	skb_queue_head_init (&dev->txq);
  	skb_queue_head_init (&dev->done);
  	dev->bh.func = usbnet_bh;
  	dev->bh.data = (unsigned long) dev;
- 	INIT_TQUEUE (&dev->kevent, kevent, dev);
  
  	// set up network interface records
  	net = &dev->net;
--- 1809,1823 ----
  	memset (dev, 0, sizeof *dev);
  
  	init_MUTEX_LOCKED (&dev->mutex);
! 	usb_inc_dev_use (udev);
  	dev->udev = udev;
  	dev->driver_info = info;
  	INIT_LIST_HEAD (&dev->dev_list);
  	skb_queue_head_init (&dev->rxq);
  	skb_queue_head_init (&dev->txq);
  	skb_queue_head_init (&dev->done);
  	dev->bh.func = usbnet_bh;
  	dev->bh.data = (unsigned long) dev;
  
  	// set up network interface records
  	net = &dev->net;
***************
*** 2044,2054 ****
  	net->stop = usbnet_stop;
  	net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
  	net->tx_timeout = usbnet_tx_timeout;
- 	net->do_ioctl = usbnet_ioctl;
  
  	register_netdev (&dev->net);
! 	devinfo (dev, "register usbnet usb-%s-%s, %s",
! 		udev->bus->bus_name, udev->devpath,
  		dev->driver_info->description);
  
  	// ok, it's ready to go.
--- 1837,1846 ----
  	net->stop = usbnet_stop;
  	net->watchdog_timeo = TX_TIMEOUT_JIFFIES;
  	net->tx_timeout = usbnet_tx_timeout;
  
  	register_netdev (&dev->net);
! 	devinfo (dev, "register usbnet %03d/%03d, %s",
! 		udev->bus->busnum, udev->devnum,
  		dev->driver_info->description);
  
  	// ok, it's ready to go.
***************
*** 2076,2116 ****
  #ifdef	CONFIG_USB_AN2720
  {
  	USB_DEVICE (0x0547, 0x2720),	// AnchorChips defaults
! 	.driver_info =	(unsigned long) &an2720_info,
! }, {
  	USB_DEVICE (0x0547, 0x2727),	// Xircom PGUNET
! 	.driver_info =	(unsigned long) &an2720_info,
  },
  #endif
  
  #ifdef	CONFIG_USB_BELKIN
  {
  	USB_DEVICE (0x050d, 0x0004),	// Belkin
! 	.driver_info =	(unsigned long) &belkin_info,
  }, {
  	USB_DEVICE (0x056c, 0x8100),	// eTEK
! 	.driver_info =	(unsigned long) &belkin_info,
  }, {
  	USB_DEVICE (0x0525, 0x9901),	// Advance USBNET (eTEK)
! 	.driver_info =	(unsigned long) &belkin_info,
! },
! #endif
! 
! #ifdef	CONFIG_USB_EPSON2888
! {
! 	USB_DEVICE (0x0525, 0x2888),	// EPSON USB client
! 	driver_info:	(unsigned long) &epson2888_info,
  },
  #endif
  
  #ifdef	CONFIG_USB_GENESYS
  {
  	USB_DEVICE (0x05e3, 0x0502),	// GL620USB-A
! 	.driver_info =	(unsigned long) &genelink_info,
  },
- 	/* NOT: USB_DEVICE (0x05e3, 0x0501),	// GL620USB
- 	 * that's half duplex, not currently supported
- 	 */
  #endif
  
  #ifdef	CONFIG_USB_LINUXDEV
--- 1868,1900 ----
  #ifdef	CONFIG_USB_AN2720
  {
  	USB_DEVICE (0x0547, 0x2720),	// AnchorChips defaults
! 	driver_info:	(unsigned long) &an2720_info,
! },
! 
! {
  	USB_DEVICE (0x0547, 0x2727),	// Xircom PGUNET
! 	driver_info:	(unsigned long) &an2720_info,
  },
  #endif
  
  #ifdef	CONFIG_USB_BELKIN
  {
  	USB_DEVICE (0x050d, 0x0004),	// Belkin
! 	driver_info:	(unsigned long) &belkin_info,
  }, {
  	USB_DEVICE (0x056c, 0x8100),	// eTEK
! 	driver_info:	(unsigned long) &belkin_info,
  }, {
  	USB_DEVICE (0x0525, 0x9901),	// Advance USBNET (eTEK)
! 	driver_info:	(unsigned long) &belkin_info,
  },
  #endif
  
  #ifdef	CONFIG_USB_GENESYS
  {
  	USB_DEVICE (0x05e3, 0x0502),	// GL620USB-A
! 	driver_info:	(unsigned long) &genelink_info,
  },
  #endif
  
  #ifdef	CONFIG_USB_LINUXDEV
***************
*** 2121,2152 ****
  {
  	// 1183 = 0x049F, both used as hex values?
  	USB_DEVICE (0x049F, 0x505A),	// Compaq "Itsy"
! 	.driver_info =	(unsigned long) &linuxdev_info,
! }, {
! 	USB_DEVICE (0x0E7E, 0x1001),	// G.Mate "Yopy"
! 	.driver_info =	(unsigned long) &linuxdev_info,
  },
- 	// NOTE:  the Sharp Zaurus uses a modified version of
- 	// this driver, which is not interoperable with this.
  #endif
  
  #ifdef	CONFIG_USB_NET1080
  {
  	USB_DEVICE (0x0525, 0x1080),	// NetChip ref design
! 	.driver_info =	(unsigned long) &net1080_info,
! }, {
  	USB_DEVICE (0x06D0, 0x0622),	// Laplink Gold
! 	.driver_info =	(unsigned long) &net1080_info,
  },
  #endif
  
  #ifdef CONFIG_USB_PL2301
  {
  	USB_DEVICE (0x067b, 0x0000),	// PL-2301
! 	.driver_info =	(unsigned long) &prolific_info,
  }, {
  	USB_DEVICE (0x067b, 0x0001),	// PL-2302
! 	.driver_info =	(unsigned long) &prolific_info,
  },
  #endif
  
--- 1905,1932 ----
  {
  	// 1183 = 0x049F, both used as hex values?
  	USB_DEVICE (0x049F, 0x505A),	// Compaq "Itsy"
! 	driver_info:	(unsigned long) &linuxdev_info,
  },
  #endif
  
  #ifdef	CONFIG_USB_NET1080
  {
  	USB_DEVICE (0x0525, 0x1080),	// NetChip ref design
! 	driver_info:	(unsigned long) &net1080_info,
! },
! {
  	USB_DEVICE (0x06D0, 0x0622),	// Laplink Gold
! 	driver_info:	(unsigned long) &net1080_info,
  },
  #endif
  
  #ifdef CONFIG_USB_PL2301
  {
  	USB_DEVICE (0x067b, 0x0000),	// PL-2301
! 	driver_info:	(unsigned long) &prolific_info,
  }, {
  	USB_DEVICE (0x067b, 0x0001),	// PL-2302
! 	driver_info:	(unsigned long) &prolific_info,
  },
  #endif
  
***************
*** 2157,2166 ****
  MODULE_DEVICE_TABLE (usb, products);
  
  static struct usb_driver usbnet_driver = {
! 	.name =		driver_name,
! 	.id_table =	products,
! 	.probe =	usbnet_probe,
! 	.disconnect =	usbnet_disconnect,
  };
  
  /*-------------------------------------------------------------------------*/
--- 1937,1946 ----
  MODULE_DEVICE_TABLE (usb, products);
  
  static struct usb_driver usbnet_driver = {
! 	name:		"usbnet",
! 	id_table:	products,
! 	probe:		usbnet_probe,
! 	disconnect:	usbnet_disconnect,
  };
  
  /*-------------------------------------------------------------------------*/
***************
*** 2173,2179 ****
  
  	get_random_bytes (node_id, sizeof node_id);
  	node_id [0] &= 0xfe;	// clear multicast bit
- 	node_id [0] |= 0x02;    // set local assignment bit (IEEE802)
  
   	if (usb_register (&usbnet_driver) < 0)
   		return -1;
--- 1953,1958 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usbvideo.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usbvideo.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usbvideo.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usbvideo.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 58,83 ****
  /* Memory management functions */
  /*******************************/
  
  /*
   * Here we want the physical address of the memory.
!  * This is used when initializing the contents of the area.
   */
  unsigned long usbvideo_kvirt_to_pa(unsigned long adr)
  {
! 	unsigned long kva, ret;
  
! 	kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
! 	kva |= adr & (PAGE_SIZE-1); /* restore the offset */
  	ret = __pa(kva);
  	return ret;
  }
  
  void *usbvideo_rvmalloc(unsigned long size)
  {
  	void *mem;
! 	unsigned long adr;
  
- 	size = PAGE_ALIGN(size);
  	mem = vmalloc_32(size);
  	if (!mem)
  		return NULL;
--- 58,114 ----
  /* Memory management functions */
  /*******************************/
  
+ #define MDEBUG(x)	do { } while(0)		/* Debug memory management */
+ 
+ /* Given PGD from the address space's page table, return the kernel
+  * virtual mapping of the physical memory mapped at ADR.
+  */
+ unsigned long usbvideo_uvirt_to_kva(pgd_t *pgd, unsigned long adr)
+ {
+ 	unsigned long ret = 0UL;
+ 	pmd_t *pmd;
+ 	pte_t *ptep, pte;
+ 
+ 	if (!pgd_none(*pgd)) {
+ 		pmd = pmd_offset(pgd, adr);
+ 		if (!pmd_none(*pmd)) {
+ 			ptep = pte_offset(pmd, adr);
+ 			pte = *ptep;
+ 			if (pte_present(pte)) {
+ 				ret = (unsigned long) page_address(pte_page(pte));
+ 				ret |= (adr & (PAGE_SIZE-1));
+ 			}
+ 		}
+ 	}
+ 	MDEBUG(printk("uv2kva(%lx-->%lx)", adr, ret));
+ 	return ret;
+ }
+ 
  /*
   * Here we want the physical address of the memory.
!  * This is used when initializing the contents of the
!  * area and marking the pages as reserved.
   */
  unsigned long usbvideo_kvirt_to_pa(unsigned long adr)
  {
! 	unsigned long va, kva, ret;
  
! 	va = VMALLOC_VMADDR(adr);
! 	kva = usbvideo_uvirt_to_kva(pgd_offset_k(va), va);
  	ret = __pa(kva);
+ 	MDEBUG(printk("kv2pa(%lx-->%lx)", adr, ret));
  	return ret;
  }
  
  void *usbvideo_rvmalloc(unsigned long size)
  {
  	void *mem;
! 	unsigned long adr, page;
! 
! 	/* Round it off to PAGE_SIZE */
! 	size += (PAGE_SIZE - 1);
! 	size &= ~(PAGE_SIZE - 1);
  
  	mem = vmalloc_32(size);
  	if (!mem)
  		return NULL;
***************
*** 85,93 ****
  	memset(mem, 0, size); /* Clear the ram out, no junk to the user */
  	adr = (unsigned long) mem;
  	while (size > 0) {
! 		mem_map_reserve(vmalloc_to_page((void *)adr));
  		adr += PAGE_SIZE;
! 		size -= PAGE_SIZE;
  	}
  
  	return mem;
--- 116,128 ----
  	memset(mem, 0, size); /* Clear the ram out, no junk to the user */
  	adr = (unsigned long) mem;
  	while (size > 0) {
! 		page = usbvideo_kvirt_to_pa(adr);
! 		mem_map_reserve(virt_to_page(__va(page)));
  		adr += PAGE_SIZE;
! 		if (size > PAGE_SIZE)
! 			size -= PAGE_SIZE;
! 		else
! 			size = 0;
  	}
  
  	return mem;
***************
*** 95,110 ****
  
  void usbvideo_rvfree(void *mem, unsigned long size)
  {
! 	unsigned long adr;
  
  	if (!mem)
  		return;
  
! 	adr = (unsigned long) mem;
! 	while ((long) size > 0) {
! 		mem_map_unreserve(vmalloc_to_page((void *)adr));
  		adr += PAGE_SIZE;
! 		size -= PAGE_SIZE;
  	}
  	vfree(mem);
  }
--- 130,152 ----
  
  void usbvideo_rvfree(void *mem, unsigned long size)
  {
! 	unsigned long adr, page;
  
  	if (!mem)
  		return;
  
! 	size += (PAGE_SIZE - 1);
! 	size &= ~(PAGE_SIZE - 1);
! 
! 	adr=(unsigned long) mem;
! 	while (size > 0) {
! 		page = usbvideo_kvirt_to_pa(adr);
! 		mem_map_unreserve(virt_to_page(__va(page)));
  		adr += PAGE_SIZE;
! 		if (size > PAGE_SIZE)
! 			size -= PAGE_SIZE;
! 		else
! 			size = 0;
  	}
  	vfree(mem);
  }
***************
*** 1695,1706 ****
  	 * have - even if the application wants more. That would be
  	 * a big security embarassment!
  	 */
- 	 
- 	if (count + frame->seqRead_Index < count)
- 	{
- 		count = -EINVAL;
- 		goto read_done;
- 	}
  	if ((count + frame->seqRead_Index) > frame->seqRead_Length)
  		count = frame->seqRead_Length - frame->seqRead_Index;
  
--- 1737,1742 ----
***************
*** 1740,1746 ****
  /*
   * Make all of the blocks of data contiguous
   */
! static int usbvideo_CompressIsochronous(uvd_t *uvd, struct urb *urb)
  {
  	char *cdata;
  	int i, totlen = 0;
--- 1776,1782 ----
  /*
   * Make all of the blocks of data contiguous
   */
! static int usbvideo_CompressIsochronous(uvd_t *uvd, urb_t *urb)
  {
  	char *cdata;
  	int i, totlen = 0;
***************
*** 1855,1861 ****
  	/* We double buffer the Iso lists */
  	for (i=0; i < USBVIDEO_NUMSBUF; i++) {
  		int j, k;
! 		struct urb *urb = uvd->sbuf[i].urb;
  		urb->dev = dev;
  		urb->context = uvd;
  		urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp);
--- 1891,1897 ----
  	/* We double buffer the Iso lists */
  	for (i=0; i < USBVIDEO_NUMSBUF; i++) {
  		int j, k;
! 		urb_t *urb = uvd->sbuf[i].urb;
  		urb->dev = dev;
  		urb->context = uvd;
  		urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp);
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usbvideo.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usbvideo.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/usbvideo.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/usbvideo.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 165,171 ****
  /* This structure represents one Isoc request - URB and buffer */
  typedef struct {
  	char *data;
! 	struct urb *urb;
  } usbvideo_sbuf_t;
  
  typedef struct {
--- 165,171 ----
  /* This structure represents one Isoc request - URB and buffer */
  typedef struct {
  	char *data;
! 	urb_t *urb;
  } usbvideo_sbuf_t;
  
  typedef struct {
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: vicam.c
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: vicam.h
HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb$B$@$1$KH/8+(B: vicamurbs.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/wacom.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/wacom.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/drivers/usb/wacom.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/drivers/usb/wacom.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,5 ****
  /*
!  * $Id: wacom.c,v 1.23 2001/05/29 12:57:18 vojtech Exp $
   *
   *  Copyright (c) 2000-2001 Vojtech Pavlik	
   *  Copyright (c) 2000 Andreas Bach Aaen	
--- 1,5 ----
  /*
!  * $Id: wacom.c,v 1.22 2001/04/26 11:26:09 vojtech Exp $
   *
   *  Copyright (c) 2000-2001 Vojtech Pavlik	
   *  Copyright (c) 2000 Andreas Bach Aaen	
***************
*** 39,51 ****
   *	v1.21 (vp) - Removed protocol descriptions
   *		   - Added MISC_SERIAL for tool serial numbers
   *	      (gb) - Identify version on module load.
-  *    v1.21.1 (fl) - added Graphire2 support
-  *    v1.21.2 (fl) - added Intuos2 support
-  *                 - added all the PL ids
-  *    v1.21.3 (fl) - added another eraser id from Neil Okamoto
-  *                 - added smooth filter for Graphire from Peri Hankey
-  *                 - added PenPartner support from Olaf van Es
-  *                 - new tool ids from Ole Martin Bjoerndalen
   */
  
  /*
--- 39,44 ----
***************
*** 78,84 ****
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.21.3"
  #define DRIVER_AUTHOR "Vojtech Pavlik "
  #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver"
  
--- 71,77 ----
  /*
   * Version Information
   */
! #define DRIVER_VERSION "v1.21"
  #define DRIVER_AUTHOR "Vojtech Pavlik "
  #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver"
  
***************
*** 111,116 ****
--- 104,110 ----
  	struct wacom_features *features;
  	int tool[2];
  	int open;
+ 	int x, y;
  	__u32 serial[2];
  };
  
***************
*** 123,133 ****
  
  	if (urb->status) return;
  
! 	if (data[0] != 2) {
! 		printk(KERN_ERR "wacom_pl_irq: received unknown report #%d\n", data[0]);
! 		return;
! 	}
! 	
  	prox = data[1] & 0x20;
  	
  	input_report_key(dev, BTN_TOOL_PEN, prox);
--- 117,125 ----
  
  	if (urb->status) return;
  
! 	if (data[0] != 2)
! 		dbg("received unknown report #%d", data[0]);
! 
  	prox = data[1] & 0x20;
  	
  	input_report_key(dev, BTN_TOOL_PEN, prox);
***************
*** 146,178 ****
  	input_event(dev, EV_MSC, MSC_SERIAL, 0);
  }
  
- static void wacom_penpartner_irq(struct urb *urb)
- {
- 	struct wacom *wacom = urb->context;
- 	unsigned char *data = wacom->data;
- 	struct input_dev *dev = &wacom->dev;
- 	int x, y; 
- 	char pressure; 
- 	int leftmb;
- 
- 	if (urb->status) return;
- 
- 	x = data[2] << 8 | data[1];
- 	y = data[4] << 8 | data[3];
- 	pressure = data[6];
- 	leftmb = ((pressure > -80) && !(data[5] &20));
- 
- 	input_report_key(dev, BTN_TOOL_PEN, 1);
- 
- 	input_report_abs(dev, ABS_X, x);
- 	input_report_abs(dev, ABS_Y, y);
- 	input_report_abs(dev, ABS_PRESSURE, pressure+127);
- 	input_report_key(dev, BTN_LEFT, leftmb);
- 	input_report_key(dev, BTN_RIGHT, (data[5] & 0x40));
- 	
- 	input_event(dev, EV_MSC, MSC_SERIAL, leftmb);
- }
- 
  static void wacom_graphire_irq(struct urb *urb)
  {
  	struct wacom *wacom = urb->context;
--- 138,143 ----
***************
*** 182,192 ****
  
  	if (urb->status) return;
  
! 	if (data[0] != 2) {
! 		printk(KERN_ERR "wacom_graphire_irq: received unknown report #%d\n", data[0]);
! 		return;
! 	}
! 	
  	x = data[2] | ((__u32)data[3] << 8);
  	y = data[4] | ((__u32)data[5] << 8);
  
--- 147,155 ----
  
  	if (urb->status) return;
  
! 	if (data[0] != 2)
! 		dbg("received unknown report #%d", data[0]);
! 
  	x = data[2] | ((__u32)data[3] << 8);
  	y = data[4] | ((__u32)data[5] << 8);
  
***************
*** 216,223 ****
  	}
  
  	if (data[1] & 0x80) {
! 		input_report_abs(dev, ABS_X, x);
! 		input_report_abs(dev, ABS_Y, y);
  	}
  
  	input_report_abs(dev, ABS_PRESSURE, data[6] | ((__u32)data[7] << 8));
--- 179,186 ----
  	}
  
  	if (data[1] & 0x80) {
! 		input_report_abs(dev, ABS_X, wacom->x = x);
! 		input_report_abs(dev, ABS_Y, wacom->y = y);
  	}
  
  	input_report_abs(dev, ABS_PRESSURE, data[6] | ((__u32)data[7] << 8));
***************
*** 238,248 ****
  
  	if (urb->status) return;
  
! 	if (data[0] != 2) {
! 		printk(KERN_ERR "wacom_intuos_irq: received unknown report #%d\n", data[0]);
! 		return;
! 	}
! 	
  	/* tool number */
  	idx = data[1] & 0x01;
  
--- 201,209 ----
  
  	if (urb->status) return;
  
! 	if (data[0] != 2)
! 		dbg("received unknown report #%d", data[0]);
! 
  	/* tool number */
  	idx = data[1] & 0x01;
  
***************
*** 256,276 ****
  			case 0x832:
  			case 0x012: wacom->tool[idx] = BTN_TOOL_PENCIL;		break;	/* Inking pen */
  			case 0x822:
- 		        case 0x852:
  			case 0x022: wacom->tool[idx] = BTN_TOOL_PEN;		break;	/* Pen */
  			case 0x812:
  			case 0x032: wacom->tool[idx] = BTN_TOOL_BRUSH;		break;	/* Stroke pen */
  		        case 0x09c:
- 		        case 0x007:
  			case 0x094: wacom->tool[idx] = BTN_TOOL_MOUSE;		break;	/* Mouse 4D */
  			case 0x096: wacom->tool[idx] = BTN_TOOL_LENS;		break;	/* Lens cursor */
  			case 0x82a:
- 		        case 0x85a:
  		        case 0x91a:
  			case 0x0fa: wacom->tool[idx] = BTN_TOOL_RUBBER;		break;	/* Eraser */
  			case 0x112: wacom->tool[idx] = BTN_TOOL_AIRBRUSH;	break;	/* Airbrush */
  			default:    wacom->tool[idx] = BTN_TOOL_PEN;		break;	/* Unknown tool */
! 		}
  
  		input_report_key(dev, wacom->tool[idx], 1);
  		input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
--- 217,234 ----
  			case 0x832:
  			case 0x012: wacom->tool[idx] = BTN_TOOL_PENCIL;		break;	/* Inking pen */
  			case 0x822:
  			case 0x022: wacom->tool[idx] = BTN_TOOL_PEN;		break;	/* Pen */
  			case 0x812:
  			case 0x032: wacom->tool[idx] = BTN_TOOL_BRUSH;		break;	/* Stroke pen */
  		        case 0x09c:
  			case 0x094: wacom->tool[idx] = BTN_TOOL_MOUSE;		break;	/* Mouse 4D */
  			case 0x096: wacom->tool[idx] = BTN_TOOL_LENS;		break;	/* Lens cursor */
  			case 0x82a:
  		        case 0x91a:
  			case 0x0fa: wacom->tool[idx] = BTN_TOOL_RUBBER;		break;	/* Eraser */
  			case 0x112: wacom->tool[idx] = BTN_TOOL_AIRBRUSH;	break;	/* Airbrush */
  			default:    wacom->tool[idx] = BTN_TOOL_PEN;		break;	/* Unknown tool */
! 		}	
  
  		input_report_key(dev, wacom->tool[idx], 1);
  		input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
***************
*** 286,292 ****
  	input_report_abs(dev, ABS_X, ((__u32)data[2] << 8) | data[3]);
  	input_report_abs(dev, ABS_Y, ((__u32)data[4] << 8) | data[5]);
  	input_report_abs(dev, ABS_DISTANCE, data[9] >> 4);
! 	
  	if ((data[1] & 0xb8) == 0xa0) {						/* general pen packet */
  		input_report_abs(dev, ABS_PRESSURE, t = ((__u32)data[6] << 2) | ((data[7] >> 6) & 3));
  		input_report_abs(dev, ABS_TILT_X, ((data[7] << 1) & 0x7e) | (data[8] >> 7));
--- 244,250 ----
  	input_report_abs(dev, ABS_X, ((__u32)data[2] << 8) | data[3]);
  	input_report_abs(dev, ABS_Y, ((__u32)data[4] << 8) | data[5]);
  	input_report_abs(dev, ABS_DISTANCE, data[9] >> 4);
! 
  	if ((data[1] & 0xb8) == 0xa0) {						/* general pen packet */
  		input_report_abs(dev, ABS_PRESSURE, t = ((__u32)data[6] << 2) | ((data[7] >> 6) & 3));
  		input_report_abs(dev, ABS_TILT_X, ((data[7] << 1) & 0x7e) | (data[8] >> 7));
***************
*** 340,353 ****
  #define WACOM_INTUOS_ABS	(BIT(ABS_TILT_X) | BIT(ABS_TILT_Y) | BIT(ABS_RZ) | BIT(ABS_THROTTLE))
  
  struct wacom_features wacom_features[] = {
- 	{ "Wacom Penpartner",	 7,  5040,  3780,  255, 32, wacom_penpartner_irq,
- 		0, 0, 0, 0 },
  	{ "Wacom Graphire",      8, 10206,  7422,  511, 32, wacom_graphire_irq,
  		BIT(EV_REL), 0, BIT(REL_WHEEL), 0 },
- 	{ "Wacom Graphire2 4x5",     8, 10206,  7422,  511, 32, wacom_graphire_irq,
- 		BIT(EV_REL), 0, BIT(REL_WHEEL), 0 },
- 	{ "Wacom Graphire2 5x7",     8, 10206,  7422,  511, 32, wacom_graphire_irq,
- 		BIT(EV_REL), 0, BIT(REL_WHEEL), 0 },
  	{ "Wacom Intuos 4x5",   10, 12700, 10360, 1023, 15, wacom_intuos_irq,
  		0, WACOM_INTUOS_ABS, 0, WACOM_INTUOS_BUTTONS, WACOM_INTUOS_TOOLS },
  	{ "Wacom Intuos 6x8",   10, 20320, 15040, 1023, 15, wacom_intuos_irq,
--- 298,305 ----
***************
*** 358,409 ****
  		0, WACOM_INTUOS_ABS, 0, WACOM_INTUOS_BUTTONS, WACOM_INTUOS_TOOLS },
  	{ "Wacom Intuos 12x18", 10, 47720, 30480, 1023, 15, wacom_intuos_irq,
  		0, WACOM_INTUOS_ABS, 0, WACOM_INTUOS_BUTTONS, WACOM_INTUOS_TOOLS },
- 	{ "Wacom PL400",        8,  12328, 9256,   511, 32, wacom_pl_irq,
- 		0,  0, 0, 0 },
  	{ "Wacom PL500",        8,  12328, 9256,   511, 32, wacom_pl_irq,
  		0,  0, 0, 0 },
- 	{ "Wacom PL600",        8,  12328, 9256,   511, 32, wacom_pl_irq,
- 		0,  0, 0, 0 },
- 	{ "Wacom PL600SX",        8,  12328, 9256,   511, 32, wacom_pl_irq,
- 		0,  0, 0, 0 },
- 	{ "Wacom PL550",        8,  12328, 9256,   511, 32, wacom_pl_irq,
- 		0,  0, 0, 0 },
- 	{ "Wacom PL800",        8,  12328, 9256,   511, 32, wacom_pl_irq,
- 		0,  0, 0, 0 },
- 	{ "Wacom Intuos2 4x5",   10, 12700, 10360, 1023, 15, wacom_intuos_irq,
- 		0, WACOM_INTUOS_ABS, 0, WACOM_INTUOS_BUTTONS, WACOM_INTUOS_TOOLS },
- 	{ "Wacom Intuos2 6x8",   10, 20320, 15040, 1023, 15, wacom_intuos_irq,
- 		0, WACOM_INTUOS_ABS, 0, WACOM_INTUOS_BUTTONS, WACOM_INTUOS_TOOLS },
- 	{ "Wacom Intuos2 9x12",  10, 30480, 23060, 1023, 15, wacom_intuos_irq,
- 		0, WACOM_INTUOS_ABS, 0, WACOM_INTUOS_BUTTONS, WACOM_INTUOS_TOOLS },
- 	{ "Wacom Intuos2 12x12", 10, 30480, 30480, 1023, 15, wacom_intuos_irq,
- 		0, WACOM_INTUOS_ABS, 0, WACOM_INTUOS_BUTTONS, WACOM_INTUOS_TOOLS },
- 	{ "Wacom Intuos2 12x18", 10, 47720, 30480, 1023, 15, wacom_intuos_irq,
- 		0, WACOM_INTUOS_ABS, 0, WACOM_INTUOS_BUTTONS, WACOM_INTUOS_TOOLS },
  	{ NULL , 0 }
  };
  
  struct usb_device_id wacom_ids[] = {
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x00), driver_info: 0 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x10), driver_info: 1 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x11), driver_info: 2 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x12), driver_info: 3 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20), driver_info: 4 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21), driver_info: 5 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22), driver_info: 6 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x23), driver_info: 7 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x24), driver_info: 8 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x30), driver_info: 9 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x31), driver_info: 10 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x32), driver_info: 11 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x33), driver_info: 12 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x34), driver_info: 13 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x35), driver_info: 14 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x41), driver_info: 15 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x42), driver_info: 16 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x43), driver_info: 17 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x44), driver_info: 18 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x45), driver_info: 19 },
  	{ }
  };
  
--- 310,328 ----
  		0, WACOM_INTUOS_ABS, 0, WACOM_INTUOS_BUTTONS, WACOM_INTUOS_TOOLS },
  	{ "Wacom Intuos 12x18", 10, 47720, 30480, 1023, 15, wacom_intuos_irq,
  		0, WACOM_INTUOS_ABS, 0, WACOM_INTUOS_BUTTONS, WACOM_INTUOS_TOOLS },
  	{ "Wacom PL500",        8,  12328, 9256,   511, 32, wacom_pl_irq,
  		0,  0, 0, 0 },
  	{ NULL , 0 }
  };
  
  struct usb_device_id wacom_ids[] = {
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x10), driver_info: 0 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20), driver_info: 1 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21), driver_info: 2 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22), driver_info: 3 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x23), driver_info: 4 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x24), driver_info: 5 },
! 	{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x31), driver_info: 6 },
  	{ }
  };
  
***************
*** 412,418 ****
  static int wacom_open(struct input_dev *dev)
  {
  	struct wacom *wacom = dev->private;
! 	
  	if (wacom->open++)
  		return 0;
  
--- 331,337 ----
  static int wacom_open(struct input_dev *dev)
  {
  	struct wacom *wacom = dev->private;
! 
  	if (wacom->open++)
  		return 0;
  
***************
*** 435,442 ****
  {
  	struct usb_endpoint_descriptor *endpoint;
  	struct wacom *wacom;
! 	char rep_data[2] = {0x02, 0x02};
! 	
  	if (!(wacom = kmalloc(sizeof(struct wacom), GFP_KERNEL))) return NULL;
  	memset(wacom, 0, sizeof(struct wacom));
  
--- 354,360 ----
  {
  	struct usb_endpoint_descriptor *endpoint;
  	struct wacom *wacom;
! 
  	if (!(wacom = kmalloc(sizeof(struct wacom), GFP_KERNEL))) return NULL;
  	memset(wacom, 0, sizeof(struct wacom));
  
***************
*** 479,498 ****
  
  	endpoint = dev->config[0].interface[ifnum].altsetting[0].endpoint + 0;
  
- 	usb_set_idle(dev, dev->config[0].interface[ifnum].altsetting[0].bInterfaceNumber, 0, 0);
- 
  	FILL_INT_URB(&wacom->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
  		     wacom->data, wacom->features->pktlen, wacom->features->irq, wacom, endpoint->bInterval);
  
  	input_register_device(&wacom->dev);
  
- 	/* ask the tablet to report tablet data */
- 	usb_set_report(dev, ifnum, 3, 2, rep_data, 2);
- 	usb_set_report(dev, ifnum, 3, 5, rep_data, 0);
- 	usb_set_report(dev, ifnum, 3, 6, rep_data, 0);
- 	
  	printk(KERN_INFO "input%d: %s on usb%d:%d.%d\n",
! 	       wacom->dev.number, wacom->features->name, dev->bus->busnum, dev->devnum, ifnum);
  
  	return wacom;
  }
--- 397,409 ----
  
  	endpoint = dev->config[0].interface[ifnum].altsetting[0].endpoint + 0;
  
  	FILL_INT_URB(&wacom->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
  		     wacom->data, wacom->features->pktlen, wacom->features->irq, wacom, endpoint->bInterval);
  
  	input_register_device(&wacom->dev);
  
  	printk(KERN_INFO "input%d: %s on usb%d:%d.%d\n",
! 		 wacom->dev.number, wacom->features->name, dev->bus->busnum, dev->devnum, ifnum);
  
  	return wacom;
  }
***************
*** 515,522 ****
  static int __init wacom_init(void)
  {
  	usb_register(&wacom_driver);
! 	info(DRIVER_VERSION " " DRIVER_AUTHOR);
! 	info(DRIVER_DESC);
  	return 0;
  }
  
--- 426,432 ----
  static int __init wacom_init(void)
  {
  	usb_register(&wacom_driver);
! 	info(DRIVER_VERSION ":" DRIVER_DESC);
  	return 0;
  }
  
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/firminfo.txt LAN/source_CD/linux-2.4.17_mvl21-sandpoint/firminfo.txt
*** HGLAN/source_CD/linux-2.4.17_mvl21/firminfo.txt	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/firminfo.txt	2004-05-24 17:35:29.000000000 +0900
***************
*** 1,5 ****
! NAME="HD-HGLAN(IEMITSU)"
! ID  ="0x00000004"
! Ver ="1.04"
! SubVersion ="FLASH 1.3"
  BootVer ="1.00"
--- 1,5 ----
! NAME="HD-LAN(IEYASU)"
! ID  ="0x00000001"
! Ver ="1.24"
! SubVersion ="FLASH 2.0(SJIS)"
  BootVer ="1.00"
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/fs/ext2/super.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/fs/ext2/super.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/fs/ext2/super.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/fs/ext2/super.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 455,462 ****
  	es = (struct ext2_super_block *) (((char *)bh->b_data) + offset);
  	sb->u.ext2_sb.s_es = es;
  	sb->s_magic = le16_to_cpu(es->s_magic);
! 	if ((sb->s_magic != EXT2_SUPER_MAGIC) &&
! 	    (sb->s_magic != MEL_EXT2_SUPER_MAGIC)) {
  		if (!silent)
  			printk ("VFS: Can't find ext2 filesystem on dev %s.\n",
  				bdevname(dev));
--- 455,461 ----
  	es = (struct ext2_super_block *) (((char *)bh->b_data) + offset);
  	sb->u.ext2_sb.s_es = es;
  	sb->s_magic = le16_to_cpu(es->s_magic);
! 	if (sb->s_magic != EXT2_SUPER_MAGIC) {
  		if (!silent)
  			printk ("VFS: Can't find ext2 filesystem on dev %s.\n",
  				bdevname(dev));
***************
*** 512,519 ****
  		}
  		es = (struct ext2_super_block *) (((char *)bh->b_data) + offset);
  		sb->u.ext2_sb.s_es = es;
! 		if ((es->s_magic != le16_to_cpu(EXT2_SUPER_MAGIC)) &&
! 		    (es->s_magic != le16_to_cpu(MEL_EXT2_SUPER_MAGIC))) {
  			printk ("EXT2-fs: Magic mismatch, very weird !\n");
  			goto failed_mount;
  		}
--- 511,517 ----
  		}
  		es = (struct ext2_super_block *) (((char *)bh->b_data) + offset);
  		sb->u.ext2_sb.s_es = es;
! 		if (es->s_magic != le16_to_cpu(EXT2_SUPER_MAGIC)) {
  			printk ("EXT2-fs: Magic mismatch, very weird !\n");
  			goto failed_mount;
  		}
***************
*** 561,568 ****
  		log2 (EXT2_ADDR_PER_BLOCK(sb));
  	sb->u.ext2_sb.s_desc_per_block_bits =
  		log2 (EXT2_DESC_PER_BLOCK(sb));
! 	if ((sb->s_magic != EXT2_SUPER_MAGIC) &&
! 	    (sb->s_magic != MEL_EXT2_SUPER_MAGIC)) {
  		if (!silent)
  			printk ("VFS: Can't find an ext2 filesystem on dev "
  				"%s.\n",
--- 559,565 ----
  		log2 (EXT2_ADDR_PER_BLOCK(sb));
  	sb->u.ext2_sb.s_desc_per_block_bits =
  		log2 (EXT2_DESC_PER_BLOCK(sb));
! 	if (sb->s_magic != EXT2_SUPER_MAGIC) {
  		if (!silent)
  			printk ("VFS: Can't find an ext2 filesystem on dev "
  				"%s.\n",
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/fs/ext3/super.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/fs/ext3/super.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/fs/ext3/super.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/fs/ext3/super.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 948,955 ****
  	es = (struct ext3_super_block *) (((char *)bh->b_data) + offset);
  	sbi->s_es = es;
  	sb->s_magic = le16_to_cpu(es->s_magic);
! 	if ((sb->s_magic != EXT3_SUPER_MAGIC) &&
! 	    (sb->s_magic != MEL_EXT3_SUPER_MAGIC)) {
  		if (!silent)
  			printk(KERN_ERR 
  			       "VFS: Can't find ext3 filesystem on dev %s.\n",
--- 948,954 ----
  	es = (struct ext3_super_block *) (((char *)bh->b_data) + offset);
  	sbi->s_es = es;
  	sb->s_magic = le16_to_cpu(es->s_magic);
! 	if (sb->s_magic != EXT3_SUPER_MAGIC) {
  		if (!silent)
  			printk(KERN_ERR 
  			       "VFS: Can't find ext3 filesystem on dev %s.\n",
***************
*** 1019,1026 ****
  		}
  		es = (struct ext3_super_block *)(((char *)bh->b_data) + offset);
  		sbi->s_es = es;
! 		if ((es->s_magic != le16_to_cpu(EXT3_SUPER_MAGIC)) &&
! 		    (es->s_magic != le16_to_cpu(MEL_EXT3_SUPER_MAGIC))) {
  			printk (KERN_ERR 
  				"EXT3-fs: Magic mismatch, very weird !\n");
  			goto failed_mount;
--- 1018,1024 ----
  		}
  		es = (struct ext3_super_block *)(((char *)bh->b_data) + offset);
  		sbi->s_es = es;
! 		if (es->s_magic != le16_to_cpu(EXT3_SUPER_MAGIC)) {
  			printk (KERN_ERR 
  				"EXT3-fs: Magic mismatch, very weird !\n");
  			goto failed_mount;
***************
*** 1305,1312 ****
  	}
  
  	es = (struct ext3_super_block *) (((char *)bh->b_data) + offset);
! 	if (((le16_to_cpu(es->s_magic) != EXT3_SUPER_MAGIC) &&
! 	     (le16_to_cpu(es->s_magic) != MEL_EXT3_SUPER_MAGIC)) ||
  	    !(le32_to_cpu(es->s_feature_incompat) &
  	      EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) {
  		printk(KERN_ERR "EXT3-fs: external journal has "
--- 1303,1309 ----
  	}
  
  	es = (struct ext3_super_block *) (((char *)bh->b_data) + offset);
! 	if ((le16_to_cpu(es->s_magic) != EXT3_SUPER_MAGIC) ||
  	    !(le32_to_cpu(es->s_feature_incompat) &
  	      EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) {
  		printk(KERN_ERR "EXT3-fs: external journal has "
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/fs/nfsd/nfs3proc.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/fs/nfsd/nfs3proc.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/fs/nfsd/nfs3proc.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/fs/nfsd/nfs3proc.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 588,594 ****
  		/* Note that we don't care for remote fs's here */
  		switch (sb->s_magic) {
  		case EXT2_SUPER_MAGIC:
- 		case MEL_EXT2_SUPER_MAGIC:
  			resp->p_link_max = EXT2_LINK_MAX;
  			resp->p_name_max = EXT2_NAME_LEN;
  			break;
--- 588,593 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/fs/super.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/fs/super.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/fs/super.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/fs/super.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 1031,1054 ****
  	fs_names = __getname();
  	get_fs_names(fs_names);
  
- #ifdef CONFIG_CMDLINE
- 	{
- 		unsigned long *flag_addr;
- 		unsigned long ng_word;
- 
- 		flag_addr = (unsigned long *)(0xFFF70000);
- 		ng_word = 0x4e474e47;
- 		printk("%8x:%4x\n", flag_addr, *flag_addr);
- 
- 		if (*flag_addr == ng_word) {
- 			strcpy(root_device_name, "rd/0");
- 			ROOT_DEV = MKDEV (1, 0);
- 			printk("changed boot device.\n");
- 		}
- 	}
- #endif /* CONFIG_CMDLINE */
- 
- TRY_RAMDISK:
  	devfs_make_root (root_device_name);
  	handle = devfs_find_handle (NULL, ROOT_DEVICE_NAME,
  	                            MAJOR (ROOT_DEV), MINOR (ROOT_DEV),
--- 1031,1036 ----
***************
*** 1116,1131 ****
  			goto mount_it;
  		put_filesystem(fs_type);
  	}
- 
- #define MELCO_EMERGENCY_FS_BOOT
- #ifdef  MELCO_EMERGENCY_FS_BOOT
- 	blkdev_close(bdev->bd_inode, NULL);
- 	strcpy(root_device_name, "rd/0");
- 	strcpy(ROOT_DEVICE_NAME, root_device_name);
- 	ROOT_DEV = MKDEV (1, 0);
- 	goto TRY_RAMDISK;	
- #endif
- 
  	panic("VFS: Unable to mount root fs on %s", kdevname(ROOT_DEV));
  
  mount_it:
--- 1098,1103 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/include/linux/ext2_fs.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/include/linux/ext2_fs.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/include/linux/ext2_fs.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/include/linux/ext2_fs.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 69,75 ****
   * The second extended file system magic number
   */
  #define EXT2_SUPER_MAGIC	0xEF53
- #define MEL_EXT2_SUPER_MAGIC	0xEF54
  
  /*
   * Maximal count of links to a file
--- 69,74 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/include/linux/ext3_fs.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/include/linux/ext3_fs.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/include/linux/ext3_fs.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/include/linux/ext3_fs.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 72,78 ****
   * The second extended file system magic number
   */
  #define EXT3_SUPER_MAGIC	0xEF53
- #define MEL_EXT3_SUPER_MAGIC	0xEF54
  
  /*
   * Maximal count of links to a file
--- 72,77 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/include/linux/usb.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/include/linux/usb.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/include/linux/usb.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/include/linux/usb.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 16,23 ****
  #define USB_CLASS_MASS_STORAGE		8
  #define USB_CLASS_HUB			9
  #define USB_CLASS_CDC_DATA		0x0a
! #define USB_CLASS_CSCID			0x0b	/* chip+ smart card */
! #define USB_CLASS_CONTENT_SEC		0x0d	/* content security */
  #define USB_CLASS_APP_SPEC		0xfe
  #define USB_CLASS_VENDOR_SPEC		0xff
  
--- 16,23 ----
  #define USB_CLASS_MASS_STORAGE		8
  #define USB_CLASS_HUB			9
  #define USB_CLASS_CDC_DATA		0x0a
! #define USB_CLASS_CSCID		0x0b /* chip+ smart card */
! #define USB_CLASS_CONTENT_SEC		0x0d /* content security */
  #define USB_CLASS_APP_SPEC		0xfe
  #define USB_CLASS_VENDOR_SPEC		0xff
  
***************
*** 42,49 ****
  /*
   * USB directions
   */
! #define USB_DIR_OUT			0		/* to device */
! #define USB_DIR_IN			0x80		/* to host */
  
  /*
   * Descriptor types
--- 42,49 ----
  /*
   * USB directions
   */
! #define USB_DIR_OUT			0
! #define USB_DIR_IN			0x80
  
  /*
   * Descriptor types
***************
*** 85,107 ****
  /*
   * USB Packet IDs (PIDs)
   */
! #define USB_PID_UNDEF_0			0xf0
! #define USB_PID_OUT			0xe1
! #define USB_PID_ACK			0xd2
! #define USB_PID_DATA0			0xc3
! #define USB_PID_PING			0xb4	/* USB 2.0 */
! #define USB_PID_SOF			0xa5
! #define USB_PID_NYET			0x96	/* USB 2.0 */
! #define USB_PID_DATA2			0x87	/* USB 2.0 */
! #define USB_PID_SPLIT			0x78	/* USB 2.0 */
! #define USB_PID_IN			0x69
! #define USB_PID_NAK			0x5a
! #define USB_PID_DATA1			0x4b
! #define USB_PID_PREAMBLE		0x3c	/* Token mode */
! #define USB_PID_ERR			0x3c	/* USB 2.0: handshake mode */
! #define USB_PID_SETUP			0x2d
! #define USB_PID_STALL			0x1e
! #define USB_PID_MDATA			0x0f	/* USB 2.0 */
  
  /*
   * Standard requests
--- 85,107 ----
  /*
   * USB Packet IDs (PIDs)
   */
! #define USB_PID_UNDEF_0                        0xf0
! #define USB_PID_OUT                            0xe1
! #define USB_PID_ACK                            0xd2
! #define USB_PID_DATA0                          0xc3
! #define USB_PID_PING                           0xb4	/* USB 2.0 */
! #define USB_PID_SOF                            0xa5
! #define USB_PID_NYET                           0x96	/* USB 2.0 */
! #define USB_PID_DATA2                          0x87	/* USB 2.0 */
! #define USB_PID_SPLIT                          0x78	/* USB 2.0 */
! #define USB_PID_IN                             0x69
! #define USB_PID_NAK                            0x5a
! #define USB_PID_DATA1                          0x4b
! #define USB_PID_PREAMBLE                       0x3c	/* Token mode */
! #define USB_PID_ERR                            0x3c	/* USB 2.0: handshake mode */
! #define USB_PID_SETUP                          0x2d
! #define USB_PID_STALL                          0x1e
! #define USB_PID_MDATA                          0x0f	/* USB 2.0 */
  
  /*
   * Standard requests
***************
*** 152,177 ****
  		mdelay(ms);
  }
  
! /**
!  * struct usb_ctrlrequest - structure used to make USB device control requests easier to create and decode
!  * @bRequestType: matches the USB bmRequestType field
!  * @bRequest: matches the USB bRequest field
!  * @wValue: matches the USB wValue field
!  * @wIndex: matches the USB wIndex field
!  * @wLength: matches the USB wLength field
!  *
!  * This structure is used to send control requests to a USB device.  It matches
!  * the different fields of the USB 2.0 Spec section 9.3, table 9-2.  See the
!  * USB spec for a fuller description of the different fields, and what they are
!  * used for.
!  */
! struct usb_ctrlrequest {
! 	__u8 bRequestType;
! 	__u8 bRequest;
! 	__u16 wValue;
! 	__u16 wIndex;
! 	__u16 wLength;
! } __attribute__ ((packed));
  
  /*
   * USB-status codes:
--- 152,164 ----
  		mdelay(ms);
  }
  
! typedef struct {
! 	__u8 requesttype;
! 	__u8 request;
! 	__u16 value;
! 	__u16 index;
! 	__u16 length;
! } devrequest __attribute__ ((packed));
  
  /*
   * USB-status codes:
***************
*** 187,196 ****
  #define USB_ST_BUFFEROVERRUN	(-ECOMM)
  #define USB_ST_BUFFERUNDERRUN	(-ENOSR)
  #define USB_ST_INTERNALERROR	(-EPROTO) 			/* unknown error */
! #define USB_ST_SHORT_PACKET	(-EREMOTEIO)
! #define USB_ST_PARTIAL_ERROR	(-EXDEV)			/* ISO transfer only partially completed */
! #define USB_ST_URB_KILLED	(-ENOENT)			/* URB canceled by user */
! #define USB_ST_URB_PENDING	(-EINPROGRESS)
  #define USB_ST_REMOVED		(-ENODEV) 			/* device not existing or removed */
  #define USB_ST_TIMEOUT		(-ETIMEDOUT)			/* communication timed out, also in urb->status**/
  #define USB_ST_NOTSUPPORTED	(-ENOSYS)			
--- 174,183 ----
  #define USB_ST_BUFFEROVERRUN	(-ECOMM)
  #define USB_ST_BUFFERUNDERRUN	(-ENOSR)
  #define USB_ST_INTERNALERROR	(-EPROTO) 			/* unknown error */
! #define USB_ST_SHORT_PACKET    	(-EREMOTEIO)
! #define USB_ST_PARTIAL_ERROR  	(-EXDEV)			/* ISO transfer only partially completed */
! #define USB_ST_URB_KILLED     	(-ENOENT)			/* URB canceled by user */
! #define USB_ST_URB_PENDING       (-EINPROGRESS)
  #define USB_ST_REMOVED		(-ENODEV) 			/* device not existing or removed */
  #define USB_ST_TIMEOUT		(-ETIMEDOUT)			/* communication timed out, also in urb->status**/
  #define USB_ST_NOTSUPPORTED	(-ENOSYS)			
***************
*** 398,450 ****
  	unsigned long	driver_info;
  };
  
- /**
-  * struct usb_driver - identifies USB driver to usbcore
-  * @owner: Pointer to the module owner of this driver; initialize
-  *      it using THIS_MODULE.
-  * @name: The driver name should be unique among USB drivers,
-  *      and should normally be the same as the module name.
-  * @probe: Called to see if the driver is willing to manage a particular
-  *      interface on a device.  The probe routine returns a handle that 
-  *      will later be provided to disconnect(), or a null pointer to
-  *      indicate that the driver will not handle the interface.
-  *      The handle is normally a pointer to driver-specific data.
-  *      If the probe() routine needs to access the interface
-  *      structure itself, use usb_ifnum_to_if() to make sure it's using
-  *      the right one.
-  * @disconnect: Called when the interface is no longer accessible, usually
-  *      because its device has been (or is being) disconnected.  The
-  *      handle passed is what was returned by probe(), or was provided
-  *      to usb_driver_claim_interface().
-  * @ioctl: Used for drivers that want to talk to userspace through
-  *      the "usbfs" filesystem.  This lets devices provide ways to
-  *      expose information to user space regardless of where they
-  *      do (or don't) show up otherwise in the filesystem.
-  * @fops: pointer to a fops structure if the driver wants to use the USB
-  *	major number.
-  * @minor: the starting minor number for this driver, if the fops
-  *	pointer is set.
-  * @id_table: USB drivers use ID table to support hotplugging.
-  *      Export this with MODULE_DEVICE_TABLE(usb,...), or use NULL to
-  *      say that probe() should be called for any unclaimed interface.
-  *
-  * USB drivers must provide a name, probe() and disconnect() methods,
-  * and an id_table.  Other driver fields are optional.
-  *
-  * The id_table is used in hotplugging.  It holds a set of descriptors,
-  * and specialized data may be associated with each entry.  That table
-  * is used by both user and kernel mode hotplugging support.
-  * The probe() and disconnect() methods are called in a context where
-  * they can sleep, but they should avoid abusing the privilege.  Most
-  * work to connect to a device should be done when the device is opened,
-  * and undone at the last close.  The disconnect code needs to address
-  * concurrency issues with respect to open() and close() methods, as
-  * well as forcing all pending I/O requests to complete (by unlinking
-  * them as necessary, and blocking until the unlinks complete).
-  */
  struct usb_driver {
- 	struct module *owner;
- 
  	const char *name;
  
  	void *(*probe)(
--- 385,391 ----
***************
*** 461,469 ****
--- 402,419 ----
  
  	struct semaphore serialize;
  
+ 	/* ioctl -- userspace apps can talk to drivers through usbdevfs */
  	int (*ioctl)(struct usb_device *dev, unsigned int code, void *buf);
  
+ 	/* support for "new-style" USB hotplugging
+ 	 * binding policy can be driven from user mode too
+ 	 */
  	const struct usb_device_id *id_table;
+ 
+ 	/* suspend before the bus suspends;
+ 	 * disconnect or resume when the bus resumes */
+ 	// void (*suspend)(struct usb_device *dev);
+ 	// void (*resume)(struct usb_device *dev);
  };
  	
  /*----------------------------------------------------------------------------* 
***************
*** 473,503 ****
  /*
   * urb->transfer_flags:
   */
! #define USB_DISABLE_SPD		0x0001
! #define URB_SHORT_NOT_OK	USB_DISABLE_SPD
! #define USB_ISO_ASAP		0x0002
! #define USB_ASYNC_UNLINK	0x0008
! #define USB_QUEUE_BULK		0x0010
  #define USB_NO_FSBR		0x0020
! #define USB_ZERO_PACKET		0x0040  // Finish bulk OUTs always with zero length packet
! #define URB_NO_INTERRUPT	0x0080	/* HINT: no non-error interrupt needed */
! 					/* ... less overhead for QUEUE_BULK */
  #define USB_TIMEOUT_KILLED	0x1000	// only set by HCD!
  
! struct iso_packet_descriptor
  {
  	unsigned int offset;
  	unsigned int length;		// expected length
  	unsigned int actual_length;
  	unsigned int status;
! };
! 
! #define usb_iso_packet_descriptor	iso_packet_descriptor
  
  struct urb;
  typedef void (*usb_complete_t)(struct urb *);
  
! struct urb
  {
  	spinlock_t lock;		// lock for the URB
  	void *hcpriv;			// private data for host controller
--- 423,448 ----
  /*
   * urb->transfer_flags:
   */
! #define USB_DISABLE_SPD         0x0001
! #define USB_ISO_ASAP            0x0002
! #define USB_ASYNC_UNLINK        0x0008
! #define USB_QUEUE_BULK          0x0010
  #define USB_NO_FSBR		0x0020
! #define USB_ZERO_PACKET         0x0040  // Finish bulk OUTs always with zero length packet
  #define USB_TIMEOUT_KILLED	0x1000	// only set by HCD!
  
! typedef struct
  {
  	unsigned int offset;
  	unsigned int length;		// expected length
  	unsigned int actual_length;
  	unsigned int status;
! } iso_packet_descriptor_t, *piso_packet_descriptor_t;
  
  struct urb;
  typedef void (*usb_complete_t)(struct urb *);
  
! typedef struct urb
  {
  	spinlock_t lock;		// lock for the URB
  	void *hcpriv;			// private data for host controller
***************
*** 508,519 ****
  	int status;			// returned status
  	unsigned int transfer_flags;	// USB_DISABLE_SPD | USB_ISO_ASAP | etc.
  	void *transfer_buffer;		// associated data buffer
- 	dma_addr_t transfer_dma;	// dma addr for transfer_buffer
  	int transfer_buffer_length;	// data buffer length
  	int actual_length;              // actual data buffer length	
  	int bandwidth;			// bandwidth for this transfer request (INT or ISO)
  	unsigned char *setup_packet;	// setup packet (control only)
- 	dma_addr_t setup_dma;		// dma addr for setup_packet
  	//
  	int start_frame;		// start frame (iso/irq only)
  	int number_of_packets;		// number of packets in this request (iso)
--- 453,462 ----
***************
*** 524,610 ****
  	void *context;			// context for completion routine
  	usb_complete_t complete;	// pointer to completion routine
  	//
! 	struct iso_packet_descriptor iso_frame_desc[0];
! };
  
! /**
!  * FILL_CONTROL_URB - macro to help initialize a control urb
!  * @URB: pointer to the urb to initialize.
!  * @DEV: pointer to the struct usb_device for this urb.
!  * @PIPE: the endpoint pipe
!  * @SETUP_PACKET: pointer to the setup_packet buffer
!  * @TRANSFER_BUFFER: pointer to the transfer buffer
!  * @BUFFER_LENGTH: length of the transfer buffer
!  * @COMPLETE: pointer to the usb_complete_t function
!  * @CONTEXT: what to set the urb context to.
!  *
!  * Initializes a control urb with the proper information needed to submit
!  * it to a device.  This macro is depreciated, the usb_fill_control_urb()
!  * function should be used instead.
!  */
! #define FILL_CONTROL_URB(URB,DEV,PIPE,SETUP_PACKET,TRANSFER_BUFFER,BUFFER_LENGTH,COMPLETE,CONTEXT) \
      do {\
! 	spin_lock_init(&(URB)->lock);\
! 	(URB)->dev=DEV;\
! 	(URB)->pipe=PIPE;\
! 	(URB)->setup_packet=SETUP_PACKET;\
! 	(URB)->transfer_buffer=TRANSFER_BUFFER;\
! 	(URB)->transfer_buffer_length=BUFFER_LENGTH;\
! 	(URB)->complete=COMPLETE;\
! 	(URB)->context=CONTEXT;\
      } while (0)
  
! /**
!  * FILL_BULK_URB - macro to help initialize a bulk urb
!  * @URB: pointer to the urb to initialize.
!  * @DEV: pointer to the struct usb_device for this urb.
!  * @PIPE: the endpoint pipe
!  * @TRANSFER_BUFFER: pointer to the transfer buffer
!  * @BUFFER_LENGTH: length of the transfer buffer
!  * @COMPLETE: pointer to the usb_complete_t function
!  * @CONTEXT: what to set the urb context to.
!  *
!  * Initializes a bulk urb with the proper information needed to submit it
!  * to a device.  This macro is depreciated, the usb_fill_bulk_urb()
!  * function should be used instead.
!  */
! #define FILL_BULK_URB(URB,DEV,PIPE,TRANSFER_BUFFER,BUFFER_LENGTH,COMPLETE,CONTEXT) \
      do {\
! 	spin_lock_init(&(URB)->lock);\
! 	(URB)->dev=DEV;\
! 	(URB)->pipe=PIPE;\
! 	(URB)->transfer_buffer=TRANSFER_BUFFER;\
! 	(URB)->transfer_buffer_length=BUFFER_LENGTH;\
! 	(URB)->complete=COMPLETE;\
! 	(URB)->context=CONTEXT;\
      } while (0)
      
! /**
!  * FILL_INT_URB - macro to help initialize a interrupt urb
!  * @URB: pointer to the urb to initialize.
!  * @DEV: pointer to the struct usb_device for this urb.
!  * @PIPE: the endpoint pipe
!  * @TRANSFER_BUFFER: pointer to the transfer buffer
!  * @BUFFER_LENGTH: length of the transfer buffer
!  * @COMPLETE: pointer to the usb_complete_t function
!  * @CONTEXT: what to set the urb context to.
!  * @INTERVAL: what to set the urb interval to.
!  *
!  * Initializes a interrupt urb with the proper information needed to submit
!  * it to a device.  This macro is depreciated, the usb_fill_int_urb()
!  * function should be used instead.
!  */
! #define FILL_INT_URB(URB,DEV,PIPE,TRANSFER_BUFFER,BUFFER_LENGTH,COMPLETE,CONTEXT,INTERVAL) \
      do {\
! 	spin_lock_init(&(URB)->lock);\
! 	(URB)->dev=DEV;\
! 	(URB)->pipe=PIPE;\
! 	(URB)->transfer_buffer=TRANSFER_BUFFER;\
! 	(URB)->transfer_buffer_length=BUFFER_LENGTH;\
! 	(URB)->complete=COMPLETE;\
! 	(URB)->context=CONTEXT;\
! 	(URB)->interval=INTERVAL;\
! 	(URB)->start_frame=-1;\
      } while (0)
  
  #define FILL_CONTROL_URB_TO(a,aa,b,c,d,e,f,g,h) \
--- 467,509 ----
  	void *context;			// context for completion routine
  	usb_complete_t complete;	// pointer to completion routine
  	//
! 	iso_packet_descriptor_t iso_frame_desc[0];
! } urb_t, *purb_t;
  
! #define FILL_CONTROL_URB(a,aa,b,c,d,e,f,g) \
      do {\
! 	spin_lock_init(&(a)->lock);\
! 	(a)->dev=aa;\
! 	(a)->pipe=b;\
! 	(a)->setup_packet=c;\
! 	(a)->transfer_buffer=d;\
! 	(a)->transfer_buffer_length=e;\
! 	(a)->complete=f;\
! 	(a)->context=g;\
      } while (0)
  
! #define FILL_BULK_URB(a,aa,b,c,d,e,f) \
      do {\
! 	spin_lock_init(&(a)->lock);\
! 	(a)->dev=aa;\
! 	(a)->pipe=b;\
! 	(a)->transfer_buffer=c;\
! 	(a)->transfer_buffer_length=d;\
! 	(a)->complete=e;\
! 	(a)->context=f;\
      } while (0)
      
! #define FILL_INT_URB(a,aa,b,c,d,e,f,g) \
      do {\
! 	spin_lock_init(&(a)->lock);\
! 	(a)->dev=aa;\
! 	(a)->pipe=b;\
! 	(a)->transfer_buffer=c;\
! 	(a)->transfer_buffer_length=d;\
! 	(a)->complete=e;\
! 	(a)->context=f;\
! 	(a)->interval=g;\
! 	(a)->start_frame=-1;\
      } while (0)
  
  #define FILL_CONTROL_URB_TO(a,aa,b,c,d,e,f,g,h) \
***************
*** 631,740 ****
  	(a)->context=f;\
  	(a)->timeout=g;\
      } while (0)
-  
- /**
-  * usb_fill_control_urb - initializes a control urb
-  * @urb: pointer to the urb to initialize.
-  * @dev: pointer to the struct usb_device for this urb.
-  * @pipe: the endpoint pipe
-  * @setup_packet: pointer to the setup_packet buffer
-  * @transfer_buffer: pointer to the transfer buffer
-  * @buffer_length: length of the transfer buffer
-  * @complete: pointer to the usb_complete_t function
-  * @context: what to set the urb context to.
-  *
-  * Initializes a control urb with the proper information needed to submit
-  * it to a device.
-  */
- static inline void usb_fill_control_urb (struct urb *urb,
- 					 struct usb_device *dev,
- 					 unsigned int pipe,
- 					 unsigned char *setup_packet,
- 					 void *transfer_buffer,
- 					 int buffer_length,
- 					 usb_complete_t complete,
- 					 void *context)
- {
- 	spin_lock_init(&urb->lock);
- 	urb->dev = dev;
- 	urb->pipe = pipe;
- 	urb->setup_packet = setup_packet;
- 	urb->transfer_buffer = transfer_buffer;
- 	urb->transfer_buffer_length = buffer_length;
- 	urb->complete = complete;
- 	urb->context = context;
- }
- 
- /**
-  * usb_fill_bulk_urb - macro to help initialize a bulk urb
-  * @urb: pointer to the urb to initialize.
-  * @dev: pointer to the struct usb_device for this urb.
-  * @pipe: the endpoint pipe
-  * @transfer_buffer: pointer to the transfer buffer
-  * @buffer_length: length of the transfer buffer
-  * @complete: pointer to the usb_complete_t function
-  * @context: what to set the urb context to.
-  *
-  * Initializes a bulk urb with the proper information needed to submit it
-  * to a device.
-  */
- static inline void usb_fill_bulk_urb (struct urb *urb,
- 				      struct usb_device *dev,
- 				      unsigned int pipe,
- 				      void *transfer_buffer,
- 				      int buffer_length,
- 				      usb_complete_t complete,
- 				      void *context)
- 				      
- {
- 	spin_lock_init(&urb->lock);
- 	urb->dev = dev;
- 	urb->pipe = pipe;
- 	urb->transfer_buffer = transfer_buffer;
- 	urb->transfer_buffer_length = buffer_length;
- 	urb->complete = complete;
- 	urb->context = context;
- }
      
! /**
!  * usb_fill_int_urb - macro to help initialize a interrupt urb
!  * @urb: pointer to the urb to initialize.
!  * @dev: pointer to the struct usb_device for this urb.
!  * @pipe: the endpoint pipe
!  * @transfer_buffer: pointer to the transfer buffer
!  * @buffer_length: length of the transfer buffer
!  * @complete: pointer to the usb_complete_t function
!  * @context: what to set the urb context to.
!  * @interval: what to set the urb interval to.
!  *
!  * Initializes a interrupt urb with the proper information needed to submit
!  * it to a device.
!  */
! static inline void usb_fill_int_urb (struct urb *urb,
! 				     struct usb_device *dev,
! 				     unsigned int pipe,
! 				     void *transfer_buffer,
! 				     int buffer_length,
! 				     usb_complete_t complete,
! 				     void *context,
! 				     int interval)
! {
! 	spin_lock_init(&urb->lock);
! 	urb->dev = dev;
! 	urb->pipe = pipe;
! 	urb->transfer_buffer = transfer_buffer;
! 	urb->transfer_buffer_length = buffer_length;
! 	urb->complete = complete;
! 	urb->context = context;
! 	urb->interval = interval;
! 	urb->start_frame = -1;
! }
! 
! struct urb *usb_alloc_urb(int iso_packets);
! void usb_free_urb (struct urb *urb);
! int usb_submit_urb(struct urb *urb);
! int usb_unlink_urb(struct urb *urb);
! int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, struct usb_ctrlrequest *cmd,  void *data, int len, int timeout);
  int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int *actual_length, int timeout);
  
  /*-------------------------------------------------------------------*
--- 530,541 ----
  	(a)->context=f;\
  	(a)->timeout=g;\
      } while (0)
      
! purb_t usb_alloc_urb(int iso_packets);
! void usb_free_urb (purb_t purb);
! int usb_submit_urb(purb_t purb);
! int usb_unlink_urb(purb_t purb);
! int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, devrequest *cmd,  void *data, int len, int timeout);
  int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, void *data, int len, int *actual_length, int timeout);
  
  /*-------------------------------------------------------------------*
***************
*** 765,771 ****
   */
  struct usb_bus {
  	int busnum;			/* Bus number (in order of reg) */
- 	char *bus_name;			/* stable id (PCI slot_name etc) */
  
  #ifdef DEVNUM_ROUND_ROBIN
  	int devnum_next;                /* Next open device number in round-robin allocation */
--- 566,571 ----
***************
*** 791,812 ****
  	atomic_t refcnt;
  };
  
- /*
-  * As of USB 2.0, full/low speed devices are segregated into trees.
-  * One type grows from USB 1.1 host controllers (OHCI, UHCI etc).
-  * The other type grows from high speed hubs when they connect to
-  * full/low speed devices using "Transaction Translators" (TTs).
-  *
-  * TTs should only be known to the hub driver, and high speed bus
-  * drivers (only EHCI for now).  They affect periodic scheduling and
-  * sometimes control/bulk error recovery.
-  */
- struct usb_tt {
- 	struct usb_device	*hub;	/* upstream highspeed hub */
- 	int			multi;	/* true means one TT per port */
- };
- 
- 
  /* This is arbitrary.
   * From USB 2.0 spec Table 11-13, offset 7, a hub can
   * have up to 255 ports. The most yet reported is 10.
--- 591,596 ----
***************
*** 814,821 ****
  #define USB_MAXCHILDREN		(16)
  
  struct usb_device {
! 	int		devnum;		/* Address on USB bus */
! 	char		devpath [16];	/* Use in messages: /port/port/... */
  
  	enum {
  		USB_SPEED_UNKNOWN = 0,			/* enumerating */
--- 598,604 ----
  #define USB_MAXCHILDREN		(16)
  
  struct usb_device {
! 	int devnum;			/* Device number on USB bus */
  
  	enum {
  		USB_SPEED_UNKNOWN = 0,			/* enumerating */
***************
*** 823,830 ****
  		USB_SPEED_HIGH				/* usb 2.0 */
  	} speed;
  
! 	struct usb_tt	*tt; 		/* low/full speed dev, highspeed hub */
! 	int		ttport;		/* device port on that tt hub */
  
  	atomic_t refcnt;		/* Reference count */
  	struct semaphore serialize;
--- 606,613 ----
  		USB_SPEED_HIGH				/* usb 2.0 */
  	} speed;
  
! 	struct usb_device *tt;		/* usb1.1 device on usb2.0 bus */
! 	int ttport;			/* device/hub port on that tt */
  
  	atomic_t refcnt;		/* Reference count */
  	struct semaphore serialize;
***************
*** 890,895 ****
--- 673,682 ----
  extern void usb_inc_dev_use(struct usb_device *);
  #define usb_dec_dev_use usb_free_dev
  
+ extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb);
+ extern void usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, int bustime, int isoc);
+ extern void usb_release_bandwidth(struct usb_device *dev, struct urb *urb, int isoc);
+ 
  extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size, int timeout);
  
  extern int usb_root_hub_string(int id, int serial, char *type, __u8 *data, int len);
***************
*** 900,941 ****
  
  int usb_get_current_frame_number (struct usb_device *usb_dev);
  
- 
- /**
-  * usb_make_path - returns stable device path in the usb tree
-  * @dev: the device whose path is being constructed
-  * @buf: where to put the string
-  * @size: how big is "buf"?
-  *
-  * Returns length of the string (> 0) or negative if size was too small.
-  *
-  * This identifier is intended to be "stable", reflecting physical paths in
-  * hardware such as physical bus addresses for host controllers or ports on
-  * USB hubs.  That makes it stay the same until systems are physically
-  * reconfigured, by re-cabling a tree of USB devices or by moving USB host
-  * controllers.  Adding and removing devices, including virtual root hubs
-  * in host controller driver modules, does not change these path identifers;
-  * neither does rebooting or re-enumerating.  These are more useful identifiers
-  * than changeable ("unstable") ones like bus numbers or device addresses.
-  * (The stability of the id depends on stability of the bus_name associated
-  * with the bus the device uses; that is normally stable.)
-  *
-  * With a partial exception for devices connected to USB 2.0 root hubs, these
-  * identifiers are also predictable.  So long as the device tree isn't changed,
-  * plugging any USB device into a given hub port always gives it the same path.
-  * Because of the use of "companion" controllers, devices connected to ports on
-  * USB 2.0 root hubs (EHCI host controllers) will get one path ID if they are
-  * high speed, and a different one if they are full or low speed.
-  */
- static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size)
- {
- 	int actual;
- 	actual = snprintf (buf, size, "usb-%s-%s",
- 		dev->bus->bus_name, dev->devpath);
- 	return (actual >= size) ? -1 : actual;
- }
- 
- 
  /*
   * Calling this entity a "pipe" is glorifying it. A USB pipe
   * is something embarrassingly simple: it basically consists
--- 687,692 ----
***************
*** 1062,1067 ****
--- 813,838 ----
  	__usb_get_extra_descriptor((ifpoint)->extra,(ifpoint)->extralen,type,(void**)ptr)
  
  /*
+  * Some USB bandwidth allocation constants.
+  */
+ #define BW_HOST_DELAY	1000L		/* nanoseconds */
+ #define BW_HUB_LS_SETUP	333L		/* nanoseconds */
+                         /* 4 full-speed bit times (est.) */
+ 
+ #define FRAME_TIME_BITS         12000L		/* frame = 1 millisecond */
+ #define FRAME_TIME_MAX_BITS_ALLOC	(90L * FRAME_TIME_BITS / 100L)
+ #define FRAME_TIME_USECS	1000L
+ #define FRAME_TIME_MAX_USECS_ALLOC	(90L * FRAME_TIME_USECS / 100L)
+ 
+ #define BitTime(bytecount)  (7 * 8 * bytecount / 6)  /* with integer truncation */
+ 		/* Trying not to use worst-case bit-stuffing
+                    of (7/6 * 8 * bytecount) = 9.33 * bytecount */
+ 		/* bytecount = data payload byte count */
+ 
+ #define NS_TO_US(ns)	((ns + 500L) / 1000L)
+ 			/* convert & round nanoseconds to microseconds */
+ 
+ /*
   * Debugging helpers..
   */
  void usb_show_device_descriptor(struct usb_device_descriptor *);
LAN/source_CD/linux-2.4.17_mvl21-sandpoint/include/melco$B$@$1$KH/8+(B: flash_toshiba.h
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/include/melco/flashd.h LAN/source_CD/linux-2.4.17_mvl21-sandpoint/include/melco/flashd.h
*** HGLAN/source_CD/linux-2.4.17_mvl21/include/melco/flashd.h	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/include/melco/flashd.h	2004-05-24 17:35:29.000000000 +0900
***************
*** 41,47 ****
  
  #define ATTACH_FLASH_ADDRESS_1 0xFF000000
  #define ATTACH_FLASH_ADDRESS_2 0xFF800000
! #define ATTACH_FLASH_ADDRESS 0xFFC00000
  
  #define PPC_CFG_REG  0xFEC00000
  #define PPC_DAT_REG  0xFEE00000
--- 41,48 ----
  
  #define ATTACH_FLASH_ADDRESS_1 0xFF000000
  #define ATTACH_FLASH_ADDRESS_2 0xFF800000
! #define FLASH_WRITE_ENABLE  HWCtl_Rom_Write_Enable()
! #define FLASH_WRITE_DISABLE HWCtl_Rom_Write_Disable()
  
  #define PPC_CFG_REG  0xFEC00000
  #define PPC_DAT_REG  0xFEE00000
***************
*** 61,623 ****
  typedef volatile unsigned long*    pvlong;
  typedef volatile unsigned short*   pvshort;
  
- static int flash_amd_compt_probe(unsigned char factory , unsigned char devnum);
- static int flash_amd_compt_erase(unsigned long addr ,int num , int flag);
- int flash_st_compt_erase(unsigned long addr ,int num , int flag);
- 
- static int flash_toshiba_probe(void);
- static int flash_toshiba_erase(unsigned long addr ,int num);
- int flash_toshiba_write(unsigned long addr ,unsigned char* buf,int size);
- 
- static int flash_fujitsu_probe(void);
- static int flash_fujitsu_erase(unsigned long addr ,int num);
- static int flash_fujitsu_compat_erase(unsigned long addr ,int num , int flag);
- static int flash_fujitsu_write(unsigned long addr ,unsigned char* buf,int size);
- 
- static int flash_st_probe(void);
- static int flash_st_erase(unsigned long addr ,int num);
- static int flash_st_write(unsigned long addr ,unsigned char* buf,int size);
- 
- static int flash_mx_probe(void);
- static int flash_mx_write(unsigned long addr ,unsigned char* buf,int size);
- 
- #define HEAD_BLOCK    0x01
- #define BOTTOM_BLOCK  0x02
- 
- struct flash_dev_func flash_toshiba  = 
- 	{
- 	"TOSHIBA VT641FT",
- 	64 * 1024,
- 	flash_toshiba_probe,
- 	flash_toshiba_erase,
- 	flash_toshiba_write,
- 	NULL
- 	};
- 
- struct flash_dev_func flash_fujitsu  = 
- 	{
- 	"FUJITSU MBM29PL32TM",
- 	64 * 1024,
- 	flash_fujitsu_probe,
- 	flash_fujitsu_erase,
- 	flash_fujitsu_write,
- 	NULL
- 	};
- 
- struct flash_dev_func flash_st  = 
- 	{
- 	"STMICRO M29W320DT",
- 	64 * 1024,
- 	flash_st_probe,
- 	flash_st_erase,
- 	flash_st_write,
- 	NULL
- 	};
- 
- struct flash_dev_func flash_mx  = 
- 	{
- 	"MXIC MX29LV320T",
- 	64 * 1024,
- 	flash_mx_probe,
- 	flash_toshiba_erase,
- 	flash_mx_write,
- 	NULL
- 	};
- 
- #define TOSHIBA_FLASH_CMDA(x)	\
- 	*(volatile char*)(ATTACH_FLASH_ADDRESS + 0xaaa) = x;
- #define TOSHIBA_FLASH_CMD5(x)	\
- 	*(volatile char*)(ATTACH_FLASH_ADDRESS + 0x555) = x;
- #define TOSHIBA_FLASH_START (volatile char*)(ATTACH_FLASH_ADDRESS)
- 
- #define FLASH_COMMAND_CLEAR TOSHIBA_FLASH_CMDA(0xf0)
- #define FLASH_COMMAND_READY TOSHIBA_FLASH_CMDA(0xaa);TOSHIBA_FLASH_CMD5(0x55)
- 
- 
- static int flash_toshiba_probe(void) 
- {
- 	return flash_amd_compt_probe(0x98,0x93);
- }
- 
- static int flash_toshiba_erase(unsigned long addr ,int num) 
- {
- 	return flash_amd_compt_erase(addr ,num , BOTTOM_BLOCK);
- }
- 
- static int flash_fujitsu_probe(void) 
- {
- 	return flash_amd_compt_probe(0x04,0x7e);
- }
- 
- static int flash_fujitsu_erase(unsigned long addr ,int num)
- {
- 	return flash_fujitsu_compt_erase(addr ,num , BOTTOM_BLOCK);
- }
- 
- static int flash_st_probe(void) 
- {
- 	return flash_amd_compt_probe(0x20,0xCA);
- }
- 
- static int flash_st_erase(unsigned long addr ,int num)
- {
- 	return flash_st_compt_erase(addr ,num , BOTTOM_BLOCK);
- }
- static int flash_mx_probe(void) 
- {
- 	return flash_amd_compt_probe(0xC2,0xA7);
- }
- 
- static int flash_amd_compt_probe(unsigned char factory , unsigned char devnum)
- {
- 	unsigned long time = jiffies;
- 	unsigned char vendor,device;
- 	FLASH_COMMAND_CLEAR;
- 	FLASH_COMMAND_READY;
- 	TOSHIBA_FLASH_CMDA(0x90);
- 	do {
- 		vendor = *(TOSHIBA_FLASH_START);
- 		device = *(TOSHIBA_FLASH_START+2);
- 		if(vendor == factory || device == devnum) break;
- 		} while(jiffies-time<100);
- 	FLASH_COMMAND_CLEAR;
- 	if(vendor == factory || device == devnum) return 1;
- 	return 0;
- }
- 
- #define BIT(x) 1<0) {
- 		if( ((flag & HEAD_BLOCK) != 0) &&
- 			((unsigned long)baddr >= (unsigned long)0xffc00000 &&
- 			 (unsigned long)baddr < (unsigned long)0xffc10000) ) {
- 				times = 8;
- 				size  = 0x2000;
- 		}
- 		else if( ((flag & BOTTOM_BLOCK) != 0) &&
- 			 (unsigned long)baddr >= (unsigned long)0xffff0000 ) {
- 			times = 8;
- 			size  = 0x2000;
- 		}
- 		else {
- 			times = 1;
- 			size  = 0x10000;
- 		}
- 
- 		for(i=0;i0) {
- 		if( ((flag & HEAD_BLOCK) != 0) &&
- 			((unsigned long)baddr >= (unsigned long)0xffc00000 &&
- 			 (unsigned long)baddr < (unsigned long)0xffc10000) ) {
- 				times = 4;
- 				size  = 0x2000;
- 		}
- 		else if( ((flag & BOTTOM_BLOCK) != 0) &&
- 			 (unsigned long)baddr >= (unsigned long)0xffff0000 ) {
- 			times = 4;
- 			size  = 0x2000;
- 		}
- 		else {
- 			times = 1;
- 			size  = 0x10000;
- 		}
- 		for(i=0;i 1) {
- 				switch (i) {
- 				case 0:
- 					if ((flag & HEAD_BLOCK) != 0)
- 						size = 0x4000;
- 					else
- 						size = 0x8000;
- 					erase_addr = 0;
- 					break;
- 				case 1:
- 				case 2:
- 					size = 0x2000;
- 					if ((flag & HEAD_BLOCK) != 0)
- 						erase_addr = 0x4000 + (i-1)*size;
- 					else
- 						erase_addr = 0x8000 + (i-1)*size;
- 					break;
- 				case 3:
- 					if ((flag & HEAD_BLOCK) != 0) {
- 						size = 0x8000;
- 						erase_addr = 0x8000;
- 					}
- 					else {
- 						size = 0x4000;
- 						erase_addr = 0xc000;
- 					}
- 					break;
- 				default:
- 					size = 0x2000;
- 				}
- 			}
- 			else
- 				erase_addr = 0;
- 
- 			FLASH_COMMAND_CLEAR;
- 			udelay(50);
- 			FLASH_COMMAND_READY;
- 			TOSHIBA_FLASH_CMDA(0x80);
- 			FLASH_COMMAND_READY;
- 			*(baddr+erase_addr) = 0x30;
- 			if(flash_toshiba_state(baddr+erase_addr,0xff)) {
- 				printk("Flash Erase fail?!\n");
- 			}
- 			FLASH_COMMAND_CLEAR;
- 		}
- 
- 		caddr = baddr;
- 		for(i=0;i<0x10000;++i) {
- 			c = *caddr;
- 			if(c != (unsigned char)0xff) {
- 				printk("verify fail! %p = %02X\n",caddr,c);
- 				return -1;
- 				}
- 			caddr++;
- 		}
- 		num--;
- 		baddr += 0x10000;
- 	}
- 
- 	return 0;
- }
- 
- static int flash_fujitsu_compt_erase(unsigned long addr ,int num , int flag)
- {
- 	volatile unsigned char* baddr;
- 	volatile unsigned char* caddr;
- 	unsigned char           c;
- 	long  i,times;
- 	long  size;
- 	addr  = addr & 0xffff0000;
- 	baddr = (char*)addr;
- 
- 	while(num>0) {
- 		if( ((flag & HEAD_BLOCK) != 0) &&
- 			((unsigned long)baddr >= (unsigned long)0xffc00000 &&
- 			 (unsigned long)baddr < (unsigned long)0xffc10000) ) {
- 				times = 8;
- 				size  = 0x2000;
- 		}
- 		else if( ((flag & BOTTOM_BLOCK) != 0) &&
- 			 (unsigned long)baddr >= (unsigned long)0xffff0000 ) {
- 			times = 8;
- 			size  = 0x2000;
- 		}
- 		else {
- 			times = 1;
- 			size  = 0x10000;
- 		}
- 
- 		for(i=0;i 0)
- 			printk("Flash Verify %d times\n", verify_fail);
- 		for(i=0;i= 2);
- 
- 	return 0;
- }
- 
- static int flash_fujitsu_write(unsigned long addr ,unsigned char* buf,int size)
- {
- 	volatile unsigned char  *baddr, *naddr, *saddr;
- 	int                     i, j, write_time, surplus;
- 	int                     verify_fail = 0;
- 
- 	baddr = (char*)addr;
- 	write_time = size / 32;
- 	surplus = size % 32;
- 
- 	for(i = 0;i < write_time; i++) {
- 		baddr = (char*)addr + (i * 32);
- 		naddr = baddr;
- 		if(baddr < 0xffff0000)
- 			saddr = baddr - ((addr+(i*32)) % 0x10000);
- 		else
- 			saddr = baddr - ((addr+(i*32)) % 0x2000);
- 
- 		FLASH_COMMAND_CLEAR;
- 		FLASH_COMMAND_READY;
- 		*saddr = 0x25;
- 		*saddr = 31;
- 
- 		for(j = 0;j < 32; ++j) {
- 			*naddr = buf[(i*32) + j];
- 			naddr++;
- 		}
- 
- 		*saddr = 0x29;
- 		if(flash_toshiba_state(naddr-1,buf[(i * 32) + j - 1])) {
- 				printk("%8X:%8X, %d/%d, Flash Write fail?!\n", saddr, baddr, i+1, write_time);
- 		}
- 		FLASH_COMMAND_READY;
- 		FLASH_COMMAND_CLEAR;
- 	}
- 
- 	if(surplus > 0) {
- 		baddr = (char*)addr + (write_time * 32);
- 		naddr = baddr;
- 		if(baddr < 0xffff0000)
- 			saddr = baddr - ((addr+(write_time*32)) % 0x10000);
- 		else
- 			saddr = baddr - ((addr+(write_time*32)) % 0x2000);
- 
- 		FLASH_COMMAND_CLEAR;
- 		FLASH_COMMAND_READY;
- 		*saddr = 0x25;
- 		*saddr = surplus - 1;
- 
- 		for(j = 0;j < surplus; ++j) {
- 			*naddr = buf[(write_time * 32) + j];
- 			naddr++;
- 		}
- 
- 		*saddr = 0x29;
- 		if(flash_toshiba_state(naddr-1,buf[(write_time * 32) + j - 1])) {
- 				printk("%8X:%8X:%d, Flash Write fail?!\n", saddr, baddr, surplus);
- 		}
- 		FLASH_COMMAND_READY;
- 		FLASH_COMMAND_CLEAR;
- 	}
- 
- 	baddr = (char*)addr;
- 
- 	do {
- 		if (verify_fail > 0)
- 			printk("Flash Verify %d times\n", verify_fail);
- 		for(i=0;i= 2);
- 
- 	return 0;
- }
- 
- static int flash_mx_write(unsigned long addr ,unsigned char* buf,int size)
- {
- 	volatile unsigned char* baddr;
- 	long                    i;
- 	baddr = (char*)addr;
- 	FLASH_COMMAND_CLEAR;
- 	for(i=0;i TASK_SIZE || (addr + len) < addr)
- 		return -EINVAL;
- 
  	/*
  	 * mlock MCL_FUTURE?
  	 */
--- 1021,1026 ----
diff -rc HGLAN/source_CD/linux-2.4.17_mvl21/mm/mremap.c LAN/source_CD/linux-2.4.17_mvl21-sandpoint/mm/mremap.c
*** HGLAN/source_CD/linux-2.4.17_mvl21/mm/mremap.c	2004-04-08 22:41:33.000000000 +0900
--- LAN/source_CD/linux-2.4.17_mvl21-sandpoint/mm/mremap.c	2004-05-24 17:35:29.000000000 +0900
***************
*** 237,250 ****
  		if (new_len > TASK_SIZE || new_addr > TASK_SIZE - new_len)
  			goto out;
  
- 		/* 
- 		 * Allow new_len == 0 only if new_addr == addr
- 		 * to preserve truncation in place (that was working
- 		 * safe and some app may depend on it).
- 		 */
- 		if (unlikely(!new_len && new_addr != addr))
- 			goto out;
- 
  		/* Check if the location we're moving into overlaps the
  		 * old location at all, and fail if it does.
  		 */
--- 237,242 ----
***************
*** 254,273 ****
  		if ((addr <= new_addr) && (addr+old_len) > new_addr)
  			goto out;
  
! 		ret = do_munmap(current->mm, new_addr, new_len); 
! 		if (ret && new_len)
! 			goto out;
  	}
  
  	/*
  	 * Always allow a shrinking remap: that just unmaps
  	 * the unnecessary pages..
  	 */
  	if (old_len >= new_len) {
! 		ret = do_munmap(current->mm, addr+new_len, old_len - new_len);
! 		if (ret && old_len != new_len)
! 			goto out;
! 		ret = addr;
  		if (!(flags & MREMAP_FIXED) || (new_addr == addr))
  			goto out;
  	}
--- 246,261 ----
  		if ((addr <= new_addr) && (addr+old_len) > new_addr)
  			goto out;
  
! 		do_munmap(current->mm, new_addr, new_len);
  	}
  
  	/*
  	 * Always allow a shrinking remap: that just unmaps
  	 * the unnecessary pages..
  	 */
+ 	ret = addr;
  	if (old_len >= new_len) {
! 		do_munmap(current->mm, addr+new_len, old_len - new_len);
  		if (!(flags & MREMAP_FIXED) || (new_addr == addr))
  			goto out;
  	}

$B",(B $B%O%C%/$N5-O?(B

Copyright (C) 2004 Yasunari Yamashita. All Rights Reserved.
yasunari $B!w(B yamasita.jp
$B;32<9/@.(B$B!w(B$B5~ETI\8~F|;T(B